Skip to content

Commit

Permalink
check if table exist and db exists after db delete was blocked
Browse files Browse the repository at this point in the history
  • Loading branch information
Giorgio Trettenero committed Dec 7, 2024
1 parent 9c137dc commit 41d021a
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.netflix.metacat.common.server.connectors.ConnectorRequestContext;
import com.netflix.metacat.common.server.connectors.exception.DatabaseAlreadyExistsException;
import com.netflix.metacat.common.server.connectors.exception.DatabaseNotFoundException;
import com.netflix.metacat.common.server.connectors.exception.InvalidMetaException;
import com.netflix.metacat.common.server.connectors.model.AuditInfo;
import com.netflix.metacat.common.server.connectors.model.DatabaseInfo;
import com.netflix.metacat.common.server.connectors.model.TableInfo;
Expand Down Expand Up @@ -218,10 +219,11 @@ public void testDeleteDbNoCascades() {

polarisDBService.delete(requestContext, DB1_QUALIFIED_NAME);

// Assertions.assertThrows(InvalidMetaException.class, () ->
// polarisDBService.delete(requestContext, DB1_QUALIFIED_NAME));
Assertions.assertThrows(InvalidMetaException.class, () ->
polarisDBService.delete(requestContext, DB1_QUALIFIED_NAME));

Assert.assertTrue(polarisTableService.exists(requestContext, qualifiedName));
Assert.assertFalse(polarisDBService.exists(requestContext, DB1_QUALIFIED_NAME));
Assert.assertTrue(polarisDBService.exists(requestContext, DB1_QUALIFIED_NAME));

}
}

0 comments on commit 41d021a

Please sign in to comment.