Permalink
Browse files

matthieu's checkpointing test fix: adding AbstractPE.keyValueString a…

…s part of reference PE, because keyValueString was set as checkpointable in a recent commit
  • Loading branch information...
1 parent bca594c commit 45efb827d6a33d41e8db89bf4ecc842feda5d406 Bruce Robbins committed Nov 29, 2011
Showing with 7 additions and 0 deletions.
  1. +7 −0 s4-core/src/test/java/org/apache/s4/ft/CheckpointingTest.java
@@ -1,5 +1,6 @@
package org.apache.s4.ft;
+import org.apache.s4.processor.AbstractPE;
import org.apache.s4.serialize.KryoSerDeser;
import java.io.File;
@@ -93,6 +94,12 @@ public void testCheckpointStorage() throws Exception {
StatefulTestPE refPE = new StatefulTestPE();
refPE.setValue1("message1");
+
+ // NOTE since commit cf685ab080870764d5aee4037587ebe918ce890b keyValueString is also checkpointed,
+ // therefore we must set it so that it is included in checkpointed data
+ Field keyValueStringField = AbstractPE.class.getDeclaredField("keyValueString");
+ keyValueStringField.setAccessible(true);
+ keyValueStringField.set(refPE, "value");
refPE.setId("statefulPE");
refPE.setKeys(new String[] {});
KryoSerDeser kryoSerDeser = new KryoSerDeser();

0 comments on commit 45efb82

Please sign in to comment.