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

BazelJUnitOutputListener Can't Handle Deeply Nested Test Classes #296

Open
sfc-gh-skhattak opened this issue Aug 22, 2024 · 0 comments
Open

Comments

@sfc-gh-skhattak
Copy link

sfc-gh-skhattak commented Aug 22, 2024

It seems that the BazelJUnitOutputListener class can handle only up to 4 jupiter @Nested classes for simple tests. This is because with no nesting, there are 3 segments, and since (1) each nested class adds another segment to uniqueId, and (2) the matchTestCasesToSuites_locked method can handle up to 6 nested classes, the method silently handles nested classes until you hit 4, in which case I get the following error:

WARNING: Unexpected test organization for TestIdentifier 
[uniqueId = [engine:junit-jupiter]/
[class:<TestClass>]/
[nested-class:<nest1>]/
[nested-class:<nest2>]/
[nested-class:<nest3>]/
[nested-class:<nest4>]/
[method:<testmethod>], ...]
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

No branches or pull requests

1 participant