Topic.flush() is promisified, so it returns either a Promise or takes a callback, depending on how it's called. This calls Publisher.flush(), which likewise can deal with Promises. However, MessageQueue.publish(), which Publisher.flush() calls, does not support Promises, only callbacks. But Publisher.flush() is expecting it to support Promises, so no callback is passed down, and Publisher.flush() gets back undefined, which passes through as a resolve, and no wait happens.
Topic.flush()is promisified, so it returns either a Promise or takes a callback, depending on how it's called. This callsPublisher.flush(), which likewise can deal with Promises. However,MessageQueue.publish(), whichPublisher.flush()calls, does not support Promises, only callbacks. ButPublisher.flush()is expecting it to support Promises, so no callback is passed down, andPublisher.flush()gets back undefined, which passes through as a resolve, and no wait happens.