DomGarguilo commented on code in PR #4051:
URL: https://github.com/apache/accumulo/pull/4051#discussion_r1422890948


##########
test/src/main/java/org/apache/accumulo/test/ScanConsistencyIT.java:
##########
@@ -104,69 +150,97 @@ public void testConcurrentScanConsistency() throws 
Exception {
     // getClusterControl().stopAllServers(ServerType.GARBAGE_COLLECTOR);
 
     var executor = Executors.newCachedThreadPool();
-    try (AccumuloClient client = 
Accumulo.newClient().from(getClientProps()).build()) {
-      client.tableOperations().create(table);
+    client.tableOperations().create(table);
 
-      TestContext testContext = new TestContext(client, table, 
getCluster().getFileSystem(),
-          getCluster().getTemporaryPath().toString());
+    TestContext testContext = new TestContext(client, table, fileSystem, 
tmpDir);
 
-      List<Future<WriteStats>> writeTasks = new ArrayList<>();
-      List<Future<ScanStats>> scanTasks = new ArrayList<>();
+    List<Future<WriteStats>> writeTasks = new ArrayList<>();
+    List<Future<ScanStats>> scanTasks = new ArrayList<>();
 
-      Random random = new Random();
+    Random random = new Random();
 
-      int numWriteTask = random.nextInt(10) + 1;
-      int numsScanTask = random.nextInt(10) + 1;
+    int numWriteTask = random.nextInt(10) + 1;
+    int numsScanTask = random.nextInt(10) + 1;
 
-      for (int i = 0; i < numWriteTask; i++) {
-        writeTasks.add(executor.submit(new WriteTask(testContext)));
-      }
+    for (int i = 0; i < numWriteTask; i++) {
+      writeTasks.add(executor.submit(new WriteTask(testContext)));
+    }
 
-      for (int i = 0; i < numsScanTask; i++) {
-        scanTasks.add(executor.submit(new ScanTask(testContext)));
-      }
+    for (int i = 0; i < numsScanTask; i++) {
+      scanTasks.add(executor.submit(new ScanTask(testContext)));
+    }
 
-      var tableOpsTask = executor.submit(new TableOpsTask(testContext));
+    var tableOpsTask = executor.submit(new TableOpsTask(testContext));
 
-      // let the concurrent mayhem run for a bit
-      Thread.sleep(60000);
+    // let the concurrent mayhem run for a bit
+    Thread.sleep(60000);
 
-      // let the threads know to exit
-      testContext.keepRunning.set(false);
+    // let the threads know to exit
+    testContext.keepRunning.set(false);
 
-      for (Future<WriteStats> writeTask : writeTasks) {
-        var stats = writeTask.get();
-        log.debug(String.format("Wrote:%,d Bulk imported:%,d Deleted:%,d Bulk 
deleted:%,d",
-            stats.written, stats.bulkImported, stats.deleted, 
stats.bulkDeleted));
-        assertTrue(stats.written + stats.bulkImported > 0);
-        assertTrue(stats.deleted + stats.bulkDeleted > 0);
-      }
+    for (Future<WriteStats> writeTask : writeTasks) {
+      var stats = writeTask.get();
+      log.debug(String.format("Wrote:%,d Bulk imported:%,d Deleted:%,d Bulk 
deleted:%,d",
+          stats.written, stats.bulkImported, stats.deleted, 
stats.bulkDeleted));
+      checkTrue(stats.written + stats.bulkImported > 0);
+      checkTrue(stats.deleted + stats.bulkDeleted > 0);
+    }
 
-      for (Future<ScanStats> scanTask : scanTasks) {
-        var stats = scanTask.get();
-        log.debug(String.format("Scanned:%,d verified:%,d", stats.scanned, 
stats.verified));
-        assertTrue(stats.verified > 0);
-        // These scans were running concurrently with writes, so a scan will 
see more data than what
-        // was written before the scan started.
-        assertTrue(stats.scanned > stats.verified);
-      }
+    for (Future<ScanStats> scanTask : scanTasks) {
+      var stats = scanTask.get();
+      log.debug(String.format("Scanned:%,d verified:%,d", stats.scanned, 
stats.verified));
+      checkTrue(stats.verified > 0);
+      // These scans were running concurrently with writes, so a scan will see 
more data than what
+      // was written before the scan started.
+      checkTrue(stats.scanned > stats.verified);
+    }
+
+    log.debug(tableOpsTask.get());
+
+    var stats1 = scanData(testContext, random, new Range(), false);
+    var stats2 = scanData(testContext, random, new Range(), true);
+    var stats3 = batchScanData(testContext, new Range());
+    log.debug(

Review Comment:
   When running this test standalone, it would be nice to see these logs at the 
`info` level instead of `debug`. Its not much of a hassle to move my instance 
to display the debug logs, bug when I do they get drowned out by a bunch of 
other debug logs. If my instance is set to log `info` then I do not see any 
updates on this test code and if it is set to log `debug` I get too many other 
logs making it hard to follow.
   
   I know these logs were not added in this PR but they could be changed since 
its related to the new context that this code is run.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to