tarantool / tarantool-python

Python client library for Tarantool
https://www.tarantool.io
BSD 2-Clause "Simplified" License
101 stars 46 forks source link

All SQL-related tests fail when tarantool < 2.0.0 is used #194

Closed ylobankov closed 3 years ago

ylobankov commented 3 years ago

Tarantool version: 1.10.11.36.g3993bd37b-1

All SQL-related tests fail with the following error:

======================================================================
ERROR: test_dml_response (suites.test_execute.TestSuite_Execute)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/tarantool/tarantool/test/suites/test_execute.py", line 59, in test_dml_response
    response = self._create_table(table_name)
  File "/home/runner/work/tarantool/tarantool/test/suites/test_execute.py", line 55, in _create_table
    return self.con.execute(self.ddl % table_name)
  File "/home/runner/work/tarantool/tarantool/tarantool/connection.py", line 852, in execute
    response = self._send_request(request)
  File "/home/runner/work/tarantool/tarantool/tarantool/connection.py", line 381, in _send_request
    return self._send_request_wo_reconnect(request)
  File "/home/runner/work/tarantool/tarantool/tarantool/connection.py", line 296, in _send_request_wo_reconnect
    response = request.response_class(self, self._read_response())
  File "/home/runner/work/tarantool/tarantool/tarantool/response.py", line 124, in __init__
    raise DatabaseError(self._return_code, self._return_message)
tarantool.error.DatabaseError: (48, 'Unknown request type 11')

======================================================================
ERROR: test_dql_response (suites.test_execute.TestSuite_Execute)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/tarantool/tarantool/test/suites/test_execute.py", line 80, in test_dql_response
    self._create_table(table_name)
  File "/home/runner/work/tarantool/tarantool/test/suites/test_execute.py", line 55, in _create_table
    return self.con.execute(self.ddl % table_name)
  File "/home/runner/work/tarantool/tarantool/tarantool/connection.py", line 852, in execute
    response = self._send_request(request)
  File "/home/runner/work/tarantool/tarantool/tarantool/connection.py", line 381, in _send_request
    return self._send_request_wo_reconnect(request)
  File "/home/runner/work/tarantool/tarantool/tarantool/connection.py", line 296, in _send_request_wo_reconnect
    response = request.response_class(self, self._read_response())
  File "/home/runner/work/tarantool/tarantool/tarantool/response.py", line 124, in __init__
    raise DatabaseError(self._return_code, self._return_message)
tarantool.error.DatabaseError: (48, 'Unknown request type 11')

======================================================================
ERROR: test_None (suites.test_dbapi.TestSuite_DBAPI)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/dbapi20.py", line 784, in test_None
    self.executeDDL2(cur)
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/dbapi20.py", line 77, in executeDDL2
    cursor.execute(self.ddl2)
  File "/home/runner/work/tarantool/tarantool/tarantool/dbapi.py", line 64, in execute
    response = self._c.execute(query, params)
  File "/home/runner/work/tarantool/tarantool/tarantool/connection.py", line 852, in execute
    response = self._send_request(request)
  File "/home/runner/work/tarantool/tarantool/tarantool/connection.py", line 381, in _send_request
    return self._send_request_wo_reconnect(request)
  File "/home/runner/work/tarantool/tarantool/tarantool/connection.py", line 296, in _send_request_wo_reconnect
    response = request.response_class(self, self._read_response())
  File "/home/runner/work/tarantool/tarantool/tarantool/response.py", line 124, in __init__
    raise DatabaseError(self._return_code, self._return_message)
tarantool.error.DatabaseError: (48, 'Unknown request type 11')

======================================================================
ERROR: test_cursor_isolation (suites.test_dbapi.TestSuite_DBAPI)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/dbapi20.py", line 233, in test_cursor_isolation
    self.executeDDL1(cur1)
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/dbapi20.py", line 74, in executeDDL1
    cursor.execute(self.ddl1)
  File "/home/runner/work/tarantool/tarantool/tarantool/dbapi.py", line 64, in execute
    response = self._c.execute(query, params)
  File "/home/runner/work/tarantool/tarantool/tarantool/connection.py", line 852, in execute
    response = self._send_request(request)
  File "/home/runner/work/tarantool/tarantool/tarantool/connection.py", line 381, in _send_request
    return self._send_request_wo_reconnect(request)
  File "/home/runner/work/tarantool/tarantool/tarantool/connection.py", line 296, in _send_request_wo_reconnect
    response = request.response_class(self, self._read_response())
  File "/home/runner/work/tarantool/tarantool/tarantool/response.py", line 124, in __init__
    raise DatabaseError(self._return_code, self._return_message)
tarantool.error.DatabaseError: (48, 'Unknown request type 11')

======================================================================
ERROR: test_execute (suites.test_dbapi.TestSuite_DBAPI)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/dbapi20.py", line 353, in test_execute
    self._paraminsert(cur)
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/dbapi20.py", line 358, in _paraminsert
    self.executeDDL2(cur)
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/dbapi20.py", line 77, in executeDDL2
    cursor.execute(self.ddl2)
  File "/home/runner/work/tarantool/tarantool/tarantool/dbapi.py", line 64, in execute
    response = self._c.execute(query, params)
  File "/home/runner/work/tarantool/tarantool/tarantool/connection.py", line 852, in execute
    response = self._send_request(request)
  File "/home/runner/work/tarantool/tarantool/tarantool/connection.py", line 381, in _send_request
    return self._send_request_wo_reconnect(request)
  File "/home/runner/work/tarantool/tarantool/tarantool/connection.py", line 296, in _send_request_wo_reconnect
    response = request.response_class(self, self._read_response())
  File "/home/runner/work/tarantool/tarantool/tarantool/response.py", line 124, in __init__
    raise DatabaseError(self._return_code, self._return_message)
tarantool.error.DatabaseError: (48, 'Unknown request type 11')

======================================================================
ERROR: test_executemany (suites.test_dbapi.TestSuite_DBAPI)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/dbapi20.py", line 419, in test_executemany
    self.executeDDL1(cur)
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/dbapi20.py", line 74, in executeDDL1
    cursor.execute(self.ddl1)
  File "/home/runner/work/tarantool/tarantool/tarantool/dbapi.py", line 64, in execute
    response = self._c.execute(query, params)
  File "/home/runner/work/tarantool/tarantool/tarantool/connection.py", line 852, in execute
    response = self._send_request(request)
  File "/home/runner/work/tarantool/tarantool/tarantool/connection.py", line 381, in _send_request
    return self._send_request_wo_reconnect(request)
  File "/home/runner/work/tarantool/tarantool/tarantool/connection.py", line 296, in _send_request_wo_reconnect
    response = request.response_class(self, self._read_response())
  File "/home/runner/work/tarantool/tarantool/tarantool/response.py", line 124, in __init__
    raise DatabaseError(self._return_code, self._return_message)
tarantool.error.DatabaseError: (48, 'Unknown request type 11')

======================================================================
ERROR: test_fetchall (suites.test_dbapi.TestSuite_DBAPI)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/dbapi20.py", line 620, in test_fetchall
    self.executeDDL1(cur)
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/dbapi20.py", line 74, in executeDDL1
    cursor.execute(self.ddl1)
  File "/home/runner/work/tarantool/tarantool/tarantool/dbapi.py", line 64, in execute
    response = self._c.execute(query, params)
  File "/home/runner/work/tarantool/tarantool/tarantool/connection.py", line 852, in execute
    response = self._send_request(request)
  File "/home/runner/work/tarantool/tarantool/tarantool/connection.py", line 381, in _send_request
    return self._send_request_wo_reconnect(request)
  File "/home/runner/work/tarantool/tarantool/tarantool/connection.py", line 296, in _send_request_wo_reconnect
    response = request.response_class(self, self._read_response())
  File "/home/runner/work/tarantool/tarantool/tarantool/response.py", line 124, in __init__
    raise DatabaseError(self._return_code, self._return_message)
tarantool.error.DatabaseError: (48, 'Unknown request type 11')

======================================================================
ERROR: test_fetchmany (suites.test_dbapi.TestSuite_DBAPI)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/dbapi20.py", line 538, in test_fetchmany
    self.executeDDL1(cur)
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/dbapi20.py", line 74, in executeDDL1
    cursor.execute(self.ddl1)
  File "/home/runner/work/tarantool/tarantool/tarantool/dbapi.py", line 64, in execute
    response = self._c.execute(query, params)
  File "/home/runner/work/tarantool/tarantool/tarantool/connection.py", line 852, in execute
    response = self._send_request(request)
  File "/home/runner/work/tarantool/tarantool/tarantool/connection.py", line 381, in _send_request
    return self._send_request_wo_reconnect(request)
  File "/home/runner/work/tarantool/tarantool/tarantool/connection.py", line 296, in _send_request_wo_reconnect
    response = request.response_class(self, self._read_response())
  File "/home/runner/work/tarantool/tarantool/tarantool/response.py", line 124, in __init__
    raise DatabaseError(self._return_code, self._return_message)
tarantool.error.DatabaseError: (48, 'Unknown request type 11')

======================================================================
ERROR: test_fetchone (suites.test_dbapi.TestSuite_DBAPI)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/dbapi20.py", line 478, in test_fetchone
    self.executeDDL1(cur)
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/dbapi20.py", line 74, in executeDDL1
    cursor.execute(self.ddl1)
  File "/home/runner/work/tarantool/tarantool/tarantool/dbapi.py", line 64, in execute
    response = self._c.execute(query, params)
  File "/home/runner/work/tarantool/tarantool/tarantool/connection.py", line 852, in execute
    response = self._send_request(request)
  File "/home/runner/work/tarantool/tarantool/tarantool/connection.py", line 381, in _send_request
    return self._send_request_wo_reconnect(request)
  File "/home/runner/work/tarantool/tarantool/tarantool/connection.py", line 296, in _send_request_wo_reconnect
    response = request.response_class(self, self._read_response())
  File "/home/runner/work/tarantool/tarantool/tarantool/response.py", line 124, in __init__
    raise DatabaseError(self._return_code, self._return_message)
tarantool.error.DatabaseError: (48, 'Unknown request type 11')

======================================================================
ERROR: test_mixedfetch (suites.test_dbapi.TestSuite_DBAPI)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/dbapi20.py", line 664, in test_mixedfetch
    self.executeDDL1(cur)
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/dbapi20.py", line 74, in executeDDL1
    cursor.execute(self.ddl1)
  File "/home/runner/work/tarantool/tarantool/tarantool/dbapi.py", line 64, in execute
    response = self._c.execute(query, params)
  File "/home/runner/work/tarantool/tarantool/tarantool/connection.py", line 852, in execute
    response = self._send_request(request)
  File "/home/runner/work/tarantool/tarantool/tarantool/connection.py", line 381, in _send_request
    return self._send_request_wo_reconnect(request)
  File "/home/runner/work/tarantool/tarantool/tarantool/connection.py", line 296, in _send_request_wo_reconnect
    response = request.response_class(self, self._read_response())
  File "/home/runner/work/tarantool/tarantool/tarantool/response.py", line 124, in __init__
    raise DatabaseError(self._return_code, self._return_message)
tarantool.error.DatabaseError: (48, 'Unknown request type 11')

======================================================================
ERROR: test_rowcount (suites.test_dbapi.TestSuite_DBAPI)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/tarantool/tarantool/test/suites/test_dbapi.py", line 57, in test_rowcount
    self.executeDDL1(cur)
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/dbapi20.py", line 74, in executeDDL1
    cursor.execute(self.ddl1)
  File "/home/runner/work/tarantool/tarantool/tarantool/dbapi.py", line 64, in execute
    response = self._c.execute(query, params)
  File "/home/runner/work/tarantool/tarantool/tarantool/connection.py", line 852, in execute
    response = self._send_request(request)
  File "/home/runner/work/tarantool/tarantool/tarantool/connection.py", line 381, in _send_request
    return self._send_request_wo_reconnect(request)
  File "/home/runner/work/tarantool/tarantool/tarantool/connection.py", line 296, in _send_request_wo_reconnect
    response = request.response_class(self, self._read_response())
  File "/home/runner/work/tarantool/tarantool/tarantool/response.py", line 124, in __init__
    raise DatabaseError(self._return_code, self._return_message)
tarantool.error.DatabaseError: (48, 'Unknown request type 11')

======================================================================
ERROR: test_setinputsizes (suites.test_dbapi.TestSuite_DBAPI)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/dbapi20.py", line 761, in test_setinputsizes
    self._paraminsert(cur) # Make sure cursor still works
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/dbapi20.py", line 358, in _paraminsert
    self.executeDDL2(cur)
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/dbapi20.py", line 77, in executeDDL2
    cursor.execute(self.ddl2)
  File "/home/runner/work/tarantool/tarantool/tarantool/dbapi.py", line 64, in execute
    response = self._c.execute(query, params)
  File "/home/runner/work/tarantool/tarantool/tarantool/connection.py", line 852, in execute
    response = self._send_request(request)
  File "/home/runner/work/tarantool/tarantool/tarantool/connection.py", line 381, in _send_request
    return self._send_request_wo_reconnect(request)
  File "/home/runner/work/tarantool/tarantool/tarantool/connection.py", line 296, in _send_request_wo_reconnect
    response = request.response_class(self, self._read_response())
  File "/home/runner/work/tarantool/tarantool/tarantool/response.py", line 124, in __init__
    raise DatabaseError(self._return_code, self._return_message)
tarantool.error.DatabaseError: (48, 'Unknown request type 11')

======================================================================
ERROR: test_setoutputsize_basic (suites.test_dbapi.TestSuite_DBAPI)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/dbapi20.py", line 772, in test_setoutputsize_basic
    self._paraminsert(cur) # Make sure the cursor still works
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/dbapi20.py", line 358, in _paraminsert
    self.executeDDL2(cur)
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/dbapi20.py", line 77, in executeDDL2
    cursor.execute(self.ddl2)
  File "/home/runner/work/tarantool/tarantool/tarantool/dbapi.py", line 64, in execute
    response = self._c.execute(query, params)
  File "/home/runner/work/tarantool/tarantool/tarantool/connection.py", line 852, in execute
    response = self._send_request(request)
  File "/home/runner/work/tarantool/tarantool/tarantool/connection.py", line 381, in _send_request
    return self._send_request_wo_reconnect(request)
  File "/home/runner/work/tarantool/tarantool/tarantool/connection.py", line 296, in _send_request_wo_reconnect
    response = request.response_class(self, self._read_response())
  File "/home/runner/work/tarantool/tarantool/tarantool/response.py", line 124, in __init__
    raise DatabaseError(self._return_code, self._return_message)
tarantool.error.DatabaseError: (48, 'Unknown request type 11')

----------------------------------------------------------------------
Ran 93 tests in 10.555s

FAILED (errors=13, skipped=12)

Tarantool supports SQL only since the 2.0.0 version. So we need to skip SQL-related tests when tarantool < 2.0.0 is used.