Skip to content

Commit

Permalink
[bugfix] Separate unit test logs by timestamp dir so that parallel te…
Browse files Browse the repository at this point in the history
…sts do not write the same log files
  • Loading branch information
adamretter committed Nov 5, 2019
1 parent 00ffa52 commit 67532c1
Show file tree
Hide file tree
Showing 20 changed files with 21 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ install: travis_wait mvn -T 2C -DskipTests=true -Dmaven.javadoc.skip=true -Ddock
script: mvn -T 2C -Ddocker=$BUILD_DOCKER test -B

after_failure:
- tar -cjf surefire-reports.tar.bz2 exist-core/target/surefire-reports exist-core/target/test-logs
- tar -cjf surefire-reports.tar.bz2 exist-core/target/surefire-reports exist-core/target/test-logs-*
- curl -v -u $CHUNK_USER:$CHUNK_PW -sT surefire-reports.tar.bz2 chunk.io

notifications:
Expand Down
10 changes: 2 additions & 8 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,9 @@ after_test:
on_failure:
- cmd: 7z a exist-core-surefire-reports.zip %APPVEYOR_BUILD_FOLDER%\exist-core\target\surefire-reports\ && appveyor PushArtifact exist-core-surefire-reports.zip
- cmd: 7z a exist-core-test-logs.zip %APPVEYOR_BUILD_FOLDER%\exist-core\target\test-logs\ && appveyor PushArtifact exist-core-test-logs.zip
- cmd: 7z a exist-core-test-logs.zip %APPVEYOR_BUILD_FOLDER%\exist-core\target\test-logs-* && appveyor PushArtifact exist-core-test-logs.zip
- sh: tar czvf exist-core-surefire-reports.tgz $APPVEYOR_BUILD_FOLDER/exist-core/target/surefire-reports/ && appveyor PushArtifact exist-core-surefire-reports.tgz
- sh: tar czvf exist-core-test-logs.tgz $APPVEYOR_BUILD_FOLDER/exist-core/target/test-logs/ && appveyor PushArtifact exist-core-test-logs.tgz

artifacts:
- path: exist-core\target\surefire-reports
name: exist-core-surefire-reports
- path: exist-core\target\test-logs
name: exist-core-test-logs
- sh: tar czvf exist-core-test-logs.tgz $APPVEYOR_BUILD_FOLDER/exist-core/target/test-logs-* && appveyor PushArtifact exist-core-test-logs.tgz

cache:
- '%USERPROFILE%\.m2'
Expand Down
2 changes: 1 addition & 1 deletion exist-ant/src/test/resources/log4j2.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Properties>
<Property name="logs">${log4j:configParentLocation}/../../target/test-logs</Property>
<Property name="logs">${log4j:configParentLocation}/../../target/test-logs-${date:yyyyMMddHHmmssSSS}</Property>
<Property name="rollover.max.size">10MB</Property>
<Property name="rollover.max">14</Property>
<Property name="rollover.file.pattern">%d{yyyyMMddHHmmss}</Property>
Expand Down
2 changes: 1 addition & 1 deletion exist-core/src/test/resources/log4j2.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Properties>
<Property name="logs">${log4j:configParentLocation}/../../target/test-logs</Property>
<Property name="logs">${log4j:configParentLocation}/../../target/test-logs-${date:yyyyMMddHHmmssSSS}-${date:yyyyMMddHHmmssSSS}</Property>
<Property name="rollover.max.size">10MB</Property>
<Property name="rollover.max">14</Property>
<Property name="rollover.file.pattern">%d{yyyyMMddHHmmss}</Property>
Expand Down
2 changes: 1 addition & 1 deletion extensions/debuggee/src/test/resources/log4j2.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Properties>
<Property name="logs">${log4j:configParentLocation}/../../target/test-logs</Property>
<Property name="logs">${log4j:configParentLocation}/../../target/test-logs-${date:yyyyMMddHHmmssSSS}-${date:yyyyMMddHHmmssSSS}</Property>
<Property name="rollover.max.size">10MB</Property>
<Property name="rollover.max">14</Property>
<Property name="rollover.file.pattern">%d{yyyyMMddHHmmss}</Property>
Expand Down
2 changes: 1 addition & 1 deletion extensions/expath/src/test/resources/log4j2.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Properties>
<Property name="logs">${log4j:configParentLocation}/../../target/test-logs</Property>
<Property name="logs">${log4j:configParentLocation}/../../target/test-logs-${date:yyyyMMddHHmmssSSS}-${date:yyyyMMddHHmmssSSS}</Property>
<Property name="rollover.max.size">10MB</Property>
<Property name="rollover.max">14</Property>
<Property name="rollover.file.pattern">%d{yyyyMMddHHmmss}</Property>
Expand Down
2 changes: 1 addition & 1 deletion extensions/exquery/restxq/src/test/resources/log4j2.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Properties>
<Property name="logs">${log4j:configParentLocation}/../../target/test-logs</Property>
<Property name="logs">${log4j:configParentLocation}/../../target/test-logs-${date:yyyyMMddHHmmssSSS}</Property>
<Property name="rollover.max.size">10MB</Property>
<Property name="rollover.max">14</Property>
<Property name="rollover.file.pattern">%d{yyyyMMddHHmmss}</Property>
Expand Down
2 changes: 1 addition & 1 deletion extensions/indexes/lucene/src/test/resources/log4j2.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Properties>
<Property name="logs">${log4j:configParentLocation}/../../target/test-logs</Property>
<Property name="logs">${log4j:configParentLocation}/../../target/test-logs-${date:yyyyMMddHHmmssSSS}</Property>
<Property name="rollover.max.size">10MB</Property>
<Property name="rollover.max">14</Property>
<Property name="rollover.file.pattern">%d{yyyyMMddHHmmss}</Property>
Expand Down
2 changes: 1 addition & 1 deletion extensions/indexes/ngram/src/test/resources/log4j2.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Properties>
<Property name="logs">${log4j:configParentLocation}/../../target/test-logs</Property>
<Property name="logs">${log4j:configParentLocation}/../../target/test-logs-${date:yyyyMMddHHmmssSSS}</Property>
<Property name="rollover.max.size">10MB</Property>
<Property name="rollover.max">14</Property>
<Property name="rollover.file.pattern">%d{yyyyMMddHHmmss}</Property>
Expand Down
2 changes: 1 addition & 1 deletion extensions/indexes/range/src/test/resources/log4j2.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Properties>
<Property name="logs">${log4j:configParentLocation}/../../target/test-logs</Property>
<Property name="logs">${log4j:configParentLocation}/../../target/test-logs-${date:yyyyMMddHHmmssSSS}</Property>
<Property name="rollover.max.size">10MB</Property>
<Property name="rollover.max">14</Property>
<Property name="rollover.file.pattern">%d{yyyyMMddHHmmss}</Property>
Expand Down
2 changes: 1 addition & 1 deletion extensions/indexes/sort/src/test/resources/log4j2.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Properties>
<Property name="logs">${log4j:configParentLocation}/../../target/test-logs</Property>
<Property name="logs">${log4j:configParentLocation}/../../target/test-logs-${date:yyyyMMddHHmmssSSS}</Property>
<Property name="rollover.max.size">10MB</Property>
<Property name="rollover.max">14</Property>
<Property name="rollover.file.pattern">%d{yyyyMMddHHmmss}</Property>
Expand Down
2 changes: 1 addition & 1 deletion extensions/indexes/spatial/src/test/resources/log4j2.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Properties>
<Property name="logs">${log4j:configParentLocation}/../../target/test-logs</Property>
<Property name="logs">${log4j:configParentLocation}/../../target/test-logs-${date:yyyyMMddHHmmssSSS}</Property>
<Property name="rollover.max.size">10MB</Property>
<Property name="rollover.max">14</Property>
<Property name="rollover.file.pattern">%d{yyyyMMddHHmmss}</Property>
Expand Down
2 changes: 1 addition & 1 deletion extensions/modules/cache/src/test/resources/log4j2.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Properties>
<Property name="logs">${log4j:configParentLocation}/../../target/test-logs</Property>
<Property name="logs">${log4j:configParentLocation}/../../target/test-logs-${date:yyyyMMddHHmmssSSS}</Property>
<Property name="rollover.max.size">10MB</Property>
<Property name="rollover.max">14</Property>
<Property name="rollover.file.pattern">%d{yyyyMMddHHmmss}</Property>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Properties>
<Property name="logs">${log4j:configParentLocation}/../../target/test-logs</Property>
<Property name="logs">${log4j:configParentLocation}/../../target/test-logs-${date:yyyyMMddHHmmssSSS}</Property>
<Property name="rollover.max.size">10MB</Property>
<Property name="rollover.max">14</Property>
<Property name="rollover.file.pattern">%d{yyyyMMddHHmmss}</Property>
Expand Down
2 changes: 1 addition & 1 deletion extensions/modules/counter/src/test/resources/log4j2.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Properties>
<Property name="logs">${log4j:configParentLocation}/../../target/test-logs</Property>
<Property name="logs">${log4j:configParentLocation}/../../target/test-logs-${date:yyyyMMddHHmmssSSS}</Property>
<Property name="rollover.max.size">10MB</Property>
<Property name="rollover.max">14</Property>
<Property name="rollover.file.pattern">%d{yyyyMMddHHmmss}</Property>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Properties>
<Property name="logs">${log4j:configParentLocation}/../../target/test-logs</Property>
<Property name="logs">${log4j:configParentLocation}/../../target/test-logs-${date:yyyyMMddHHmmssSSS}</Property>
<Property name="rollover.max.size">10MB</Property>
<Property name="rollover.max">14</Property>
<Property name="rollover.file.pattern">%d{yyyyMMddHHmmss}</Property>
Expand Down
2 changes: 1 addition & 1 deletion extensions/modules/file/src/test/resources/log4j2.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Properties>
<Property name="logs">${log4j:configParentLocation}/../../target/test-logs</Property>
<Property name="logs">${log4j:configParentLocation}/../../target/test-logs-${date:yyyyMMddHHmmssSSS}</Property>
<Property name="rollover.max.size">10MB</Property>
<Property name="rollover.max">14</Property>
<Property name="rollover.file.pattern">%d{yyyyMMddHHmmss}</Property>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Properties>
<Property name="logs">${log4j:configParentLocation}/../../target/test-logs</Property>
<Property name="logs">${log4j:configParentLocation}/../../target/test-logs-${date:yyyyMMddHHmmssSSS}</Property>
<Property name="rollover.max.size">10MB</Property>
<Property name="rollover.max">14</Property>
<Property name="rollover.file.pattern">%d{yyyyMMddHHmmss}</Property>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Properties>
<Property name="logs">${log4j:configParentLocation}/../../target/test-logs</Property>
<Property name="logs">${log4j:configParentLocation}/../../target/test-logs-${date:yyyyMMddHHmmssSSS}-${date:yyyyMMddHHmmssSSS}</Property>
<Property name="rollover.max.size">10MB</Property>
<Property name="rollover.max">14</Property>
<Property name="rollover.file.pattern">%d{yyyyMMddHHmmss}</Property>
Expand Down
2 changes: 1 addition & 1 deletion extensions/xqdoc/src/test/resources/log4j2.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Properties>
<Property name="logs">${log4j:configParentLocation}/../../target/test-logs</Property>
<Property name="logs">${log4j:configParentLocation}/../../target/test-logs-${date:yyyyMMddHHmmssSSS}-${date:yyyyMMddHHmmssSSS}</Property>
<Property name="rollover.max.size">10MB</Property>
<Property name="rollover.max">14</Property>
<Property name="rollover.file.pattern">%d{yyyyMMddHHmmss}</Property>
Expand Down

0 comments on commit 67532c1

Please sign in to comment.