[jboss-svn-commits] JBL Code SVN: r20131 - labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/dependencies.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Fri May 23 10:03:25 EDT 2008
Author: kevin.conner at jboss.com
Date: 2008-05-23 10:03:25 -0400 (Fri, 23 May 2008)
New Revision: 20131
Removed:
labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/dependencies/H2DatabaseUnitTest.java
Log:
Removed MBean test: JBESB-1767
Deleted: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/dependencies/H2DatabaseUnitTest.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/dependencies/H2DatabaseUnitTest.java 2008-05-23 13:56:45 UTC (rev 20130)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/dependencies/H2DatabaseUnitTest.java 2008-05-23 14:03:25 UTC (rev 20131)
@@ -1,93 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source Copyright 2006, JBoss Inc., and
- * individual contributors as indicated by the @authors tag. See the
- * copyright.txt in the distribution for a full listing of individual
- * contributors.
- *
- * This is free software; you can redistribute it and/or modify it under the
- * terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This software 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 Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this software; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
- * site: http://www.fsf.org.
- */
-package org.jboss.internal.soa.esb.dependencies;
-
-import static org.junit.Assert.assertTrue;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.Socket;
-import java.net.UnknownHostException;
-
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * Unit test for {@link H2Database}
- * <p/>
- *
- * @author <a href="mailto:kbevenius at redhat.com">Daniel Bevenius</a>
- *
- */
-public class H2DatabaseUnitTest
-{
- private final int port = 9098;
- private H2Database database;
-
- @Test
- public void startRemoteDatabase() throws Exception
- {
- database.setServerMode( true );
- database.startRemoteDatabase();
-
- // give the database time to start up.
- Thread.sleep( 1000 );
-
- assertDatabaseIsStarted();
- database.stop();
- }
-
- @Before
- public void setup()
- {
- database = new H2DatabaseMock();
- database.setDatabase( "test" );
- database.setPort( port );
- }
-
- private void assertDatabaseIsStarted() throws UnknownHostException, IOException
- {
- Socket socket = null;
- try
- {
- socket = new Socket( InetAddress.getLocalHost(), port );
- boolean bound = socket.isBound();
- assertTrue ( bound );
- }
- finally
- {
- if ( socket != null )
- socket.close();
- }
- }
-
- private static class H2DatabaseMock extends H2Database
- {
- @Override
- File getDataDir()
- {
- return new File( System.getProperty( "java.io.tmpdir" ) );
- }
- }
-
-}
More information about the jboss-svn-commits
mailing list