SHaselbauer
2013-01-23 514da0237f6239322193d5d4b11b58fe4095da2b
seleniumFixV2: connected thread pool creation to condition web.allowLuceneIndexing (otherwise thread pool will be kept open for more than a minute, what hinders the start of another gitblit instance in the same jvm during selenium test case execution), fixed naming of xpath variables, added missing property to gitblit.properties and test-ui-gitblit.properties, changed naming of methods (according to decision that owners is a much shorter word than repository administrator and that owners is fits better if you think of collective responsibilities and collective ownership)
4 files modified
22 ■■■■■ changed files
src/com/gitblit/GitBlit.java 8 ●●●● patch | view | raw | blame | history
tests/de/akquinet/devops/test/ui/TestUISuite.java 2 ●●● patch | view | raw | blame | history
tests/de/akquinet/devops/test/ui/cases/UI_MultiAdminSupportTest.java 2 ●●● patch | view | raw | blame | history
tests/de/akquinet/devops/test/ui/view/RepoEditView.java 10 ●●●● patch | view | raw | blame | history
src/com/gitblit/GitBlit.java
@@ -3096,8 +3096,14 @@
        }
        
        // schedule lucene engine
        logger.info("Lucene executor is scheduled to process indexed branches every 2 minutes.");
        boolean luceneIndexing = settings.getBoolean(Keys.web.allowLuceneIndexing, true);
        logger.info("Lucene indexing is " + (luceneIndexing ? "" : "not") + " activated");
        if (luceneIndexing) {
        scheduledExecutor.scheduleAtFixedRate(luceneExecutor, 1, 2, TimeUnit.MINUTES);
            logger.info("Lucene executor is scheduled to process indexed branches every 2 minutes.");
        }
        
        // schedule gc engine
        if (gcExecutor.isReady()) {
tests/de/akquinet/devops/test/ui/TestUISuite.java
@@ -27,7 +27,7 @@
 *
 */
@RunWith(Suite.class)
@Suite.SuiteClasses({ UI_MultiAdminSupportTest.class })
@Suite.SuiteClasses({ UI_MultiAdminSupportTest.class, UI_MultiAdminSupportTest.class })
public class TestUISuite {
}
tests/de/akquinet/devops/test/ui/cases/UI_MultiAdminSupportTest.java
@@ -64,7 +64,7 @@
                .changeAuthorizationControl(RepoEditView.AUTHCONTROL_RWALL));
        // with a second admin
        editView.addRepoAdministrator("admin");
        editView.addOwner("admin");
        Assert.assertTrue(editView.save());
        // user is automatically forwarded to repo list view
        Assert.assertTrue(view.isEmptyRepo(TEST_MULTI_ADMIN_SUPPORT_REPO_PATH));
tests/de/akquinet/devops/test/ui/view/RepoEditView.java
@@ -68,7 +68,7 @@
        return false;
    }
    private void changeRepoAdministrators(String action,
    private void changeOwners(String action,
            String affectedSelection, String username) {
        String xpath = "//select[@name=\"" + affectedSelection
                + "\"]/option[@value = \"" + username + "\" ]";
@@ -79,13 +79,13 @@
        button.click();
    }
    public void removeRepoAdministrator(String username) {
        changeRepoAdministrators("remove", "repoAdministrators:selection",
    public void removeOwner(String username) {
        changeOwners("remove", "owners:selection",
                username);
    }
    public void addRepoAdministrator(String username) {
        changeRepoAdministrators("add", "repoAdministrators:choices", username);
    public void addOwner(String username) {
        changeOwners("add", "owners:choices", username);
    }
    public WebElement getAccessRestrictionSelection() {