@@ -5625,7 +5625,25 @@ void append_mode(
56255625 }
56265626
56275627 writeSomeIterations (
5628- write.writeIterations (), std::vector<uint64_t >{4 , 3 });
5628+ write.writeIterations (), std::vector<uint64_t >{4 , 3 , 10 });
5629+ write.flush ();
5630+ }
5631+ {
5632+ Series write (filename, Access::APPEND, jsonConfig);
5633+ if (variableBased)
5634+ {
5635+ write.setIterationEncoding (IterationEncoding::variableBased);
5636+ }
5637+ if (write.backend () == " ADIOS1" )
5638+ {
5639+ REQUIRE_THROWS_AS (
5640+ write.flush (), error::OperationUnsupportedInBackend);
5641+ // destructor will be noisy now
5642+ return ;
5643+ }
5644+
5645+ writeSomeIterations (
5646+ write.writeIterations (), std::vector<uint64_t >{7 , 1 , 11 });
56295647 write.flush ();
56305648 }
56315649 {
@@ -5635,18 +5653,19 @@ void append_mode(
56355653 // in variable-based encodings, iterations are not parsed ahead of
56365654 // time but as they go
56375655 unsigned counter = 0 ;
5656+ uint64_t iterationOrder[] = {0 , 1 , 2 , 3 , 4 , 10 , 7 , 11 };
56385657 for (auto iteration : read.readIterations ())
56395658 {
5640- REQUIRE (iteration.iterationIndex == counter);
5659+ REQUIRE (iteration.iterationIndex == iterationOrder[ counter] );
56415660 ++counter;
56425661 }
5643- REQUIRE (counter == 5 );
5662+ REQUIRE (counter == 8 );
56445663 // Cannot do listSeries here because the Series is already drained
56455664 REQUIRE_THROWS_AS (helper::listSeries (read), error::WrongAPIUsage);
56465665 }
56475666 else
56485667 {
5649- REQUIRE (read.iterations .size () == 5 );
5668+ REQUIRE (read.iterations .size () == 8 );
56505669 /*
56515670 * Roadmap: for now, reading this should work by ignoring the last
56525671 * duplicate iteration.
0 commit comments