Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.

Commit 53a14fc

Browse files
committed
shorten sleep time to avoid ut failures in fast network environment
1 parent 0e23ebd commit 53a14fc

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

Microsoft.WindowsAzure.Storage/tests/cloud_append_blob_test.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ SUITE(Blob)
626626
try
627627
{
628628
auto task_result = m_blob.create_or_replace_async(azure::storage::access_condition(), azure::storage::blob_request_options(), m_context, cancel_token_src.get_token());
629-
std::this_thread::sleep_for(std::chrono::milliseconds(10)); //sleep for sometime before canceling the request and see result.
629+
std::this_thread::sleep_for(std::chrono::milliseconds(3)); //sleep for sometime before canceling the request and see result.
630630
cancel_token_src.cancel();
631631
task_result.get();
632632
}
@@ -687,7 +687,7 @@ SUITE(Blob)
687687
try
688688
{
689689
auto task_result = m_blob.delete_blob_if_exists_async(azure::storage::delete_snapshots_option::include_snapshots, azure::storage::access_condition(), azure::storage::blob_request_options(), m_context, cancel_token_src.get_token());
690-
std::this_thread::sleep_for(std::chrono::milliseconds(10)); //sleep for sometime before canceling the request and see result.
690+
std::this_thread::sleep_for(std::chrono::milliseconds(3)); //sleep for sometime before canceling the request and see result.
691691
cancel_token_src.cancel();
692692
task_result.get();
693693
}
@@ -745,7 +745,7 @@ SUITE(Blob)
745745

746746
{
747747
auto options = azure::storage::blob_request_options();
748-
options.set_maximum_execution_time(std::chrono::milliseconds(20));
748+
options.set_maximum_execution_time(std::chrono::milliseconds(3));
749749

750750
std::string ex_msg;
751751

@@ -802,7 +802,7 @@ SUITE(Blob)
802802

803803
{
804804
auto options = azure::storage::blob_request_options();
805-
options.set_maximum_execution_time(std::chrono::milliseconds(20));
805+
options.set_maximum_execution_time(std::chrono::milliseconds(3));
806806

807807
std::string ex_msg;
808808

Microsoft.WindowsAzure.Storage/tests/cloud_block_blob_test.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1134,7 +1134,7 @@ SUITE(Blob)
11341134
try
11351135
{
11361136
auto task_result = m_blob.upload_text_async(_XPLATSTR("test"), azure::storage::access_condition(), azure::storage::blob_request_options(), m_context, cancel_token_src.get_token());
1137-
std::this_thread::sleep_for(std::chrono::milliseconds(10)); //sleep for sometime before canceling the request and see result.
1137+
std::this_thread::sleep_for(std::chrono::milliseconds(3)); //sleep for sometime before canceling the request and see result.
11381138
cancel_token_src.cancel();
11391139
task_result.get();
11401140
}
@@ -1195,7 +1195,7 @@ SUITE(Blob)
11951195
try
11961196
{
11971197
auto task_result = m_blob.delete_blob_if_exists_async(azure::storage::delete_snapshots_option::include_snapshots, azure::storage::access_condition(), azure::storage::blob_request_options(), m_context, cancel_token_src.get_token());
1198-
std::this_thread::sleep_for(std::chrono::milliseconds(10)); //sleep for sometime before canceling the request and see result.
1198+
std::this_thread::sleep_for(std::chrono::milliseconds(3)); //sleep for sometime before canceling the request and see result.
11991199
cancel_token_src.cancel();
12001200
task_result.get();
12011201
}
@@ -1252,7 +1252,7 @@ SUITE(Blob)
12521252

12531253
{
12541254
auto options = azure::storage::blob_request_options();
1255-
options.set_maximum_execution_time(std::chrono::milliseconds(20));
1255+
options.set_maximum_execution_time(std::chrono::milliseconds(3));
12561256

12571257
std::string ex_msg;
12581258

@@ -1309,7 +1309,7 @@ SUITE(Blob)
13091309

13101310
{
13111311
auto options = azure::storage::blob_request_options();
1312-
options.set_maximum_execution_time(std::chrono::milliseconds(20));
1312+
options.set_maximum_execution_time(std::chrono::milliseconds(3));
13131313

13141314
std::string ex_msg;
13151315

@@ -1373,7 +1373,7 @@ SUITE(Blob)
13731373
{
13741374
//when timeout first
13751375
auto options = azure::storage::blob_request_options();
1376-
options.set_maximum_execution_time(std::chrono::milliseconds(10));
1376+
options.set_maximum_execution_time(std::chrono::milliseconds(3));
13771377
auto cancel_token_src = pplx::cancellation_token_source();
13781378

13791379
std::string ex_msg;

Microsoft.WindowsAzure.Storage/tests/cloud_page_blob_test.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,7 @@ SUITE(Blob)
923923
try
924924
{
925925
auto task_result = m_blob.create_async(1024, azure::storage::premium_blob_tier::unknown, 0, azure::storage::access_condition(), azure::storage::blob_request_options(), m_context, cancel_token_src.get_token());
926-
std::this_thread::sleep_for(std::chrono::milliseconds(10)); //sleep for sometime before canceling the request and see result.
926+
std::this_thread::sleep_for(std::chrono::milliseconds(3)); //sleep for sometime before canceling the request and see result.
927927
cancel_token_src.cancel();
928928
task_result.get();
929929
}
@@ -985,7 +985,7 @@ SUITE(Blob)
985985
try
986986
{
987987
auto task_result = m_blob.delete_blob_if_exists_async(azure::storage::delete_snapshots_option::include_snapshots, azure::storage::access_condition(), azure::storage::blob_request_options(), m_context, cancel_token_src.get_token());
988-
std::this_thread::sleep_for(std::chrono::milliseconds(10)); //sleep for sometime before canceling the request and see result.
988+
std::this_thread::sleep_for(std::chrono::milliseconds(3)); //sleep for sometime before canceling the request and see result.
989989
cancel_token_src.cancel();
990990
task_result.get();
991991
}
@@ -1043,7 +1043,7 @@ SUITE(Blob)
10431043

10441044
{
10451045
auto options = azure::storage::blob_request_options();
1046-
options.set_maximum_execution_time(std::chrono::milliseconds(20));
1046+
options.set_maximum_execution_time(std::chrono::milliseconds(3));
10471047

10481048
std::string ex_msg;
10491049

@@ -1100,7 +1100,7 @@ SUITE(Blob)
11001100

11011101
{
11021102
auto options = azure::storage::blob_request_options();
1103-
options.set_maximum_execution_time(std::chrono::milliseconds(20));
1103+
options.set_maximum_execution_time(std::chrono::milliseconds(3));
11041104

11051105
std::string ex_msg;
11061106

0 commit comments

Comments
 (0)