From: Steve L. <st...@us...> - 2004-03-30 14:29:15
|
Update of /cvsroot/smartfrog/core/extras/ant/test/org/smartfrog/tools/ant/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3461/test/org/smartfrog/tools/ant/test Modified Files: TaskTestBase.java RunTest.java DeployTest.java Log Message: Fixes to get the tests compatible with Julios changes. At this point the tests are working again on Linux, but not winXP. Responsibility for maintaining tasks+tests now falls to whoever breaks the tests in future. Index: TaskTestBase.java =================================================================== RCS file: /cvsroot/smartfrog/core/extras/ant/test/org/smartfrog/tools/ant/test/TaskTestBase.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TaskTestBase.java 29 Mar 2004 15:37:34 -0000 1.3 --- TaskTestBase.java 30 Mar 2004 14:17:36 -0000 1.4 *************** *** 128,134 **** } ! protected void assertDeployed(String s) { ! assertInLog("Successfully deployed"); ! assertInLog(s); } --- 128,134 ---- } ! protected void expectDeployed(String target,String appname) { ! executeTarget(target); ! assertInLog("Successfully deployed: "+appname); } Index: DeployTest.java =================================================================== RCS file: /cvsroot/smartfrog/core/extras/ant/test/org/smartfrog/tools/ant/test/DeployTest.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DeployTest.java 29 Mar 2004 14:31:43 -0000 1.3 --- DeployTest.java 30 Mar 2004 14:17:36 -0000 1.4 *************** *** 112,117 **** private void assertNoConnectionToLocalhost() { ! assertInLog("Unable to connect to sfDaemon on: localhost"); ! assertInLog("Reason:sfDaemon may not be running on localhost"); assertInLog("java.rmi.ConnectException: Connection refused to host: 127.0.0.1"); } --- 112,117 ---- private void assertNoConnectionToLocalhost() { ! //assertInLog("Unable to connect to sfDaemon on: localhost"); ! //assertInLog("Reason:sfDaemon may not be running on localhost"); assertInLog("java.rmi.ConnectException: Connection refused to host: 127.0.0.1"); } *************** *** 131,135 **** expectBuildExceptionContaining("testDeployFile", "expected timeout", "Timeout"); assertInLog("rootProcess failed to deploy 'app' component"); ! assertInLog("cause: SmartFrogResolutionException:: Reference not found, Unresolved Reference: sfClass"); } --- 131,135 ---- expectBuildExceptionContaining("testDeployFile", "expected timeout", "Timeout"); assertInLog("rootProcess failed to deploy 'app' component"); ! assertInLog("Reference not found, Unresolved Reference"); } *************** *** 137,141 **** public void testDeployResource() { expectBuildExceptionContaining("testDeployResource", "expected timeout", "Timeout"); ! assertInLog("Successfully deployed components: [app]"); assertInLog("COUNTER: hello - here is a constructed message"); assertInLog("value is 99"); --- 137,141 ---- public void testDeployResource() { expectBuildExceptionContaining("testDeployResource", "expected timeout", "Timeout"); ! assertInLog("Successfully deployed"); assertInLog("COUNTER: hello - here is a constructed message"); assertInLog("value is 99"); Index: RunTest.java =================================================================== RCS file: /cvsroot/smartfrog/core/extras/ant/test/org/smartfrog/tools/ant/test/RunTest.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** RunTest.java 29 Mar 2004 14:31:43 -0000 1.2 --- RunTest.java 30 Mar 2004 14:17:36 -0000 1.3 *************** *** 80,96 **** public void testRunFile(){ ! expectBuildExceptionContaining("testRunFile","deploy failure","Could not run"); ! assertInLog("Reference not found, Unresolved Reference: sfClass"); } public void testInline() { ! expectBuildExceptionContaining("testInline", "deploy failure", "Could not run"); ! assertInLog("Reference not found, Unresolved Reference: sfClass"); } public void testResource() { ! executeTarget("testResource"); ! assertDeployed("app"); ! assertInLog("app"); assertInLog("COUNTER: hello - here is a constructed message"); assertInLog("value is 99"); --- 80,92 ---- public void testRunFile(){ ! assertDeployFailsWithUnresolvedReference("testRunFile"); } public void testInline() { ! assertDeployFailsWithUnresolvedReference("testInline"); } public void testResource() { ! expectDeployed("testResource","app"); assertInLog("COUNTER: hello - here is a constructed message"); assertInLog("value is 99"); *************** *** 115,121 **** */ public void testSubdir() { ! expectBuildExceptionContaining("testSubdir", "deploy failure", "Could not run"); ! assertInLog("Reference not found, Unresolved Reference: sfClass"); } --- 111,122 ---- */ public void testSubdir() { ! String target = "testSubdir"; ! assertDeployFailsWithUnresolvedReference(target); ! } ! ! private void assertDeployFailsWithUnresolvedReference(String target) { ! expectBuildExceptionContaining(target, "deploy failure", "Could not run"); ! assertInLog("Reference not found, Unresolved Reference"); } *************** *** 124,130 **** */ public void testAssertions() { ! executeTarget("testAssertions"); ! assertInLog("Successfully deployed components: [app]"); assertInLog("goodbye"); } } --- 125,131 ---- */ public void testAssertions() { ! expectDeployed("testAssertions","app"); assertInLog("goodbye"); } + } |