Skip to content

Commit

Permalink
fix build (airbytehq#2608)
Browse files Browse the repository at this point in the history
  • Loading branch information
cgardens authored Mar 25, 2021
1 parent 4065815 commit e33b0c2
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class WorkspacesHandlerTest {
private StandardWorkspace workspace;
private WorkspacesHandler workspacesHandler;

@SuppressWarnings("unchecked")
@BeforeEach
void setUp() {
configRepository = mock(ConfigRepository.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;

attemptExecution = new TemporalAttemptExecution<>(workspaceRoot, JOB_RUN_CONFIG, execution, () -> "", mdcSetter, jobRootDirCreator,
final CheckedConsumer<Path, IOException> jobRootDirCreator = Files::createDirectories;

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);
Expand Down
16 changes: 8 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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')
}
}
}
Expand Down

0 comments on commit e33b0c2

Please sign in to comment.