MNT-22770 Test to confirm that node is only indexed on a valid shard

This commit is contained in:
pzurek
2022-02-23 13:33:30 +01:00
parent d4044d35e0
commit d8fcf8b493
@@ -87,20 +87,19 @@ public class DistributedAlfrescoSolrMetadataTrackerReindexingIT extends Abstract
@Test
public void shouldReindexNodeOnlyOnShardWhereNodeBelongsTo() throws Exception
{
fail("See if test is executed on CI.");
// putHandleDefaults();
//
// long nodeId = indexNewNode();
//
// assertThatNodeIsIndexedOnExactlyOneShard(nodeId);
//
// final Instant end = Instant.now().plus(TEST_DURATION);
// while (Instant.now().isBefore(end))
// {
// triggerNodeIdReindexingOnAllShards(nodeId);
// assertThatNodeIsIndexedOnExactlyOneShard(nodeId);
// Thread.sleep(7_000);
// }
putHandleDefaults();
long nodeId = indexNewNode();
assertThatNodeIsIndexedOnExactlyOneShard(nodeId);
final Instant end = Instant.now().plus(TEST_DURATION);
while (Instant.now().isBefore(end))
{
triggerNodeIdReindexingOnAllShards(nodeId);
assertThatNodeIsIndexedOnExactlyOneShard(nodeId);
Thread.sleep(7_000);
}
}
private void triggerNodeIdReindexingOnAllShards(long nodeId) throws Exception