From d9a26b76bda48dc49ffec43ffc3fcf3b19f11732 Mon Sep 17 00:00:00 2001 From: Pavol Mederly Date: Fri, 29 Mar 2019 14:18:06 +0100 Subject: [PATCH 1/2] Add test for parallel reconciliation (MID-5237) --- .../sync/TestParallelSynchronization.java | 267 ++++++++++++++++++ .../sync/resource-dummy-steelblue.xml | 203 +++++++++++++ ...k-import-dummy-steelblue-multithreaded.xml | 41 +++ ...econcile-dummy-steelblue-multithreaded.xml | 41 +++ ...-reconcile-dummy-steelblue-partitioned.xml | 91 ++++++ .../impl/EntitlementConverter.java | 11 +- .../provisioning/impl/ShadowCache.java | 4 +- .../connid/ConnectorInstanceConnIdImpl.java | 3 +- .../midpoint/test/DummyResourceContoller.java | 3 +- .../midpoint/test/IntegrationTestTools.java | 4 +- 10 files changed, 652 insertions(+), 16 deletions(-) create mode 100644 model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/sync/TestParallelSynchronization.java create mode 100644 model/model-intest/src/test/resources/sync/resource-dummy-steelblue.xml create mode 100644 model/model-intest/src/test/resources/sync/task-import-dummy-steelblue-multithreaded.xml create mode 100644 model/model-intest/src/test/resources/sync/task-reconcile-dummy-steelblue-multithreaded.xml create mode 100644 model/model-intest/src/test/resources/sync/task-reconcile-dummy-steelblue-partitioned.xml diff --git a/model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/sync/TestParallelSynchronization.java b/model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/sync/TestParallelSynchronization.java new file mode 100644 index 00000000000..0261c1dbf0b --- /dev/null +++ b/model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/sync/TestParallelSynchronization.java @@ -0,0 +1,267 @@ +/* + * Copyright (c) 2010-2019 Evolveum + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.evolveum.midpoint.model.intest.sync; + +import com.evolveum.icf.dummy.resource.DummyGroup; +import com.evolveum.icf.dummy.resource.DummyResource; +import com.evolveum.midpoint.common.refinery.RefinedResourceSchema; +import com.evolveum.midpoint.common.refinery.RefinedResourceSchemaImpl; +import com.evolveum.midpoint.model.intest.AbstractInitializedModelIntegrationTest; +import com.evolveum.midpoint.prism.PrismObject; +import com.evolveum.midpoint.prism.query.ObjectQuery; +import com.evolveum.midpoint.schema.SearchResultList; +import com.evolveum.midpoint.schema.internals.InternalCounters; +import com.evolveum.midpoint.schema.internals.InternalMonitor; +import com.evolveum.midpoint.schema.internals.InternalOperationClasses; +import com.evolveum.midpoint.schema.processor.ResourceSchema; +import com.evolveum.midpoint.schema.result.OperationResult; +import com.evolveum.midpoint.task.api.Task; +import com.evolveum.midpoint.test.DummyResourceContoller; +import com.evolveum.midpoint.test.util.TestUtil; +import com.evolveum.midpoint.xml.ns._public.common.common_3.AssignmentPolicyEnforcementType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.ResourceType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.UserType; +import org.springframework.test.annotation.DirtiesContext; +import org.springframework.test.annotation.DirtiesContext.ClassMode; +import org.springframework.test.context.ContextConfiguration; +import org.testng.annotations.Test; + +import java.io.File; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; + +import static org.testng.AssertJUnit.assertEquals; + +/** + * Tests the parallel import/reconciliation of accounts with entitlements. + * + * Do not use in regular tests (for now). + * + * See MID-5237. + * + */ +@ContextConfiguration(locations = {"classpath:ctx-model-intest-test-main.xml"}) +@DirtiesContext(classMode = ClassMode.AFTER_CLASS) +public class TestParallelSynchronization extends AbstractInitializedModelIntegrationTest { + + // --- START of test configuration --- + private static final SyncKind KIND = SyncKind.RECONCILIATION; + private static final Distribution DISTRIBUTION = Distribution.PARTITIONED; + // --- END of test configuration --- + + private static final File TEST_DIR = new File("src/test/resources/sync"); + + private static final File RESOURCE_DUMMY_STEELBLUE_FILE = new File(TEST_DIR, "resource-dummy-steelblue.xml"); + private static final String RESOURCE_DUMMY_STEELBLUE_OID = "8d97261a-ef5e-4199-9700-670577441c7f"; + private static final String RESOURCE_DUMMY_STEELBLUE_NAME = "steelblue"; + + private static final File TASK_IMPORT_DUMMY_STEELBLUE_MULTITHREADED_FILE = new File(TEST_DIR, "task-import-dummy-steelblue-multithreaded.xml"); + private static final String TASK_IMPORT_DUMMY_STEELBLUE_MULTITHREADED_OID = "d553eec5-0e03-4efd-80ba-18e6715c26aa"; + + private static final File TASK_RECONCILE_DUMMY_STEELBLUE_MULTITHREADED_FILE = new File(TEST_DIR, "task-reconcile-dummy-steelblue-multithreaded.xml"); + private static final String TASK_RECONCILE_DUMMY_STEELBLUE_MULTITHREADED_OID = "c1351099-eabf-4ca3-b157-9a7b6c16b960"; + + private static final File TASK_RECONCILE_DUMMY_STEELBLUE_PARTITIONED_FILE = new File(TEST_DIR, "task-reconcile-dummy-steelblue-partitioned.xml"); + private static final String TASK_RECONCILE_DUMMY_STEELBLUE_PARTITIONED_OID = "0e1f67e2-45b3-4fd9-b193-e1a5fea1d315"; + + private DummyResource dummyResourceSteelBlue; + private DummyResourceContoller dummyResourceCtlSteelBlue; + private ResourceType resourceDummySteelBlueType; + private PrismObject resourceDummySteelBlue; + + private static final int NUMBER_OF_GROUPS = 1000; + @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") + private final List groupNames = new ArrayList<>(); + + private static final int NUMBER_OF_USERS = 100; + private final List userNames = new ArrayList<>(); + + private static final double GROUP_ASSIGNMENT_PROBABILITY = 0.1; + + enum SyncKind { IMPORT, RECONCILIATION } + enum Distribution { MULTITHREADED, PARTITIONED } + + private String getSyncTaskOid() { + if (KIND == SyncKind.IMPORT) { + if (DISTRIBUTION == Distribution.MULTITHREADED) { + return TASK_IMPORT_DUMMY_STEELBLUE_MULTITHREADED_OID; + } else { + throw new AssertionError("unsupported"); + } + } else { + if (DISTRIBUTION == Distribution.MULTITHREADED) { + return TASK_RECONCILE_DUMMY_STEELBLUE_MULTITHREADED_OID; + } else { + return TASK_RECONCILE_DUMMY_STEELBLUE_PARTITIONED_OID; + } + } + } + + private File getSyncTaskFile() { + if (KIND == SyncKind.IMPORT) { + if (DISTRIBUTION == Distribution.MULTITHREADED) { + return TASK_IMPORT_DUMMY_STEELBLUE_MULTITHREADED_FILE; + } else { + throw new AssertionError("unsupported"); + } + } else { + if (DISTRIBUTION == Distribution.MULTITHREADED) { + return TASK_RECONCILE_DUMMY_STEELBLUE_MULTITHREADED_FILE; + } else { + return TASK_RECONCILE_DUMMY_STEELBLUE_PARTITIONED_FILE; + } + } + } + + @Override + public void initSystem(Task initTask, OperationResult initResult) throws Exception { + super.initSystem(initTask, initResult); + + dummyResourceCtlSteelBlue = DummyResourceContoller.create(RESOURCE_DUMMY_STEELBLUE_NAME, resourceDummySteelBlue); + dummyResourceCtlSteelBlue.extendSchemaPirate(); + dummyResourceSteelBlue = dummyResourceCtlSteelBlue.getDummyResource(); + resourceDummySteelBlue = importAndGetObjectFromFile(ResourceType.class, RESOURCE_DUMMY_STEELBLUE_FILE, RESOURCE_DUMMY_STEELBLUE_OID, initTask, initResult); + resourceDummySteelBlueType = resourceDummySteelBlue.asObjectable(); + dummyResourceCtlSteelBlue.setResource(resourceDummySteelBlue); + + for (int i = 0; i < NUMBER_OF_USERS; i++) { + String userName = String.format("user%06d", i); + dummyResourceCtlSteelBlue.addAccount(userName); + userNames.add(userName); + } + + for (int i = 0; i < NUMBER_OF_GROUPS; i++) { + String groupName = String.format("group%06d", i); + DummyGroup group = dummyResourceCtlSteelBlue.addGroup(groupName); + for (String name : userNames) { + if (Math.random() < GROUP_ASSIGNMENT_PROBABILITY) { + group.addMember(name); + } + } + groupNames.add(groupName); + } + + InternalMonitor.reset(); + InternalMonitor.setTrace(InternalOperationClasses.SHADOW_FETCH_OPERATIONS, true); + } + + @Override + protected int getNumberOfUsers() { + return super.getNumberOfUsers() + NUMBER_OF_USERS; + } + + protected PrismObject getDefaultActor() { + return userAdministrator; + } + + @Test + public void test001SanityAzure() throws Exception { + final String TEST_NAME = "test001SanityAzure"; + displayTestTitle(TEST_NAME); + + display("Dummy resource azure", dummyResourceSteelBlue); + + // WHEN + ResourceSchema resourceSchemaAzure = RefinedResourceSchemaImpl.getResourceSchema(resourceDummySteelBlueType, prismContext); + + display("Dummy azure resource schema", resourceSchemaAzure); + + // THEN + dummyResourceCtlSteelBlue.assertDummyResourceSchemaSanityExtended(resourceSchemaAzure); + } + + @Test + public void test002SanityAzureRefined() throws Exception { + final String TEST_NAME = "test002SanityAzureRefined"; + displayTestTitle(TEST_NAME); + + // WHEN + RefinedResourceSchema refinedSchemaAzure = RefinedResourceSchemaImpl.getRefinedSchema(resourceDummySteelBlueType, prismContext); + + display("Dummy azure refined schema", refinedSchemaAzure); + + // THEN + dummyResourceCtlSteelBlue.assertRefinedSchemaSanity(refinedSchemaAzure); + } + + @Test + public void test100Synchronize() throws Exception { + final String TEST_NAME = "test100Synchronize"; + displayTestTitle(TEST_NAME); + + // GIVEN + Task task = createTask(TEST_NAME); + OperationResult result = task.getResult(); + assumeAssignmentPolicy(AssignmentPolicyEnforcementType.RELATIVE); + + // Preconditions + List> usersBefore = modelService.searchObjects(UserType.class, null, null, task, result); + display("Users before", usersBefore); + ObjectQuery onSteelBlueQuery = prismContext.queryFor(ShadowType.class) + .item(ShadowType.F_RESOURCE_REF).ref(RESOURCE_DUMMY_STEELBLUE_OID) + .build(); + SearchResultList> shadowsBefore = repositoryService.searchObjects(ShadowType.class, onSteelBlueQuery, null, result); + display("Shadows before", shadowsBefore); + + loginAdministrator(); + + dummyAuditService.clear(); + rememberCounter(InternalCounters.SHADOW_FETCH_OPERATION_COUNT); + + // WHEN + displayWhen(TEST_NAME); + addObject(getSyncTaskFile(), task, result); + + // THEN + displayThen(TEST_NAME); + + if (DISTRIBUTION == Distribution.MULTITHREADED) { + waitForTaskFinish(getSyncTaskOid(), true, 600000); + } else { + waitForTaskTreeNextFinishedRun(getSyncTaskOid(), 600000); + } + + // THEN + displayThen(TEST_NAME); + result.computeStatus(); + TestUtil.assertSuccess(result); + + List> usersAfter = modelService.searchObjects(UserType.class, null, null, task, result); + display("Users after", usersAfter); + SearchResultList> shadowsAfter = repositoryService.searchObjects(ShadowType.class, onSteelBlueQuery, null, result); + display("Shadows after", shadowsAfter); + + List shadowNames = shadowsAfter.stream().map(o -> o.getName().getOrig()).collect(Collectors.toList()); + Set uniqueNames = new HashSet<>(); + List duplicateNames = shadowNames.stream() + .filter(e -> !uniqueNames.add(e)) + .collect(Collectors.toList()); + System.out.println("Shadow names: " + shadowNames.size()); + System.out.println("Unique shadow names: " + uniqueNames.size()); + System.out.println("Duplicate names: " + duplicateNames); + assertEquals("Duplicate names: " + duplicateNames, 0, duplicateNames.size()); + + PrismObject account0 = shadowsAfter.stream() + .filter(o -> o.asObjectable().getName().getOrig().equals(userNames.get(0))).findFirst().orElseThrow(AssertionError::new); + PrismObject shadow = modelService.getObject(ShadowType.class, account0.getOid(), null, task, result); + display("user0 shadow", shadow); + } + +} diff --git a/model/model-intest/src/test/resources/sync/resource-dummy-steelblue.xml b/model/model-intest/src/test/resources/sync/resource-dummy-steelblue.xml new file mode 100644 index 00000000000..33aa9415362 --- /dev/null +++ b/model/model-intest/src/test/resources/sync/resource-dummy-steelblue.xml @@ -0,0 +1,203 @@ + + + + + + + + Dummy Resource SteelBlue + + + + + connectorType + com.evolveum.icf.dummy.connector.DummyConnector + + + connectorVersion + 2.0 + + + + + + + + steelblue + + + false + + + + + + + + account + default + Default Account + true + ri:AccountObjectClass + + icfs:name + Username + + + name + + + + + icfs:uid + UID + + + ri:group + entitlement + group + objectToSubject + ri:members + icfs:name + + + 5 + + + + + entitlement + group + true + ri:GroupObjectClass + + icfs:name + + + name + + + + + ri:members + minimal + + + + + + + + true + ri:AccountObjectClass + account + default + + + c:name + + + + + + + linked + true + + + deleted + true + + http://midpoint.evolveum.com/xml/ns/public/model/action-3#unlink + + + + unlinked + true + + http://midpoint.evolveum.com/xml/ns/public/model/action-3#link + + + + unmatched + true + + http://midpoint.evolveum.com/xml/ns/public/model/action-3#addFocus + + + + + true + ri:GroupObjectClass + entitlement + group + RoleType + + + c:name + + + + + + + linked + true + + + deleted + true + + http://midpoint.evolveum.com/xml/ns/public/model/action-3#unlink + + + + unlinked + true + + http://midpoint.evolveum.com/xml/ns/public/model/action-3#link + + + + unmatched + true + + http://midpoint.evolveum.com/xml/ns/public/model/action-3#addFocus + + + + + + diff --git a/model/model-intest/src/test/resources/sync/task-import-dummy-steelblue-multithreaded.xml b/model/model-intest/src/test/resources/sync/task-import-dummy-steelblue-multithreaded.xml new file mode 100644 index 00000000000..c89cd9251d8 --- /dev/null +++ b/model/model-intest/src/test/resources/sync/task-import-dummy-steelblue-multithreaded.xml @@ -0,0 +1,41 @@ + + + + + + Import: Dummy SteelBlue + + + account + default + ri:AccountObjectClass + 6 + + + d553eec5-0e03-4efd-80ba-18e6715c26aa + + runnable + + http://midpoint.evolveum.com/xml/ns/public/model/synchronization/task/import/handler-3 + + single + diff --git a/model/model-intest/src/test/resources/sync/task-reconcile-dummy-steelblue-multithreaded.xml b/model/model-intest/src/test/resources/sync/task-reconcile-dummy-steelblue-multithreaded.xml new file mode 100644 index 00000000000..5a56a2f2e07 --- /dev/null +++ b/model/model-intest/src/test/resources/sync/task-reconcile-dummy-steelblue-multithreaded.xml @@ -0,0 +1,41 @@ + + + + + + Reconcile: Dummy SteelBlue + + + account + default + ri:AccountObjectClass + 6 + + + c1351099-eabf-4ca3-b157-9a7b6c16b960 + + runnable + + http://midpoint.evolveum.com/xml/ns/public/model/synchronization/task/reconciliation/handler-3 + + single + diff --git a/model/model-intest/src/test/resources/sync/task-reconcile-dummy-steelblue-partitioned.xml b/model/model-intest/src/test/resources/sync/task-reconcile-dummy-steelblue-partitioned.xml new file mode 100644 index 00000000000..074ee7d4d46 --- /dev/null +++ b/model/model-intest/src/test/resources/sync/task-reconcile-dummy-steelblue-partitioned.xml @@ -0,0 +1,91 @@ + + + + + + Reconcile: Dummy SteelBlue + + + account + default + ri:AccountObjectClass + + + + 0e1f67e2-45b3-4fd9-b193-e1a5fea1d315 + + runnable + + http://midpoint.evolveum.com/xml/ns/public/model/synchronization/task/partitioned-reconciliation/handler-3 + + + + + 2 + + coordinator + + + attributes/name + + user00000 + + + user00001 + + + user00002 + + + user00003 + + + user00004 + + + user00005 + + + user00006 + + + user00007 + + + user00008 + + + user00009 + + + + + + 10 + + + + + + + single + diff --git a/provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/EntitlementConverter.java b/provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/EntitlementConverter.java index 9fe9e924a26..08fbdfe339b 100644 --- a/provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/EntitlementConverter.java +++ b/provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/EntitlementConverter.java @@ -76,14 +76,9 @@ class EntitlementConverter { private static final Trace LOGGER = TraceManager.getTrace(EntitlementConverter.class); - @Autowired(required=true) - private ResourceObjectReferenceResolver resourceObjectReferenceResolver; - - @Autowired(required=true) - private PrismContext prismContext; - - @Autowired(required = true) - private MatchingRuleRegistry matchingRuleRegistry; + @Autowired private ResourceObjectReferenceResolver resourceObjectReferenceResolver; + @Autowired private PrismContext prismContext; + @Autowired private MatchingRuleRegistry matchingRuleRegistry; ////////// // GET diff --git a/provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/ShadowCache.java b/provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/ShadowCache.java index 26d82a8252f..4f130c45b10 100644 --- a/provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/ShadowCache.java +++ b/provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/ShadowCache.java @@ -294,9 +294,7 @@ PrismObject getShadow(String oid, PrismObject repository } } - if (LOGGER.isTraceEnabled()) { - LOGGER.trace("Shadow returned by ResouceObjectConverter:\n{}", resourceShadow.debugDump(1)); - } + LOGGER.trace("Shadow returned by ResourceObjectConverter:\n{}", resourceShadow.debugDumpLazily(1)); // Resource shadow may have different auxiliary object classes than // the original repo shadow. Make sure we have the definition that diff --git a/provisioning/ucf-impl-connid/src/main/java/com/evolveum/midpoint/provisioning/ucf/impl/connid/ConnectorInstanceConnIdImpl.java b/provisioning/ucf-impl-connid/src/main/java/com/evolveum/midpoint/provisioning/ucf/impl/connid/ConnectorInstanceConnIdImpl.java index 6ebe207ae01..da30d4683e1 100644 --- a/provisioning/ucf-impl-connid/src/main/java/com/evolveum/midpoint/provisioning/ucf/impl/connid/ConnectorInstanceConnIdImpl.java +++ b/provisioning/ucf-impl-connid/src/main/java/com/evolveum/midpoint/provisioning/ucf/impl/connid/ConnectorInstanceConnIdImpl.java @@ -1843,8 +1843,7 @@ public SearchResultMetadata search(final ObjectClassComplexTypeDefinition object ResultsHandler connIdHandler = new ResultsHandler() { @Override public boolean handle(ConnectorObject connectorObject) { - // Convert ConnId-specific connector object to a generic - // ResourceObject + // Convert ConnId-specific connector object to a generic ResourceObject recordIcfOperationSuspend(reporter, ProvisioningOperation.ICF_SEARCH, objectClassDefinition); int count = countHolder.getValue(); countHolder.setValue(count+1); diff --git a/repo/repo-test-util/src/main/java/com/evolveum/midpoint/test/DummyResourceContoller.java b/repo/repo-test-util/src/main/java/com/evolveum/midpoint/test/DummyResourceContoller.java index 83c2db0cb92..53eb0078c09 100644 --- a/repo/repo-test-util/src/main/java/com/evolveum/midpoint/test/DummyResourceContoller.java +++ b/repo/repo-test-util/src/main/java/com/evolveum/midpoint/test/DummyResourceContoller.java @@ -433,11 +433,12 @@ public void addAccount(String userId, String fullName, String location) throws O dummyResource.addAccount(account); } - public void addGroup(String name) throws ObjectAlreadyExistsException, SchemaViolationException, ConnectException, FileNotFoundException, ConflictException, InterruptedException { + public DummyGroup addGroup(String name) throws ObjectAlreadyExistsException, SchemaViolationException, ConnectException, FileNotFoundException, ConflictException, InterruptedException { assertExtendedSchema(); DummyGroup group = new DummyGroup(name); group.setEnabled(true); dummyResource.addGroup(group); + return group; } public void deleteAccount(String name) throws ConnectException, FileNotFoundException, ObjectDoesNotExistException, SchemaViolationException, ConflictException, InterruptedException { diff --git a/repo/repo-test-util/src/main/java/com/evolveum/midpoint/test/IntegrationTestTools.java b/repo/repo-test-util/src/main/java/com/evolveum/midpoint/test/IntegrationTestTools.java index 3bdd34242a9..6f2715ae3c7 100644 --- a/repo/repo-test-util/src/main/java/com/evolveum/midpoint/test/IntegrationTestTools.java +++ b/repo/repo-test-util/src/main/java/com/evolveum/midpoint/test/IntegrationTestTools.java @@ -452,8 +452,8 @@ public static void display(String message, ObjectType o) { public static void display(String message, Collection collection) { String dump = DebugUtil.dump(collection); - System.out.println(OBJECT_TITLE_OUT_PREFIX + message + "\n" + dump); - LOGGER.debug(OBJECT_TITLE_LOG_PREFIX + message + "\n" + dump); + System.out.println(OBJECT_TITLE_OUT_PREFIX + message + " (" + collection.size() + ")\n" + dump); + LOGGER.debug(OBJECT_TITLE_LOG_PREFIX + message + " (" + collection.size() + ")\n" + dump); } public static void display(String title, Entry entry) { From 624e25c69f2b59f2fef2b1b3b7117b54aee664d8 Mon Sep 17 00:00:00 2001 From: kate Date: Fri, 29 Mar 2019 16:24:14 +0100 Subject: [PATCH 2/2] attempt to fix schrodinger test --- .../midpoint/schrodinger/component/common/PrismForm.java | 2 +- .../midpoint/schrodinger/page/resource/ViewResourcePage.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/schrodinger/src/main/java/com/evolveum/midpoint/schrodinger/component/common/PrismForm.java b/tools/schrodinger/src/main/java/com/evolveum/midpoint/schrodinger/component/common/PrismForm.java index 4923be9631c..34593b313fa 100644 --- a/tools/schrodinger/src/main/java/com/evolveum/midpoint/schrodinger/component/common/PrismForm.java +++ b/tools/schrodinger/src/main/java/com/evolveum/midpoint/schrodinger/component/common/PrismForm.java @@ -79,7 +79,7 @@ public PrismForm changeAttributeValue(String name, String oldValue, String ne ElementsCollection values = property.$$(By.className("prism-property-value")); if (values.size() == 1) { - values.first().$(By.className("form-control")).waitUntil(Condition.appears,MidPoint.TIMEOUT_DEFAULT_2_S).setValue(newValue); + values.first().$(By.className("form-control")).waitUntil(Condition.appears,MidPoint.TIMEOUT_MEDIUM_6_S).setValue(newValue); } // todo implement diff --git a/tools/schrodinger/src/main/java/com/evolveum/midpoint/schrodinger/page/resource/ViewResourcePage.java b/tools/schrodinger/src/main/java/com/evolveum/midpoint/schrodinger/page/resource/ViewResourcePage.java index 4da7ae9913f..d5c6bacecc5 100644 --- a/tools/schrodinger/src/main/java/com/evolveum/midpoint/schrodinger/page/resource/ViewResourcePage.java +++ b/tools/schrodinger/src/main/java/com/evolveum/midpoint/schrodinger/page/resource/ViewResourcePage.java @@ -21,7 +21,7 @@ public ResourceConfigurationTab clickEditResourceConfiguration() { $(Schrodinger.byDataResourceKey("a", "pageResource.button.configurationEdit")).waitUntil(Condition.appears, MidPoint.TIMEOUT_DEFAULT_2_S).click(); SelenideElement element= $(By.cssSelector(".tab-pane.active")) - .waitUntil(Condition.visible, MidPoint.TIMEOUT_MEDIUM_6_S); + .waitUntil(Condition.visible, MidPoint.TIMEOUT_LONG_1_M); return new ResourceConfigurationTab(new EditResourceConfigurationPage(), element); }