java.lang.AssertionError: Backup file: target/download-settings-template.maven-conf2098037507.test.dir/settings.xml.20120311 should have been created.

Sonatype JIRA | Peter Lynch | 5 years ago
  1. 0

    {noformat} Tests run: 10, Failures: 1, Errors: 0, Skipped: 1, Time elapsed: 1.73 sec <<< FAILURE! backupExistingSettingsInUserConfigDir(org.sonatype.nexus.plugin.DownloadSettingsTemplateMojoTest) Time elapsed: 0.246 sec <<< FAILURE! java.lang.AssertionError: Backup file: target/download-settings-template.maven-conf2098037507.test.dir/settings.xml.20120311 should have been created. at org.junit.Assert.fail(Assert.java:93) at org.junit.Assert.assertTrue(Assert.java:43) at org.sonatype.nexus.plugin.DownloadSettingsTemplateMojoTest.backupExistingSettingsInUserConfigDir(DownloadSettingsTemplateMojoTest.java:162) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) at org.junit.runners.ParentRunner.run(ParentRunner.java:300) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110) at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175) at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:107) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68) {noformat} Partial logs from test show that the date used in the backup file name is different from the date format used in the test: {noformat} [debug] Saving settings to user config directory: target/download-settings-template.maven-conf2098037507.test.dir [debug] Settings will be saved to: /Users/plynch/dev/sonatype/nexus-all/nexus/nexus-maven-plugins/nexus-maven-plugin/target/download-settings-template.maven-conf2098037507.test.dir/settings.xml [debug] Backing up old settings to: /Users/plynch/dev/sonatype/nexus-all/nexus/nexus-maven-plugins/nexus-maven-plugin/target/download-settings-template.maven-conf2098037507.test.dir/settings.xml.20120312 [info] Existing settings backed up to: /Users/plynch/dev/sonatype/nexus-all/nexus/nexus-maven-plugins/nexus-maven-plugin/target/download-settings-template.maven-conf2098037507.test.dir/settings.xml.20120312 [info] Settings saved to: /Users/plynch/dev/sonatype/nexus-all/nexus/nexus-maven-plugins/nexus-maven-plugin/target/download-settings-template.maven-conf2098037507.test.dir/settings.xml {noformat}

    Sonatype JIRA | 5 years ago | Peter Lynch
    java.lang.AssertionError: Backup file: target/download-settings-template.maven-conf2098037507.test.dir/settings.xml.20120311 should have been created.
  2. 0

    cannot build latest on master branch

    GitHub | 2 years ago | Ed42
    java.lang.AssertionError: latch was counted down
  3. 0

    race condition building reactor from source?

    GitHub | 2 years ago | Ed42
    java.lang.AssertionError: latch was counted down
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    testGetKeyForStudent fails the regex match

    GitHub | 3 years ago | damithc
    java.lang.AssertionError: agt0ZWFtbWF0ZXN2NHIPCxIHU3R1ZGVudBj-7gEM[length=40][reg=false] is not as expected
  6. 0

    testGetKeyForStudent() new method to validate key

    GitHub | 3 years ago | damithc
    java.lang.AssertionError: ah10ZWFtbWF0ZXMtdGVhbTYtemhhbmdoYW9xaWFuZ3IPCxIHU3R1ZGVudBjUnAEM[length=64] is not as expected

  1. andyglick 2 times, last 3 months ago
  2. WoodenDoors 2 times, last 8 months ago
10 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.AssertionError

    Backup file: target/download-settings-template.maven-conf2098037507.test.dir/settings.xml.20120311 should have been created.

    at org.junit.Assert.fail()
  2. JUnit
    Assert.assertTrue
    1. org.junit.Assert.fail(Assert.java:93)
    2. org.junit.Assert.assertTrue(Assert.java:43)
    2 frames
  3. ${project.groupId}:${project.artifactId}
    DownloadSettingsTemplateMojoTest.backupExistingSettingsInUserConfigDir
    1. org.sonatype.nexus.plugin.DownloadSettingsTemplateMojoTest.backupExistingSettingsInUserConfigDir(DownloadSettingsTemplateMojoTest.java:162)
    1 frame
  4. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    4. java.lang.reflect.Method.invoke(Method.java:597)
    4 frames
  5. JUnit
    ParentRunner.run
    1. org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
    2. org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    3. org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
    4. org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    5. org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    6. org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
    7. org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
    8. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
    9. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
    10. org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    11. org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    12. org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    13. org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    14. org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    15. org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    15 frames
  6. JUnit4 Provider
    JUnit4Provider.invoke
    1. org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
    2. org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
    3. org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
    3 frames
  7. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    4. java.lang.reflect.Method.invoke(Method.java:597)
    4 frames
  8. SureFire
    ForkedBooter.main
    1. org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
    2. org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
    3. org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175)
    4. org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:107)
    5. org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68)
    5 frames