summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2012-03-23 18:21:30 +0100
committerYorhel <git@yorhel.nl>2012-03-23 18:21:30 +0100
commit813f402fc174ff220a617c7cfa07e65b73668f71 (patch)
treec326f55e34d15ebe91b52faf142968a7e1c9883e
parent98d30aa1a67b3a31517f624cf68004903d0e2508 (diff)
test/pthread: Fixed wrong assertions about reply/alpha receive order
They happen simultaneusly, so their order not fixed.
-rw-r--r--test/pthread.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/pthread.c b/test/pthread.c
index 0c91c57..0e75dc3 100644
--- a/test/pthread.c
+++ b/test/pthread.c
@@ -49,7 +49,7 @@ static void recv_alpha(tn_session *s, tn_tuple *tup, tn_returnpath *p, void *d)
t_assert(tup && tup->n == 2);
t_assert(tup->e[0].type == TN_VT_STR && tup->e[0].v.s != NULL && strcmp(tup->e[0].v.s, "alpha") == 0);
t_assert(tup->e[1].type == TN_VT_INT && tup->e[1].v.i == r_alpha);
- t_assert(r_quit == 0);
+ t_assert(r_quit < 2);
tn_tuple_unref(tup);
if(++r_alpha >= 5) {
tn_session_unregister(s, reg_alpha);
@@ -92,7 +92,7 @@ static void recv_quit(tn_session *s, tn_tuple *tup, tn_returnpath *p, void *d) {
t_assert(sa == s);
t_assert(p == NULL);
t_assert(d == NULL);
- t_assert(r_alpha == 5);
+ t_assert(r_alpha >= 1);
t_assert(tup && tup->n == 1);
t_assert(tup->e[0].type == TN_VT_STR && tup->e[0].v.s != NULL && strcmp(tup->e[0].v.s, "quit") == 0);
tn_tuple_unref(tup);