This is an automated email from the ASF dual-hosted git repository.

gmurthy pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git


The following commit(s) were added to refs/heads/main by this push:
     new 43db1cc  DISPATCH-2241: Commented out http2 large image upload test on 
certain Travis CI runs. This closes #1360
43db1cc is described below

commit 43db1ccf1f698696f708e6baf2ad4225846ca707
Author: Ganesh Murthy <[email protected]>
AuthorDate: Mon Aug 30 16:35:55 2021 -0400

    DISPATCH-2241: Commented out http2 large image upload test on certain 
Travis CI runs. This closes #1360
---
 .travis.yml                         |  2 ++
 tests/system_test.py                |  8 ++++++++
 tests/system_tests_fallback_dest.py | 40 ++++++++++++++-----------------------
 tests/system_tests_http2.py         |  5 ++++-
 4 files changed, 29 insertions(+), 26 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 7d750f3..e509e7b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -90,6 +90,7 @@ jobs:
     env:
     - QPID_SYSTEM_TEST_TIMEOUT=300
     - QPID_SYSTEM_TEST_SKIP_FALLBACK_SWITCHOVER_TEST=True
+    - QPID_SYSTEM_TEST_SKIP_HTTP2_LARGE_IMAGE_UPLOAD_TEST=True
     - CC=clang-12
     - CXX=clang++-12
     - PATH="/usr/bin:$PATH" PROTON_VERSION=main BUILD_TYPE=RelWithDebInfo
@@ -168,6 +169,7 @@ jobs:
     env:
     - QPID_SYSTEM_TEST_TIMEOUT=300
     - QPID_SYSTEM_TEST_SKIP_FALLBACK_SWITCHOVER_TEST=True
+    - QPID_SYSTEM_TEST_SKIP_HTTP2_LARGE_IMAGE_UPLOAD_TEST=True
     - PATH="/usr/bin:$PATH" PROTON_VERSION=0.35.0
     - DISPATCH_CMAKE_ARGS='-DRUNTIME_CHECK=tsan'
   - name: "qdrouterd:RelWithDebInfo+MemoryDebug (clang on macOS)"
diff --git a/tests/system_test.py b/tests/system_test.py
index 08c96ae..bb2406e 100755
--- a/tests/system_test.py
+++ b/tests/system_test.py
@@ -229,6 +229,14 @@ def message(**properties):
     return m
 
 
+def skip_test_in_ci(environment_var):
+    env_var = os.environ.get(environment_var)
+    if env_var is not None:
+        if env_var.lower() in ['true', '1', 't', 'y', 'yes']:
+            return True
+    return False
+
+
 class Process(subprocess.Popen):
     """
     Popen that can be torn down at the end of a TestCase and stores its output.
diff --git a/tests/system_tests_fallback_dest.py 
b/tests/system_tests_fallback_dest.py
index 3ed1085..1aa0ef3 100644
--- a/tests/system_tests_fallback_dest.py
+++ b/tests/system_tests_fallback_dest.py
@@ -17,11 +17,9 @@
 # under the License.
 #
 
-import os
-
 from proton import Message, symbol
 from system_test import TestCase, Qdrouterd, main_module, TIMEOUT, TestTimeout
-from system_test import unittest
+from system_test import unittest, skip_test_in_ci
 from system_test import Logger
 from proton.handlers import MessagingHandler
 from proton.reactor import Container
@@ -36,14 +34,6 @@ class AddrTimer(object):
         self.parent.check_address()
 
 
-def skip_switchover_tests():
-    skip_switchover_test = 
os.environ.get('QPID_SYSTEM_TEST_SKIP_FALLBACK_SWITCHOVER_TEST')
-    if skip_switchover_test is not None:
-        if skip_switchover_test.lower() in ['true', '1', 't', 'y', 'yes']:
-            return True
-    return False
-
-
 class RouterTest(TestCase):
 
     inter_router_port = None
@@ -271,7 +261,7 @@ class RouterTest(TestCase):
 
     skip_reason = 'Test skipped until switchover use case resolved'
 
-    @unittest.skipIf(skip_switchover_tests(), skip_reason)
+    
@unittest.skipIf(skip_test_in_ci('QPID_SYSTEM_TEST_SKIP_FALLBACK_SWITCHOVER_TEST'),
 skip_reason)
     def test_25_switchover_same_edge(self):
         test = SwitchoverTest([self.ROUTER_EA1, "EA1"],
                               [self.ROUTER_EA1, "EA1"],
@@ -280,7 +270,7 @@ class RouterTest(TestCase):
         test.run()
         self.assertIsNone(test.error)
 
-    @unittest.skipIf(skip_switchover_tests(), skip_reason)
+    
@unittest.skipIf(skip_test_in_ci('QPID_SYSTEM_TEST_SKIP_FALLBACK_SWITCHOVER_TEST'),
 skip_reason)
     def test_26_switchover_same_interior(self):
         test = SwitchoverTest([self.ROUTER_INTA, "INTA"],
                               [self.ROUTER_INTA, "INTA"],
@@ -289,7 +279,7 @@ class RouterTest(TestCase):
         test.run()
         self.assertIsNone(test.error)
 
-    @unittest.skipIf(skip_switchover_tests(), skip_reason)
+    
@unittest.skipIf(skip_test_in_ci('QPID_SYSTEM_TEST_SKIP_FALLBACK_SWITCHOVER_TEST'),
 skip_reason)
     def test_27_switchover_local_edge_alt_remote_interior(self):
         test = SwitchoverTest([self.ROUTER_EA1, "EA1"],
                               [self.ROUTER_INTA, "INTA"],
@@ -298,7 +288,7 @@ class RouterTest(TestCase):
         test.run()
         self.assertIsNone(test.error)
 
-    @unittest.skipIf(skip_switchover_tests(), skip_reason)
+    
@unittest.skipIf(skip_test_in_ci('QPID_SYSTEM_TEST_SKIP_FALLBACK_SWITCHOVER_TEST'),
 skip_reason)
     def test_28_switchover_local_edge_alt_remote_edge(self):
         test = SwitchoverTest([self.ROUTER_EA1, "EA1"],
                               [self.ROUTER_EB1, "EB1"],
@@ -307,7 +297,7 @@ class RouterTest(TestCase):
         test.run()
         self.assertIsNone(test.error)
 
-    @unittest.skipIf(skip_switchover_tests(), skip_reason)
+    
@unittest.skipIf(skip_test_in_ci('QPID_SYSTEM_TEST_SKIP_FALLBACK_SWITCHOVER_TEST'),
 skip_reason)
     def test_29_switchover_local_edge_pri_remote_interior(self):
         test = SwitchoverTest([self.ROUTER_EA1, "EA1"],
                               [self.ROUTER_EA1, "EA1"],
@@ -316,7 +306,7 @@ class RouterTest(TestCase):
         test.run()
         self.assertIsNone(test.error)
 
-    @unittest.skipIf(skip_switchover_tests(), skip_reason)
+    
@unittest.skipIf(skip_test_in_ci('QPID_SYSTEM_TEST_SKIP_FALLBACK_SWITCHOVER_TEST'),
 skip_reason)
     def test_30_switchover_local_interior_pri_remote_edge(self):
         test = SwitchoverTest([self.ROUTER_EA1, "EA1"],
                               [self.ROUTER_EA1, "EA1"],
@@ -325,7 +315,7 @@ class RouterTest(TestCase):
         test.run()
         self.assertIsNone(test.error)
 
-    @unittest.skipIf(skip_switchover_tests(), skip_reason)
+    
@unittest.skipIf(skip_test_in_ci('QPID_SYSTEM_TEST_SKIP_FALLBACK_SWITCHOVER_TEST'),
 skip_reason)
     def test_31_switchover_local_interior_alt_remote_interior(self):
         test = SwitchoverTest([self.ROUTER_INTB, "INTB"],
                               [self.ROUTER_INTA, "INTA"],
@@ -334,7 +324,7 @@ class RouterTest(TestCase):
         test.run()
         self.assertIsNone(test.error)
 
-    @unittest.skipIf(skip_switchover_tests(), skip_reason)
+    
@unittest.skipIf(skip_test_in_ci('QPID_SYSTEM_TEST_SKIP_FALLBACK_SWITCHOVER_TEST'),
 skip_reason)
     def test_32_switchover_local_interior_alt_remote_edge(self):
         test = SwitchoverTest([self.ROUTER_INTB, "INTB"],
                               [self.ROUTER_EA2, "EA2"],
@@ -343,7 +333,7 @@ class RouterTest(TestCase):
         test.run()
         self.assertIsNone(test.error)
 
-    @unittest.skipIf(skip_switchover_tests(), skip_reason)
+    
@unittest.skipIf(skip_test_in_ci('QPID_SYSTEM_TEST_SKIP_FALLBACK_SWITCHOVER_TEST'),
 skip_reason)
     def test_33_switchover_local_interior_pri_remote_interior(self):
         test = SwitchoverTest([self.ROUTER_INTB, "INTB"],
                               [self.ROUTER_INTB, "INTB"],
@@ -352,7 +342,7 @@ class RouterTest(TestCase):
         test.run()
         self.assertIsNone(test.error)
 
-    @unittest.skipIf(skip_switchover_tests(), skip_reason)
+    
@unittest.skipIf(skip_test_in_ci('QPID_SYSTEM_TEST_SKIP_FALLBACK_SWITCHOVER_TEST'),
 skip_reason)
     def test_34_switchover_local_interior_pri_remote_edge(self):
         test = SwitchoverTest([self.ROUTER_INTB, "INTB"],
                               [self.ROUTER_INTB, "INTB"],
@@ -361,7 +351,7 @@ class RouterTest(TestCase):
         test.run()
         self.assertIsNone(test.error)
 
-    @unittest.skipIf(skip_switchover_tests(), skip_reason)
+    
@unittest.skipIf(skip_test_in_ci('QPID_SYSTEM_TEST_SKIP_FALLBACK_SWITCHOVER_TEST'),
 skip_reason)
     def test_35_switchover_mix_1(self):
         test = SwitchoverTest([self.ROUTER_INTA, "INTA"],
                               [self.ROUTER_INTB, "INTB"],
@@ -370,7 +360,7 @@ class RouterTest(TestCase):
         test.run()
         self.assertIsNone(test.error)
 
-    @unittest.skipIf(skip_switchover_tests(), skip_reason)
+    
@unittest.skipIf(skip_test_in_ci('QPID_SYSTEM_TEST_SKIP_FALLBACK_SWITCHOVER_TEST'),
 skip_reason)
     def test_36_switchover_mix_2(self):
         test = SwitchoverTest([self.ROUTER_EA1, "EA1"],
                               [self.ROUTER_INTB, "INTB"],
@@ -379,7 +369,7 @@ class RouterTest(TestCase):
         test.run()
         self.assertIsNone(test.error)
 
-    @unittest.skipIf(skip_switchover_tests(), skip_reason)
+    
@unittest.skipIf(skip_test_in_ci('QPID_SYSTEM_TEST_SKIP_FALLBACK_SWITCHOVER_TEST'),
 skip_reason)
     def test_37_switchover_mix_3(self):
         test = SwitchoverTest([self.ROUTER_EA1, "EA1"],
                               [self.ROUTER_INTB, "INTB"],
@@ -388,7 +378,7 @@ class RouterTest(TestCase):
         test.run()
         self.assertIsNone(test.error)
 
-    @unittest.skipIf(skip_switchover_tests(), skip_reason)
+    
@unittest.skipIf(skip_test_in_ci('QPID_SYSTEM_TEST_SKIP_FALLBACK_SWITCHOVER_TEST'),
 skip_reason)
     def test_38_switchover_mix_4(self):
         test = SwitchoverTest([self.ROUTER_EA1, "EA1"],
                               [self.ROUTER_EA2, "EA2"],
diff --git a/tests/system_tests_http2.py b/tests/system_tests_http2.py
index 7d09f6f..a588fa4 100644
--- a/tests/system_tests_http2.py
+++ b/tests/system_tests_http2.py
@@ -24,7 +24,7 @@ import unittest
 from time import sleep
 import system_test
 from system_test import TestCase, Qdrouterd, QdManager, Process
-from system_test import curl_available, TIMEOUT
+from system_test import curl_available, TIMEOUT, skip_test_in_ci
 from subprocess import PIPE
 
 h2hyper_installed = True
@@ -154,7 +154,10 @@ class CommonHttp2Tests:
         out = self.run_curl(address, args=['-d', 'fname=John&lname=Doe', '-X', 
'POST'])
         self.assertIn('Success! Your first name is John, last name is Doe', 
out)
 
+    skip_reason = 'Test skipped on certain Travis environments'
+
     @unittest.skipIf(skip_test(), "Python 3.7 or greater, Quart 0.13.0 or 
greater and curl needed to run http2 tests")
+    
@unittest.skipIf(skip_test_in_ci('QPID_SYSTEM_TEST_SKIP_HTTP2_LARGE_IMAGE_UPLOAD_TEST'),
 skip_reason)
     def test_post_upload_large_image_jpg(self):
         # curl  -X POST -H "Content-Type: multipart/form-data"  -F 
"data=@/home/gmurthy/opensource/test.jpg"
         # http://127.0.0.1:9000/upload --http2-prior-knowledge

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to