From 3bef0141db2de5aa2a01808d3735e24e36edffb6 Mon Sep 17 00:00:00 2001 From: horizonzy Date: Mon, 19 Feb 2024 18:29:19 +0800 Subject: [PATCH] Fix ci. --- .../bookkeeper/benchmark/BenchReadThroughputLatency.java | 1 + .../java/org/apache/bookkeeper/client/BookKeeperTest.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bookkeeper-benchmark/src/main/java/org/apache/bookkeeper/benchmark/BenchReadThroughputLatency.java b/bookkeeper-benchmark/src/main/java/org/apache/bookkeeper/benchmark/BenchReadThroughputLatency.java index aaea43585b8..5c04558b84d 100644 --- a/bookkeeper-benchmark/src/main/java/org/apache/bookkeeper/benchmark/BenchReadThroughputLatency.java +++ b/bookkeeper-benchmark/src/main/java/org/apache/bookkeeper/benchmark/BenchReadThroughputLatency.java @@ -114,6 +114,7 @@ private static void readLedger(ClientConfiguration conf, long ledgerId, byte[] p while (entries.hasMoreElements()) { LedgerEntry e = entries.nextElement(); entriesRead++; + lastRead = e.getEntryId(); if ((entriesRead % 10000) == 0) { LOG.info("{} entries read from ledger {}", entriesRead, ledgerId); } diff --git a/bookkeeper-server/src/test/java/org/apache/bookkeeper/client/BookKeeperTest.java b/bookkeeper-server/src/test/java/org/apache/bookkeeper/client/BookKeeperTest.java index edade12af82..fd0a2a9b76a 100644 --- a/bookkeeper-server/src/test/java/org/apache/bookkeeper/client/BookKeeperTest.java +++ b/bookkeeper-server/src/test/java/org/apache/bookkeeper/client/BookKeeperTest.java @@ -629,7 +629,7 @@ public void testBatchReadFailBackToSingleRead1() throws Exception { } try (LedgerHandle lh = bkc.openLedger(ledgerId, digestType, "testPasswd".getBytes())) { assertEquals(numEntries - 1, lh.readLastConfirmed()); - //V2 protocol not support batch read. In theory, it will throw UnsupportedOperationException. + //V3 protocol not support batch read. In theory, it will throw UnsupportedOperationException. try { lh.batchReadEntries(0, numEntries, 5 * 1024 * 1024); fail("Should throw UnsupportedOperationException."); @@ -684,7 +684,7 @@ public void testBatchReadFailBackToSingleRead2() throws Exception { } try (LedgerHandle lh = bkc.openLedger(ledgerId, digestType, "testPasswd".getBytes())) { assertEquals(numEntries - 1, lh.readLastConfirmed()); - //V2 protocol not support batch read, it will throw UnsupportedOperationException. + //V3 protocol not support batch read, it will throw UnsupportedOperationException. try { lh.batchReadEntries(0, numEntries, 5 * 1024 * 1024); fail("Should throw UnsupportedOperationException.");