User: danch Date: 01/06/29 21:38:06 Added: src/main/org/jboss/test/readahead/test Main.java Log: Added tests for readahead functionality. Note that this only checks to see if they work: it doesn't verify that it's actually performing well Revision Changes Path 1.1 jbosstest/src/main/org/jboss/test/readahead/test/Main.java Index: Main.java =================================================================== package org.jboss.test.readahead.test; import javax.naming.Context; import javax.naming.InitialContext; import org.jboss.test.readahead.interfaces.CMPFindTestSessionHome; import org.jboss.test.readahead.interfaces.CMPFindTestSessionRemote; import junit.framework.TestCase; import junit.framework.Test; import junit.framework.TestSuite; /** * TestCase driver for the readahead finder tests * * @author <a href="mailto:[EMAIL PROTECTED]">danch (Dan Christopherson</a> * @version $Id: Main.java,v 1.1 2001/06/30 04:38:06 danch Exp $ * * Revision: */ public class Main extends TestCase { CMPFindTestSessionRemote rem = null; public Main(String name) { super(name); } public static Test suite() { return new TestSuite(Main.class); } protected void tearDown() throws Exception { if (rem != null) { System.out.println("Removing test data"); rem.removeTestData(); rem.remove(); rem = null; } } protected void setUp() throws Exception { if (rem != null) return; System.out.println("Deploying"); new org.jboss.jmx.client.Deployer().deploy("../deploy/readahead.jar"); System.out.println("Creating test data"); Context ctx = new InitialContext(); CMPFindTestSessionHome home = (CMPFindTestSessionHome)ctx.lookup("CMPFindTestSession"); rem = home.create(); rem.createTestData(); } public void testFindAll() throws Exception { rem.testFinder(); } public void testFindByCity() throws Exception { rem.testByCity(); } public void testAddressByCity() throws Exception { rem.addressByCity(); } } _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
