-
Notifications
You must be signed in to change notification settings - Fork 5
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
Fix test in service-discovery to be applied in mainnet registry #132
Fix test in service-discovery to be applied in mainnet registry #132
Conversation
pietrodimarco-dfinity
commented
Jan 29, 2024
•
edited
Loading
edited
- Add mainnet test using Bazel
* Add mainnet test using Cargo * Add mainnet test using Bazel * Add utility function to download and decompress archives
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.
Its a great start, thanks Pietro!
let mut command = Command::new(BAZEL_BIN_PATH); | ||
|
||
args.push(data_path.as_path().to_str().unwrap()); | ||
let mut child = command.args(args).spawn().unwrap(); |
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.
So we're running bazel to fetch the archive, from within the test?
There may be a risk of a deadlock since there can only be one instance of bazel running at a time.
So this bazel target must depend on the BAZEL_DATA_PATH binary. Right?
A few lines of comments would generally be useful to understand what we're doing here.
let handle = rt.spawn(async { fetch_targets().await }); | ||
let targets = rt.block_on(handle).unwrap().unwrap(); | ||
child.kill().expect("command couldn't be killed"); | ||
assert_eq!(targets.len(), 7274); |
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.
This number will have to be updated from time to time? If yes, at least a comment would be useful:
- what is this?
- why are we doing it?
- how to update it?