This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-4.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-4.1 by this push:
new 2507df48f36 [fix](test)fix CreateResourceCommandTest failure in cloud
mode (#65072)
2507df48f36 is described below
commit 2507df48f3679d9e4510931185eb5d6bd4af8222
Author: starocean999 <[email protected]>
AuthorDate: Fri Jul 3 15:52:22 2026 +0800
[fix](test)fix CreateResourceCommandTest failure in cloud mode (#65072)
### What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
### Release note
None
### Check List (For Author)
- Test <!-- At least one of them must be included. -->
- [ ] Regression test
- [ ] Unit Test
- [ ] Manual test (add detailed scripts or steps below)
- [ ] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
- [ ] Previous test can cover this change.
- [ ] No code files have been changed.
- [ ] Other reason <!-- Add your reason? -->
- Behavior changed:
- [ ] No.
- [ ] Yes. <!-- Explain the behavior change -->
- Does this need documentation?
- [ ] No.
- [ ] Yes. <!-- Add document PR link here. eg:
https://github.com/apache/doris-website/pull/1214 -->
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR
should merge into -->
---
.../trees/plans/commands/CreateResourceCommandTest.java | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git
a/fe/fe-core/src/test/java/org/apache/doris/nereids/trees/plans/commands/CreateResourceCommandTest.java
b/fe/fe-core/src/test/java/org/apache/doris/nereids/trees/plans/commands/CreateResourceCommandTest.java
index e822474d5ce..98afb4eb15f 100644
---
a/fe/fe-core/src/test/java/org/apache/doris/nereids/trees/plans/commands/CreateResourceCommandTest.java
+++
b/fe/fe-core/src/test/java/org/apache/doris/nereids/trees/plans/commands/CreateResourceCommandTest.java
@@ -25,6 +25,7 @@ import org.apache.doris.nereids.parser.NereidsParser;
import org.apache.doris.nereids.trees.plans.commands.info.CreateResourceInfo;
import org.apache.doris.nereids.trees.plans.logical.LogicalPlan;
import org.apache.doris.qe.ConnectContext;
+import org.apache.doris.system.SystemInfoService;
import org.apache.doris.utframe.TestWithFeService;
import com.google.common.collect.ImmutableMap;
@@ -35,12 +36,24 @@ import org.junit.jupiter.api.Test;
public class CreateResourceCommandTest extends TestWithFeService {
@Test
- public void testValidate(@Mocked Env env, @Mocked AccessControllerManager
accessManager) {
+ public void testValidate(@Mocked Env env, @Mocked AccessControllerManager
accessManager,
+ @Mocked SystemInfoService systemInfoService) {
new Expectations() {
{
+ Env.getCurrentEnv();
+ minTimes = 0;
+ result = env;
+
env.getAccessManager();
+ minTimes = 0;
result = accessManager;
+
+ env.getCurrentSystemInfo();
+ minTimes = 0;
+ result = systemInfoService;
+
accessManager.checkGlobalPriv((ConnectContext) any,
PrivPredicate.ADMIN);
+ minTimes = 0;
result = true;
}
};
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]