question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

5.7.1 breaks Bazel sample

See original GitHub issue

On bb94997206f599709b1f053ac2492375a5f8e02b, the Bazel sample fails to discover any tests:

~/code/junit5-samples/junit5-jupiter-starter-bazel (remotes/origin/r5.7.1) % git rev-parse HEAD
bb94997206f599709b1f053ac2492375a5f8e02b
~/code/junit5-samples/junit5-jupiter-starter-bazel (remotes/origin/r5.7.1) % ./bazelisk.py test //... --test_output all
INFO: Analyzed 2 targets (0 packages loaded, 0 targets configured).
INFO: Found 1 target and 1 test target...
INFO: Elapsed time: 0.127s, Critical Path: 0.00s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
PASSED: //src/test/java/com/example/project:junit5-jupiter-starter-bazel-test (see /private/var/tmp/_bazel_jack_dai/7ea6705a9c37cce3b6db455ebdb8ee2c/execroot/__main__/bazel-out/darwin-fastbuild/testlogs/src/test/java/com/example/project/junit5-jupiter-starter-bazel-test/test.log)
INFO: From Testing //src/test/java/com/example/project:junit5-jupiter-starter-bazel-test
==================== Test output for //src/test/java/com/example/project:junit5-jupiter-starter-bazel-test:

Thanks for using JUnit! Support its development at https://junit.org/sponsoring

╷
└─ JUnit Jupiter ✔

Test run finished after 29 ms
[         1 containers found      ]
[         0 containers skipped    ]
[         1 containers started    ]
[         0 containers aborted    ]
[         1 containers successful ]
[         0 containers failed     ]
[         0 tests found           ]
[         0 tests skipped         ]
[         0 tests started         ]
[         0 tests aborted         ]
[         0 tests successful      ]
[         0 tests failed          ]

================================================================================
//src/test/java/com/example/project:junit5-jupiter-starter-bazel-test (cached) PASSED in 0.9s

Executed 0 out of 1 test: 1 test passes.
INFO: Build completed successfully, 1 total action

After checking out the previous commit 11914c4a2befbb4c823d0dff5843a1317cfcbb3c, it works:

~/code/junit5-samples/junit5-jupiter-starter-bazel (remotes/origin/r5.7.1~1) % g rev-parse HEAD
11914c4a2befbb4c823d0dff5843a1317cfcbb3c
~/code/junit5-samples/junit5-jupiter-starter-bazel (remotes/origin/r5.7.1~1) % ./bazelisk.py test //... --test_output all
INFO: Analyzed 2 targets (0 packages loaded, 0 targets configured).
INFO: Found 1 target and 1 test target...
INFO: Elapsed time: 0.111s, Critical Path: 0.00s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
PASSED: //src/test/java/com/example/project:junit5-jupiter-starter-bazel-test (see /private/var/tmp/_bazel_jack_dai/7ea6705a9c37cce3b6db455ebdb8ee2c/execroot/__main__/bazel-out/darwin-fastbuild/testlogs/src/test/java/com/example/project/junit5-jupiter-starter-bazel-test/test.log)
INFO: From Testing //src/test/java/com/example/project:junit5-jupiter-starter-bazel-test
==================== Test output for //src/test/java/com/example/project:junit5-jupiter-starter-bazel-test:

Thanks for using JUnit! Support its development at https://junit.org/sponsoring

╷
└─ JUnit Jupiter ✔
   └─ CalculatorTests ✔
      ├─ 1 + 1 = 2 ✔
      └─ add(int, int, int) ✔
         ├─ 0 + 1 = 1 ✔
         ├─ 1 + 2 = 3 ✔
         ├─ 49 + 51 = 100 ✔
         └─ 1 + 100 = 101 ✔

Test run finished after 100 ms
[         3 containers found      ]
[         0 containers skipped    ]
[         3 containers started    ]
[         0 containers aborted    ]
[         3 containers successful ]
[         0 containers failed     ]
[         5 tests found           ]
[         0 tests skipped         ]
[         5 tests started         ]
[         0 tests aborted         ]
[         5 tests successful      ]
[         0 tests failed          ]

================================================================================
//src/test/java/com/example/project:junit5-jupiter-starter-bazel-test (cached) PASSED in 1.0s

Executed 0 out of 1 test: 1 test passes.
INFO: Build completed successfully, 1 total action

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
marcphilippcommented, May 18, 2021

5.7.2 is now released and resolves this issue.

0reactions
jdai8commented, May 14, 2021

Hmm, I’m not really a fan of SNAPSHOTs because they’re not reproducible. For example, when trying to figure out which junit version broke this sample, it would have been impossible to bisect if we were depending on a snapshot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

rules_nodejs/CHANGELOG.md at stable - GitHub
BREAKING CHANGES. builtin: The @bazel/runfiles lookupDirectory method has been removed. Use the resolve method instead; for our ...
Read more >
@bazel/typescript - npm
TypeScript rules for Bazel. Latest version: 5.7.1, last published: 24 days ago. Start using @bazel/typescript in your project by running ...
Read more >
bazel/concatjs - bazelbuild/rules_nodejs - aspect build
So Bazel rules that originated in Google's codebase have affordances for concatjs. ... This breaks runfile tree creation within Bazel due to a...
Read more >
Concepts and terminology - Bazel 5.3.1
For example, in the following directory tree there are two packages, my/app , and the subpackage ... inadvertently breaking a through no fault...
Read more >
Package List — Spack 0.20.0.dev0 documentation
Example : spack install amdfftw precision=float ... Versions: 5.7.1, 5.6.1, 4.10.7; Build Dependencies: java, zip; Run Dependencies: java ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found