You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by im...@apache.org on 2015/04/24 20:46:24 UTC
[57/85] [abbrv] incubator-asterixdb-hyracks git commit: Fix issue 138
Fix issue 138
Change-Id: I2a89bab76c25d6f0b499f7eb82434e6cea4faf81
Reviewed-on: http://fulliautomatix.ics.uci.edu:8443/163
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: Taewoo Kim <wa...@gmail.com>
Project: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-hyracks/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-hyracks/commit/7855edc8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-hyracks/tree/7855edc8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-hyracks/diff/7855edc8
Branch: refs/heads/master
Commit: 7855edc837c696bb06a626d63835b7c2df383a3f
Parents: 62b22d1
Author: Ian <im...@uci.edu>
Authored: Mon Nov 3 18:46:07 2014 -0800
Committer: Ian Maxon <im...@uci.edu>
Committed: Wed Nov 12 19:04:10 2014 -0800
----------------------------------------------------------------------
.../storage/common/BufferCacheRegressionTest.java | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-hyracks/blob/7855edc8/hyracks/hyracks-tests/hyracks-storage-common-test/src/test/java/edu/uci/ics/hyracks/storage/common/BufferCacheRegressionTest.java
----------------------------------------------------------------------
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.File;
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 @@ public class BufferCacheRegressionTest {
// 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);
}