jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1775166 - in /jmeter/trunk: src/core/org/apache/jmeter/save/SaveService.java test/src/org/apache/jmeter/save/TestSaveService.java
Date Mon, 19 Dec 2016 20:02:02 GMT
Author: pmouawad
Date: Mon Dec 19 20:02:02 2016
New Revision: 1775166

URL: http://svn.apache.org/viewvc?rev=1775166&view=rev
Log:
Drop comment code
Drop useless test
Drop dead code

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=1775166&r1=1775165&r2=1775166&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/save/SaveService.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/save/SaveService.java Mon Dec 19 20:02:02 2016
@@ -371,23 +371,6 @@ public class SaveService {
         writer.write('\n');
     }
 
-    private static boolean versionsOK = true;
-
-//  private static void checkVersion(Class clazz, String expected) {
-//
-//      String actual = "*NONE*"; // $NON-NLS-1$
-//      try {
-//          actual = (String) clazz.getMethod("getVersion", null).invoke(null, null);
-//          actual = extractVersion(actual);
-//      } catch (Exception ignored) {
-//          // Not needed
-//      }
-//      if (0 != actual.compareTo(expected)) {
-//          versionsOK = false;
-//          log.warn("Version mismatch: expected '" + expected + "' found '" + actual + "'
in " + clazz.getName());
-//      }
-//  }
-
     // Routines for TestSaveService
     static String getPropertyVersion(){
         return SaveService.propertiesVersion;
@@ -416,42 +399,10 @@ public class SaveService {
         return missingClasses;
     }
 
-    static boolean checkVersions() {
-        versionsOK = true;
-        // Disable converter version checks as they are more of a nuisance than helpful
-//      checkVersion(BooleanPropertyConverter.class, "493779"); // $NON-NLS-1$
-//      checkVersion(HashTreeConverter.class, "514283"); // $NON-NLS-1$
-//      checkVersion(IntegerPropertyConverter.class, "493779"); // $NON-NLS-1$
-//      checkVersion(LongPropertyConverter.class, "493779"); // $NON-NLS-1$
-//      checkVersion(MultiPropertyConverter.class, "514283"); // $NON-NLS-1$
-//      checkVersion(SampleResultConverter.class, "571992"); // $NON-NLS-1$
-//
-//        // Not built until later, so need to use this method:
-//        try {
-//            checkVersion(
-//                    Class.forName("org.apache.jmeter.protocol.http.util.HTTPResultConverter"),
// $NON-NLS-1$
-//                    "514283"); // $NON-NLS-1$
-//        } catch (ClassNotFoundException e) {
-//            versionsOK = false;
-//            log.warn(e.getLocalizedMessage());
-//        }
-//      checkVersion(StringPropertyConverter.class, "493779"); // $NON-NLS-1$
-//      checkVersion(TestElementConverter.class, "549987"); // $NON-NLS-1$
-//      checkVersion(TestElementPropertyConverter.class, "549987"); // $NON-NLS-1$
-//      checkVersion(ScriptWrapperConverter.class, "514283"); // $NON-NLS-1$
-//      checkVersion(TestResultWrapperConverter.class, "514283"); // $NON-NLS-1$
-//        checkVersion(SampleSaveConfigurationConverter.class,"549936"); // $NON-NLS-1$
-
+    private static void checkVersions() {
         if (!PROPVERSION.equalsIgnoreCase(propertiesVersion)) {
             log.warn("Bad _version - expected " + PROPVERSION + ", found " + propertiesVersion
+ ".");
         }
-//        if (!FILEVERSION.equalsIgnoreCase(fileVersion)) {
-//            log.warn("Bad _file_version - expected " + FILEVERSION + ", found " + fileVersion
+".");
-//        }
-        if (versionsOK) {
-            log.info("All converter versions present and correct");
-        }
-        return versionsOK;
     }
 
     /**

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=1775166&r1=1775165&r2=1775166&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/save/TestSaveService.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/save/TestSaveService.java Mon Dec 19 20:02:02
2016
@@ -93,11 +93,6 @@ public class TestSaveService extends JMe
     public void testPropfile2() throws Exception {
         assertEquals("Property File Version mismatch, ensure you update SaveService#FILEVERSION
field with sha1 of saveservice.properties without newline", SaveService.FILEVERSION, SaveService.getFileVersion());
     }
-    
-    @Test
-    public void testVersions() throws Exception {
-        assertTrue("Unexpected version found", SaveService.checkVersions());
-    }
 
     @Test
     public void testLoadAndSave() throws Exception {



Mime
View raw message