fix build (#2608)
This commit is contained in:
@@ -62,6 +62,7 @@ class WorkspacesHandlerTest {
|
||||
private StandardWorkspace workspace;
|
||||
private WorkspacesHandler workspacesHandler;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@BeforeEach
|
||||
void setUp() {
|
||||
configRepository = mock(ConfigRepository.class);
|
||||
|
||||
@@ -55,7 +55,6 @@ class TemporalAttemptExecutionTest {
|
||||
|
||||
private CheckedSupplier<Worker<String, String>, Exception> execution;
|
||||
private BiConsumer<Path, String> mdcSetter;
|
||||
private CheckedConsumer<Path, IOException> jobRootDirCreator;
|
||||
|
||||
private TemporalAttemptExecution<String, String> attemptExecution;
|
||||
|
||||
@@ -64,20 +63,25 @@ class TemporalAttemptExecutionTest {
|
||||
void setup() throws IOException {
|
||||
final Path workspaceRoot = Files.createTempDirectory(Path.of("/tmp"), "temporal_attempt_execution_test");
|
||||
jobRoot = workspaceRoot.resolve(JOB_ID).resolve(String.valueOf(ATTEMPT_ID));
|
||||
jobRoot = workspaceRoot.resolve(String.valueOf(JOB_ID)).resolve(String.valueOf(ATTEMPT_ID));
|
||||
|
||||
execution = mock(CheckedSupplier.class);
|
||||
mdcSetter = mock(BiConsumer.class);
|
||||
jobRootDirCreator = Files::createDirectories;
|
||||
final CheckedConsumer<Path, IOException> jobRootDirCreator = Files::createDirectories;
|
||||
|
||||
attemptExecution = new TemporalAttemptExecution<>(workspaceRoot, JOB_RUN_CONFIG, execution, () -> "", mdcSetter, jobRootDirCreator,
|
||||
attemptExecution = new TemporalAttemptExecution<>(
|
||||
workspaceRoot,
|
||||
JOB_RUN_CONFIG, execution,
|
||||
() -> "",
|
||||
mdcSetter,
|
||||
jobRootDirCreator,
|
||||
mock(CancellationHandler.class), () -> "workflow_id");
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Test
|
||||
void testSuccessfulSupplierRun() throws Exception {
|
||||
final String expected = "louis XVI";
|
||||
Worker<String, String> worker = mock(Worker.class);
|
||||
final Worker<String, String> worker = mock(Worker.class);
|
||||
when(worker.run(any(), any())).thenReturn(expected);
|
||||
|
||||
when(execution.get()).thenAnswer((Answer<Worker<String, String>>) invocation -> worker);
|
||||
|
||||
16
build.gradle
16
build.gradle
@@ -99,16 +99,16 @@ allprojects {
|
||||
|
||||
afterEvaluate { project ->
|
||||
def composeDeps = [
|
||||
"airbyte-config:init",
|
||||
"airbyte-db",
|
||||
"airbyte-migration",
|
||||
"airbyte-scheduler:app",
|
||||
"airbyte-server",
|
||||
"airbyte-webapp",
|
||||
":airbyte-config:init",
|
||||
":airbyte-db",
|
||||
":airbyte-migration",
|
||||
":airbyte-scheduler:app",
|
||||
":airbyte-server",
|
||||
":airbyte-webapp",
|
||||
].toSet().asImmutable()
|
||||
|
||||
if (project.name in composeDeps) {
|
||||
composeBuild.dependsOn(project.tasks.assemble)
|
||||
if (project.getPath() in composeDeps) {
|
||||
composeBuild.dependsOn(project.getPath() + ':assemble')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user