本文整理汇总了Java中org.tmatesoft.svn.core.SVNAuthenticationException类的典型用法代码示例。如果您正苦于以下问题:Java SVNAuthenticationException类的具体用法?Java SVNAuthenticationException怎么用?Java SVNAuthenticationException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SVNAuthenticationException类属于org.tmatesoft.svn.core包,在下文中一共展示了SVNAuthenticationException类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: NativeDaemon
import org.tmatesoft.svn.core.SVNAuthenticationException; //导入依赖的package包/类
public NativeDaemon(@NotNull String svnserve, @NotNull String svnadmin) throws IOException, InterruptedException, SVNException {
int port = detectPort();
url = SVNURL.create("svn", null, HOST, port, null, true);
repo = TestHelper.createTempDir("git-as-svn-repo");
log.info("Starting native svn daemon at: {}, url: {}", repo, url);
Runtime.getRuntime().exec(new String[]{
svnadmin,
"create",
repo.getAbsolutePath()
}).waitFor();
File config = createConfigs(repo);
daemon = Runtime.getRuntime().exec(new String[]{
svnserve,
"--daemon",
"--root", repo.getAbsolutePath(),
"--config-file", config.getAbsolutePath(),
"--listen-host", HOST,
"--listen-port", Integer.toString(port)
});
long serverStartupTimeout = System.currentTimeMillis() + SERVER_STARTUP_TIMEOUT;
while (true) {
try {
SVNRepositoryFactory.create(url).getRevisionPropertyValue(0, "example");
} catch (SVNAuthenticationException ignored) {
break;
} catch (SVNException e) {
if ((e.getErrorMessage().getErrorCode() == SVNErrorCode.RA_SVN_IO_ERROR) && (System.currentTimeMillis() < serverStartupTimeout)) {
Thread.sleep(SERVER_STARTUP_DELAY);
continue;
}
throw e;
}
break;
}
}
示例2: invalidUser
import org.tmatesoft.svn.core.SVNAuthenticationException; //导入依赖的package包/类
@Test(expectedExceptions = SVNAuthenticationException.class)
public void invalidUser() throws Throwable {
checkUser("ldapadmin2", "ldapadmin");
}
示例3: invalidPassword
import org.tmatesoft.svn.core.SVNAuthenticationException; //导入依赖的package包/类
@Test(expectedExceptions = SVNAuthenticationException.class)
public void invalidPassword() throws Throwable {
checkUser("ldapadmin", "wrongpassword");
}
示例4: anonymousUserDenies
import org.tmatesoft.svn.core.SVNAuthenticationException; //导入依赖的package包/类
@Test(expectedExceptions = SVNAuthenticationException.class)
public void anonymousUserDenies() throws Throwable {
checkAnonymous(false);
}
示例5: invalidPassword
import org.tmatesoft.svn.core.SVNAuthenticationException; //导入依赖的package包/类
@Test(expectedExceptions = SVNAuthenticationException.class)
void invalidPassword() throws Throwable {
checkUser(root, "wrongpassword");
}
示例6: invalidUser
import org.tmatesoft.svn.core.SVNAuthenticationException; //导入依赖的package包/类
@Test(expectedExceptions = SVNAuthenticationException.class)
void invalidUser() throws Throwable {
checkUser("wronguser", rootPassword);
}