Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNOW-806332 Fix test timeouts #1380

Merged
merged 3 commits into from
May 4, 2023
Merged

SNOW-806332 Fix test timeouts #1380

merged 3 commits into from
May 4, 2023

Conversation

sfc-gh-mknister
Copy link
Contributor

Overview

SNOW-806332

We are having test timeout failures where tests are running for over 2 hours. This looks to be because of 2 extremely long-running large update tests. The fix is to mock the response from the server to return a large long value instead of updating all of those rows for real.

External contributors - please answer these questions before submitting a pull request. Thanks!

Please answer these questions before submitting your pull requests. Thanks!

  1. What GitHub issue is this PR addressing? Make sure that there is an accompanying issue to your PR.

    Fixes #NNNN

  2. Fill out the following pre-review checklist:

    • I am adding a new automated test(s) to verify correctness of my new code
    • I am adding new logging messages
    • I am modifying authorization mechanisms
    • I am adding new credentials
    • I am modifying OCSP code
    • I am adding a new dependency
  3. Please describe how your code solves the related issue.

    Please write a short description of how your code change solves the related issue.

Pre-review checklist

  • This change has passed precommit
  • I have reviewed code coverage report for my PR in (Sonarqube)

@sfc-gh-mknister sfc-gh-mknister requested a review from a team as a code owner May 4, 2023 01:46
@@ -216,7 +216,7 @@ public void testExecuteLargeBatch() throws SQLException {

@Test
public void testRemoveExtraDescribeCalls() throws SQLException {
Connection connection = getConnection();
Connection connection = init();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgot that for tests that run on both Arrow and Json (like PreparedStatement2LatestIT), we should always use init() instead of getConnection() because the setup logic for init() ensures we make the switch from json to arrow for the arrow extension IT tests. Fixed those too.

@@ -317,30 +317,4 @@ public void testAlreadyDescribedMultipleResults() throws SQLException {
assertTrue(rs.next());
assertTrue(prepStatement.unwrap(SnowflakePreparedStatementV1.class).isAlreadyDescribed());
}

@Test
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove huge test. Mocked version is now in Update IT file instead.

Copy link
Collaborator

@sfc-gh-igarish sfc-gh-igarish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sfc-gh-mknister sfc-gh-mknister enabled auto-merge (squash) May 4, 2023 16:26
@sfc-gh-mknister sfc-gh-mknister merged commit 930c7ec into master May 4, 2023
@sfc-gh-mknister sfc-gh-mknister deleted the fixLongRunningTests branch May 4, 2023 18:22
@sonarqubemergegate
Copy link

SonarQube Quality Gate

Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants