This is an automated email from the ASF dual-hosted git repository.
csun5285 pushed a commit to branch branch-4.2
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-4.2 by this push:
new b36587d1a63 [fix](test) Use JUnit 4 assertions in group commit backend
selection test (branch-4.2) (#71283)
b36587d1a63 is described below
commit b36587d1a633c77eec6a425c3df28f0a367a70ad
Author: yiguolei <[email protected]>
AuthorDate: Thu Dec 3 09:21:58 2026 +0800
[fix](test) Use JUnit 4 assertions in group commit backend selection test
(branch-4.2) (#71283)
Related PR: #70975, #71250
The schema-change test backported in #70975 calls
`Assertions.assertThrows`, `Assertions.assertTrue`, and
`Assertions.assertEquals`, but the test class imports JUnit 4's
`org.junit.Assert`. FE test compilation fails with `cannot find symbol:
variable Assertions` at lines 87, 89, and 93.
This failure occurred in [TeamCity build
#23414](http://doris-ci.com/builds/agent-test/23414/index.html) for
#71250 after merging the branch-4.2 baseline
`851110b83e544a4d4582e97919faec7e05a1ad99`.
Replace the three references with the already imported `Assert`,
consistent with the rest of the class. Test assertions and production
behavior are unchanged.
---
.../apache/doris/load/GroupCommitManagerBackendSelectionTest.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git
a/fe/fe-core/src/test/java/org/apache/doris/load/GroupCommitManagerBackendSelectionTest.java
b/fe/fe-core/src/test/java/org/apache/doris/load/GroupCommitManagerBackendSelectionTest.java
index 95d12b26270..b3fe5df8f67 100644
---
a/fe/fe-core/src/test/java/org/apache/doris/load/GroupCommitManagerBackendSelectionTest.java
+++
b/fe/fe-core/src/test/java/org/apache/doris/load/GroupCommitManagerBackendSelectionTest.java
@@ -84,13 +84,13 @@ public class GroupCommitManagerBackendSelectionTest {
long backendId =
manager.selectBackendForGroupCommitInternal(tableId, "", null);
manager.blockTable(tableId);
- DdlException error = Assertions.assertThrows(DdlException.class,
+ DdlException error = Assert.assertThrows(DdlException.class,
() -> manager.selectBackendForGroupCommitInternal(tableId,
"", null));
- Assertions.assertTrue(error.getMessage().contains(
+ Assert.assertTrue(error.getMessage().contains(
"insert table " + tableId + " is blocked on schema
change"));
manager.unblockTable(tableId);
- Assertions.assertEquals(backendId,
manager.selectBackendForGroupCommitInternal(tableId, "", null));
+ Assert.assertEquals(backendId,
manager.selectBackendForGroupCommitInternal(tableId, "", null));
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]