<commit_before>package org.opennms.netmgt.protocols;

import java.net.InetAddress;
import java.net.UnknownHostException;

import org.opennms.netmgt.protocols.ssh.Poll;

import junit.framework.TestCase;

public class SshTest extends TestCase {
    private static final String GOOD_HOST = "127.0.0.1";
    private static final String BAD_HOST = "127.1.1.1";
    private static final int PORT = 22;
    private static final int TIMEOUT = 30000;

    Poll p;
    InetAddress good, bad;
    
    public void setUp() throws Exception {
        p = new Poll();
        p.setPort(PORT);
        p.setTimeout(TIMEOUT);

        try {
            good = InetAddress.getByName(GOOD_HOST);
            bad  = InetAddress.getByName(BAD_HOST);
        } catch (UnknownHostException e) {
            throw e;
        }
    }
    
    public void testSshGoodHost() throws Exception {
        p.setAddress(good);
        assertTrue(p.poll().isAvailable());<commit_msg>fix BadHost test by giving it an actual bad host<commit_after>package org.opennms.netmgt.protocols;

import java.net.InetAddress;
import java.net.UnknownHostException;

import org.opennms.netmgt.protocols.ssh.Poll;

import junit.framework.TestCase;

public class SshTest extends TestCase {
    private static final String GOOD_HOST = "127.0.0.1";
    private static final String BAD_HOST = "1.1.1.1";
    private static final int PORT = 22;
    private static final int TIMEOUT = 30000;

    Poll p;
    InetAddress good, bad;
    
    public void setUp() throws Exception {
        p = new Poll();
        p.setPort(PORT);
        p.setTimeout(TIMEOUT);

        try {
            good = InetAddress.getByName(GOOD_HOST);
            bad  = InetAddress.getByName(BAD_HOST);
        } catch (UnknownHostException e) {
            throw e;
        }
    }
    
    public void testSshGoodHost() throws Exception {
        p.setAddress(good);
        assertTrue(p.poll().isAvailable());
{'fraction_non_alphanumeric': 0.09612403100775194, 'fraction_numerical': 0.018604651162790697, 'mean_word_length': 2.585185185185185, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2278409', 'n_tokens_mistral': 617, 'n_tokens_neox': 600, 'n_words': 150}