Pocket-ic `mr_non_increasing_batch_time`

When running integration tests with pocket-ic, my console gets spammed with this message

Apr 16 09:19:29.621 WARN s:/n:/ic_messaging/message_routing mr_non_increasing_batch_time: Non-increasing batch time at height 5: state_time = 2021-05-06 19:17:10 UTC, batch_time = 2021-05-06 19:17:10 UTC.

What exactly is causing this and how can I fix it?

@mraszyk

It is caused by the fact that PocketIc does not automatically bump time in every round and thus the IC implementation complains that the time is not strictly increasing. It is already fixed in the master version of PocketIc and thus it’ll be fixed in the next PocketIc release.

2 Likes

Nice! For now I solved it by adding a pic.advance_time(Duration::from_secs(1)); after each call to pocket ic. This is not a long-term solution so great to see a solution coming soon!