This is an automated email from the ASF dual-hosted git repository.
ctubbsii pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/main by this push:
new 05b0604f59 Refactor assertTrue(!=) with assertNotEquals (#3712)
05b0604f59 is described below
commit 05b0604f5946cb8cf23192e329b6b7431450c185
Author: Taher Ghaleb <[email protected]>
AuthorDate: Mon Aug 21 17:18:51 2023 -0400
Refactor assertTrue(!=) with assertNotEquals (#3712)
* Use assertNotEquals in test case instead of assertTrue with a `!=`
condition
---
.../accumulo/server/util/fateCommand/SummaryReportTest.java | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git
a/server/base/src/test/java/org/apache/accumulo/server/util/fateCommand/SummaryReportTest.java
b/server/base/src/test/java/org/apache/accumulo/server/util/fateCommand/SummaryReportTest.java
index 17d0068c7c..40cc955305 100644
---
a/server/base/src/test/java/org/apache/accumulo/server/util/fateCommand/SummaryReportTest.java
+++
b/server/base/src/test/java/org/apache/accumulo/server/util/fateCommand/SummaryReportTest.java
@@ -23,8 +23,8 @@ import static org.easymock.EasyMock.expect;
import static org.easymock.EasyMock.replay;
import static org.easymock.EasyMock.verify;
import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
-import static org.junit.jupiter.api.Assertions.assertTrue;
import java.util.List;
import java.util.Map;
@@ -45,8 +45,9 @@ class SummaryReportTest {
public void blankReport() {
Map<String,String> idMap = Map.of("1", "ns1", "2", "tbl1");
FateSummaryReport report = new FateSummaryReport(idMap, null);
+
assertNotNull(report);
- assertTrue(report.getReportTime() != 0);
+ assertNotEquals(0, report.getReportTime());
assertEquals(Map.of(), report.getStatusCounts());
assertEquals(Map.of(), report.getCmdCounts());
assertEquals(Map.of(), report.getStepCounts());
@@ -54,6 +55,7 @@ class SummaryReportTest {
assertEquals(Set.of(), report.getStatusFilterNames());
assertNotNull(report.toJson());
assertNotNull(report.formatLines());
+
log.info("json: {}", report.toJson());
log.info("formatted: {}", report.formatLines());
}
@@ -78,7 +80,7 @@ class SummaryReportTest {
report.gatherTxnStatus(status1);
assertNotNull(report);
- assertTrue(report.getReportTime() != 0);
+ assertNotEquals(0, report.getReportTime());
assertEquals(Map.of("IN_PROGRESS", 1), report.getStatusCounts());
assertEquals(Map.of("?", 1), report.getCmdCounts());
assertEquals(Map.of("?", 1), report.getStepCounts());