I put slashdot.org in my browser on that machine and it took quite a while to display but it did. I notice that the unit tests pause for quite a while on that test. I'm not sure why.

Anyway, I changed the 5 to 30 and it still fails. Should unit tests really be going to external resources?

Ralph

Joerg Heinicke wrote:
On 08.01.2008 23:23, Joerg Heinicke wrote:

But I am still getting 1 unit test failure in cocoon core - CachingSourceTestCase is failing on line 88. How could this possibly have anything to do with what I changed?

Since our Continuum build now runs successful it seems to be an issue with your environment.

Or - since it goes to a remote source - 5 s is just too short;

public void testCachingURI() throws Exception {
    String uri = "cached:http://slashdot.org/?cocoon:cache-expires=5";;

    CachingSource source;

    source = (CachingSource) resolver.resolveURI(uri);
    CachingSource.SourceMeta meta1 = source.getResponseMeta();
    resolver.release(source);

    source = (CachingSource) resolver.resolveURI(uri);
    CachingSource.SourceMeta meta2 = source.getResponseMeta();
    resolver.release(source);

    // Source is cached -- same meta data
    assertSame(meta1, meta2);

If this test fails reliably for you can you please try to increase the cache-expires parameter on the uri?

Joerg

Reply via email to