Skip to content

Convert mongo-common tests from groovy to java#12382

Merged
trask merged 15 commits into
open-telemetry:mainfrom
xiepuhuan:mongo-common-java-tests
Oct 17, 2024
Merged

Convert mongo-common tests from groovy to java#12382
trask merged 15 commits into
open-telemetry:mainfrom
xiepuhuan:mongo-common-java-tests

Conversation

@xiepuhuan

Copy link
Copy Markdown
Contributor

Related to #7195

@xiepuhuan xiepuhuan requested a review from a team as a code owner October 2, 2024 15:15
… and "cleanup"

2. Collection tool class methods use static import

Signed-off-by: xiepuhuan <puhuanxie@gmail.com>
Signed-off-by: xiepuhuan <puhuanxie@gmail.com>
Signed-off-by: xiepuhuan <puhuanxie@gmail.com>
2. Convert long to int using `Math.toIntExam`.

Signed-off-by: xiepuhuan <puhuanxie@gmail.com>

@steverao steverao left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

BTW, don't forget to delete following unnecessary dependencies


@xiepuhuan

Copy link
Copy Markdown
Contributor Author

BTW, don't forget to delete following unnecessary dependencies

Thanks.

2. Close resources using AutoCleanupExtension
3. Reconstruct the mongoSpan method
xiepuhuan and others added 5 commits October 17, 2024 00:13
2. Change the return type of the involved method from int to long.
3. Using isIn instead of containsAnyOf for correct assertions.
4. Directly throw InterruptedException without capturing it.
5. Latch calls await method with timeout.
6. Merge comment lines.
7. Use the get method to wait for the future to complete, just like the original Groovy code.
8. In the mongoSpan method parameters, use SpanDataAsset instead of trace and index.
9. In the mongoSpan method, optimizing assertion error prompts.

Signed-off-by: xiepuhuan <puhuanxie@gmail.com>
@trask trask merged commit c743b6d into open-telemetry:main Oct 17, 2024
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.

6 participants