Skip to content

Commit

Permalink
[#22594] YSQL: Fix flaky TestTransactionStatusTable.testCreation unit…
Browse files Browse the repository at this point in the history
… test

Summary:
ASAN/TSAN builds are usually slow than release/debug.
It is required to use lesser paralelism and reduce pressure on
t-server/master and avoid different timeout issues.
Jira: DB-11502

Test Plan:
Run existing unit tests

```
./yb_build.sh asan --java-test 'org.yb.pgsql.TestTransactionStatusTable#testCreation' -n 20
./yb_build.sh asan --java-test 'org.yb.cql.TestTransactionStatusTable#testCreation' -n 20
```

Reviewers: tnayak, myang, jason

Reviewed By: myang

Subscribers: yql

Tags: #jenkins-ready

Differential Revision: https://phorge.dev.yugabyte.com/D36607
  • Loading branch information
d-uspenskiy committed Jul 17, 2024
1 parent c8e7530 commit 3abd045
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ protected void customizeMiniClusterBuilder(MiniYBClusterBuilder builder) {

@Test
public void testCreation() throws Throwable {
final int kTablesCount = BuildTypeUtil.nonTsanVsTsan(4, 2);
final int kTablesCount = BuildTypeUtil.nonSanitizerVsSanitizer(4, 2);
final CountDownLatch startSignal = new CountDownLatch(kTablesCount);
List<ThrowingRunnable> cmds = new ArrayList<>();
List<Session> sessions = new ArrayList<>();
Expand All @@ -69,12 +69,12 @@ public void testCreation() throws Throwable {
session.execute(
new SimpleStatement(String.format(
"create table %s (k int primary key, v int) " +
"with transactions = {'enabled' : true};", tableName))
"with transactions = {'enabled' : true}", tableName))
.setReadTimeoutMillis((int) BuildTypeUtil.adjustTimeout(36000)));
LOG.info("Created table " + tableName);
session.execute(String.format("create index on %s (v);", tableName));
session.execute(String.format("create index on %s (v)", tableName));
LOG.info("Created index on " + tableName);
session.execute(String.format("insert into %s (k, v) values (1, 1000);", tableName));
session.execute(String.format("insert into %s (k, v) values (1, 1000)", tableName));
LOG.info("Inserted data into " + tableName);
ResultSet rs = session.execute(String.format("select k, v from %s", tableName));
LOG.info("Selected data from " + tableName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ protected void customizeMiniClusterBuilder(MiniYBClusterBuilder builder) {

@Test
public void testCreation() throws Throwable {
final int kTablesCount = BuildTypeUtil.nonTsanVsTsan(4, 2);
final int kTablesCount = BuildTypeUtil.nonSanitizerVsSanitizer(4, 2);
final CountDownLatch startSignal = new CountDownLatch(kTablesCount);
List<ThrowingRunnable> cmds = new ArrayList<>();
for (int i = 0; i < kTablesCount; ++i) {
Expand Down

0 comments on commit 3abd045

Please sign in to comment.