tests: delete BOOST_CHECK_NO_THROW in ProtocolFactory test suites
This makes exception message appear in testing logs, which
simplifies debugging.
refs #3904
Change-Id: I7d1a36c1c66d885a03e6a6d283e2907364f7f31a
diff --git a/tests/daemon/face/ethernet-factory.t.cpp b/tests/daemon/face/ethernet-factory.t.cpp
index 7c7f295..62748cd 100644
--- a/tests/daemon/face/ethernet-factory.t.cpp
+++ b/tests/daemon/face/ethernet-factory.t.cpp
@@ -84,8 +84,8 @@
}
)CONFIG";
- BOOST_CHECK_NO_THROW(parseConfig(CONFIG, true));
- BOOST_CHECK_NO_THROW(parseConfig(CONFIG, false));
+ parseConfig(CONFIG, true);
+ parseConfig(CONFIG, false);
BOOST_CHECK_EQUAL(this->countEtherMcastFaces(), netifs.size());
}
@@ -98,8 +98,8 @@
}
)CONFIG";
- BOOST_CHECK_NO_THROW(parseConfig(CONFIG, true));
- BOOST_CHECK_NO_THROW(parseConfig(CONFIG, false));
+ parseConfig(CONFIG, true);
+ parseConfig(CONFIG, false);
BOOST_CHECK_EQUAL(this->countEtherMcastFaces(), 0);
}
@@ -122,7 +122,7 @@
)CONFIG";
boost::replace_first(CONFIG, "%ifname", netifs.front().name);
- BOOST_CHECK_NO_THROW(parseConfig(CONFIG, false));
+ parseConfig(CONFIG, false);
auto etherMcastFaces = this->listEtherMcastFaces();
BOOST_REQUIRE_EQUAL(etherMcastFaces.size(), 1);
BOOST_CHECK_EQUAL(etherMcastFaces.front()->getLocalUri().getHost(), netifs.front().name);
@@ -146,7 +146,7 @@
)CONFIG";
boost::replace_first(CONFIG, "%ifname", netifs.front().name);
- BOOST_CHECK_NO_THROW(parseConfig(CONFIG, false));
+ parseConfig(CONFIG, false);
auto etherMcastFaces = this->listEtherMcastFaces();
BOOST_CHECK_EQUAL(etherMcastFaces.size(), netifs.size() - 1);
BOOST_CHECK_EQUAL(boost::count_if(etherMcastFaces, [=] (const Face* face) {
@@ -175,16 +175,16 @@
}
)CONFIG";
- BOOST_CHECK_NO_THROW(parseConfig(CONFIG_WITHOUT_MCAST, false));
+ parseConfig(CONFIG_WITHOUT_MCAST, false);
BOOST_CHECK_EQUAL(this->countEtherMcastFaces(), 0);
SKIP_IF_ETHERNET_NETIF_COUNT_LT(1);
- BOOST_CHECK_NO_THROW(parseConfig(CONFIG_WITH_MCAST, false));
+ parseConfig(CONFIG_WITH_MCAST, false);
g_io.poll();
BOOST_CHECK_EQUAL(this->countEtherMcastFaces(), netifs.size());
- BOOST_CHECK_NO_THROW(parseConfig(CONFIG_WITHOUT_MCAST, false));
+ parseConfig(CONFIG_WITHOUT_MCAST, false);
g_io.poll();
BOOST_CHECK_EQUAL(this->countEtherMcastFaces(), 0);
}
@@ -212,13 +212,13 @@
}
)CONFIG";
- BOOST_CHECK_NO_THROW(parseConfig(CONFIG1, false));
+ parseConfig(CONFIG1, false);
auto etherMcastFaces = this->listEtherMcastFaces();
BOOST_REQUIRE_EQUAL(etherMcastFaces.size(), netifs.size());
BOOST_CHECK_EQUAL(etherMcastFaces.front()->getRemoteUri(),
FaceUri(ethernet::Address(0x01, 0x00, 0x00, 0x00, 0x00, 0x01)));
- BOOST_CHECK_NO_THROW(parseConfig(CONFIG2, false));
+ parseConfig(CONFIG2, false);
g_io.poll();
etherMcastFaces = this->listEtherMcastFaces();
BOOST_REQUIRE_EQUAL(etherMcastFaces.size(), netifs.size());
diff --git a/tests/daemon/face/tcp-factory.t.cpp b/tests/daemon/face/tcp-factory.t.cpp
index 617c4cc..9f5e7c1 100644
--- a/tests/daemon/face/tcp-factory.t.cpp
+++ b/tests/daemon/face/tcp-factory.t.cpp
@@ -57,8 +57,8 @@
}
)CONFIG";
- BOOST_CHECK_NO_THROW(parseConfig(CONFIG, true));
- BOOST_CHECK_NO_THROW(parseConfig(CONFIG, false));
+ parseConfig(CONFIG, true);
+ parseConfig(CONFIG, false);
auto& factory = this->getFactoryById<TcpFactory>("tcp");
BOOST_CHECK_EQUAL(factory.getChannels().size(), 2);
@@ -72,8 +72,8 @@
}
)CONFIG";
- BOOST_CHECK_NO_THROW(parseConfig(CONFIG, true));
- BOOST_CHECK_NO_THROW(parseConfig(CONFIG, false));
+ parseConfig(CONFIG, true);
+ parseConfig(CONFIG, false);
auto& factory = this->getFactoryById<TcpFactory>("tcp");
BOOST_CHECK_EQUAL(factory.getChannels().size(), 0);
diff --git a/tests/daemon/face/unix-stream-factory.t.cpp b/tests/daemon/face/unix-stream-factory.t.cpp
index 19c7e0d..b0d48c7 100644
--- a/tests/daemon/face/unix-stream-factory.t.cpp
+++ b/tests/daemon/face/unix-stream-factory.t.cpp
@@ -57,8 +57,8 @@
}
)CONFIG";
- BOOST_CHECK_NO_THROW(parseConfig(CONFIG, true));
- BOOST_CHECK_NO_THROW(parseConfig(CONFIG, false));
+ parseConfig(CONFIG, true);
+ parseConfig(CONFIG, false);
auto& factory = this->getFactoryById<UnixStreamFactory>("unix");
BOOST_CHECK_EQUAL(factory.getChannels().size(), 1);
@@ -72,8 +72,8 @@
}
)CONFIG";
- BOOST_CHECK_NO_THROW(parseConfig(CONFIG, true));
- BOOST_CHECK_NO_THROW(parseConfig(CONFIG, false));
+ parseConfig(CONFIG, true);
+ parseConfig(CONFIG, false);
auto& factory = this->getFactoryById<UnixStreamFactory>("unix");
BOOST_CHECK_EQUAL(factory.getChannels().size(), 0);
diff --git a/tests/daemon/face/websocket-factory.t.cpp b/tests/daemon/face/websocket-factory.t.cpp
index d4a6d5e..78d2321 100644
--- a/tests/daemon/face/websocket-factory.t.cpp
+++ b/tests/daemon/face/websocket-factory.t.cpp
@@ -56,8 +56,8 @@
}
)CONFIG";
- BOOST_CHECK_NO_THROW(parseConfig(CONFIG, true));
- BOOST_CHECK_NO_THROW(parseConfig(CONFIG, false));
+ parseConfig(CONFIG, true);
+ parseConfig(CONFIG, false);
auto& factory = this->getFactoryById<WebSocketFactory>("websocket");
checkChannelListEqual(factory, {"ws://[::]:9696"});
@@ -78,8 +78,8 @@
}
)CONFIG";
- BOOST_CHECK_NO_THROW(parseConfig(CONFIG, true));
- BOOST_CHECK_NO_THROW(parseConfig(CONFIG, false));
+ parseConfig(CONFIG, true);
+ parseConfig(CONFIG, false);
auto& factory = this->getFactoryById<WebSocketFactory>("websocket");
checkChannelListEqual(factory, {"ws://0.0.0.0:9696"});
@@ -154,7 +154,7 @@
}
)CONFIG";
- BOOST_CHECK_NO_THROW(parseConfig(CONFIG1, false));
+ parseConfig(CONFIG1, false);
auto& factory = this->getFactoryById<WebSocketFactory>("websocket");
checkChannelListEqual(factory, {"ws://[::]:9001"});
@@ -168,7 +168,7 @@
}
)CONFIG";
- BOOST_CHECK_NO_THROW(parseConfig(CONFIG2, false));
+ parseConfig(CONFIG2, false);
checkChannelListEqual(factory, {"ws://[::]:9001", "ws://[::]:9002"});
}