Skip to content

Commit

Permalink
TestPlentyOfAssignments: fixed wrongly named test test21(2)4ReconcileBob
Browse files Browse the repository at this point in the history
  • Loading branch information
virgo47 committed Jun 18, 2020
1 parent 97a7e0e commit 5d9f2b9
Showing 1 changed file with 2 additions and 13 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017-2019 Evolveum and contributors
* Copyright (c) 2017-2020 Evolveum and contributors
*
* This work is dual-licensed under the Apache License 2.0
* and European Union Public License. See LICENSE file for details.
Expand Down Expand Up @@ -129,7 +129,6 @@ public void initSystem(Task initTask, OperationResult initResult) throws Excepti

inspector = new CountingInspector();
InternalMonitor.setInspector(inspector);
// InternalMonitor.setTrace(InternalCounters.PRISM_OBJECT_COMPARE_COUNT, true);
}

private String generateRoleOid(String format, int num) {
Expand Down Expand Up @@ -186,9 +185,6 @@ public void test100AddCheese() throws Exception {

displayDumpable("Inspector", inspector);

// inspector.assertRead(RoleType.class, NUMBER_OF_CHEESE_ASSIGNMENTS);
// assertRepositoryReadCount(xxx); // may be influenced by tasks

assertCounterIncrement(InternalCounters.PRISM_OBJECT_COMPARE_COUNT, 0);
}

Expand Down Expand Up @@ -227,7 +223,6 @@ public void test110RecomputeCheese() throws Exception {
displayDumpable("Inspector", inspector);

inspector.assertRead(RoleType.class, 1);
// assertRepositoryReadCount(4); // may be influenced by tasks
assertCounterIncrement(InternalCounters.PRISM_OBJECT_COMPARE_COUNT, 0);
}

Expand Down Expand Up @@ -269,7 +264,6 @@ public void test120CheesePreviewChanges() throws Exception {
displayDumpable("Inspector", inspector);

inspector.assertRead(RoleType.class, 1);
// assertRepositoryReadCount(4); // may be influenced by tasks
assertCounterIncrement(InternalCounters.PRISM_OBJECT_COMPARE_COUNT, 0);
}

Expand Down Expand Up @@ -457,7 +451,7 @@ public void test212RecomputeBob() throws Exception {
* MID-3938 #8
*/
@Test
public void test2124ReconcileBob() throws Exception {
public void test214ReconcileBob() throws Exception {
Task task = getTestTask();
OperationResult result = task.getResult();

Expand Down Expand Up @@ -488,15 +482,13 @@ public void test2124ReconcileBob() throws Exception {
displayDumpable("Inspector", inspector);

inspector.assertRead(RoleType.class, NUMBER_OF_BOB_DUMMY_ROLE_ASSIGNMENTS);
// assertRepositoryReadCount(xxx); // may be influenced by tasks

assertCounterIncrement(InternalCounters.PRISM_OBJECT_COMPARE_COUNT, 0);

assertBobDummy(NUMBER_OF_BOB_DUMMY_ROLE_ASSIGNMENTS);
}

private void assertBobRoleMembershipRef(PrismObject<UserType> user) {

assertRoleMembershipRefs(user, GENERATED_DUMMY_ROLE_OID_FORMAT, null, 0, NUMBER_OF_BOB_DUMMY_ROLE_ASSIGNMENTS);
assertRoleMembershipRefs(user, NUMBER_OF_BOB_DUMMY_ROLE_ASSIGNMENTS);
}
Expand Down Expand Up @@ -638,15 +630,13 @@ public void test224ReconcileAlice() throws Exception {
displayDumpable("Inspector", inspector);

inspector.assertRead(RoleType.class, NUMBER_OF_GENERATED_DUMMY_GROUPS);
// assertRepositoryReadCount(xxx); // may be influenced by tasks

assertCounterIncrement(InternalCounters.PRISM_OBJECT_COMPARE_COUNT, 0);

assertAliceDummy(NUMBER_OF_GENERATED_DUMMY_GROUPS);
}

private void assertAliceRoleMembershipRef(PrismObject<UserType> user) {

assertRoleMembershipRefs(user, GENERATED_DUMMY_GROUP_ROLE_OID_FORMAT, null, 0, NUMBER_OF_GENERATED_DUMMY_GROUPS);
assertRoleMembershipRefs(user, NUMBER_OF_GENERATED_DUMMY_GROUPS);
}
Expand Down Expand Up @@ -688,5 +678,4 @@ private void assertRoleMembershipRef(PrismObject<UserType> user, String roleOid,
}
fail("Cannot find membership of role " + roleOid + " (" + relation.getLocalPart() + ") in " + user);
}

}

0 comments on commit 5d9f2b9

Please sign in to comment.