This is an automated email from the ASF dual-hosted git repository.
lzljs3620320 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink-table-store.git
The following commit(s) were added to refs/heads/master by this push:
new c7d481e [hotfix] Fix unstable case:
SchemaManagerTest.testConcurrentCommit
c7d481e is described below
commit c7d481e1a678880697502db185edaa1813c517eb
Author: JingsongLi <[email protected]>
AuthorDate: Fri Jun 24 18:14:29 2022 +0800
[hotfix] Fix unstable case: SchemaManagerTest.testConcurrentCommit
---
.../apache/flink/table/store/file/schema/SchemaManagerTest.java | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git
a/flink-table-store-core/src/test/java/org/apache/flink/table/store/file/schema/SchemaManagerTest.java
b/flink-table-store-core/src/test/java/org/apache/flink/table/store/file/schema/SchemaManagerTest.java
index 963e5ad..dc86ac9 100644
---
a/flink-table-store-core/src/test/java/org/apache/flink/table/store/file/schema/SchemaManagerTest.java
+++
b/flink-table-store-core/src/test/java/org/apache/flink/table/store/file/schema/SchemaManagerTest.java
@@ -39,6 +39,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
+import java.util.Set;
import java.util.concurrent.ThreadLocalRandom;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
@@ -167,11 +168,12 @@ public class SchemaManagerTest {
thread.join();
}
- // assert
- List<String> ids =
+ // assert ids
+ // use set, possible duplicate committing
+ Set<String> ids =
retryArtificialException(() -> manager.listAll()).stream()
.map(schema -> schema.options().get("id"))
- .collect(Collectors.toList());
+ .collect(Collectors.toSet());
assertThat(ids)
.containsExactlyInAnyOrder(
IntStream.range(0, threadNumber)