Closed Bug 822121 Opened 12 years ago Closed 11 years ago

Test failure "There is no disk storage in use - '2101248' should equal '0'" in testPrivateBrowsing/testAboutCache.js

Categories

(Mozilla QA Graveyard :: Mozmill Tests, defect, P2)

defect

Tracking

(firefox20 fixed, firefox21 fixed)

RESOLVED FIXED
Tracking Status
firefox20 --- fixed
firefox21 --- fixed

People

(Reporter: AndreeaMatei, Assigned: AndreeaMatei)

References

()

Details

(Whiteboard: [mozmill-test-failure] s=130107 u=failure c=private_browsing p=1)

This happens with the new PB mode in Nightly, over platforms. The thing is the disk storage is different from a failure to another, seems the evictEntries() doesn't work as expected now.
Whiteboard: [mozmill-test-failure]
Is that a regression introduced with the new pb mode? Ehsan or Josh, something you could already comment on?
Priority: -- → P2
With per-window private browsing enabled, the disk cache is allowed to have a non-zero size. I know nothing more about the test, so I can't give any other effective comments at this time.
(In reply to Josh Matthews [:jdm] from comment #2)
> With per-window private browsing enabled, the disk cache is allowed to have
> a non-zero size. I know nothing more about the test, so I can't give any
> other effective comments at this time.

Josh, we were working together on this test on bug 789987. So we would love to get feedback about the right behavior of memory and disk caches.
Flags: needinfo?(josh)
I think you'll need to be more specific about what feedback you're looking for. As I recall, we broke down bug 789987 into pretty well-specified steps in regards to the expected behaviour of the caches.
Flags: needinfo?(josh)
(In reply to Josh Matthews [:jdm] from comment #4)
> I think you'll need to be more specific about what feedback you're looking
> for.

Hm, actually not sure what you are asking for here. What we have to know is the updated behavior of disk and memory caches regarding per the new window private-browsing mode - what this bug is about and you have commented earlier on.
The disk cache has no size constraints during or after testing; we only care that it doesn't not contain any entries that expose URLs visited in a private session. The memory cache should be 0 immediately after the last-pb-context-exited notification occurs.
(In reply to Josh Matthews [:jdm] from comment #6)
> private session. The memory cache should be 0 immediately after the
> last-pb-context-exited notification occurs.

Which means that we should at best open two pb windows to test that. So we can check that items are still existent after the first pb window gets closed and all are removed when the second window is closed. If you agree with that we are good to go ahead. Thanks!
This will be fixed by Alex work on bug 818456.
Depends on: 818456
Josh, can we hash out the right steps to do in the test now? It's not fully clear to me. Would we still need it in terms of any other added Mochitest for this new feature? If that's still the case can you please reorder the steps so it would make sense?

* Clear caches
* Check that caches don't have entries from the test pages
* Open Private Browsing Window
* Navigate to different pages
* Check that disk cache has no entries for the visited pages while the memory cache contains entries
* Open another Private Browsing window
* Close the first Private Browsing window
* Check that the memory cache still has entries for the visited pages
* Close the second Private Browsing window
* Check that the memory cache hasn't entries for the visited pages

Thanks
I don't really see the value of opening two private windows and checking that there are still cache entries after closing one of them.

* clear caches
* open private window
* navigate to test pages
* check disk cache has no entries for visited pages (there's no need to assert anything about the memory cache)
* close private window
* check that memory cache is empty

I don't see any advantage to making it more complicated than that.
(In reply to Josh Matthews [:jdm] from comment #10)
> I don't really see the value of opening two private windows and checking
> that there are still cache entries after closing one of them.

So i probablly misunderstood the following comment you gave in comment 6:

The memory cache should be 0 immediately after the last-pb-context-exited notification occurs.


Thanks for clarifying.
Josh, the error in the summary appears before opening a new PB window, we clear all cache in setupModule() through evictEntries() and assert that disk entries and disk size is 0.
But it appears disk size doesn't get cleared. Is this an expected behavior or just in PB and after closing the PB window there are no restrains to disk size?
Hmm, I'm surprised by that. You could try waiting for the cacheservice:empty-cache notification before continuing and see if that makes a difference.
Josh, I found bug 808997 has caused this, with the builds until 15th this test worked, started to fail on 16th when that patch was added.
I will check that notification as well.
That being said, I'm actually inclined not to bother which checking the reported totalSize of the cache. The fact that it reports zero entries is what matters, and that seems to always pass.
> * check disk cache has no entries for visited pages (there's no need to
> assert anything about the memory cache)
> * close private window
> * check that memory cache is empty

Josh, shouldn't we check for the disk entries not containing the visited pages in PB again after exiting PB? Besides checking for the memory cache to be empty.
Sure, that ordering probably makes more sense.
Whiteboard: [mozmill-test-failure] → [mozmill-test-failure] s=130107 u=failure c=addons p=1
Whiteboard: [mozmill-test-failure] s=130107 u=failure c=addons p=1 → [mozmill-test-failure] s=130107 u=failure c=private_browsing p=1
Assignee: nobody → andreea.matei
Status: NEW → ASSIGNED
This stopped failing 2 weeks ago, along with the other dependencies of bug 822188.
Because this test has been skipped for now as per bug 818456.
Whiteboard: [mozmill-test-failure] s=130107 u=failure c=private_browsing p=1 → [mozmill-test-failure][mozmill-test-skipped] s=130107 u=failure c=private_browsing p=1
Lets continue on this bug so we can re-enable this test again.
It's not reproducing anymore, the test is enabled now. Since Josh said in comment 2 and 15 that disk size cache has no constrains anymore, this was fixed in bug 818456.
Thanks. Updating status of this bug to reflect the reality.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [mozmill-test-failure][mozmill-test-skipped] s=130107 u=failure c=private_browsing p=1 → [mozmill-test-failure] s=130107 u=failure c=private_browsing p=1
Product: Mozilla QA → Mozilla QA Graveyard
You need to log in before you can comment on or make changes to this bug.