Skip to content

Commit

Permalink
Tuning the test.
Browse files Browse the repository at this point in the history
  • Loading branch information
mederly committed Dec 5, 2014
1 parent dc90bd5 commit a3135af
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Expand Up @@ -17,13 +17,15 @@
package com.evolveum.midpoint.testing.longtest;


import com.evolveum.midpoint.common.InternalsConfig;
import com.evolveum.midpoint.common.LoggingConfigurationManager;
import com.evolveum.midpoint.common.ProfilingConfigurationManager;
import com.evolveum.midpoint.model.impl.sync.ReconciliationTaskHandler;
import com.evolveum.midpoint.model.test.AbstractModelIntegrationTest;
import com.evolveum.midpoint.prism.PrismObject;
import com.evolveum.midpoint.prism.polystring.PolyString;
import com.evolveum.midpoint.schema.constants.MidPointConstants;
import com.evolveum.midpoint.schema.constants.SchemaConstants;
import com.evolveum.midpoint.schema.result.OperationResult;
import com.evolveum.midpoint.task.api.Task;
import com.evolveum.midpoint.test.util.MidPointTestConstants;
Expand Down Expand Up @@ -86,7 +88,7 @@ public class TestLdapUniversity extends AbstractModelIntegrationTest {
protected static final String RESOURCE_OPENDJ_NAMESPACE = MidPointConstants.NS_RI;

// Make it at least 1501 so it will go over the 3000 entries size limit
private static final int NUM_LDAP_ENTRIES = 100;
private static final int NUM_LDAP_ENTRIES = 900;

private static final String LDAP_GROUP_PIRATES_DN = "cn=Pirates,ou=groups,dc=example,dc=com";

Expand Down Expand Up @@ -146,18 +148,20 @@ public void test100BigImportWithLinking() throws Exception {

// GIVEN

InternalsConfig.turnOffAllChecks();

Task task = taskManager.createTaskInstance(TestLdapUniversity.class.getName() + "." + TEST_NAME);
task.setOwner(getUser(USER_ADMINISTRATOR_OID));
OperationResult result = task.getResult();

loadEntries("u");
createUsers("u", result);
createUsers("u", new OperationResult("createUsers")); // we do not want to have all this in the task's result

display("e0", findUserByUsername("e0"));

// WHEN
TestUtil.displayWhen(TEST_NAME);
//task.setExtensionPropertyValue(SchemaConstants.MODEL_EXTENSION_WORKER_THREADS, 2);
//task.setExtensionPropertyValue(SchemaConstants.MODEL_EXTENSION_WORKER_THREADS, 5);
modelService.importFromResource(RESOURCE_OPENDJ_OID,
new QName(RESOURCE_OPENDJ_NAMESPACE, "AccountObjectClass"), task, result);

Expand All @@ -166,7 +170,7 @@ public void test100BigImportWithLinking() throws Exception {
OperationResult subresult = result.getLastSubresult();
TestUtil.assertInProgress("importAccountsFromResource result", subresult);

waitForTaskFinish(task, true, 20000 + NUM_LDAP_ENTRIES*2000, 6000L);
waitForTaskFinish(task, true, 20000 + NUM_LDAP_ENTRIES*2000, 10000L);

// THEN
TestUtil.displayThen(TEST_NAME);
Expand Down
Expand Up @@ -369,7 +369,7 @@
</expression>
</outbound>-->
<inbound>

<strength>weak</strength>
<expression>
<generate/>
</expression>
Expand Down

0 comments on commit a3135af

Please sign in to comment.