liunaijie commented on PR #27276:
URL: https://github.com/apache/flink/pull/27276#issuecomment-3616111901

   I write a test with mockito, the result was as we expected.
   
   Before fix, when restore with empty state, it will throw 
NoSuchElementException.
   
   <img width="1526" height="709" alt="image" 
src="https://github.com/user-attachments/assets/c785a609-08b5-4322-b689-05bda22b1f06";
 />
   
   After fix, the class init will success, and can get empty result.
   <img width="1501" height="786" alt="image" 
src="https://github.com/user-attachments/assets/4233fbff-6a59-446a-94af-5580d67aa402";
 />
   
   
   As [flink does not recommend using mockito to write unit 
tests](https://flink.apache.org/how-to-contribute/code-style-and-quality-common/#avoid-mockito---use-reusable-test-implementations),
 so I need some time to learn how to write this test.
   
   
   
   


-- 
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