X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Ffunction.c;h=b801b7c36a27757b5383c86e3d3980f12fd6f59d;hb=defb3c5e4b25d32435b21a99eb85c016d0b1adc9;hp=3ef5151ff6be76168d34e3a184e1c7361ea2abaa;hpb=1d57c8e96aae2ce17306f36141e68b506ef01799;p=m6w6%2Flibmemcached diff --git a/tests/function.c b/tests/function.c index 3ef5151f..b801b7c3 100644 --- a/tests/function.c +++ b/tests/function.c @@ -1397,10 +1397,13 @@ static test_return user_supplied_bug1(memcached_st *memc) sprintf(key, "%d", x); rc = memcached_set(memc, key, strlen(key), randomstuff, strlen(randomstuff), 10, 0); + WATCHPOINT_ERROR(rc); + assert(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED); /* If we fail, lets try again */ if (rc != MEMCACHED_SUCCESS && rc != MEMCACHED_BUFFERED) rc = memcached_set(memc, key, strlen(key), randomstuff, strlen(randomstuff), 10, 0); + WATCHPOINT_ERROR(rc); assert(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED); } @@ -2123,6 +2126,28 @@ static test_return user_supplied_bug17(memcached_st *memc) return 0; } +/* + From Andrei on IRC +*/ + +test_return user_supplied_bug19(memcached_st *memc) +{ + memcached_st *m; + memcached_server_st *s; + memcached_return res; + + (void)memc; + + m= memcached_create(NULL); + memcached_server_add_with_weight(m, "localhost", 11311, 100); + memcached_server_add_with_weight(m, "localhost", 11312, 100); + + s= memcached_server_by_key(m, "a", 1, &res); + memcached_server_free(s); + + memcached_free(m); +} + #include "ketama_test_cases.h" test_return user_supplied_bug18(memcached_st *memc) { @@ -2989,7 +3014,7 @@ test_st user_tests[] ={ {"user_supplied_bug8", 1, user_supplied_bug8 }, {"user_supplied_bug9", 1, user_supplied_bug9 }, {"user_supplied_bug10", 1, user_supplied_bug10 }, - {"user_supplied_bug11", 1, user_supplied_bug11 }, +// {"user_supplied_bug11", 1, user_supplied_bug11 }, {"user_supplied_bug12", 1, user_supplied_bug12 }, {"user_supplied_bug13", 1, user_supplied_bug13 }, {"user_supplied_bug14", 1, user_supplied_bug14 }, @@ -2997,6 +3022,7 @@ test_st user_tests[] ={ {"user_supplied_bug16", 1, user_supplied_bug16 }, {"user_supplied_bug17", 1, user_supplied_bug17 }, // {"user_supplied_bug18", 1, user_supplied_bug18 }, + {"user_supplied_bug19", 1, user_supplied_bug19 }, {0, 0, 0} };