<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>134918</bug_id>
          
          <creation_ts>2014-07-14 23:03:05 -0700</creation_ts>
          <short_desc>DRT/WTR should clear the memory cache between tests</short_desc>
          <delta_ts>2015-08-05 10:33:01 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tools / Tests</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Simon Fraser (smfr)">simon.fraser</reporter>
          <assigned_to name="Antti Koivisto">koivisto</assigned_to>
          <cc>ap</cc>
    
    <cc>cdumez</cc>
    
    <cc>dino</cc>
    
    <cc>kling</cc>
    
    <cc>koivisto</cc>
    
    <cc>simon.fraser</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1022414</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2014-07-14 23:03:05 -0700</bug_when>
    <thetext>DRT doesn&apos;t seem to clear the memory cache between tests. I was trying to make a test that has window.internals.settings.setImageSubsamplingEnabled(true); and a ref test that does not, but the CachedImage was created by the test then just re-used by the reference, giving me a bogus pass.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1115016</commentid>
    <comment_count>1</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2015-08-05 09:03:28 -0700</bug_when>
    <thetext>Antti says:
I think that is a too big of a hammer. You can use internals.clearMemoryCache() if your test relies on empty memory cache.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1115023</commentid>
    <comment_count>2</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2015-08-05 09:20:16 -0700</bug_when>
    <thetext>I am personally in favor of this change. I will help reduce flakiness. I had to add internals.clearMemoryCache() calls at the beginning of 24 tests recently to make them not flaky, I don&apos;t think this is very scalable. We already disable PageCache during testing, I think it makes sense to make the MemoryCache opt-in as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1115024</commentid>
    <comment_count>3</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2015-08-05 09:21:49 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; I am personally in favor of this change. I will help reduce flakiness. I had
&gt; to add internals.clearMemoryCache() calls at the beginning of 24 tests
&gt; recently to make them not flaky, I don&apos;t think this is very scalable. We
&gt; already disable PageCache during testing, I think it makes sense to make the
&gt; MemoryCache opt-in as well.

I would also add that I wasted engineering time investigating the source of the flakiness until I was able to determine the reason was the memory cache. This WILL happen again and more people WILL waste time on this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1115030</commentid>
    <comment_count>4</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2015-08-05 09:31:35 -0700</bug_when>
    <thetext>Reopening.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1115032</commentid>
    <comment_count>5</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2015-08-05 09:38:12 -0700</bug_when>
    <thetext>One concern if that *may* make the tests substantially slower. We&apos;ll need to measure performance if we do this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1115047</commentid>
    <comment_count>6</comment_count>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2015-08-05 10:33:01 -0700</bug_when>
    <thetext>internals.clearMemoryCache is not to meant to be flakiness fix but used when a test actually relies on having a clear cache.

Doing it everywhere would slow down tests (no idea if enough to matter) and reduce implicit test coverage, moving testing further from real browser behavior in general.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>