Changeset: 320dc6253ffb for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=320dc6253ffb
Modified Files:
        
sql/test/BugTracker-2019/Tests/remote-table-non-existent-column.Bug-6750.py
Branch: Nov2019
Log Message:

Make that test at least can start up.


diffs (34 lines):

diff --git 
a/sql/test/BugTracker-2019/Tests/remote-table-non-existent-column.Bug-6750.py 
b/sql/test/BugTracker-2019/Tests/remote-table-non-existent-column.Bug-6750.py
--- 
a/sql/test/BugTracker-2019/Tests/remote-table-non-existent-column.Bug-6750.py
+++ 
b/sql/test/BugTracker-2019/Tests/remote-table-non-existent-column.Bug-6750.py
@@ -22,6 +22,7 @@ def freeport():
 farm_dir = tempfile.mkdtemp()
 
 prt1 = freeport()
+os.makedirs(os.path.join(farm_dir, 'node1'))
 prc1 = process.server(mapiport=prt1, dbname='node1', 
dbfarm=os.path.join(farm_dir, 'node1'), stdin=process.PIPE, 
stdout=process.PIPE, stderr=process.PIPE)
 conn1 = pymonetdb.connect(database='node1', port=prt1, autocommit=True)
 cur1 = conn1.cursor()
@@ -33,13 +34,20 @@ cur1.execute("insert into tab2 values (1
 cur1.execute("commit;")
 
 prt2 = freeport()
+os.makedirs(os.path.join(farm_dir, 'node2'))
 prc2 = process.server(mapiport=prt2, dbname='node2', 
dbfarm=os.path.join(farm_dir, 'node2'), stdin=process.PIPE, 
stdout=process.PIPE, stderr=process.PIPE)
 conn2 = pymonetdb.connect(database='node2', port=prt2, autocommit=True)
 cur2 = conn2.cursor()
 cur2.execute("create remote table tab1 (col1 clob, col2 int) on 
'mapi:monetdb://localhost:"+str(prt1)+"/node1';")
 cur2.execute("create remote table tab2 (col1 double) on 
'mapi:monetdb://localhost:"+str(prt1)+"/node1';")
-cur2.execute("select col2 from tab1;")  # col2 doesn't exist
-cur2.execute("select col1 from tab2;")  # col1 is not a floating point column
+try:
+    cur2.execute("select col2 from tab1;")  # col2 doesn't exist
+except pymonetdb.OperationalError as e:
+    print(e)
+try:
+    cur2.execute("select col1 from tab2;")  # col1 is not a floating point 
column
+except pymonetdb.OperationalError as e:
+    print(e)
 cur2.execute("drop table tab1;")
 cur2.execute("drop table tab2;")
 
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to