Changeset: 36618f6168bd for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/36618f6168bd
Modified Files:
        clients/mapilib/Tests/tlssecurity.py
        testing/Mtest.py.in
Branch: default
Log Message:

In test tlssecurity: temporarily enable mclient verbosity

Still debugging Windows slowness


diffs (56 lines):

diff --git a/clients/mapilib/Tests/tlssecurity.py 
b/clients/mapilib/Tests/tlssecurity.py
--- a/clients/mapilib/Tests/tlssecurity.py
+++ b/clients/mapilib/Tests/tlssecurity.py
@@ -24,7 +24,7 @@ if sys.platform == 'win32':
     log_level=logging.DEBUG
 if '-v' in sys.argv:
     log_level = logging.DEBUG
-#level = logging.DEBUG
+# log_level = logging.DEBUG
 
 logging.basicConfig(level=log_level,format=log_format)
 
@@ -34,13 +34,13 @@ assert os.path.isdir(tgtdir)
 scratchdir = os.path.join(tgtdir, "scratch")
 logging.debug(f"scratchdir={scratchdir}")
 
-tlstester = TLSTesterClient(scratchdir, host='127.0.0.1')
+tlstester = TLSTesterClient(scratchdir)
 
 
 def certpath(name):
     return tlstester.download(name)
 
-def attempt(experiment: str, portname: str, expected_error_regex: str, 
tls=True, host='127.0.0.1', **params):
+def attempt(experiment: str, portname: str, expected_error_regex: str, 
tls=True, host='localhost', **params):
     port = tlstester.get_port(portname)
     scheme = 'monetdbs' if tls else 'monetdb'
     url = f"{scheme}://{host}:{port}/demo"
@@ -49,10 +49,14 @@ def attempt(experiment: str, portname: s
         url += '?' + '&'.join(f"{k}={v}" for k, v in params.items())
     logging.debug(f"**** START TEST {experiment}")
     logging.debug(f"Connecting to {url}, 
expected_error={expected_error_regex}")
-    cmd = ['mclient', '-d', url]
+    test_log_file = os.path.join(scratchdir, portname + '.log')
+    cmd = ['mclient', '-d', url, '-L', test_log_file]
     logging.debug(f"cmd={cmd}")
     proc = subprocess.run(cmd, stderr=subprocess.PIPE, stdout=subprocess.PIPE)
     logging.debug(f"mclient exited with code {proc.returncode}, 
err={proc.stderr}")
+    with open(test_log_file, 'r') as f:
+        for line in f:
+            logging.debug(f'mclient log: {line.rstrip()}')
     if proc.returncode != 2:
         msg = str(proc.stderr, 'utf-8')
         print(f"mclient is supposed to exit with status 2, not 
{proc.returncode}.\n--- stderr ---\n{msg}\n---end stderr ---", file=sys.stderr)
diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -3299,7 +3299,7 @@ def StartTlsTester():
         # Start a dummy server that only returns errors.
         return DummyTlsTester()
     from MonetDBtesting import tlstester
-    hostnames = ['localhost', '127.0.0.1']  # make certificates also valid for 
127.0.0.1
+    hostnames = ['localhost']
     certs = tlstester.Certs(hostnames)
     server = tlstester.TLSTester(
         certs = certs,
_______________________________________________
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org

Reply via email to