Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
import org.apache.iceberg.Table;
import org.apache.iceberg.expressions.Expressions;
import org.apache.iceberg.types.Types;
import org.testng.annotations.Test;
import org.junit.jupiter.api.Test;

Comment thread
findepi marked this conversation as resolved.
import java.io.IOException;
import java.io.UncheckedIOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@
import io.trino.plugin.iceberg.catalog.TrinoCatalog;
import io.trino.plugin.iceberg.catalog.hms.TrinoHiveCatalog;
import io.trino.spi.type.TestingTypeManager;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.TestInstance;

import java.io.File;
import java.io.IOException;
Expand All @@ -35,14 +36,16 @@
import static io.trino.plugin.hive.HiveTestUtils.HDFS_FILE_SYSTEM_FACTORY;
import static io.trino.plugin.hive.metastore.cache.CachingHiveMetastore.memoizeMetastore;
import static io.trino.plugin.hive.metastore.file.TestingFileHiveMetastore.createTestingFileHiveMetastore;
import static org.junit.jupiter.api.TestInstance.Lifecycle.PER_CLASS;

@TestInstance(PER_CLASS)
public class TestTrinoHiveCatalogWithFileMetastore
extends BaseTrinoCatalogTest
{
private HiveMetastore metastore;
private Path tempDir;

@BeforeClass
@BeforeAll
public void setUp()
throws Exception
{
Expand All @@ -51,7 +54,7 @@ public void setUp()
metastore = createTestingFileHiveMetastore(metastoreDir);
}

@AfterClass(alwaysRun = true)
@AfterAll
public void tearDown()
throws IOException
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import io.trino.spi.security.PrincipalType;
import io.trino.spi.security.TrinoPrincipal;
import io.trino.spi.type.TestingTypeManager;
import org.testng.annotations.Test;
import org.junit.jupiter.api.Test;
Comment thread
findepi marked this conversation as resolved.

import java.io.File;
import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@
import io.trino.plugin.iceberg.catalog.TrinoCatalog;
import io.trino.spi.security.ConnectorIdentity;
import io.trino.spi.type.TestingTypeManager;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.TestInstance;

import java.util.Map;
import java.util.Optional;
Expand All @@ -53,7 +54,9 @@
import static io.trino.testing.containers.Minio.MINIO_ACCESS_KEY;
import static io.trino.testing.containers.Minio.MINIO_SECRET_KEY;
import static java.util.concurrent.TimeUnit.MINUTES;
import static org.junit.jupiter.api.TestInstance.Lifecycle.PER_CLASS;

@TestInstance(PER_CLASS)
public class TestTrinoHiveCatalogWithHiveMetastore
extends BaseTrinoCatalogTest
{
Expand All @@ -62,14 +65,14 @@ public class TestTrinoHiveCatalogWithHiveMetastore
// Use MinIO for storage, since HDFS is hard to get working in a unit test
private HiveMinioDataLake dataLake;

@BeforeClass
@BeforeAll
public void setUp()
{
dataLake = new HiveMinioDataLake(bucketName, HIVE3_IMAGE);
dataLake.start();
}

@AfterClass(alwaysRun = true)
@AfterAll
public void tearDown()
throws Exception
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,12 @@
import io.trino.spi.security.TrinoPrincipal;
import io.trino.spi.type.TestingTypeManager;
import org.apache.iceberg.nessie.NessieIcebergClient;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestInstance;
import org.projectnessie.client.api.NessieApiV1;
import org.projectnessie.client.http.HttpClientBuilder;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;

import java.io.File;
import java.io.IOException;
Expand All @@ -54,20 +55,22 @@
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.assertj.core.api.Assertions.fail;
import static org.junit.jupiter.api.TestInstance.Lifecycle.PER_CLASS;

@TestInstance(PER_CLASS)
public class TestTrinoNessieCatalog
extends BaseTrinoCatalogTest
{
private NessieContainer nessieContainer;

@BeforeClass
@BeforeAll
public void setupServer()
{
nessieContainer = NessieContainer.builder().build();
nessieContainer.start();
}

@AfterClass(alwaysRun = true)
@AfterAll
public void teardownServer()
{
if (nessieContainer != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import org.apache.iceberg.rest.DelegatingRestSessionCatalog;
import org.apache.iceberg.rest.RESTSessionCatalog;
import org.assertj.core.util.Files;
import org.junit.jupiter.api.Test;

import java.io.File;

Expand Down Expand Up @@ -61,13 +62,15 @@ protected TrinoCatalog createTrinoCatalog(boolean useUniqueTableLocations)
return new TrinoRestCatalog(restSessionCatalog, new CatalogName(catalogName), NONE, "test", useUniqueTableLocations);
}

@Test
Comment thread
findepi marked this conversation as resolved.
@Override
public void testView()
{
assertThatThrownBy(super::testView)
.hasMessageContaining("createView is not supported for Iceberg REST catalog");
}

@Test
@Override
public void testNonLowercaseNamespace()
{
Expand Down