Skip to content

Commit 8cd4bc0

Browse files
committed
[hotfix] Fix test in RESTCatalogTest
1 parent 324565f commit 8cd4bc0

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

paimon-core/src/test/java/org/apache/paimon/rest/RESTCatalogTest.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
import org.apache.paimon.reader.RecordReader;
4141
import org.apache.paimon.rest.auth.DLFToken;
4242
import org.apache.paimon.rest.exceptions.BadRequestException;
43+
import org.apache.paimon.rest.exceptions.ForbiddenException;
4344
import org.apache.paimon.rest.responses.ConfigResponse;
4445
import org.apache.paimon.schema.Schema;
4546
import org.apache.paimon.schema.SchemaChange;
@@ -306,9 +307,7 @@ void testApiWhenTableNoPermission() throws Exception {
306307
assertThrows(
307308
Catalog.TableNoPermissionException.class,
308309
() -> restCatalog.fastForward(identifier, "test_branch"));
309-
assertThrows(
310-
Catalog.TableNoPermissionException.class,
311-
() -> restCatalog.api().loadTableToken(identifier));
310+
assertThrows(ForbiddenException.class, () -> restCatalog.api().loadTableToken(identifier));
312311
assertThrows(
313312
Catalog.TableNoPermissionException.class,
314313
() -> restCatalog.loadSnapshot(identifier));

0 commit comments

Comments
 (0)