hudi-agent commented on code in PR #18718:
URL: https://github.com/apache/hudi/pull/18718#discussion_r3237209964


##########
hudi-client/hudi-client-common/src/test/java/org/apache/hudi/client/transaction/lock/TestStorageBasedLockProvider.java:
##########
@@ -92,23 +92,28 @@ void setupLockProvider() {
     when(mockHeartbeatManager.stopHeartbeat(true)).thenReturn(true);
     // Mock the readObject method to return Option.empty() to prevent NPE in 
audit service creation
     when(mockLockService.readObject(anyString(), 
anyBoolean())).thenReturn(Option.empty());
+
+    lockProvider = createLockProviderWithMetrics(null);
+  }
+
+  @AfterEach
+  void cleanupLockProvider() {
+    lockProvider.close();
+  }
+
+  private StorageBasedLockProvider 
createLockProviderWithMetrics(HoodieLockMetrics lockMetrics) {

Review Comment:
   🤖 nit: could you rename this to `createLockProvider(HoodieLockMetrics 
metrics)`? The `WithMetrics` suffix implies metrics are always provided, but 
the default setup calls it with `null`, which reads as a contradiction. A 
neutral name lets both call sites feel natural.
   
   <sub><i>- AI-generated; verify before applying. React 👍/👎 to flag 
quality.</i></sub>



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