Pattern selector

Most relevant patterns first. Most helpful ones displayed. Click here to show all.

  1. JUnitTestRunner.main() has thrown an AssertionFailedError
    Apache Ant + JUnit
  2. JUnit fail method

Your stack trace compared to the selected pattern

Jump to solutionsExpand frames
junit.framework.AssertionFailedError: Unexpected exception See build/ql/tmp/hive.log, or try "ant test ... -Dtest.silent=false" to get more logs.
    at org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_inputddl5(
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(
13 frames hidden


JaviRpo2 months ago

AssertionFailedError is thrown when using JUnit's internal assertions methods compare two different values and those are not equal. Also, the developer can invoke the method when the test logic fails.

The simplest code to reproduce the error is the following:

import static;

public class FailTest { 

   public void shouldAssertStrings() { 
      if( ... ) {
         fail("Any message");

Mind the static import. The fail is part of the JUnit API.

External results for this pattern (10)

  1. Dawid Loubservia Google Groups6 days ago
    expected:<1> but was:<0>
    Show stack trace
  2. Dawid Loubservia Google Groups6 days ago
    Show stack trace
  3. El Deffovia Google Groups1 week ago
    Show stack trace
  4. Maxime Gréauvia JIRA1 week ago
    Expected: <null> but was: file:/srv/ciagent/workspace/target/test-classes/repo/MyClass.groovy
    Show stack trace
  5. Franz Willervia JIRA1 week ago
    Created Document not found! uid:create.test.1.3
    Show stack trace
  6. shinsuke-matvia GitHub2 weeks ago
    Expecting IllegalArgumentException - non-bracketing
    Show stack trace
  7. No message found for this stack trace.
    Show stack trace
  8. aarthipavia GitHub1 month ago
    expected:<982007015> but was:<1232306490>
    Show stack trace
  9. lewismcvia GitHub1 month ago
    Validation of file succeeded when it should have failed expected:<false> but was:<true>
    Show stack trace
  10. vijjusreevia GitHub2 months ago
    Query result size expected:<2> but was:<1>
    Show stack trace