Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
Robadob committed Jul 27, 2023
1 parent 58732f4 commit cbac967
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/test_cases/simulation/test_mpi_ensemble.cu
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ class TestMPIEnsemble : public testing::Test {
};
TEST_F(TestMPIEnsemble, success) {
initEnsemble();
const unsigned int successful_runs = ensemble->simulate(*plans);
EXPECT_EQ(successful_runs, 100u);
const unsigned int err_count = ensemble->simulate(*plans);
EXPECT_EQ(err_count, 0u);
// Get stderr and stdout
std::string output = testing::internal::GetCapturedStdout();
std::string errors = testing::internal::GetCapturedStderr();
Expand All @@ -158,11 +158,11 @@ TEST_F(TestMPIEnsemble, error_off) {
model->newLayer().addHostFunction(throw_exception);
initEnsemble();
ensemble->Config().error_level = CUDAEnsemble::EnsembleConfig::Off;
unsigned int successful_runs = 0;
EXPECT_NO_THROW(successful_runs = ensemble->simulate(*plans));
unsigned int err_count = 0;
EXPECT_NO_THROW(err_count = ensemble->simulate(*plans));
// With error off, we would expect to see run index 12 fail
// Therefore 99 returned instead of 100
EXPECT_EQ(successful_runs, 99u);
EXPECT_EQ(err_count, 1u);
// Get stderr and stdout
std::string output = testing::internal::GetCapturedStdout();
std::string errors = testing::internal::GetCapturedStderr();
Expand Down

0 comments on commit cbac967

Please sign in to comment.