summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2012-05-20 08:17:42 +0200
committerMartin Sustrik <sustrik@250bpm.com>2012-05-21 12:17:59 +0200
commit338a8a0ee13388aceafa3d8b6d8add3b79e95986 (patch)
tree6bb8fb957c3247e43c536bdd678a61bf59a12a02 /tests
parentc4881d317e3ec5b02d1e354fb54a56dc0618b717 (diff)
Expired survey returns ETIMEDOUT instead of EAGAIN
Up to now, when survey in surveyor pattern expired, xs_recv() returned EAGAIN. That made it impossible to distinguish epired survey from expired receive timeout (XS_RCVTIMEO). This patch make errors different in both cases. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/survey.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/survey.cpp b/tests/survey.cpp
index f21b217..2179779 100644
--- a/tests/survey.cpp
+++ b/tests/survey.cpp
@@ -126,7 +126,7 @@ int XS_TEST_MAIN ()
assert (rc == 3);
void *watch = xs_stopwatch_start ();
rc = xs_recv (surveyor, buf, sizeof (buf), 0);
- assert (rc == - 1 && errno == EAGAIN);
+ assert (rc == - 1 && errno == ETIMEDOUT);
unsigned long elapsed = xs_stopwatch_stop (watch) / 1000;
time_assert (elapsed, (unsigned long) timeout);