Mercurial > hg > orthanc
diff UnitTestsSources/MultiThreadingTests.cpp @ 3240:e44e0127e553
Fix issue #134 (/patient/modify gives 500, should really be 400)
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 15 Feb 2019 17:26:45 +0100 |
parents | 2e1808b6146a |
children | bdafff1ce443 763533d6dd67 |
line wrap: on
line diff
--- a/UnitTestsSources/MultiThreadingTests.cpp Fri Feb 15 16:38:12 2019 +0100 +++ b/UnitTestsSources/MultiThreadingTests.cpp Fri Feb 15 17:26:45 2019 +0100 @@ -105,7 +105,7 @@ { if (fails_) { - return JobStepResult::Failure(ErrorCode_ParameterOutOfRange); + return JobStepResult::Failure(ErrorCode_ParameterOutOfRange, NULL); } else if (count_ == steps_ - 1) { @@ -724,12 +724,12 @@ engine.Start(); Json::Value content = Json::nullValue; - ASSERT_TRUE(engine.GetRegistry().SubmitAndWait(content, new DummyJob(), rand() % 10)); + engine.GetRegistry().SubmitAndWait(content, new DummyJob(), rand() % 10); ASSERT_EQ(Json::objectValue, content.type()); ASSERT_EQ("world", content["hello"].asString()); content = Json::nullValue; - ASSERT_FALSE(engine.GetRegistry().SubmitAndWait(content, new DummyJob(true), rand() % 10)); + ASSERT_THROW(engine.GetRegistry().SubmitAndWait(content, new DummyJob(true), rand() % 10), OrthancException); ASSERT_EQ(Json::nullValue, content.type()); engine.Stop();