Skip to content

Commit 474c844

Browse files
add slow tests
1 parent b45fedd commit 474c844

4 files changed

Lines changed: 26 additions & 1 deletion

File tree

.github/workflows/fast.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
Tests:
7171
name: "Tests (os: ${{ matrix.os }}, flags: \"${{ matrix.flags }}\") (partition: ${{ matrix.partition }}/2)"
7272
runs-on: ${{ matrix.os }}
73-
timeout-minutes: 90
73+
timeout-minutes: 60
7474
strategy:
7575
matrix:
7676
os: [ubuntu-latest, windows-latest, macos-latest]

cryptography/src/bls12381/dkg/golden/evrf/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -761,6 +761,7 @@ impl VrfCommitments {
761761
#[cfg(test)]
762762
mod tests {
763763
use super::*;
764+
use commonware_macros::test_group;
764765
use commonware_parallel::Sequential;
765766
use commonware_utils::test_rng;
766767
use std::sync::LazyLock;
@@ -769,6 +770,7 @@ mod tests {
769770
/// every test in this module uses 3.
770771
static TEST_SETUP: LazyLock<Setup> = LazyLock::new(|| Setup::new(NonZeroU32::new(3).unwrap()));
771772

773+
#[test_group("slow")]
772774
#[test]
773775
fn vrf_batch_checked_roundtrips_through_check_batch() {
774776
let mut rng = test_rng();
@@ -815,6 +817,7 @@ mod tests {
815817
assert_eq!(checked, &commitments.commitments);
816818
}
817819

820+
#[test_group("slow")]
818821
#[test]
819822
fn check_batch_rejects_perturbed_commitments() {
820823
let mut rng = test_rng();
@@ -903,6 +906,7 @@ mod tests {
903906
assert!(result.is_empty());
904907
}
905908

909+
#[test_group("slow")]
906910
#[test]
907911
fn check_batch_falls_back_to_per_sender_on_failure() {
908912
let mut rng = test_rng();

cryptography/src/bls12381/dkg/golden/mod.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1567,13 +1567,15 @@ mod tests {
15671567
.expect("plan should succeed");
15681568
}
15691569

1570+
#[test_group("slow")]
15701571
#[test]
15711572
fn multiple_dealers_multiple_players() {
15721573
Plan::new(4, 7, 3)
15731574
.run(&TEST_SETUP, 42, &Sequential)
15741575
.expect("plan should succeed");
15751576
}
15761577

1578+
#[test_group("slow")]
15771579
#[test]
15781580
fn many_dealers() {
15791581
Plan::new(10, 5, 0)
@@ -1583,6 +1585,7 @@ mod tests {
15831585

15841586
// Perturbation tests
15851587

1588+
#[test_group("slow")]
15861589
#[test]
15871590
fn bad_signature_filtered() {
15881591
// 1 bad sig out of 4 dealers, DKG succeeds
@@ -1592,6 +1595,7 @@ mod tests {
15921595
.expect("plan should succeed with 1 bad sig");
15931596
}
15941597

1598+
#[test_group("slow")]
15951599
#[test]
15961600
fn output_dealers_excludes_filtered_dealers() {
15971601
let mut rng = commonware_utils::test_rng();
@@ -1643,6 +1647,7 @@ mod tests {
16431647
);
16441648
}
16451649

1650+
#[test_group("slow")]
16461651
#[test]
16471652
fn bad_signature_too_many() {
16481653
// 3 bad sigs out of 4 dealers. quorum(4) = 3, so only 1 honest < 3.
@@ -1654,6 +1659,7 @@ mod tests {
16541659
.expect("plan should handle expected failure");
16551660
}
16561661

1662+
#[test_group("slow")]
16571663
#[test]
16581664
fn bad_share_filtered() {
16591665
// 1 dealer sends bad share, DKG succeeds
@@ -1663,6 +1669,7 @@ mod tests {
16631669
.expect("plan should succeed with 1 bad share");
16641670
}
16651671

1672+
#[test_group("slow")]
16661673
#[test]
16671674
fn bad_share_too_many() {
16681675
// 3 out of 4 dealers send bad shares. quorum(4) = 3, so only 1 honest < 3.
@@ -1674,6 +1681,7 @@ mod tests {
16741681
.expect("plan should handle expected failure");
16751682
}
16761683

1684+
#[test_group("slow")]
16771685
#[test]
16781686
fn bad_commitment_filtered() {
16791687
Plan::new(4, 7, 3)
@@ -1682,6 +1690,7 @@ mod tests {
16821690
.expect("plan should succeed with 1 bad commitment");
16831691
}
16841692

1693+
#[test_group("slow")]
16851694
#[test]
16861695
fn missing_share_filtered() {
16871696
Plan::new(4, 7, 3)
@@ -1690,6 +1699,7 @@ mod tests {
16901699
.expect("plan should succeed with 1 missing share");
16911700
}
16921701

1702+
#[test_group("slow")]
16931703
#[test]
16941704
fn shift_degree_filtered() {
16951705
Plan::new(4, 7, 3)
@@ -1698,6 +1708,7 @@ mod tests {
16981708
.expect("plan should succeed with 1 wrong degree dealer filtered");
16991709
}
17001710

1711+
#[test_group("slow")]
17011712
#[test]
17021713
fn insufficient_dealers() {
17031714
// Drop 3 out of 4 dealers. quorum(4) = 3, so only 1 < 3.
@@ -1711,6 +1722,7 @@ mod tests {
17111722

17121723
// Reshare tests
17131724

1725+
#[test_group("slow")]
17141726
#[test]
17151727
fn reshare_happy_path() {
17161728
Plan::new(4, 7, 3)
@@ -1719,6 +1731,7 @@ mod tests {
17191731
.expect("reshare should succeed");
17201732
}
17211733

1734+
#[test_group("slow")]
17221735
#[test]
17231736
fn reshare_replace_share_filtered() {
17241737
Plan::new(4, 7, 3)
@@ -1728,6 +1741,7 @@ mod tests {
17281741
.expect("reshare should succeed with 1 replaced share");
17291742
}
17301743

1744+
#[test_group("slow")]
17311745
#[test]
17321746
fn reshare_replace_share_fails() {
17331747
// 3 out of 4 dealers use wrong previous share. quorum(4) = 3, only 1 honest.
@@ -1780,6 +1794,7 @@ mod tests {
17801794
assert!(matches!(result, Err(Error::UnknownDealer(_))));
17811795
}
17821796

1797+
#[test_group("slow")]
17831798
#[test]
17841799
fn unknown_player() {
17851800
let mut rng = commonware_utils::test_rng();
@@ -1818,6 +1833,7 @@ mod tests {
18181833
assert!(matches!(result, Err(Error::UnknownPlayer)));
18191834
}
18201835

1836+
#[test_group("slow")]
18211837
#[test]
18221838
fn missing_dealer_share_in_reshare() {
18231839
let mut rng = commonware_utils::test_rng();
@@ -1860,6 +1876,7 @@ mod tests {
18601876
assert!(matches!(result, Err(Error::MissingDealerShare)));
18611877
}
18621878

1879+
#[test_group("slow")]
18631880
#[test]
18641881
fn signed_dealer_log_roundtrip() {
18651882
use commonware_parallel::Sequential;
@@ -1909,6 +1926,7 @@ mod tests {
19091926
observe(&mut rng, &TEST_SETUP, &info, logs, &Sequential).expect("observe should succeed");
19101927
}
19111928

1929+
#[test_group("slow")]
19121930
#[test]
19131931
fn output_roundtrip() {
19141932
let mut rng = commonware_utils::test_rng();
@@ -2056,6 +2074,7 @@ mod tests {
20562074
assert!(matches!(result, Err(Error::NumDealers(0))));
20572075
}
20582076

2077+
#[test_group("slow")]
20592078
#[test]
20602079
fn info_rejects_reshare_dealer_outside_previous_players() {
20612080
let mut rng = commonware_utils::test_rng();
@@ -2093,6 +2112,7 @@ mod tests {
20932112
assert!(matches!(result, Err(Error::UnknownDealer(_))));
20942113
}
20952114

2115+
#[test_group("slow")]
20962116
#[test]
20972117
fn info_rejects_reshare_with_too_few_dealers() {
20982118
let mut rng = commonware_utils::test_rng();

storage/src/qmdb/current/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2709,6 +2709,7 @@ pub mod tests {
27092709
});
27102710
}
27112711

2712+
#[test_group("slow")]
27122713
#[test_traced("INFO")]
27132714
fn test_all_variants_speculative_root_matches_committed() {
27142715
let executor = deterministic::Runner::default();

0 commit comments

Comments
 (0)