azure-sdk-for-js: [Event Hubs] Test failures - misc.spec.ts

Following tests in misc.spec.ts are failing -

  • should be able to send and receive batched messages correctly
  • should be able to send and receive batched messages as JSON objects correctly

Both the tests are failing because receive() is yielding 0 events (as opposed to 5). The Node counterpart tests pass frequently, and sometimes fail with receiving just 4 and not 5. But browser tests are failing consistently by receiving 0 events.

Expected behavior: Both Node and browser tests to pass consistently i.e., reflect reliability and consistency of receiving events in batch.

Steps to reproduce: Checkout latest commit from https://github.com/Azure/azure-sdk-for-js/pull/3445 if not already available on master.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 18 (18 by maintainers)

Most upvoted comments

Clarifying a bit:

This issue was originally to track the tests in misc.spec.ts which were failing in browser mode due to the drain feature not being implemented on the service side. The tests were refactored to avoid the drain issue and therefore the decision to close the issue

The commented test was in receiver.spec.ts file which was not what this issue was tracking.

Great job on the investigations @ramya0820

One question, have you tried running the same test for Service Bus and compare node vs browser behavior? This will help us narrow down on whether this browser vs node difference is due to rhea or the service. While doing this remove the logic we have for drain in Service Bus to get the right comparison.

The fact that the service is not respecting the drain request could be because they don’t support it yet. This doesnt affect our customers yet, because they don’t use the receive() function on the BatchingReceiver directly. Each receiveBatch() request from the user creates a whole new batching receiver and closes the same at the end of the operation.

The issue of Node tests sometimes failing by receiving just 4 instead of 5 events is being tracked in https://github.com/Azure/azure-sdk-for-js/issues/1751. Therefore, please use this issue to investigate why we are getting 0 events in browser mode. The 2 may or may not be related. If we can get the browser test to receive non zero events, then that is a good enough resolution of this issue and the 4 vs 5 events can be continued to be investigated as part of https://github.com/Azure/azure-sdk-for-js/issues/1751