[
https://issues.apache.org/jira/browse/CASSANDRA-17605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17534320#comment-17534320
]
Andres de la Peña commented on CASSANDRA-17605:
-----------------------------------------------
Looks good overall, here are repeated CI runs for all involved branches:
||Branch||CI||
|3.0|[j8|https://app.circleci.com/pipelines/github/adelapena/cassandra/1528/workflows/33c5bc80-ff45-4172-be5c-a33735545d38]|
|3.11|[j8|https://app.circleci.com/pipelines/github/adelapena/cassandra/1530/workflows/c66b8d14-a2d4-4f0e-98e9-052a29c5816b]|
|4.0|[j8|https://app.circleci.com/pipelines/github/adelapena/cassandra/1529/workflows/fa0ea980-dc10-4ec1-88fd-9548d3af7515]
[j11|https://app.circleci.com/pipelines/github/adelapena/cassandra/1529/workflows/6d9fcc35-689b-4a74-8799-ec7a23d69e1a]|
|4.1|[j8|https://app.circleci.com/pipelines/github/adelapena/cassandra/1532/workflows/321b76e2-92a1-44bb-98c3-95f5cefb42f1]
[j11|https://app.circleci.com/pipelines/github/adelapena/cassandra/1532/workflows/c9bca385-b757-45a7-87ed-bf87ca438bad]|
|trunk|[j8|https://app.circleci.com/pipelines/github/adelapena/cassandra/1531/workflows/c179ef60-4d3b-4ab7-bbff-1b4663901b68]
[j11|https://app.circleci.com/pipelines/github/adelapena/cassandra/1531/workflows/b7f08bf6-df70-4f85-bffa-a99970d3b492]|
The suggested changes ignore the read failures if each block of operations
takes longer than the TTL. If that happens we wouldn't have managed to properly
test the desired operations due to env conditions, so IMO the test would be
inconclusive. It might make sense to just skip the test if we find such
scenario:
{code:python}
except AssertionError as ae:
if (time.time() - start) < 50:
raise ae
else:
pytest.skip("Skipping test because it took longer than the 50s TTL")
{code}
Or we might continue without immediately skipping the test but just setting a
boolean signalling that some check has failed and, at the end of the test,
consider it skipped:
{code:python}
except AssertionError as ae:
if (time.time() - start) < 50:
raise ae
else:
skipped = True
...
if skipped:
pytest.skip("Skipping test because some checks took longer than their
specified TTL, "
"probably due to an unusually slow environment")
{code}
Also, it could be useful to increase the TTLs to reduce the likelihood of that
problematic scenario. Currently we use TTLs of 50, 40 and 30 seconds, we could
for example use 100, 90 and 80 seconds.
> Fix
> dtest-offheap.materialized_views_test.TestMaterializedViews.test_mv_with_default_ttl_with_flush
> ---------------------------------------------------------------------------------------------------
>
> Key: CASSANDRA-17605
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17605
> Project: Cassandra
> Issue Type: Bug
> Components: CI
> Reporter: Ekaterina Dimitrova
> Assignee: Berenguer Blasi
> Priority: Urgent
> Fix For: 4.1.x
>
>
> h3.
> https://ci-cassandra.apache.org/job/Cassandra-4.1/5/testReport/dtest-offheap.materialized_views_test/TestMaterializedViews/test_mv_with_default_ttl_with_flush_2/
> {code:java}
> Error Message
> AssertionError: Expected [[1, 6, 1]] from SELECT * FROM t, but got [[1, None,
> 1]]
> Stacktrace
> self = <materialized_views_test.TestMaterializedViews object at
> 0x7f8b1fd21cd0> @since('3.0') def test_mv_with_default_ttl_with_flush(self):
> > self._test_mv_with_default_ttl(True) materialized_views_test.py:1320: _ _ _
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> materialized_views_test.py:1416: in _test_mv_with_default_ttl
> assert_one(session, "SELECT * FROM t", [1, 6, 1]) _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ session =
> <cassandra.cluster.Session object at 0x7f8b1f167f70> query = 'SELECT * FROM
> t', expected = [1, 6, 1], cl = None def assert_one(session, query, expected,
> cl=None): """ Assert query returns one row. @param session Session to use
> @param query Query to run @param expected Expected results from query @param
> cl Optional Consistency Level setting. Default ONE Examples:
> assert_one(session, "LIST USERS", ['cassandra', True]) assert_one(session,
> query, [0, 0]) """ simple_query = SimpleStatement(query,
> consistency_level=cl) res = session.execute(simple_query) list_res =
> _rows_to_list(res) > assert list_res == [expected], "Expected {} from {}, but
> got {}".format([expected], query, list_res) E AssertionError: Expected [[1,
> 6, 1]] from SELECT * FROM t, but got [[1, None, 1]] tools/assertions.py:132:
> AssertionError
> {code}
>
--
This message was sent by Atlassian Jira
(v8.20.7#820007)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]