I figured out the reason for different results:
shindig-server depends on shindig-features.
The test for shindig-server was OK at first, so both shindig-project
and shindig-servert built successfully.
Later shindig-features/opensocial-templates/container.js was changed
that broke the test of shindig-server.
After I sync'ed the change, I first did 'mvn' in the root dir, to get
all sub-projects built. This step failed because shindig-server failed
test. Now comes the tricky part:
Maven *remembers* the last good build and uses that version of the
changed file (saved as
features/opensocial-templates/.svn/text-base/container.js.svn-base),
so shindig-server passes test when run alone!
That's confusing, especially to Maven newbies. Is there any option to
change this behavior?

As to the problem of the changed JS file, I have enough context to
solve it. Thanks!

On Wed, Sep 24, 2008 at 11:00 AM, Kevin Jin <[EMAIL PROTECTED]> wrote:
> I recently added a test to java/server sub-project. It works when I
> run it in the sub-dir, but fails when I run it in the Shindig root
> dir.
> Please take a look at
> java/server/src/test/java/org/apache/shindig/server/endtoend/EndToEndTest.java.
> My new test is testTemplates. Other tests in the same class works when
> started in either dir.
> I'm new to Maven. Can someone help me find the reason of different
> behaviors based on starting location?
> My first guess was the relative paths used in my test. I tried moving
> all {js,xml} files into the same dir as files used in other tests
> (java/server/src/test/resources/endtoend), but that didn't help. I'm
> most interested in this weird thing:
> This test starts a Jetty server at port 9003. Interestingly, I don't
> see any listener on this port when run in root dir, while it works as
> expected when run in java/server.
> The command for testing (you need to uncomment testTemplates in the java 
> file):
>  mvn test -Dtest=EndToEndTest
> The command for checking Jetty server:
>  fuser -4 9003/tcp 2>/dev/null
> Thanks in advance,
>
> --
> -Kevin
>



-- 
-Kevin

Reply via email to