<commit_before>package net.spy.memcached;

import java.net.SocketAddress;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.Map;
import java.util.Random;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;

import net.spy.memcached.ops.OperationErrorType;
import net.spy.memcached.ops.OperationException;
import net.spy.memcached.transcoders.BaseSerializingTranscoder;
import net.spy.memcached.transcoders.SerializingTranscoder;
import net.spy.memcached.transcoders.Transcoder;
import net.spy.test.SyncThread;


public abstract class ProtocolBaseCase extends ClientBaseCase {

	public void testAssertions() {
		boolean caught=false;
		try {
			assert false;
		} catch(AssertionError e) {
			caught=true;
		}
		assertTrue("Assertions are not enabled!", caught);
	}

	public void testGetStats() throws Exception {
		Map<SocketAddress, Map<String, String>> stats = client.getStats();
		System.out.println("Stats:  " + stats);
		assertEquals(1, stats.size());
		Map<String, String> oneStat=stats.values().iterator().next();
		assertTrue(oneStat.containsKey("total_items"));
	}

	public void testDelayedFlush() throws Exception {
		assertNull(client.get("test1"));
		client.set("test1", 5, "test1value");<commit_msg>Added a baseline test to get slab stats.<commit_after>package net.spy.memcached;

import java.net.SocketAddress;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.Map;
import java.util.Random;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;

import net.spy.memcached.ops.OperationErrorType;
import net.spy.memcached.ops.OperationException;
import net.spy.memcached.transcoders.BaseSerializingTranscoder;
import net.spy.memcached.transcoders.SerializingTranscoder;
import net.spy.memcached.transcoders.Transcoder;
import net.spy.test.SyncThread;


public abstract class ProtocolBaseCase extends ClientBaseCase {

	public void testAssertions() {
		boolean caught=false;
		try {
			assert false;
		} catch(AssertionError e) {
			caught=true;
		}
		assertTrue("Assertions are not enabled!", caught);
	}

	public void testGetStats() throws Exception {
		Map<SocketAddress, Map<String, String>> stats = client.getStats();
		System.out.println("Stats:  " + stats);
		assertEquals(1, stats.size());
		Map<String, String> oneStat=stats.values().iterator().next();
		assertTrue(oneStat.containsKey("total_items"));
	}

	public void testGetStatsSlabs() throws Exception {
		Map<SocketAddress, Map<String, String>> stats = client.getStats("slabs");
		System.out.println("Stats:  " + stats);
		assertEquals(1, stats.size());
		Map<String, String> oneStat=stats.values().iterator().next();
		assertTrue(oneStat.containsKey("1:chunk_size"));
	}

	public void testDelayedFlush() throws Exception {
		assertNull(client.get("test1"));
		client.set("test1", 5, "test1value");
{'fraction_non_alphanumeric': 0.12535167239762426, 'fraction_numerical': 0.003751172241325414, 'mean_word_length': 5.896551724137931, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, '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': '4819174', 'n_tokens_mistral': 1030, 'n_tokens_neox': 987, 'n_words': 198}