Search in sources :

Example 11 with Repeat

use of edu.umass.cs.utils.Repeat in project GNS by MobilityFirst.

the class BatchCreateTest method test_500_Batch_Tests.

/**
   * The test set for testing batch creates. The test will create batches
   * of size 2, 4, 8,..., 128.
   *
   * @throws Exception
   */
@Test
// Fixme: put this back at 7 once removal is faster.
@Repeat(times = 5)
public void test_500_Batch_Tests() throws Exception {
    GuidEntry accountGuidForBatch = test_510_CreateBatchAccountGuid();
    test_511_CreateBatch(accountGuidForBatch);
    test_512_CheckBatch(accountGuidForBatch);
    numberToCreate *= 2;
    client.execute(GNSCommand.accountGuidRemove(accountGuidForBatch));
}
Also used : GuidEntry(edu.umass.cs.gnsclient.client.util.GuidEntry) Test(org.junit.Test) DefaultGNSTest(edu.umass.cs.gnsserver.utils.DefaultGNSTest) Repeat(edu.umass.cs.utils.Repeat)

Example 12 with Repeat

use of edu.umass.cs.utils.Repeat in project GNS by MobilityFirst.

the class ServerIntegrationTest method test_550_Query_Tests.

/**
   * A set of tests for testing Queries.
   *
   * @throws NoSuchAlgorithmException
   * @throws EncryptionException
   */
@Test
@Repeat(times = REPEAT)
public void test_550_Query_Tests() throws EncryptionException, NoSuchAlgorithmException {
    String groupTestFieldName = "_SelectAutoGroupTestQueryField_" + RandomString.randomString(12);
    GuidEntry groupOneGuid;
    GuidEntry groupTwoGuid;
    String queryOne = "~" + groupTestFieldName + " : {$gt: 20}";
    String queryTwo = "~" + groupTestFieldName + " : 0";
    test_551_QueryRemovePreviousTestFields(groupTestFieldName);
    if (!enable552) {
        return;
    }
    List<GuidEntry> list = test_552_QuerySetupGuids(groupTestFieldName, queryOne, queryTwo);
    groupOneGuid = list.get(0);
    groupTwoGuid = list.get(1);
    test_553_QuerySetupGroup(groupTestFieldName, groupOneGuid);
    test_554_QuerySetupSecondGroup(groupTestFieldName, groupTwoGuid);
    test_555_QueryLookupGroup(groupTestFieldName, groupOneGuid);
    test_556_QueryLookupGroupAgain(groupTestFieldName, groupOneGuid);
    test_557_LookupGroupAgain2(groupTestFieldName, groupOneGuid);
    test_558_QueryLookupGroupAgain3(groupTestFieldName, groupOneGuid);
    test_559_QueryAlterGroup(groupTestFieldName, groupOneGuid);
    test_560_QueryLookupGroupAfterAlterations(groupTestFieldName, groupOneGuid);
    test_561_QueryLookupSecondGroup(groupTestFieldName, groupTwoGuid);
}
Also used : RandomString(edu.umass.cs.gnscommon.utils.RandomString) BasicGuidEntry(edu.umass.cs.gnsclient.client.util.BasicGuidEntry) GuidEntry(edu.umass.cs.gnsclient.client.util.GuidEntry) DefaultGNSTest(edu.umass.cs.gnsserver.utils.DefaultGNSTest) Test(org.junit.Test) Repeat(edu.umass.cs.utils.Repeat)

Example 13 with Repeat

use of edu.umass.cs.utils.Repeat in project GNS by MobilityFirst.

the class ServerIntegrationTest method test_031_RemoveAccountWithPasswordTest.

/**
   * Runs the RemoveAccountWithPassword tests as one independent unit.
   *
   * @throws Exception
   */
@Test
//Disabled temporarily
@Repeat(times = 0)
public void test_031_RemoveAccountWithPasswordTest() throws Exception {
    String accountToRemoveWithPassword = RandomString.randomString(12) + "-" + "passwordremovetest@gns.name";
    GuidEntry accountToRemoveGuid = test_035_RemoveAccountWithPasswordCreateAccount(accountToRemoveWithPassword);
    test_036_RemoveAccountWithPasswordCheckAccount(accountToRemoveGuid);
    test_037_RemoveAccountWithPasswordRemoveAccount(accountToRemoveWithPassword);
    test_038_RemoveAccountWithPasswordCheckAccountAfterRemove(accountToRemoveWithPassword);
}
Also used : RandomString(edu.umass.cs.gnscommon.utils.RandomString) BasicGuidEntry(edu.umass.cs.gnsclient.client.util.BasicGuidEntry) GuidEntry(edu.umass.cs.gnsclient.client.util.GuidEntry) DefaultGNSTest(edu.umass.cs.gnsserver.utils.DefaultGNSTest) Test(org.junit.Test) Repeat(edu.umass.cs.utils.Repeat)

Aggregations

DefaultGNSTest (edu.umass.cs.gnsserver.utils.DefaultGNSTest)13 Repeat (edu.umass.cs.utils.Repeat)13 Test (org.junit.Test)13 RandomString (edu.umass.cs.gnscommon.utils.RandomString)11 GuidEntry (edu.umass.cs.gnsclient.client.util.GuidEntry)7 BasicGuidEntry (edu.umass.cs.gnsclient.client.util.BasicGuidEntry)5 JSONObject (org.json.JSONObject)5 ClientException (edu.umass.cs.gnscommon.exceptions.client.ClientException)4 IOException (java.io.IOException)4 EncryptionException (edu.umass.cs.gnscommon.exceptions.client.EncryptionException)3 FieldNotFoundException (edu.umass.cs.gnscommon.exceptions.client.FieldNotFoundException)3 FileNotFoundException (java.io.FileNotFoundException)3 NoSuchAlgorithmException (java.security.NoSuchAlgorithmException)3 JSONArray (org.json.JSONArray)3 JSONException (org.json.JSONException)3 ContextServiceClient (edu.umass.cs.contextservice.client.ContextServiceClient)2 InetAddress (java.net.InetAddress)1 InetSocketAddress (java.net.InetSocketAddress)1 HashSet (java.util.HashSet)1