Skip to content

Commit

Permalink
Test Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sohami committed Apr 23, 2019
1 parent 1d8b421 commit e9b4fa5
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import org.apache.drill.test.ClusterFixture;
import org.apache.drill.test.ClusterFixtureBuilder;
import org.apache.drill.test.DrillTest;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
Expand Down Expand Up @@ -156,9 +157,10 @@ public void testSetup() throws Exception {
formemanQueueUsageValues);

final ClusterFixtureBuilder fixtureBuilder = ClusterFixture.builder(dirTestWatcher)
.configProperty(ExecConstants.DRILL_PORT_HUNT, true)
.configProperty(ExecConstants.RM_ENABLED, false)
.setOptionDefault(ExecConstants.ENABLE_QUEUE.getOptionName(), false)
.configProperty(ExecConstants.DRILL_PORT_HUNT, true)
.configProperty(ExecConstants.ALLOW_LOOPBACK_ADDRESS_BINDING, true)
.withLocalZk();

// start the cluster
Expand All @@ -182,6 +184,11 @@ public void testSetup() throws Exception {
rmConsistentBlobStoreManager.writeAllRMBlobs(blobsToSerialize);
}

@After
public void testCleanup() throws Exception {
cluster.close();
}

private void verifyBlobs() {
// Again verify the updated blob value with initial value
Iterator<Map.Entry<String, RMStateBlob>> blobs = rmConsistentBlobStoreManager.readAllRMBlobs();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public static void setupTestSuite() throws Exception {
.configProperty(ExecConstants.RM_ENABLED, true)
.setOptionDefault(ExecConstants.ENABLE_QUEUE.getOptionName(), false)
.configProperty(ExecConstants.DRILL_PORT_HUNT, true)
.configProperty(ExecConstants.ALLOW_LOOPBACK_ADDRESS_BINDING, true)
.withLocalZk();
startCluster(fixtureBuilder);
context = cluster.drillbit().getContext();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ public class TestE2EWithDistributedRM extends ClusterTest {
public static void setupTestSuite() throws Exception {
final ClusterFixtureBuilder fixtureBuilder = ClusterFixture.builder(dirTestWatcher)
.configProperty(ExecConstants.RM_ENABLED, true)
.configProperty(ExecConstants.DRILL_PORT_HUNT, true)
.setOptionDefault(ExecConstants.ENABLE_QUEUE.getOptionName(), false)
.configProperty(ExecConstants.DRILL_PORT_HUNT, true)
.configProperty(ExecConstants.ALLOW_LOOPBACK_ADDRESS_BINDING, true)
.withLocalZk();
startCluster(fixtureBuilder);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,13 @@
import org.apache.drill.test.ClusterFixture;
import org.apache.drill.test.ClusterFixtureBuilder;
import org.apache.drill.test.DrillTest;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;

@Ignore("These tests will be ignored until integration with new DistributedResourceManager is done")
@Category(ResourceManagerTest.class)
public final class TestRMConfigLoad extends DrillTest {

Expand All @@ -51,8 +49,9 @@ public final class TestRMConfigLoad extends DrillTest {
public void testDefaultRMConfig() throws Exception {
ClusterFixtureBuilder fixtureBuilder = ClusterFixture.builder(dirTestWatcher)
.configProperty(ExecConstants.RM_ENABLED, true)
.configProperty(ExecConstants.DRILL_PORT_HUNT, true)
.setOptionDefault(ExecConstants.ENABLE_QUEUE.getOptionName(), false)
.configProperty(ExecConstants.ALLOW_LOOPBACK_ADDRESS_BINDING, true)
.configProperty(ExecConstants.DRILL_PORT_HUNT, true)
.withLocalZk();

try(ClusterFixture cluster = fixtureBuilder.build()) {
Expand Down Expand Up @@ -111,8 +110,9 @@ public void testDefaultRMWithLocalCoordinatorAndRMDisabled() throws Exception {
public void testDefaultRMOnlyRMDisabled() throws Exception {
ClusterFixtureBuilder fixtureBuilder = ClusterFixture.builder(dirTestWatcher)
.configProperty(ExecConstants.RM_ENABLED, false)
.configProperty(ExecConstants.DRILL_PORT_HUNT, true)
.setOptionDefault(ExecConstants.ENABLE_QUEUE.getOptionName(), false)
.configProperty(ExecConstants.ALLOW_LOOPBACK_ADDRESS_BINDING, true)
.configProperty(ExecConstants.DRILL_PORT_HUNT, true)
.withLocalZk();

try (ClusterFixture cluster = fixtureBuilder.build()) {
Expand All @@ -126,8 +126,9 @@ public void testDefaultRMOnlyRMDisabled() throws Exception {
public void testThrottleRMOnlyRMDisabled() throws Exception {
ClusterFixtureBuilder fixtureBuilder = ClusterFixture.builder(dirTestWatcher)
.configProperty(ExecConstants.RM_ENABLED, false)
.configProperty(ExecConstants.DRILL_PORT_HUNT, true)
.setOptionDefault(ExecConstants.ENABLE_QUEUE.getOptionName(), true)
.configProperty(ExecConstants.DRILL_PORT_HUNT, true)
.configProperty(ExecConstants.ALLOW_LOOPBACK_ADDRESS_BINDING, true)
.withLocalZk();

try (ClusterFixture cluster = fixtureBuilder.build()) {
Expand Down

0 comments on commit e9b4fa5

Please sign in to comment.