Fixed flaky test LockManagerTest.revalidateLockOnDifferentSession
@@ -280,7 +280,8 @@ public class LockManagerTest extends BaseMetadataStoreTest {
// Simulate existing lock with same content. The 2nd acquirer will steal the lock
String path2 = newKey();
- store1.put(path2, ObjectMapperFactory.getThreadLocal().writeValueAsBytes("value-1"), Optional.of(-1L));
+ store1.put(path2, ObjectMapperFactory.getThreadLocal().writeValueAsBytes("value-1"), Optional.of(-1L),
+ EnumSet.of(CreateOption.Ephemeral)).join();
ResourceLock<String> rl2 = lm2.acquireLock(path2, "value-1").join();
