Skip to content

Commit 616c3a1

Browse files
authored
[fix][test] Fix flaky ManagedCursorTest.testLastActiveAfterResetCursor and disable failing SchemaTest (apache#24261)
1 parent 06341fc commit 616c3a1

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
@@ -1460,8 +1460,8 @@ public void operationComplete() {
14601460
ledger.getName(), newReadPosition, name);
14611461
}
14621462
}
1463-
callback.resetComplete(newReadPosition);
14641463
updateLastActive();
1464+
callback.resetComplete(newReadPosition);
14651465
}
14661466

14671467
@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
@@ -1004,6 +1004,9 @@ void testLastActiveAfterResetCursor() throws Exception {
10041004

10051005
long lastActive = cursor.getLastActive();
10061006

1007+
// ensure that the next last active time will be greater than the current one
1008+
Thread.sleep(1L);
1009+
10071010
cursor.asyncResetCursor(lastPosition, false, new AsyncCallbacks.ResetCursorCallback() {
10081011
@Override
10091012
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
@@ -1528,7 +1528,8 @@ public SchemaStorageFormat.SchemaLocator deserialize(String path, byte[] content
15281528
producer.close();
15291529
}
15301530

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

0 commit comments

Comments
 (0)