'Test to validate that generator based results are surfaced correctly when paging is used
Inserts data into a a table and attempts to query it. It then validates that the
results are returned as expected (no order specified)
@since 2.7.0
@jira_ticket PYTHON-123
@expected_result all data should be returned in order.
@test_category paging'

def test_execute_concurrent_paged_result_generator(self):

    if (PROTOCOL_VERSION < 2):
        raise unittest.SkipTest(('Protocol    2+    is    required    for    Paging,    currently    testing    against    %r' % (PROTOCOL_VERSION,)))
    num_statements = 201
    statement = SimpleStatement('INSERT    INTO    test3rf.test    (k,    v)    VALUES    (%s,    %s)', consistency_level=ConsistencyLevel.QUORUM)
    parameters = [(i, i) for i in range(num_statements)]
    results = self.execute_concurrent_args_helper(self.session, statement, parameters, results_generator=True)
    self.assertEqual(num_statements, sum((1 for _ in results)))
    statement = SimpleStatement('SELECT    *    FROM    test3rf.test    LIMIT    %s', consistency_level=ConsistencyLevel.QUORUM, fetch_size=int((num_statements / 2)))
    paged_results_gen = self.execute_concurrent_args_helper(self.session, statement, [(num_statements,)], results_generator=True)
    found_results = 0
    for result_tuple in paged_results_gen:
        paged_result = result_tuple[1]
        for _ in paged_result:
            found_results += 1
    self.assertEqual(found_results, num_statements)
