commit | 7855edc837c696bb06a626d63835b7c2df383a3f | [log] [tgz] |
---|---|---|
author | Ian <imaxon@uci.edu> | Mon Nov 03 18:46:07 2014 -0800 |
committer | Ian Maxon <imaxon@uci.edu> | Wed Nov 12 19:04:10 2014 -0800 |
tree | 0b702e5b12c14585e1b2068b402f9c5d1ec6aa39 | |
parent | 62b22d19d0c9c539b39579cc8ac8f0261caa93f4 [diff] |
Fix issue 138 Change-Id: I2a89bab76c25d6f0b499f7eb82434e6cea4faf81 Reviewed-on: http://fulliautomatix.ics.uci.edu:8443/163 Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu> Reviewed-by: Taewoo Kim <wangsaeu@gmail.com>
diff --git a/hyracks/hyracks-tests/hyracks-storage-common-test/src/test/java/edu/uci/ics/hyracks/storage/common/BufferCacheRegressionTest.java b/hyracks/hyracks-tests/hyracks-storage-common-test/src/test/java/edu/uci/ics/hyracks/storage/common/BufferCacheRegressionTest.java index ba1715f..05435fc 100644 --- a/hyracks/hyracks-tests/hyracks-storage-common-test/src/test/java/edu/uci/ics/hyracks/storage/common/BufferCacheRegressionTest.java +++ b/hyracks/hyracks-tests/hyracks-storage-common-test/src/test/java/edu/uci/ics/hyracks/storage/common/BufferCacheRegressionTest.java
@@ -20,6 +20,8 @@ import java.io.IOException; import java.nio.ByteBuffer; +import org.junit.After; +import org.junit.Before; import org.junit.Test; import edu.uci.ics.hyracks.api.context.IHyracksTaskContext; @@ -50,12 +52,22 @@ // 1. If the file being evicted was deleted, then its dirty pages should be // invalidated, but most not be flushed. // 2. If the file was not deleted, then we must flush its dirty pages. - @Test - public void testFlushBehaviorOnFileEviction() throws IOException { + @Before + public void setUp() throws IOException{ + resetState(); + } + @After + public void tearDown() throws IOException{ + resetState(); + } + private void resetState() throws IOException{ File f = new File(fileName); if (f.exists()) { f.delete(); } + } + @Test + public void testFlushBehaviorOnFileEviction() throws IOException { flushBehaviorTest(true); flushBehaviorTest(false); }