On Fri, Apr 30, 2010 at 5:39 PM, Simon Laws <[email protected]> wrote: > On Fri, Apr 30, 2010 at 5:00 PM, ant elder <[email protected]> wrote: >> On Fri, Apr 30, 2010 at 4:36 PM, Simon Laws <[email protected]> >> wrote: >>> On Fri, Apr 30, 2010 at 4:27 PM, ant elder <[email protected]> wrote: >>>> On Fri, Apr 30, 2010 at 4:19 PM, Simon Laws <[email protected]> >>>> wrote: >>>>> I'm seeing the endpoint-hazelcast MultiRegTestCase failing. The test >>>>> is set up to start multiple registries and they are configured using a >>>>> DomainRegistryURI string. However the registry itself has been changed >>>>> to rely on properties now and ignores that string. Seems like the >>>>> tests need to be brought up to date? >>>>> >>>> >>>> What fails do you get? Its true that the testcase should be updated >>>> but as it is it use default settings and should still work - it is >>>> working for me and hudson. >>>> >>>> ...ant >>>> >>> >>> binding-hazelcast-rutime fails also but here's the endpoint-hazelcast >>> output... >>> >>> [INFO] Scanning for projects... >>> [INFO] >>> ------------------------------------------------------------------------ >>> [INFO] Building Apache Tuscany SCA EndPoint Registry using Hazelcast >>> [INFO] task-segment: [install] >>> [INFO] >>> ------------------------------------------------------------------------ >>> [INFO] [enforcer:enforce {execution: enforce-plugin-versions}] >>> [INFO] [resources:resources {execution: default-resources}] >>> [INFO] Using 'UTF-8' encoding to copy filtered resources. >>> [INFO] Copying 1 resource >>> [INFO] Copying 1 resource >>> [INFO] [compiler:compile {execution: default-compile}] >>> [INFO] Nothing to compile - all classes are up to date >>> [INFO] [resources:testResources {execution: default-testResources}] >>> [INFO] Using 'UTF-8' encoding to copy filtered resources. >>> [INFO] Copying 0 resource >>> [INFO] [compiler:testCompile {execution: default-testCompile}] >>> [INFO] Compiling 1 source file to >>> D:\sca-java-2.x\modules\endpoint-hazelcast\tar >>> get\test-classes >>> [INFO] [surefire:test {execution: default-test}] >>> [INFO] Surefire report directory: >>> D:\sca-java-2.x\modules\endpoint-hazelcast\tar >>> get\surefire-reports >>> >>> ------------------------------------------------------- >>> T E S T S >>> ------------------------------------------------------- >>> Running org.apache.tuscany.sca.endpoint.hazelcast.RegistryTestCase >>> Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.015 sec >>> Running org.apache.tuscany.sca.endpoint.hazelcast.MultiRegTestCase >>> Starting reg1 >>> 30-Apr-2010 16:34:37 com.hazelcast.system >>> INFO: [default] Hazelcast 1.8.3 (20100407) starting at >>> Address[9.146.153.241:148 >>> 20] >>> 30-Apr-2010 16:34:37 com.hazelcast.system >>> INFO: [default] Copyright (C) 2008-2010 Hazelcast.com >>> 30-Apr-2010 16:34:40 com.hazelcast.impl.Node >>> INFO: [default] >>> >>> >>> Members [1] { >>> Member [9.146.153.241:14820] this >>> } >>> >>> Adding ep1 >>> Starting reg3 >>> 30-Apr-2010 16:34:40 >>> org.apache.tuscany.sca.endpoint.hazelcast.HazelcastEndpoint >>> Registry addEndpoint >>> INFO: Add endpoint - (@17708501)Endpoint: URI = ep1uri >>> 30-Apr-2010 16:34:40 com.hazelcast.system >>> INFO: [default] Hazelcast 1.8.3 (20100407) starting at >>> Address[9.146.153.241:148 >>> 21] >>> 30-Apr-2010 16:34:40 com.hazelcast.system >>> INFO: [default] Copyright (C) 2008-2010 Hazelcast.com >>> 30-Apr-2010 16:34:42 com.hazelcast.impl.Node >>> INFO: [default] >>> >>> >>> Members [1] { >>> Member [9.146.153.241:14821] this >>> } >>> >>> Starting reg2 >>> 30-Apr-2010 16:34:42 com.hazelcast.system >>> INFO: [default] Hazelcast 1.8.3 (20100407) starting at >>> Address[9.146.153.241:148 >>> 22] >>> 30-Apr-2010 16:34:42 com.hazelcast.system >>> INFO: [default] Copyright (C) 2008-2010 Hazelcast.com >>> 30-Apr-2010 16:34:44 com.hazelcast.impl.Node >>> INFO: [default] >>> >>> >>> Members [1] { >>> Member [9.146.153.241:14822] this >>> } >>> >>> 30-Apr-2010 16:34:44 com.hazelcast.system >>> INFO: [default] Hazelcast 1.8.3 (20100407) starting at >>> Address[9.146.153.241:148 >>> 23] >>> 30-Apr-2010 16:34:44 com.hazelcast.system >>> INFO: [default] Copyright (C) 2008-2010 Hazelcast.com >>> 30-Apr-2010 16:34:46 com.hazelcast.impl.Node >>> INFO: [default] >>> >>> >>> Members [1] { >>> Member [9.146.153.241:14823] this >>> } >>> >>> 30-Apr-2010 16:34:46 >>> org.apache.tuscany.sca.endpoint.hazelcast.HazelcastEndpoint >>> Registry addEndpoint >>> INFO: Add endpoint - (@25358187)Endpoint: URI = ep1uri >>> 30-Apr-2010 16:34:47 com.hazelcast.system >>> INFO: [default] Hazelcast 1.8.3 (20100407) starting at >>> Address[9.146.153.241:148 >>> 24] >>> 30-Apr-2010 16:34:47 com.hazelcast.system >>> INFO: [default] Copyright (C) 2008-2010 Hazelcast.com >>> 30-Apr-2010 16:34:49 com.hazelcast.impl.Node >>> INFO: [default] >>> >>> >>> Members [1] { >>> Member [9.146.153.241:14824] this >>> } >>> >>> 30-Apr-2010 16:34:49 >>> org.apache.tuscany.sca.endpoint.hazelcast.HazelcastEndpoint >>> Registry addEndpoint >>> INFO: Add endpoint - (@25358187)Endpoint: URI = ep1uri >>> Tests run: 2, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 11.657 sec >>> <<< F >>> AILURE! >>> testReplication(org.apache.tuscany.sca.endpoint.hazelcast.MultiRegTestCase) >>> Tim >>> e elapsed: 7.188 sec <<< FAILURE! >>> java.lang.AssertionError: >>> at org.junit.Assert.fail(Assert.java:91) >>> at org.junit.Assert.assertTrue(Assert.java:43) >>> at org.junit.Assert.assertNotNull(Assert.java:524) >>> at org.junit.Assert.assertNotNull(Assert.java:535) >>> at >>> org.apache.tuscany.sca.endpoint.hazelcast.MultiRegTestCase.assertExis >>> ts(MultiRegTestCase.java:141) >>> at >>> org.apache.tuscany.sca.endpoint.hazelcast.MultiRegTestCase.testReplic >>> ation(MultiRegTestCase.java:69) >>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>> at >>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. >>> java:39) >>> at >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces >>> sorImpl.java:25) >>> at java.lang.reflect.Method.invoke(Method.java:597) >>> at >>> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(Framework >>> Method.java:44) >>> at >>> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCal >>> lable.java:15) >>> at >>> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMe >>> thod.java:41) >>> at >>> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMet >>> hod.java:20) >>> at >>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRun >>> ner.java:76) >>> at >>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRun >>> ner.java:50) >>> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) >>> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) >>> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) >>> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) >>> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) >>> at >>> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores. >>> java:28) >>> at org.junit.runners.ParentRunner.run(ParentRunner.java:236) >>> at >>> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet. >>> java:62) >>> at >>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTes >>> tSet(AbstractDirectoryTestSuite.java:140) >>> at >>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(Ab >>> stractDirectoryTestSuite.java:127) >>> at org.apache.maven.surefire.Surefire.run(Surefire.java:177) >>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>> at >>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. >>> java:39) >>> at >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces >>> sorImpl.java:25) >>> at java.lang.reflect.Method.invoke(Method.java:597) >>> at >>> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(Su >>> refireBooter.java:345) >>> at >>> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.j >>> ava:1009) >>> >>> testDuplicates(org.apache.tuscany.sca.endpoint.hazelcast.MultiRegTestCase) >>> Time >>> elapsed: 4.406 sec <<< FAILURE! >>> java.lang.AssertionError: >>> at org.junit.Assert.fail(Assert.java:91) >>> at org.junit.Assert.fail(Assert.java:98) >>> at >>> org.apache.tuscany.sca.endpoint.hazelcast.MultiRegTestCase.testDuplic >>> ates(MultiRegTestCase.java:124) >>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>> at >>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. >>> java:39) >>> at >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces >>> sorImpl.java:25) >>> at java.lang.reflect.Method.invoke(Method.java:597) >>> at >>> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(Framework >>> Method.java:44) >>> at >>> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCal >>> lable.java:15) >>> at >>> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMe >>> thod.java:41) >>> at >>> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMet >>> hod.java:20) >>> at >>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRun >>> ner.java:76) >>> at >>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRun >>> ner.java:50) >>> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) >>> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) >>> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) >>> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) >>> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) >>> at >>> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores. >>> java:28) >>> at org.junit.runners.ParentRunner.run(ParentRunner.java:236) >>> at >>> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet. >>> java:62) >>> at >>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTes >>> tSet(AbstractDirectoryTestSuite.java:140) >>> at >>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(Ab >>> stractDirectoryTestSuite.java:127) >>> at org.apache.maven.surefire.Surefire.run(Surefire.java:177) >>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>> at >>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. >>> java:39) >>> at >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces >>> sorImpl.java:25) >>> at java.lang.reflect.Method.invoke(Method.java:597) >>> at >>> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(Su >>> refireBooter.java:345) >>> at >>> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.j >>> ava:1009) >>> >>> >>> Results : >>> >>> Failed tests: >>> testReplication(org.apache.tuscany.sca.endpoint.hazelcast.MultiRegTestCase) >>> testDuplicates(org.apache.tuscany.sca.endpoint.hazelcast.MultiRegTestCase) >>> >>> Tests run: 3, Failures: 2, Errors: 0, Skipped: 1 >>> >>> [INFO] >>> ------------------------------------------------------------------------ >>> [ERROR] BUILD FAILURE >>> [INFO] >>> ------------------------------------------------------------------------ >>> [INFO] There are test failures. >>> >>> Please refer to >>> D:\sca-java-2.x\modules\endpoint-hazelcast\target\surefire-repor >>> ts for the individual test results. >>> >>> -- >>> Apache Tuscany committer: tuscany.apache.org >>> Co-author of a book about Tuscany and SCA: tuscanyinaction.com >>> >> >> It looks like the registries aren't finding each other, perhpas >> multicast doesn't work on the default address its using. Can you try >> adding this code to the init() method of the testcase: >> >> Properties ps = >> extensionPoints.getExtensionPoint(UtilityExtensionPoint.class).getUtility(RuntimeProperties.class).getProperties(); >> ps.setProperty("bind", "*"); >> >> and also try 127.0.0.1 instead of * as the bind property value, and >> see what those do? >> >> ...ant >> > > Ah ha * does the trick. Thanks Ant. > > I'll shortly check in a temporary change to RegistryConfig so that it > doesn't go off looking for an address in case anyone else is struck. > > On my machine, without a bind property, it picks up the VPN adapter I > have and doesn't work. With the bind property it picks up my local > adapter and does work. So multicast doesn't work on the VPN and/or the > firewall is getting in the way. So maybe in the real world we'd > configure it to use the appropriate adapter but we should have a > default that works in most cases if we can. I've seen the comment next > to > chooseLocalAddress() so I see why it's doing what it does currently. > What's the implication of the "*"? >
It only works with * on you machine by chance as with * its just picking the first it finds which just happens to work on you machine but doesn't on others. I'll update the testcase to use 127.0.0.1 but I'm not sure change the registry to by default just pick one is better than choosing a specific one like it does now. Would be interesting to find why the vpn one isn't working for you as it does for me, and we use the same vpn don't we? ...ant
