summaryrefslogtreecommitdiff
path: root/test/basicserver/testbasicserver.cpp
diff options
context:
space:
mode:
authorChris Wilson <qris@users.noreply.github.com>2016-10-01 20:44:48 +0100
committerGitHub <noreply@github.com>2016-10-01 20:44:48 +0100
commit80adfe939a663af4e279652f5404429f5594826c (patch)
treef316cd8fe3b837531055f702e79f84b49d8dc654 /test/basicserver/testbasicserver.cpp
parent8718a10d3b457e80a922d0f2ee6b02e686fb452d (diff)
parent65a8cf6577d36ad419f7313800a6fbaf93aaa097 (diff)
Merge rewritten build system.
Add a new CMake build system, based on the one used to build for AppVeyor (Windows) and made to work with Linux and fully tested by Travis CI. Rewrite the old autoconf-based Makefile generator build system to solve performance and correctness problems caused by highly parallelised recursive Make, which was causing Travis builds to fail. Now uses a single monolithic generated Makefile instead of recursive Make. Should also be faster, both for initial builds (with parallelism) and for rebuilds. Remove the old outdated Visual Studio project files, since it should now be possible to generate these with CMake. Add a CMake project that builds Box Backup and its dependencies, particularly useful for getting started as a developer on Windows.
Diffstat (limited to 'test/basicserver/testbasicserver.cpp')
-rw-r--r--test/basicserver/testbasicserver.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/test/basicserver/testbasicserver.cpp b/test/basicserver/testbasicserver.cpp
index 6a1e15ad..6f2def54 100644
--- a/test/basicserver/testbasicserver.cpp
+++ b/test/basicserver/testbasicserver.cpp
@@ -35,7 +35,10 @@
// in ms
#define COMMS_READ_TIMEOUT 4
#define COMMS_SERVER_WAIT_BEFORE_REPLYING 40
-#define SHORT_TIMEOUT 5000
+// Use a longer timeout to give Srv2TestConversations time to write 20 MB to each of
+// three child processes before starting to read it back again, without the children
+// timing out and aborting.
+#define SHORT_TIMEOUT 30000
class basicdaemon : public Daemon
{
@@ -103,6 +106,12 @@ void testservers_connection(SocketStream &rStream)
}
if(line == "LARGEDATA")
{
+ // This part of the test is timing-sensitive, because we write
+ // 20 MB to the test and then have to wait while it reads 20 MB
+ // from the other two children before writing anything back to us.
+ // We could timeout waiting for it to talk to us again. So we
+ // increased the SHORT_TIMEOUT from 5 seconds to 30 to allow
+ // more time.
{
// Send lots of data
char data[LARGE_DATA_BLOCK_SIZE];
@@ -339,6 +348,11 @@ void Srv2TestConversations(const std::vector<IOStream *> &conns)
{
conns[c]->Write("LARGEDATA\n", 10, SHORT_TIMEOUT);
}
+ // This part of the test is timing-sensitive, because we read 20 MB from each of
+ // three daemon processes, then write 20 MB to each of them, then read back
+ // another 20 MB from each of them. Each child could timeout waiting for us to
+ // read from it, or write to it, while we're servicing another child. So we
+ // increased the SHORT_TIMEOUT from 5 seconds to 30 to allow enough time.
for(unsigned int c = 0; c < conns.size(); ++c)
{
// Receive lots of data