Skip to content

Commit

Permalink
SNOW-983635 Add even more datatype tests with ZSTD
Browse files Browse the repository at this point in the history
Description

Testing
  • Loading branch information
sfc-gh-lthiede committed Jan 29, 2024
1 parent ff91de2 commit 0e743c8
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,17 @@
import net.snowflake.ingest.streaming.SnowflakeStreamingIngestClient;
import net.snowflake.ingest.streaming.SnowflakeStreamingIngestClientFactory;
import net.snowflake.ingest.utils.Constants;
import static net.snowflake.ingest.utils.ParameterProvider.BDEC_PARQUET_COMPRESSION_ALGORITHM;
import net.snowflake.ingest.utils.SFException;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameter;
import org.junit.runners.Parameterized.Parameters;

@RunWith(Parameterized.class)
public abstract class AbstractDataTypeTest {
private static final String SOURCE_COLUMN_NAME = "source";
private static final String VALUE_COLUMN_NAME = "value";
Expand Down Expand Up @@ -56,6 +62,14 @@ public abstract class AbstractDataTypeTest {
private SnowflakeStreamingIngestClient client;
private static final ObjectMapper objectMapper = new ObjectMapper();

@Parameters(name = "{index}: {0}")
public static Object[] compressionAlgorithms() {
return new Object[] {"GZIP", "ZSTD"};
}

@Parameter
public String compressionAlgorithm;

@Before
public void before() throws Exception {
databaseName = String.format("SDK_DATATYPE_COMPATIBILITY_IT_%s", getRandomIdentifier());
Expand All @@ -70,6 +84,7 @@ public void before() throws Exception {
if (props.getProperty(ROLE).equals("DEFAULT_ROLE")) {
props.setProperty(ROLE, "ACCOUNTADMIN");
}
prop.setProperty(BDEC_PARQUET_COMPRESSION_ALGORITHM, compressionAlgorithm);
client = SnowflakeStreamingIngestClientFactory.builder("client1").setProperties(props).build();
}

Expand Down

0 comments on commit 0e743c8

Please sign in to comment.