Skip to content

Commit

Permalink
Fixing (some) conntest
Browse files Browse the repository at this point in the history
  • Loading branch information
semancik committed Sep 5, 2018
1 parent 6ed8e1b commit 64510d3
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
Expand Up @@ -282,11 +282,15 @@ public void test151CountAllAccounts() throws Exception {
displayWhen(TEST_NAME);
Integer count = modelService.countObjects(ShadowType.class, query, null, task, result);

assertEquals("Wrong account count", (Integer)getNumberOfAllAccounts(), count);
assertCountAllAccounts(count);

assertLdapConnectorInstances(1, 2);
}

protected void assertCountAllAccounts(Integer count) {
assertEquals("Wrong account count", (Integer)getNumberOfAllAccounts(), count);
}

/**
* Blocksize is 100, so this is in one block.
*/
Expand Down
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2014-2017 Evolveum
* Copyright (c) 2014-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 @@ -31,7 +31,7 @@ public class TestOpenDj extends AbstractLdapConnTest {

private static final String OPENDJ_TEMPLATE_NAME = "opendj-4000.template";

private static final int INITIAL_SYNC_TOKEN = 23;
private static final int INITIAL_SYNC_TOKEN = 22;

@Override
protected String getResourceOid() {
Expand Down
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2016 Evolveum
* Copyright (c) 2016-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 All @@ -26,7 +26,7 @@
*/
public class TestOpenDjDumber extends TestOpenDj {

private static final int INITIAL_SYNC_TOKEN = 21;
private static final int INITIAL_SYNC_TOKEN = 20;

@Override
protected File getBaseDir() {
Expand Down
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2017 Evolveum
* Copyright (c) 2017-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 All @@ -15,6 +15,7 @@
*/
package com.evolveum.midpoint.testing.conntest;

import static org.testng.AssertJUnit.assertEquals;
import static org.testng.AssertJUnit.assertNotNull;
import static org.testng.AssertJUnit.assertNull;

Expand Down Expand Up @@ -60,5 +61,11 @@ protected boolean hasAssociationShortcut() {
protected boolean isUsingGroupShortcutAttribute() {
return false;
}

// This is a dumb resource. It cannot count.
@Override
protected void assertCountAllAccounts(Integer count) {
assertEquals("Wrong account count", (Integer)null, count);
}

}

0 comments on commit 64510d3

Please sign in to comment.