--
You received this message because you are subscribed to the Google Groups "go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email to go-cd+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
export TLB_BASE_URL=http://tlbserver:7019
export TLB_PARTITION_NUMBER=$GO_JOB_RUN_COUNT
export TLB_TOTAL_PARTITIONS=$GO_JOB_RUN_INDEX
export TLB_JOB_NAME=${GO_PIPELINE_NAME}-${GO_STAGE_NAME}-${GO_JOB_NAME}
export TLB_JOB_VERSION=${GO_PIPELINE_COUNTER}-${GO_STAGE_COUNTER}--
<tasks>
<exec command="mvn" workingdir="efm-sio-acceptance-tests\acceptance-tests">
<arg>clean</arg>
<arg>install</arg>
<arg>-DskipTests=true</arg>
<arg>-Drun.tests.using.tlb=true</arg>
<runif status="any" />
</exec>
</tasks>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>ant.test.tlb</id>
<phase>test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks if="run.tests.using.tlb">
<echo message="TLB_JOB_NAME = ${TLB_JOB_NAME}"/>
<echo message="TLB_JOB_VERSION = ${TLB_JOB_VERSION}"/>
<echo message="TLB_PARTITION_NUMBER = ${TLB_PARTITION_NUMBER}"/>
<echo message="TLB_TOTAL_PARTITIONS = ${TLB_TOTAL_PARTITIONS}"/>
<property name="src.dir" location="src"/>
<property name="test.dir" location="test"/>
<property name="lib.dir" location="lib"/>
<property name="test.lib.dir" location="lib"/>
<property name="target.dir" location="target"/>
<property name="classes.dir" location="${target.dir}/classes"/>
<property name="test-classes.dir" location="${target.dir}/test-classes"/>
<property name="reports.dir" location="${target.dir}/reports"/>
<property name="tlb.dist.dir" location="${TLB_CLASSPATH}"/><!-- used in packaged distribution(s) -->
<mkdir dir="${reports.dir}"/>
<mkdir dir="${test-classes.dir}"/>
<mkdir dir="${reports.dir}"/>
<path id="src.classpath">
<pathelement path="${classes.dir}"/>
</path>
<path id="test.classpath">
<path refid="src.classpath"/>
<pathelement path="${test-classes.dir}"/>
<fileset dir="${test.lib.dir}" includes="*.jar"/>
</path>
<path id="maven.test.classpath">
<path refid="test.classpath"/>
<fileset dir="${tlb.dist.dir}/lib" includes="*.jar" erroronmissingdir="false"/>
<fileset dir="${tlb.dist.dir}" includes="tlb-java*.jar" erroronmissingdir="false"/>
</path>
<!-- run tests through TLB -->
<path id="classpath.for.tests">
<path refid="maven.test.classpath"/>
</path>
<typedef name="load-balanced-fileset" classname="tlb.ant.LoadBalancedFileSet" classpathref="classpath.for.tests"/>
<junit failureproperty="test.failed" printsummary="yes" haltonfailure="false" haltonerror="false" showoutput="true" fork="true">
<classpath refid="classpath.for.tests"/>
<batchtest todir="${reports.dir}">
<load-balanced-fileset dir="${test-classes.dir}" includes="**/*Test.class" />
<formatter classname="tlb.ant.JunitDataRecorder"/>
<formatter type="xml"/>
</batchtest>
</junit>
<fail if="test.failed"/>
</tasks>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant-junit</artifactId>
<version>1.9.2</version>
</dependency>
</dependencies>
</plugin>
When I ran through TLB server, the run.tests.using.tlb option was recognized, but got another error such as:
Caused by: java.lang.IllegalStateException: None of [tlb.splitter.TimeBasedTestSplitter, tlb.splitter.CountBasedTestSplitter] could successfully split the test suites.
at tlb.splitter.DefaultingTestSplitter.filterSuites(DefaultingTestSplitter.java:45)
at tlb.ant.LoadBalancedFileSet.iterator(LoadBalancedFileSet.java:51)
at org.apache.tools.ant.types.resources.Resources$MyCollection$MyIterator.hasNext(Resources.java:97)
at org.apache.tools.ant.util.CollectionUtils.asCollection(CollectionUtils.java:218)
at org.apache.tools.ant.types.resources.Resources$MyCollection.getCache(Resources.java:83)
at org.apache.tools.ant.types.resources.Resources$MyCollection.iterator(Resources.java:78)
at org.apache.tools.ant.types.resources.Resources.iterator(Resources.java:170)
at org.apache.tools.ant.taskdefs.optional.junit.BatchTest.getFilenames(BatchTest.java:147)
at org.apache.tools.ant.taskdefs.optional.junit.BatchTest.createAllJUnitTest(BatchTest.java:126)
at org.apache.tools.ant.taskdefs.optional.junit.BatchTest.elements(BatchTest.java:102)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.getIndividualTests(JUnitTask.java:1474)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:804)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
... 34 more
Don't know what I missed. Your help is highly appreciated.
By the way, I am using java 1.8.
Thanks,Yes you do need to run a tlb server. The go team runs a TLB server :)
Here is out pom.xml containing TLB https://github.com/gocd/gocd/blob/master/common/pom.xml
You will find the build and environment variables here - https://build.go.cd/go/tab/build/detail/build-linux/640/build-non-server/1/common-split-runInstance-1#tab-console use username: view, password: password to login. Some of the TLB environment vars are optional.