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')
113
113
ext. tempto_ldap = project(' :tempto-ldap' )
114
114
ext. tempto_kafka = project(' :tempto-kafka' )
115
115
ext. expected_result_generator = project(' :expected-result-generator' )
116
- ext. tempto_version = ' 1.53-SNAPSHOT '
116
+ ext. tempto_version = ' 1.53'
117
117
ext. tempto_group = " io.prestodb.tempto"
118
118
ext. isReleaseVersion = ! tempto_version. endsWith(" SNAPSHOT" )
119
119
Original file line number Diff line number Diff line change 25
25
import net .bytebuddy .dynamic .loading .ClassLoadingStrategy ;
26
26
import net .bytebuddy .implementation .MethodCall ;
27
27
import org .slf4j .Logger ;
28
+ import org .testng .IRetryAnalyzer ;
28
29
import org .testng .annotations .CustomAttribute ;
29
30
import org .testng .annotations .Test ;
31
+ import org .testng .internal .annotations .DisabledRetryAnalyzer ;
30
32
31
33
import java .lang .annotation .Annotation ;
32
34
import java .lang .reflect .InvocationTargetException ;
@@ -267,9 +269,9 @@ public boolean singleThreaded()
267
269
}
268
270
269
271
@ Override
270
- public Class retryAnalyzer ()
272
+ public Class <? extends IRetryAnalyzer > retryAnalyzer ()
271
273
{
272
- return Class .class ;
274
+ return DisabledRetryAnalyzer .class ;
273
275
}
274
276
275
277
@ Override
Original file line number Diff line number Diff line change 16
16
import io .prestodb .tempto .internal .process .CliProcessBase ;
17
17
18
18
import java .time .Duration ;
19
+ import java .util .OptionalInt ;
19
20
21
+ import static java .util .Objects .requireNonNull ;
20
22
import static java .util .concurrent .TimeUnit .MILLISECONDS ;
21
23
22
24
/**
@@ -26,11 +28,18 @@ public class LocalCliProcess
26
28
extends CliProcessBase
27
29
{
28
30
private final Process process ;
31
+ private final OptionalInt expectedExitValue ;
29
32
30
- public LocalCliProcess (Process process )
33
+ public LocalCliProcess (Process process , OptionalInt expectedExitValue )
31
34
{
32
35
super (process .getInputStream (), process .getErrorStream (), process .getOutputStream ());
33
36
this .process = process ;
37
+ this .expectedExitValue = requireNonNull (expectedExitValue , "expectedExitValue is null" );
38
+ }
39
+
40
+ public LocalCliProcess (Process process )
41
+ {
42
+ this (process , OptionalInt .empty ());
34
43
}
35
44
36
45
@ Override
@@ -43,7 +52,7 @@ public void waitForWithTimeoutAndKill(Duration timeout)
43
52
}
44
53
45
54
int exitValue = process .exitValue ();
46
- if (exitValue != 0 ) {
55
+ if (exitValue != 0 && exitValue != expectedExitValue . orElse ( 0 ) ) {
47
56
throw new RuntimeException ("Child process exited with non-zero code: " + exitValue );
48
57
}
49
58
}
You can’t perform that action at this time.
0 commit comments