'First checks that TraceUnavailable is arisen if the
max_wait parameter is negative
Then checks that TraceUnavailable is arisen if the
result hasn\'t been set yet
@since 3.10
@jira_ticket PYTHON-196
@expected_result TraceUnavailable is arisen in both cases
@test_category query'

def test_trace_unavailable(self):

    cluster = Cluster(protocol_version=PROTOCOL_VERSION)
    self.addCleanup(cluster.shutdown)
    session = cluster.connect()
    query = 'SELECT    *    FROM    system.local'
    statement = SimpleStatement(query)
    max_retry_count = 10
    for i in range(max_retry_count):
        future = session.execute_async(statement, trace=True)
        future.result()
        try:
            result = future.get_query_trace((-1.0))
            self.check_trace(result)
        except TraceUnavailable:
            break
    else:
        raise Exception("get_query_trace    didn't    raise    TraceUnavailable    after    {}    tries".format(max_retry_count))
    for i in range(max_retry_count):
        future = session.execute_async(statement, trace=True)
        try:
            result = future.get_query_trace(max_wait=120)
            self.check_trace(result)
        except TraceUnavailable:
            break
    else:
        raise Exception("get_query_trace    didn't    raise    TraceUnavailable    after    {}    tries".format(max_retry_count))
