Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Debug] [Not For Review] debug UpsertTableSegmentUploadIntegrationTest failure #7991

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -163,17 +163,22 @@ protected void startController()
@Test
public void testSegmentAssignment()
throws Exception {
System.out.println("test starts");
IdealState idealState = HelixHelper.getTableIdealState(_helixManager, TABLE_NAME_WITH_TYPE);
System.out.println(getCurrentCountStarResult() + "," + getCountStarResult());
Assert.assertEquals(getCurrentCountStarResult(), getCountStarResult());
verifyTableIdealStates(idealState);
// Wait 3 seconds to let the realtime validation thread to run.
Thread.sleep(3000);
// Verify the result again.
System.out.println("after sleep: " + getCurrentCountStarResult() + "," + getCountStarResult());
Assert.assertEquals(getCurrentCountStarResult(), getCountStarResult());
verifyTableIdealStates(idealState);

// Restart the servers and check every segment is not in ERROR state.
System.out.println("restarting");
restartServers(NUM_SERVERS);
System.out.println("restarted");
verifyTableIdealStates(idealState);
ExternalView ev =
HelixHelper.getExternalViewForResource(_helixAdmin, this.getHelixClusterName(), TABLE_NAME_WITH_TYPE);
Expand All @@ -182,11 +187,12 @@ public void testSegmentAssignment()
for (String segment : segments) {
Map<String, String> stateMap = ev.getStateMap(segment);
Assert.assertTrue(stateMap.size() > 0);
for (Map.Entry<String, String> server2state: stateMap.entrySet()) {
for (Map.Entry<String, String> server2state : stateMap.entrySet()) {
Assert.assertFalse("ERROR".equals(server2state.getValue()));
}
}
// Verify the result again.
// Verify the result again - check on this assertion.
System.out.println("last check: " + getCurrentCountStarResult() + "," + getCountStarResult());
Assert.assertEquals(getCurrentCountStarResult(), getCountStarResult());
}

Expand Down