Skip to content

Commit

Permalink
remove usage of flag
Browse files Browse the repository at this point in the history
  • Loading branch information
Yavor16 authored and Yavor16 committed Apr 17, 2024
1 parent b207b1e commit 3816c71
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ private CloudApplication getApplication(ProcessContext context, String appToPoll
}

private StartupStatus getStartupStatus(ProcessContext context, String appName, List<InstanceInfo> appInstances) {
boolean failOnCrashed = context.getVariable(Variables.FAIL_ON_CRASHED);

int expectedInstances = appInstances.size();
long runningInstances = getInstanceCount(appInstances, InstanceState.RUNNING);
long downInstances = getInstanceCount(appInstances, InstanceState.DOWN);
Expand All @@ -102,7 +100,7 @@ private StartupStatus getStartupStatus(ProcessContext context, String appName, L
if (downInstances > 0) {
return StartupStatus.DOWN;
}
if (crashedInstances > 0 && failOnCrashed) {
if (crashedInstances > 0) {
return StartupStatus.CRASHED;
}
return StartupStatus.STARTING;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ static Stream<Arguments> testStep() {
return Stream.of(Arguments.of(List.of(InstanceState.RUNNING, InstanceState.STARTING), true, AsyncExecutionState.RUNNING),
Arguments.of(List.of(InstanceState.CRASHED, InstanceState.CRASHED, InstanceState.CRASHED), true,
AsyncExecutionState.ERROR),
Arguments.of(List.of(InstanceState.CRASHED), false, AsyncExecutionState.RUNNING),
Arguments.of(List.of(InstanceState.CRASHED), false, AsyncExecutionState.ERROR),
Arguments.of(List.of(InstanceState.DOWN, InstanceState.RUNNING), true, AsyncExecutionState.ERROR),
Arguments.of(List.of(InstanceState.RUNNING, InstanceState.RUNNING), true, AsyncExecutionState.FINISHED));
}
Expand Down

0 comments on commit 3816c71

Please sign in to comment.