Package org.junit.internal

Examples of org.junit.internal.AssumptionViolatedException


            if (e
                .getMessage()
                .endsWith(" doesn't recognize feature http://apache.org/xml/features/validation/schema")
                || e.getMessage().endsWith(
                    " doesn't support feature http://apache.org/xml/features/validation/schema")) {
                throw new AssumptionViolatedException("parser doesn't support schema");
            } else {
                assertTrue(
                    e.getMessage().indexOf("not a valid XML document") > -1);
            }
        }
View Full Code Here


            public void run() {
                try {
                    // wait a little bit to have the target executed
                    Thread.sleep(500);
                } catch (InterruptedException e) {
                    throw new AssumptionViolatedException("Thread interrupted", e);
                }
                try {
                    out.write("foo-FlushedInput\n".getBytes());
                } catch (IOException e) {
                    throw new RuntimeException(e);
View Full Code Here

                while (!done)
                {
                    try {
                        wait();
                    } catch (InterruptedException ie) {
                        throw new AssumptionViolatedException("Thread interrupted", ie);
                    }
                }
            }

            System.out.println("TestProcess shut down");
View Full Code Here

            System.out.println(Thread.currentThread().getName());

            try {
                Thread.sleep(2000);
            } catch (InterruptedException ie) {
                throw new AssumptionViolatedException("Thread interrupted", ie);
            }
        }

        synchronized(this)
        {
View Full Code Here

  /**
   * Check on zombie threads status.
   */
  static void checkZombies() throws AssumptionViolatedException {
    if (zombieMarker.get()) {
      throw new AssumptionViolatedException("Leaked background threads present (zombies).");
    }
  }
View Full Code Here

    if (!IOUtil.isSerializable(t)) {
      // If we have an assumption failure wrapped in an InvocationTargetException, rethrow a new
      // AssumptionViolatedException that just containing the message
      InvocationTargetException ite = JuObjectUtils.as(t, InvocationTargetException.class);
      if (ite != null && ite.getTargetException() instanceof AssumptionViolatedException) {
        throw new AssumptionViolatedException(ite.getTargetException().getMessage());
      }

     
      XString causes = new XString("%s (Original Exception %s not serializable. Resolving chain"
          , t.getMessage()
View Full Code Here

    if (!IOUtil.isSerializable(t)) {
      // If we have an assumption failure wrapped in an InvocationTargetException, rethrow a new
      // AssumptionViolatedException that just containing the message
      InvocationTargetException ite = JuObjectUtils.as(t, InvocationTargetException.class);
      if (ite != null && ite.getTargetException() instanceof AssumptionViolatedException) {
        throw new AssumptionViolatedException(ite.getTargetException().getMessage());
      }

      // Use cause (if possible / serializable)
      Throwable cause = IOUtil.isSerializable(t.getCause())
          ? t.getCause()
View Full Code Here

    if (!IOUtil.isSerializable(t)) {
      // If we have an assumption failure wrapped in an InvocationTargetException, rethrow a new
      // AssumptionViolatedException that just containing the message
      InvocationTargetException ite = JuObjectUtils.as(t, InvocationTargetException.class);
      if (ite != null && ite.getTargetException() instanceof AssumptionViolatedException) {
        throw new AssumptionViolatedException(ite.getTargetException().getMessage());
      }

     
      XString causes = new XString("%s (Original Exception %s not serializable. Resolving chain"
          , t.getMessage()
View Full Code Here

      } catch (Throwable t) {
        throw new RuntimeException("Error collecting parameters from: " + m, t);
      }

      if (result.isEmpty()) {
        throw new AssumptionViolatedException("Parameters set should not be empty. Ignoring tests.");
      }

      parameters.addAll(result);
    }
View Full Code Here

      }

      @Override
      public void testAssumptionFailure(Failure failure) {
          // AssumptionViolatedException might not be Serializable. Recreate with only String message.
          exception = new AssumptionViolatedException(failure.getException().getMessage());
          exception.setStackTrace(failure.getException().getStackTrace());;
      }
View Full Code Here

TOP

Related Classes of org.junit.internal.AssumptionViolatedException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.