Add tests for poller.

This commit is contained in:
Alexey Rybalchenko
2017-05-19 09:41:45 +02:00
committed by Mohammad Al-Turany
parent 6b221d950c
commit 9288a2c3d5
6 changed files with 399 additions and 0 deletions

View File

@@ -6,6 +6,8 @@
* copied verbatim in the file "LICENSE" *
********************************************************************************/
#include "devices/TestPollIn.cxx"
#include "devices/TestPollOut.cxx"
#include "devices/TestPub.cxx"
#include "devices/TestPull.cxx"
#include "devices/TestPush.cxx"
@@ -22,6 +24,8 @@ namespace bpo = boost::program_options;
auto addCustomOptions(bpo::options_description& options) -> void
{
options.add_options()
("poll-type", bpo::value<int>()->default_value(0), "Poll type switch(0 - vector of (sub-)channels, 1 - vector of channel names)");
}
auto getDevice(const FairMQProgOptions& config) -> FairMQDevicePtr
@@ -58,6 +62,14 @@ auto getDevice(const FairMQProgOptions& config) -> FairMQDevicePtr
{
return new TransferTimeout;
}
else if (0 == id.find("pollout_"))
{
return new PollOut;
}
else if (0 == id.find("pollin_"))
{
return new PollIn;
}
else
{
cerr << "Don't know id '" << id << "'" << endl;