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

Add tests for SnowflakeGCSClient.java #1278

Merged
merged 8 commits into from
Mar 16, 2023
Merged

Conversation

sfc-gh-ext-simba-lb
Copy link
Contributor

@sfc-gh-ext-simba-lb sfc-gh-ext-simba-lb commented Mar 3, 2023

Overview

Add tests for SnowflakeGCSClient.java
Fix an issue with downloadToStream() when not using presigned url where "not in GZIP format" error occurs from the client. The same issue for download() was fixed in #1188

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-ext-simba-lb sfc-gh-ext-simba-lb force-pushed the GCSClientTests branch 3 times, most recently from 951297a to dc33fc8 Compare March 7, 2023 19:21
@sfc-gh-ext-simba-lb sfc-gh-ext-simba-lb changed the title testing Add tests for SnowflakeGCSClient.java Mar 7, 2023
@sfc-gh-ext-simba-lb sfc-gh-ext-simba-lb force-pushed the GCSClientTests branch 3 times, most recently from dde41fa to 4385778 Compare March 8, 2023 21:25
@sfc-gh-ext-simba-lb sfc-gh-ext-simba-lb marked this pull request as ready for review March 8, 2023 21:41
@sfc-gh-ext-simba-lb sfc-gh-ext-simba-lb requested a review from a team as a code owner March 8, 2023 21:41
add params

test presigned url

correct conditional ignores

inputStream = new ByteArrayInputStream(blob.getContent());

inputStream = Channels.newInputStream(blob.reader());
Copy link
Collaborator

Choose a reason for hiding this comment

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

why we need this change in the code?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is for the "Not in GZIP format" issue.

@sfc-gh-igarish
Copy link
Collaborator

There is an error:
Error: Errors:
Error: StreamLatestIT.testDownloadToStreamGCSPresignedUrl:129->AbstractDriverIT.getConnection:184->AbstractDriverIT.getConnection:330 ? SnowflakeSQL JDBC driver encountered communication error. Message: Exception encountered for HTTP request: Connect to gcpaccount.reg.local:443 [gcpaccount.reg.local/10.1.0.121] failed: Connection refused (Connection refused).

move conditional ignores

conditionalIgnores

use properties
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

@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

@sfc-gh-mknister sfc-gh-mknister enabled auto-merge (squash) March 16, 2023 22:38
@sfc-gh-mknister sfc-gh-mknister merged commit e798047 into master Mar 16, 2023
@sfc-gh-mknister sfc-gh-mknister deleted the GCSClientTests branch March 16, 2023 22:38
@github-actions github-actions bot locked and limited conversation to collaborators Mar 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants