bookkeeper icon indicating copy to clipboard operation
bookkeeper copied to clipboard

Issue 1626: Add tests for LedgerUnderredplicationManager#markLedgerUnderreplicatedAsync

Open sijie opened this issue 6 years ago • 9 comments

Descriptions of the changes in this PR:

Motivation

We introduced LedgerUnderredplicationManager#markLedgerUnderreplicatedAsync in #1619. This exposes the async api to the public. Let's make sure we have enough test coverage for this new async api, including negative tests and concurrent tests.

Changes

  • Add basic tests
  • Add negative tests
  • Add concurrent tests on resolving conflicts

Master Issue: #1626


In order to uphold a high standard for quality for code contributions, Apache BookKeeper runs various precommit checks for pull requests. A pull request can only be merged when it passes precommit checks. However running all the precommit checks can take a long time, some trivial changes don't need to run all the precommit checks. You can check following list to skip the tests that don't need to run for your pull request. Leave them unchecked if you are not sure, committers will help you:

  • [ ] [skip bookkeeper-server bookie tests]: skip testing org.apache.bookkeeper.bookie in bookkeeper-server module.
  • [ ] [skip bookkeeper-server client tests]: skip testing org.apache.bookkeeper.client in bookkeeper-server module.
  • [ ] [skip bookkeeper-server replication tests]: skip testing org.apache.bookkeeper.replication in bookkeeper-server module.
  • [ ] [skip bookkeeper-server tls tests]: skip testing org.apache.bookkeeper.tls in bookkeeper-server module.
  • [ ] [skip bookkeeper-server remaining tests]: skip testing all other tests in bookkeeper-server module.
  • [ ] [skip integration tests]: skip docker based integration tests. if you make java code changes, you shouldn't skip integration tests.
  • [ ] [skip build java8]: skip build on java8. ONLY skip this when ONLY changing files under documentation under site.
  • [ ] [skip build java9]: skip build on java9. ONLY skip this when ONLY changing files under documentation under site.


Be sure to do all of the following to help us incorporate your contribution quickly and easily:

If this PR is a BookKeeper Proposal (BP):

  • [ ] Make sure the PR title is formatted like: <BP-#>: Description of bookkeeper proposal e.g. BP-1: 64 bits ledger is support
  • [ ] Attach the master issue link in the description of this PR.
  • [ ] Attach the google doc link if the BP is written in Google Doc.

Otherwise:

  • [ ] Make sure the PR title is formatted like: <Issue #>: Description of pull request e.g. Issue 123: Description ...
  • [ ] Make sure tests pass via mvn clean apache-rat:check install spotbugs:check.
  • [ ] Replace <Issue #> in the title with the actual Issue number.

sijie avatar Aug 27 '18 21:08 sijie

@reddycharan I have added the tests for markLedgerUnderreplicatedAsync. Can you review it?

sijie avatar Aug 27 '18 21:08 sijie

couple of negative / error scenario testcases for Auditor.checkAllLedgers in AuditorPeriodicCheckTest would be helpful.

reddycharan avatar Aug 29 '18 01:08 reddycharan

couple of negative / error scenario testcases for Auditor.checkAllLedgers in AuditorPeriodicCheckTest would be helpful.

One PR for one thing. As what the caption said, this task only focuses on ledgerunderrplicationmanager. Other tests should be done in a separated PR.

sijie avatar Aug 29 '18 05:08 sijie

This seems the only blocker for 4.8.

eolivelli avatar Sep 01 '18 18:09 eolivelli

@reddycharan @sijie this patch was for 4.8, we are targeting it to 4.10, but I don't think it is a blocker for 4.10 release. Can I drop the '4.10' label ?

eolivelli avatar Oct 26 '19 22:10 eolivelli

retest this please

eolivelli avatar Oct 26 '19 22:10 eolivelli

@eolivelli we can remove 4.10 label.

sijie avatar Oct 29 '19 13:10 sijie

fix old workflow,please see #3455 for detail

StevenLuMT avatar Aug 24 '22 08:08 StevenLuMT