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

[Test] Fix monitor-opentelemetry-exporter live tests #31675

Merged
merged 2 commits into from
Nov 7, 2024

Conversation

jeremymeng
Copy link
Member

Migrate the non-standard tests

@jeremymeng
Copy link
Member Author

/azp run js - monitor-opentelemetry-exporter - tests

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@JacksonWeber JacksonWeber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@azure-sdk
Copy link
Collaborator

API change check

API changes are not detected in this pull request.

@jeremymeng
Copy link
Member Author

/azp run js - monitor-opentelemetry-exporter - tests

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jeremymeng
Copy link
Member Author

Looks that the tests are being executed now. However, the tests are now failing. It looks like a test issue to me. Previously they were passing because the test catches error and calls done(). Going to merge this PR as it makes things better, not worse.

-    it("should work", (done) => {
-      scenario
-        .run()
-        .then(() => {
-          // promisify doesn't work on this, so use callbacks/done for now
-          // eslint-disable-next-line promise/always-return
-          return scenario.flush().then(() => {
-            assertMetricExpectation(ingest, scenario.expectation);
-            assertCount(ingest, scenario.expectation);
-            done();
-          });
-        })
-        .catch((e) => {
-          done(e);
-        });
+    it("should work", async () => {
+      await scenario.run();
+      // promisify doesn't work on this, so use callbacks/done for now
+      // eslint-disable-next-line promise/always-return
+      await scenario.flush();
+      assertMetricExpectation(ingest, scenario.expectation);
+      assertCount(ingest, scenario.expectation);
     });

@jeremymeng
Copy link
Member Author

/check-enforcer override

@jeremymeng jeremymeng merged commit 67e6fc0 into Azure:main Nov 7, 2024
23 of 33 checks passed
@jeremymeng jeremymeng deleted the test/ot-exporter-integration branch November 7, 2024 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants