trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject [trafficserver] branch master updated: Test: Fix timing issues with txn and double tests. Also tweak test_UDPNet to report errors better and use a less common port.
Date Thu, 28 Sep 2017 19:21:25 GMT
This is an automated email from the ASF dual-hosted git repository.

amc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new a8db2e7  Test: Fix timing issues with txn and double tests. Also tweak test_UDPNet
to report errors better and use a less common port.
a8db2e7 is described below

commit a8db2e7e5322d7118f21bb2a75afb4f561c02ee4
Author: Alan M. Carroll <amc@apache.org>
AuthorDate: Wed Sep 27 19:15:56 2017 -0500

    Test: Fix timing issues with txn and double tests.
    Also tweak test_UDPNet to report errors better and use a less common port.
---
 iocore/net/test_I_UDPNet.cc                   | 4 ++--
 tests/gold_tests/continuations/double.test.py | 5 +++--
 tests/gold_tests/transaction/txn.test.py      | 5 +++--
 3 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/iocore/net/test_I_UDPNet.cc b/iocore/net/test_I_UDPNet.cc
index b8358ee..fa73101 100644
--- a/iocore/net/test_I_UDPNet.cc
+++ b/iocore/net/test_I_UDPNet.cc
@@ -36,7 +36,7 @@
 
 #include "diags.i"
 
-static const int port       = 4443;
+static const int port       = 56912;
 static const char payload[] = "hello";
 
 /*This implements a standard Unix echo server: just send every udp packet you
@@ -98,7 +98,7 @@ EchoServer::handle_packet(int event, void *data)
   }
 
   default:
-    std::cout << "got unknown event" << std::endl;
+    std::cout << "got unknown event [" << event << "]" << std::endl;
     std::exit(EXIT_FAILURE);
   }
 
diff --git a/tests/gold_tests/continuations/double.test.py b/tests/gold_tests/continuations/double.test.py
index 67de7ca..15b845d 100644
--- a/tests/gold_tests/continuations/double.test.py
+++ b/tests/gold_tests/continuations/double.test.py
@@ -42,7 +42,8 @@ server.addResponse("sessionfile.log", request_header, response_header)
 ts.Disk.records_config.update({
     'proxy.config.diags.debug.enabled': 1,
     'proxy.config.diags.debug.tags': 'continuations_verify.*',
-
+    'proxy.config.http.cache.http' : 0, #disable cache to simply the test.
+    'proxy.config.cache.enable_read_while_writer' : 0
 })
 ts.Disk.remap_config.AddLine(
     'map http://127.0.0.1:{0} http://127.0.0.1:{1}'.format(ts.Variables.port, server.Variables.Port)
@@ -52,7 +53,7 @@ numberOfRequests = randint(1000, 1500)
 
 # Make a *ton* of calls to the proxy!
 tr = Test.AddTestRun()
-tr.Processes.Default.Command = 'ab -n {0} -c 10 http://127.0.0.1:{1}/'.format(numberOfRequests,
ts.Variables.port)
+tr.Processes.Default.Command = 'ab -n {0} -c 10 http://127.0.0.1:{1}/;sleep 5'.format(numberOfRequests,
ts.Variables.port)
 tr.Processes.Default.ReturnCode = 0
 # time delay as proxy.config.http.wait_for_cache could be broken
 tr.Processes.Default.StartBefore(server, ready=When.PortOpen(server.Variables.Port))
diff --git a/tests/gold_tests/transaction/txn.test.py b/tests/gold_tests/transaction/txn.test.py
index df8c2ae..f2d1d7b 100644
--- a/tests/gold_tests/transaction/txn.test.py
+++ b/tests/gold_tests/transaction/txn.test.py
@@ -42,7 +42,8 @@ server.addResponse("sessionfile.log", request_header, response_header)
 ts.Disk.records_config.update({
     'proxy.config.diags.debug.enabled': 1,
     'proxy.config.diags.debug.tags': 'ssntxnorder_verify.*',
-
+    'proxy.config.http.cache.http' : 0, #disable cache to simply the test.
+    'proxy.config.cache.enable_read_while_writer' : 0
 })
 
 ts.Disk.remap_config.AddLine(
@@ -53,7 +54,7 @@ numberOfRequests = randint(1000, 1500)
 
 # Make a *ton* of calls to the proxy!
 tr = Test.AddTestRun()
-tr.Processes.Default.Command = 'ab -n {0} -c 10 http://127.0.0.1:{1}/'.format(numberOfRequests,
ts.Variables.port)
+tr.Processes.Default.Command = 'ab -n {0} -c 10 http://127.0.0.1:{1}/;sleep 5'.format(numberOfRequests,
ts.Variables.port)
 tr.Processes.Default.ReturnCode = 0
 # time delay as proxy.config.http.wait_for_cache could be broken
 tr.Processes.Default.StartBefore(server, ready=When.PortOpen(server.Variables.Port))

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <commits@trafficserver.apache.org>'].

Mime
View raw message