-
Notifications
You must be signed in to change notification settings - Fork 2.1k
[Fix] logs http basic issue # 9755 #9968
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@hailin0 @davidzollo Hello, can you help me take a look at this PR? |
336d557 to
50a94be
Compare
I only fix a certain piece of content, and the other module code has not changed. Why do module test cases that have not changed keep compiling fail? PTAL
|
Please pull the latest changes and try again. |
I seem to have found the problem. The setUP method is a bit confusing, making people think that each test class is independent, but in fact it is not. ConfigProvider.locateAndGetSeaTunnelConfig() single-case, unified management through org.apache.seatunnel.engine.common.config.YamlSeaTunnelDomConfigProcessor. as it happens Local reproduction is reproduced by using the following command: mvn -pl seatunnel-engine/seatunnel-engine-server test -Dtest=RestApiHttpBasicTest,BaseServletTest,RestApiHttpsTest,RestApiHttpsForTruststoreTest -DfailIfNoTests=falseSolution: After setting PR |
# Conflicts: # seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/LogService.java
Use case execution is completed. I re-executed it several times, and the redis test case has a high probability of failure. I re-executed it many times, but luckily it finally worked. PTAL |
I’ve been keeping an eye on it lately, and it doesn’t seem like there’s been much progress. If you have any ideas or think we need to make adjustments, we can talk it through together. 🤝 |
I’ve opened a PR addressing the flaky Redis tests. #10024 |
|
cc @zhangshenghang @hawk9821 — could you please take a look when you have a moment? |
dybyte
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @wuxiansen
...ngine-server/src/test/java/org/apache/seatunnel/engine/server/rest/RestApiHttpBasicTest.java
Outdated
Show resolved
Hide resolved
...ngine-server/src/test/java/org/apache/seatunnel/engine/server/rest/RestApiHttpBasicTest.java
Outdated
Show resolved
Hide resolved
...ngine-server/src/test/java/org/apache/seatunnel/engine/server/rest/RestApiHttpBasicTest.java
Outdated
Show resolved
Hide resolved
...ine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/BaseLogService.java
Outdated
Show resolved
Hide resolved
...-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/LogService.java
Outdated
Show resolved
Hide resolved
...-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/LogService.java
Outdated
Show resolved
Hide resolved
...ine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/BaseLogService.java
Outdated
Show resolved
Hide resolved
...ine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/BaseLogService.java
Outdated
Show resolved
Hide resolved
...-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/LogService.java
Outdated
Show resolved
Hide resolved
...seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/HttpBasic.java
Outdated
Show resolved
Hide resolved
...ngine-server/src/test/java/org/apache/seatunnel/engine/server/rest/RestApiHttpBasicTest.java
Outdated
Show resolved
Hide resolved
...ngine-server/src/test/java/org/apache/seatunnel/engine/server/rest/RestApiHttpBasicTest.java
Outdated
Show resolved
Hide resolved
# 9755
# 9755
...ngine-server/src/test/java/org/apache/seatunnel/engine/server/rest/RestApiHttpBasicTest.java
Outdated
Show resolved
Hide resolved
…che/seatunnel/engine/server/rest/RestApiHttpBasicTest.java Co-authored-by: dy102 <[email protected]>
# 9755
dybyte
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM if CI passes. Thanks @wuxiansen
...ine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/BaseLogService.java
Show resolved
Hide resolved
...ine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/BaseLogService.java
Outdated
Show resolved
Hide resolved
# 9755
zhangshenghang
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, If CI pass








Fix logs Basic issue
Contribution Checklist
Purpose of this pull request
This pull request supplements test cases for fixing basic log-related issues, ensuring that the logging functionality works correctly in scenarios where HTTP Basic authentication is enabled. By adding the RestApiHttpBasicTest test class, it verifies the correctness of log-related REST API responses with Basic authentication, including interface accessibility, response format, and content integrity, further ensuring the stability of the logging feature.
Does this PR introduce any user-facing change?
No. The added test cases are solely for internal functional verification and do not involve changes to user-visible behaviors, configuration methods, or output results. They have no impact on user workflows.
How was this patch tested?
New test cases: The RestApiHttpBasicTest class was implemented to specifically test the behavior of log-related REST APIs when HTTP Basic authentication is enabled, including:
Verifying that the /overview endpoint returns a 200 OK status and contains necessary fields (e.g., projectVersion) with valid authentication.
Testing the /logs endpoint with different formats (e.g., JSON) to check for non-empty responses, correct status codes, and expected Content-Type headers.
Simulating job submission and validating that the log endpoint correctly returns job log information.
Test environment: A test cluster was set up using Hazelcast in local mode, with HTTP port and Basic authentication credentials (username admin, password admin) configured to match real-world scenarios.
Execution method: Tests were run using JUnit 5 to automatically verify interface behavior. All assertions passing indicate that the functionality works as expected.
Check list
New License Guide