-
Notifications
You must be signed in to change notification settings - Fork 9.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a test case about "Conform lockingSourceCount is correct" #6490
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
activar stripe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello dear
How is collect
This should now be cleanly reproducible via Okio file system See
Do you want to update the test and I'll take a look? |
hello, do I need fork the latest version and then pull request again? |
update from latest version
Add a test case about "Conform lockingSourceCount is correct" square#6490
I think it has been updated,please check it. @yschimke |
@swankjesse any opinion on this test? I'm assuming that DiskLruCache.Snapshot, which is closeable, should have a checkNotClosed() method, and fail fast if you try to use it after closing it. But it breaks a bunch of other tests. Using the snapshot sources will fail as they are closed, but the editor effectively reanimates them. |
@yschimke yeah that reads to me like a small bug? The snapshot should not be used after it is closed, though I think there's a valid use case to using a snapshot after it's enclosing cache is closed. This class isn't public API so we can improve it's behavior where that’s useful. But we don't really need to be super aggressive about enforcing invariants unless we're worried we might inadvertently violate them. |
Going to close this one out unless we can reproduce with a test case using public API. We can fix this, but it likely just incurs a tiny performance hit on each cache usage. |
just add a failing test case for #6363 so so you can fix it.