Skip to content

Commit 6a72342

Browse files
check how decreasing data affects test time
1 parent 2b1583b commit 6a72342

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

src/test/java/net/snowflake/client/jdbc/SnowflakeResultSetSerializableIT.java

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ public Connection init(@Nullable Properties properties, String queryResultFormat
5959

6060
// Set up theses parameters as smaller values in order to generate
6161
// multiple file chunks with small data volumes.
62-
stmt.execute("alter session set result_first_chunk_max_size = 512");
63-
stmt.execute("alter session set result_min_chunk_size = 512");
64-
stmt.execute("alter session set arrow_result_rb_flush_size = 512");
62+
stmt.execute("alter session set result_first_chunk_max_size = 256");
63+
stmt.execute("alter session set result_min_chunk_size = 256");
64+
stmt.execute("alter session set arrow_result_rb_flush_size = 256");
6565
stmt.execute("alter session set result_chunk_size_multiplier = 1.2");
6666
}
6767
return conn;
@@ -345,31 +345,31 @@ public void testBasicTableWithOnlyFirstChunk(String queryResultFormat) throws Th
345345
@DontRunOnGithubActions
346346
public void testBasicTableWithOneFileChunk(String queryResultFormat) throws Throwable {
347347
// Result only includes first data chunk, test maxSize is small.
348-
testBasicTableHarness(300, 1, "", true, false, queryResultFormat);
348+
testBasicTableHarness(200, 1, "", true, false, queryResultFormat);
349349
// Test Async mode
350-
testBasicTableHarness(300, 1, "", true, true, queryResultFormat);
350+
testBasicTableHarness(200, 1, "", true, true, queryResultFormat);
351351
// Result only includes first data chunk, test maxSize is big.
352-
testBasicTableHarness(300, 1024 * 1024, "", false, false, queryResultFormat);
352+
testBasicTableHarness(200, 1024 * 1024, "", false, false, queryResultFormat);
353353
// Test Async mode
354-
testBasicTableHarness(300, 1024 * 1024, "", false, true, queryResultFormat);
354+
testBasicTableHarness(200, 1024 * 1024, "", false, true, queryResultFormat);
355355
}
356356

357357
@ParameterizedTest
358358
@ArgumentsSource(SimpleResultFormatProvider.class)
359359
@DontRunOnGithubActions
360360
public void testBasicTableWithSomeFileChunks(String queryResultFormat) throws Throwable {
361361
// Result only includes first data chunk, test maxSize is small.
362-
testBasicTableHarness(90000, 1, "", true, false, queryResultFormat);
362+
testBasicTableHarness(10000, 1, "", true, false, queryResultFormat);
363363
// Test Async mode
364-
testBasicTableHarness(90000, 1, "", true, true, queryResultFormat);
364+
testBasicTableHarness(10000, 1, "", true, true, queryResultFormat);
365365
// Result only includes first data chunk, test maxSize is median.
366-
testBasicTableHarness(90000, 3 * 1024 * 1024, "", false, false, queryResultFormat);
366+
testBasicTableHarness(10000, 3 * 1024 * 1024, "", false, false, queryResultFormat);
367367
// Test Async mode
368-
testBasicTableHarness(90000, 3 * 1024 * 1024, "", false, true, queryResultFormat);
368+
testBasicTableHarness(10000, 3 * 1024 * 1024, "", false, true, queryResultFormat);
369369
// Result only includes first data chunk, test maxSize is big.
370-
testBasicTableHarness(90000, 100 * 1024 * 1024, "", false, false, queryResultFormat);
370+
testBasicTableHarness(10000, 100 * 1024 * 1024, "", false, false, queryResultFormat);
371371
// Test Async mode
372-
testBasicTableHarness(90000, 100 * 1024 * 1024, "", false, true, queryResultFormat);
372+
testBasicTableHarness(10000, 100 * 1024 * 1024, "", false, true, queryResultFormat);
373373
}
374374

375375
/**
@@ -492,7 +492,7 @@ public void testBasicTableWithSerializeObjectsAfterReadResultSet(String queryRes
492492
statement.execute(
493493
"create or replace table table_basic " + " (int_c int, string_c string(128))");
494494

495-
int rowCount = 30000;
495+
int rowCount = 20000;
496496
statement.execute(
497497
"insert into table_basic select "
498498
+ "seq4(), 'arrow_1234567890arrow_1234567890arrow_1234567890arrow_1234567890'"
@@ -569,7 +569,7 @@ private synchronized List<String> splitResultSetSerializables(
569569
public void testSplitResultSetSerializable(String queryResultFormat) throws Throwable {
570570
List<String> fileNameList = null;
571571
String originalResultCSVString = null;
572-
int rowCount = 90000;
572+
int rowCount = 10000;
573573
try (Connection connection = init(queryResultFormat);
574574
Statement statement = connection.createStatement()) {
575575

@@ -673,7 +673,7 @@ public void testNegativeWithChunkFileNotExist(String queryResultFormat) throws T
673673
statement.execute(
674674
"create or replace table table_basic " + " (int_c int, string_c string(128))");
675675

676-
int rowCount = 300;
676+
int rowCount = 200;
677677
statement.execute(
678678
"insert into table_basic select "
679679
+ "seq4(), "
@@ -726,7 +726,7 @@ public void testNegativeWithClosedResultSet(String queryResultFormat) throws Thr
726726
statement.execute(
727727
"create or replace table table_basic " + " (int_c int, string_c string(128))");
728728

729-
int rowCount = 300;
729+
int rowCount = 200;
730730
statement.execute(
731731
"insert into table_basic select "
732732
+ "seq4(), "
@@ -838,7 +838,7 @@ private void generateTestFiles(String queryResultFormat) throws Throwable {
838838
@DontRunOnGithubActions
839839
public void testRetrieveMetadata(String queryResultFormat) throws Throwable {
840840
List<String> fileNameList;
841-
int rowCount = 90000;
841+
int rowCount = 10000;
842842
long expectedTotalRowCount = 0;
843843
long expectedTotalCompressedSize = 0;
844844
long expectedTotalUncompressedSize = 0;

0 commit comments

Comments
 (0)