From: <an...@us...> - 2008-04-10 10:43:12
|
Revision: 6326 http://smartfrog.svn.sourceforge.net/smartfrog/?rev=6326&view=rev Author: anfarr Date: 2008-04-10 03:43:10 -0700 (Thu, 10 Apr 2008) Log Message: ----------- SF_203: Functional Test for dependencies logic Added Paths: ----------- trunk/core/testharness/testcases/org/smartfrog/test/system/dependencies/ trunk/core/testharness/testcases/org/smartfrog/test/system/dependencies/DependenciesTest.java trunk/core/testharness/testcases/org/smartfrog/test/system/dependencies/testManagedEntities.sf trunk/core/testharness/testcases/org/smartfrog/test/system/dependencies/testManagedEntitiesTP.sf Added: trunk/core/testharness/testcases/org/smartfrog/test/system/dependencies/DependenciesTest.java =================================================================== --- trunk/core/testharness/testcases/org/smartfrog/test/system/dependencies/DependenciesTest.java (rev 0) +++ trunk/core/testharness/testcases/org/smartfrog/test/system/dependencies/DependenciesTest.java 2008-04-10 10:43:10 UTC (rev 6326) @@ -0,0 +1,56 @@ +/** (C) Copyright 2004 Hewlett-Packard Development Company, LP + + This library 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 library 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 library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + For more information: www.smartfrog.org + + */ + + +package org.smartfrog.test.system.dependencies; + +import org.smartfrog.services.dependencies.examples.WaitToFinish; +import org.smartfrog.sfcore.prim.Prim; +import org.smartfrog.sfcore.prim.TerminationRecord; +import org.smartfrog.test.DeployingTestBase; + +/** + * Date: 30-Apr-2004 + * Time: 22:03:23 + */ +public class DependenciesTest extends DeployingTestBase { + + private static final String FILES = "org/smartfrog/test/system/dependencies/"; + + public DependenciesTest(String name) { + super(name); + } + + public void testManagedEntity() throws Throwable { + //deploy + Prim threadpool=deployExpectingSuccess(FILES+"testManagedEntitiesTP.sf","testManagedEntitiesTP"); + application=deployExpectingSuccess(FILES+"testManagedEntities.sf","testManagedEntities"); + + //test it + String output = (String) application.sfResolve("output"); + System.out.println("*****************************************************"); + System.out.println(output); + assertEquals(output,"foo0cfoo1cfoo2cfoo2rfoo1rfoo0r"); + + //clean up + terminateApplication(); + threadpool.sfTerminate(TerminationRecord.normal(null)); + } +} Added: trunk/core/testharness/testcases/org/smartfrog/test/system/dependencies/testManagedEntities.sf =================================================================== --- trunk/core/testharness/testcases/org/smartfrog/test/system/dependencies/testManagedEntities.sf (rev 0) +++ trunk/core/testharness/testcases/org/smartfrog/test/system/dependencies/testManagedEntities.sf 2008-04-10 10:43:10 UTC (rev 6326) @@ -0,0 +1,20 @@ +/** (C) Copyright 1998-2004 Hewlett-Packard Development Company, LP + +This library 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 library 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 library; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +For more information: www.smartfrog.org + +*/ +#include "org/smartfrog/services/dependencies/examples/tme.sf" \ No newline at end of file Added: trunk/core/testharness/testcases/org/smartfrog/test/system/dependencies/testManagedEntitiesTP.sf =================================================================== --- trunk/core/testharness/testcases/org/smartfrog/test/system/dependencies/testManagedEntitiesTP.sf (rev 0) +++ trunk/core/testharness/testcases/org/smartfrog/test/system/dependencies/testManagedEntitiesTP.sf 2008-04-10 10:43:10 UTC (rev 6326) @@ -0,0 +1,20 @@ +/** (C) Copyright 1998-2004 Hewlett-Packard Development Company, LP + +This library 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 library 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 library; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +For more information: www.smartfrog.org + +*/ +#include "org/smartfrog/services/dependencies/examples/threadpool.sf" \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |