Browse Source

[master] suppress some failures in stats tests with Python 3.3

This is an ad-hoc workaround for the failures in stats tests. It's okayed to be
committed on jabber. Note that this workaround should be removed after a
fundamental fix for stats tests (#1668) is done. An investigation task for the
fix will be worked on #2689.  For the details of the failures, see #2666 and
http://git.bind10.isc.org/~tester/builder//BIND10-valgrind/20130212205704-CentOS5-x86_64-GCC/logs/unittests.out
Naoki Kambe 12 years ago
parent
commit
6409bf0fb2

+ 2 - 0
src/bin/stats/tests/b10-stats-httpd_test.py

@@ -34,6 +34,7 @@ import http.client
 import xml.etree.ElementTree
 import random
 import urllib.parse
+import sys
 # load this module for xml validation with xsd. For this test, an
 # installation of lxml is required in advance. See http://lxml.de/.
 try:
@@ -250,6 +251,7 @@ class TestHttpHandler(unittest.TestCase):
         # reset the signal handler
         self.sig_handler.reset()
 
+    @unittest.skipIf(sys.version_info >= (3, 3), "Unsupported in Python 3.3 or higher")
     @unittest.skipUnless(xml_parser, "skipping the test using XMLParser")
     def test_do_GET(self):
         self.assertTrue(type(self.stats_httpd.httpd) is list)

+ 4 - 0
src/bin/stats/tests/b10-stats_test.py

@@ -27,6 +27,7 @@ import threading
 import io
 import time
 import imp
+import sys
 
 import stats
 import isc.log
@@ -605,6 +606,7 @@ class TestStats(unittest.TestCase):
         self.assertEqual(self.stats.update_statistics_data(
                 'Foo', 'foo1', _test_exp6), ['unknown module name: Foo'])
 
+    @unittest.skipIf(sys.version_info >= (3, 3), "Unsupported in Python 3.3 or higher")
     def test_update_statistics_data_withmid(self):
         self.stats = stats.Stats()
         self.stats.do_polling()
@@ -736,6 +738,7 @@ class TestStats(unittest.TestCase):
                          isc.config.create_answer(0))
         self.assertFalse(self.stats.running)
 
+    @unittest.skipIf(sys.version_info >= (3, 3), "Unsupported in Python 3.3 or higher")
     def test_command_show(self):
         # two auth instances invoked
         list_auth = [ self.base.auth.server,
@@ -1143,6 +1146,7 @@ class TestStats(unittest.TestCase):
                          isc.config.create_answer(
                 1, "module name is not specified"))
 
+    @unittest.skipIf(sys.version_info >= (3, 3), "Unsupported in Python 3.3 or higher")
     def test_polling(self):
         stats_server = ThreadingServerManager(MyStats)
         stat = stats_server.server