Unable to compile unit tests on main branch

20 views
Skip to first unread message

Kannan

unread,
Nov 8, 2014, 2:04:58 PM11/8/14
to ecli...@googlegroups.com
Eric,
While I was working on debugger branch, I was able to compile junit code by running ant test.jdt. This doesn't work anymore after I moved to main branch. Can you tell me what I am doing wrong? For e.g., I have some test classes defined under org.eclim.jdt/test/junit/org/eclim/plugin/jdt/command/debug/. I want them compiled into the classes dir.

Here is the error. I don't know why it is not able to connect to the test instance. Is there a failure in starting the test instance that I am not able to see? This failure is causing the test class compilation to not happen.

--- deploy
     [echo] Unable to connect to eclimd on port 9092: Connection refused

BUILD FAILED
/Users/krajah/.vim/bundle/eclim/build.xml:74: The following error occurred while executing this line:
/Users/krajah/.vim/bundle/eclim/build.xml:160: : Failed to connect to test eclimd instance.
 
-- 
Kannan

Eric Van Dewoestine

unread,
Dec 2, 2014, 12:13:11 AM12/2/14
to ecli...@googlegroups.com
On 2014-11-08 19:04:57, Kannan wrote:
> Eric,While I was working on debugger branch, I was able to compile junit code by running ant test.jdt. This doesn't work anymore after I moved to main branch. Can you tell me what I am doing wrong? For e.g., I have some test classes defined under org.eclim.jdt/test/junit/org/eclim/plugin/jdt/command/debug/. I want them compiled into the classes dir.
> Here is the error. I don't know why it is not able to connect to the test instance. Is there a failure in starting the test instance that I am not able to see? This failure is causing the test class compilation to not happen.
> --- deploy     [echo] Unable to connect to eclimd on port 9092: Connection refused
> BUILD FAILED/Users/krajah/.vim/bundle/eclim/build.xml:74: The following error occurred while executing this line:/Users/krajah/.vim/bundle/eclim/build.xml:160: : Failed to connect to test eclimd instance. -- Kannan

Sorry for the late response, this email ended up in my spam folder for
some reason.

The unit tests will attempt to connect to eclimd on the non-default
port of 9092. There is an eclimrc file located at
org.eclim.core/test/eclimrc.test which can be used to start an eclim
daemon for use by the unit tests:

$ eclimd -f org.eclim.core/test/eclimrc.test

As you have probably noticed after building eclim many times at this
point, whenever the current commit hash for eclim changes, then during
the deploy stage of the build, eclim will stop any existing daemons
whose current version doesn't match that hash. This is to ensure that
as you switch branches, pull the latest code from git, etc. that you
are never running a daemon that is not up to date with the vim client
side code.

So, based on the build failure line you've posted you've either a)
not yet started the unit test eclimd instance or b) you started it but
the current commit hash changed and the build stopped your unit test
instance.

--
eric

Kannan Rajah

unread,
Dec 2, 2014, 12:19:54 AM12/2/14
to ecli...@googlegroups.com
Ahh got it. I did not realize we had to start the test server manually. Will try it out. Can we not start the test server automatically as part of the test build?

--
You received this message because you are subscribed to the Google Groups "eclim-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eclim-dev+unsubscribe@googlegroups.com.
To post to this group, send email to ecli...@googlegroups.com.
Visit this group at http://groups.google.com/group/eclim-dev.
For more options, visit https://groups.google.com/d/optout.

Eric Van Dewoestine

unread,
Dec 2, 2014, 12:32:36 AM12/2/14
to ecli...@googlegroups.com
On 2014-12-02 05:19:53, Kannan Rajah wrote:
> Ahh got it. I did not realize we had to start the test server manually.
> Will try it out. Can we not start the test server automatically as part of
> the test build?

The main issue with doing that is knowing when the test instance is
ready to process commands. I did fairly recently update the eclimd
startup to wait on all running eclipse jobs before binding to the
specified nailgun port, so at this point the build file probably could
see if the port is in use, if not, start the test instance and wait on
the port to be bound. Previously just having the port bound wasn't
necessarily a good indicator that eclipse was ready to handle eclim
requests.
> > email to eclim-dev+...@googlegroups.com.
> > To post to this group, send email to ecli...@googlegroups.com.
> > Visit this group at http://groups.google.com/group/eclim-dev.
> > For more options, visit https://groups.google.com/d/optout.
> >
>
> --
> You received this message because you are subscribed to the Google Groups "eclim-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to eclim-dev+...@googlegroups.com.
> To post to this group, send email to ecli...@googlegroups.com.
> Visit this group at http://groups.google.com/group/eclim-dev.
> For more options, visit https://groups.google.com/d/optout.

--
eric
Reply all
Reply to author
Forward
0 new messages