Skip to content

Commit

Permalink
Fix recursive_count test failing
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkintoshZ authored and bkolobara committed Jun 3, 2022
1 parent 66675af commit 03ccf8f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion tests/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ fn mailbox_timeout(m: Mailbox<i32>) {

#[test]
fn recursive_count(mailbox: Mailbox<i32>) {
Process::spawn_link((mailbox.this(), 1000), recursive_count_sub);
let mut config = ProcessConfig::new();
config.set_can_spawn_processes(true);
Process::spawn_link_config(&config, (mailbox.this(), 1000), recursive_count_sub);
assert_eq!(500500, mailbox.receive());
}

Expand Down
6 changes: 4 additions & 2 deletions tests/task.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::time::Duration;

use lunatic::{sleep, spawn_link};
use lunatic::{sleep, spawn_link, ProcessConfig};
use lunatic_test::test;

#[test]
Expand All @@ -25,7 +25,9 @@ fn result_must_be_called() {

#[test]
fn recursive_count() {
let task = spawn_link!(@task |n = 1_000| recursive_count_sub(n));
let mut config = ProcessConfig::new();
config.set_can_spawn_processes(true);
let task = spawn_link!(@task &config, |n = 1_000| recursive_count_sub(n));
assert_eq!(500500, task.result());
}

Expand Down

0 comments on commit 03ccf8f

Please sign in to comment.