Skip to content

Commit

Permalink
Fixing test because of rolled back dispose()
Browse files Browse the repository at this point in the history
  • Loading branch information
semancik committed Jul 11, 2018
1 parent 583475d commit b1026ce
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 14 deletions.
Expand Up @@ -136,7 +136,7 @@ public void test131ModifyUserJackAssignAccount() throws Exception {
displayThen(TEST_NAME);
assertSuccess(result);
XMLGregorianCalendar endTime = clock.currentTimeXMLGregorianCalendar();
assertCounterIncrement(InternalCounters.CONNECTOR_INSTANCE_INITIALIZATION_COUNT, 1);
assertCounterIncrement(InternalCounters.CONNECTOR_INSTANCE_INITIALIZATION_COUNT, 0); // MID-4779
assertCounterIncrement(InternalCounters.SHADOW_FETCH_OPERATION_COUNT, 0);

PrismObject<UserType> userJack = getUser(USER_JACK_OID);
Expand Down
Expand Up @@ -169,8 +169,7 @@ public void test100AddGroupShadowSwashbucklers() throws Exception {
assertEquals("Wrong group description", GROUP_DUMMY_SWASHBUCKLERS_DESCRIPTION,
dummyGroup.getAttributeValue(DummyResourceContoller.DUMMY_GROUP_ATTRIBUTE_DESCRIPTION));

// First use of the resource
assertCounterIncrement(InternalCounters.CONNECTOR_INSTANCE_INITIALIZATION_COUNT, 1);
assertCounterIncrement(InternalCounters.CONNECTOR_INSTANCE_INITIALIZATION_COUNT, 0); // MID-4779
assertSteadyResources();
}

Expand Down Expand Up @@ -397,8 +396,7 @@ public void test300AddRoleWimp() throws Exception {
display("Group @orange", dummyGroupAtOrange);
assertNoGroupMembers(dummyGroupAtOrange);

// First use of the resource
assertCounterIncrement(InternalCounters.CONNECTOR_INSTANCE_INITIALIZATION_COUNT, 1);
assertCounterIncrement(InternalCounters.CONNECTOR_INSTANCE_INITIALIZATION_COUNT, 0); // MID-4779
assertSteadyResources();
}

Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010-2017 Evolveum
* Copyright (c) 2010-2018 Evolveum
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -237,8 +237,7 @@ public void test099ModifyUserAddAccountFailing() throws Exception {
checkDummyTransportMessages("simpleUserNotifier-ADD", 0);
checkDummyTransportMessages("simpleUserNotifier-FAILURE", 1);

// Resource version changes due to availability status changes. Hence connector re-init.
assertCounterIncrement(InternalCounters.CONNECTOR_INSTANCE_INITIALIZATION_COUNT, 1);
assertCounterIncrement(InternalCounters.CONNECTOR_INSTANCE_INITIALIZATION_COUNT, 0); // MID-4779
assertSteadyResources();
}

Expand Down Expand Up @@ -1647,8 +1646,7 @@ public void test148ModifyUserJackUnassignAccountPositiveEnforcement() throws Exc
checkDummyTransportMessages("simpleUserNotifier-ADD", 0);

assertCounterIncrement(InternalCounters.SCRIPT_COMPILE_COUNT, 0);
// Resource version changes. Hence connector re-init.
assertCounterIncrement(InternalCounters.CONNECTOR_INSTANCE_INITIALIZATION_COUNT, 1);
assertCounterIncrement(InternalCounters.CONNECTOR_INSTANCE_INITIALIZATION_COUNT, 0); // MID-4779
assertSteadyResources();

// return resource to the previous state..delete assignment enforcement to prevent next test to fail..
Expand Down Expand Up @@ -1728,8 +1726,7 @@ public void test149ModifyUserJackDeleteAccount() throws Exception {
checkDummyTransportMessages("simpleUserNotifier-ADD", 0);

assertCounterIncrement(InternalCounters.SCRIPT_COMPILE_COUNT, 0);
// Resource version changes. Hence connector re-init.
assertCounterIncrement(InternalCounters.CONNECTOR_INSTANCE_INITIALIZATION_COUNT, 1);
assertCounterIncrement(InternalCounters.CONNECTOR_INSTANCE_INITIALIZATION_COUNT, 0); // MID-4779
assertSteadyResources();
}

Expand Down Expand Up @@ -3312,8 +3309,7 @@ public void test300AddUserJackWithAssignmentBlue() throws Exception {
dummyAuditService.assertTarget(USER_JACK_OID);
dummyAuditService.assertExecutionSuccess();

// Resource version changes. Hence connector re-init.
assertCounterIncrement(InternalCounters.CONNECTOR_INSTANCE_INITIALIZATION_COUNT, 1);
assertCounterIncrement(InternalCounters.CONNECTOR_INSTANCE_INITIALIZATION_COUNT, 0); // MID-4779
assertSteadyResources();
}

Expand Down

0 comments on commit b1026ce

Please sign in to comment.