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

test(swamp): pruning FN blob sync #3464

Closed
wants to merge 1 commit into from
Closed

Conversation

cristaloleg
Copy link
Contributor

Updates #3444

// spin up 3 pruning FNs, connect
// spin up 1 LN that syncs historic blobs
//
// Steps:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added step numbers to follow in the test code.

@@ -64,11 +73,7 @@ func TestArchivalBlobSync(t *testing.T) {
fx.Replace(testAvailWindow),
)

// stop the archival BN to force LN to have to discover
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved this higher where it should be.

@@ -77,10 +82,12 @@ func TestArchivalBlobSync(t *testing.T) {
err = archivalFN.Host.Connect(ctx, *host.InfoFromHost(pruningBN.Host))
require.NoError(t, err)

// step 5.
const numFNs = 3
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Extracted as a const.

i := 1
for {

for i := 1; len(archivalBlobs) < wantBlobs; i++ {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We just need to collect wantBlobs here, i is a simple increment that can be done in a loop declaration.


// Pruning_FN from only archival_FN.
//
// Steps:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure should there be more steps to verify all logic paths 🤷


require.NoError(t, <-fillDn)

type archivalBlob struct {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Probably this can be named as a separate step.

@cristaloleg cristaloleg added the kind:testing Related to unit tests label Jun 4, 2024
@cristaloleg cristaloleg self-assigned this Jul 25, 2024
@cristaloleg
Copy link
Contributor Author

💀

@cristaloleg cristaloleg deleted the swamp/test-prining-fn branch February 25, 2025 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:testing Related to unit tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant