ccw-ide / ccw

Counterclockwise is an Eclipse plugin helping developers write Clojure code
https://github.com/laurentpetit/ccw/wiki/GoogleCodeHome
Eclipse Public License 1.0
220 stars 50 forks source link

Update dependencies is launched multiple times on project creation #817

Closed arichiardi closed 9 years ago

arichiardi commented 9 years ago

I was playing with SWTBot and I have noticed that the following test fails:

    @Test
    public void updatesDependenciesOnceOnProjectCreation() throws Exception {
        bot.createClojureProject(PROJECT_NAME);
        bot.bot.waitUntil(Conditions.waitForWidget(BotUtils.MATCHER_WIDGET_UPDATE_DEPENDENCIES),
                BotUtils.TIMEOUT_UPDATE_DEPENDENCIES, BotUtils.DELAY_UPDATE_DEPENDENCIES);

        int count = 0; // AR - were is filter!?!?!
        for (SWTBotShell shell : bot.bot.shells()) {
            if (shell.getText().contains("Update project dependencies")) {
                count++;
            }
        }
        assertThat("Update dependencies should be launched only once on project creation",
                count, equalTo(1));
    }

Probably no guard is used there, and I am planning to add it (it can slow down some operation).

arichiardi commented 9 years ago

Fixed this as well, code and tests are ready, I just need #816 in :wink:

laurentpetit commented 9 years ago

If it's ready, I would really appreciate if you can create a pull request just to fix this issue, first.

arichiardi commented 9 years ago

I am having some issue with the testing part, I hope I will have a PR later today.