mirror of
https://github.com/Icinga/icinga2.git
synced 2026-06-11 01:30:22 -04:00
WIP
This commit is contained in:
parent
f50f6ec88f
commit
ef4b06e04d
2 changed files with 12 additions and 4 deletions
5
.github/workflows/linux.yml
vendored
5
.github/workflows/linux.yml
vendored
|
|
@ -1,10 +1,7 @@
|
|||
name: Linux
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- 'support/*'
|
||||
push: {}
|
||||
pull_request: {}
|
||||
|
||||
concurrency:
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
#include "base/generator.hpp"
|
||||
#include "base/objectlock.hpp"
|
||||
#include "base/json.hpp"
|
||||
#include "base/workqueue.hpp"
|
||||
#include <boost/algorithm/string/replace.hpp>
|
||||
#include <BoostTestTargetConfig.h>
|
||||
#include <limits>
|
||||
|
|
@ -151,4 +152,14 @@ BOOST_AUTO_TEST_CASE(invalid1)
|
|||
BOOST_CHECK_THROW(JsonDecode("{\"test\": \"test\""), std::exception);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(fail_in_workqueue)
|
||||
{
|
||||
WorkQueue q;
|
||||
//q.Enqueue([](){ JsonDecode(":)"); });
|
||||
q.Enqueue([](){ throw std::invalid_argument("wtf"); });
|
||||
q.Join();
|
||||
BOOST_CHECK(q.HasExceptions());
|
||||
BOOST_CHECK_EQUAL(q.GetExceptions().size(), 1);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
|
|
|||
Loading…
Reference in a new issue