This is an automated email from the ASF dual-hosted git repository. yuzelin pushed a commit to branch release-0.6 in repository https://gitbox.apache.org/repos/asf/incubator-paimon.git
The following commit(s) were added to refs/heads/release-0.6 by this push: new 4cf8e3e17 [hotfix] Fix test compile error 4cf8e3e17 is described below commit 4cf8e3e17e7c8e5219fdd5c9df14463c6ce90c61 Author: yuzelin <zelin....@alibaba-inc.com> AuthorDate: Mon Jan 15 10:24:11 2024 +0800 [hotfix] Fix test compile error --- .../apache/paimon/table/sink/TableCommitTest.java | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/paimon-core/src/test/java/org/apache/paimon/table/sink/TableCommitTest.java b/paimon-core/src/test/java/org/apache/paimon/table/sink/TableCommitTest.java index 362b40301..cba062894 100644 --- a/paimon-core/src/test/java/org/apache/paimon/table/sink/TableCommitTest.java +++ b/paimon-core/src/test/java/org/apache/paimon/table/sink/TableCommitTest.java @@ -67,28 +67,19 @@ public class TableCommitTest { private static final Map<String, Set<Long>> commitCallbackResult = new ConcurrentHashMap<>(); @Test - public void testCommitCallbackWithFailureFixedBucket() throws Exception { - innerTestCommitCallbackWithFailure(1); - } - - @Test - public void testCommitCallbackWithFailureDynamicBucket() throws Exception { - innerTestCommitCallbackWithFailure(-1); - } - - private void innerTestCommitCallbackWithFailure(int bucket) throws Exception { + public void testCommitCallbackWithFailure() throws Exception { int numIdentifiers = 30; String testId = UUID.randomUUID().toString(); commitCallbackResult.put(testId, new HashSet<>()); try { - testCommitCallbackWithFailureImpl(bucket, numIdentifiers, testId); + testCommitCallbackWithFailureImpl(numIdentifiers, testId); } finally { commitCallbackResult.remove(testId); } } - private void testCommitCallbackWithFailureImpl(int bucket, int numIdentifiers, String testId) + private void testCommitCallbackWithFailureImpl(int numIdentifiers, String testId) throws Exception { String failingName = UUID.randomUUID().toString(); // no failure when creating table and writing data @@ -103,7 +94,6 @@ public class TableCommitTest { Options conf = new Options(); conf.set(CoreOptions.PATH, path); - conf.set(CoreOptions.BUCKET, bucket); conf.set(CoreOptions.COMMIT_CALLBACKS, TestCommitCallback.class.getName()); conf.set( CoreOptions.COMMIT_CALLBACK_PARAM @@ -131,11 +121,7 @@ public class TableCommitTest { StreamTableWrite write = table.newWrite(commitUser); Map<Long, List<CommitMessage>> commitMessages = new HashMap<>(); for (int i = 0; i < numIdentifiers; i++) { - if (bucket == -1) { - write.write(GenericRow.of(i, i * 1000L), 0); - } else { - write.write(GenericRow.of(i, i * 1000L)); - } + write.write(GenericRow.of(i, i * 1000L)); commitMessages.put((long) i, write.prepareCommit(true, i)); } write.close();