projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
testing: pools + mac
[awesomized/libmemcached]
/
test
/
tests
/
memcached
/
regression
/
lp_000-962-815.cpp
diff --git
a/test/tests/memcached/regression/lp_000-962-815.cpp
b/test/tests/memcached/regression/lp_000-962-815.cpp
index 5c168a12985d0b8fe6e0415fb43734c7d5b18af6..bde4dfce9a5be736ba2fe62094c0fc9d4d5bda16 100644
(file)
--- a/
test/tests/memcached/regression/lp_000-962-815.cpp
+++ b/
test/tests/memcached/regression/lp_000-962-815.cpp
@@
-17,24
+17,14
@@
static inline bool is_running() {
struct worker_ctx {
memcached_pool_st *pool;
struct worker_ctx {
memcached_pool_st *pool;
- vector<stringstream> errors;
explicit worker_ctx(memcached_st *memc)
: pool{memcached_pool_create(memc, 5, 10)}
explicit worker_ctx(memcached_st *memc)
: pool{memcached_pool_create(memc, 5, 10)}
- , errors{}
{
}
~worker_ctx() {
memcached_pool_destroy(pool);
{
}
~worker_ctx() {
memcached_pool_destroy(pool);
- for (const auto &err : errors) {
- cerr << err.str() << endl;
- }
- }
-
- stringstream &err() {
- errors.resize(errors.size()+1);
- return errors[errors.size()-1];
}
};
}
};
@@
-53,7
+43,6
@@
static void *worker(void *arg) {
cerr << "failed to fetch connection from pool: "
<< memcached_strerror(nullptr, rc)
<< endl;
cerr << "failed to fetch connection from pool: "
<< memcached_strerror(nullptr, rc)
<< endl;
- this_thread::sleep_for(10ms);
continue;
}
continue;
}
@@
-89,7
+78,7
@@
TEST_CASE("memcached_regression_lp962815") {
REQUIRE(0 == pthread_create(&t, nullptr, worker, &ctx));
}
REQUIRE(0 == pthread_create(&t, nullptr, worker, &ctx));
}
- this_thread::sleep_for(
5
s);
+ this_thread::sleep_for(
1
s);
set_running(false);
for (auto t : tid) {
set_running(false);
for (auto t : tid) {