Cyrill commented on code in PR #5193: URL: https://github.com/apache/ignite-3/pull/5193#discussion_r1951300235
########## modules/table/src/integrationTest/java/org/apache/ignite/internal/table/distributed/disaster/AbstractHighAvailablePartitionsRecoveryTest.java: ########## @@ -416,4 +439,79 @@ final Set<String> nodeNames(Integer... indexes) { .map(i -> node(i).name()) .collect(Collectors.toUnmodifiableSet()); } + + static List<Throwable> insertValues(Table table, int offset) { + KeyValueView<Tuple, Tuple> keyValueView = table.keyValueView(); + + List<Throwable> errors = new ArrayList<>(); + + for (int i = 0; i < ENTRIES; i++) { + Tuple key = Tuple.create(of("id", i)); + + CompletableFuture<Void> insertFuture = keyValueView.putAsync(null, key, Tuple.create(of("val", i + offset))); + + try { + insertFuture.get(10, SECONDS); + + Tuple value = keyValueView.get(null, key); + assertNotNull(value); + } catch (Throwable e) { + Throwable cause = unwrapCause(e); + + if (cause instanceof IgniteException && isPrimaryReplicaHasChangedException((IgniteException) cause) + || cause instanceof TransactionException + || cause instanceof TimeoutException + ) { + errors.add(cause); + } else { + fail("Unexpected exception", e); + } + } + } + + return errors; + } + + static void assertValuesPresent(Table table) { Review Comment: removed -- 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: notifications-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org