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(); |