Skip to content

Commit f097225

Browse files
committed
[#28899] DocDB: Disable object locking for TestSchemaVersionMismatch
Summary: TestSchemaVersionMismatch expects schema version mismatch errors amidst processing of DDLs, most of which are eliminated with object locking. Hence, disabled the feature for the test. Jira: DB-18622 Test Plan: Jenkins Enabled object locking by default, and ran the following ``` ./yb_build.sh --java-test 'org.yb.pgsql.TestSchemaVersionMismatch#testBasic' ``` Reviewers: amitanand, rthallam Reviewed By: rthallam Subscribers: ybase Differential Revision: https://phorge.dev.yugabyte.com/D47238
1 parent 4925ae1 commit f097225

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

java/yb-pgsql/src/test/java/org/yb/pgsql/TestSchemaVersionMismatch.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import java.sql.Statement;
2323
import java.sql.PreparedStatement;
2424
import java.sql.SQLException;
25+
import java.util.Map;
2526
import java.util.concurrent.atomic.AtomicBoolean;
2627
import java.util.concurrent.atomic.AtomicInteger;
2728
import org.junit.Test;
@@ -55,6 +56,16 @@ public class TestSchemaVersionMismatch extends BasePgSQLTest {
5556
private static final String updateSqlWithPlaceholder = String.format(updateSqlTemplate, "?");
5657
private static final String updateSqlWithUuid = String.format(updateSqlTemplate, "'" + uuid + "'");
5758

59+
@Override
60+
protected Map<String, String> getTServerFlags() {
61+
Map<String, String> flagMap = super.getTServerFlags();
62+
// The test expects schema version mismatch errors admist processing of DDLs, most of which
63+
// are eliminated with object locking. Hence, disable the feature for the test.
64+
flagMap.put("enable_object_locking_for_table_locks", "false");
65+
flagMap.put("allowed_preview_flags_csv", "enable_object_locking_for_table_locks");
66+
return flagMap;
67+
}
68+
5869
/**
5970
* Helper method to setup the test table with initial data.
6071
*/

0 commit comments

Comments
 (0)