@pytest.mark.usefixtures('os')
def test_hit_no_cluster_dns_mpi(scheduler, region, instance, pcluster_config_reader, clusters_factory, test_datadir):
    logging.info('Testing HIT cluster with cluster DNS disabled.')
    scaledown_idletime = 3
    max_queue_size = 3
    min_queue_size = 1
    slots_per_instance = fetch_instance_slots(region, instance)
    cluster_config = pcluster_config_reader(scaledown_idletime=scaledown_idletime, max_queue_size=max_queue_size, min_queue_size=min_queue_size)
    cluster = clusters_factory(cluster_config)
    remote_command_executor = RemoteCommandExecutor(cluster)
    scheduler_commands = get_scheduler_commands(scheduler, remote_command_executor)
    compute_nodes = scheduler_commands.get_compute_nodes()
    result = remote_command_executor.run_remote_command('ping -c 3 {}'.format(compute_nodes[0]), raise_on_error=False)
    assert_that(result.failed).is_true()
    _test_hostname_same_as_nodename(scheduler_commands, remote_command_executor, compute_nodes)
    _test_mpi(remote_command_executor, slots_per_instance, scheduler, region, cluster.cfn_name, scaledown_idletime, verify_scaling=False)
@pytest.mark.usefixtures('os')
def test_hit_no_cluster_dns_mpi(scheduler, region, instance, pcluster_config_reader, clusters_factory, test_datadir):
    logging.info('Testing HIT cluster with cluster DNS disabled.')
    scaledown_idletime = 3
    max_queue_size = 3
    min_queue_size = 1
    slots_per_instance = fetch_instance_slots(region, instance)
    cluster_config = pcluster_config_reader(scaledown_idletime=scaledown_idletime, max_queue_size=max_queue_size, min_queue_size=min_queue_size)
    cluster = clusters_factory(cluster_config)
    remote_command_executor = RemoteCommandExecutor(cluster)
    scheduler_commands = get_scheduler_commands(scheduler, remote_command_executor)
    compute_nodes = scheduler_commands.get_compute_nodes()
    result = remote_command_executor.run_remote_command('ping -c 3 {}'.format(compute_nodes[0]), raise_on_error=False)
    assert_that(result.failed).is_true()
    _test_hostname_same_as_nodename(scheduler_commands, remote_command_executor, compute_nodes)
    _test_mpi(remote_command_executor, slots_per_instance, scheduler, region, cluster.cfn_name, scaledown_idletime, verify_scaling=False)