This is an automated email from the ASF dual-hosted git repository. domgarguilo pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/accumulo.git
commit 8bbdfcdb4f287011b8c5875d0dfd3972217cf0e0 Merge: c79d5aa836 1831118812 Author: Dom Garguilo <domgargu...@apache.org> AuthorDate: Mon May 5 13:09:43 2025 -0400 Merge remote-tracking branch 'upstream/2.1' .../org/apache/accumulo/test/CreateTableIT.java | 34 +++++++++++++++------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --cc test/src/main/java/org/apache/accumulo/test/CreateTableIT.java index 5b0296894e,3c0641365b..8c3fd77d7f --- a/test/src/main/java/org/apache/accumulo/test/CreateTableIT.java +++ b/test/src/main/java/org/apache/accumulo/test/CreateTableIT.java @@@ -24,7 -26,10 +26,11 @@@ import java.util.concurrent.TimeUnit import org.apache.accumulo.core.client.Accumulo; import org.apache.accumulo.core.client.AccumuloClient; + import org.apache.accumulo.core.client.AccumuloException; + import org.apache.accumulo.core.client.AccumuloSecurityException; + import org.apache.accumulo.core.client.TableExistsException; +import org.apache.accumulo.core.metadata.SystemTables; + import org.apache.accumulo.core.util.Timer; import org.apache.accumulo.harness.SharedMiniClusterBase; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; @@@ -48,20 -57,22 +58,22 @@@ public class CreateTableIT extends Shar } @Test - public void testCreateLotsOfTables() throws Exception { + public void testCreateLotsOfTables() { try (AccumuloClient client = Accumulo.newClient().from(getClientProps()).build()) { + String[] tableNames = getUniqueNames(NUM_TABLES); - String[] tableNames = getUniqueNames(500); + Arrays.stream(tableNames).parallel().forEach(name -> { + Timer timer = Timer.startNew(); + try { + client.tableOperations().create(name); + } catch (AccumuloException | AccumuloSecurityException | TableExistsException e) { + throw new RuntimeException(e); + } + log.info("Table {} creation took: {} ms", name, timer.elapsed(TimeUnit.MILLISECONDS)); + }); - for (int i = 0; i < tableNames.length; i++) { - // Create waits for the Fate operation to complete - long start = System.currentTimeMillis(); - client.tableOperations().create(tableNames[i]); - System.out.println("Table creation took: " + (System.currentTimeMillis() - start) + "ms"); - } - // Confirm all 500 user tables exist in addition to Root, Metadata, - // and ScanRef tables - assertEquals(500 + SystemTables.tableIds().size(), client.tableOperations().list().size()); - final int systemTables = 3; ++ final int systemTables = SystemTables.values().length; + assertEquals(NUM_TABLES + systemTables, client.tableOperations().list().size()); } }