Skip to content

Commit

Permalink
[#12293] YSQL: Adjust default value in copy test
Browse files Browse the repository at this point in the history
Summary:
In D16752 we changed the default value of ROWS_PER_TRANSACTION.
Here we fix the test to adjust the value of rows per transaction accordingly.

Test Plan: `ybd --java-test org.yb.pgsql.TestBatchCopyFrom`

Reviewers: smishra, rthallam

Reviewed By: rthallam

Subscribers: yql

Differential Revision: https://phabricator.dev.yugabyte.com/D16755
  • Loading branch information
lnguyen-yugabyte committed Apr 30, 2022
1 parent d95a159 commit 3cb638e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class TestBatchCopyFrom extends BasePgSQLTest {
"violates foreign key constraint";
private static final String BATCH_TXN_SESSION_VARIABLE_NAME =
"yb_default_copy_from_rows_per_transaction";
private static final int BATCH_TXN_SESSION_VARIABLE_DEFAULT_ROWS = 1000;
private static final int BATCH_TXN_SESSION_VARIABLE_DEFAULT_ROWS = 20000;
private static final String DISABLE_TXN_WRITES_SESSION_VARIABLE_NAME =
"yb_disable_transactional_writes";
private static final String YB_ENABLE_UPSERT_MODE_VARIABLE_NAME =
Expand Down Expand Up @@ -479,7 +479,7 @@ public void testBatchTxnSessionVariable() throws Exception {
INVALID_COPY_INPUT_ERROR_MSG);
assertOneRow(statement, "SELECT COUNT(*) FROM " + tableName, expectedCopiedLines);

// reset session variable (attempt to copy default of 1000 rows)
// reset session variable
statement.execute("RESET " + BATCH_TXN_SESSION_VARIABLE_NAME);
assertOneRow(statement, "SHOW " + BATCH_TXN_SESSION_VARIABLE_NAME,
String.valueOf(BATCH_TXN_SESSION_VARIABLE_DEFAULT_ROWS));
Expand Down

0 comments on commit 3cb638e

Please sign in to comment.