This commit is contained in:
maliakal_d 2021-11-25 08:54:01 +01:00
parent c1e374ed51
commit e7b11f3eb1

View File

@ -2005,8 +2005,6 @@ TEST_CASE("stop", "[.cmd]") {
REQUIRE_THROWS(proxy.Call("stop", {}, -1, GET)); REQUIRE_THROWS(proxy.Call("stop", {}, -1, GET));
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
std::chrono::nanoseconds prev_val; std::chrono::nanoseconds prev_val;
bool virtualDet =
det.isVirtualDetectorServer().tsquash("inconsistent virtual servers");
if (det_type != defs::MYTHEN3) { if (det_type != defs::MYTHEN3) {
prev_val = det.getExptime().tsquash("inconsistent exptime to test"); prev_val = det.getExptime().tsquash("inconsistent exptime to test");
} else { } else {
@ -2037,11 +2035,8 @@ TEST_CASE("stop", "[.cmd]") {
{ {
std::ostringstream oss; std::ostringstream oss;
proxy.Call("status", {}, -1, GET, oss); proxy.Call("status", {}, -1, GET, oss);
if (!virtualDet && det_type == defs::JUNGFRAU) { REQUIRE(((oss.str() == "status stopped\n") ||
REQUIRE(oss.str() == "status stopped\n"); (oss.str() == "status idle\n")));
} else {
REQUIRE(oss.str() == "status idle\n");
}
} }
det.setExptime(-1, prev_val); det.setExptime(-1, prev_val);
det.setPeriod(prev_period); det.setPeriod(prev_period);
@ -2053,8 +2048,6 @@ TEST_CASE("status", "[.cmd]") {
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
std::chrono::nanoseconds prev_val; std::chrono::nanoseconds prev_val;
bool virtualDet =
det.isVirtualDetectorServer().tsquash("inconsistent virtual servers");
if (det_type != defs::MYTHEN3) { if (det_type != defs::MYTHEN3) {
prev_val = det.getExptime().tsquash("inconsistent exptime to test"); prev_val = det.getExptime().tsquash("inconsistent exptime to test");
} else { } else {
@ -2081,11 +2074,8 @@ TEST_CASE("status", "[.cmd]") {
{ {
std::ostringstream oss; std::ostringstream oss;
proxy.Call("status", {}, -1, GET, oss); proxy.Call("status", {}, -1, GET, oss);
if (!virtualDet && det_type == defs::JUNGFRAU) { REQUIRE(((oss.str() == "status stopped\n") ||
REQUIRE(oss.str() == "status stopped\n"); (oss.str() == "status idle\n")));
} else {
REQUIRE(oss.str() == "status idle\n");
}
} }
det.setExptime(-1, prev_val); det.setExptime(-1, prev_val);
det.setPeriod(prev_period); det.setPeriod(prev_period);