Hi,

I have another one :)

I want to start a mailserver with test.setup so that it's available for
tests.

I created a task that starts a simple java mail server which blocks
until it's interrupted. Now I wonder how it's possible to run this in
the background during the tests.

This is the task:

  desc "Start mailserver on unprivileged ports"
  task "run-mailserver" do
    begin
      Java::Commands.java('com.ericdaugherty.mail.server.Mail', 
_('runtime/mailserver'),
        :classpath => ['runtime/mailserver/lib', 
FileList['runtime/mailserver/lib/*.jar']]
        )
    rescue Exception
      # this is excepted, as java probably was interrupted via CTRL-C
    end
  end
  
Is it possible somehow to run this in the background during the tests? I
had a look at the jetty stuff, but there the lifecycle is managed via
URL communication... 

Thanx && cheers,
Martin


Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to