You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@slider.apache.org by st...@apache.org on 2014/06/30 17:37:20 UTC

[31/50] [abbrv] git commit: SLIDER-160: move test for file existence into upload method; now covers all source files

SLIDER-160: move test for file existence into upload method; now covers all source files


Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/eba97da0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/eba97da0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/eba97da0

Branch: refs/heads/feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it
Commit: eba97da01765ecf924d0a4f672e8ffd2474b7464
Parents: 5464584
Author: Steve Loughran <st...@apache.org>
Authored: Tue Jun 24 17:42:36 2014 -0700
Committer: Steve Loughran <st...@apache.org>
Committed: Tue Jun 24 17:42:36 2014 -0700

----------------------------------------------------------------------
 .../org/apache/slider/funtest/framework/AgentUploads.groovy       | 2 --
 .../org/apache/slider/funtest/framework/FileUploader.groovy       | 3 +++
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/eba97da0/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/AgentUploads.groovy
----------------------------------------------------------------------
diff --git a/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/AgentUploads.groovy b/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/AgentUploads.groovy
index 5f10c0e..3570183 100644
--- a/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/AgentUploads.groovy
+++ b/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/AgentUploads.groovy
@@ -48,8 +48,6 @@ class AgentUploads implements FuntestProperties {
    */
   def uploadAgentFiles(File tarballDir, boolean force) {
     def localAgentTar = new File(tarballDir, AGENT_SLIDER_GZ_IN_SLIDER_TAR)
-    assert localAgentTar.exists()
-
     def agentTarballPath = new Path(
         homeDir,
         AGENT_TAR_FILENAME)

http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/eba97da0/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/FileUploader.groovy
----------------------------------------------------------------------
diff --git a/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/FileUploader.groovy b/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/FileUploader.groovy
index 262693c..4f61730 100644
--- a/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/FileUploader.groovy
+++ b/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/FileUploader.groovy
@@ -44,6 +44,9 @@ class FileUploader {
    * @return
    */
   public boolean copyIfOutOfDate(File src, Path destPath, boolean force) {
+    if (!src.exists()) {
+      throw new FileNotFoundException("Source file $src not found")
+    }
     def srcLen = src.length()
     def fs = getFileSystem(destPath)
     boolean toCopy = force