Skip to content

Commit 23a0bbd

Browse files
authored
Fixed multichunk test (#1150)
## Description <!-- Provide a brief summary of the changes made and the issue they aim to address.--> - The tests were showing flaky behaviour since the Link expiry check in isChunkLinkInvalid() could trigger based on stub expiry times. This caused extra refetch API calls intermittently (2 instead of 1) - Test expected exactly chunkCount - 1 calls to verify inline-first-chunk optimization ## Testing <!-- Describe how the changes have been tested--> Ran the test 10 times and it passed for all ## Additional Notes to the Reviewer <!-- Share any additional context or insights that may help the reviewer understand the changes better. This could include challenges faced, limitations, or compromises made during the development process. Also, mention any areas of the code that you would like the reviewer to focus on specifically. --> NO_CHANGELOG=true
1 parent 90c9492 commit 23a0bbd

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/test/java/com/databricks/jdbc/integration/fakeservice/tests/MultiChunkExecutionIntegrationTests.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
import com.databricks.jdbc.api.impl.DatabricksResultSet;
1010
import com.databricks.jdbc.api.impl.DatabricksResultSetMetaData;
11+
import com.databricks.jdbc.common.DatabricksJdbcConstants;
1112
import com.databricks.jdbc.integration.fakeservice.AbstractFakeServiceIntegrationTests;
1213
import java.sql.Connection;
1314
import java.sql.ResultSet;
@@ -22,6 +23,9 @@ public class MultiChunkExecutionIntegrationTests extends AbstractFakeServiceInte
2223

2324
@Test
2425
void testMultiChunkSelect() throws SQLException, InterruptedException {
26+
// Ensure fake service property is set to skip link expiry checks in tests
27+
System.setProperty(DatabricksJdbcConstants.IS_FAKE_SERVICE_TEST_PROP, "true");
28+
2529
final String table = "samples.tpch.lineitem";
2630

2731
// To save on the size of stub mappings, the test uses just enough rows to span multiple chunks.

0 commit comments

Comments
 (0)