Skip to content

Commit

Permalink
Removing irrelevant tests
Browse files Browse the repository at this point in the history
  • Loading branch information
semancik committed Sep 23, 2021
1 parent ec82c33 commit f7a2a57
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 338 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -237,94 +237,7 @@ public void test150AddGoblins() throws Exception {
private String goblinUsername(int i) {
return String.format("goblin%05d", i);
}

/**
* Overwrite the resource with a bad configuration.
* Now we are going to make some trouble.
*/
@Test
public void test200SyncAddKraken() throws Exception {
Task task = getTestTask();
OperationResult result = task.getResult();

ImportOptionsType options = new ImportOptionsType()
.overwrite(true);
importObjectFromFile(RESOURCE_OPENDJ_FILE_BAD, options, task, result);

OperationResult testResultOpenDj = modelService.testResource(RESOURCE_OPENDJ_OID, task);
display("Test resource result", testResultOpenDj);
TestUtil.assertSuccess(testResultOpenDj);

PrismObject<ResourceType> resourceAfter = modelService.getObject(ResourceType.class, RESOURCE_OPENDJ_OID, null, task, result);
assertResource(resourceAfter, "after")
.assertHasSchema();

assertLdapConnectorInstances(1, INSTANCES_MAX);
}

/**
* Just make first attempt with bad configuration.
* This is here mostly to make sure we really have a bad configuration.
*/
@Test
public void test210SyncAddKraken() throws Exception {
Entry entry = openDJController.addEntryFromLdifFile(ACCOUNT_KRAKEN_LDIF_FILE);
display("Entry from LDIF", entry);

when();
OperationResult taskResult = waitForTaskNextRun(TASK_LIVE_SYNC_OID);

then();
assertFailure(taskResult);

assertSyncTokenIncrement(0);
assertLdapConnectorInstances(1, INSTANCES_MAX);
assertThreadCount();

// just to make sure we are stable
// in fact, it is "FUBAR, but stable"

taskResult = waitForTaskNextRun(TASK_LIVE_SYNC_OID);
assertFailure(taskResult);

assertSyncTokenIncrement(0);
assertLdapConnectorInstances(1, INSTANCES_MAX);
assertThreadCount();

dumpLdap();

}

/**
* "Bad run".
* MID-5099: cannot reproduce
*/
@Test
public void test212SyncAddBads() throws Exception {
when();
for (int i = 0; i < SYNC_ADD_ATTEMPTS; i++) {
syncAddAttemptBad("bad", i);
}

then();
dumpLdap();
}

/**
* Suspend sync task. We do not want that to mess the results of subsequent
* tests (e.g. mess the number of connector instances).
*/
@Test
public void test219StopSyncTask() throws Exception {
when();
suspendTask(TASK_LIVE_SYNC_OID);

then();
assertSyncTokenIncrement(0);
assertLdapConnectorInstances(1, INSTANCES_MAX);
assertThreadCount();
}


// this runs for ~20+ minutes
@Test
public void test230UserRecomputeSequential() throws Exception {
Expand Down
10 changes: 0 additions & 10 deletions testing/story/src/test/resources/ldap/sync-massive/kraken.ldif

This file was deleted.

This file was deleted.

0 comments on commit f7a2a57

Please sign in to comment.