bharos commented on code in PR #10848: URL: https://github.com/apache/gravitino/pull/10848#discussion_r3127219735
########## core/src/test/java/org/apache/gravitino/authorization/TestOwnerManager.java: ########## @@ -67,9 +67,13 @@ import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.MethodOrderer; +import org.junit.jupiter.api.Order; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestMethodOrder; import org.mockito.Mockito; +@TestMethodOrder(MethodOrderer.OrderAnnotation.class) Review Comment: The tests share a single in-memory H2 entity store that persists state across methods. testOwner() asserts the metalake has no owner initially, but testGroupTypeOwner() sets an owner on the same metalake. Without ordering, JUnit could run them in any order, causing testOwner() to fail if it runs second. -- 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]
