Skip to content

Commit

Permalink
Fix segment replace test (#8209)
Browse files Browse the repository at this point in the history
  • Loading branch information
walterddr authored Feb 16, 2022
1 parent 39254e4 commit 950ea76
Showing 1 changed file with 10 additions and 9 deletions.
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

0 comments on commit 950ea76

Please sign in to comment.