Skip to content

Commit 92526a7

Browse files
committed
Test APPEND mode in all backends for groupbased Series
1 parent 5fd2f97 commit 92526a7

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

include/openPMD/openPMD.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ namespace openPMD {}
2727
// IWYU pragma: begin_exports
2828
#include "openPMD/Dataset.hpp"
2929
#include "openPMD/Datatype.hpp"
30+
#include "openPMD/Error.hpp"
3031
#include "openPMD/IterationEncoding.hpp"
3132
#include "openPMD/Iteration.hpp"
3233
#include "openPMD/Mesh.hpp"

test/SerialIOTest.cpp

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3980,8 +3980,17 @@ void append_mode( std::string const & extension )
39803980
{
39813981
Series write(
39823982
"../samples/append." + extension, Access::APPEND, jsonConfig );
3983+
if( write.backend() == "ADIOS1" )
3984+
{
3985+
REQUIRE_THROWS_AS(
3986+
write.flush(), error::OperationUnsupportedInBackend );
3987+
// destructor will be noisy now
3988+
return;
3989+
}
3990+
39833991
writeSomeIterations(
39843992
write.writeIterations(), std::vector< uint64_t >{ 2, 3 } );
3993+
write.flush();
39853994
}
39863995
{
39873996
Series read( "../samples/append." + extension, Access::READ_ONLY );
@@ -3991,8 +4000,8 @@ void append_mode( std::string const & extension )
39914000

39924001
TEST_CASE( "append_mode", "[serial]" )
39934002
{
3994-
// @todo test for file-based appending
3995-
append_mode( "json" );
3996-
// append_mode( "bp" );
3997-
//append_mode( "h5" );
4003+
for( auto const & t : testedFileExtensions() )
4004+
{
4005+
append_mode( t );
4006+
}
39984007
}

0 commit comments

Comments
 (0)