44
55import java .sql .Connection ;
66import java .sql .SQLException ;
7+ import java .sql .Types ;
78
89/**
910 * Provides the call to run tests for the most actual Framework version.
@@ -22,20 +23,24 @@ protected String getSql() {
2223 // Workaround because Oracle JDBC doesn't support passing boolean to stored procedures.
2324 String colorConsoleStr = Boolean .toString (options .colorConsole );
2425 String failOnErrors = Boolean .toString (options .failOnErrors );
26+ String randomExecutionOrder = Boolean .toString (options .randomTestOrder );
2527
2628 return
2729 "BEGIN " +
2830 "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+ "); " +
3944 "END;" ;
4045 }
4146
@@ -44,6 +49,11 @@ protected int createStatement() throws SQLException {
4449 int curParamIdx = super .createStatement ();
4550
4651 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+ }
4757
4858 return curParamIdx ;
4959 }
0 commit comments