@@ -212,7 +212,6 @@ public Map<String, String> getConfigOverrides() {
212212 @ Inject PolarisEventListener polarisEventListener ;
213213
214214 private IcebergCatalog catalog ;
215- private CallContext callContext ;
216215 private String realmName ;
217216 private PolarisMetaStoreManager metaStoreManager ;
218217 private UserSecretsManager userSecretsManager ;
@@ -260,8 +259,6 @@ public void before(TestInfo testInfo) {
260259 new PolarisEntityManager (
261260 metaStoreManager , new StorageCredentialCache (), createEntityCache (metaStoreManager ));
262261
263- callContext = CallContext .of (realmContext , polarisContext );
264-
265262 PrincipalEntity rootEntity =
266263 new PrincipalEntity (
267264 PolarisEntity .of (
@@ -285,7 +282,7 @@ public void before(TestInfo testInfo) {
285282
286283 adminService =
287284 new PolarisAdminService (
288- callContext ,
285+ polarisContext ,
289286 entityManager ,
290287 metaStoreManager ,
291288 userSecretsManager ,
@@ -369,13 +366,13 @@ protected IcebergCatalog initCatalog(
369366 String catalogName , Map <String , String > additionalProperties ) {
370367 PolarisPassthroughResolutionView passthroughView =
371368 new PolarisPassthroughResolutionView (
372- callContext , entityManager , securityContext , CATALOG_NAME );
369+ polarisContext , entityManager , securityContext , CATALOG_NAME );
373370 TaskExecutor taskExecutor = Mockito .mock ();
374371 IcebergCatalog icebergCatalog =
375372 new IcebergCatalog (
376373 entityManager ,
377374 metaStoreManager ,
378- callContext ,
375+ polarisContext ,
379376 passthroughView ,
380377 securityContext ,
381378 taskExecutor ,
@@ -661,7 +658,7 @@ public void testValidateNotificationFailToCreateFileIO() {
661658 final String tableMetadataLocation = tableLocation + "metadata/" ;
662659 PolarisPassthroughResolutionView passthroughView =
663660 new PolarisPassthroughResolutionView (
664- callContext , entityManager , securityContext , catalog ().name ());
661+ polarisContext , entityManager , securityContext , catalog ().name ());
665662 FileIOFactory fileIOFactory =
666663 spy (
667664 new DefaultFileIOFactory (
@@ -672,7 +669,7 @@ public void testValidateNotificationFailToCreateFileIO() {
672669 new IcebergCatalog (
673670 entityManager ,
674671 metaStoreManager ,
675- callContext ,
672+ polarisContext ,
676673 passthroughView ,
677674 securityContext ,
678675 Mockito .mock (TaskExecutor .class ),
@@ -997,13 +994,13 @@ public void testUpdateNotificationCreateTableWithLocalFilePrefix() {
997994
998995 PolarisPassthroughResolutionView passthroughView =
999996 new PolarisPassthroughResolutionView (
1000- callContext , entityManager , securityContext , catalogWithoutStorage );
997+ polarisContext , entityManager , securityContext , catalogWithoutStorage );
1001998 TaskExecutor taskExecutor = Mockito .mock ();
1002999 IcebergCatalog catalog =
10031000 new IcebergCatalog (
10041001 entityManager ,
10051002 metaStoreManager ,
1006- callContext ,
1003+ polarisContext ,
10071004 passthroughView ,
10081005 securityContext ,
10091006 taskExecutor ,
@@ -1030,11 +1027,10 @@ public void testUpdateNotificationCreateTableWithLocalFilePrefix() {
10301027 metadataLocation ,
10311028 TableMetadataParser .toJson (createSampleTableMetadata (metadataLocation )).getBytes (UTF_8 ));
10321029
1033- PolarisCallContext polarisCallContext = callContext .getPolarisCallContext ();
1034- if (!polarisCallContext
1030+ if (!polarisContext
10351031 .getConfigurationStore ()
10361032 .getConfiguration (
1037- callContext .getRealmContext (), FeatureConfiguration .SUPPORTED_CATALOG_STORAGE_TYPES )
1033+ polarisContext .getRealmContext (), FeatureConfiguration .SUPPORTED_CATALOG_STORAGE_TYPES )
10381034 .contains ("FILE" )) {
10391035 Assertions .assertThatThrownBy (() -> catalog .sendNotification (table , request ))
10401036 .isInstanceOf (ForbiddenException .class )
@@ -1063,14 +1059,14 @@ public void testUpdateNotificationCreateTableWithHttpPrefix() {
10631059
10641060 PolarisPassthroughResolutionView passthroughView =
10651061 new PolarisPassthroughResolutionView (
1066- callContext , entityManager , securityContext , catalogName );
1062+ polarisContext , entityManager , securityContext , catalogName );
10671063 TaskExecutor taskExecutor = Mockito .mock ();
10681064 InMemoryFileIO localFileIO = new InMemoryFileIO ();
10691065 IcebergCatalog catalog =
10701066 new IcebergCatalog (
10711067 entityManager ,
10721068 metaStoreManager ,
1073- callContext ,
1069+ polarisContext ,
10741070 passthroughView ,
10751071 securityContext ,
10761072 taskExecutor ,
@@ -1099,11 +1095,10 @@ public void testUpdateNotificationCreateTableWithHttpPrefix() {
10991095 metadataLocation ,
11001096 TableMetadataParser .toJson (createSampleTableMetadata (metadataLocation )).getBytes (UTF_8 ));
11011097
1102- PolarisCallContext polarisCallContext = callContext .getPolarisCallContext ();
1103- if (!polarisCallContext
1098+ if (!polarisContext
11041099 .getConfigurationStore ()
11051100 .getConfiguration (
1106- callContext .getRealmContext (), FeatureConfiguration .SUPPORTED_CATALOG_STORAGE_TYPES )
1101+ polarisContext .getRealmContext (), FeatureConfiguration .SUPPORTED_CATALOG_STORAGE_TYPES )
11071102 .contains ("FILE" )) {
11081103 Assertions .assertThatThrownBy (() -> catalog .sendNotification (table , request ))
11091104 .isInstanceOf (ForbiddenException .class )
@@ -1122,10 +1117,10 @@ public void testUpdateNotificationCreateTableWithHttpPrefix() {
11221117 httpsMetadataLocation ,
11231118 TableMetadataParser .toJson (createSampleTableMetadata (metadataLocation )).getBytes (UTF_8 ));
11241119
1125- if (!polarisCallContext
1120+ if (!polarisContext
11261121 .getConfigurationStore ()
11271122 .getConfiguration (
1128- callContext .getRealmContext (), FeatureConfiguration .SUPPORTED_CATALOG_STORAGE_TYPES )
1123+ polarisContext .getRealmContext (), FeatureConfiguration .SUPPORTED_CATALOG_STORAGE_TYPES )
11291124 .contains ("FILE" )) {
11301125 Assertions .assertThatThrownBy (() -> catalog .sendNotification (table , newRequest ))
11311126 .isInstanceOf (ForbiddenException .class )
@@ -1566,7 +1561,7 @@ public void testDropTableWithPurge() {
15661561 new RealmEntityManagerFactory (metaStoreManagerFactory ),
15671562 metaStoreManagerFactory ,
15681563 configurationStore ))
1569- .apply (taskEntity , callContext );
1564+ .apply (taskEntity , polarisContext );
15701565 Assertions .assertThat (fileIO ).isNotNull ().isInstanceOf (ExceptionMappingFileIO .class );
15711566 Assertions .assertThat (((ExceptionMappingFileIO ) fileIO ).getInnerIo ())
15721567 .isInstanceOf (InMemoryFileIO .class );
@@ -1600,12 +1595,12 @@ public void testDropTableWithPurgeDisabled() {
16001595 .asCatalog ()));
16011596 PolarisPassthroughResolutionView passthroughView =
16021597 new PolarisPassthroughResolutionView (
1603- callContext , entityManager , securityContext , noPurgeCatalogName );
1598+ polarisContext , entityManager , securityContext , noPurgeCatalogName );
16041599 IcebergCatalog noPurgeCatalog =
16051600 new IcebergCatalog (
16061601 entityManager ,
16071602 metaStoreManager ,
1608- callContext ,
1603+ polarisContext ,
16091604 passthroughView ,
16101605 securityContext ,
16111606 Mockito .mock (),
@@ -1703,7 +1698,7 @@ static Stream<Arguments> testRetriableException() {
17031698 public void testFileIOWrapper () {
17041699 PolarisPassthroughResolutionView passthroughView =
17051700 new PolarisPassthroughResolutionView (
1706- callContext , entityManager , securityContext , CATALOG_NAME );
1701+ polarisContext , entityManager , securityContext , CATALOG_NAME );
17071702
17081703 MeasuredFileIOFactory measured =
17091704 new MeasuredFileIOFactory (
@@ -1714,7 +1709,7 @@ public void testFileIOWrapper() {
17141709 new IcebergCatalog (
17151710 entityManager ,
17161711 metaStoreManager ,
1717- callContext ,
1712+ polarisContext ,
17181713 passthroughView ,
17191714 securityContext ,
17201715 Mockito .mock (),
@@ -1748,8 +1743,7 @@ public void testFileIOWrapper() {
17481743 TaskEntity taskEntity =
17491744 TaskEntity .of (
17501745 metaStoreManager
1751- .loadTasks (
1752- callContext .getPolarisCallContext (), "testExecutor" , PageToken .fromLimit (1 ))
1746+ .loadTasks (polarisContext , "testExecutor" , PageToken .fromLimit (1 ))
17531747 .getEntities ()
17541748 .getFirst ());
17551749 Map <String , String > properties = taskEntity .getInternalPropertiesAsMap ();
@@ -1781,7 +1775,7 @@ public FileIO loadFileIO(
17811775 TableCleanupTaskHandler handler =
17821776 new TableCleanupTaskHandler (
17831777 Mockito .mock (), createMockMetaStoreManagerFactory (), taskFileIOSupplier );
1784- handler .handleTask (taskEntity , callContext );
1778+ handler .handleTask (taskEntity , polarisContext );
17851779 Assertions .assertThat (measured .getNumDeletedFiles ()).as ("A table was deleted" ).isGreaterThan (0 );
17861780 }
17871781
@@ -1810,12 +1804,12 @@ public void testConcurrencyConflictCreateTableUpdatedDuringFinalTransaction() {
18101804 PolarisMetaStoreManager spyMetaStore = spy (metaStoreManager );
18111805 PolarisPassthroughResolutionView passthroughView =
18121806 new PolarisPassthroughResolutionView (
1813- callContext , entityManager , securityContext , CATALOG_NAME );
1807+ polarisContext , entityManager , securityContext , CATALOG_NAME );
18141808 final IcebergCatalog catalog =
18151809 new IcebergCatalog (
18161810 entityManager ,
18171811 spyMetaStore ,
1818- callContext ,
1812+ polarisContext ,
18191813 passthroughView ,
18201814 securityContext ,
18211815 Mockito .mock (TaskExecutor .class ),
@@ -1859,12 +1853,12 @@ public void testConcurrencyConflictUpdateTableDuringFinalTransaction() {
18591853 PolarisMetaStoreManager spyMetaStore = spy (metaStoreManager );
18601854 PolarisPassthroughResolutionView passthroughView =
18611855 new PolarisPassthroughResolutionView (
1862- callContext , entityManager , securityContext , CATALOG_NAME );
1856+ polarisContext , entityManager , securityContext , CATALOG_NAME );
18631857 final IcebergCatalog catalog =
18641858 new IcebergCatalog (
18651859 entityManager ,
18661860 spyMetaStore ,
1867- callContext ,
1861+ polarisContext ,
18681862 passthroughView ,
18691863 securityContext ,
18701864 Mockito .mock (TaskExecutor .class ),
0 commit comments