summaryrefslogtreecommitdiff
path: root/plugins/svn4idea/testSource/org/jetbrains/idea/svn
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/svn4idea/testSource/org/jetbrains/idea/svn')
-rw-r--r--plugins/svn4idea/testSource/org/jetbrains/idea/svn/SvnCachingRepositoryPoolTest.java10
-rw-r--r--plugins/svn4idea/testSource/org/jetbrains/idea/svn/SvnCommandLineStabilityTest.java32
2 files changed, 21 insertions, 21 deletions
diff --git a/plugins/svn4idea/testSource/org/jetbrains/idea/svn/SvnCachingRepositoryPoolTest.java b/plugins/svn4idea/testSource/org/jetbrains/idea/svn/SvnCachingRepositoryPoolTest.java
index e2475e020950..ecad58e2b20d 100644
--- a/plugins/svn4idea/testSource/org/jetbrains/idea/svn/SvnCachingRepositoryPoolTest.java
+++ b/plugins/svn4idea/testSource/org/jetbrains/idea/svn/SvnCachingRepositoryPoolTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2012 JetBrains s.r.o.
+ * Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -107,13 +107,7 @@ public class SvnCachingRepositoryPoolTest extends FileBasedTest {
}
}
};
- final EmptyProgressIndicator indicator = new EmptyProgressIndicator() {
- @Override
- public void cancel() {
- super.cancel();
- ProgressManagerImpl.canceled();
- }
- };
+ final EmptyProgressIndicator indicator = new EmptyProgressIndicator();
Thread thread = new Thread(new Runnable() {
@Override
public void run() {
diff --git a/plugins/svn4idea/testSource/org/jetbrains/idea/svn/SvnCommandLineStabilityTest.java b/plugins/svn4idea/testSource/org/jetbrains/idea/svn/SvnCommandLineStabilityTest.java
index 76cc3c8ce9af..4918ef06eb39 100644
--- a/plugins/svn4idea/testSource/org/jetbrains/idea/svn/SvnCommandLineStabilityTest.java
+++ b/plugins/svn4idea/testSource/org/jetbrains/idea/svn/SvnCommandLineStabilityTest.java
@@ -1,16 +1,15 @@
package org.jetbrains.idea.svn;
import com.intellij.openapi.vcs.VcsException;
+import com.intellij.openapi.vfs.VfsUtilCore;
import junit.framework.Assert;
-import org.jetbrains.idea.svn.api.BaseSvnClient;
-import org.jetbrains.idea.svn.commandLine.CommandExecutor;
-import org.jetbrains.idea.svn.commandLine.SvnCommandName;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.idea.svn.auth.AuthenticationService;
+import org.jetbrains.idea.svn.commandLine.*;
import org.junit.Test;
import org.tmatesoft.svn.core.wc2.SvnTarget;
import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
/**
* Created with IntelliJ IDEA.
@@ -30,15 +29,22 @@ public class SvnCommandLineStabilityTest extends Svn17TestCase {
}
private void call() throws VcsException {
- List<String> parameters = new ArrayList<String>();
- parameters.add("--xml");
-
- SvnVcs vcs = SvnVcs.getInstance(myProject);
- File workingDirectory = new File(myWorkingCopyDir.getPath());
- CommandExecutor command =
- BaseSvnClient.execute(vcs, SvnTarget.fromFile(workingDirectory), workingDirectory, SvnCommandName.info, parameters, null);
- final String result = command.getOutput();
+ String result = runInfo().getOutput();
System.out.println(result);
Assert.assertNotNull(result);
}
+
+ @NotNull
+ private CommandExecutor runInfo() throws SvnBindException {
+ SvnVcs vcs = SvnVcs.getInstance(myProject);
+ File workingDirectory = VfsUtilCore.virtualToIoFile(myWorkingCopyDir);
+ Command command = new Command(SvnCommandName.info);
+
+ command.setTarget(SvnTarget.fromFile(workingDirectory));
+ command.setWorkingDirectory(workingDirectory);
+ command.put("--xml");
+
+ CommandRuntime runtime = new CommandRuntime(vcs, new AuthenticationService(vcs, true));
+ return runtime.runWithAuthenticationAttempt(command);
+ }
}