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

Added unit tests in internal/tracegen #5119

Merged

Conversation

VaibhavMalik4187
Copy link
Contributor

@VaibhavMalik4187 VaibhavMalik4187 commented Jan 19, 2024

Which problem is this PR solving?

Description of the changes

  • This commit adds tests for the internal/tracegen package.

How was this change tested?

  • make test

Checklist

@VaibhavMalik4187 VaibhavMalik4187 requested a review from a team as a code owner January 19, 2024 07:48
@VaibhavMalik4187 VaibhavMalik4187 marked this pull request as draft January 19, 2024 07:54
VaibhavMalik4187 added a commit to VaibhavMalik4187/jaeger that referenced this pull request Jan 19, 2024
- Partially fixes jaegertracing#5068

- This commit adds tests for the `Run` function defined in the `internal/tracegen` package.

- make test

- [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [x] I have signed all commits
- [x] I have added unit tests for the new functionality
- [x] I have run lint and test steps successfully
  - for `jaeger`: `make lint test`
  - for `jaeger-ui`: `yarn lint` and `yarn test`

Signed-off-by: VaibhavMalik4187 <[email protected]>
@VaibhavMalik4187 VaibhavMalik4187 marked this pull request as ready for review January 19, 2024 17:10
@VaibhavMalik4187
Copy link
Contributor Author

@yurishkuro could you please trigger the workflows on this PR? Thanks?

Copy link
Member

@yurishkuro yurishkuro left a comment

Choose a reason for hiding this comment

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

are you able to bring package coverage above 95%?

internal/tracegen/config_test.go Outdated Show resolved Hide resolved
internal/tracegen/config_test.go Outdated Show resolved Hide resolved
internal/tracegen/worker_test.go Outdated Show resolved Hide resolved
VaibhavMalik4187 added a commit to VaibhavMalik4187/jaeger that referenced this pull request Jan 20, 2024
- Partially fixes jaegertracing#5068

- This commit adds tests for the `Run` function defined in the `internal/tracegen` package.

- make test

- [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [x] I have signed all commits
- [x] I have added unit tests for the new functionality
- [x] I have run lint and test steps successfully
  - for `jaeger`: `make lint test`
  - for `jaeger-ui`: `yarn lint` and `yarn test`

Signed-off-by: VaibhavMalik4187 <[email protected]>
VaibhavMalik4187 added a commit to VaibhavMalik4187/jaeger that referenced this pull request Jan 20, 2024
- Partially fixes jaegertracing#5068

- This commit adds tests for the `Run` function defined in the `internal/tracegen` package.

- make test

- [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [x] I have signed all commits
- [x] I have added unit tests for the new functionality
- [x] I have run lint and test steps successfully
  - for `jaeger`: `make lint test`
  - for `jaeger-ui`: `yarn lint` and `yarn test`

Signed-off-by: VaibhavMalik4187 <[email protected]>
@VaibhavMalik4187
Copy link
Contributor Author

are you able to bring package coverage above 95%?

The latest commit increased the coverage of this package to 97%.

VaibhavMalik4187 added a commit to VaibhavMalik4187/jaeger that referenced this pull request Jan 20, 2024
- Partially fixes jaegertracing#5068

- This commit adds tests for the `Run` function defined in the `internal/tracegen` package.

- make test

- [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [x] I have signed all commits
- [x] I have added unit tests for the new functionality
- [x] I have run lint and test steps successfully
  - for `jaeger`: `make lint test`
  - for `jaeger-ui`: `yarn lint` and `yarn test`

Signed-off-by: VaibhavMalik4187 <[email protected]>
VaibhavMalik4187 added a commit to VaibhavMalik4187/jaeger that referenced this pull request Jan 20, 2024
- Partially fixes jaegertracing#5068

- This commit adds tests for the `Run` function defined in the `internal/tracegen` package.

- make test

- [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [x] I have signed all commits
- [x] I have added unit tests for the new functionality
- [x] I have run lint and test steps successfully
  - for `jaeger`: `make lint test`
  - for `jaeger-ui`: `yarn lint` and `yarn test`

Signed-off-by: VaibhavMalik4187 <[email protected]>
internal/tracegen/config_test.go Outdated Show resolved Hide resolved
internal/tracegen/worker_test.go Outdated Show resolved Hide resolved
internal/tracegen/worker_test.go Outdated Show resolved Hide resolved
Copy link

github-actions bot commented Jan 20, 2024

Test Results

2 082 tests  +6   2 072 ✅ +6   1m 9s ⏱️ ±0s
  216 suites ±0      10 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit 22b092c. ± Comparison against base commit adbdb2d.

♻️ This comment has been updated with latest results.

Copy link

codecov bot commented Jan 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (6662e1c) 95.62% compared to head (fd452e5) 95.59%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5119      +/-   ##
==========================================
- Coverage   95.62%   95.59%   -0.03%     
==========================================
  Files         322      324       +2     
  Lines       18454    18566     +112     
==========================================
+ Hits        17646    17749     +103     
- Misses        649      655       +6     
- Partials      159      162       +3     
Flag Coverage Δ
cassandra-3.x 25.58% <ø> (ø)
cassandra-4.x 25.58% <ø> (ø)
elasticsearch-5.x 19.87% <ø> (ø)
elasticsearch-6.x 19.87% <ø> (+0.01%) ⬆️
elasticsearch-7.x 20.00% <ø> (ø)
elasticsearch-8.x 20.08% <ø> (-0.02%) ⬇️
grpc-badger 19.51% <ø> (-0.02%) ⬇️
kafka 14.09% <ø> (ø)
opensearch-1.x 19.99% <ø> (-0.02%) ⬇️
opensearch-2.x 20.00% <ø> (ø)
unittests 93.29% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

VaibhavMalik4187 added a commit to VaibhavMalik4187/jaeger that referenced this pull request Jan 20, 2024
- Partially fixes jaegertracing#5068

- This commit adds tests for the `Run` function defined in the `internal/tracegen` package.

- make test

- [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [x] I have signed all commits
- [x] I have added unit tests for the new functionality
- [x] I have run lint and test steps successfully
  - for `jaeger`: `make lint test`
  - for `jaeger-ui`: `yarn lint` and `yarn test`

Signed-off-by: VaibhavMalik4187 <[email protected]>
@yurishkuro yurishkuro added the changelog:test Change that's adding missing tests or correcting existing tests label Jan 20, 2024
@yurishkuro yurishkuro enabled auto-merge (squash) January 20, 2024 21:55
@yurishkuro yurishkuro disabled auto-merge January 20, 2024 21:56
@yurishkuro
Copy link
Member

If the code coverage above 95%, you should remove .nocover file in this package

VaibhavMalik4187 added a commit to VaibhavMalik4187/jaeger that referenced this pull request Jan 21, 2024
- Partially fixes jaegertracing#5068

- This commit adds tests for the `Run` function defined in the `internal/tracegen` package.

- make test

- [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [x] I have signed all commits
- [x] I have added unit tests for the new functionality
- [x] I have run lint and test steps successfully
  - for `jaeger`: `make lint test`
  - for `jaeger-ui`: `yarn lint` and `yarn test`

Signed-off-by: VaibhavMalik4187 <[email protected]>
@VaibhavMalik4187
Copy link
Contributor Author

If the code coverage above 95%, you should remove .nocover file in this package

Okay, removed it.

- Partially fixes jaegertracing#5068

- This commit adds tests tests in the `internal/tracegen` package,
  bringing the package coverage to 97%.

- make test

- [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [x] I have signed all commits
- [x] I have added unit tests for the new functionality
- [x] I have run lint and test steps successfully
  - for `jaeger`: `make lint test`
  - for `jaeger-ui`: `yarn lint` and `yarn test`

Signed-off-by: VaibhavMalik4187 <[email protected]>
@yurishkuro yurishkuro enabled auto-merge (squash) January 21, 2024 17:40
@yurishkuro yurishkuro merged commit 351b004 into jaegertracing:main Jan 21, 2024
37 checks passed
@VaibhavMalik4187
Copy link
Contributor Author

Thanks for merging

@yurishkuro
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:test Change that's adding missing tests or correcting existing tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement missing unit tests
2 participants