On 15 April 2012 13:36, Lewis John Mcgibbney <[email protected]>wrote:
> Hi Guys, > > Any23 trunk ships with quite a few of these tests, where we actively rely > on live sites... a workaround would be to ship with the html page in a > conf/ or /resources directory. I've moni9tored builds for some time and in > the past we've regularly seen CI builds fail because certain live pages are > not available for any number of reasons. > WDYT? > Some tests require complex resources like a web server to be performed: the crawler needs a full site, some tests perform assertions on HTTP requests, that's why we relied for that tests on external resources. For this reason we introduced org.apache.any23.Any23OnlineTestBase which defines a "any23.online.test.disabled" that allow to disable online tests passing a system property. Any improvement to smooth this problem is welcome! Mic > > Lewis > > On Sun, Apr 15, 2012 at 10:26 AM, Michele Mostarda < > [email protected]> wrote: > > > On 13 April 2012 23:08, Simone Tripodi <[email protected]> wrote: > > > > > Hi all guys, > > > > > > running the integration tests I stumbled in the erro below - does > > > anybody already have an idea how to fix it? > > > TIA, all the best! > > > > > > > Hi Simo, > > > > the test simply runs the crawler over a site for 10 seconds > > collecting the more tiples as possible, then stops and asserts to have > > collected at least one triple. > > This means that if there is a delay in site access the test could fail. > > Any suggestion to reduce the weakness of this test would be appreciated. > > > > Mic > > > > > > > > > -Simo > > > > > > > > > > > > ------------------------------------------------------------------------------- > > > Test set: org.apache.any23.cli.CrawlerTest > > > > > > > > > ------------------------------------------------------------------------------- > > > Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 11.607 > > > sec <<< FAILURE! > > > testCLI(org.apache.any23.cli.CrawlerTest) Time elapsed: 11.232 sec > > > <<< FAILURE! > > > java.lang.AssertionError > > > at org.junit.Assert.fail(Assert.java:92) > > > at org.junit.Assert.assertTrue(Assert.java:43) > > > at org.junit.Assert.assertTrue(Assert.java:54) > > > at org.apache.any23.cli.CrawlerTest.testCLI(CrawlerTest.java:92) > > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > > at > > > > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > > > at > > > > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > > > at java.lang.reflect.Method.invoke(Method.java:597) > > > at > > > > > > org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45) > > > at > > > > > > org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) > > > at > > > > > > org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42) > > > at > > > > > > org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) > > > at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) > > > at > > > > > > org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68) > > > at > > > > > > org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47) > > > at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) > > > at > org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) > > > at > > org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) > > > at > org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) > > > at > > org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) > > > at org.junit.runners.ParentRunner.run(ParentRunner.java:300) > > > at > > > > > > org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53) > > > at > > > > > > org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123) > > > at > > > > > > org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104) > > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > > at > > > > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > > > at > > > > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > > > at java.lang.reflect.Method.invoke(Method.java:597) > > > at > > > > > > org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164) > > > at > > > > > > org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110) > > > at > > > > > > org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:172) > > > at > > > > > > org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:78) > > > at > > > > org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:70) > > > > > > http://people.apache.org/~simonetripodi/ > > > http://simonetripodi.livejournal.com/ > > > http://twitter.com/simonetripodi > > > http://www.99soft.org/ > > > > > > > > > > > -- > > Michele Mostarda > > Senior Software Engineer > > skype: michele.mostarda > > twitter: micmos > > mail: [email protected] > > site : http://www.michelemostarda.com > > > > > > -- > *Lewis* > -- Michele Mostarda Senior Software Engineer skype: michele.mostarda twitter: micmos mail: [email protected] site : http://www.michelemostarda.com
