mirror of
https://github.com/internetarchive/heritrix3.git
synced 2026-11-15 10:20:47 +00:00
Improve test robustness in face of unpredictable GC
* ObjectIdentityBdbCache.java (pageOutStaleEntries) package-protection for unit-test visibility * ObjectIdentityBdbCacheTest.java explicit pageOutStaleEntries, better assert-fail message
This commit is contained in:
1 parent
5a0fe30366
commit
1951930842
2 files changed
+8
-5
No files matched your search
@@ -394,9 +394,11 @@ implements ObjectIdentityCache<String, V>, Closeable, Serializable {
|
||||
}
|
||||
|
||||
/** An incremental, poll-based expunger.
|
||||
*
|
||||
* Package-protected for unit-test visibility.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
private synchronized void pageOutStaleEntries() {
|
||||
synchronized void pageOutStaleEntries() {
|
||||
int c = 0;
|
||||
long startTime = System.currentTimeMillis();
|
||||
for(SoftEntry<V> entry; (entry = (SoftEntry<V>)refQueue.poll()) != null;) {
|
||||
|
||||
Reference in new issue
Block a user