Skip to content

Commit

Permalink
#2195: tests: name some epochs, add some better prints for debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
lifflander committed Oct 2, 2023
1 parent 6da8f91 commit bed01a0
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tests/unit/termination/test_term_chaining.cc
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ struct TestTermChaining : TestParallelHarness {
}

static void start_chain() {
EpochType epoch1 = theTerm()->makeEpochRooted();
EpochType epoch1 = theTerm()->makeEpochRooted("rooted epoch 1");
vt::theMsg()->pushEpoch(epoch1);
auto msg = makeMessage<TestMsg>();
chain.add(
Expand All @@ -145,7 +145,7 @@ struct TestTermChaining : TestParallelHarness {
vt::theMsg()->popEpoch(epoch1);
vt::theTerm()->finishedEpoch(epoch1);

EpochType epoch2 = theTerm()->makeEpochRooted();
EpochType epoch2 = theTerm()->makeEpochRooted("rooted epoch 2");
vt::theMsg()->pushEpoch(epoch2);
auto msg2 = makeMessage<TestMsg>();
chain.add(
Expand Down Expand Up @@ -213,7 +213,7 @@ TEST_F(TestTermChaining, test_termination_chaining_1) {

auto const& this_node = theContext()->getNode();

epoch = theTerm()->makeEpochCollective();
epoch = theTerm()->makeEpochCollective("top chain");

handler_count = 0;

Expand All @@ -224,16 +224,18 @@ TEST_F(TestTermChaining, test_termination_chaining_1) {
start_chain();
theTerm()->finishedEpoch(epoch);
theMsg()->popEpoch(epoch);
fmt::print("before run 1\n");
vt_print(gen, "before run 1\n");
vt::runSchedulerThrough(epoch);
fmt::print("after run 1\n");
vt_print(gen, "after run 1\n");

EXPECT_EQ(handler_count, 4);
} else {
theMsg()->pushEpoch(epoch);
theTerm()->finishedEpoch(epoch);
theMsg()->popEpoch(epoch);
vt_print(gen, "before run 1 (other)\n");
vt::runSchedulerThrough(epoch);
vt_print(gen, "after run 1 (other)\n");
EXPECT_EQ(handler_count, 13);
}
}
Expand Down

0 comments on commit bed01a0

Please sign in to comment.