Repository navigation
test: fix MFS timeout and concurrent migration tests [skip changelog] - #11499
Merged
Merged
Conversation
The test removed the leaves of a file made of repeated "z" bytes. Those leaf CIDs are well known and public providers serve them, so the daemon fetched the "missing" blocks through delegated routing and the read and write succeeded. Random content keeps the blocks unreachable.
The check ran while the first daemon could still be migrating, and failed on the temporary backup file it was writing. Wait for the repo to reach the latest version first.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes two CLI tests that failed in a local
make test_clirun on the v0.43.2 release branch. Both tests are the same onmaster. Only test files change.TestMFSTimeoutOnMissingBlockfails every timeThe test builds a 1 MiB file from repeated
"z"bytes, removes its leaf blocks, and expectsfiles read/files writeto fail. All leaves have the same well-known CID,QmeAMsgaKpR6s5R5Hgd2WRnQxooFN1rCyUCdnhHMTkizJm, and public providers serve it (delegated-ipfs.devlists Pinata over bitswap and HTTP). The harness clearsBootstrapand turns off mDNS, butRouting.Typestaysauto, so the daemon finds the provider through delegated routing, fetches the "missing" blocks, and the commands succeed.The test now uses
random.Bytes, so no other node has the blocks.TestConcurrentMigrationsfails under loadThe test started a second
daemon --migrate2s after the first one, then asserted that no.tmp-*files exist. The second daemon fails onrepo.lockbefore it writes anything, but the first daemon may still be migrating. In the failing run, the leftover file was the first daemon's.tmp-config.16-to-17.bak*backup, which was still being written. That daemon never started its API within the 30s context.The test now waits until the repo
versionfile reachesRepoVersionbefore it checks for temp files. The check still catches files left behind by either daemon.How I checked it
TestMFSTimeoutOnMissingBlock: failed every run before the change, passed 2 of 2 after.TestConcurrentMigrations: passed 3 of 3 normally and 5 of 5 with all CPU cores busy. I could not reproduce the original failure locally, even after cutting the startup wait to 100ms, so no run shows the fix against the exact failure.go vetandgofmtare clean.make test_go_lintreports one existing issue infuse/node/mount_darwin.go, which this PR does not touch.References