Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/main/java/org/utplsql/api/TestRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,11 @@ public TestRunner oraStuckTimeout(Integer oraStuckTimeout) {
return this;
}

public TestRunner supportInfo(boolean supportInfo) {
this.options.supportInfo = supportInfo;
return this;
}

public TestRunnerOptions getOptions() {
return options;
}
Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/utplsql/api/TestRunnerOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public class TestRunnerOptions {
public Integer randomTestOrderSeed;
public final Set<String> tags = new LinkedHashSet<>();
public Integer oraStuckTimeout = 0;
public boolean supportInfo = true;

public String getTagsAsString() {
return String.join(",", tags);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ public enum OptionalFeatures {
CLIENT_CHARACTER_SET("3.1.2.2130", null),
RANDOM_EXECUTION_ORDER("3.1.7.2795", null),
TAGS("3.1.7.3006", null),
EXPR("3.1.13", null);
EXPR("3.1.13", null),
SUPPORT_INFO("3.2.4.4648", null);

private final Version minVersion;
private final Version maxVersion;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ private DynamicParameterList initParameterList() throws SQLException {
.addIfNotEmpty("a_exclude_schema_expr", options.excludeSchemaExpr)
.addIfNotEmpty("a_exclude_object_expr", options.excludeObjectExpr);
}
if (OptionalFeatures.SUPPORT_INFO.isAvailableFor(utPlSQlVersion)) {
builder.addIfNotEmpty("a_support_info", options.supportInfo);
}

return builder.build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ void version_3_0_2_parameters() throws SQLException {
checkRandomTestOrder(false);
checkTags(false);
checkExpr(false);
checkSupportInfo(false);
}

@Test
Expand All @@ -61,6 +62,7 @@ void version_3_0_3_parameters() throws SQLException {
checkRandomTestOrder(false);
checkTags(false);
checkExpr(false);
checkSupportInfo(false);
}

@Test
Expand All @@ -73,6 +75,7 @@ void version_3_0_4_parameters() throws SQLException {
checkRandomTestOrder(false);
checkTags(false);
checkExpr(false);
checkSupportInfo(false);
}

@Test
Expand All @@ -85,6 +88,7 @@ void version_3_1_0_parameters() throws SQLException {
checkRandomTestOrder(false);
checkTags(false);
checkExpr(false);
checkSupportInfo(false);
}

@Test
Expand All @@ -97,6 +101,7 @@ void version_3_1_1_parameters() throws SQLException {
checkRandomTestOrder(false);
checkTags(false);
checkExpr(false);
checkSupportInfo(false);
}

@Test
Expand All @@ -109,6 +114,7 @@ void version_3_1_2_parameters() throws SQLException {
checkRandomTestOrder(false);
checkTags(false);
checkExpr(false);
checkSupportInfo(false);
}

@Test
Expand All @@ -121,6 +127,7 @@ void version_3_1_3_parameters() throws SQLException {
checkRandomTestOrder(false);
checkTags(false);
checkExpr(false);
checkSupportInfo(false);
}

@Test
Expand All @@ -133,6 +140,7 @@ void version_3_1_4_parameters() throws SQLException {
checkRandomTestOrder(false);
checkTags(false);
checkExpr(false);
checkSupportInfo(false);
}

@Test
Expand All @@ -145,6 +153,7 @@ void version_3_1_5_parameters() throws SQLException {
checkRandomTestOrder(false);
checkTags(false);
checkExpr(false);
checkSupportInfo(false);
}

@Test
Expand All @@ -157,6 +166,7 @@ void version_3_1_6_parameters() throws SQLException {
checkRandomTestOrder(false);
checkTags(false);
checkExpr(false);
checkSupportInfo(false);
}

@Test
Expand All @@ -169,6 +179,7 @@ void version_3_1_7_parameters() throws SQLException {
checkRandomTestOrder(true);
checkTags(true);
checkExpr(false);
checkSupportInfo(false);
}

@Test
Expand All @@ -181,6 +192,7 @@ void version_3_1_8_parameters() throws SQLException {
checkRandomTestOrder(true);
checkTags(true);
checkExpr(false);
checkSupportInfo(false);
}

@Test
Expand All @@ -193,6 +205,33 @@ void version_3_1_13_parameters() throws SQLException {
checkRandomTestOrder(true);
checkTags(true);
checkExpr(true);
checkSupportInfo(false);
}

@Test
void version_3_2_4_before_support_info_parameters() throws SQLException {
initTestRunnerStatementForVersion(Version.create("3.2.4.4647"));

checkBaseParameters();
checkFailOnError(true);
checkClientCharacterSet(true);
checkRandomTestOrder(true);
checkTags(true);
checkExpr(true);
checkSupportInfo(false);
}

@Test
void version_3_2_4_parameters() throws SQLException {
initTestRunnerStatementForVersion(Version.create("3.2.4.4648"));

checkBaseParameters();
checkFailOnError(true);
checkClientCharacterSet(true);
checkRandomTestOrder(true);
checkTags(true);
checkExpr(true);
checkSupportInfo(true);
}

private OracleConnection getMockedOracleConnection(Object[] expectedFileMapping) throws SQLException {
Expand Down Expand Up @@ -311,4 +350,11 @@ private void checkExpr(boolean shouldBeThere) throws SQLException {
assertThat(sql, doesOrDoesNotContainString("a_exclude_object_expr => ?", shouldBeThere));
verify(callableStatement, doesOrDoesNotGetCalled(shouldBeThere)).setString(17, "ut3:*_package*");
}

private void checkSupportInfo(boolean shouldBeThere) throws SQLException {
String sql = testRunnerStatement.getSql();

assertThat(sql, doesOrDoesNotContainString("a_support_info => (case ? when 1 then true else false end)", shouldBeThere));
verify(callableStatement, doesOrDoesNotGetCalled(shouldBeThere)).setInt(18, 0);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public static TestRunnerOptions getCompletelyFilledOptions() {
options.includeObjectExpr = "a_*";
options.excludeSchemaExpr = "ut3:*_package*";
options.excludeObjectExpr = "ut3:*_package*";
options.supportInfo = false;
return options;
}

Expand Down
Loading