Skip to content

Commit

Permalink
unignore failing test which shows when bug was reintroduced in
Browse files Browse the repository at this point in the history
  • Loading branch information
4meta5 committed Sep 4, 2024
1 parent 05204a0 commit 8440347
Showing 1 changed file with 25 additions and 21 deletions.
46 changes: 25 additions & 21 deletions pallets/tasks/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1492,27 +1492,6 @@ fn test_task_execution_order() {
});
}

#[test]
#[ignore]
fn test_multi_shard_distribution() {
new_test_ext().execute_with(|| {
// Shard creation
for _ in 0..3 {
create_shard(ETHEREUM, 3, 1);
}

// Tasks creation and assingment
for _ in 0..9 {
create_task(ETHEREUM, 3, TaskPhase::Read);
}
register_gateway(0);
roll(1);
assert_eq!(ShardTasks::<Test>::iter_prefix(0).count(), 3);
assert_eq!(ShardTasks::<Test>::iter_prefix(1).count(), 3);
assert_eq!(ShardTasks::<Test>::iter_prefix(2).count(), 3);
});
}

#[test]
fn test_multi_shard_distribution_task_more_than_limit() {
new_test_ext().execute_with(|| {
Expand Down Expand Up @@ -1622,3 +1601,28 @@ fn test_assignment_with_diff_shard_size() {
});
}
*/

/*
// Ignored in PR #1047 (schedule in on-finalize)
to reintroduce unbalanced task distribution bug
// Expect this PR to make this test passing
#[test]
fn test_multi_shard_distribution() {
new_test_ext().execute_with(|| {
// Shard creation
for _ in 0..3 {
create_shard(ETHEREUM, 3, 1);
}
// Tasks creation and assingment
for _ in 0..9 {
create_task(ETHEREUM, 3, TaskPhase::Read);
}
register_gateway(0);
roll(1);
assert_eq!(ShardTasks::<Test>::iter_prefix(0).count(), 3);
assert_eq!(ShardTasks::<Test>::iter_prefix(1).count(), 3);
assert_eq!(ShardTasks::<Test>::iter_prefix(2).count(), 3);
});
}
*/

0 comments on commit 8440347

Please sign in to comment.