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

If you like a tip written by other Samebug users, mark is as helpful! Marks help our algorithm provide you better solutions and also help other users.
tip

Check your pattern declaration or check your assert declaration.


rafael

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • {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}
    via by Peter Lynch,
  • Source build breaks on BridJ
    via GitHub by ochafik
    ,
  • Source Code - releasenotes.html
    via by Unknown author,
  • Hadoop 2.6.0 Release Notes
    via by Unknown author,
    • 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)

    Users with the same issue

    jf-ast
    jf-ast13 times, last one,
    odd
    odd1 times, last one,
    jokester
    jokester2 times, last one,
    Axelo
    Axelo7 times, last one,
    andyglick
    andyglick1 times, last one,
    94 more bugmates