/*
 * A CCNx library test.
 *
 * Copyright (C) 2008, 2009 Palo Alto Research Center, Inc.
 *
 * This work is free software; you can redistribute it and/or modify it under
 * the terms of the GNU General Public License version 2 as published by the
 * Free Software Foundation. 
 * This work is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
 * for more details. You should have received a copy of the GNU General Public
 * License along with this program; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA 02110-1301, USA.
 */

package org.ccnx.ccn.test;

import java.util.logging.Level;

import org.ccnx.ccn.impl.support.Log;
import org.junit.Test;

/**
 * Part of older test infrastructure. Simple object-base read/write test.
 */
public class BasePutGetTest extends LibraryTestBase {
	
	@Test
	public void testGetPut() throws Throwable {
		// Set debug level: use for more FINE, FINER, FINEST for debug-level tracing
		// Library.setLevel(Level.FINEST);
		Log.setDefaultLevel(Log.FAC_SIGNING, Level.FINEST);
		System.out.println("TEST: PutThread/GetThread");
		int id = getUniqueId();
		Thread putter = new Thread(new PutThread(count, id));
		Thread getter = new Thread(new GetThread(count, id));
		genericGetPut(putter, getter);
	}
	
	@Test
	public void testGetServPut() throws Throwable {
		System.out.println("TEST: PutThread/GetServer");
		int id = getUniqueId();

		//Library.setLevel(Level.FINEST);
		Thread putter = new Thread(new PutThread(count, id));
		Thread getter = new Thread(new GetServer(count, id));
		genericGetPut(putter, getter);
	}

	@Test
	public void testGetPutServ() throws Throwable {
		System.out.println("TEST: PutServer/GetThread");
		int id = getUniqueId();
		Thread putter = new Thread(new PutServer(count, id));
		Thread getter = new Thread(new GetThread(count, id));
		genericGetPut(putter, getter);
	}
}

@@ -831,16 +831,46 @@
 rt.Log;%0A
+import org.junit.BeforeClass;%0A
 import o
@@ -1029,227 +1029,226 @@
 %09%0A%09@
-Test%0A%09public void testGetPut() throws Throwable %7B%0A%09%09// Set debug level: use for more FINE, FINER, FINEST for debug-level tracing%0A%09%09// Library.setLevel(Level.FINEST);%0A%09%09Log.setDefaultLevel(Log.FAC_SIGNING, Level.FINEST);
+BeforeClass%0A%09public static void setUpBeforeClass() throws Exception %7B%0A%09%09LibraryTestBase.setUpBeforeClass();%0A%09%09Log.setDefaultLevel(Log.FAC_SIGNING, Level.FINEST);%0A%09%7D%0A%09%0A%09@Test%0A%09public void testGetPut() throws Throwable %7B
 %0A%09%09S

Call setDefaultLevel in BasePutGetTest before class so log levels can be overwritten refs #100159