Skip to content

Commit

Permalink
Fix the build
Browse files Browse the repository at this point in the history
  • Loading branch information
mederly committed Feb 27, 2023
1 parent bfd29c8 commit dfd6a11
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,14 @@ public String toString() {
}

/**
* Normally we should throw {@link CommonException} or {@link IOException} only. But {@link DummyTestResource} throws
* Normally we should throw {@link CommonException} only. But {@link DummyTestResource} throws
* all kinds of exceptions, hence {@link Exception} is declared here.
*/
public void init(AbstractIntegrationTest test, Task task, OperationResult result) throws Exception {
commonInit(test, task, result);
}

void commonInit(AbstractIntegrationTest test, Task task, OperationResult result) throws CommonException {
test.registerTestObjectUsed(this);
importObject(task, result);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,23 @@

package com.evolveum.midpoint.test;

import static com.evolveum.midpoint.schema.util.ReportParameterTypeUtil.addParameter;
import static com.evolveum.midpoint.schema.util.ReportParameterTypeUtil.addParameters;

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

import com.evolveum.midpoint.util.exception.SchemaException;

import com.evolveum.midpoint.util.exception.SystemException;

import org.assertj.core.util.Arrays;
import org.jetbrains.annotations.NotNull;

import com.evolveum.midpoint.schema.result.OperationResult;
import com.evolveum.midpoint.task.api.Task;
import com.evolveum.midpoint.util.annotation.Experimental;
import com.evolveum.midpoint.util.exception.CommonException;
import com.evolveum.midpoint.util.exception.SchemaException;
import com.evolveum.midpoint.xml.ns._public.common.common_3.*;

import static com.evolveum.midpoint.schema.util.ReportParameterTypeUtil.*;

/**
* A report that is to be used in tests.
*/
Expand Down Expand Up @@ -75,9 +73,8 @@ public static TestReport file(@NotNull File dir, @NotNull String name, String oi
*
* @param test To provide access to necessary functionality. Temporary!
*/
public void init(AbstractIntegrationTest test, Task task, OperationResult result)
throws Exception {
super.init(test, task, result);
public void init(AbstractIntegrationTest test, Task task, OperationResult result) throws CommonException {
commonInit(test, task, result);
this.test = test;
}

Expand Down Expand Up @@ -137,13 +134,7 @@ public Export withTaskCustomizer(ObjectCustomizer<TaskType> customizer) {
}

exportTask = TestTask.of(newTask, DEFAULT_TIMEOUT);
try {
exportTask.init(test, test.getTestTask(), result);
} catch (CommonException | IOException | RuntimeException e) {
throw e;
} catch (Exception e) {
throw SystemException.unexpected(e, "when initializing export task");
}
exportTask.init(test, test.getTestTask(), result);
exportTask.rerun(result);
exportTask.reload(result);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ public static TestTask file(@NotNull File dir, @NotNull String fileName, String
*
* @param test To provide access to necessary functionality. Temporary!
*/
public void init(AbstractIntegrationTest test, Task task, OperationResult result) throws Exception {
super.init(test, task, result);
public void init(AbstractIntegrationTest test, Task task, OperationResult result) throws CommonException {
commonInit(test, task, result);
this.test = test;
}

Expand Down

0 comments on commit dfd6a11

Please sign in to comment.