YongGoose opened a new pull request, #7315: URL: https://github.com/apache/incubator-seata/pull/7315
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <!-- Please make sure you have read and understood the contributing guidelines --> - [x] I have registered the PR [changes](../changes). ### Ⅰ. Describe what this PR did Currently, I'm encountering an unexpected issue during the CI stage.  I suspect it might be related to the `LOGGER`, so to address this, I'm planning to use `ListAppender` to **capture** the logs and use the captured output for assertions in the test. > For more details, please refer to the conversation in DingTalk. ### Ⅱ. Does this pull request fix one issue? <!-- If that, add "fixes #xxx" below in the next line, for example, fixes #97. --> No ### Ⅲ. Why don't you add test cases (unit test/integration test)? Don't have to ### Ⅳ. Describe how to verify it X ### Ⅴ. Special notes for reviews There’s one thing we need to discuss. ‼️ In the original test, we used `mockStatic` to control the static methods of `LOGGER`. > `mockStatic` allows us to mock static methods. However, in the refactored code, we no longer use `mockStatic`, which means we can't control the log level of `LOGGER` when it's printing logs. As a result, we’re unable to verify that logs are not printed at certain levels. To work around this, I configured the log level when collecting logs, and instead verified that appropriate logs are captured at the expected level. What do you think? -- 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: notifications-unsubscr...@seata.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org For additional commands, e-mail: notifications-h...@seata.apache.org