jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1702049 - in /jmeter/trunk: src/core/org/apache/jmeter/save/SaveService.java test/src/org/apache/jmeter/save/TestSaveService.java
Date Wed, 09 Sep 2015 16:27:43 GMT
Author: sebb
Date: Wed Sep  9 16:27:43 2015
New Revision: 1702049

URL: http://svn.apache.org/r1702049
Log:
Do the comparison in the test case, so failures are identified better

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/save/SaveService.java
    jmeter/trunk/test/src/org/apache/jmeter/save/TestSaveService.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/save/SaveService.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/save/SaveService.java?rev=1702049&r1=1702048&r2=1702049&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/save/SaveService.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/save/SaveService.java Wed Sep  9 16:27:43 2015
@@ -177,13 +177,14 @@ public class SaveService {
     
     // Must match _version property value in saveservice.properties
     // used to ensure saveservice.properties and SaveService are updated simultaneously
-    private static final String PROPVERSION = "2.8";// Expected version $NON-NLS-1$
+    static final String PROPVERSION = "2.8";// Expected version $NON-NLS-1$
 
     // Internal information only
     private static String fileVersion = ""; // read from saveservice.properties file// $NON-NLS-1$
     // Must match Revision id value in saveservice.properties, 
     // used to ensure saveservice.properties and SaveService are updated simultaneously
-    private static final String FILEVERSION = "1700113"; // Expected value $NON-NLS-1$
+    static final String FILEVERSION = "1700113"; // Expected value $NON-NLS-1$
+
     private static String fileEncoding = ""; // read from properties file// $NON-NLS-1$
 
     static {
@@ -411,12 +412,12 @@ public class SaveService {
 //  }
 
     // Routines for TestSaveService
-    static boolean checkPropertyVersion(){
-        return SaveService.PROPVERSION.equals(SaveService.propertiesVersion);
+    static String getPropertyVersion(){
+        return SaveService.propertiesVersion;
     }
 
-    static boolean checkFileVersion(){
-        return SaveService.FILEVERSION.equals(SaveService.fileVersion);
+    static String getFileVersion(){
+        return SaveService.fileVersion;
     }
 
     // Allow test code to check for spurious class references

Modified: jmeter/trunk/test/src/org/apache/jmeter/save/TestSaveService.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/save/TestSaveService.java?rev=1702049&r1=1702048&r2=1702049&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/save/TestSaveService.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/save/TestSaveService.java Wed Sep  9 16:27:43
2015
@@ -74,9 +74,10 @@ public class TestSaveService extends JMe
     public TestSaveService(String name) {
         super(name);
     }
+
     public void testPropfile() throws Exception {
-        assertTrue("Property Version mismatch, ensure you update SaveService#PROPVERSION
field with _version property value from saveservice.properties", SaveService.checkPropertyVersion());
           
-        assertTrue("Property File Version mismatch, ensure you update SaveService#FILEVERSION
field with revision id of saveservice.properties", SaveService.checkFileVersion());
+        assertEquals("Property Version mismatch, ensure you update SaveService#PROPVERSION
field with _version property value from saveservice.properties", SaveService.PROPVERSION,
SaveService.getPropertyVersion());            
+        assertEquals("Property File Version mismatch, ensure you update SaveService#FILEVERSION
field with revision id of saveservice.properties", SaveService.FILEVERSION, SaveService.getFileVersion());
     }
     
     public void testVersions() throws Exception {



Mime
View raw message