comparison UnitTestsSources/MultiThreadingTests.cpp @ 2867:251614c2edac

DicomMoveScuJob
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 08 Oct 2018 16:08:51 +0200
parents 8b00e4cb4a6b
children abce036683cd
comparison
equal deleted inserted replaced
2866:437e6ba20a5e 2867:251614c2edac
714 JobsEngine engine; 714 JobsEngine engine;
715 engine.SetThreadSleep(10); 715 engine.SetThreadSleep(10);
716 engine.SetWorkersCount(3); 716 engine.SetWorkersCount(3);
717 engine.Start(); 717 engine.Start();
718 718
719 ASSERT_TRUE(engine.GetRegistry().SubmitAndWait(new DummyJob(), rand() % 10)); 719 Json::Value content = Json::nullValue;
720 ASSERT_FALSE(engine.GetRegistry().SubmitAndWait(new DummyJob(true), rand() % 10)); 720 ASSERT_TRUE(engine.GetRegistry().SubmitAndWait(content, new DummyJob(), rand() % 10));
721 ASSERT_EQ(Json::objectValue, content.type());
722 ASSERT_EQ("world", content["hello"].asString());
723
724 content = Json::nullValue;
725 ASSERT_FALSE(engine.GetRegistry().SubmitAndWait(content, new DummyJob(true), rand() % 10));
726 ASSERT_EQ(Json::nullValue, content.type());
721 727
722 engine.Stop(); 728 engine.Stop();
723 } 729 }
724 730
725 731