<commit_before>package redis.clients.jedis.tests;

import java.io.IOException;
import java.net.UnknownHostException;
import java.util.List;

import junit.framework.Assert;

import org.junit.Before;
import org.junit.Test;

import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPipeline;
import redis.clients.jedis.tests.HostAndPortUtil.HostAndPort;

public class PipeliningTest extends Assert {
    private static HostAndPort hnp = HostAndPortUtil.getRedisServers().get(0);

    private Jedis jedis;

    @Before
    public void setUp() throws Exception {
	jedis = new Jedis(hnp.host, hnp.port, 500);
	jedis.connect();
	jedis.auth("<PASSWORD>");
	jedis.flushAll();
    }

    @Test
    public void pipeline() throws UnknownHostException, IOException {
	List<Object> results = jedis.pipelined(new JedisPipeline() {
	    public void execute() {
		client.set("foo", "bar");
		client.get("foo");
	    }
	});

	assertEquals(2, results.size());
	assertEquals("OK", results.get(0));
	assertEquals("bar", results.get(1));
    }
}
<commit_msg>Fix some more U tests ...<commit_after>package redis.clients.jedis.tests;

import java.io.IOException;
import java.net.UnknownHostException;
import java.util.List;

import org.junit.Assert;

import org.junit.Before;
import org.junit.Test;

import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPipeline;
import redis.clients.jedis.Protocol;
import redis.clients.jedis.tests.HostAndPortUtil.HostAndPort;

public class PipeliningTest extends Assert {
    private static HostAndPort hnp = HostAndPortUtil.getRedisServers().get(0);

    private Jedis jedis;

    @Before
    public void setUp() throws Exception {
	jedis = new Jedis(hnp.host, hnp.port, 500);
	jedis.connect();
	jedis.auth("foobared");
	jedis.flushAll();
    }

    @Test
    public void pipeline() throws UnknownHostException, IOException {
	List<Object> results = jedis.pipelined(new JedisPipeline() {
	    public void execute() {
		client.set("foo", "bar");
		client.get("foo");
	    }
	});

	assertEquals(2, results.size());
	assertArrayEquals("OK".getBytes(Protocol.UTF8), (byte[])results.get(0));
	assertArrayEquals("bar".getBytes(Protocol.UTF8), (byte[])results.get(1));
    }
}

{'fraction_non_alphanumeric': 0.1365079365079365, 'fraction_numerical': 0.0072562358276643995, 'mean_word_length': 4.656410256410257, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '5561497', 'n_tokens_mistral': 764, 'n_tokens_neox': 752, 'n_words': 147}