summaryrefslogtreecommitdiffstats
path: root/tests/com
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2012-07-11 17:14:30 -0400
committerJames Moger <james.moger@gitblit.com>2012-07-11 17:14:30 -0400
commitf3ce6e80794ff3a234dbd8850c8501abda95cedb (patch)
tree659b5fc05ecc06a2dfa7004a8433ec7f5f0f59ce /tests/com
parent3c7e07406c0054d97fa6e037894eeac491f74d1d (diff)
downloadgitblit-f3ce6e80794ff3a234dbd8850c8501abda95cedb.tar.gz
gitblit-f3ce6e80794ff3a234dbd8850c8501abda95cedb.zip
Fixes and adjustments to test suite
Diffstat (limited to 'tests/com')
-rw-r--r--tests/com/gitblit/tests/GitBlitSuite.java7
-rw-r--r--tests/com/gitblit/tests/GitServletTest.java5
-rw-r--r--tests/com/gitblit/tests/SyndicationUtilsTest.java2
-rw-r--r--tests/com/gitblit/tests/TicgitUtilsTest.java4
4 files changed, 9 insertions, 9 deletions
diff --git a/tests/com/gitblit/tests/GitBlitSuite.java b/tests/com/gitblit/tests/GitBlitSuite.java
index 0cb63ec7..07c5e08e 100644
--- a/tests/com/gitblit/tests/GitBlitSuite.java
+++ b/tests/com/gitblit/tests/GitBlitSuite.java
@@ -101,6 +101,9 @@ public class GitBlitSuite {
// already started
return false;
}
+
+ GitServletTest.deleteWorkingFolders();
+
// Start a Gitblit instance
Executors.newSingleThreadExecutor().execute(new Runnable() {
public void run() {
@@ -123,7 +126,7 @@ public class GitBlitSuite {
GitBlitServer.main("--stop", "--shutdownPort", "" + shutdownPort);
// Wait a few seconds for it to be running
- Thread.sleep(2500);
+ Thread.sleep(5000);
}
@BeforeClass
@@ -132,7 +135,7 @@ public class GitBlitSuite {
if (REPOSITORIES.exists() || REPOSITORIES.mkdirs()) {
cloneOrFetch("helloworld.git", "https://github.com/git/hello-world.git");
- cloneOrFetch("ticgit.git", "https://github.com/jeffWelling/ticgit.git");
+ cloneOrFetch("ticgit.git", "https://github.com/schacon/ticgit.git");
cloneOrFetch("test/jgit.git", "https://github.com/eclipse/jgit.git");
cloneOrFetch("test/helloworld.git", "https://github.com/git/hello-world.git");
cloneOrFetch("test/ambition.git", "https://github.com/defunkt/ambition.git");
diff --git a/tests/com/gitblit/tests/GitServletTest.java b/tests/com/gitblit/tests/GitServletTest.java
index 2f9a9c42..848a1d05 100644
--- a/tests/com/gitblit/tests/GitServletTest.java
+++ b/tests/com/gitblit/tests/GitServletTest.java
@@ -42,7 +42,6 @@ public class GitServletTest {
@BeforeClass
public static void startGitblit() throws Exception {
- deleteWorkingFolders();
started.set(GitBlitSuite.startGitblit());
}
@@ -50,11 +49,11 @@ public class GitServletTest {
public static void stopGitblit() throws Exception {
if (started.get()) {
GitBlitSuite.stopGitblit();
+ deleteWorkingFolders();
}
- deleteWorkingFolders();
}
- private static void deleteWorkingFolders() throws Exception {
+ public static void deleteWorkingFolders() throws Exception {
if (ticgitFolder.exists()) {
FileUtils.delete(ticgitFolder, FileUtils.RECURSIVE);
}
diff --git a/tests/com/gitblit/tests/SyndicationUtilsTest.java b/tests/com/gitblit/tests/SyndicationUtilsTest.java
index ca6678de..4542adbd 100644
--- a/tests/com/gitblit/tests/SyndicationUtilsTest.java
+++ b/tests/com/gitblit/tests/SyndicationUtilsTest.java
@@ -67,7 +67,7 @@ public class SyndicationUtilsTest {
Set<String> links = new HashSet<String>();
for (int i = 0; i < 2; i++) {
List<FeedEntryModel> feed = SyndicationUtils.readFeed(GitBlitSuite.url, "ticgit.git",
- "deving", 5, i, GitBlitSuite.account, GitBlitSuite.password.toCharArray());
+ "master", 5, i, GitBlitSuite.account, GitBlitSuite.password.toCharArray());
assertTrue(feed != null);
assertTrue(feed.size() > 0);
assertEquals(5, feed.size());
diff --git a/tests/com/gitblit/tests/TicgitUtilsTest.java b/tests/com/gitblit/tests/TicgitUtilsTest.java
index a77dae43..74f9e44e 100644
--- a/tests/com/gitblit/tests/TicgitUtilsTest.java
+++ b/tests/com/gitblit/tests/TicgitUtilsTest.java
@@ -82,8 +82,6 @@ public class TicgitUtilsTest {
.getTicket(repository, tickets.get(tickets.size() - 1).name);
repository.close();
assertNotNull(ticket);
- assertEquals(
- "1254123752_comments-on-ticgits-longer-than-5-lines-can-t-be-viewed-entirely_266",
- ticket.name);
+ assertEquals("1206206148_add-attachment-to-ticket_138", ticket.name);
}
} \ No newline at end of file