Skip to content

Commit

Permalink
GEODE-8228: Rename tests to current convention.
Browse files Browse the repository at this point in the history
  • Loading branch information
jake-at-work committed Apr 14, 2022
1 parent 7514b7c commit 9a86b74
Show file tree
Hide file tree
Showing 21 changed files with 82 additions and 79 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@

@RunWith(GeodeParamsRunner.class)
@Category({WanTest.class})
public class WanCopyRegionCommandDUnitTest extends WANTestBase {
public class WanCopyRegionCommandDistributedTest extends WANTestBase {

protected static VM vm8;
protected static VM vm9;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
import org.apache.geode.test.junit.categories.WanTest;

@Category({WanTest.class})
public class CacheClientNotifierDUnitTest extends WANTestBase {
public class CacheClientNotifierDistributedTest extends WANTestBase {

private static final int NUM_KEYS = 10;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@
import org.apache.geode.test.junit.categories.WanTest;

@Category({WanTest.class})
public class Simple2CacheServerDUnitTest extends WANTestBase {
public class Simple2CacheServerDistributedTest extends WANTestBase {
private static final int NUM_KEYS = 10;
static int afterPrimaryCount = 0;
static int afterProxyReinitialized = 0;

public Simple2CacheServerDUnitTest() {
public Simple2CacheServerDistributedTest() {
super();
}

Expand All @@ -63,11 +63,11 @@ public void doMultipleCacheServer(boolean durable) throws Exception {
int serverPort2 = vm2.invoke(WANTestBase::createCacheServer);

if (durable) {
vm2.invoke(Simple2CacheServerDUnitTest::setCacheClientProxyTestHook);
vm2.invoke(Simple2CacheServerDistributedTest::setCacheClientProxyTestHook);
} else {
vm3.invoke(Simple2CacheServerDUnitTest::setClientServerObserver);
vm3.invoke(Simple2CacheServerDistributedTest::setClientServerObserver);
}
vm3.invoke(() -> CacheClientNotifierDUnitTest.createClientWithLocator(lnPort, "localhost",
vm3.invoke(() -> CacheClientNotifierDistributedTest.createClientWithLocator(lnPort, "localhost",
getTestMethodName() + "_PR", "123", durable));

vm0.invoke(() -> WANTestBase.createCache(lnPort));
Expand All @@ -76,24 +76,25 @@ public void doMultipleCacheServer(boolean durable) throws Exception {
int serverPort3 = vm0.invoke(WANTestBase::createCacheServer);

if (durable) {
vm2.invoke(Simple2CacheServerDUnitTest::checkResultAndUnsetCacheClientProxyTestHook);
vm2.invoke(Simple2CacheServerDistributedTest::checkResultAndUnsetCacheClientProxyTestHook);
} else {
vm3.invoke(Simple2CacheServerDUnitTest::checkResultAndUnsetClientServerObserver);
vm3.invoke(Simple2CacheServerDistributedTest::checkResultAndUnsetClientServerObserver);
}
await().until(() -> {
return checkProxyIsPrimary(vm0) || checkProxyIsPrimary(vm2);
});

// close the current primary cache server, then re-test
int serverPortAtVM1 = vm2.invoke(Simple2CacheServerDUnitTest::findCacheServerForPrimaryProxy);
int serverPortAtVM1 =
vm2.invoke(Simple2CacheServerDistributedTest::findCacheServerForPrimaryProxy);
if (serverPortAtVM1 != 0) {
vm2.invoke(() -> CacheClientNotifierDUnitTest.closeACacheServer(serverPortAtVM1));
vm2.invoke(() -> CacheClientNotifierDistributedTest.closeACacheServer(serverPortAtVM1));
LogService.getLogger().info("Closed cache server on vm2:" + serverPortAtVM1);
await().until(() -> {
return checkProxyIsPrimary(vm0) || checkProxyIsPrimary(vm2);
});
} else {
vm0.invoke(() -> CacheClientNotifierDUnitTest.closeACacheServer(serverPort3));
vm0.invoke(() -> CacheClientNotifierDistributedTest.closeACacheServer(serverPort3));
LogService.getLogger().info("Closed cache server on vm0:" + serverPort3);
assertTrue(checkProxyIsPrimary(vm2));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
*
*/
@Category({WanTest.class})
public class ConcurrentParallelGatewaySenderDUnitTest extends WANTestBase {
public class ConcurrentParallelGatewaySenderDistributedTest extends WANTestBase {

public ConcurrentParallelGatewaySenderDUnitTest() {
public ConcurrentParallelGatewaySenderDistributedTest() {
super();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@

@SuppressWarnings("serial")
@Category({WanTest.class})
public class ConcurrentParallelGatewaySenderOffHeapDUnitTest
extends ConcurrentParallelGatewaySenderDUnitTest {
public class ConcurrentParallelGatewaySenderOffHeapDistributedTest
extends ConcurrentParallelGatewaySenderDistributedTest {

public ConcurrentParallelGatewaySenderOffHeapDUnitTest() {
public ConcurrentParallelGatewaySenderOffHeapDistributedTest() {
super();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@
import org.apache.geode.test.junit.categories.WanTest;

@Category({WanTest.class})
public class ConcurrentParallelGatewaySenderOperation_2_DUnitTest extends WANTestBase {
public class ConcurrentParallelGatewaySenderOperation2DistributedTest extends WANTestBase {

private static final long serialVersionUID = 1L;

public ConcurrentParallelGatewaySenderOperation_2_DUnitTest() {
public ConcurrentParallelGatewaySenderOperation2DistributedTest() {
super();
}

Expand Down Expand Up @@ -290,7 +290,7 @@ public void testParallelGatewaySender_SingleNode_UserPR_Destroy_SimultaneousPut_
vm2.invoke(() -> validateRegionSizeWithinRange(getTestMethodName() + "_PR", 20, 101));
} finally {
vm4.invoke(
ConcurrentParallelGatewaySenderOperation_2_DUnitTest::clear_INFINITE_MAXIMUM_SHUTDOWN_WAIT_TIME);
ConcurrentParallelGatewaySenderOperation2DistributedTest::clear_INFINITE_MAXIMUM_SHUTDOWN_WAIT_TIME);
}
}

Expand Down Expand Up @@ -330,11 +330,11 @@ public void testParallelGatewaySender_SingleNode_UserPR_Destroy_NodeDown() {
vm2.invoke(() -> validateRegionSize(getTestMethodName() + "_PR", 10));
} finally {
vm4.invoke(
ConcurrentParallelGatewaySenderOperation_2_DUnitTest::clear_INFINITE_MAXIMUM_SHUTDOWN_WAIT_TIME);
ConcurrentParallelGatewaySenderOperation2DistributedTest::clear_INFINITE_MAXIMUM_SHUTDOWN_WAIT_TIME);
vm5.invoke(
ConcurrentParallelGatewaySenderOperation_2_DUnitTest::clear_INFINITE_MAXIMUM_SHUTDOWN_WAIT_TIME);
ConcurrentParallelGatewaySenderOperation2DistributedTest::clear_INFINITE_MAXIMUM_SHUTDOWN_WAIT_TIME);
vm6.invoke(
ConcurrentParallelGatewaySenderOperation_2_DUnitTest::clear_INFINITE_MAXIMUM_SHUTDOWN_WAIT_TIME);
ConcurrentParallelGatewaySenderOperation2DistributedTest::clear_INFINITE_MAXIMUM_SHUTDOWN_WAIT_TIME);
}

}
Expand Down Expand Up @@ -369,7 +369,7 @@ public void testParallelGatewaySender_SingleNode_UserPR_Close_SimultaneousPut_Re
AsyncInvocation<Void> putAsync =
vm4.invokeAsync(() -> WANTestBase.doPutsFrom(getTestMethodName() + "_PR", 10, 2000));
AsyncInvocation<Void> localDestroyAsync =
vm4.invokeAsync(() -> ConcurrentParallelGatewaySenderOperation_2_DUnitTest
vm4.invokeAsync(() -> ConcurrentParallelGatewaySenderOperation2DistributedTest
.closeRegion(getTestMethodName() + "_PR"));
try {
putAsync.join();
Expand Down Expand Up @@ -449,7 +449,7 @@ public void testParallelGatewaySenders_SingleNode_UserPR_localDestroy_RecreateRe
validateRegionSizes(regionName, 20, vm4, vm5, vm6);
} finally {
vm7.invoke(
ConcurrentParallelGatewaySenderOperation_2_DUnitTest::clear_INFINITE_MAXIMUM_SHUTDOWN_WAIT_TIME);
ConcurrentParallelGatewaySenderOperation2DistributedTest::clear_INFINITE_MAXIMUM_SHUTDOWN_WAIT_TIME);
}
}

Expand Down Expand Up @@ -490,9 +490,9 @@ public void testParallelGatewaySender_MultipleNode_UserPR_localDestroy_Recreate(
validateRegionSizes(regionName, 20, vm4, vm2);
} finally {
vm4.invoke(
ConcurrentParallelGatewaySenderOperation_2_DUnitTest::clear_INFINITE_MAXIMUM_SHUTDOWN_WAIT_TIME);
ConcurrentParallelGatewaySenderOperation2DistributedTest::clear_INFINITE_MAXIMUM_SHUTDOWN_WAIT_TIME);
vm5.invoke(
ConcurrentParallelGatewaySenderOperation_2_DUnitTest::clear_INFINITE_MAXIMUM_SHUTDOWN_WAIT_TIME);
ConcurrentParallelGatewaySenderOperation2DistributedTest::clear_INFINITE_MAXIMUM_SHUTDOWN_WAIT_TIME);
}
}

Expand Down Expand Up @@ -538,9 +538,9 @@ public void testParallelGatewaySenders_MultipleNode_UserPR_localDestroy_Recreate
validateRegionSizes(regionName, 20, vm4, vm6, vm7);
} finally {
vm4.invoke(
ConcurrentParallelGatewaySenderOperation_2_DUnitTest::clear_INFINITE_MAXIMUM_SHUTDOWN_WAIT_TIME);
ConcurrentParallelGatewaySenderOperation2DistributedTest::clear_INFINITE_MAXIMUM_SHUTDOWN_WAIT_TIME);
vm5.invoke(
ConcurrentParallelGatewaySenderOperation_2_DUnitTest::clear_INFINITE_MAXIMUM_SHUTDOWN_WAIT_TIME);
ConcurrentParallelGatewaySenderOperation2DistributedTest::clear_INFINITE_MAXIMUM_SHUTDOWN_WAIT_TIME);
}
}

Expand Down Expand Up @@ -580,9 +580,9 @@ public void testParallelGatewaySender_ColocatedPartitionedRegions_localDestroy()
validateRegionSizes(customerRegionName, 10, vm4, vm5, vm2);
} finally {
vm4.invoke(
ConcurrentParallelGatewaySenderOperation_2_DUnitTest::clear_INFINITE_MAXIMUM_SHUTDOWN_WAIT_TIME);
ConcurrentParallelGatewaySenderOperation2DistributedTest::clear_INFINITE_MAXIMUM_SHUTDOWN_WAIT_TIME);
vm5.invoke(
ConcurrentParallelGatewaySenderOperation_2_DUnitTest::clear_INFINITE_MAXIMUM_SHUTDOWN_WAIT_TIME);
ConcurrentParallelGatewaySenderOperation2DistributedTest::clear_INFINITE_MAXIMUM_SHUTDOWN_WAIT_TIME);
}
}

Expand Down Expand Up @@ -616,9 +616,9 @@ public void testParallelGatewaySender_ColocatedPartitionedRegions_destroy() {
fail("Expected UnsupportedOperationException");
} finally {
vm4.invoke(
ConcurrentParallelGatewaySenderOperation_2_DUnitTest::clear_INFINITE_MAXIMUM_SHUTDOWN_WAIT_TIME);
ConcurrentParallelGatewaySenderOperation2DistributedTest::clear_INFINITE_MAXIMUM_SHUTDOWN_WAIT_TIME);
vm5.invoke(
ConcurrentParallelGatewaySenderOperation_2_DUnitTest::clear_INFINITE_MAXIMUM_SHUTDOWN_WAIT_TIME);
ConcurrentParallelGatewaySenderOperation2DistributedTest::clear_INFINITE_MAXIMUM_SHUTDOWN_WAIT_TIME);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@

import org.junit.experimental.categories.Category;

import org.apache.geode.internal.cache.wan.concurrent.ConcurrentParallelGatewaySenderOperation_2_DUnitTest;
import org.apache.geode.internal.cache.wan.concurrent.ConcurrentParallelGatewaySenderOperation2DistributedTest;
import org.apache.geode.test.junit.categories.WanTest;

@Category({WanTest.class})
public class ConcurrentParallelGatewaySenderOperation_2_OffHeapDUnitTest
extends ConcurrentParallelGatewaySenderOperation_2_DUnitTest {
public class ConcurrentParallelGatewaySenderOperation2OffHeapDistributedTest
extends ConcurrentParallelGatewaySenderOperation2DistributedTest {

public ConcurrentParallelGatewaySenderOperation_2_OffHeapDUnitTest() {
public ConcurrentParallelGatewaySenderOperation2OffHeapDistributedTest() {
super();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@

import org.junit.experimental.categories.Category;

import org.apache.geode.internal.cache.wan.parallel.ParallelGatewaySenderOperation_2_DUnitTest;
import org.apache.geode.internal.cache.wan.parallel.ParallelGatewaySenderOperation2DistributedTest;
import org.apache.geode.test.junit.categories.WanTest;

@Category({WanTest.class})
public class ParallelGatewaySenderOperation_2_OffHeapDUnitTest
extends ParallelGatewaySenderOperation_2_DUnitTest {
public class ParallelGatewaySenderOperation2OffHeapDistributedTest
extends ParallelGatewaySenderOperation2DistributedTest {

public ParallelGatewaySenderOperation_2_OffHeapDUnitTest() {
public ParallelGatewaySenderOperation2OffHeapDistributedTest() {
super();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@

import org.junit.experimental.categories.Category;

import org.apache.geode.internal.cache.wan.parallel.ParallelGatewaySenderOperationsDUnitTest;
import org.apache.geode.internal.cache.wan.parallel.ParallelGatewaySenderOperationsDistributedTest;
import org.apache.geode.test.junit.categories.WanTest;

@Category({WanTest.class})
@SuppressWarnings("serial")
public class ParallelGatewaySenderOperationsOffHeapDUnitTest
extends ParallelGatewaySenderOperationsDUnitTest {
public class ParallelGatewaySenderOperationsOffHeapDistributedTest
extends ParallelGatewaySenderOperationsDistributedTest {

@Override
public boolean isOffHeap() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@

import org.junit.experimental.categories.Category;

import org.apache.geode.internal.cache.wan.parallel.ParallelWANConflationDUnitTest;
import org.apache.geode.internal.cache.wan.parallel.ParallelWANConflationDistributedTest;
import org.apache.geode.test.junit.categories.WanTest;

@SuppressWarnings("serial")
@Category({WanTest.class})
public class ParallelWANConflationOffHeapDUnitTest extends ParallelWANConflationDUnitTest {
public class ParallelWANConflationOffHeapDistributedTest
extends ParallelWANConflationDistributedTest {

public ParallelWANConflationOffHeapDUnitTest() {
public ParallelWANConflationOffHeapDistributedTest() {
super();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@

import org.junit.experimental.categories.Category;

import org.apache.geode.internal.cache.wan.parallel.ParallelWANPropagationConcurrentOpsDUnitTest;
import org.apache.geode.internal.cache.wan.parallel.ParallelWANPropagationConcurrentOpsDistributedTest;
import org.apache.geode.test.junit.categories.WanTest;

@SuppressWarnings("serial")
@Category({WanTest.class})
public class ParallelWANPropagationConcurrentOpsOffHeapDUnitTest
extends ParallelWANPropagationConcurrentOpsDUnitTest {
public class ParallelWANPropagationConcurrentOpsOffHeapDistributedTest
extends ParallelWANPropagationConcurrentOpsDistributedTest {

public ParallelWANPropagationConcurrentOpsOffHeapDUnitTest() {
public ParallelWANPropagationConcurrentOpsOffHeapDistributedTest() {
super();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@

import org.junit.experimental.categories.Category;

import org.apache.geode.internal.cache.wan.serial.SerialGatewaySenderQueueDUnitTest;
import org.apache.geode.internal.cache.wan.serial.SerialGatewaySenderQueueDistributedTest;
import org.apache.geode.test.junit.categories.WanTest;

@SuppressWarnings("serial")
@Category({WanTest.class})
public class SerialGatewaySenderQueueOffHeapDUnitTest extends SerialGatewaySenderQueueDUnitTest {
public class SerialGatewaySenderQueueOffHeapDistributedTest
extends SerialGatewaySenderQueueDistributedTest {

public SerialGatewaySenderQueueOffHeapDUnitTest() {
public SerialGatewaySenderQueueOffHeapDistributedTest() {
super();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* DUnit for ParallelSenderQueue alert threshold.
*/
@Category({WanTest.class})
public class ParallelGatewaySenderAlertThresholdDUnitTest extends WANTestBase {
public class ParallelGatewaySenderAlertThresholdDistributedTest extends WANTestBase {

@Test
public void testParallelSenderQueueEventsAlertThreshold() {
Expand Down Expand Up @@ -98,13 +98,13 @@ public void testParallelSenderQueueEventsAlertThreshold() {
});

int v4alert = vm4.invoke(
ParallelGatewaySenderAlertThresholdDUnitTest::checkSenderMBeanAlertThreshold);
ParallelGatewaySenderAlertThresholdDistributedTest::checkSenderMBeanAlertThreshold);
int v5alert = vm5.invoke(
ParallelGatewaySenderAlertThresholdDUnitTest::checkSenderMBeanAlertThreshold);
ParallelGatewaySenderAlertThresholdDistributedTest::checkSenderMBeanAlertThreshold);
int v6alert = vm6.invoke(
ParallelGatewaySenderAlertThresholdDUnitTest::checkSenderMBeanAlertThreshold);
ParallelGatewaySenderAlertThresholdDistributedTest::checkSenderMBeanAlertThreshold);
int v7alert = vm7.invoke(
ParallelGatewaySenderAlertThresholdDUnitTest::checkSenderMBeanAlertThreshold);
ParallelGatewaySenderAlertThresholdDistributedTest::checkSenderMBeanAlertThreshold);

assertThat((v4alert + v5alert + v6alert + v7alert) > 0).as(
"GatewaySenders MBean should contain number of EventsExceedingAlertThreshold > 0").isTrue();
Expand Down Expand Up @@ -172,13 +172,13 @@ public void testParallelSenderQueueNoEventsExceedingHighAlertThreshold() {
});

int v4alert = vm4.invoke(
ParallelGatewaySenderAlertThresholdDUnitTest::checkSenderMBeanAlertThreshold);
ParallelGatewaySenderAlertThresholdDistributedTest::checkSenderMBeanAlertThreshold);
int v5alert = vm5.invoke(
ParallelGatewaySenderAlertThresholdDUnitTest::checkSenderMBeanAlertThreshold);
ParallelGatewaySenderAlertThresholdDistributedTest::checkSenderMBeanAlertThreshold);
int v6alert = vm6.invoke(
ParallelGatewaySenderAlertThresholdDUnitTest::checkSenderMBeanAlertThreshold);
ParallelGatewaySenderAlertThresholdDistributedTest::checkSenderMBeanAlertThreshold);
int v7alert = vm7.invoke(
ParallelGatewaySenderAlertThresholdDUnitTest::checkSenderMBeanAlertThreshold);
ParallelGatewaySenderAlertThresholdDistributedTest::checkSenderMBeanAlertThreshold);

assertThat(0).as(
"GatewaySenders MBean should contain number of EventsExceedingAlertThreshold = 0")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@

import org.junit.experimental.categories.Category;

import org.apache.geode.internal.cache.wan.concurrent.ConcurrentParallelGatewaySenderOperation_2_DUnitTest;
import org.apache.geode.internal.cache.wan.concurrent.ConcurrentParallelGatewaySenderOperation2DistributedTest;
import org.apache.geode.test.dunit.VM;
import org.apache.geode.test.junit.categories.WanTest;

@Category({WanTest.class})
public class ParallelGatewaySenderOperation_2_DUnitTest
extends ConcurrentParallelGatewaySenderOperation_2_DUnitTest {
public class ParallelGatewaySenderOperation2DistributedTest
extends ConcurrentParallelGatewaySenderOperation2DistributedTest {

private static final long serialVersionUID = 1L;

public ParallelGatewaySenderOperation_2_DUnitTest() {
public ParallelGatewaySenderOperation2DistributedTest() {
super();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
* DUnit test for operations on ParallelGatewaySender
*/
@Category(WanTest.class)
public class ParallelGatewaySenderOperationsDUnitTest extends WANTestBase {
public class ParallelGatewaySenderOperationsDistributedTest extends WANTestBase {

@Rule
public SerializableTestName testName = new SerializableTestName();
Expand Down
Loading

0 comments on commit 9a86b74

Please sign in to comment.