Skip to content

[fix][test] Fix TransactionTest failure due to clean up after class - #17746

Merged
codelipenghui merged 1 commit into
apache:masterfrom
liangyepianzhou:xiangying/fix/txn/test/berforeclass
Oct 17, 2022
Merged

codelipenghui merged 1 commit into
apache:masterfrom
liangyepianzhou:xiangying/fix/txn/test/berforeclass

Conversation

@liangyepianzhou

@liangyepianzhou liangyepianzhou commented Sep 20, 2022 •

Copy link
Copy Markdown
Contributor

Motivation

Fix testGetTxnID: transaction Id is not begin at 0;
testSubscriptionRecreateTopic : topic is already exsit.
and testPendingAckMarkDeletePosition: failed to get TP manager stats due to testEndTPRecoveringWhenManagerLedgerDisReadable set a mock 'TransactionPendingAckStoreProvider' into pulsar.

Modification

fix them.

Verifying this change

  • Make sure that the change passes the CI checks.

(Please pick either of the following options)

This change is a trivial rework / code cleanup without any test coverage.

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end deployment with large payloads (10MB)
  • Extended integration test for recovery after broker failure

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • Anything that affects deployment

Documentation

  • doc-required
    (Your PR needs to update docs and you will update later)

  • doc-not-needed
    (Please explain why)

  • doc
    (Your PR contains doc changes)

  • doc-complete
    (Docs have been already added)

Matching PR in forked repository

PR in forked repository: liangyepianzhou#3

After opening this PR, the build in apache/pulsar will fail and instructions will
be provided for opening a PR in the PR author's forked repository.

apache/pulsar pull requests should be first tested in your own fork since the
apache/pulsar CI based on GitHub Actions has constrained resources and quota.
GitHub Actions provides separate quota for pull requests that are executed in
a forked repository.

The tests will be run in the forked repository until all PR review comments have
been handled, the tests pass and the PR is approved by a reviewer.

-->

@liangyepianzhou liangyepianzhou changed the title [fix][txn] Fix TransactionTest for BeforeClass [fix][txn] Fix TransactionTest failure due to clean up after class Sep 20, 2022
@github-actions github-actions Bot added the doc-not-needed Your PR changes do not impact docs label Sep 20, 2022
@liangyepianzhou liangyepianzhou self-assigned this Sep 21, 2022
@liangyepianzhou liangyepianzhou changed the title [fix][txn] Fix TransactionTest failure due to clean up after class [fix][flaky-test] Fix TransactionTest failure due to clean up after class Sep 26, 2022
@codelipenghui

Copy link
Copy Markdown
Contributor

@liangyepianzhou We should reduce the beforeMethod afterMethod, it will slow down the test, and waste the CI resources. The fix looks like moving some test from the beforeClass and afterClass to beforeMethod afterMethod. I think the right way is to make the test can work with beforeClass and afterClass, you can use beforeMethod and afterMethod to clean some metadata and data by using Pulsar Admin API.

@codelipenghui codelipenghui reopened this Oct 13, 2022
@codelipenghui codelipenghui changed the title [fix][flaky-test] Fix TransactionTest failure due to clean up after class [fix][test] Fix TransactionTest failure due to clean up after class Oct 13, 2022
@codecov-commenter

codecov-commenter commented Oct 13, 2022 •

Copy link
Copy Markdown

Codecov Report

❗ No coverage uploaded for pull request base (master@c952f3c). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master   #17746   +/-   ##
=========================================
  Coverage          ?   45.73%           
  Complexity        ?    17513           
=========================================
  Files             ?     1573           
  Lines             ?   128208           
  Branches          ?    14099           
=========================================
  Hits              ?    58637           
  Misses            ?    63501           
  Partials          ?     6070           
Flag Coverage Δ
unittests 45.73% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

@codelipenghui
codelipenghui merged commit a990822 into apache:master Oct 17, 2022
@liangyepianzhou
liangyepianzhou deleted the xiangying/fix/txn/test/berforeclass branch February 27, 2023 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants