summaryrefslogtreecommitdiffstats
path: root/config-proxy/src/test
diff options
context:
space:
mode:
authorHarald Musum <musum@verizonmedia.com>2019-09-13 08:55:00 +0200
committerHarald Musum <musum@verizonmedia.com>2019-09-13 08:55:00 +0200
commitdbdad124c13fdf29189cd8ce9b6585e00ba4c1b0 (patch)
treec90db053adce873320ad7a8b72151b6ecdf638e9 /config-proxy/src/test
parent8b98087161e3cbe9557fd62a754f24f1317d7297 (diff)
Improve dumpcache command a bit
Log a bit when running, handle errors better, more output when something goes wrong
Diffstat (limited to 'config-proxy/src/test')
-rw-r--r--config-proxy/src/test/java/com/yahoo/vespa/config/proxy/ConfigProxyRpcServerTest.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/config-proxy/src/test/java/com/yahoo/vespa/config/proxy/ConfigProxyRpcServerTest.java b/config-proxy/src/test/java/com/yahoo/vespa/config/proxy/ConfigProxyRpcServerTest.java
index ffa70b5bfb5..dc1c995fbb5 100644
--- a/config-proxy/src/test/java/com/yahoo/vespa/config/proxy/ConfigProxyRpcServerTest.java
+++ b/config-proxy/src/test/java/com/yahoo/vespa/config/proxy/ConfigProxyRpcServerTest.java
@@ -13,8 +13,11 @@ import com.yahoo.jrt.Transport;
import com.yahoo.vespa.config.RawConfig;
import org.junit.After;
import org.junit.Before;
+import org.junit.Rule;
import org.junit.Test;
+import org.junit.rules.TemporaryFolder;
+import java.io.IOException;
import java.time.Duration;
import static org.hamcrest.CoreMatchers.is;
@@ -32,6 +35,9 @@ public class ConfigProxyRpcServerTest {
private TestServer server;
private TestClient client;
+ @Rule
+ public TemporaryFolder temporaryFolder = new TemporaryFolder();
+
@Before
public void setup() throws ListenFailedException {
server = new TestServer();
@@ -247,9 +253,9 @@ public class ConfigProxyRpcServerTest {
* Tests dumpCache RPC command
*/
@Test
- public void testRpcMethodDumpCache() {
+ public void testRpcMethodDumpCache() throws IOException {
Request req = new Request("dumpCache");
- String path = "/tmp";
+ String path = temporaryFolder.newFolder().getAbsolutePath();
req.parameters().add(new StringValue(path));
client.invoke(req);
assertFalse(req.errorMessage(), req.isError());