wuxiansen commented on PR #9968:
URL: https://github.com/apache/seatunnel/pull/9968#issuecomment-3468736715

   > > > 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?
   > > 
   > > 
   > > Please pull the latest changes and try again.
   > 
   > Executing the failures one by one can be done .
   > 
   > @liucongjy @zhangshenghang
   > 
   > `BaseServletTest.testWriteJsonWithObject` can pass the test locally, but 
why can't it pass in actions?
   > 
   > PTAL
   > 
   > <img alt="image" width="1182" height="194" 
src="https://private-user-images.githubusercontent.com/6215311/507026868-5ff2d7c1-e84f-424c-a539-b5dd18a1f3ee.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjE4Mzk5NTYsIm5iZiI6MTc2MTgzOTY1NiwicGF0aCI6Ii82MjE1MzExLzUwNzAyNjg2OC01ZmYyZDdjMS1lODRmLTQyNGMtYTUzOS1iNWRkMThhMWYzZWUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MTAzMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTEwMzBUMTU1NDE2WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9N2U0NGEyOTg5MDc3YWNmYjIwOTE3ZGY2MGM3YThlNDY0ZTUzNjYxZjJjZmFiM2JjNDc0YjdjYjIyOWI1OWNjNyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.EsIFO94huF5rEGTeHL1Vnrv-D_V1UpvuV8OB98mJ1Gg";>
 <img alt="image" width="1136" height="310" 
src="https://private-user-images.githubusercontent.com/6215311/507028909-50d56201-4ccf-4fb2-896e-b00fd18806c9.png?jwt=eyJ0e
 
XAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjE4Mzk5NTYsIm5iZiI6MTc2MTgzOTY1NiwicGF0aCI6Ii82MjE1MzExLzUwNzAyODkwOS01MGQ1NjIwMS00Y2NmLTRmYjItODk2ZS1iMDBmZDE4ODA2YzkucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MTAzMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTEwMzBUMTU1NDE2WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MzQyMzY2MjIzMDExMzc3N2JkNGJhYTY3YmExYjY0YmFjNjkzYTMzMGZkM2IzZWQ3NDhmZjFiNDhhN2E2Y2RiMiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.079wImcZpOMgF2MdvO8IDX-EOqXlOTScNnhKPaFTbwk">
 <img alt="image" width="1176" height="240" 
src="https://private-user-images.githubusercontent.com/6215311/507029088-aa361f4f-3334-48aa-b0b8-2c656fcb4f25.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjE4Mzk5NTYsIm5iZiI6MTc2MTgzOTY1NiwicG
 
F0aCI6Ii82MjE1MzExLzUwNzAyOTA4OC1hYTM2MWY0Zi0zMzM0LTQ4YWEtYjBiOC0yYzY1NmZjYjRmMjUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MTAzMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTEwMzBUMTU1NDE2WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OTA3ZWI3OThiOWYzNzU4MmZiMjFkZDM5MWQ4MzkwYjU3YjA5OTQ1MDExMjg5YzZjYjA4ZTAzYmU5MTg5ZmE0ZCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.EZW-ItfoHnA6pzVf4iWPP1Uz8ANHZ_n4t0ps15lzukc">
   > ```shell
   > [INFO] 
   > [INFO] Results:
   > [INFO] 
   > Error:  Failures: 
   > Error:    
BaseServletTest.testWriteJsonWithObject:71->testLogRestApiResponse:147 
expected: <200> but was: <401>
   > Error:  Errors: 
   > Error:    RestApiHttpsForTruststoreTest.testRestApiHttps:136 » IO Server 
returned HTTP r...
   > Error:    RestApiHttpsTest.testRestApiHttp:88 » IO Server returned HTTP 
response code: 4...
   > Error:    RestApiHttpsTest.testRestApiHttps:109 » IO Server returned HTTP 
response code:...
   > [INFO] 
   > Error:  Tests run: 96, Failures: 1, Errors: 3, Skipped: 6
   > [INFO] 
   > ```
   > 
   > 
https://github.com/wuxiansen/seatunnel/actions/runs/18870236917/job/53957365698
   
   
   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
   The newly added RestApiHttpBasicTest class is executed first, as can be seen 
from the following log.
   
   ```
   Oct 30, 2025 5:21:59 AM com.hazelcast.internal.server.tcp.TcpServerConnection
   INFO: [localhost]:5801 
[runner_CoordinatorServiceTest_testCleanPendingJobMasterMap] [5.1] 
Connection[id=13, /127.0.0.1:5801->/127.0.0.1:37651, qualifier=null, 
endpoint=[localhost]:5803, remoteUuid=048f417e-3de9-4ff1-a253-e33d2ba479a8, 
alive=false, connectionType=MEMBER, planeIndex=0] closed. Reason: Connection 
closed by the other side
   
org.apache.seatunnel.engine.common.loader.SeaTunnelChildFirstClassLoader@2759114
   [INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.807 
s - in org.apache.seatunnel.engine.server.rest.RestApiHttpBasicTest
   [INFO] Running 
org.apache.seatunnel.engine.server.rest.RestApiHttpsForTruststoreTest
   Oct 30, 2025 5:22:01 AM com.hazelcast.internal.config.AbstractConfigLocator
   INFO: Loading configuration 
'/home/runner/work/seatunnel/seatunnel/seatunnel-engine/seatunnel-engine-server/src/test/resources/seatunnel.yaml'
 from System property 'seatunnel.config'
   
   ...
   
   Oct 30, 2025 5:22:02 AM com.hazelcast.internal.server.tcp.TcpServerConnection
   INFO: [localhost]:5801 
[runner_CoordinatorServiceTest_testCleanPendingJobMasterMap] [5.1] 
Connection[id=15, /127.0.0.1:5801->/127.0.0.1:43985, qualifier=null, 
endpoint=[localhost]:5804, remoteUuid=92d3d57e-c593-42cd-a4f6-6cea21527200, 
alive=false, connectionType=MEMBER, planeIndex=0] closed. Reason: Connection 
closed by the other side
   
org.apache.seatunnel.engine.common.loader.SeaTunnelChildFirstClassLoader@2759114
   Error:  Tests run: 4, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 
2.586 s <<< FAILURE! - in 
org.apache.seatunnel.engine.server.rest.RestApiHttpsForTruststoreTest
   Error:  testRestApiHttps  Time elapsed: 0.124 s  <<< ERROR!
   java.io.IOException: Server returned HTTP response code: 401 for URL: 
https://localhost:18443/overview
        at 
org.apache.seatunnel.engine.server.rest.RestApiHttpsForTruststoreTest.testRestApiHttps(RestApiHttpsForTruststoreTest.java:136)
   
   [INFO] Running org.apache.seatunnel.engine.server.rest.RestApiHttpsTest
   Oct 30, 2025 5:22:03 AM com.hazelcast.internal.config.AbstractConfigLocator
   INFO: Loading configuration 
'/home/runner/work/seatunnel/seatunnel/seatunnel-engine/seatunnel-engine-server/src/test/resources/seatunnel.yaml'
 from System property 'seatunnel.config'
   
   ...
   
   Oct 30, 2025 5:22:05 AM com.hazelcast.internal.server.tcp.TcpServerConnection
   INFO: [localhost]:5801 
[runner_CoordinatorServiceTest_testCleanPendingJobMasterMap] [5.1] 
Connection[id=17, /127.0.0.1:5801->/127.0.0.1:36841, qualifier=null, 
endpoint=[localhost]:5805, remoteUuid=6f488a61-6344-43da-9a6c-3070b4321d7e, 
alive=false, connectionType=MEMBER, planeIndex=0] closed. Reason: Connection 
closed by the other side
   
org.apache.seatunnel.engine.common.loader.SeaTunnelChildFirstClassLoader@2759114
   Oct 30, 2025 5:22:05 AM org.apache.seatunnel.engine.server.CoordinatorService
   INFO: [localhost]:5801 
[runner_CoordinatorServiceTest_testCleanPendingJobMasterMap] [5.1] 
   Error:  Tests run: 3, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 
2.293 s <<< FAILURE! - in 
org.apache.seatunnel.engine.server.rest.RestApiHttpsTest
   Error:  testRestApiHttps  Time elapsed: 0.036 s  <<< ERROR!
   java.io.IOException: Server returned HTTP response code: 401 for URL: 
https://localhost:28443/overview
        at 
org.apache.seatunnel.engine.server.rest.RestApiHttpsTest.testRestApiHttps(RestApiHttpsTest.java:109)
   
   Error:  testRestApiHttp  Time elapsed: 0.005 s  <<< ERROR!
   java.io.IOException: Server returned HTTP response code: 401 for URL: 
http://localhost:28080/overview
        at 
org.apache.seatunnel.engine.server.rest.RestApiHttpsTest.testRestApiHttp(RestApiHttpsTest.java:88)
   
   [INFO] Running org.apache.seatunnel.engine.server.rest.BaseServletTest
   Oct 30, 2025 5:22:06 AM com.hazelcast.internal.config.AbstractConfigLocator
   INFO: Loading configuration 
'/home/runner/work/seatunnel/seatunnel/seatunnel-engine/seatunnel-engine-server/src/test/resources/seatunnel.yaml'
 from System property 'seatunnel.config'
   Oct 30, 2025 5:22:06 AM com.hazelcast.internal.config.AbstractConfigLocator
   INFO: Using configuration file at 
/home/runner/work/seatunnel/seatunnel/seatunnel-engine/seatunnel-engine-server/src/test/resources/seatunnel.yaml
   Oct 30, 2025 5:22:06 AM 
org.apache.seatunnel.engine.common.config.YamlSeaTunnelDomConfigProcessor
   INFO: Dynamic slot is enabled, the schedule strategy is set to REJECT
   Oct 30, 2025 5:22:06 AM com.hazelcast.internal.config.AbstractConfigLocator
   INFO: Loading 'hazelcast.yaml' from the classpath.
   Oct 30, 2025 5:22:06 AM com.hazelcast.internal.config.AbstractConfigLocator
   INFO: Loading configuration 
'/home/runner/work/seatunnel/seatunnel/seatunnel-engine/seatunnel-engine-server/src/test/resources/seatunnel.yaml'
 from System property 'seatunnel.config'
   
   ...
   
   Error:  Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 
2.349 s <<< FAILURE! - in 
org.apache.seatunnel.engine.server.rest.BaseServletTest
   Error:  testWriteJsonWithObject  Time elapsed: 0.027 s  <<< FAILURE!
   org.opentest4j.AssertionFailedError: expected: <200> but was: <401>
        at 
org.apache.seatunnel.engine.server.rest.BaseServletTest.testLogRestApiResponse(BaseServletTest.java:147)
        at 
org.apache.seatunnel.engine.server.rest.BaseServletTest.testWriteJsonWithObject(BaseServletTest.java:71)
   
   [INFO] Running 
org.apache.seatunnel.engine.server.CoordinatorServiceWithCancelPendingJobTest
   Oct 30, 2025 5:22:08 AM com.hazelcast.internal.config.AbstractConfigLocator
   INFO: Loading configuration 
'/home/runner/work/seatunnel/seatunnel/seatunnel-engine/seatunnel-engine-server/src/test/resources/seatunnel.yaml'
 from System property 'seatunnel.config'
   Oct 30, 2025 5:22:08 AM com.hazelcast.internal.config.AbstractConfigLocator
   INFO: Using configuration file at 
/home/runner/work/seatunnel/seatunnel/seatunnel-engine/seatunnel-engine-server/src/test/resources/seatunnel.yaml
   Oct 30, 2025 5:22:08 AM 
org.apache.seatunnel.engine.common.config.YamlSeaTunnelDomConfigProcessor
   INFO: Dynamic slot is enabled, the schedule strategy is set to REJECT
   Oct 30, 2025 5:22:08 AM com.hazelcast.internal.config.AbstractConfigLocator
   INFO: Loading 'hazelcast.yaml' from the classpath.
   Oct 30, 2025 5:22:08 AM com.hazelcast.internal.config.AbstractConfigLocator
   INFO: Loading configuration 
'/home/runner/work/seatunnel/seatunnel/seatunnel-engine/seatunnel-engine-server/src/test/resources/seatunnel.yaml'
 from System property 'seatunnel.config'
   ```
   
   Local reproduction is reproduced by using the following command:
   ```bash
    mvn -pl seatunnel-engine/seatunnel-engine-server test 
-Dtest=RestApiHttpBasicTest,BaseServletTest,RestApiHttpsTest,RestApiHttpsForTruststoreTest
 -DfailIfNoTests=false
   ```
   
   Solution: After setting `RestApiHttpBasicTest`, use `AfterAll` to clean up 
the Basic configuration.
   
   PR


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to