Skip to content

Commit 9cfdbb8

Browse files
lhotariganesh-ctds
authored andcommitted
[fix][test] Fix flaky ManagedCursorTest.testLastActiveAfterResetCursor and disable failing SchemaTest (apache#24261)
(cherry picked from commit 616c3a1) (cherry picked from commit 6eb7f7b)
1 parent 21c2d8e commit 9cfdbb8

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1446,8 +1446,8 @@ public void operationComplete() {
14461446
ledger.getName(), newReadPosition, name);
14471447
}
14481448
}
1449-
callback.resetComplete(newReadPosition);
14501449
updateLastActive();
1450+
callback.resetComplete(newReadPosition);
14511451
}
14521452

14531453
@Override

managed-ledger/src/test/java/org/apache/bookkeeper/mledger/impl/ManagedCursorTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -999,6 +999,9 @@ void testLastActiveAfterResetCursor() throws Exception {
999999

10001000
long lastActive = cursor.getLastActive();
10011001

1002+
// ensure that the next last active time will be greater than the current one
1003+
Thread.sleep(1L);
1004+
10021005
cursor.asyncResetCursor(lastPosition, false, new AsyncCallbacks.ResetCursorCallback() {
10031006
@Override
10041007
public void resetComplete(Object ctx) {

pulsar-broker/src/test/java/org/apache/pulsar/schema/SchemaTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1450,7 +1450,8 @@ public User(String name) {
14501450
}
14511451

14521452

1453-
@Test
1453+
// This test fails consistently, disabling until it is fixed. Issue https://github.com/apache/pulsar/issues/24262
1454+
@Test(enabled = false)
14541455
public void testPendingQueueSizeIfIncompatible() throws Exception {
14551456
final String namespace = BrokerTestUtil.newUniqueName(PUBLIC_TENANT + "/ns");
14561457
admin.namespaces().createNamespace(namespace, Sets.newHashSet(CLUSTER_NAME));

0 commit comments

Comments
 (0)