You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Brandon Williams (Jira)" <ji...@apache.org> on 2020/03/04 15:35:00 UTC

[jira] [Commented] (CASSANDRA-15613) Flakey test - TestBootstrap.test_local_quorum_bootstrap

    [ https://issues.apache.org/jira/browse/CASSANDRA-15613?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17051329#comment-17051329 ] 

Brandon Williams commented on CASSANDRA-15613:
----------------------------------------------

There are two problem with this test.  First, 3 second may not be long enough to see the bootstrapping node.  Second, it assumes that after inserting 10k rows, the node will still be bootstrapping, and there's simply no logical guarantee that will be the case.  The simplest thing to do, since we don't actually care if the node ever finishes joining, is to put it into write survey mode so it will perpetually be joining. Patch to increase the initial sleep slightly and use survey mode here: https://github.com/driftx/cassandra-dtest/tree/CASSANDRA-15613

> Flakey test - TestBootstrap.test_local_quorum_bootstrap
> -------------------------------------------------------
>
>                 Key: CASSANDRA-15613
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-15613
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Test/dtest
>            Reporter: Ekaterina Dimitrova
>            Assignee: Brandon Williams
>            Priority: Normal
>             Fix For: 4.0-alpha
>
>
> Flakey test on trunk, java 8.
> I did a couple of loops and it sometimes fail at the 5th run, sometimes at the 50th.
>  
> {noformat}
> *_________________________________________________________________________________________________ TestBootstrap.test_local_quorum_bootstrap __________________________________________________________________________________________________*
>  
> self = <bootstrap_test.TestBootstrap object at 0x1064f5bd0>
>  
>     *def test_local_quorum_bootstrap(self):*
>         *"""*
>             *Test that CL local_quorum works while a node is bootstrapping.*
>             *@jira_ticket CASSANDRA-8058*
>             *"""*
>         *cluster = self.cluster*
>         *cluster.populate([1, 1])*
>         *cluster.start()*
>     **    
>         *node1 = cluster.nodes['node1']*
>         *yaml_config = """*
>             *# Create the keyspace and table*
>             *keyspace: keyspace1*
>             *keyspace_definition: |*
>               *CREATE KEYSPACE keyspace1 WITH replication = \{'class': 'NetworkTopologyStrategy', 'dc1': 1, 'dc2': 1};*
>             *table: users*
>             *table_definition:*
>               *CREATE TABLE users (*
>                 *username text,*
>                 *first_name text,*
>                 *last_name text,*
>                 *email text,*
>                 *PRIMARY KEY(username)*
>               *) WITH compaction = \{'class':'SizeTieredCompactionStrategy'};*
>             *insert:*
>               *partitions: fixed(1)*
>               *batchtype: UNLOGGED*
>             *queries:*
>               *read:*
>                 *cql: select * from users where username = ?*
>                 *fields: samerow*
>             *"""*
>         *with tempfile.NamedTemporaryFile(mode='w+') as stress_config:*
>             *stress_config.write(yaml_config)*
>             *stress_config.flush()*
>             *node1.stress(['user', 'profile=' + stress_config.name, 'n=200K', 'no-warmup',*
>                           *'ops(insert=1)', '-rate', 'threads=10'])*
>     **    
>             *node3 = new_node(cluster, data_center='dc2')*
>             *node3.start(no_wait=True)*
>             *time.sleep(3)*
>     **    
>             *ntout = node1.nodetool('status').stdout*
> *>           assert re.search(r'UJ\s+' + node3.ip_addr, ntout), ntout*
> *E           AssertionError: Datacenter: dc1*
> *E             ===============*
> *E             Status=Up/Down*
> *E             |/ State=Normal/Leaving/Joining/Moving*
> *E             --  Address    Load       Owns (effective)  Host ID                               Token                 Rack*
> *E             UN  127.0.0.1  76.82 KiB  ?                 3056e1d1-eac6-493a-b5bc-f8fe703d8d4b  -9223372036854775808  r1 * 
> *E*             
> *E             Datacenter: dc2*
> *E             ===============*
> *E             Status=Up/Down*
> *E             |/ State=Normal/Leaving/Joining/Moving*
> *E             --  Address    Load       Owns (effective)  Host ID                               Token                 Rack*
> *E             UN  127.0.0.2  76.83 KiB  ?                 ae607eb3-5601-4b6f-9d01-cf9401da5a4c  -9223372036854775708  r1 * 
> *E*             
> *E*             
> *E           assert None*
> *E            +  where None = <function search at 0x10472f8c0>(('UJ\\s+' + '127.0.0.3'), 'Datacenter: dc1\n===============\nStatus=Up/Down\n|/ State=Normal/Leaving/Joining/Moving\n--  Address    Load       O...Rack\nUN  127.0.0.2  76.83 KiB  ?                 ae607eb3-5601-4b6f-9d01-cf9401da5a4c  -9223372036854775708  r1  \n\n')*
> *E            +    where <function search at 0x10472f8c0> = re.search*
> *E            +    and   '127.0.0.3' = <ccmlib.node.Node object at 0x106530b10>.ip_addr*
>  
> *bootstrap_test.py*:488: AssertionError
> ----------------------------------------------------------------------------------------------------------- Captured stdout setup ------------------------------------------------------------------------------------------------------------
> 11:42:12,744 ccm DEBUG Log-watching thread starting.
> ------------------------------------------------------------------------------------------------------------- Captured log setup -------------------------------------------------------------------------------------------------------------
> 11:42:12,608 conftest INFO Starting execution of test_local_quorum_bootstrap at 2020-02-28 11:42:12.608760
> 11:42:12,609 dtest_setup INFO cluster ccm directory: /var/folders/ql/nvcz74bd67d3vhw7227mpjm40000gp/T/dtest-51gjecxa
> ---------------------------------------------------------------------------------------------------------- Captured stdout teardown ----------------------------------------------------------------------------------------------------------
> 11:43:03,366 ccm DEBUG Log-watching thread exiting.
> ===Flaky Test Report===
>  
> test_local_quorum_bootstrap failed and was not selected for rerun.
> <class 'AssertionError'>
> Datacenter: dc1
>   ===============
>   Status=Up/Down
>   |/ State=Normal/Leaving/Joining/Moving
>   --  Address    Load       Owns (effective)  Host ID                               Token                 Rack
>   UN  127.0.0.1  76.82 KiB  ?                 3056e1d1-eac6-493a-b5bc-f8fe703d8d4b  -9223372036854775808  r1  
>   
>   Datacenter: dc2
>   ===============
>   Status=Up/Down
>   |/ State=Normal/Leaving/Joining/Moving
>   --  Address    Load       Owns (effective)  Host ID                               Token                 Rack
>   UN  127.0.0.2  76.83 KiB  ?                 ae607eb3-5601-4b6f-9d01-cf9401da5a4c  -9223372036854775708  r1  
>   
>   
> assert None
>  +  where None = <function search at 0x10472f8c0>(('UJ\\s+' + '127.0.0.3'), 'Datacenter: dc1\n===============\nStatus=Up/Down\n|/ State=Normal/Leaving/Joining/Moving\n--  Address    Load       O...Rack\nUN  127.0.0.2  76.83 KiB  ?                 ae607eb3-5601-4b6f-9d01-cf9401da5a4c  -9223372036854775708  r1  \n\n')
>  +    where <function search at 0x10472f8c0> = re.search
>  +    and   '127.0.0.3' = <ccmlib.node.Node object at 0x106530b10>.ip_addr
> [<TracebackEntry /Users/ekaterina.dimitri/IdeaProjects/cassandra-dtest-d/bootstrap_test.py:488>]
>  
> ===End Flaky Test Report===
> *========================================================================================================= 1 failed in 51.61 seconds ==========================================================================================================*
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org