Skip to content

Commit

Permalink
Test Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sohami committed Apr 22, 2019
1 parent 1d8b421 commit de9e5f7
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 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,9 @@ 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.ALLOW_LOOPBACK_ADDRESS_BINDING, true)
.withLocalZk();

// start the cluster
Expand All @@ -182,6 +183,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 @@ -60,11 +60,7 @@ public class TestDistributedQueryRM extends ClusterTest {

@BeforeClass
public static void setupTestSuite() throws Exception {
final ClusterFixtureBuilder fixtureBuilder = ClusterFixture.builder(dirTestWatcher)
.configProperty(ExecConstants.RM_ENABLED, true)
.setOptionDefault(ExecConstants.ENABLE_QUEUE.getOptionName(), false)
.configProperty(ExecConstants.DRILL_PORT_HUNT, true)
.withLocalZk();
final ClusterFixtureBuilder fixtureBuilder = ClusterFixture.builder(dirTestWatcher).configProperty(ExecConstants.RM_ENABLED, true).setOptionDefault(ExecConstants.ENABLE_QUEUE.getOptionName(), false).configProperty(ExecConstants.ALLOW_LOOPBACK_ADDRESS_BINDING, true).withLocalZk();
startCluster(fixtureBuilder);
context = cluster.drillbit().getContext();
final ResourceManager rm = context.getResourceManager();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ 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.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,8 @@ 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)
.withLocalZk();

try(ClusterFixture cluster = fixtureBuilder.build()) {
Expand Down Expand Up @@ -111,8 +109,8 @@ 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)
.withLocalZk();

try (ClusterFixture cluster = fixtureBuilder.build()) {
Expand All @@ -126,8 +124,8 @@ 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.ALLOW_LOOPBACK_ADDRESS_BINDING, true)
.withLocalZk();

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

0 comments on commit de9e5f7

Please sign in to comment.