You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "DomGarguilo (via GitHub)" <gi...@apache.org> on 2025/09/05 17:22:21 UTC
[I] Broken test: CompressionTest [accumulo]
DomGarguilo opened a new issue, #5869:
URL: https://github.com/apache/accumulo/issues/5869
This is present in 2.1 and 4.0
Several of the test cases in CompressionTest are not actually running any test code. The following pattern is common in this test class:
```java
for (final String name : Compression.getSupportedAlgorithms()) {
CompressionAlgorithm al = Compression.getCompressionAlgorithmByName(name);
if (isSupported.get(al) != null && isSupported.get(al)) {
<test logic>
}
```
This `if (isSupported.get(al) != null && isSupported.get(al))` is causing the test logic to be completely skipped.
This becomes more evident if we refactor things into the following pattern:
```java
final var supportedAlgos = Compression.getSupportedAlgorithms().stream()
.map(Compression::getCompressionAlgorithmByName)
.filter(algo -> isSupported.get(algo) != null && isSupported.get(algo)).toList();
if (supportedAlgos.isEmpty()) {
log.error("There are no supported compression algorithms, skipping test case");
return;
}
for (final CompressionAlgorithm al : supportedAlgos) {
<test logic>
```
This allows us to consistently see the new log message about tests being skipped.
I am not familiar with the specifics of these checks or what the expected results are but I'm pretty sure its intended that some of the test code is run.
This was uncovered during review [here](https://github.com/apache/accumulo/pull/5853#discussion_r2325173737)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Broken test: CompressionTest [accumulo]
Posted by "dlmarion (via GitHub)" <gi...@apache.org>.
dlmarion commented on issue #5869:
URL: https://github.com/apache/accumulo/issues/5869#issuecomment-3338294372
Fixed by #5932
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Broken test: CompressionTest [accumulo]
Posted by "dlmarion (via GitHub)" <gi...@apache.org>.
dlmarion closed issue #5869: Broken test: CompressionTest
URL: https://github.com/apache/accumulo/issues/5869
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org