'Test to validate that generator based results are surfaced correctly
Repeatedly inserts data into a a table and attempts to query it. It then validates that the
results are returned in the order expected
@since 2.7.0
@jira_ticket PYTHON-123
@expected_result all data should be returned in order.
@test_category queries:async'

def test_execute_concurrent_with_args_generator(self):

    for num_statements in (0, 1, 2, 7, 10, 99, 100, 101, 199, 200, 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)
        for (success, result) in results:
            self.assertTrue(success)
            self.assertFalse(result)
        results = self.execute_concurrent_args_helper(self.session, statement, parameters, results_generator=True)
        for result in results:
            self.assertTrue(isinstance(result, ExecutionResult))
            self.assertTrue(result.success)
            self.assertFalse(result.result_or_exc)
        statement = SimpleStatement('SELECT    v    FROM    test3rf.test    WHERE    k=%s', consistency_level=ConsistencyLevel.QUORUM)
        parameters = [(i,) for i in range(num_statements)]
        results = self.execute_concurrent_args_helper(self.session, statement, parameters, results_generator=True)
        for i in range(num_statements):
            result = next(results)
            self.assertEqual((True, [(i,)]), result)
        self.assertRaises(StopIteration, next, results)
