fix(test): resolve macOS binary selection and test data clobbering#9605
Closed
mlwelles wants to merge 2 commits intodgraph-io:mainfrom
Closed
fix(test): resolve macOS binary selection and test data clobbering#9605mlwelles wants to merge 2 commits intodgraph-io:mainfrom
mlwelles wants to merge 2 commits intodgraph-io:mainfrom
Conversation
When running `make test` (--suite=all), the load and ldbc download
blocks in t/t.go shared the same *tmp directory. The ldbc block's
MakeDirEmpty call wiped files downloaded by the load block, causing
systest/1million to fail with missing schema files.
Hoist directory initialization above both download blocks so
MakeDirEmpty runs exactly once. Both datasets coexist in the same
directory since their filenames don't overlap. Also use a dedicated
subdirectory (dgraph-test-data) instead of bare os.TempDir() to
avoid wiping the system temp directory.
Add testSuiteContainsAny() helper to replace repeated
testSuiteContains("x") || testSuiteContains("y") patterns.
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.
Description
This PR builds upon #9603 by @shiva-istari and adds a fix for a pre-existing bug in
t/t.gothat is exposed when the macOS skip guards are removed.Original PR (#9603)
Additional fix: test data clobbering in
--suite=allWhen running
make test(--suite=all), theloadandldbcdownload blocks int/t.goshared the same*tmpdirectory. The sequence was:*tmp = os.TempDir(), callsMakeDirEmpty, downloads 1million/21million data files*tmpis already set, callsMakeDirEmptyon the same directory — wiping the load data filessystest/1millionfails withSchema path(...1million-noindex.schema) does not existThis bug existed on
mainbut was masked because the macOS skip guards (removed by #9603) preventedsystest/1millionfrom ever running on macOS. On Linux CI, suites are typically run individually rather than via--suite=all, so the two download blocks never both executed.Fix: Hoist directory initialization above both download blocks so
MakeDirEmptyruns exactly once. Both datasets coexist in the same directory since their filenames don't overlap (load:1million*,21million*; LDBC:ldbcTypes.schema,*_0.rdf). Also uses a dedicated subdirectory (dgraph-test-data) instead of bareos.TempDir()to avoid wiping the system-wide temp directory.Adds a
testSuiteContainsAny()helper to replace repeatedtestSuiteContains("x") || testSuiteContains("y")patterns.Checklist