Skip to content

Test failures with mysql and mariadb #597

@alanking

Description

@alanking

When running tests against the tip of main on an iRODS 4.3.3-ish server I saw the following tests fail when using a mysql 8.4 or mariadb 11.4 server for hosting the iRODS catalog:

irods.test.genquery2_test.TestGenQuery2.test_select
irods.test.genquery2_test.TestGenQuery2.test_select_and
irods.test.genquery2_test.TestGenQuery2.test_select_or
irods.test.genquery2_test.TestGenQuery2.test_select_with_explicit_zone
irods.test.query_test.TestQuery.test_files_query_case_sensitive

Here are the details:

======================================================================     
FAIL [0.184s]: test_select (irods.test.genquery2_test.TestGenQuery2)     
----------------------------------------------------------------------     
Traceback (most recent call last):     
  File "/var/lib/irods/python-irodsclient/irods/test/genquery2_test.py", line 38, in test_select     
    self.assertEqual(query_sql, "select distinct t0.coll_name from R_COLL_MAIN t0 inner join R_OBJT_ACCESS pcoa on t0.coll_id = pcoa.object_id inner join R_TOKN_MAIN pct on pcoa.access_type_id = pct.token_id inner join R_USER_MAIN pcu on pcoa.user_id = pcu.user_id where t
0.coll_name = ? and pcoa.access_type_id >= 1000 fetch first 256 rows only")
AssertionError: 'sele[246 chars] = ? and pcoa.access_type_id >= 1000 limit 256' != 'sele[246 chars] = ? and pcoa.access_type_id >= 1000 fetch first 256 rows only'
Diff is 1225 characters long. Set self.maxDiff to None to see it.                                                                       
     
======================================================================
FAIL [0.176s]: test_select_and (irods.test.genquery2_test.TestGenQuery2)
----------------------------------------------------------------------     
Traceback (most recent call last):                                           
  File "/var/lib/irods/python-irodsclient/irods/test/genquery2_test.py", line 86, in test_select_and     
    self.assertEqual(query_sql, "select distinct t0.coll_name from R_COLL_MAIN t0 inner join R_OBJT_ACCESS pcoa on t0.coll_id = pcoa.object_id inner join R_TOKN_MAIN pct on pcoa.access_type_id = pct.token_id inner join R_USER_MAIN pcu on pcoa.user_id = pcu.user_id where t
0.coll_name like ? and t0.coll_name like ? and pcoa.access_type_id >= 1000 fetch first 256 rows only")                                       
AssertionError: 'sele[273 chars]ke ? and pcoa.access_type_id >= 1000 limit 256' != 'sele[273 chars]ke ? and pcoa.access_type_id >= 1000 fetch first 256 rows only'                                                                                                              Diff is 1333 characters long. Set self.maxDiff to None to see it.

======================================================================
FAIL [0.270s]: test_select_or (irods.test.genquery2_test.TestGenQuery2)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/lib/irods/python-irodsclient/irods/test/genquery2_test.py", line 75, in test_select_or
    self.assertEqual(query_sql, "select distinct t0.coll_name from R_COLL_MAIN t0 inner join R_OBJT_ACCESS pcoa on t0.coll_id = pcoa.object_id inner join R_TOKN_MAIN pct on pcoa.access_type_id = pct.token_id inner join R_USER_MAIN pcu on pcoa.user_id = pcu.user_id where t
0.coll_name = ? or t0.coll_name = ? and pcoa.access_type_id >= 1000 fetch first 256 rows only")
AssertionError: 'sele[266 chars] = ? and pcoa.access_type_id >= 1000 limit 256' != 'sele[266 chars] = ? and pcoa.access_type_id >= 1000 fetch first 256 rows only'
Diff is 1305 characters long. Set self.maxDiff to None to see it.

======================================================================
FAIL [0.308s]: test_select_with_explicit_zone (irods.test.genquery2_test.TestGenQuery2)
----------------------------------------------------------------------
Traceback (most recent call last): 
  File "/var/lib/irods/python-irodsclient/irods/test/genquery2_test.py", line 49, in test_select_with_explicit_zone
    self.assertEqual(query_sql, "select distinct t0.coll_name from R_COLL_MAIN t0 inner join R_OBJT_ACCESS pcoa on t0.coll_id = pcoa.object_id inner join R_TOKN_MAIN pct on pcoa.access_type_id = pct.token_id inner join R_USER_MAIN pcu on pcoa.user_id = pcu.user_id where t
0.coll_name = ? and pcoa.access_type_id >= 1000 fetch first 256 rows only")
AssertionError: 'sele[246 chars] = ? and pcoa.access_type_id >= 1000 limit 256' != 'sele[246 chars] = ? and pcoa.access_type_id >= 1000 fetch first 256 rows only'
Diff is 1225 characters long. Set self.maxDiff to None to see it.

======================================================================
FAIL [0.770s]: test_files_query_case_sensitive (irods.test.query_test.TestQuery)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/lib/irods/python-irodsclient/irods/test/query_test.py", line 188, in test_files_query_case_sensitive
    self.assertEqual(len(result13), 1)
AssertionError: 2 != 1                                              

I think the first few are pretty obviously postgres-dependent, and were introduced here: #555

I'm not sure about that last one. Maybe it has to do with case sensitive / insensitive search and defaults, or something.

Anyway, we should investigate this.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions