Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add stress tests with failures and refunds #192

Merged
merged 4 commits into from
Mar 14, 2024
Merged

Conversation

miladz68
Copy link
Contributor

@miladz68 miladz68 commented Mar 8, 2024

Description

Add stress tests with failures and refunds

Reviewers checklist:

  • Try to write more meaningful comments with clear actions to be taken.
  • Nit-picking should be unblocking. Focus on core issues.

Authors checklist

  • Provide a concise and meaningful description
  • Review the code yourself first, before making the PR.
  • Annotate your PR in places that require explanation.
  • Think and try to split the PR to smaller PR if it is big.

This change is Reviewable

@miladz68 miladz68 requested a review from a team as a code owner March 8, 2024 13:31
@miladz68 miladz68 requested review from dzmitryhil, ysv and wojtek-coreum and removed request for a team March 8, 2024 13:31
Copy link
Contributor

@dzmitryhil dzmitryhil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 1 files reviewed, 4 unresolved discussions (waiting on @miladz68, @wojtek-coreum, and @ysv)


integration-tests/stress/sending_stress_test.go line 173 at r1 (raw file):

func TestStressSendWithFailureAndClaimRefund(t *testing.T) {
	_, chains := integrationtests.NewTestingContext(t)
	testAccounts := 10

Those values should become global, to move them to the CLI later.


integration-tests/stress/sending_stress_test.go line 204 at r1 (raw file):

	// generate and fund accounts
	type xrplAccount struct {
		Acccount rippledata.Account

Acccount -> Account


integration-tests/stress/sending_stress_test.go line 270 at r1 (raw file):

							return err
						}
						waitCtx, waitCancel := context.WithTimeout(ctx, 10*time.Second)

I propose to use the timeouts set-up as test arg or event all tests arg, since it might not fit the real testnet as the result it will be difficult to update it in multiple places


integration-tests/stress/sending_stress_test.go line 271 at r1 (raw file):

						}
						waitCtx, waitCancel := context.WithTimeout(ctx, 10*time.Second)
						defer waitCancel()

Wrong usage of the defer waitCancel() and in the else as well. You are inside loop here.

Copy link
Contributor Author

@miladz68 miladz68 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 1 files reviewed, 4 unresolved discussions (waiting on @dzmitryhil, @wojtek-coreum, and @ysv)


integration-tests/stress/sending_stress_test.go line 173 at r1 (raw file):

Previously, dzmitryhil (Dzmitry Hil) wrote…

Those values should become global, to move them to the CLI later.

Done.


integration-tests/stress/sending_stress_test.go line 204 at r1 (raw file):

Previously, dzmitryhil (Dzmitry Hil) wrote…

Acccount -> Account

Done.


integration-tests/stress/sending_stress_test.go line 270 at r1 (raw file):

Previously, dzmitryhil (Dzmitry Hil) wrote…

I propose to use the timeouts set-up as test arg or event all tests arg, since it might not fit the real testnet as the result it will be difficult to update it in multiple places

I moved the timeout inside the functions and increased the amount to 20 seconds. I don't think anything more than that is needed. I think we should introduce more params only if necessary.


integration-tests/stress/sending_stress_test.go line 271 at r1 (raw file):

Previously, dzmitryhil (Dzmitry Hil) wrote…

Wrong usage of the defer waitCancel() and in the else as well. You are inside loop here.

Done.

Copy link
Contributor

@dzmitryhil dzmitryhil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 1 files reviewed, all discussions resolved (waiting on @wojtek-coreum and @ysv)

Copy link
Collaborator

@keyleu keyleu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @wojtek-coreum and @ysv)

@miladz68 miladz68 merged commit 7e8327a into master Mar 14, 2024
8 checks passed
@miladz68 miladz68 deleted the milad/stress-with-refund branch March 14, 2024 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants