Author: craigmcc Date: Fri Dec 29 19:54:39 2006 New Revision: 491164 URL: http://svn.apache.org/viewvc?view=rev&rev=491164 Log: The least risky approach to dealing with non-deterministic destroy() call ordering (SHALE-374) is to make the test case accept either order. We can review whether we want to guarantee a particular order in some future version.
Modified: shale/framework/trunk/shale-apps/shale-test-tiger/src/test/java/org/apache/shale/examples/test/tiger/systest/IntegrationTestCase.java shale/framework/trunk/shale-apps/shale-test-view/src/test/java/org/apache/shale/examples/test/view/systest/IntegrationTestCase.java Modified: shale/framework/trunk/shale-apps/shale-test-tiger/src/test/java/org/apache/shale/examples/test/tiger/systest/IntegrationTestCase.java URL: http://svn.apache.org/viewvc/shale/framework/trunk/shale-apps/shale-test-tiger/src/test/java/org/apache/shale/examples/test/tiger/systest/IntegrationTestCase.java?view=diff&rev=491164&r1=491163&r2=491164 ============================================================================== --- shale/framework/trunk/shale-apps/shale-test-tiger/src/test/java/org/apache/shale/examples/test/tiger/systest/IntegrationTestCase.java (original) +++ shale/framework/trunk/shale-apps/shale-test-tiger/src/test/java/org/apache/shale/examples/test/tiger/systest/IntegrationTestCase.java Fri Dec 29 19:54:39 2006 @@ -428,7 +428,12 @@ element = element("recorderEvents"); assertNotNull(element); - assertEquals("init1/prerender1/init2/prerender2/destroy2/destroy1/init1/preprocess1/init2/preprocess2/prerender1/", element.asText()); + if ("init1/prerender1/init2/prerender2/destroy2/destroy1/init1/preprocess1/init2/preprocess2/prerender1/".equals(element.asText()) + || "init1/prerender1/init2/prerender2/destroy1/destroy2/init1/preprocess1/init2/preprocess2/prerender1/".equals(element.asText())) { + ; // Expected result + } else { + fail("Bad subview lifecycle events sequence " + element.asText()); + } } Modified: shale/framework/trunk/shale-apps/shale-test-view/src/test/java/org/apache/shale/examples/test/view/systest/IntegrationTestCase.java URL: http://svn.apache.org/viewvc/shale/framework/trunk/shale-apps/shale-test-view/src/test/java/org/apache/shale/examples/test/view/systest/IntegrationTestCase.java?view=diff&rev=491164&r1=491163&r2=491164 ============================================================================== --- shale/framework/trunk/shale-apps/shale-test-view/src/test/java/org/apache/shale/examples/test/view/systest/IntegrationTestCase.java (original) +++ shale/framework/trunk/shale-apps/shale-test-view/src/test/java/org/apache/shale/examples/test/view/systest/IntegrationTestCase.java Fri Dec 29 19:54:39 2006 @@ -294,7 +294,12 @@ element = element("recorderEvents"); assertNotNull(element); - assertEquals("init1/prerender1/init2/prerender2/destroy2/destroy1/init1/preprocess1/init2/preprocess2/prerender1/", element.asText()); + if ("init1/prerender1/init2/prerender2/destroy2/destroy1/init1/preprocess1/init2/preprocess2/prerender1/".equals(element.asText()) + || "init1/prerender1/init2/prerender2/destroy1/destroy2/init1/preprocess1/init2/preprocess2/prerender1/".equals(element.asText())) { + ; // Expected result + } else { + fail("Bad subview lifecycle events sequence " + element.asText()); + } }