Skip to content

Commit

Permalink
Add Kafka tests against latest 5.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
adamjshook authored and electrum committed Dec 1, 2020
1 parent 4842b6e commit e10e810
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.prestosql.plugin.kafka;

import io.prestosql.testing.AbstractTestQueries;
import io.prestosql.testing.QueryRunner;
import io.prestosql.testing.kafka.TestingKafka;
import io.prestosql.tpch.TpchTable;
import org.testng.annotations.AfterClass;
import org.testng.annotations.Test;

@Test
public class TestKafkaDistributedLatest
extends AbstractTestQueries
{
private TestingKafka testingKafka;

@Override
protected QueryRunner createQueryRunner()
throws Exception
{
testingKafka = new TestingKafka("5.5.2");
return KafkaQueryRunner.builder(testingKafka)
.setTables(TpchTable.getTables())
.build();
}

@AfterClass(alwaysRun = true)
public void destroy()
{
if (testingKafka != null) {
testingKafka.close();
testingKafka = null;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,12 @@ public class TestingKafka

public TestingKafka()
{
container = new KafkaContainer("5.4.1")
this("5.2.1");
}

public TestingKafka(String confluentPlatformVersion)
{
container = new KafkaContainer(confluentPlatformVersion)
.withNetwork(Network.SHARED)
.withNetworkAliases("kafka");
}
Expand Down

0 comments on commit e10e810

Please sign in to comment.