• Bug
  • Status: Closed
  • 0 Showstopper
  • Resolution: Fixed
  • ehcache-core
  • kkannaiy
  • Reporter:
  • October 20, 2009
  • 0
  • Watchers: 1
  • January 17, 2013
  • November 12, 2009

Description

This is a core bug.

ehcache-web SimpleCachingHeadersPageCachingFilterTest.testCachedPageConcurrent() is broken by 1.7.0.

It works with 1.6.2, therefore 1.7.0 core is the cause.

Comments

gluck 2009-10-20

Note: You run the test suite in ehcache-web with: mvn -Ptest -Denv=test install

Alex Miller 2009-10-29

I did a little forensics on this in the monkey data. There were two failures of this in the monkeys: 10/21/09 - su10fm0 10/24/09 - w2k3vfm0

I see identical looking failures around then from testFromJSPForward as well.

Assertion failure is: java.lang.Exception: Test thread failed. at net.sf.ehcache.constructs.web.AbstractWebTest.runThreads(AbstractWebTest.java:349) at net.sf.ehcache.constructs.web.filter.CachingFilterTest.testCachedPageConcurrent(CachingFilterTest.java:258) Caused by: java.lang.AssertionError: expected:<200> but was:<-1> at org.junit.Assert.fail(Assert.java:69) at org.junit.Assert.failNotEquals(Assert.java:314) at org.junit.Assert.assertEquals(Assert.java:94) at org.junit.Assert.assertEquals(Assert.java:104) at net.sf.ehcache.constructs.web.AbstractWebTest.assertResponseOk(AbstractWebTest.java:183) at net.sf.ehcache.constructs.web.AbstractWebTest.assertResponseGood(AbstractWebTest.java:167) at net.sf.ehcache.constructs.web.AbstractWebTest.assertResponseGoodAndCached(AbstractWebTest.java:274) at net.sf.ehcache.constructs.web.filter.CachingFilterTest.testCachedPageIsCached(CachingFilterTest.java:76) at net.sf.ehcache.constructs.web.filter.CachingFilterTest$1.execute(CachingFilterTest.java:253) at net.sf.ehcache.constructs.web.AbstractWebTest$1.run(AbstractWebTest.java:329)

Log has this as well:

WARNING: Throwable thrown during doFilter on request with URI: /legaldispatchtocachedpage/Include.jsp and Query: nullFailure when attempting to set Content-Encoding: gzip
net.sf.ehcache.constructs.web.ResponseHeadersNotModifiableException: Failure when attempting to set Content-Encoding: gzip
at net.sf.ehcache.constructs.web.ResponseUtil.addGzipHeader(ResponseUtil.java:128)
at net.sf.ehcache.constructs.web.filter.CachingFilter.writeContent(CachingFilter.java:424)
at net.sf.ehcache.constructs.web.filter.CachingFilter.writeResponse(CachingFilter.java:297)
at net.sf.ehcache.constructs.web.filter.CachingFilter.doFilter(CachingFilter.java:196)
at net.sf.ehcache.constructs.web.filter.Filter.doFilter(Filter.java:92)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at org.mortbay.jetty.servlet.Dispatcher.include(Dispatcher.java:192)
at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:997)
at org.apache.jsp.legaldispatchtocachedpage.Include\_jsp.\_jspService(org.apache.jsp.legaldispatchtocachedpage.Include\_jsp:45)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:93)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:470)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:364)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:829)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)

gluck 2009-11-12

This got fixed along the line in core 1.7.1-SNAPSHOT. Not sure when because the test was @Ignored. There was probably an underlying issue in core concurrency causing the problem. Anyway all good now and test is Unignored so if it comes back we will know.