curl操作加入超时限制
This commit is contained in:
5
cache/test/cache_evbase_test_threads.cpp
vendored
5
cache/test/cache_evbase_test_threads.cpp
vendored
@@ -193,7 +193,6 @@ void* thread_upload_download(void *arg)
|
||||
{
|
||||
sprintf(filename_out, "file_index_%d_%d.bin", thread_data->thread_id, i);
|
||||
pdata->future = future_create(get_future_success, get_future_failed, pdata);
|
||||
promise_set_ctx(future_to_promise(pdata->future), NULL, NULL);
|
||||
pdata->fp = fopen(filename_out, "w");
|
||||
|
||||
cache_evbase_fetch_object(instance_asyn, pdata->future, &getmeta);
|
||||
@@ -201,7 +200,6 @@ void* thread_upload_download(void *arg)
|
||||
else if(!strcasecmp(p, "DEL"))
|
||||
{
|
||||
pdata->future = future_create(del_future_success, del_future_failed, pdata);
|
||||
promise_set_ctx(future_to_promise(pdata->future), NULL, NULL);
|
||||
sprintf(pdata->filename, "%s", filename_in);
|
||||
cache_evbase_delete_object(instance_asyn, pdata->future, filename_in);
|
||||
}
|
||||
@@ -210,7 +208,6 @@ void* thread_upload_download(void *arg)
|
||||
size_t filelen;
|
||||
p = get_file_content(filename_in, &filelen);
|
||||
pdata->future = future_create(put_future_success, put_future_failed, pdata);
|
||||
promise_set_ctx(future_to_promise(pdata->future), NULL, NULL);
|
||||
|
||||
if(cache_evbase_upload_once_data(instance_asyn, pdata->future, PUT_MEM_FREE, p, filelen, &putmeta, pdata->filename, 256))
|
||||
{
|
||||
@@ -223,7 +220,6 @@ void* thread_upload_download(void *arg)
|
||||
{
|
||||
size_t readlen;
|
||||
pdata->future = future_create(put_future_success, put_future_failed, pdata);
|
||||
promise_set_ctx(future_to_promise(pdata->future), NULL, NULL);
|
||||
struct evbuffer *evbuf = evbuffer_new();
|
||||
char buffer[1024];
|
||||
|
||||
@@ -249,7 +245,6 @@ void* thread_upload_download(void *arg)
|
||||
else
|
||||
{
|
||||
pdata->future = future_create(put_future_success, put_future_failed, pdata);
|
||||
promise_set_ctx(future_to_promise(pdata->future), NULL, NULL);
|
||||
|
||||
ctx = cache_evbase_update_start(instance_asyn, pdata->future, &putmeta);
|
||||
if(ctx==NULL)
|
||||
|
||||
BIN
cache/test/lib/libhiredis.a
vendored
BIN
cache/test/lib/libhiredis.a
vendored
Binary file not shown.
2
cache/test/tango_cache_test.c
vendored
2
cache/test/tango_cache_test.c
vendored
@@ -312,7 +312,7 @@ static void dummy_accept_callback(evutil_socket_t fd, short events, void *arg)
|
||||
ctx = tango_cache_update_start(tango_instance, pdata->future, &putmeta);
|
||||
if(ctx==NULL)
|
||||
{
|
||||
put_future_failed(FUTURE_ERROR_CANCEL, "NULL", pdata);
|
||||
put_future_failed(FUTURE_ERROR_CANCEL, "tango_cache_update_start_NULL", pdata);
|
||||
continue;
|
||||
}
|
||||
tango_cache_get_object_path(ctx, pdata->filename, 256);
|
||||
|
||||
Reference in New Issue
Block a user