4
4
5
5
import java .sql .Connection ;
6
6
import java .sql .SQLException ;
7
+ import java .sql .Types ;
7
8
8
9
/**
9
10
* Provides the call to run tests for the most actual Framework version.
@@ -22,20 +23,24 @@ protected String getSql() {
22
23
// Workaround because Oracle JDBC doesn't support passing boolean to stored procedures.
23
24
String colorConsoleStr = Boolean .toString (options .colorConsole );
24
25
String failOnErrors = Boolean .toString (options .failOnErrors );
26
+ String randomExecutionOrder = Boolean .toString (options .randomTestOrder );
25
27
26
28
return
27
29
"BEGIN " +
28
30
"ut_runner.run(" +
29
- "a_paths => ?, " +
30
- "a_reporters => ?, " +
31
- "a_color_console => " + colorConsoleStr + ", " +
32
- "a_coverage_schemes => ?, " +
33
- "a_source_file_mappings => ?, " +
34
- "a_test_file_mappings => ?, " +
35
- "a_include_objects => ?, " +
36
- "a_exclude_objects => ?, " +
37
- "a_fail_on_errors => " + failOnErrors + ", " +
38
- "a_client_character_set => ?); " +
31
+ "a_paths => ?, " +
32
+ "a_reporters => ?, " +
33
+ "a_color_console => " + colorConsoleStr + ", " +
34
+ "a_coverage_schemes => ?, " +
35
+ "a_source_file_mappings => ?, " +
36
+ "a_test_file_mappings => ?, " +
37
+ "a_include_objects => ?, " +
38
+ "a_exclude_objects => ?, " +
39
+ "a_fail_on_errors => " + failOnErrors + ", " +
40
+ "a_client_character_set => ?, " +
41
+ "a_random_test_order => " + randomExecutionOrder + ", " +
42
+ "a_random_test_order_seed => ?" +
43
+ "); " +
39
44
"END;" ;
40
45
}
41
46
@@ -44,6 +49,11 @@ protected int createStatement() throws SQLException {
44
49
int curParamIdx = super .createStatement ();
45
50
46
51
callableStatement .setString (++curParamIdx , options .clientCharacterSet );
52
+ if ( options .randomTestOrderSeed == null ) {
53
+ callableStatement .setNull (++curParamIdx , Types .INTEGER );
54
+ } else {
55
+ callableStatement .setInt (++curParamIdx , options .randomTestOrderSeed );
56
+ }
47
57
48
58
return curParamIdx ;
49
59
}
0 commit comments