Skip to content

Commit

Permalink
NO-SNOW Ignore OAuth test
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-mbobowski committed Aug 7, 2024
1 parent 4bff462 commit c393b47
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ public void afterEach() {
}

private static Stream<Arguments> oAuthAndSingleBufferParameters() {
return TestUtils.nBooleanProduct(2);
return Stream.of(Arguments.of(false, false), Arguments.of(false, true));
// OAuth tests are temporary disabled
// return TestUtils.nBooleanProduct(2);
}

@ParameterizedTest(name = "useOAuth: {0}, useSingleBuffer: {1}")
Expand Down
3 changes: 3 additions & 0 deletions src/test/java/com/snowflake/kafka/connector/UtilsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import java.util.HashMap;
import java.util.Map;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.contrib.java.lang.system.EnvironmentVariables;
Expand Down Expand Up @@ -283,6 +284,8 @@ public void testGetExceptionMessage() throws Exception {
}

@Test
@Ignore
// OAuth tests are temporary disabled
public void testGetSnowflakeOAuthAccessToken() {
Map<String, String> config = TestUtils.getConfForStreamingWithOAuth();
if (config != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,11 @@
public class DirectStreamingClientHandlerTest {
private StreamingClientHandler streamingClientHandler;
private Map<String, String> connectorConfig;
private Map<String, String> connectorConfigWithOAuth;

@Before
public void setup() {
this.streamingClientHandler = new DirectStreamingClientHandler();
this.connectorConfig = TestUtils.getConfForStreaming();
this.connectorConfigWithOAuth = TestUtils.getConfForStreamingWithOAuth();
}

@Test
Expand Down Expand Up @@ -67,9 +65,10 @@ public void testCreateClient() throws Exception {
@Test
@Ignore // TODO: Remove ignore after SNOW-859929 is released
public void testCreateOAuthClient() {
if (this.connectorConfigWithOAuth != null) {
Map<String, String> connectorConfigWithOAuth = TestUtils.getConfForStreamingWithOAuth();
if (connectorConfigWithOAuth != null) {
this.streamingClientHandler.createClient(
new StreamingClientProperties(this.connectorConfigWithOAuth));
new StreamingClientProperties(connectorConfigWithOAuth));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ private static Stream<Arguments> singleBufferParameters() {
}

private static Stream<Arguments> oAuthAndSingleBufferParameters() {
return TestUtils.nBooleanProduct(2);
return Stream.of(Arguments.of(false, false), Arguments.of(false, true));
// OAuth tests are temporary disabled
// return TestUtils.nBooleanProduct(2);
}

@ParameterizedTest(name = "useOAuth: {0}, useSingleBuffer: {1}")
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/log4j.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
log4j.rootLogger=ALL, STDOUT, file
log4j.rootLogger=INFO, STDOUT, file
log4j.logger.deng=INFO
log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender
log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout
Expand Down

0 comments on commit c393b47

Please sign in to comment.