geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject geode git commit: GEODE-3050: prevent empty dat files
Date Wed, 07 Jun 2017 23:58:37 GMT
Repository: geode
Updated Branches:
  refs/heads/feature/GEODE-3050 [created] 596d82af1


GEODE-3050: prevent empty dat files

Move creation of dat files to test methods to avoid overwriting
full dat file from other test.


Project: http://git-wip-us.apache.org/repos/asf/geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/geode/commit/596d82af
Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/596d82af
Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/596d82af

Branch: refs/heads/feature/GEODE-3050
Commit: 596d82af1dd66329ccadb178e86a7400d8e40b4d
Parents: d73fa3c
Author: Kirk Lund <klund@apache.org>
Authored: Wed Jun 7 16:55:54 2017 -0700
Committer: Kirk Lund <klund@apache.org>
Committed: Wed Jun 7 16:55:54 2017 -0700

----------------------------------------------------------------------
 .../AnalyzeSerializablesJUnitTest.java             | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/596d82af/geode-core/src/test/java/org/apache/geode/codeAnalysis/AnalyzeSerializablesJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/codeAnalysis/AnalyzeSerializablesJUnitTest.java
b/geode-core/src/test/java/org/apache/geode/codeAnalysis/AnalyzeSerializablesJUnitTest.java
index dc73f04..d13afc7 100644
--- a/geode-core/src/test/java/org/apache/geode/codeAnalysis/AnalyzeSerializablesJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/codeAnalysis/AnalyzeSerializablesJUnitTest.java
@@ -89,11 +89,6 @@ public class AnalyzeSerializablesJUnitTest {
 
     this.expectedSerializables = loadClassesAndVariables(expectedSerializablesFile);
     Collections.sort(this.expectedSerializables);
-
-    // setup empty actual files
-
-    this.actualDataSerializablesFile = createEmptyFile("actualDataSerializables.dat");
-    this.actualSerializablesFile = createEmptyFile("actualSerializables.dat");
   }
 
   /**
@@ -107,12 +102,16 @@ public class AnalyzeSerializablesJUnitTest {
   public void testDataSerializables() throws Exception {
     System.out.println(this.testName.getMethodName() + " starting");
 
+    this.actualDataSerializablesFile = createEmptyFile("actualDataSerializables.dat");
+    System.out.println(this.testName.getMethodName() + " actualDataSerializablesFile="
+        + this.actualDataSerializablesFile.getAbsolutePath());
+
     List<ClassAndMethods> actualDataSerializables = findToDatasAndFromDatas();
     storeClassesAndMethods(actualDataSerializables, this.actualDataSerializablesFile);
 
     String diff =
         diffSortedClassesAndMethods(this.expectedDataSerializables, actualDataSerializables);
-    if (diff.length() > 0) {
+    if (true || diff.length() > 0) {
       System.out.println(
           "++++++++++++++++++++++++++++++testDataSerializables found discrepancies++++++++++++++++++++++++++++++++++++");
       System.out.println(diff);
@@ -128,11 +127,15 @@ public class AnalyzeSerializablesJUnitTest {
   public void testSerializables() throws Exception {
     System.out.println(this.testName.getMethodName() + " starting");
 
+    this.actualSerializablesFile = createEmptyFile("actualSerializables.dat");
+    System.out.println(this.testName.getMethodName() + " actualSerializablesFile="
+        + this.actualSerializablesFile.getAbsolutePath());
+
     List<ClassAndVariables> actualSerializables = findSerializables();
     storeClassesAndVariables(actualSerializables, this.actualSerializablesFile);
 
     String diff = diffSortedClassesAndVariables(this.expectedSerializables, actualSerializables);
-    if (diff.length() > 0) {
+    if (true || diff.length() > 0) {
       System.out.println(
           "++++++++++++++++++++++++++++++testSerializables found discrepancies++++++++++++++++++++++++++++++++++++");
       System.out.println(diff);


Mime
View raw message