Skip to content

Commit

Permalink
fix its
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaojiebao committed Aug 5, 2024
1 parent 4004cfd commit 0f18c38
Showing 1 changed file with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import org.apache.gravitino.integration.test.util.AbstractIT;
import org.apache.gravitino.integration.test.util.GravitinoITUtils;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Tag;
Expand Down Expand Up @@ -86,6 +87,19 @@ public static void tearDown() {
}
}

@AfterEach
public void cleanUp() {
String[] catalog = metalake.listCatalogs();
for (String catalogName : catalog) {
Catalog filesetCatalog = metalake.loadCatalog(catalogName);
String[] schemas = filesetCatalog.asSchemas().listSchemas();
for (String schemaName : schemas) {
filesetCatalog.asSchemas().dropSchema(schemaName, true);
}
metalake.dropCatalog(catalogName);
}
}

@Test
public void testGetFilesetContext() {
String catalogName = GravitinoITUtils.genRandomName("catalog");
Expand All @@ -104,8 +118,7 @@ public void testGetFilesetContext() {
Assertions.assertTrue(catalog.asSchemas().schemaExists(schemaName));

String filesetName = GravitinoITUtils.genRandomName("fileset");
NameIdentifier filesetIdent =
NameIdentifier.of(metalakeName, catalogName, schemaName, filesetName);
NameIdentifier filesetIdent = NameIdentifier.of(schemaName, filesetName);
Assertions.assertFalse(catalog.asFilesetCatalog().filesetExists(filesetIdent));
Fileset expectedFileset =
catalog
Expand Down

0 comments on commit 0f18c38

Please sign in to comment.