Icrease MC time limit
This commit is contained in:
@@ -101,7 +101,7 @@ distsys-membership [ЗДЕСЬ МОЖНО УКАЗАТЬ ОПЦИИ]
|
|||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| Обычный тест или один прогон CHAOS MONKEY | 15 секунд | `--test-timeout` |
|
| Обычный тест или один прогон CHAOS MONKEY | 15 секунд | `--test-timeout` |
|
||||||
| Все прогоны CHAOS MONKEY вместе | 300 секунд | `--chaos-timeout` |
|
| Все прогоны CHAOS MONKEY вместе | 300 секунд | `--chaos-timeout` |
|
||||||
| Обе фазы MODEL CHECKING вместе | 300 секунд | `--mc-timeout` |
|
| Обе фазы MODEL CHECKING вместе | 450 секунд | `--mc-timeout` |
|
||||||
| Каждый тест SCALABILITY | 60 секунд | `--scalability-timeout` |
|
| Каждый тест SCALABILITY | 60 секунд | `--scalability-timeout` |
|
||||||
| Полный набор тестов | 540 секунд | `--suite-timeout` |
|
| Полный набор тестов | 540 секунд | `--suite-timeout` |
|
||||||
|
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ struct Args {
|
|||||||
scalability_timeout: u64,
|
scalability_timeout: u64,
|
||||||
|
|
||||||
/// Wall-clock limit in seconds for both model-checking phases
|
/// Wall-clock limit in seconds for both model-checking phases
|
||||||
#[clap(long, default_value = "300", value_parser = clap::value_parser!(u64).range(1..=300))]
|
#[clap(long, default_value_t = tests_mc::MC_TIME_LIMIT_SECONDS, value_parser = clap::value_parser!(u64).range(1..=tests_mc::MC_TIME_LIMIT_SECONDS))]
|
||||||
mc_timeout: u64,
|
mc_timeout: u64,
|
||||||
|
|
||||||
/// Total wall-clock budget in seconds (the Docker watchdog is 600s)
|
/// Total wall-clock budget in seconds (the Docker watchdog is 600s)
|
||||||
@@ -381,7 +381,11 @@ mod score_tests {
|
|||||||
0.,
|
0.,
|
||||||
),
|
),
|
||||||
(Some(Outcome::WorkerError("SIGKILL".into())), false, 0.),
|
(Some(Outcome::WorkerError("SIGKILL".into())), false, 0.),
|
||||||
(Some(Outcome::TimeLimit("MC budget".into())), true, 0.),
|
(
|
||||||
|
Some(Outcome::TimeLimit("test budget of 450s".into())),
|
||||||
|
true,
|
||||||
|
0.,
|
||||||
|
),
|
||||||
(
|
(
|
||||||
Some(Outcome::TimeLimit("suite budget after MC started".into())),
|
Some(Outcome::TimeLimit("suite budget after MC started".into())),
|
||||||
true,
|
true,
|
||||||
|
|||||||
@@ -279,7 +279,12 @@ pub fn worker(args: &Args) {
|
|||||||
let mut outcome = match result {
|
let mut outcome = match result {
|
||||||
Ok(Ok(_)) => Outcome::Passed,
|
Ok(Ok(_)) => Outcome::Passed,
|
||||||
Ok(Err(message))
|
Ok(Err(message))
|
||||||
if message == "time limit of 300s exceeded" && test.name == "MODEL CHECKING" =>
|
if test.name == "MODEL CHECKING"
|
||||||
|
&& message
|
||||||
|
== format!(
|
||||||
|
"time limit of {}s exceeded",
|
||||||
|
crate::tests_mc::MC_TIME_LIMIT_SECONDS
|
||||||
|
) =>
|
||||||
{
|
{
|
||||||
Outcome::TimeLimit(message)
|
Outcome::TimeLimit(message)
|
||||||
}
|
}
|
||||||
@@ -786,6 +791,33 @@ mod tests {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn mc_budget_is_450_seconds_with_the_same_suite_and_other_test_limits() {
|
||||||
|
let args = <Args as clap::Parser>::parse_from(["membership"]);
|
||||||
|
assert_eq!(args.mc_timeout, 450);
|
||||||
|
assert_eq!(args.suite_timeout, 540);
|
||||||
|
assert_eq!(args.chaos_timeout, 300);
|
||||||
|
for test in tests(&args) {
|
||||||
|
let expected = if test.name == "MODEL CHECKING" {
|
||||||
|
450
|
||||||
|
} else if test.name.starts_with("SCALABILITY") {
|
||||||
|
60
|
||||||
|
} else {
|
||||||
|
15
|
||||||
|
};
|
||||||
|
assert_eq!(seconds(&args, &test), expected, "{}", test.name);
|
||||||
|
}
|
||||||
|
assert!(
|
||||||
|
<Args as clap::Parser>::try_parse_from(["membership", "--mc-timeout", "450"]).is_ok()
|
||||||
|
);
|
||||||
|
for value in ["0", "451"] {
|
||||||
|
assert!(
|
||||||
|
<Args as clap::Parser>::try_parse_from(["membership", "--mc-timeout", value])
|
||||||
|
.is_err()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn default_memory_limits_are_separate_for_mc_and_simulation() {
|
fn default_memory_limits_are_separate_for_mc_and_simulation() {
|
||||||
let args = <Args as clap::Parser>::parse_from(["membership"]);
|
let args = <Args as clap::Parser>::parse_from(["membership"]);
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ use anysystem::{Message, System};
|
|||||||
|
|
||||||
use crate::common::*;
|
use crate::common::*;
|
||||||
|
|
||||||
|
pub const MC_TIME_LIMIT_SECONDS: u64 = 450;
|
||||||
|
|
||||||
pub fn test_mc_group(config: &TestConfig) -> TestResult {
|
pub fn test_mc_group(config: &TestConfig) -> TestResult {
|
||||||
let mut rand = Pcg64::seed_from_u64(config.seed);
|
let mut rand = Pcg64::seed_from_u64(config.seed);
|
||||||
let mut sys = build_system(config);
|
let mut sys = build_system(config);
|
||||||
@@ -56,7 +58,9 @@ fn mc_explore_after_joins(sys: &mut System, seed_proc: String) -> Result<HashSet
|
|||||||
goals::depth_reached(20),
|
goals::depth_reached(20),
|
||||||
]))
|
]))
|
||||||
// Inner exploration safeguard; the supervisor also bounds both MC phases.
|
// Inner exploration safeguard; the supervisor also bounds both MC phases.
|
||||||
.invariant(invariants::time_limit(Duration::from_secs(300)))
|
.invariant(invariants::time_limit(Duration::from_secs(
|
||||||
|
MC_TIME_LIMIT_SECONDS,
|
||||||
|
)))
|
||||||
// Collect states in which the group should be stabilized, namely:
|
// Collect states in which the group should be stabilized, namely:
|
||||||
// either no events left, or every process received at least 3 messages.
|
// either no events left, or every process received at least 3 messages.
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user