Skip to content

Commit

Permalink
TestAsyncUpdate*: move of resource file constants to subclasses
Browse files Browse the repository at this point in the history
  • Loading branch information
virgo47 committed Jun 11, 2020
1 parent e25e649 commit 08a5436
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 25 deletions.
Expand Up @@ -62,10 +62,6 @@ public abstract class TestAsyncUpdate extends AbstractProvisioningIntegrationTes

protected static final File TEST_DIR = new File("src/test/resources/async/");

static final File RESOURCE_ASYNC_CACHING_FILE = new File(TEST_DIR, "resource-async-caching.xml");
static final File RESOURCE_ASYNC_CACHING_INDEX_ONLY_FILE = new File(TEST_DIR, "resource-async-caching-index-only.xml");
static final File RESOURCE_ASYNC_NO_CACHING_FILE = new File(TEST_DIR, "resource-async-no-caching.xml");
static final File RESOURCE_ASYNC_CACHING_AMQP_FILE = new File(TEST_DIR, "resource-async-caching-amqp.xml");
private static final String RESOURCE_ASYNC_OID = "fb04d113-ebf8-41b4-b13b-990a597d110b";

private static final File CHANGE_100 = new File(TEST_DIR, "change-100-banderson-first-occurrence.xml");
Expand Down Expand Up @@ -135,8 +131,8 @@ public void test003Connection() throws Exception {
OperationResult result = getTestOperationResult();

// Check that there is a schema, but no capabilities before test (pre-condition)
ResourceType resourceBefore = repositoryService.getObject(ResourceType.class, RESOURCE_ASYNC_OID,
null, result).asObjectable();
ResourceType resourceBefore = repositoryService.getObject(
ResourceType.class, RESOURCE_ASYNC_OID, null, result).asObjectable();

ResourceTypeUtil.getResourceXsdSchema(resourceBefore);

Expand Down
Expand Up @@ -7,18 +7,17 @@

package com.evolveum.midpoint.provisioning.impl.async;

import org.jetbrains.annotations.NotNull;
import static java.util.Collections.singletonList;

import java.io.File;
import java.util.List;

import static java.util.Collections.singletonList;
import org.jetbrains.annotations.NotNull;

/**
*
*/
public class TestAsyncUpdateCaching extends TestAsyncUpdate {

static final File RESOURCE_ASYNC_CACHING_FILE = new File(TEST_DIR, "resource-async-caching.xml");

@Override
protected File getResourceFile() {
return RESOURCE_ASYNC_CACHING_FILE;
Expand Down
Expand Up @@ -21,15 +21,14 @@
import java.util.Map;
import java.util.concurrent.TimeoutException;

/**
*
*/
public class TestAsyncUpdateCachingAmqp extends TestAsyncUpdateCaching {

private final EmbeddedBroker embeddedBroker = new EmbeddedBroker();
private static final File RESOURCE_ASYNC_CACHING_AMQP_FILE = new File(TEST_DIR, "resource-async-caching-amqp.xml");

private static final String QUEUE_NAME = "testQueue";

private final EmbeddedBroker embeddedBroker = new EmbeddedBroker();

@Override
public void initSystem(Task initTask, OperationResult initResult) throws Exception {
super.initSystem(initTask, initResult);
Expand Down
Expand Up @@ -7,19 +7,20 @@

package com.evolveum.midpoint.provisioning.impl.async;

import com.evolveum.midpoint.repo.sql.SqlRepositoryServiceImpl;
import com.evolveum.midpoint.schema.result.OperationResult;
import com.evolveum.midpoint.task.api.Task;
import java.io.File;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;

import java.io.File;
import com.evolveum.midpoint.repo.sql.SqlRepositoryServiceImpl;
import com.evolveum.midpoint.schema.result.OperationResult;
import com.evolveum.midpoint.task.api.Task;

/**
*
*/
public class TestAsyncUpdateCachingIndexOnly extends TestAsyncUpdateCaching {

static final File RESOURCE_ASYNC_CACHING_INDEX_ONLY_FILE =
new File(TEST_DIR, "resource-async-caching-index-only.xml");

@Autowired
@Qualifier("sqlRepositoryServiceImpl")
private SqlRepositoryServiceImpl sqlRepositoryService;
Expand Down
Expand Up @@ -20,11 +20,10 @@
import java.util.Arrays;
import java.util.List;

/**
*
*/
public class TestAsyncUpdateNoCaching extends TestAsyncUpdate {

static final File RESOURCE_ASYNC_NO_CACHING_FILE = new File(TEST_DIR, "resource-async-no-caching.xml");

protected static DummyResource dummyResource;
protected static DummyResourceContoller dummyResourceCtl;

Expand Down

0 comments on commit 08a5436

Please sign in to comment.