8989import static org .apache .fluss .metadata .DataLakeFormat .PAIMON ;
9090import static org .apache .fluss .record .TestData .DATA1_SCHEMA ;
9191import static org .apache .fluss .testutils .DataTestUtils .row ;
92+ import static org .apache .fluss .testutils .common .CommonTestUtils .waitUntil ;
9293import static org .assertj .core .api .Assertions .assertThat ;
9394import static org .assertj .core .api .Assertions .assertThatThrownBy ;
9495
@@ -1070,7 +1071,7 @@ tablePath, newPartitionSpec("age", "11"), false)
10701071 }
10711072
10721073 @ Test
1073- void testDynamicConfigs () throws ExecutionException , InterruptedException {
1074+ void testDynamicConfigs () throws Exception {
10741075 assertThat (
10751076 FLUSS_CLUSTER_EXTENSION
10761077 .getCoordinatorServer ()
@@ -1092,20 +1093,33 @@ void testDynamicConfigs() throws ExecutionException, InterruptedException {
10921093 assertConfigEntry (
10931094 DATALAKE_FORMAT .key (), null , ConfigEntry .ConfigSource .DYNAMIC_SERVER_CONFIG );
10941095
1095- // Delete dynamic configs to use the initial value(from server.yaml)
10961096 admin .alterClusterConfigs (
1097- Collections .singletonList (
1097+ Arrays .asList (
1098+ new AlterConfig (
1099+ DATALAKE_FORMAT .key (), "paimon" , AlterConfigOpType .SET ),
10981100 new AlterConfig (
1099- DATALAKE_FORMAT .key (), null , AlterConfigOpType .DELETE )))
1101+ "datalake.paimon.warehouse" ,
1102+ "test-warehouse" ,
1103+ AlterConfigOpType .SET )))
11001104 .get ();
1101- assertThat (
1102- FLUSS_CLUSTER_EXTENSION
1103- .getCoordinatorServer ()
1104- .getCoordinatorService ()
1105- .getDataLakeFormat ())
1106- .isEqualTo (PAIMON );
1107- assertConfigEntry (
1108- DATALAKE_FORMAT .key (), "paimon" , ConfigEntry .ConfigSource .INITIAL_SERVER_CONFIG );
1105+ TablePath tablePath = TablePath .of ("test_db" , "test_table" );
1106+ createTable (
1107+ tablePath ,
1108+ TableDescriptor .builder ()
1109+ .schema (DEFAULT_SCHEMA )
1110+ .property (ConfigOptions .TABLE_DATALAKE_ENABLED , true )
1111+ .build (),
1112+ true );
1113+
1114+ waitUntil (
1115+ () -> {
1116+ TableInfo tableInfo = admin .getTableInfo (tablePath ).get ();
1117+ Map <String , String > tableProperties = tableInfo .getProperties ().toMap ();
1118+ return "test-warehouse"
1119+ .equals (tableProperties .get ("table.datalake.paimon.warehouse" ));
1120+ },
1121+ Duration .ofMinutes (1 ),
1122+ "Get lakehouse info" );
11091123 }
11101124
11111125 private void assertConfigEntry (
0 commit comments