File tree Expand file tree Collapse file tree 3 files changed +16
-5
lines changed
tempto-core/src/main/java/io/prestodb/tempto Expand file tree Collapse file tree 3 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ ext.tempto_runner = project(':tempto-runner')
113113ext. tempto_ldap = project(' :tempto-ldap' )
114114ext. tempto_kafka = project(' :tempto-kafka' )
115115ext. expected_result_generator = project(' :expected-result-generator' )
116- ext. tempto_version = ' 1.53-SNAPSHOT '
116+ ext. tempto_version = ' 1.53'
117117ext. tempto_group = " io.prestodb.tempto"
118118ext. isReleaseVersion = ! tempto_version. endsWith(" SNAPSHOT" )
119119
Original file line number Diff line number Diff line change 2525import net .bytebuddy .dynamic .loading .ClassLoadingStrategy ;
2626import net .bytebuddy .implementation .MethodCall ;
2727import org .slf4j .Logger ;
28+ import org .testng .IRetryAnalyzer ;
2829import org .testng .annotations .CustomAttribute ;
2930import org .testng .annotations .Test ;
31+ import org .testng .internal .annotations .DisabledRetryAnalyzer ;
3032
3133import java .lang .annotation .Annotation ;
3234import 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
Original file line number Diff line number Diff line change 1616import io .prestodb .tempto .internal .process .CliProcessBase ;
1717
1818import java .time .Duration ;
19+ import java .util .OptionalInt ;
1920
21+ import static java .util .Objects .requireNonNull ;
2022import 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 }
You can’t perform that action at this time.
0 commit comments