-
Notifications
You must be signed in to change notification settings - Fork 1.6k
chore(test): Increase performance of t-harness tests #9485
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
chore(test): Increase performance of t-harness tests #9485
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces lazy initialization of Docker container addresses to improve performance of test harness execution. The changes move from global variable initialization to a thread-safe, on-demand address resolution pattern that supports concurrent address lookups and provides fallback values when Docker isn't available.
- Replaces direct global variable access with getter functions that ensure addresses are initialized
- Implements concurrent address resolution using goroutines and sync.WaitGroup for faster startup
- Adds fallback default addresses when Docker containers are not available
Reviewed Changes
Copilot reviewed 54 out of 54 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| testutil/client.go | Core refactoring: converts global variables to private with lazy initialization, adds getter functions, implements concurrent address resolution |
| Multiple test files | Updates all test files to use new getter functions instead of direct global variable access |
| testutil/minio.go | Adds MaxRetries configuration for improved reliability |
| t/t.go | Adds concurrent health checking for cluster startup and GOPATH validation |
| dgraph/docker-compose.yml | Improves GOPATH environment variable validation with error messages |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
ef42d4e to
424ab74
Compare
…version is *indeed* higher
Description
This PR significantly improves performance of "t"-based testing in Dgraph
tIn general (on my M4) many tests improve time to complete by a factor of 3.
Checklist