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

Fix segment replace test #8209

Merged
merged 2 commits into from
Feb 16, 2022
Merged
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 @@ -96,7 +96,7 @@ public class PinotHelixResourceManagerTest {

private static final int CONNECTION_TIMEOUT_IN_MILLISECOND = 10_000;
private static final int MAXIMUM_NUMBER_OF_CONTROLLER_INSTANCES = 10;
private static final long TIMEOUT_IN_MS = 10_000L;
private static final long TIMEOUT_IN_MS = 60_000L;

@BeforeClass
public void setUp()
Expand Down Expand Up @@ -451,13 +451,20 @@ public void testLeadControllerAssignment() {

@Test
public void testSegmentReplacement()
throws IOException {
throws Exception {
// Create broker tenant on 1 Brokers
Tenant brokerTenant = new Tenant(TenantRole.BROKER, BROKER_TENANT_NAME, 1, 0, 0);
PinotResourceManagerResponse response =
ControllerTestUtils.getHelixResourceManager().createBrokerTenant(brokerTenant);
Assert.assertTrue(response.isSuccessful());

testSegmentReplacementRegular();
testSegmentReplacementForRefresh();
}

private void testSegmentReplacementRegular()
throws IOException {

// Create the table
TableConfig tableConfig =
new TableConfigBuilder(TableType.OFFLINE).setTableName(OFFLINE_SEGMENTS_REPLACE_TEST_TABLE_NAME)
Expand Down Expand Up @@ -666,14 +673,8 @@ public void testSegmentReplacement()
Assert.assertEquals(segmentLineage.getLineageEntry(lineageEntryId4).getState(), LineageEntryState.COMPLETED);
}

@Test
public void testSegmentReplacementForRefresh()
private void testSegmentReplacementForRefresh()
throws IOException, InterruptedException {
// Create broker tenant on 1 Brokers
Tenant brokerTenant = new Tenant(TenantRole.BROKER, BROKER_TENANT_NAME, 1, 0, 0);
PinotResourceManagerResponse response =
ControllerTestUtils.getHelixResourceManager().createBrokerTenant(brokerTenant);
Assert.assertTrue(response.isSuccessful());

// Create the table
TableConfig tableConfig =
Expand Down