forcedotcom / aura

This project is archived, please see the readme for additional resources.
Apache License 2.0
674 stars 333 forks source link

Not able to build aura project, failing aura-util test cases #175

Closed kjoshi07 closed 5 years ago

kjoshi07 commented 5 years ago

I have cloned the Auro Github repo and tried to build by running mvn clean install but could not build it due to below tests failed, any help would be appreciated.

Results :

Failed tests:
  IOUtilTest.testDelete:88 test cleanup failed
  DateServiceTest.testGetDateISO8601Converter:178->UnitTestCase.goldFileText:208->UnitTestCase.goldFileText:218 Gold file differences found, review updated gold file before committing: file:/C:/Users/User/salesforce/aura/aura-util/src/test/results/DateServiceTest/testGetDateISO8601Converter.txt
Differences:

diff:

  DateServiceTest.testGetDateStyleConverter_locale_dateStyle:254->UnitTestCase.goldFileText:208->UnitTestCase.goldFileText:218 Gold file differences found, review updated gold file before committing: file:/C:/Users/User/salesforce/aura/aura-util/src/test/results/DateServiceTest/testGetDateStyleConverter_locale_dateStyle.txt
Differences:

diff:

  DateServiceTest.testGetDateTimeISO8601Converter:157->UnitTestCase.goldFileText:208->UnitTestCase.goldFileText:218 Gold file differences found, review updated gold file before committing: file:/C:/Users/User/salesforce/aura/aura-util/src/test/results/DateServiceTest/testGetDateTimeISO8601Converter.txt
Differences:

diff:

  DateServiceTest.testGetDateTimeStyleConverter_locale_dateStyle_timeStyle:325->UnitTestCase.goldFileText:208->UnitTestCase.goldFileText:218 Gold file differences found, review updated gold file before committing: file:/C:/Users/User/salesforce/aura/aura-util/src/test/results/DateServiceTest/testGetDateTimeStyleConverter_locale_dateStyle_timeStyle.txt
Differences:

diff:

  DateServiceTest.testGetGenericISO8601Converter:221->UnitTestCase.goldFileText:208->UnitTestCase.goldFileText:218 Gold file differences found, review updated gold file before committing: file:/C:/Users/User/salesforce/aura/aura-util/src/test/results/DateServiceTest/testGetGenericISO8601Converter.txt
Differences:

diff:

  DateServiceTest.testGetPatternConverter_locale_pattern:360->UnitTestCase.goldFileText:208->UnitTestCase.goldFileText:218 Gold file differences found, review updated gold file before committing: file:/C:/Users/User/salesforce/aura/aura-util/src/test/results/DateServiceTest/testGetPatternConverter_locale_pattern.txt
Differences:

diff:

  DateServiceTest.testGetTimeStyleConverter_locale_timeStyle:288->UnitTestCase.goldFileText:208->UnitTestCase.goldFileText:218 Gold file differences found, review updated gold file before committing: file:/C:/Users/User/salesforce/aura/aura-util/src/test/results/DateServiceTest/testGetTimeStyleConverter_locale_timeStyle.txt
Differences:

diff:

  CommonJavascriptGroupImplTest.testBasicInitialization:82 Addition of a valid javascript file failed
  DirectiveBasedJavascriptGroupTest.testJavascriptGenerationDevelopment:118->doTestJavascriptGeneration:183->UnitTestCase.goldFileText:218 Gold file differences found, review updated gold file before committing: file:/C:/Users/User/salesforce/aura/aura-util/src/test/results/DirectiveBasedJavascriptGroupTest/testJavascriptGenerationDevelopment/testDummy_dev.js
Differences:

diff:

  DirectiveBasedJavascriptGroupTest.testJavascriptGenerationProduction:113->doTestJavascriptGeneration:183->UnitTestCase.goldFileText:218 Gold file differences found, review updated gold file before committing: file:/C:/Users/User/salesforce/aura/aura-util/src/test/results/DirectiveBasedJavascriptGroupTest/testJavascriptGenerationProduction/testDummy_prod.js
Differences:

diff:

  DirectiveParserTest.testAllKindsOfDirectiveGenerate:145->UnitTestCase.goldFileText:218 Gold file differences found, review updated gold file before committing: file:/C:/Users/User/salesforce/aura/aura-util/src/test/results/DirectiveParserTest/testAllKindsOfDirectiveGenerate_test.js
Differences:

diff:

  DirectiveParserTest.testMultilineDirective:113->UnitTestCase.goldFileText:218 Gold file differences found, review updated gold file before committing: file:/C:/Users/User/salesforce/aura/aura-util/src/test/results/DirectiveParserTest/testMultilineDirective.js
Differences:

diff:

  DirectiveParserTest.testZeroDirectiveTypes:48->UnitTestCase.goldFileText:218 Gold file differences found, review updated gold file before committing: file:/C:/Users/User/salesforce/aura/aura-util/src/test/results/DirectiveParserTest/testZeroDirectiveTypes.js
Differences:

diff:

  JavascriptGeneratorTest.testGeneration:29->UnitTestCase.goldFileText:218 Gold file differences found, review updated gold file before committing: file:/C:/Users/User/salesforce/aura/aura-util/src/test/results/JavascriptGeneratorTest/testGeneration_mock1.js
Differences:

diff:

  IfDirectiveTest.testJSSourceWithIfDirective:65->UnitTestCase.goldFileText:218 Gold file differences found, review updated gold file before committing: file:/C:/Users/User/salesforce/aura/aura-util/src/test/results/IfDirectiveTest/testJSSourceWithIfDirective_test.js
Differences:

diff:

  IncludeDirectiveTest.testIncludeDirective:126->UnitTestCase.goldFileText:218 Gold file differences found, review updated gold file before committing: file:/C:/Users/User/salesforce/aura/aura-util/src/test/results/IncludeDirectiveTest/testIncludeDirective_test.js
Differences:

diff:

  ResourceLoaderTest.testCacheDirParentIsAFile:235
Tests in error:
  DirectoryCleanerTest.testDirectoryCleanerWithProtectedDirectory:73 ╗ UnsupportedOperation
org.auraframework.util.resource.ResourceLoaderTest.testCacheDirParentNotWritable(org.auraframework.util.resource.ResourceLoaderTest)
  Run 1: ResourceLoaderTest.testCacheDirParentNotWritable:250 Should have failed to cache resource
  Run 2: ResourceLoaderTest>UnitTestCase.legacyTearDown:110->tearDown:111 ╗ DeleteFailed

org.auraframework.util.resource.ResourceLoaderTest.testGetResourceCachedMissingVersion(org.auraframework.util.resource.ResourceLoaderTest)
  Run 1: ResourceLoaderTest.testGetResourceCachedMissingVersion:428->createJarResourceLoader:137->createJarFromFolder:536 ╗ URISyntax
  Run 2: ResourceLoaderTest>UnitTestCase.legacyTearDown:110->tearDown:111 ╗ DeleteFailed

org.auraframework.util.resource.ResourceLoaderTest.testGetResourceNotCached(org.auraframework.util.resource.ResourceLoaderTest)
  Run 1: ResourceLoaderTest.testGetResourceNotCached:285->createJarResourceLoader:137->createJarFromFolder:536 ╗ URISyntax
  Run 2: ResourceLoaderTest>UnitTestCase.legacyTearDown:110->tearDown:111 ╗ DeleteFailed

org.auraframework.util.resource.ResourceLoaderTest.testObstructedRecurisvely(org.auraframework.util.resource.ResourceLoaderTest)
  Run 1: ResourceLoaderTest.testObstructedRecurisvely:479->createJarResourceLoader:137->createJarFromFolder:536 ╗ URISyntax
  Run 2: ResourceLoaderTest>UnitTestCase.legacyTearDown:110->tearDown:111 ╗ DeleteFailed

Tests run: 234, Failures: 18, Errors: 5, Skipped: 2

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Aura Framework ..................................... SUCCESS [01:04 min]
[INFO] aura-interfaces .................................... SUCCESS [ 50.949 s]
[INFO] aura-spring ........................................ SUCCESS [ 49.861 s]
[INFO] aura-util .......................................... FAILURE [01:01 min]
[INFO] aura ............................................... SKIPPED
[INFO] aura-impl-expression ............................... SKIPPED
[INFO] aura-impl .......................................... SKIPPED
[INFO] aura-tools ......................................... SKIPPED
[INFO] aura-components .................................... SKIPPED
[INFO] aura-modules ....................................... SKIPPED
[INFO] aura-resources ..................................... SKIPPED
[INFO] aura-integration-test .............................. SKIPPED
[INFO] aura-jetty ......................................... SKIPPED
[INFO] archetype for Aura-based "hello, world" ............ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 04:00 min
[INFO] Finished at: 2018-11-21T21:58:41+05:30
[INFO] Final Memory: 25M/491M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project aura-util: There are test failures.
[ERROR]
[ERROR] Please refer to C:\Users\User\salesforce\aura\aura-util\target\surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
FabienTaillon commented 5 years ago

I had the same issue today. I ran mvn clean install again and it worked at this step the 2nd time, but still fails at aura-impl tests.

FabienTaillon commented 5 years ago

Looks like a duplicate of this one: https://github.com/forcedotcom/aura/issues/160

lukeis commented 5 years ago

I don't think anyone at Salesforce uses Windows to build aura (Mac or Linux only). I think the gold file failures you are encountering are differences in line endings. You can attempt to skip running the unit tests by running: mvn clean install -DskipUnitTests=true

I'm not sure what's causing the DeleteFailed issue, I have not encountered that one. Possibly an issue running on windows too and something the test is trying to do.

FabienTaillon commented 5 years ago

I'm on a Mac so don't know it failed the first time, nor why it failed at a later step the second time, but it worked fine when I skipped the unit tests. Thanks.