Skip to content

Commit

Permalink
[Flaky-test]: AdminApiTest.testNamespaceSplitBundleConcurrent (apache…
Browse files Browse the repository at this point in the history
…#14565)

(cherry picked from commit 01b5567)
(cherry picked from commit 10b2f34)
  • Loading branch information
aloyszhang authored and nicoloboschi committed Mar 9, 2022
1 parent f7ac631 commit 5a43684
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1448,10 +1448,11 @@ public void testNamespaceSplitBundleConcurrent() throws Exception {
fail("split bundle shouldn't have thrown exception");
}

Awaitility.await().untilAsserted(() ->
assertEquals(bundleFactory.getBundles(NamespaceName.get(namespace)).getBundles().size(), 4));
String[] splitRange4 = { namespace + "/0x00000000_0x3fffffff", namespace + "/0x3fffffff_0x7fffffff",
namespace + "/0x7fffffff_0xbfffffff", namespace + "/0xbfffffff_0xffffffff" };
bundles = bundleFactory.getBundles(NamespaceName.get(namespace));
assertEquals(bundles.getBundles().size(), 4);
for (int i = 0; i < bundles.getBundles().size(); i++) {
assertEquals(bundles.getBundles().get(i).toString(), splitRange4[i]);
}
Expand Down Expand Up @@ -1481,13 +1482,13 @@ public void testNamespaceSplitBundleConcurrent() throws Exception {
} catch (Exception e) {
fail("split bundle shouldn't have thrown exception");
}

Awaitility.await().untilAsserted(() ->
assertEquals(bundleFactory.getBundles(NamespaceName.get(namespace)).getBundles().size(), 8));
String[] splitRange8 = { namespace + "/0x00000000_0x1fffffff", namespace + "/0x1fffffff_0x3fffffff",
namespace + "/0x3fffffff_0x5fffffff", namespace + "/0x5fffffff_0x7fffffff",
namespace + "/0x7fffffff_0x9fffffff", namespace + "/0x9fffffff_0xbfffffff",
namespace + "/0xbfffffff_0xdfffffff", namespace + "/0xdfffffff_0xffffffff" };
bundles = bundleFactory.getBundles(NamespaceName.get(namespace));
assertEquals(bundles.getBundles().size(), 8);
for (int i = 0; i < bundles.getBundles().size(); i++) {
assertEquals(bundles.getBundles().get(i).toString(), splitRange8[i]);
}
Expand Down

0 comments on commit 5a43684

Please sign in to comment.