Skip to content

Commit

Permalink
Merge pull request #276 from arunthirupathi/prepare_1_53_release
Browse files Browse the repository at this point in the history
Prepare 1.53 release
  • Loading branch information
highker authored Jul 1, 2022
2 parents 086f8fc + 9c247c0 commit 2a7cfc4
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ ext.tempto_runner = project(':tempto-runner')
ext.tempto_ldap = project(':tempto-ldap')
ext.tempto_kafka = project(':tempto-kafka')
ext.expected_result_generator = project(':expected-result-generator')
ext.tempto_version = '1.53-SNAPSHOT'
ext.tempto_version = '1.53'
ext.tempto_group = "io.prestodb.tempto"
ext.isReleaseVersion = !tempto_version.endsWith("SNAPSHOT")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@
import net.bytebuddy.dynamic.loading.ClassLoadingStrategy;
import net.bytebuddy.implementation.MethodCall;
import org.slf4j.Logger;
import org.testng.IRetryAnalyzer;
import org.testng.annotations.CustomAttribute;
import org.testng.annotations.Test;
import org.testng.internal.annotations.DisabledRetryAnalyzer;

import java.lang.annotation.Annotation;
import java.lang.reflect.InvocationTargetException;
Expand Down Expand Up @@ -267,9 +269,9 @@ public boolean singleThreaded()
}

@Override
public Class retryAnalyzer()
public Class<? extends IRetryAnalyzer> retryAnalyzer()
{
return Class.class;
return DisabledRetryAnalyzer.class;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
import io.prestodb.tempto.internal.process.CliProcessBase;

import java.time.Duration;
import java.util.OptionalInt;

import static java.util.Objects.requireNonNull;
import static java.util.concurrent.TimeUnit.MILLISECONDS;

/**
Expand All @@ -26,11 +28,18 @@ public class LocalCliProcess
extends CliProcessBase
{
private final Process process;
private final OptionalInt expectedExitValue;

public LocalCliProcess(Process process)
public LocalCliProcess(Process process, OptionalInt expectedExitValue)
{
super(process.getInputStream(), process.getErrorStream(), process.getOutputStream());
this.process = process;
this.expectedExitValue = requireNonNull(expectedExitValue, "expectedExitValue is null");
}

public LocalCliProcess(Process process)
{
this(process, OptionalInt.empty());
}

@Override
Expand All @@ -43,7 +52,7 @@ public void waitForWithTimeoutAndKill(Duration timeout)
}

int exitValue = process.exitValue();
if (exitValue != 0) {
if (exitValue != 0 && exitValue != expectedExitValue.orElse(0)) {
throw new RuntimeException("Child process exited with non-zero code: " + exitValue);
}
}
Expand Down

0 comments on commit 2a7cfc4

Please sign in to comment.