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

Improve checkout cores test (fails by default) #1378

Closed
cryptonemo opened this issue Dec 1, 2020 · 1 comment
Closed

Improve checkout cores test (fails by default) #1378

cryptonemo opened this issue Dec 1, 2020 · 1 comment
Assignees
Labels

Comments

@cryptonemo
Copy link
Collaborator

Description

The checkout cores test always fails when the tests are run, by default, in parallel. Some options to fix it are to require tests be run in a single threaded manner (not generally practical due to extended wait times during development cycles), or to use a feature such as "single-threaded = []" and making the test conditionally compiled for when it's specified. We could add a CI job for this single test configuration, but also have the option to run it locally if required.

Acceptance criteria

All tests run need to pass.

Where to begin

Proposed diff:

diff --git a/storage-proofs/porep/Cargo.toml b/storage-proofs/porep/Cargo.toml
index d0957a6e..a8ff857d 100644
--- a/storage-proofs/porep/Cargo.toml
+++ b/storage-proofs/porep/Cargo.toml
@@ -53,6 +53,7 @@ default = ["pairing", "gpu"]
 gpu = ["storage-proofs-core/gpu", "filecoin-hashers/gpu"]
 pairing = ["storage-proofs-core/pairing", "bellperson/pairing", "neptune/pairing", "filecoin-hashers/pairing"]
 blst = ["storage-proofs-core/blst", "bellperson/blst", "neptune/blst", "filecoin-hashers/blst"]
+single-threaded = []
 
 [[bench]]
 name = "encode"
diff --git a/storage-proofs/porep/src/stacked/vanilla/cores.rs b/storage-proofs/porep/src/stacked/vanilla/cores.rs
index 2aed3d47..cc7abcfa 100644
--- a/storage-proofs/porep/src/stacked/vanilla/cores.rs
+++ b/storage-proofs/porep/src/stacked/vanilla/cores.rs
@@ -201,6 +201,7 @@ mod tests {
     }
 
     #[test]
+    #[cfg(feature="single-threaded")]
     fn test_checkout_cores() {
         let checkout1 = checkout_core_group();
         dbg!(&checkout1);
@cryptonemo
Copy link
Collaborator Author

Resolved with #1383

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant