cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject [1/2] git commit: updated refs/heads/4.6 to b14dfca
Date Thu, 10 Dec 2015 15:21:45 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.6 3515f574c -> b14dfca82


Adapted HypervisorUtilsTest to no longer give false positives


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/132c3563
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/132c3563
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/132c3563

Branch: refs/heads/4.6
Commit: 132c35639bd581f3855b53e204c88ede0f75f20f
Parents: 6d3fffa
Author: Nick Livens <nick.livens@nuagenetworks.net>
Authored: Mon Dec 7 16:04:41 2015 +0100
Committer: Nick Livens <nick.livens@nuagenetworks.net>
Committed: Tue Dec 8 08:12:58 2015 +0100

----------------------------------------------------------------------
 .../cloudstack/utils/hypervisor/HypervisorUtilsTest.java  | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/132c3563/utils/src/test/java/org/apache/cloudstack/utils/hypervisor/HypervisorUtilsTest.java
----------------------------------------------------------------------
diff --git a/utils/src/test/java/org/apache/cloudstack/utils/hypervisor/HypervisorUtilsTest.java
b/utils/src/test/java/org/apache/cloudstack/utils/hypervisor/HypervisorUtilsTest.java
index 3b13c6b..54d002f 100644
--- a/utils/src/test/java/org/apache/cloudstack/utils/hypervisor/HypervisorUtilsTest.java
+++ b/utils/src/test/java/org/apache/cloudstack/utils/hypervisor/HypervisorUtilsTest.java
@@ -42,9 +42,8 @@ public class HypervisorUtilsTest {
         int timeoutSeconds = 5;
         long thresholdMilliseconds = 2000;
         File file = new File(filePath);
-        setupcheckVolumeFileForActivityFile(file, 0);
 
-        long startTime = System.currentTimeMillis();
+        long startTime = setupcheckVolumeFileForActivityFile(file, 0);
         HypervisorUtils.checkVolumeFileForActivity(filePath, timeoutSeconds, thresholdMilliseconds,
_minFileSize);
         long endTime = System.currentTimeMillis();
 
@@ -61,9 +60,8 @@ public class HypervisorUtilsTest {
         int timeoutSeconds = 5;
         long thresholdMilliseconds = 2000;
         File file = new File(filePath);
-        setupcheckVolumeFileForActivityFile(file, _minFileSize);
 
-        long startTime = System.currentTimeMillis();
+        long startTime = setupcheckVolumeFileForActivityFile(file, _minFileSize);
         HypervisorUtils.checkVolumeFileForActivity(filePath, timeoutSeconds, thresholdMilliseconds,
_minFileSize);
         long duration = System.currentTimeMillis() - startTime;
 
@@ -93,7 +91,7 @@ public class HypervisorUtilsTest {
         System.out.println("Fail");
     }
 
-    private void setupcheckVolumeFileForActivityFile(File file, long minSize) throws IOException
{
+    private long setupcheckVolumeFileForActivityFile(File file, long minSize) throws IOException
{
         if (file.exists()) {
             file.delete();
         }
@@ -106,6 +104,8 @@ public class HypervisorUtilsTest {
             writer.write(chars);
             written += chars.length;
         }
+        long creationTime = System.currentTimeMillis();
         writer.close();
+        return creationTime;
     }
 }


Mime
View raw message