kezhuw opened a new pull request, #1900: URL: https://github.com/apache/zookeeper/pull/1900
This test writes txns to trigger snapshot and expects some txns remain in txn log. But snapshot taking is asynchronous, thus all txns could be written to snapshot. So in restarting, it is possible that no txns to load after snapshot restored. This will fail assertion. This commit solves this by: * Uses `ZKTestCase.waitFor` to wait for snapshot to be taken. * Logs more txns after snapshot paused(aka. `FileSnap.close`). In addition, this commit adds assertions for metric `SNAPSHOT_TIME`. Author: Kezhu Wang <kez...@gmail.com> Reviewers: Enrico Olivelli <eolive...@apache.org>, Mate Szalay-Beko <sy...@apache.org> Closes #1852 from kezhuw/ZOOKEEPER-4511-FileTxnSnapLogMetricsTest-testFileTxnSnapLogMetrics (cherry picked from commit b34e1716e8fa430690252288f2e15c38fe65f325) -- 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: notifications-unsubscr...@zookeeper.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org