Skip to content
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

Merged
merged 12 commits into from
Jan 30, 2024

Conversation

pietrodimarco-dfinity
Copy link
Contributor

@pietrodimarco-dfinity pietrodimarco-dfinity commented Jan 29, 2024

  • Add mainnet test using Bazel

* Add mainnet test using Cargo
* Add mainnet test using Bazel
* Add utility function to download and decompress archives
@pietrodimarco-dfinity pietrodimarco-dfinity requested a review from a team as a code owner January 29, 2024 22:30
@pietrodimarco-dfinity pietrodimarco-dfinity changed the title Fix test in service-discovery to be applied in mainnet registry (#111) Fix test in service-discovery to be applied in mainnet registry Jan 29, 2024
Copy link
Contributor

@NikolaMilosa NikolaMilosa left a 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!

@pietrodimarco-dfinity pietrodimarco-dfinity added this pull request to the merge queue Jan 30, 2024
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();
Copy link
Member

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);
Copy link
Member

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?

Merged via the queue into main with commit 3d44ffd Jan 30, 2024
3 checks passed
@pietrodimarco-dfinity pietrodimarco-dfinity deleted the test-multiservice-discovery-mainnet branch January 30, 2024 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants