Skip to content

Commit

Permalink
Fixing sanity test
Browse files Browse the repository at this point in the history
  • Loading branch information
semancik committed Aug 24, 2018
1 parent 6596cf5 commit 6bc8119
Showing 1 changed file with 12 additions and 7 deletions.
Expand Up @@ -2906,15 +2906,16 @@ public void test301LiveSyncCreate() throws Exception {
display("Sync token before", tokenBefore.toString());

// WHEN
displayWhen(TEST_NAME);

Entry entry = openDJController.addEntryFromLdifFile(LDIF_WILL_FILENAME);
display("Entry from LDIF", entry);

// THEN

// Wait a bit to give the sync cycle time to detect the change
basicWaitForSyncChangeDetection(syncCycle, tokenBefore, 4, result);
basicWaitForSyncChangeDetection(syncCycle, tokenBefore, 2, result);

// THEN
displayThen(TEST_NAME);
// Search for the user that should be created now
UserType user = searchUserByName(WILL_NAME);

Expand All @@ -2925,7 +2926,7 @@ public void test301LiveSyncCreate() throws Exception {

// TODO: more checks

assertAndStoreSyncTokenIncrement(syncCycle, 4);
assertAndStoreSyncTokenIncrement(syncCycle, 2);
checkAllShadows();
}

Expand Down Expand Up @@ -2987,6 +2988,8 @@ public void test303LiveSyncLink() throws Exception {
// AssertJUnit.assertEquals(userOid, oidHolder.value);

//WHEN
displayWhen(TEST_NAME);

//create account for e which should be correlated
final OperationResult result = new OperationResult(TestSanity.class.getName()
+ "." + TEST_NAME);
Expand All @@ -2999,10 +3002,12 @@ public void test303LiveSyncLink() throws Exception {
Entry entry = openDJController.addEntryFromLdifFile(LDIF_E_FILENAME_LINK);
display("Entry from LDIF", entry);

// THEN
// Wait a bit to give the sync cycle time to detect the change
basicWaitForSyncChangeDetection(syncCycle, tokenBefore, 4, result);
basicWaitForSyncChangeDetection(syncCycle, tokenBefore, 1, result);

// THEN
displayThen(TEST_NAME);

//check user and account ref
userType = searchUserByName("e");

Expand All @@ -3015,7 +3020,7 @@ public void test303LiveSyncLink() throws Exception {

assertEqualsPolyString("Name doesn't match", "uid=e,ou=People,dc=example,dc=com", account.getName());

assertAndStoreSyncTokenIncrement(syncCycle, 4);
assertAndStoreSyncTokenIncrement(syncCycle, 1);
checkAllShadows();
}

Expand Down

0 comments on commit 6bc8119

Please sign in to comment.