luoyuxia commented on code in PR #2365:
URL: https://github.com/apache/fluss/pull/2365#discussion_r2690216720
##########
fluss-server/src/test/java/org/apache/fluss/server/coordinator/LakeTableManagerITCase.java:
##########
@@ -106,4 +117,197 @@ void testCreateAndGetTable() throws Exception {
.isInstanceOf(TableAlreadyExistException.class)
.hasMessage("Table %s already exists.", lakeTablePath);
}
+
+ @Test
+ void testAlterTableDatalakeFreshness() throws Exception {
+ AdminReadOnlyGateway gateway = getAdminOnlyGateway(true);
+ AdminGateway adminGateway = getAdminGateway();
+
+ String db1 = "test_alter_freshness_db";
Review Comment:
Also, don't forget to update `LakeTableTieringManager` to update the
`tableLakeFreshness` field for this table. Otherwise, the fressness change
won't work. It just update the table option, the tiering interval will still
use the old interval since `LakeTableTieringManager` control the tiering
interval.
And could you please also add test case to verify it?
- create a table a large data fressness,
- require the tier table by `lakeTieringHeartbeat` method, retry 3s to get
it, shouldn't get it.
- then, change it to a very small data fressness, such as 100ms. Then
require the tier table by `lakeTieringHeartbeat` method. rety 3s to get it.
should get it.
For retry, you can use `CommonTestUtils#retry`
##########
fluss-server/src/test/java/org/apache/fluss/server/coordinator/LakeTableManagerITCase.java:
##########
@@ -106,4 +117,197 @@ void testCreateAndGetTable() throws Exception {
.isInstanceOf(TableAlreadyExistException.class)
.hasMessage("Table %s already exists.", lakeTablePath);
}
+
+ @Test
+ void testAlterTableDatalakeFreshness() throws Exception {
Review Comment:
combine `testResetTableDatalakeProperties` and
`testAlterTableDatalakeFreshness` to one test method, one test method is enough
to verify it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]