Page MenuHomeSoftware Heritage

Jenkins > .tox.py3.lib.python3.7.site-packages.swh.storage.tests.test_cassandra.TestCassandraStorage::test_extid_version_behavior
Failed

TEST RESULT

Run At
Sep 15 2021, 11:56 AM
Details
self = <swh.storage.tests.test_cassandra.TestCassandraStorage object at 0x7fa13c466550> swh_storage = <swh.storage.cassandra.storage.CassandraStorage object at 0x7fa13c311c88> sample_data = <swh.storage.tests.storage_data.StorageData object at 0x7fa13c2005f8> def test_extid_version_behavior(self, swh_storage, sample_data): ids = [ revision.id for revision in sample_data.revisions if revision.type.value == "git" ] # Insert extids with several different versions extids = [ ExtID( extid=extid, extid_type="git", extid_version=0, target=CoreSWHID(object_id=extid, object_type=ObjectType.REVISION,), ) for extid in ids ] + [ ExtID( extid=extid, extid_type="git", extid_version=1, target=CoreSWHID(object_id=extid, object_type=ObjectType.REVISION,), ) for extid in ids ] swh_storage.extid_add(extids) # Check that both versions get returned for git_id in ids: objs = swh_storage.extid_get_from_extid("git", [git_id]) assert len(objs) == 2 assert set(obj.extid_version for obj in objs) == {0, 1} for swhid in ids: objs = swh_storage.extid_get_from_target(ObjectType.REVISION, [swhid]) assert len(objs) == 2 assert set(obj.extid_version for obj in objs) == {0, 1} for version in [0, 1]: for git_id in ids: objs = swh_storage.extid_get_from_extid( "git", [git_id], version=version ) assert len(objs) == 1 assert objs[0].extid_version == version for swhid in ids: objs = swh_storage.extid_get_from_target( ObjectType.REVISION, [swhid], extid_version=version, > extid_type="git", ) .tox/py3/lib/python3.7/site-packages/swh/storage/tests/storage_tests.py:1390: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .tox/py3/lib/python3.7/site-packages/swh/storage/metrics.py:24: in d return f(*a, **kw) .tox/py3/lib/python3.7/site-packages/swh/storage/cassandra/storage.py:1695: in extid_get_from_target for extidrow in extidrows .tox/py3/lib/python3.7/site-packages/swh/storage/cassandra/storage.py:1686: in <genexpr> ExtID( .tox/py3/lib/python3.7/site-packages/swh/storage/cassandra/cql.py:1394: in extid_get_from_target token, extid_version .tox/py3/lib/python3.7/site-packages/swh/storage/cassandra/cql.py:159: in newf statement: PreparedStatement = self._session.prepare(query) cassandra/cluster.py:3072: in cassandra.cluster.Session.prepare ??? cassandra/cluster.py:3069: in cassandra.cluster.Session.prepare ??? _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > ??? E cassandra.InvalidRequest: Error from server: code=2200 [Invalid query] message="Cannot execute this query as it might involve data filtering and thus may have unpredictable performance. If you want to execute this query despite the performance unpredictability, use ALLOW FILTERING" cassandra/cluster.py:4894: InvalidRequest