From jboss-remoting-commits at lists.jboss.org Mon Aug 30 22:49:18 2010 Content-Type: multipart/mixed; boundary="===============2508625909879108455==" MIME-Version: 1.0 From: jboss-remoting-commits at lists.jboss.org To: jboss-remoting-commits at lists.jboss.org Subject: [jboss-remoting-commits] JBoss Remoting SVN: r6076 - remoting3/trunk/jboss-remoting/src/test/java/org/jboss/remoting3/test. Date: Mon, 30 Aug 2010 22:49:18 -0400 Message-ID: <201008310249.o7V2nINr016499@svn01.web.mwc.hst.phx2.redhat.com> --===============2508625909879108455== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: ron.sigal(a)jboss.com Date: 2010-08-30 22:49:18 -0400 (Mon, 30 Aug 2010) New Revision: 6076 Added: remoting3/trunk/jboss-remoting/src/test/java/org/jboss/remoting3/test/At= tachmentsTestCase.java Log: JBREM-1228: New unit test for org.jboss.remoting3.AttachmentsImpl. Added: remoting3/trunk/jboss-remoting/src/test/java/org/jboss/remoting3/tes= t/AttachmentsTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- remoting3/trunk/jboss-remoting/src/test/java/org/jboss/remoting3/test/A= ttachmentsTestCase.java (rev 0) +++ remoting3/trunk/jboss-remoting/src/test/java/org/jboss/remoting3/test/A= ttachmentsTestCase.java 2010-08-31 02:49:18 UTC (rev 6076) @@ -0,0 +1,135 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2010, 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.remoting3.test; + +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertFalse; +import static org.testng.Assert.assertNull; +import static org.testng.Assert.assertTrue; + +import java.io.IOException; +import java.util.concurrent.ArrayBlockingQueue; +import java.util.concurrent.Executor; +import java.util.concurrent.ThreadPoolExecutor; +import java.util.concurrent.TimeUnit; + +import org.jboss.remoting3.Attachments; +import org.jboss.remoting3.Endpoint; +import org.jboss.remoting3.Remoting; +import org.jboss.xnio.OptionMap; +import org.jboss.xnio.log.Logger; +import org.testng.annotations.AfterMethod; +import org.testng.annotations.BeforeMethod; +import org.testng.annotations.Test; + +/** + * Tests org.jboss.remoting3.AttachmentsImpl. + * = + * @author Ron Sigal + * @version $Revision: 1.1 $ + *
+ * Copyright August 27, 2010
+ */
+(a)Test(suiteName =3D "Attachments")
+public class AttachmentsTestCase extends RemotingTestBase {
+
+ private static final Logger log =3D Logger.getLogger(AttachmentsTestCas=
e.class);
+
+ @BeforeMethod
+ public void setUp() {
+ }
+
+ @AfterMethod
+ public void tearDown() throws IOException {
+ }
+ =
+ @Test
+ public void testAttachments() throws Exception {
+ enter();
+ =
+ try {
+ Executor executor =3D new ThreadPoolExecutor(8, 64, 30, TimeUnit.=
SECONDS, new ArrayBlockingQueue