Skip to content

Commit

Permalink
GEODE_2121: add categories to tests
Browse files Browse the repository at this point in the history
added RedisTest category
swept all unit tests looking for additional client/server & other tests to
categorize
  • Loading branch information
bschuchardt committed Apr 20, 2018
1 parent 65da520 commit 2b6a6d9
Show file tree
Hide file tree
Showing 170 changed files with 398 additions and 175 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@
import org.apache.geode.test.dunit.rules.ClusterStartupRule;
import org.apache.geode.test.dunit.rules.MemberVM;
import org.apache.geode.test.junit.categories.DistributedTest;
import org.apache.geode.test.junit.categories.RestAPITest;
import org.apache.geode.test.junit.rules.GfshCommandRule;

@Category(DistributedTest.class)
@Category({RestAPITest.class, DistributedTest.class})
public class RestFunctionExecuteDUnitTest {

@ClassRule
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
import org.apache.geode.rest.internal.web.RestFunctionTemplate;
import org.apache.geode.test.dunit.VM;
import org.apache.geode.test.junit.categories.DistributedTest;
import org.apache.geode.test.junit.categories.RestAPITest;
import org.apache.geode.test.junit.runners.CategoryWithParameterizedRunnerFactory;

/**
Expand All @@ -59,7 +60,7 @@
* @since GemFire 8.0
*/

@Category(DistributedTest.class)
@Category({DistributedTest.class, RestAPITest.class})
@RunWith(Parameterized.class)
@Parameterized.UseParametersRunnerFactory(CategoryWithParameterizedRunnerFactory.class)
public class RestAPIOnRegionFunctionExecutionDUnitTest extends RestAPITestBase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@
import org.apache.geode.test.dunit.VM;
import org.apache.geode.test.dunit.internal.JUnit4DistributedTestCase;
import org.apache.geode.test.junit.categories.DistributedTest;
import org.apache.geode.test.junit.categories.RestAPITest;

@Category(DistributedTest.class)
@Category({DistributedTest.class, RestAPITest.class})
class RestAPITestBase extends JUnit4DistributedTestCase {

protected Cache cache = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,15 @@
import org.apache.geode.test.dunit.NetworkUtils;
import org.apache.geode.test.dunit.VM;
import org.apache.geode.test.junit.categories.DistributedTest;
import org.apache.geode.test.junit.categories.RestAPITest;
import org.apache.geode.test.junit.runners.CategoryWithParameterizedRunnerFactory;

/**
* Dunit Test containing inter - operations between REST Client and Gemfire cache client
*
* @since GemFire 8.0
*/
@Category(DistributedTest.class)
@Category({DistributedTest.class, RestAPITest.class})
@RunWith(Parameterized.class)
@Parameterized.UseParametersRunnerFactory(CategoryWithParameterizedRunnerFactory.class)
public class RestAPIsAndInterOpsDUnitTest extends LocatorTestBase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@
import org.apache.geode.test.dunit.LogWriterUtils;
import org.apache.geode.test.junit.categories.DistributedTest;
import org.apache.geode.test.junit.categories.FlakyTest;
import org.apache.geode.test.junit.categories.RestAPITest;
import org.apache.geode.test.junit.runners.CategoryWithParameterizedRunnerFactory;

@Category(DistributedTest.class)
@Category({DistributedTest.class, RestAPITest.class})
@RunWith(Parameterized.class)
@Parameterized.UseParametersRunnerFactory(CategoryWithParameterizedRunnerFactory.class)
public class RestAPIsOnGroupsFunctionExecutionDUnitTest extends RestAPITestBase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@
import org.apache.geode.internal.AvailablePortHelper;
import org.apache.geode.rest.internal.web.RestFunctionTemplate;
import org.apache.geode.test.junit.categories.DistributedTest;
import org.apache.geode.test.junit.categories.RestAPITest;
import org.apache.geode.test.junit.runners.CategoryWithParameterizedRunnerFactory;

@Category(DistributedTest.class)
@Category({DistributedTest.class, RestAPITest.class})
@RunWith(Parameterized.class)
@Parameterized.UseParametersRunnerFactory(CategoryWithParameterizedRunnerFactory.class)
public class RestAPIsOnMembersFunctionExecutionDUnitTest extends RestAPITestBase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,14 @@
import org.apache.geode.test.dunit.NetworkUtils;
import org.apache.geode.test.dunit.VM;
import org.apache.geode.test.junit.categories.DistributedTest;
import org.apache.geode.test.junit.categories.RestAPITest;
import org.apache.geode.test.junit.runners.CategoryWithParameterizedRunnerFactory;
import org.apache.geode.util.test.TestUtil;

/**
* @since GemFire 8.0
*/
@Category(DistributedTest.class)
@Category({DistributedTest.class, RestAPITest.class})
@RunWith(Parameterized.class)
@Parameterized.UseParametersRunnerFactory(CategoryWithParameterizedRunnerFactory.class)
public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
import org.junit.experimental.categories.Category;

import org.apache.geode.test.junit.categories.IntegrationTest;
import org.apache.geode.test.junit.categories.SerializationTest;

@Category(IntegrationTest.class)
@Category({IntegrationTest.class, SerializationTest.class})
public class AnalyzeConnectorsSerializablesJUnitTest extends AnalyzeSerializablesJUnitTest {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@

import org.apache.geode.internal.cache.EventID;
import org.apache.geode.internal.cache.tier.sockets.ClientProxyMembershipID;
import org.apache.geode.test.junit.categories.SerializationTest;
import org.apache.geode.test.junit.categories.UnitTest;

@Category(UnitTest.class)
@Category({UnitTest.class, SerializationTest.class})
public class DataSerializerTest {

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,14 @@
import org.apache.geode.internal.OSProcess;
import org.apache.geode.internal.PureJavaMode;
import org.apache.geode.test.junit.categories.IntegrationTest;
import org.apache.geode.test.junit.categories.MembershipTest;

/**
* This class makes sure an isolated "loner" distribution manager can be created and do some cache
* functions.
*/
@SuppressWarnings("deprecation")
@Category(IntegrationTest.class)
@Category({IntegrationTest.class, MembershipTest.class})
public class LonerDMJUnitTest {

@After
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@
import org.junit.Test;
import org.junit.experimental.categories.Category;

import org.apache.geode.test.junit.categories.MembershipTest;
import org.apache.geode.test.junit.categories.UnitTest;

@Category(UnitTest.class)
@Category({UnitTest.class, MembershipTest.class})
public class SystemFailureJUnitTest {

private static final int LONG_WAIT = 30000;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@
import org.junit.experimental.categories.Category;

import org.apache.geode.internal.cache.tier.sockets.Message;
import org.apache.geode.test.junit.categories.ClientServerTest;
import org.apache.geode.test.junit.categories.UnitTest;

@Category(UnitTest.class)
@Category({UnitTest.class, ClientServerTest.class})
public class AbstractOpTest {

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@
import org.junit.contrib.java.lang.system.SystemErrRule;
import org.junit.experimental.categories.Category;

import org.apache.geode.test.junit.categories.ClientServerTest;
import org.apache.geode.test.junit.categories.UnitTest;

/**
* Test if exceptions are logged when thread is submitted using
* {@code SingleHopClientExecutor#submitTask} method.
*/
@Category(UnitTest.class)
@Category({UnitTest.class, ClientServerTest.class})
public class SingleHopClientExecutorSubmitTaskWithExceptionTest {

@Rule
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.junit.Test;
import org.junit.experimental.categories.Category;

import org.apache.geode.test.junit.categories.ClientServerTest;
import org.apache.geode.test.junit.categories.UnitTest;

/**
Expand All @@ -37,7 +38,7 @@
* @see org.junit.Test
* @since GemFire 7.0
*/
@Category(UnitTest.class)
@Category({UnitTest.class, ClientServerTest.class})
public class LocatorStatusResponseJUnitTest {

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,10 @@
import org.apache.geode.test.dunit.*;
import org.apache.geode.test.dunit.cache.internal.JUnit4CacheTestCase;
import org.apache.geode.test.junit.categories.DistributedTest;
import org.apache.geode.test.junit.categories.MembershipTest;

@SuppressWarnings("serial")
@Category(DistributedTest.class)
@Category({DistributedTest.class, MembershipTest.class})
public class ReconnectDUnitTest extends JUnit4CacheTestCase {
static int locatorPort;
static Locator locator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,14 @@
import org.apache.geode.test.dunit.WaitCriterion;
import org.apache.geode.test.dunit.cache.internal.JUnit4CacheTestCase;
import org.apache.geode.test.junit.categories.DistributedTest;
import org.apache.geode.test.junit.categories.MembershipTest;

/**
* Test {@link RegionMembershipListener}
*
* @since GemFire 5.0
*/
@Category(DistributedTest.class)
@Category({DistributedTest.class, MembershipTest.class})
public class RegionMembershipListenerDUnitTest extends JUnit4CacheTestCase {

private transient MyRML myListener;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,14 @@
import org.apache.geode.test.dunit.Wait;
import org.apache.geode.test.dunit.WaitCriterion;
import org.apache.geode.test.junit.categories.DistributedTest;
import org.apache.geode.test.junit.categories.MembershipTest;

/**
* Tests the functionality of the {@link RequiredRoles} class.
*
* @since GemFire 5.0
*/
@Category(DistributedTest.class)
@Category({DistributedTest.class, MembershipTest.class})
public class RequiredRolesDUnitTest extends ReliabilityTestCase {

protected transient volatile boolean startTestWaitForRequiredRoles = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,14 @@
import org.apache.geode.test.dunit.WaitCriterion;
import org.apache.geode.test.dunit.cache.internal.JUnit4CacheTestCase;
import org.apache.geode.test.junit.categories.DistributedTest;
import org.apache.geode.test.junit.categories.MembershipTest;

/**
* Test to make sure slow receiver queuing is working
*
* @since GemFire 4.2.1
*/
@Category(DistributedTest.class)
@Category({DistributedTest.class, MembershipTest.class})
@Ignore("Test was disabled by renaming to DisabledTest")
public class SlowRecDUnitTest extends JUnit4CacheTestCase {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,9 @@
import org.apache.geode.internal.Version;
import org.apache.geode.pdx.internal.TypeRegistry;
import org.apache.geode.test.junit.categories.IntegrationTest;
import org.apache.geode.test.junit.categories.SerializationTest;

@Category(IntegrationTest.class)
@Category({IntegrationTest.class, SerializationTest.class})
public class AnalyzeSerializablesJUnitTest {

private static final String NEW_LINE = System.getProperty("line.separator");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,13 @@
import org.apache.geode.test.dunit.VM;
import org.apache.geode.test.dunit.internal.JUnit4DistributedTestCase;
import org.apache.geode.test.junit.categories.DistributedTest;
import org.apache.geode.test.junit.categories.MembershipTest;

/**
* Tests the functionality of the {@link DistributedMember} class.
*
*/
@Category(DistributedTest.class)
@Category({DistributedTest.class, MembershipTest.class})
public class DistributedMemberDUnitTest extends JUnit4DistributedTestCase {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@
import org.junit.Test;
import org.junit.experimental.categories.Category;

import org.apache.geode.test.junit.categories.MembershipTest;
import org.apache.geode.test.junit.categories.UnitTest;

@Category(UnitTest.class)
@Category({UnitTest.class, MembershipTest.class})
public class DistributionMessageTest {

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@

import org.apache.geode.cache.server.ServerLoad;
import org.apache.geode.test.junit.categories.IntegrationTest;
import org.apache.geode.test.junit.categories.MembershipTest;

/**
* Integration tests extracted from LocatorLoadSnapshotJUnitTest
*/
@Category(IntegrationTest.class)
@Category({IntegrationTest.class, MembershipTest.class})
public class LocatorLoadSnapshotIntegrationTest {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,14 @@
import org.junit.experimental.categories.Category;

import org.apache.geode.cache.server.ServerLoad;
import org.apache.geode.test.junit.categories.MembershipTest;
import org.apache.geode.test.junit.categories.UnitTest;

/**
* Tests the functionality of the LocatorLoadSnapshot, which is the data structure that is used in
* the locator to compare the load between multiple servers.
*/
@Category(UnitTest.class)
@Category({UnitTest.class, MembershipTest.class})
public class LocatorLoadSnapshotJUnitTest {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@
import org.junit.Test;
import org.junit.experimental.categories.Category;

import org.apache.geode.test.junit.categories.MembershipTest;
import org.apache.geode.test.junit.categories.UnitTest;

@Category(UnitTest.class)
@Category({UnitTest.class, MembershipTest.class})
public class ReplyProcessor21Test {

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@
import org.apache.geode.cache.RegionShortcut;
import org.apache.geode.cache.Scope;
import org.apache.geode.internal.cache.DistributedRegion;
import org.apache.geode.test.junit.categories.DLockTest;
import org.apache.geode.test.junit.categories.IntegrationTest;
import org.apache.geode.test.junit.rules.ExecutorServiceRule;

@Category(IntegrationTest.class)
@Category({IntegrationTest.class, DLockTest.class})
public class DLockServiceLeakTest {

private Cache cache;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@
import org.junit.Test;
import org.junit.experimental.categories.Category;

import org.apache.geode.test.junit.categories.MembershipTest;
import org.apache.geode.test.junit.categories.UnitTest;

/**
* InternalRole Tester.
*/
@Category(UnitTest.class)
@Category({UnitTest.class, MembershipTest.class})
public class InternalRoleJUnitTest {

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,15 @@
import org.apache.geode.internal.cache.DistributedPutAllOperation.EntryVersionsList;
import org.apache.geode.test.dunit.cache.internal.JUnit4CacheTestCase;
import org.apache.geode.test.junit.categories.DistributedTest;
import org.apache.geode.test.junit.categories.SerializationTest;

/**
* Test the DSFID serialization framework added for rolling upgrades in 7.1
*
*
*
*/
@Category(DistributedTest.class)
@Category({DistributedTest.class, SerializationTest.class})
public class BackwardCompatibilitySerializationDUnitTest extends JUnit4CacheTestCase {

private transient ByteArrayOutputStream baos;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@
import org.apache.geode.test.dunit.VM;
import org.apache.geode.test.dunit.cache.internal.JUnit4CacheTestCase;
import org.apache.geode.test.junit.categories.DistributedTest;
import org.apache.geode.test.junit.categories.MembershipTest;

@Category(DistributedTest.class)
@Category({DistributedTest.class, MembershipTest.class})
public class ClassNotFoundExceptionDUnitTest extends JUnit4CacheTestCase {

public ClassNotFoundExceptionDUnitTest() {
Expand Down
Loading

0 comments on commit 2b6a6d9

Please sign in to comment.