You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by "Tuomas Karkkainen (JIRA)" <ji...@apache.org> on 2009/04/15 20:00:15 UTC
[jira] Commented: (BUILDR-275) race condition in ant.rb when using
parallel build
[ https://issues.apache.org/jira/browse/BUILDR-275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12699295#action_12699295 ]
Tuomas Karkkainen commented on BUILDR-275:
------------------------------------------
to demonstrate the issue run the task:
buildr clean build
> race condition in ant.rb when using parallel build
> --------------------------------------------------
>
> Key: BUILDR-275
> URL: https://issues.apache.org/jira/browse/BUILDR-275
> Project: Buildr
> Issue Type: Bug
> Components: Test frameworks
> Affects Versions: 1.3.4
> Environment: linux 2.6, jruby 1.1.5, java project, junit
> Buildr.options.parallel=true
> Reporter: Tuomas Karkkainen
> Priority: Minor
> Attachments: buildr-ant-race.zip
>
>
> When Buildr.options.parallel=true
> If two projects start executing a junit test task at the same time they fail with:
> Test framework error: uninitialized constant Antwrap::AntProject
> or
> Test framework error: uninitialized constant Antwrap::AntProject::Main
> or
> wrong # of arguments(0 for 1) for using
> --
> the problem is in ant.rb
> in the method def ant(name, &block)
> synchronizing the method fixes the problem.
> my buildfile:
> VERSION_NUMBER = "1.0.0"
> GROUP = "bu"
> COPYRIGHT = ""
> repositories.remote << "http://repo1.maven.org/maven2/"
> repositories.remote << "http://www.ibiblio.org/maven2/"
> Buildr.options.parallel=true
> desc "The Bu project"
> define "bu" do
> project.version = VERSION_NUMBER
> project.group = GROUP
> manifest["Implementation-Vendor"] = COPYRIGHT
> define "sub1" do
> package(:jar)
> end
> define "sub2" do
> package(:jar)
> end
> end
> my layout:
> .
> ./sub1
> ./sub1/src
> ./sub1/src/test
> ./sub1/src/test/java
> ./sub1/src/test/java/TestClazz.java
> ./sub1/src/main
> ./sub1/src/main/java
> ./sub2
> ./sub2/src
> ./sub2/src/test
> ./sub2/src/test/java
> ./sub2/src/test/java/TestClazz.java
> ./sub2/src/main
> ./sub2/src/main/java
> ./buildfile
> and TestClazz.java is:
> import org.junit.*;
> public class TestClazz {
> @Test
> public void testMethod() throws Exception {
> }
> }
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.