Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Event Hubs] Add tests for browser mode #2809

Closed
2 of 3 tasks
ramya-rao-a opened this issue May 10, 2019 · 11 comments
Closed
2 of 3 tasks

[Event Hubs] Add tests for browser mode #2809

ramya-rao-a opened this issue May 10, 2019 · 11 comments
Labels
Client This issue points to a problem in the data-plane of the library. EngSys This issue is impacting the engineering system. Event Hubs
Milestone

Comments

@ramya-rao-a
Copy link
Contributor

ramya-rao-a commented May 10, 2019

Just like what we are doing for Service Bus in #2163 , we need to do the same for Event Hubs

This task needs to be taken up after the #2808 is done

  • Figure out what tests we want to run in Browser mode. Will they be same or subset of Nodejs? Will we need any new ones?
  • Ensure we have a way to run the browser tests locally
  • Ensure we can run the browser tests in CI
@ramya0820
Copy link
Member

ramya0820 commented Jun 5, 2019

Regarding the test failures surfaced by #3445, following is a summary -

  • One of them is to do with WebSocket throwing an error, though the node tests pass (iotHub.spec.ts)
  • Some tests in misc.spec.ts are failing specific to batched messages, and only in browser and not for node. Needs further investigation.
  • Some other tests in receiver.spec.ts are failing as being unable to read from stream seems to intermittently occur in Node as well. This may have to do with entity setup / clearing and requires further investigation.

If not resolved as part of #3445, will be tracking these issues separately.

cc @ramya-rao-a @AlexGhiondea @bterlson

@ramya0820
Copy link
Member

ramya0820 commented Jun 5, 2019

Also, regarding what tests to run in browser, given recent findings and that there is no specific pattern in the browser test failures, all tests seem to be relevant in context of browsers. Hence the proposal would be to run all of them in browser.
@ramya-rao-a Thoughts?

Edit:

  • packageInfo related test can be left specific to Node.
  • And based on what we decide, the test tags can be manipulated accordingly such as by using grep or invert, whichever's easier/faster to maintain.

@ramya-rao-a
Copy link
Contributor Author

Event Hubs has a much smaller set of tests when compared to Service Bus, so I am fine running all the tests in browser as well.

@ramya-rao-a
Copy link
Contributor Author

Regarding the Websocket error in the test cases for IotHub, please log a new issue. It could very well be the case that IotHub service does not support Websockets. If that is indeed the case, then we need to update createFromIotHubConnectionString() to throw an error when we detect that Websockets are being used.

@ramya0820
Copy link
Member

Regarding the Websocket error in the test cases for IotHub, please log a new issue. It could very well be the case that IotHub service does not support Websockets. If that is indeed the case, then we need to update createFromIotHubConnectionString() to throw an error when we detect that Websockets are being used.

Got it, logged #3473 for the iotHub testcases.
#3472 and #3471 have been logged as well for receiver.spec.ts and misc.spec.ts test failures.

@ramya0820
Copy link
Member

Discussed offline, was able to get this PR working fine with npm.
On troubleshooting rush + rollup further in order to get this working on CI, a different set of changes to rollup was required.

Just as we did for #2163, which eventually resulted in us needing more investigation on rush+rollup #3326, we will need work from #3326 to help with troubleshooting EventHubs browser test CI runs as well.

As a summary of findings so far - the problematic references that I was grappling with is mainly Buffer. De-duping seems to make a difference to being able to even locate the references. And 'Buffer' in case of EventHubs seems somewhat tied with 'util'. Needs investigation just like what we did/doing for #3119 / #3326.

cc @ramya-rao-a @AlexGhiondea @mikeharder

@ramya-rao-a
Copy link
Contributor Author

ramya-rao-a commented Jun 7, 2019

Please correct me if I am wrong here

If the above is true then I suggest to

@ramya0820
Copy link
Member

Please correct me if I am wrong here

If the above is true then I suggest to

No, that's not true - de-duping was required to work with npm as well. Current changes are not working with rush inspite of de-duping. Some other workaround may be required which will require same work as being done in #3326.
A different kind of de-duping was getting things with Rush to somewhat work (pass compilation stage), but was still failing overall (runtime).

@ramya-rao-a
Copy link
Contributor Author

Thanks for the clarification!

Since we are not completely comfortable with the very act of de-duping 1 dependency (Buffer for Service Bus, thus the issue of #3326), I would say let's not introduce 4 more de-dupes until we know more about why rush needs this.

My proposal:

@ramya0820 ramya0820 removed their assignment Jun 10, 2019
@ramya-rao-a ramya-rao-a modified the milestones: Sprint 154, Sprint 155 Jun 11, 2019
@ramya-rao-a ramya-rao-a modified the milestones: Sprint 155, Sprint 156 Jun 26, 2019
@mikeharder mikeharder self-assigned this Jul 26, 2019
@mikeharder mikeharder added the EngSys This issue is impacting the engineering system. label Jul 26, 2019
@chradek chradek removed this from the Sprint 156 milestone Aug 6, 2019
@chradek chradek added this to the Backlog milestone Aug 6, 2019
@ramya-rao-a
Copy link
Contributor Author

With #3326 now resolved, we should aim at enabling the browser tests in CI in the current sprint

@chradek
Copy link
Contributor

chradek commented Oct 7, 2019

#5345 Added the final piece for getting browser CI working. Closing!

@chradek chradek closed this as completed Oct 7, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. EngSys This issue is impacting the engineering system. Event Hubs
Projects
None yet
Development

No branches or pull requests

5 participants