Skip to content

Commit

Permalink
Fix flaky test in parallel mode
Browse files Browse the repository at this point in the history
The test was non deterministic in parallel mode.
However fixing that made something else strange surface, which
required some changes in the test setup that I cannot explain.
  • Loading branch information
ljacomet committed Jun 18, 2018
1 parent 40e6682 commit 85a63ce
Showing 1 changed file with 18 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1393,7 +1393,13 @@ Required by:
maven { url "${mavenRepo.uri}" }
}
task jar(type: Jar) { baseName = project.name }
task jar(type: Jar) {
baseName = project.name
// TODO LJA: No idea why I have to do this
if (project.version != 'unspecified') {
archiveName = "\${project.name}-\${project.version}.jar"
}
}
artifacts { conf jar }
}
Expand Down Expand Up @@ -1450,13 +1456,13 @@ Required by:
def 'substitution with project does not trigger failOnVersionConflict'() {
settingsFile << 'include "sub"'
buildFile << """
$common
project(':sub') {
version = '0.0.1'
subprojects {
it.version = '0.0.1'
group = 'org.test'
}
$common
dependencies {
conf 'foo:bar:1'
conf project(':sub')
Expand All @@ -1474,11 +1480,16 @@ configurations.all {
"""

when:
succeeds 'checkDeps'
succeeds ':checkDeps'

then:
resolve.expectGraph {
root(":sub", "org.test:sub:0.0.1") {}
root(":", ":depsub:") {
project(':sub', 'org.test:sub:0.0.1') {
configuration = 'default'
}
edge('foo:bar:1', 'org.test:sub:0.0.1')
}
}
}
}

0 comments on commit 85a63ce

Please sign in to comment.