You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ag...@apache.org on 2018/04/13 09:33:35 UTC
[23/54] [abbrv] ignite git commit: IGNITE-6430 Complete failing test
early
IGNITE-6430 Complete failing test early
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/3a717658
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/3a717658
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/3a717658
Branch: refs/heads/ignite-6083
Commit: 3a7176582d622fc8a52a730f2a3f1e4b4319e4a3
Parents: 9bb4ce8
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Tue Apr 10 20:33:47 2018 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Tue Apr 10 20:33:47 2018 +0300
----------------------------------------------------------------------
.../cache/CacheGroupsMetricsRebalanceTest.java | 31 ++++++++++++--------
1 file changed, 18 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/3a717658/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGroupsMetricsRebalanceTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGroupsMetricsRebalanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGroupsMetricsRebalanceTest.java
index 89c8236..ceb9852 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGroupsMetricsRebalanceTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGroupsMetricsRebalanceTest.java
@@ -227,29 +227,34 @@ public class CacheGroupsMetricsRebalanceTest extends GridCommonAbstractTest {
System.out.println("Wait until keys left will be less " + keysLine);
- while (finishRebalanceLatch.getCount() != 0) {
- CacheMetrics m = ig2.cache(CACHE1).localMetrics();
+ try {
+ while (finishRebalanceLatch.getCount() != 0) {
+ CacheMetrics m = ig2.cache(CACHE1).localMetrics();
- long keyLeft = m.getKeysToRebalanceLeft();
+ long keyLeft = m.getKeysToRebalanceLeft();
- if (keyLeft > 0 && keyLeft < keysLine)
- latch.countDown();
+ if (keyLeft > 0 && keyLeft < keysLine)
+ latch.countDown();
- System.out.println("Keys left: " + m.getKeysToRebalanceLeft());
+ System.out.println("Keys left: " + m.getKeysToRebalanceLeft());
- try {
- Thread.sleep(1_000);
- }
- catch (InterruptedException e) {
- System.out.println("Interrupt thread: " + e.getMessage());
+ try {
+ Thread.sleep(1_000);
+ }
+ catch (InterruptedException e) {
+ System.out.println("Interrupt thread: " + e.getMessage());
- Thread.currentThread().interrupt();
+ Thread.currentThread().interrupt();
+ }
}
}
+ finally {
+ latch.countDown();
+ }
}
});
- latch.await();
+ assertTrue(latch.await(getTestTimeout(), TimeUnit.MILLISECONDS));
long finishTime = ig2.cache(CACHE1).localMetrics().getEstimatedRebalancingFinishTime();