GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||
GeezerVison is showing github.com — [fix][test] Fix flaky TransactionBufferClientTest.testTransactionBufferLookUp by merlimat · Pull Request #27349 · apache/pulsar Conversation
Contributor
MotivationProblem. or in the The broker closes the test's topic while the test uses it, because two earlier tests of the class leave state behind:
With segmented snapshots, a topic recovers its transaction buffer with private long getSystemClientOperationTimeoutMs() throws Exception { PulsarClientImpl pulsarClient = (PulsarClientImpl) topic.getBrokerService().getPulsar().getClient(); return pulsarClient.getConfiguration().getOperationTimeoutMs(); } On the first broker, the mock's The next request loads the topic again, and the recovery fails again a few milliseconds later. TestNG runs the Example. The first attempt in the scheduled run 41443581285 (2 Nov, Broker Group 1). The admin client talks to
The cursor reset is fine: it fails because the topic is being closed under it. The broker is right to close a topic ModificationsChange. The tests leave nothing behind for the later tests:
Either change alone removes the failure (see below). Both are kept so that no test of the class depends on the Verifying this change
This change is already covered by existing tests: it changes Each run below is a fresh
Does this pull request potentially affect one of the following parts:If the box was checked, please highlight the changes
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions…erLookUp testTransactionBufferLookUp failed its first attempt in 18 of 30 scheduled CI runs and passed on the retry, because two earlier tests of the class left state behind: - testTransactionBufferClientTimeout, testTransactionBufferChannelUnActive and testTransactionBufferConnectionClosedBeforeHandshake stubbed the first broker's getClient() to return a mocked PulsarClientImpl and never removed the stub. - testRecoveryTransactionBufferWhenCommonTopicAndSystemTopicAtDifferentBroker turned on segmented transaction buffer snapshots in the configuration that the three brokers share, which outlives their restarts, and never turned them off. With segmented snapshots, a topic's transaction buffer recovery reads the broker's client for its operation timeout. On the first broker that is the mock, so the recovery failed with a NullPointerException, and the broker closed the topic while the test was creating its subscription or ending a transaction on it. The handler tests now give TransactionBufferHandlerImpl a mocked PulsarService instead of stubbing the broker's, and the recovery test turns segmented snapshots off again when it ends.
codelipenghui
approved these changes
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Code Review approval for commit 9b186d6. Summary:
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
lhotari
approved these changes
Uh oh!
There was an error while loading. Please reload this page.
Merged
11 tasks
poorbarcode
pushed a commit
to poorbarcode/pulsar
that referenced
this pull request
…erLookUp (apache#27349) (cherry picked from commit fd603ba)
poorbarcode
pushed a commit
to poorbarcode/pulsar
that referenced
this pull request
…erLookUp (apache#27349) (cherry picked from commit fd603ba)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabelsProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later. | |||||||||||||||||||||||||||||
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |