[jboss-cvs] JBossAS SVN: r60383 - trunk/testsuite/src/main/org/jboss/test/naming/test.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Feb 7 11:16:33 EST 2007


Author: dimitris at jboss.org
Date: 2007-02-07 11:16:33 -0500 (Wed, 07 Feb 2007)
New Revision: 60383

Modified:
   trunk/testsuite/src/main/org/jboss/test/naming/test/NamingServerSetup.java
Log:
JBAS-4082, fix naming tests after naming service changes

Modified: trunk/testsuite/src/main/org/jboss/test/naming/test/NamingServerSetup.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/naming/test/NamingServerSetup.java	2007-02-07 16:15:10 UTC (rev 60382)
+++ trunk/testsuite/src/main/org/jboss/test/naming/test/NamingServerSetup.java	2007-02-07 16:16:33 UTC (rev 60383)
@@ -1,53 +1,58 @@
 /*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, 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.
-  */
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.test.naming.test;
 
 import java.util.Hashtable;
-import javax.naming.RefAddr;
-import javax.naming.StringRefAddr;
-import javax.naming.Reference;
+
 import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
+import javax.naming.RefAddr;
+import javax.naming.Reference;
+import javax.naming.StringRefAddr;
+import javax.naming.spi.InitialContextFactory;
 import javax.naming.spi.InitialContextFactoryBuilder;
-import javax.naming.spi.InitialContextFactory;
 import javax.naming.spi.NamingManager;
 
 import junit.extensions.TestSetup;
 import junit.framework.Test;
 
 import org.jboss.naming.ENCFactory;
+import org.jnp.interfaces.NamingContext;
 import org.jnp.server.Main;
-import org.jnp.interfaces.NamingContext;
+import org.jnp.server.NamingBeanImpl;
 
-/** Create a naming server instance in setUp and destroy it in tearDown.
+/** 
+ * Create a naming server instance in setUp and destroy it in tearDown.
  * @author Scott.Stark at jboss.org
+ * @author Dimitris.Andreadis at jboss.org
  * @version $Revision$
  */
 public class NamingServerSetup extends TestSetup
    implements InitialContextFactoryBuilder
 {
    private Main namingServer;
-
+   private NamingBeanImpl namingBean;
+   
    public NamingServerSetup(Test test)
    {
       super(test);
@@ -62,8 +67,11 @@
    protected void setUp() throws Exception
    {
       super.setUp();
+      namingBean = new NamingBeanImpl();
       namingServer = new Main();
       namingServer.setPort(10099);
+      namingServer.setNamingInfo(namingBean);
+      namingBean.start();
       namingServer.start();
 
       NamingManager.setInitialContextFactoryBuilder(this);
@@ -83,6 +91,7 @@
    protected void tearDown() throws Exception
    {
       namingServer.stop();
+      namingBean.stop();
       super.tearDown();
    }
 




More information about the jboss-cvs-commits mailing list