Skip to content

Commit 2a7cfc4

Browse files
authored
Merge pull request #276 from arunthirupathi/prepare_1_53_release
Prepare 1.53 release
2 parents 086f8fc + 9c247c0 commit 2a7cfc4

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ ext.tempto_runner = project(':tempto-runner')
113113
ext.tempto_ldap = project(':tempto-ldap')
114114
ext.tempto_kafka = project(':tempto-kafka')
115115
ext.expected_result_generator = project(':expected-result-generator')
116-
ext.tempto_version = '1.53-SNAPSHOT'
116+
ext.tempto_version = '1.53'
117117
ext.tempto_group = "io.prestodb.tempto"
118118
ext.isReleaseVersion = !tempto_version.endsWith("SNAPSHOT")
119119

tempto-core/src/main/java/io/prestodb/tempto/internal/convention/ConventionBasedTestProxyGenerator.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@
2525
import net.bytebuddy.dynamic.loading.ClassLoadingStrategy;
2626
import net.bytebuddy.implementation.MethodCall;
2727
import org.slf4j.Logger;
28+
import org.testng.IRetryAnalyzer;
2829
import org.testng.annotations.CustomAttribute;
2930
import org.testng.annotations.Test;
31+
import org.testng.internal.annotations.DisabledRetryAnalyzer;
3032

3133
import java.lang.annotation.Annotation;
3234
import java.lang.reflect.InvocationTargetException;
@@ -267,9 +269,9 @@ public boolean singleThreaded()
267269
}
268270

269271
@Override
270-
public Class retryAnalyzer()
272+
public Class<? extends IRetryAnalyzer> retryAnalyzer()
271273
{
272-
return Class.class;
274+
return DisabledRetryAnalyzer.class;
273275
}
274276

275277
@Override

tempto-core/src/main/java/io/prestodb/tempto/process/LocalCliProcess.java

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
import io.prestodb.tempto.internal.process.CliProcessBase;
1717

1818
import java.time.Duration;
19+
import java.util.OptionalInt;
1920

21+
import static java.util.Objects.requireNonNull;
2022
import static java.util.concurrent.TimeUnit.MILLISECONDS;
2123

2224
/**
@@ -26,11 +28,18 @@ public class LocalCliProcess
2628
extends CliProcessBase
2729
{
2830
private final Process process;
31+
private final OptionalInt expectedExitValue;
2932

30-
public LocalCliProcess(Process process)
33+
public LocalCliProcess(Process process, OptionalInt expectedExitValue)
3134
{
3235
super(process.getInputStream(), process.getErrorStream(), process.getOutputStream());
3336
this.process = process;
37+
this.expectedExitValue = requireNonNull(expectedExitValue, "expectedExitValue is null");
38+
}
39+
40+
public LocalCliProcess(Process process)
41+
{
42+
this(process, OptionalInt.empty());
3443
}
3544

3645
@Override
@@ -43,7 +52,7 @@ public void waitForWithTimeoutAndKill(Duration timeout)
4352
}
4453

4554
int exitValue = process.exitValue();
46-
if (exitValue != 0) {
55+
if (exitValue != 0 && exitValue != expectedExitValue.orElse(0)) {
4756
throw new RuntimeException("Child process exited with non-zero code: " + exitValue);
4857
}
4958
}

0 commit comments

Comments
 (0)