This is an automated email from the ASF dual-hosted git repository.
ptupitsyn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git
The following commit(s) were added to refs/heads/main by this push:
new 415b262b75 IGNITE-19859 Fix testAutoFlushByTimer flakiness (#2313)
415b262b75 is described below
commit 415b262b752de54633fcd03b8b9a4565a97a96fa
Author: Pavel Tupitsyn <[email protected]>
AuthorDate: Thu Jul 13 11:08:39 2023 +0300
IGNITE-19859 Fix testAutoFlushByTimer flakiness (#2313)
Increase timeout, use read-only tx instead of try-catch for concurrent
reads.
---
.../internal/streamer/ItAbstractDataStreamerTest.java | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git
a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/streamer/ItAbstractDataStreamerTest.java
b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/streamer/ItAbstractDataStreamerTest.java
index 85c36d5e4e..6e26755ace 100644
---
a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/streamer/ItAbstractDataStreamerTest.java
+++
b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/streamer/ItAbstractDataStreamerTest.java
@@ -38,6 +38,7 @@ import org.apache.ignite.table.RecordView;
import org.apache.ignite.table.Table;
import org.apache.ignite.table.Tuple;
import org.apache.ignite.table.mapper.Mapper;
+import org.apache.ignite.tx.TransactionOptions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
@@ -142,16 +143,15 @@ public abstract class ItAbstractDataStreamerTest extends
ClusterPerClassIntegrat
publisher.submit(tuple(1, "foo"));
assertTrue(waitForCondition(() -> {
+ @SuppressWarnings("resource")
+ var tx = ignite().transactions().begin(new
TransactionOptions().readOnly(true));
+
try {
- return view.get(null, tupleKey(1)) != null;
- } catch (Exception e) {
- // TODO IGNITE-19824: Remove try-catch.
- // Ignore tx conflicts caused by deadlock detection mechanism
issues.
- // noinspection CallToPrintStackTrace
- e.printStackTrace();
- return false;
+ return view.get(tx, tupleKey(1)) != null;
+ } finally {
+ tx.rollback();
}
- }, 1000));
+ }, 50, 5000));
}
@Test