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

fake/noop implementations of SnowflakeStreamingIngestClient and SnowflakeStreamingIngestChannel #764

Open
jdcaperon opened this issue May 28, 2024 · 0 comments

Comments

@jdcaperon
Copy link

Is there any interest in a contribution of a set of fakes for the SnowflakeStreamingIngestClient and channel in order to support easier testing for downstream users. Understandably it adds overhead for support so I can understand a lack of interest. I'd be happy to upstream some simple internal fakes I am building for testing if that's interesting.

I see that there is support for a form of testing mode in the builder of the of client but AFAICT this does not extend to channels.

public Builder setIsTestMode(boolean isTestMode) {
this.isTestMode = isTestMode;
return this;
}

Largely the fakes themselves can be very simple as the API itself is rather plain. The only possible complication is the table schema API since there is no obvious construction for it. https://github.com/snowflakedb/snowflake-ingest-java/blob/master/src/main/java/net/snowflake/ingest/streaming/SnowflakeStreamingIngestChannel.java#L282-L289

In particular fakes become very useful when working with many channels as mocking channels that are dynamically created but also dynamically closed etc is quite tedious.

Happy to hear thoughts and suggestions cheers.

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

No branches or pull requests

1 participant