Skip to content

Commit

Permalink
fix some test error
Browse files Browse the repository at this point in the history
  • Loading branch information
luoyuxia committed Dec 2, 2024
1 parent 701f0f0 commit 1b31a66
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import org.apache.flink.table.expressions.ResolvedExpression;
import org.apache.flink.table.expressions.utils.ResolvedExpressionMock;
import org.apache.flink.table.factories.FactoryUtil;
import org.apache.zookeeper.KeeperException;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
Expand Down Expand Up @@ -121,7 +122,15 @@ static void afterAll() {
@BeforeEach
void beforeEach() throws Exception {
if (catalog != null) {
catalog.createDatabase(DEFAULT_DB, null, true);
try {
catalog.createDatabase(DEFAULT_DB, null, true);
} catch (CatalogException e) {
if (e.getCause() instanceof KeeperException.NodeExistsException) {
// ignore
} else {
throw e;
}
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import org.junit.jupiter.api.Test;

import java.time.ZoneId;
import java.util.TimeZone;

import static com.alibaba.fluss.connector.flink.FlinkConnectorOptions.SCAN_STARTUP_TIMESTAMP;
import static com.alibaba.fluss.connector.flink.utils.FlinkConnectorOptionsUtil.parseTimestamp;
Expand All @@ -41,7 +42,7 @@ void testParseTimestamp() {
parseTimestamp(
"2023-12-09 23:09:12",
SCAN_STARTUP_TIMESTAMP.key(),
ZoneId.systemDefault()))
TimeZone.getTimeZone("Asia/Shanghai").toZoneId()))
.isEqualTo(1702134552000L);

assertThatThrownBy(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,6 @@ void testAddBucketCompletedSnapshot(@TempDir Path tempDir) throws Exception {
}

@Test
@Disabled
void testCreateAndDropPartition() throws Exception {
CoordinatorContext coordinatorContext = eventProcessor.getCoordinatorContext();
// make sure all request to gateway should be successful
Expand Down

0 comments on commit 1b31a66

Please sign in to comment.