Extend test to report answer.
authorBrian Aker <brian@tangent.org>
Tue, 5 Apr 2011 02:31:23 +0000 (19:31 -0700)
committerBrian Aker <brian@tangent.org>
Tue, 5 Apr 2011 02:31:23 +0000 (19:31 -0700)
tests/mem_functions.c

index 600ffb8ff26e4d25c8a6f5515fd37105c7a66a2c..9a5c053ded8f051c771b3a4c0f97afc7d9080290 100644 (file)
@@ -231,7 +231,12 @@ static memcached_return_t server_display_unsort_function(const memcached_st *ptr
   uint32_t x= *((uint32_t *)(context));
   (void)ptr;
 
-  assert(test_ports[x] == server->port);
+  if (! (test_ports[x] == server->port))
+  {
+    fprintf(stderr, "%lu -> %lu\n", (unsigned long)test_ports[x], (unsigned long)server->port);
+    return MEMCACHED_FAILURE;
+  }
+
   *((uint32_t *)(context))= ++x;
 
   return MEMCACHED_SUCCESS;