zhiqiang-hhhh opened a new pull request, #49925: URL: https://github.com/apache/doris/pull/49925
### What problem does this PR solve? If profile collection is finished, we should write it to storage immediately. Add unit test for class Profile. Bug is introduced by https://github.com/apache/doris/pull/48653 Issue Number: close #xxx Related PR: https://github.com/apache/doris/pull/48653 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 --> This pull request includes changes to the `Profile` class and its associated test suite to enhance the functionality for determining when a profile should be stored to storage. The most important changes include adding a new condition to check if execution profiles are completed before storing, and the addition of a comprehensive test suite for the `Profile` class. Enhancements to `Profile` class: * Added logic to `shouldStoreToStorage` method to check if all execution profiles are completed before deciding to store the profile. [[1]](diffhunk://#diff-c9f83a512334f9031efeea62a2121286ce58e16b7f14aaee354d42e094a594abR453-R465) [[2]](diffhunk://#diff-c9f83a512334f9031efeea62a2121286ce58e16b7f14aaee354d42e094a594abL468-R481) Addition of test suite for `Profile` class: * Created `ProfileTest` class with multiple test cases to verify the behavior of `Profile` methods, including `shouldStoreToStorage`, `writeToStorage`, `readFromStorage`, and `deleteFromStorage`. -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org