Skip to content

Commit

Permalink
Fix test compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-psaha committed Dec 13, 2023
1 parent 56da9a0 commit 8fded57
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ public void setup() {
"key",
1234L,
OpenChannelRequest.OnErrorOption.CONTINUE,
UTC);
UTC,
false);
channel2 =
new SnowflakeStreamingIngestChannelInternal<>(
"channel2",
Expand All @@ -52,7 +53,8 @@ public void setup() {
"key",
1234L,
OpenChannelRequest.OnErrorOption.CONTINUE,
UTC);
UTC,
false);
channel3 =
new SnowflakeStreamingIngestChannelInternal<>(
"channel3",
Expand All @@ -66,7 +68,8 @@ public void setup() {
"key",
1234L,
OpenChannelRequest.OnErrorOption.CONTINUE,
UTC);
UTC,
false);
cache.addChannel(channel1);
cache.addChannel(channel2);
cache.addChannel(channel3);
Expand All @@ -92,7 +95,8 @@ public void testAddChannel() {
"key",
1234L,
OpenChannelRequest.OnErrorOption.CONTINUE,
UTC);
UTC,
false);
cache.addChannel(channel);
Assert.assertEquals(1, cache.getSize());
Assert.assertTrue(channel == cache.iterator().next().getValue().get(channelName));
Expand All @@ -110,7 +114,8 @@ public void testAddChannel() {
"key",
1234L,
OpenChannelRequest.OnErrorOption.CONTINUE,
UTC);
UTC,
false);
cache.addChannel(channelDup);
// The old channel should be invalid now
Assert.assertTrue(!channel.isValid());
Expand Down Expand Up @@ -191,7 +196,8 @@ public void testRemoveChannel() {
"key",
1234L,
OpenChannelRequest.OnErrorOption.CONTINUE,
UTC);
UTC,
false);
cache.removeChannelIfSequencersMatch(channel3Dup);
// Verify that remove the same channel with a different channel sequencer is a no op
Assert.assertEquals(1, cache.getSize());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,8 @@ SnowflakeStreamingIngestChannelInternal<List<List<Object>>> createChannel(
encryptionKeyId,
onErrorOption,
defaultTimezone,
Constants.BdecVersion.THREE);
Constants.BdecVersion.THREE,
false);
}

@Override
Expand Down Expand Up @@ -874,7 +875,8 @@ public void testInvalidateChannels() {
"key",
1234L,
OpenChannelRequest.OnErrorOption.CONTINUE,
ZoneOffset.UTC);
ZoneOffset.UTC,
false);

SnowflakeStreamingIngestChannelInternal<StubChunkData> channel2 =
new SnowflakeStreamingIngestChannelInternal<>(
Expand All @@ -889,7 +891,8 @@ public void testInvalidateChannels() {
"key",
1234L,
OpenChannelRequest.OnErrorOption.CONTINUE,
ZoneOffset.UTC);
ZoneOffset.UTC,
false);

channelCache.addChannel(channel1);
channelCache.addChannel(channel2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ public void testChannelValid() {
"key",
1234L,
OpenChannelRequest.OnErrorOption.CONTINUE,
UTC);
UTC,
false);

Assert.assertTrue(channel.isValid());
channel.invalidate("from testChannelValid");
Expand Down Expand Up @@ -221,7 +222,8 @@ public void testChannelClose() {
"key",
1234L,
OpenChannelRequest.OnErrorOption.CONTINUE,
UTC);
UTC,
false);

Assert.assertFalse(channel.isClosed());
channel.markClosed();
Expand Down Expand Up @@ -548,7 +550,8 @@ public void testInsertRow() {
"key",
1234L,
OpenChannelRequest.OnErrorOption.CONTINUE,
UTC);
UTC,
false);

ColumnMetadata col = new ColumnMetadata();
col.setName("COL");
Expand Down Expand Up @@ -629,7 +632,8 @@ public void testInsertTooLargeRow() {
"key",
1234L,
OpenChannelRequest.OnErrorOption.CONTINUE,
UTC);
UTC,
false);
channel.setupSchema(schema);

InsertValidationResponse insertValidationResponse = channel.insertRow(row, "token-1");
Expand All @@ -653,7 +657,8 @@ public void testInsertTooLargeRow() {
"key",
1234L,
OpenChannelRequest.OnErrorOption.ABORT,
UTC);
UTC,
false);
channel.setupSchema(schema);

try {
Expand All @@ -678,7 +683,8 @@ public void testInsertTooLargeRow() {
"key",
1234L,
OpenChannelRequest.OnErrorOption.SKIP_BATCH,
UTC);
UTC,
false);
channel.setupSchema(schema);

insertValidationResponse = channel.insertRow(row, "token-1");
Expand Down Expand Up @@ -711,7 +717,8 @@ public void testInsertRowThrottling() {
"key",
1234L,
OpenChannelRequest.OnErrorOption.CONTINUE,
UTC);
UTC,
false);

ParameterProvider parameterProvider = new ParameterProvider();
memoryInfoProvider.freeMemory =
Expand Down Expand Up @@ -757,7 +764,8 @@ public void testFlush() throws Exception {
"key",
1234L,
OpenChannelRequest.OnErrorOption.CONTINUE,
UTC);
UTC,
false);
ChannelsStatusResponse response = new ChannelsStatusResponse();
response.setStatusCode(0L);
response.setMessage("Success");
Expand Down Expand Up @@ -793,7 +801,8 @@ public void testClose() throws Exception {
"key",
1234L,
OpenChannelRequest.OnErrorOption.CONTINUE,
UTC);
UTC,
false);
ChannelsStatusResponse response = new ChannelsStatusResponse();
response.setStatusCode(0L);
response.setMessage("Success");
Expand Down Expand Up @@ -827,7 +836,8 @@ public void testGetLatestCommittedOffsetToken() {
"key",
1234L,
OpenChannelRequest.OnErrorOption.CONTINUE,
UTC);
UTC,
false);

ChannelsStatusResponse response = new ChannelsStatusResponse();
response.setStatusCode(0L);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ public void setup() {
1234L,
OpenChannelRequest.OnErrorOption.CONTINUE,
ZoneOffset.UTC,
BDEC_VERSION);
BDEC_VERSION,
false);
channel2 =
new SnowflakeStreamingIngestChannelInternal<>(
"channel2",
Expand All @@ -108,7 +109,8 @@ public void setup() {
1234L,
OpenChannelRequest.OnErrorOption.CONTINUE,
ZoneOffset.UTC,
BDEC_VERSION);
BDEC_VERSION,
false);
channel3 =
new SnowflakeStreamingIngestChannelInternal<>(
"channel3",
Expand All @@ -123,7 +125,8 @@ public void setup() {
1234L,
OpenChannelRequest.OnErrorOption.CONTINUE,
ZoneOffset.UTC,
BDEC_VERSION);
BDEC_VERSION,
false);
channel4 =
new SnowflakeStreamingIngestChannelInternal<>(
"channel4",
Expand All @@ -138,7 +141,8 @@ public void setup() {
1234L,
OpenChannelRequest.OnErrorOption.CONTINUE,
ZoneOffset.UTC,
BDEC_VERSION);
BDEC_VERSION,
false);
}

@Test
Expand Down Expand Up @@ -354,7 +358,8 @@ public void testGetChannelsStatusWithRequest() throws Exception {
1234L,
OpenChannelRequest.OnErrorOption.CONTINUE,
ZoneOffset.UTC,
BDEC_VERSION);
BDEC_VERSION,
false);

ChannelsStatusRequest.ChannelStatusRequestDTO dto =
new ChannelsStatusRequest.ChannelStatusRequestDTO(channel);
Expand Down Expand Up @@ -413,7 +418,8 @@ public void testGetChannelsStatusWithRequestError() throws Exception {
1234L,
OpenChannelRequest.OnErrorOption.CONTINUE,
ZoneOffset.UTC,
BDEC_VERSION);
BDEC_VERSION,
false);

try {
client.getChannelsStatus(Collections.singletonList(channel));
Expand Down Expand Up @@ -454,7 +460,8 @@ public void testRegisterBlobRequestCreationSuccess() throws Exception {
1234L,
OpenChannelRequest.OnErrorOption.CONTINUE,
ZoneOffset.UTC,
BDEC_VERSION);
BDEC_VERSION,
false);

ChannelMetadata channelMetadata =
ChannelMetadata.builder()
Expand Down Expand Up @@ -1141,7 +1148,8 @@ public void testRegisterBlobResponseWithInvalidChannel() throws Exception {
"key",
1234L,
OpenChannelRequest.OnErrorOption.CONTINUE,
UTC);
UTC,
false);
SnowflakeStreamingIngestChannelInternal<StubChunkData> channel2 =
new SnowflakeStreamingIngestChannelInternal<>(
channel2Name,
Expand All @@ -1155,7 +1163,8 @@ public void testRegisterBlobResponseWithInvalidChannel() throws Exception {
"key",
1234L,
OpenChannelRequest.OnErrorOption.CONTINUE,
UTC);
UTC,
false);
client.getChannelCache().addChannel(channel1);
client.getChannelCache().addChannel(channel2);

Expand Down Expand Up @@ -1282,7 +1291,8 @@ public void testVerifyChannelsAreFullyCommittedSuccess() throws Exception {
"key",
1234L,
OpenChannelRequest.OnErrorOption.CONTINUE,
UTC);
UTC,
false);
client.getChannelCache().addChannel(channel);

ChannelsStatusResponse response = new ChannelsStatusResponse();
Expand Down Expand Up @@ -1370,7 +1380,8 @@ public void testGetLatestCommittedOffsetTokens() throws Exception {
1234L,
OpenChannelRequest.OnErrorOption.CONTINUE,
ZoneOffset.UTC,
BDEC_VERSION);
BDEC_VERSION,
false);

ChannelsStatusRequest.ChannelStatusRequestDTO dto =
new ChannelsStatusRequest.ChannelStatusRequestDTO(channel);
Expand Down

0 comments on commit 8fded57

Please sign in to comment.