Merge remote-tracking branch 'public/bug6227' into maint-0.2.3

This commit is contained in:
Nick Mathewson 2012-06-26 11:03:56 -04:00
commit 6330d2d9e6
2 changed files with 5 additions and 2 deletions

3
changes/bug6227 Normal file
View File

@ -0,0 +1,3 @@
o Minor bugfixes (unit tests):
- Avoid a false positive in the util/threads unit test by increasing
the maximum timeout time. Fixes bug 6227; bugfix on 0.2.0.4-alpha.

View File

@ -1186,7 +1186,7 @@ test_util_threads(void)
#ifndef _WIN32 #ifndef _WIN32
struct timeval tv; struct timeval tv;
tv.tv_sec=0; tv.tv_sec=0;
tv.tv_usec=10; tv.tv_usec=100*1000;
#endif #endif
#ifndef TOR_IS_MULTITHREADED #ifndef TOR_IS_MULTITHREADED
/* Skip this test if we aren't threading. We should be threading most /* Skip this test if we aren't threading. We should be threading most
@ -1213,7 +1213,7 @@ test_util_threads(void)
if (strmap_get(_thread_test_strmap, "thread 1") && if (strmap_get(_thread_test_strmap, "thread 1") &&
strmap_get(_thread_test_strmap, "thread 2")) { strmap_get(_thread_test_strmap, "thread 2")) {
done = 1; done = 1;
} else if (time(NULL) > started + 25) { } else if (time(NULL) > started + 150) {
timedout = done = 1; timedout = done = 1;
} }
tor_mutex_release(_thread_test_mutex); tor_mutex_release(_thread_test_mutex);