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 2015/04/28 18:49:15 UTC
incubator-slider git commit: SLIDER-863 TestPackageCommandOptions
Repository: incubator-slider
Updated Branches:
refs/heads/feature/SLIDER-863-windows-tests 69856ad1e -> 3b1f9ed05
SLIDER-863 TestPackageCommandOptions
Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/3b1f9ed0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/3b1f9ed0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/3b1f9ed0
Branch: refs/heads/feature/SLIDER-863-windows-tests
Commit: 3b1f9ed053f536f55f82a5f55f5b6c7070b9fb60
Parents: 69856ad
Author: Steve Loughran <st...@apache.org>
Authored: Tue Apr 28 17:49:01 2015 +0100
Committer: Steve Loughran <st...@apache.org>
Committed: Tue Apr 28 17:49:01 2015 +0100
----------------------------------------------------------------------
.../client/TestPackageCommandOptions.groovy | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/3b1f9ed0/slider-core/src/test/groovy/org/apache/slider/client/TestPackageCommandOptions.groovy
----------------------------------------------------------------------
diff --git a/slider-core/src/test/groovy/org/apache/slider/client/TestPackageCommandOptions.groovy b/slider-core/src/test/groovy/org/apache/slider/client/TestPackageCommandOptions.groovy
index 5439073..345475b 100644
--- a/slider-core/src/test/groovy/org/apache/slider/client/TestPackageCommandOptions.groovy
+++ b/slider-core/src/test/groovy/org/apache/slider/client/TestPackageCommandOptions.groovy
@@ -18,9 +18,6 @@
package org.apache.slider.client
-import java.io.File
-import java.io.IOException
-
import org.apache.commons.io.FileUtils
import org.apache.hadoop.fs.FileSystem
import org.apache.hadoop.fs.FileUtil
@@ -121,8 +118,7 @@ class TestPackageCommandOptions extends AgentMiniClusterTestBase {
describe("Installed app package to - " + installedPackage.toURI()
.toString())
// overwrite the application.def property with the new installed path
- agentDefOptions.putAt(AgentKeys.APP_DEF, installedPackage.toURI()
- .toString())
+ agentDefOptions.put(AgentKeys.APP_DEF, installedPackage.toURI().toString())
// start the app and AM
describe("Starting the app")
launcher = createStandaloneAM(clustername, true, false)
@@ -142,7 +138,7 @@ class TestPackageCommandOptions extends AgentMiniClusterTestBase {
]
)
// reset the app def path to orig value and remove app version
- agentDefOptions.putAt(AgentKeys.APP_DEF, appDefPath)
+ agentDefOptions.put(AgentKeys.APP_DEF, appDefPath)
agentDefOptions.remove(SliderKeys.APP_VERSION)
assert launcher.serviceExitCode == 0
@@ -191,10 +187,10 @@ class TestPackageCommandOptions extends AgentMiniClusterTestBase {
describe("Installed app package to - " + installedPackage.toURI()
.toString())
// overwrite the application.def property with the new installed path
- agentDefOptions.putAt(AgentKeys.APP_DEF, installedPackage.toURI()
+ agentDefOptions.put(AgentKeys.APP_DEF, installedPackage.toURI()
.toString())
// add the app version
- agentDefOptions.putAt(SliderKeys.APP_VERSION, APP_VERSION)
+ agentDefOptions.put(SliderKeys.APP_VERSION, APP_VERSION)
// start the app and AM
describe("Starting the app")
launcher = createStandaloneAM(clustername, true, false)
@@ -214,7 +210,7 @@ class TestPackageCommandOptions extends AgentMiniClusterTestBase {
]
)
// reset the app def path to orig value and remove app version
- agentDefOptions.putAt(AgentKeys.APP_DEF, appDefPath)
+ agentDefOptions.put(AgentKeys.APP_DEF, appDefPath)
agentDefOptions.remove(SliderKeys.APP_VERSION)
assert launcher.serviceExitCode == 0
@@ -234,7 +230,10 @@ class TestPackageCommandOptions extends AgentMiniClusterTestBase {
}
private File getTempLocation () {
- return new File(System.getProperty("user.dir") + "/target/_")
+ File tmpDir = File.createTempFile("temp", "dir")
+ tmpDir.delete()
+ tmpDir.mkdir()
+ tmpDir
}
static class TestSliderClient extends SliderClient {