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

fix: scopemanager initialization in test #179

Conversation

@danielkhan
Copy link
Contributor

commented Aug 8, 2019

The implementation created an instance of AsyncHooksScopeManager in a test.
All other tests depend on this instance to exist which makes them non-idempotent (the order of test execution should not matter).

This change simply creates a new instance of AsyncHooksScopeManager in beforeEach() which has also the benefit, that each test operates on a fresh scopeManager eliminating potential side effects.

danielkhan added some commits Aug 7, 2019

fix: / update gitignore
.gitignore to ignore .nyc_output
Merge branch 'dkhan-async-hooks-scope-coverage' of github.com:dynatra…
…ce-oss-contrib/opentelemetry-js into dkhan-async-hooks-scope-coverage
@codecov-io

This comment has been minimized.

Copy link

commented Aug 8, 2019

Codecov Report

Merging #179 into master will increase coverage by 0.24%.
The diff coverage is 100%.

@@            Coverage Diff            @@
##           master    #179      +/-   ##
=========================================
+ Coverage   92.65%   92.9%   +0.24%     
=========================================
  Files          50      50              
  Lines        1471    1493      +22     
  Branches       99      99              
=========================================
+ Hits         1363    1387      +24     
+ Misses        108     106       -2
Impacted Files Coverage Δ
...oks/test/asynchooks/AsyncHooksScopeManager.test.ts 100% <100%> (ø) ⬆️
...ry-scope-async-hooks/src/AsyncHooksScopeManager.ts 100% <0%> (+5%) ⬆️

@danielkhan danielkhan merged commit fc74a7f into open-telemetry:master Aug 9, 2019

7 checks passed

ci/circleci: lint Your tests passed on CircleCI!
Details
ci/circleci: node10 Your tests passed on CircleCI!
Details
ci/circleci: node11 Your tests passed on CircleCI!
Details
ci/circleci: node12 Your tests passed on CircleCI!
Details
ci/circleci: node12-browsers Your tests passed on CircleCI!
Details
ci/circleci: node8 Your tests passed on CircleCI!
Details
cla/linuxfoundation danielkhan authorized
Details

@danielkhan danielkhan deleted the dynatrace-oss-contrib:dkhan_fix-scopemanager-initialization-in-test branch Aug 9, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.