Bug: Fix flaky test - gossip_test.TestGossip
Status: Resolved
Priority: Normal
Resolution: Fixed
Created: 09/Feb/22 09:24
Resolved: 18/Apr/22 14:31

We can see many failures for 4.x branch:

test_2dc_parallel_startup_one_seed ([916|https://ci-cassandra.apache.org/job/Cassandra-trunk/916/testReport/dtest-offheap.gossip_test/TestGossip],  [920|https://ci-cassandra.apache.org/job/Cassandra-trunk/920/testReport/dtest.gossip_test/TestGossip,])

test_2dc_parallel_startup ([929|https://ci-cassandra.apache.org/job/Cassandra-trunk/929/testReport/dtest-novnode.gossip_test/TestGossip], [931|https://ci-cassandra.apache.org/job/Cassandra-trunk/931/testReport/dtest.gossip_test/TestGossip], [936|https://ci-cassandra.apache.org/job/Cassandra-trunk/936/testReport/dtest-novnode.gossip_test/TestGossip])

test_2dc_parallel_startup_one_seed ([916|https://ci-cassandra.apache.org/job/Cassandra-trunk/916/testReport/dtest-offheap.gossip_test/TestGossip], [920|https://ci-cassandra.apache.org/job/Cassandra-trunk/920/testReport/dtest.gossip_test/TestGossip/])

The error is always the same:
{code:java}
Unexpected error found in node logs (see stdout for full details). Errors: [ERROR [main] 2022-01-26 10:53:12,866 CassandraDaemon.java:900 - Exception encountered during startup
java.lang.RuntimeException: Didn't receive schemas for all known versions within the timeout. Use -Dcassandra.skip_schema_check=true to skip this check.
	at org.apache.cassandra.service.StorageService.waitForSchema(StorageService.java:1037)
	at org.apache.cassandra.dht.BootStrapper.allocateTokens(BootStrapper.java:232)
	at org.apache.cassandra.dht.BootStrapper.getBootstrapTokens(BootStrapper.java:180)
	at org.apache.cassandra.service.StorageService.joinTokenRing(StorageService.java:1089)
	at org.apache.cassandra.service.StorageService.joinTokenRing(StorageService.java:1043)
	at org.apache.cassandra.service.StorageService.initServer(StorageService.java:821)
	at org.apache.cassandra.service.StorageService.initServer(StorageService.java:751)
	at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:417)
	at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:754)
	at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:878), ERROR [main] 2022-01-26 10:53:12,866 CassandraDaemon.java:900 - Exception encountered during startup
java.lang.RuntimeException: Didn't receive schemas for all known versions within the timeout. Use -Dcassandra.skip_schema_check=true to skip this check.
	at org.apache.cassandra.service.StorageService.waitForSchema(StorageService.java:1037)
	at org.apache.cassandra.dht.BootStrapper.allocateTokens(BootStrapper.java:232)
	at org.apache.cassandra.dht.BootStrapper.getBootstrapTokens(BootStrapper.java:180)
	at org.apache.cassandra.service.StorageService.joinTokenRing(StorageService.java:1089)
	at org.apache.cassandra.service.StorageService.joinTokenRing(StorageService.java:1043)
	at org.apache.cassandra.service.StorageService.initServer(StorageService.java:821)
	at org.apache.cassandra.service.StorageService.initServer(StorageService.java:751)
	at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:417)
	at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:754)
	at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:878)] {code}