@@ -5628,7 +5628,25 @@ void append_mode(
56285628 }
56295629
56305630 writeSomeIterations (
5631- write.writeIterations (), std::vector<uint64_t >{4 , 3 });
5631+ write.writeIterations (), std::vector<uint64_t >{4 , 3 , 10 });
5632+ write.flush ();
5633+ }
5634+ {
5635+ Series write (filename, Access::APPEND, jsonConfig);
5636+ if (variableBased)
5637+ {
5638+ write.setIterationEncoding (IterationEncoding::variableBased);
5639+ }
5640+ if (write.backend () == " ADIOS1" )
5641+ {
5642+ REQUIRE_THROWS_AS (
5643+ write.flush (), error::OperationUnsupportedInBackend);
5644+ // destructor will be noisy now
5645+ return ;
5646+ }
5647+
5648+ writeSomeIterations (
5649+ write.writeIterations (), std::vector<uint64_t >{7 , 1 , 11 });
56325650 write.flush ();
56335651 }
56345652 {
@@ -5638,18 +5656,19 @@ void append_mode(
56385656 // in variable-based encodings, iterations are not parsed ahead of
56395657 // time but as they go
56405658 unsigned counter = 0 ;
5659+ uint64_t iterationOrder[] = {0 , 1 , 2 , 3 , 4 , 10 , 7 , 11 };
56415660 for (auto const &iteration : read.readIterations ())
56425661 {
5643- REQUIRE (iteration.iterationIndex == counter);
5662+ REQUIRE (iteration.iterationIndex == iterationOrder[ counter] );
56445663 ++counter;
56455664 }
5646- REQUIRE (counter == 5 );
5665+ REQUIRE (counter == 8 );
56475666 // Cannot do listSeries here because the Series is already drained
56485667 REQUIRE_THROWS_AS (helper::listSeries (read), error::WrongAPIUsage);
56495668 }
56505669 else
56515670 {
5652- REQUIRE (read.iterations .size () == 5 );
5671+ REQUIRE (read.iterations .size () == 8 );
56535672 /*
56545673 * Roadmap: for now, reading this should work by ignoring the last
56555674 * duplicate iteration.
0 commit comments