kevinrr888 commented on code in PR #4051:
URL: https://github.com/apache/accumulo/pull/4051#discussion_r1422835613
##########
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);
Review Comment:
The program fails with a ClassNotFoundException for the class
org.junit.jupiter.api.Assertions
--
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]