keith-turner commented on code in PR #5773:
URL: https://github.com/apache/accumulo/pull/5773#discussion_r2248841194
##########
test/src/main/java/org/apache/accumulo/test/TableOperationsIT.java:
##########
@@ -834,4 +839,38 @@ public static void
setExpectedTabletAvailability(Map<TabletId,TabletAvailability
expected.put(new TabletIdImpl(ke), availability);
}
+ @Test
+ public void testUniquenessOfTableId() throws ExecutionException,
InterruptedException {
+ List<Future<TableId>> futureList = new ArrayList<>();
+
+ Set<TableId> hash = new HashSet<>();
+
+ ExecutorService pool = Executors.newFixedThreadPool(64);
+
+ for (int i = 0; i < 1000; i++) {
+ int finalI = i;
+
+ Future<TableId> future = pool.submit(() -> {
+ TableId tableId = null;
+
+ try {
+ tableId = Utils.getNextId("Testing" + finalI, getServerContext(),
TableId::of);
+ } catch (Exception e) {
Review Comment:
Do not need to catch the exception here and ignore it. If an exception is
thrown it will eventually cause the get() method on the future to throw an
exception and that will cause the test to fail.
--
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]