Page MenuHomeSoftware Heritage

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

TEST RESULT

Run At
Jun 17 2020, 10:13 AM
Details
self = <swh.storage.tests.test_cassandra.TestCassandraStorage object at 0x7f36fc39f400> swh_storage = <swh.storage.validate.ValidatingProxyStorage object at 0x7f36dc4df128> def test_origin_visit_get_random_nothing_found(self, swh_storage): swh_storage.origin_add(data.origins) visit_type = "hg" # Add some visits outside of the random generation selection so nothing # will be found by the random selection visits = self._generate_random_visits(nb_visits=3, start=13, end=24) for origin in data.origins: origin_url = origin["url"] for date_visit in visits: visit = swh_storage.origin_visit_add( [ OriginVisit( origin=origin_url, date=date_visit, type=visit_type, status="ongoing", snapshot=None, ) ] )[0] swh_storage.origin_visit_status_add( [ OriginVisitStatus( origin=origin_url, visit=visit.visit, date=now(), status="full", snapshot=None, ) ] ) > random_origin_visit = swh_storage.origin_visit_get_random(visit_type) .tox/py3/lib/python3.7/site-packages/swh/storage/tests/test_storage.py:1493: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .tox/py3/lib/python3.7/site-packages/swh/storage/cassandra/storage.py:981: in origin_visit_get_random visit_status = self._origin_visit_apply_last_status(visit) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <swh.storage.cassandra.storage.CassandraStorage object at 0x7f36dc5ac320> visit = {'date': datetime.datetime(2020, 1, 11, 8, 21, 21, 797000, tzinfo=datetime.timezone.utc), 'metadata': None, 'origin': 'file:///dev/zero', 'snapshot': None, ...} def _origin_visit_apply_last_status(self, visit: Dict[str, Any]) -> Dict[str, Any]: """Retrieve the latest visit status information for the origin visit. Then merge it with the visit and return it. """ > visit_status = self._cql_runner.origin_visit_status_get_latest( visit["origin"], visit["visit"] ) E AttributeError: 'CqlRunner' object has no attribute 'origin_visit_status_get_latest' .tox/py3/lib/python3.7/site-packages/swh/storage/cassandra/storage.py:866: AttributeError