Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/BaseFilterEngineTest.java

Issue 29536604: Issue 5556 - Update to use libadblockplus revision hg:566f64c8a2a8 (Closed) Base URL: github.com:abby-sergz/libadblockplus-android.git
Patch Set: address comment Created Sept. 7, 2017, 12:54 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/BaseFilterEngineTest.java
diff --git a/libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/FilterEngineGenericTest.java b/libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/BaseFilterEngineTest.java
similarity index 73%
rename from libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/FilterEngineGenericTest.java
rename to libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/BaseFilterEngineTest.java
index 9fe3cbaeb9e77ae32a25086e2ba8aa03624327eb..49e61f85029901d27841b156fa6283d28d0f6864 100644
--- a/libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/FilterEngineGenericTest.java
+++ b/libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/BaseFilterEngineTest.java
@@ -21,7 +21,7 @@ import org.adblockplus.libadblockplus.FilterEngine;
import org.adblockplus.libadblockplus.LazyWebRequest;
import org.adblockplus.libadblockplus.WebRequest;
-public abstract class FilterEngineGenericTest extends BaseJsTest
+public abstract class BaseFilterEngineTest extends BaseJsEngineTest
{
protected FilterEngine filterEngine;
@@ -33,6 +33,23 @@ public abstract class FilterEngineGenericTest extends BaseJsTest
}
@Override
+ protected void tearDown() throws Exception
+ {
+ disposeFilterEngine();
+ super.tearDown();
+ }
+
+ protected void disposeFilterEngine() throws InterruptedException
+ {
+ if (filterEngine != null)
+ {
+ Thread.sleep(200); // let FS finish its operations
+ filterEngine.dispose();
+ filterEngine = null;
+ }
+ }
+
+ @Override
protected WebRequest createWebRequest()
{
return new LazyWebRequest();

Powered by Google App Engine
This is Rietveld