fix(test): resolve dgraph binary selection for macOS in dgraphtest and testutil#9603
Closed
shiva-istari wants to merge 1 commit intomainfrom
Closed
fix(test): resolve dgraph binary selection for macOS in dgraphtest and testutil#9603shiva-istari wants to merge 1 commit intomainfrom
shiva-istari wants to merge 1 commit intomainfrom
Conversation
This comment has been minimized.
This comment has been minimized.
55a62d6 to
702e740
Compare
This was referenced Feb 19, 2026
Contributor
|
Thanks @shiva-istari! Incorporated your changes into #9606 with an additional fix for a data clobbering bug in |
matthewmcneely
pushed a commit
that referenced
this pull request
Feb 23, 2026
…9606) **Description** This PR builds upon [#9603](#9603) by @shiva-istari and adds fixes for issues exposed when macOS skip guards are removed. ### Original PR (#9603) > On macOS, setupBinary() now copies both the Linux binary (for Docker containers) and the host-native binary (for local bulk/live loader commands) into tempBinDir. On Linux, a single binary serves both purposes. BulkLoad() and LiveLoad() use hostDgraphBinaryPath() to pick the correct one based on the platform. Removed macOS skip guards from 13 test files so all tests run on both platforms after make install. ### Fix 1: test data clobbering in `--suite=all` (`t/t.go`) When running `make test` (`--suite=all`), the `load` and `ldbc` download blocks shared `*tmp`. The LDBC block's `MakeDirEmpty` wiped load data files, causing `systest/1million` to fail. Fixed by hoisting directory init above both download blocks so `MakeDirEmpty` runs once. Also uses a dedicated subdirectory (`dgraph-test-data`) instead of bare `os.TempDir()`. ### Fix 2: `$GOPATH/bin` in Docker Compose files (30 files) 30 Docker Compose files hardcoded `$GOPATH/bin` as the binary mount source. On macOS this mounts the native binary into Linux containers, crashing them. Replaced all 78 occurrences with `${LINUX_GOBIN:-$GOPATH/bin}` to match the pattern in `dgraph/docker-compose.yml`. ### Fix 3: add `--timeout` flag to t/ runner The per-package test timeout was hardcoded to 30m, which is too short for the `21million/live` test on macOS (where Docker runs in a VM with I/O overhead). Added a `--timeout` flag to `t/t.go` and wired it through the Makefile as `TIMEOUT`: ```bash make test TIMEOUT=90m cd t && ./t --suite=all --timeout=60m ``` Defaults remain unchanged: 30m normal, 180m with `--race`. An explicit `--timeout` overrides both. Updated docs in Makefile help, CONTRIBUTING.md, and TESTING.md. **Checklist** - [x] The PR title follows the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/#summary) syntax - [x] Code compiles correctly and linting passes locally --------- Co-authored-by: Shiva <shiva@Shivajis-MacBook-Pro.local>
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.
On macOS, setupBinary() now copies both the Linux binary (for Docker containers) and the host-native binary (for local bulk/live loader commands) into tempBinDir. On Linux, a single binary serves both purposes. BulkLoad() and LiveLoad() use hostDgraphBinaryPath() to pick the correct one based on the platform. Removed macOS skip guards from 13 test files so all tests run on both platforms after make install.