'Tests that profile load balancing policies are not shared
Creates two LBP, runs a few queries, and validates that each LBP is execised
seperately between EP\'s
@since 3.5
@jira_ticket PYTHON-569
@expected_result LBP should not be shared.
@test_category config_profiles'

def test_profile_lb_swap(self):

    query = 'select    release_version    from    system.local'
    rr1 = ExecutionProfile(load_balancing_policy=RoundRobinPolicy())
    rr2 = ExecutionProfile(load_balancing_policy=RoundRobinPolicy())
    exec_profiles = {'rr1': rr1, 'rr2': rr2}
    with Cluster(execution_profiles=exec_profiles) as cluster:
        session = cluster.connect(wait_for_all_pools=True)
        expected_hosts = set(cluster.metadata.all_hosts())
        rr1_queried_hosts = set()
        rr2_queried_hosts = set()
        rs = session.execute(query, execution_profile='rr1')
        rr1_queried_hosts.add(rs.response_future._current_host)
        rs = session.execute(query, execution_profile='rr2')
        rr2_queried_hosts.add(rs.response_future._current_host)
        self.assertEqual(rr2_queried_hosts, rr1_queried_hosts)
