This is an automated email from the ASF dual-hosted git repository.
NSAmelchev pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git
The following commit(s) were added to refs/heads/master by this push:
new 603482fa9c0 IGNITE-29270 Fix flaky
GridCommandHandlerTest#testReencryptionSuspendAndResume (#13810)
603482fa9c0 is described below
commit 603482fa9c0e74094d6b3ae70e79e511c93df218
Author: Nikita Amelchev <[email protected]>
AuthorDate: Wed Nov 11 09:24:33 2026 +0300
IGNITE-29270 Fix flaky
GridCommandHandlerTest#testReencryptionSuspendAndResume (#13810)
---
.../apache/ignite/util/GridCommandHandlerTest.java | 28 ++++++++++++----------
1 file changed, 15 insertions(+), 13 deletions(-)
diff --git
a/modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java
b/modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java
index 2630f58ee43..d63d79d37f9 100644
---
a/modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java
+++
b/modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java
@@ -2834,27 +2834,29 @@ public class GridCommandHandlerTest extends
GridCommandHandlerClusterPerMethodAb
assertTrue(isReencryptionStarted(DEFAULT_CACHE_NAME));
- int ret = execute("--encryption", REENCRYPTION_STATUS,
DEFAULT_CACHE_NAME);
+ Pattern ptrn = Pattern.compile("(?m)Node
[-0-9a-f]{36}:\n\\s+(?<left>\\d+) KB of data.+");
- assertEquals(EXIT_CODE_OK, ret);
+ // Pages left are counted asynchronously after the key change, so the
status may report zero at first.
+ assertTrue(waitForCondition(() -> {
+ assertEquals(EXIT_CODE_OK, execute("--encryption",
REENCRYPTION_STATUS, DEFAULT_CACHE_NAME));
- Pattern ptrn = Pattern.compile("(?m)Node
[-0-9a-f]{36}:\n\\s+(?<left>\\d+) KB of data.+");
- Matcher matcher = ptrn.matcher(testOut.toString());
- int matchesCnt = 0;
+ Matcher matcher = ptrn.matcher(testOut.toString());
+ int matchesCnt = 0;
- while (matcher.find()) {
- assertEquals(1, matcher.groupCount());
+ while (matcher.find()) {
+ assertEquals(1, matcher.groupCount());
- int pagesLeft = Integer.parseInt(matcher.group("left"));
+ int pagesLeft = Integer.parseInt(matcher.group("left"));
- assertTrue(pagesLeft > 0);
+ assertTrue(pagesLeft > 0);
- matchesCnt++;
- }
+ matchesCnt++;
+ }
- assertEquals(srvNodes, matchesCnt);
+ return matchesCnt == srvNodes;
+ }, getTestTimeout()));
- ret = execute("--encryption", REENCRYPTION_SUSPEND,
DEFAULT_CACHE_NAME);
+ int ret = execute("--encryption", REENCRYPTION_SUSPEND,
DEFAULT_CACHE_NAME);
assertEquals(EXIT_CODE_OK, ret);
assertEquals(srvNodes, countSubstrs(testOut.toString(),