'Tests to ensure that schema disagreement is properly surfaced on the response future.
Creates and destroys keyspaces/tables with various schema agreement timeouts set.
First part runs cql create/drop cmds with schema agreement set in such away were it will be impossible for agreement to occur during timeout.
It then validates that the correct value is set on the result.
Second part ensures that when schema agreement occurs, that the result set reflects that appropriately
@since 3.1.0
@jira_ticket PYTHON-458
@expected_result is_schema_agreed is set appropriately on response thefuture
@test_category schema'

def test_for_schema_disagreement_attribute(self):

    cluster = Cluster(protocol_version=PROTOCOL_VERSION, max_schema_agreement_wait=0.001)
    session = cluster.connect(wait_for_all_pools=True)
    rs = session.execute("CREATE    KEYSPACE    test_schema_disagreement    WITH    replication    =    {'class':    'SimpleStrategy',    'replication_factor':    3}")
    self.check_and_wait_for_agreement(session, rs, False)
    rs = session.execute(SimpleStatement('CREATE    TABLE    test_schema_disagreement.cf    (key    int    PRIMARY    KEY,    value    int)', consistency_level=ConsistencyLevel.ALL))
    self.check_and_wait_for_agreement(session, rs, False)
    rs = session.execute('DROP    KEYSPACE    test_schema_disagreement')
    self.check_and_wait_for_agreement(session, rs, False)
    cluster.shutdown()
    cluster = Cluster(protocol_version=PROTOCOL_VERSION, max_schema_agreement_wait=100)
    session = cluster.connect()
    rs = session.execute("CREATE    KEYSPACE    test_schema_disagreement    WITH    replication    =    {'class':    'SimpleStrategy',    'replication_factor':    3}")
    self.check_and_wait_for_agreement(session, rs, True)
    rs = session.execute(SimpleStatement('CREATE    TABLE    test_schema_disagreement.cf    (key    int    PRIMARY    KEY,    value    int)', consistency_level=ConsistencyLevel.ALL))
    self.check_and_wait_for_agreement(session, rs, True)
    rs = session.execute('DROP    KEYSPACE    test_schema_disagreement')
    self.check_and_wait_for_agreement(session, rs, True)
    cluster.shutdown()
