Search in sources :

Example 31 with Ignore

use of org.junit.Ignore in project jetty.project by eclipse.

the class ObjectMBeanTest method testThreadPool.

@Test
@Ignore("ignore, used in testing jconsole atm")
public void testThreadPool() throws Exception {
    Derived derived = new Derived();
    ObjectMBean mbean = (ObjectMBean) ObjectMBean.mbeanFor(derived);
    ObjectMBean managed = (ObjectMBean) ObjectMBean.mbeanFor(derived.getManagedInstance());
    mbean.setMBeanContainer(container);
    managed.setMBeanContainer(container);
    QueuedThreadPool qtp = new QueuedThreadPool();
    ObjectMBean bqtp = (ObjectMBean) ObjectMBean.mbeanFor(qtp);
    bqtp.getMBeanInfo();
    container.beanAdded(null, derived);
    container.beanAdded(null, derived.getManagedInstance());
    container.beanAdded(null, mbean);
    container.beanAdded(null, managed);
    container.beanAdded(null, qtp);
    Thread.sleep(10000000);
}
Also used : Derived(com.acme.Derived) QueuedThreadPool(org.eclipse.jetty.util.thread.QueuedThreadPool) Ignore(org.junit.Ignore) Test(org.junit.Test)

Example 32 with Ignore

use of org.junit.Ignore in project jetty.project by eclipse.

the class MainTest method testListConfig.

@Test
@Ignore("Too noisy for general testing")
public void testListConfig() throws Exception {
    List<String> cmdLineArgs = new ArrayList<>();
    File testJettyHome = MavenTestingUtils.getTestResourceDir("dist-home");
    cmdLineArgs.add("user.dir=" + testJettyHome);
    cmdLineArgs.add("jetty.home=" + testJettyHome);
    cmdLineArgs.add("--list-config");
    // cmdLineArgs.add("--debug");
    Main main = new Main();
    StartArgs args = main.processCommandLine(cmdLineArgs.toArray(new String[cmdLineArgs.size()]));
    main.listConfig(args);
}
Also used : ArrayList(java.util.ArrayList) File(java.io.File) Ignore(org.junit.Ignore) Test(org.junit.Test)

Example 33 with Ignore

use of org.junit.Ignore in project jetty.project by eclipse.

the class TooFastClientTest method testUpgradeWithSmallFrames.

@Test
@Ignore("RELEASE")
public void testUpgradeWithSmallFrames() throws Exception {
    BlockheadClient client = new BlockheadClient(server.getServerUri());
    try {
        client.connect();
        // Create ByteBuffer representing the initial opening network packet from the client
        ByteBuffer initialPacket = ByteBuffer.allocate(4096);
        BufferUtil.clearToFill(initialPacket);
        // Add upgrade request to packet
        StringBuilder upgradeRequest = client.generateUpgradeRequest();
        ByteBuffer upgradeBuffer = BufferUtil.toBuffer(upgradeRequest.toString(), StandardCharsets.UTF_8);
        initialPacket.put(upgradeBuffer);
        // Add text frames
        Generator generator = new Generator(WebSocketPolicy.newClientPolicy(), new LeakTrackingBufferPoolRule("Generator"));
        String msg1 = "Echo 1";
        String msg2 = "This is also an echooooo!";
        TextFrame frame1 = new TextFrame().setPayload(msg1);
        TextFrame frame2 = new TextFrame().setPayload(msg2);
        // Need to set frame mask (as these are client frames)
        byte[] mask = new byte[] { 0x11, 0x22, 0x33, 0x44 };
        frame1.setMask(mask);
        frame2.setMask(mask);
        generator.generateWholeFrame(frame1, initialPacket);
        generator.generateWholeFrame(frame2, initialPacket);
        // Write packet to network
        BufferUtil.flipToFlush(initialPacket, 0);
        client.writeRaw(initialPacket);
        // Expect upgrade
        client.expectUpgradeResponse();
        // Read frames (hopefully text frames)
        EventQueue<WebSocketFrame> frames = client.readFrames(2, 1, TimeUnit.SECONDS);
        WebSocketFrame tf = frames.poll();
        Assert.assertThat("Text Frame/msg1", tf.getPayloadAsUTF8(), is(msg1));
        tf = frames.poll();
        Assert.assertThat("Text Frame/msg2", tf.getPayloadAsUTF8(), is(msg2));
    } finally {
        client.close();
    }
}
Also used : LeakTrackingBufferPoolRule(org.eclipse.jetty.websocket.common.test.LeakTrackingBufferPoolRule) BlockheadClient(org.eclipse.jetty.websocket.common.test.BlockheadClient) TextFrame(org.eclipse.jetty.websocket.common.frames.TextFrame) WebSocketFrame(org.eclipse.jetty.websocket.common.WebSocketFrame) ByteBuffer(java.nio.ByteBuffer) Generator(org.eclipse.jetty.websocket.common.Generator) Ignore(org.junit.Ignore) Test(org.junit.Test)

Example 34 with Ignore

use of org.junit.Ignore in project druid by druid-io.

the class GroupByQueryRunnerTest method testLimitPerGrouping.

@Ignore
@Test
public // in time when Druid does support this, we can re-evaluate this test.
void testLimitPerGrouping() {
    GroupByQuery query = new GroupByQuery.Builder().setDataSource(QueryRunnerTestHelper.dataSource).setGranularity(QueryRunnerTestHelper.dayGran).setDimensions(Arrays.<DimensionSpec>asList(new DefaultDimensionSpec(QueryRunnerTestHelper.marketDimension, QueryRunnerTestHelper.marketDimension))).setInterval(QueryRunnerTestHelper.firstToThird).setLimitSpec(new DefaultLimitSpec(Lists.newArrayList(new OrderByColumnSpec("rows", OrderByColumnSpec.Direction.DESCENDING)), 2)).setAggregatorSpecs(Lists.<AggregatorFactory>newArrayList(QueryRunnerTestHelper.rowsCount)).build();
    List<Row> expectedResults = Arrays.asList(GroupByQueryRunnerTestHelper.createExpectedRow("2011-04-01T00:00:00.000Z", "market", "spot", "rows", 9L), GroupByQueryRunnerTestHelper.createExpectedRow("2011-04-02T00:00:00.000Z", "market", "spot", "rows", 9L));
    Iterable<Row> results = GroupByQueryRunnerTestHelper.runQuery(factory, runner, query);
    Iterator resultsIter = results.iterator();
    Iterator expectedResultsIter = expectedResults.iterator();
    final Object next1 = resultsIter.next();
    Object expectedNext1 = expectedResultsIter.next();
    assertEquals("order-limit", expectedNext1, next1);
    final Object next2 = resultsIter.next();
    Object expectedNext2 = expectedResultsIter.next();
    Assert.assertNotEquals("order-limit", expectedNext2, next2);
}
Also used : OrderByColumnSpec(io.druid.query.groupby.orderby.OrderByColumnSpec) DefaultLimitSpec(io.druid.query.groupby.orderby.DefaultLimitSpec) Iterator(java.util.Iterator) Row(io.druid.data.input.Row) DoubleMaxAggregatorFactory(io.druid.query.aggregation.DoubleMaxAggregatorFactory) LongMaxAggregatorFactory(io.druid.query.aggregation.LongMaxAggregatorFactory) DoubleSumAggregatorFactory(io.druid.query.aggregation.DoubleSumAggregatorFactory) LongFirstAggregatorFactory(io.druid.query.aggregation.first.LongFirstAggregatorFactory) FilteredAggregatorFactory(io.druid.query.aggregation.FilteredAggregatorFactory) JavaScriptAggregatorFactory(io.druid.query.aggregation.JavaScriptAggregatorFactory) CardinalityAggregatorFactory(io.druid.query.aggregation.cardinality.CardinalityAggregatorFactory) LongSumAggregatorFactory(io.druid.query.aggregation.LongSumAggregatorFactory) CountAggregatorFactory(io.druid.query.aggregation.CountAggregatorFactory) HyperUniquesAggregatorFactory(io.druid.query.aggregation.hyperloglog.HyperUniquesAggregatorFactory) AggregatorFactory(io.druid.query.aggregation.AggregatorFactory) LongLastAggregatorFactory(io.druid.query.aggregation.last.LongLastAggregatorFactory) DefaultDimensionSpec(io.druid.query.dimension.DefaultDimensionSpec) Ignore(org.junit.Ignore) Test(org.junit.Test)

Example 35 with Ignore

use of org.junit.Ignore in project deeplearning4j by deeplearning4j.

the class SPTreeTest method testLargeTree.

@Test
@Ignore
public void testLargeTree() {
    int num = 100000;
    INDArray arr = Nd4j.linspace(1, num, num).reshape(num, 1);
    SpTree tree = new SpTree(arr);
}
Also used : INDArray(org.nd4j.linalg.api.ndarray.INDArray) Ignore(org.junit.Ignore) Test(org.junit.Test)

Aggregations

Ignore (org.junit.Ignore)5092 Test (org.junit.Test)4807 File (java.io.File)445 ArrayList (java.util.ArrayList)374 IOException (java.io.IOException)217 HashMap (java.util.HashMap)187 List (java.util.List)171 CountDownLatch (java.util.concurrent.CountDownLatch)118 Map (java.util.Map)103 LocalDate (java.time.LocalDate)94 Dataset (org.apache.jena.query.Dataset)93 InputStream (java.io.InputStream)89 Date (java.util.Date)88 Random (java.util.Random)85 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)83 Properties (java.util.Properties)78 DistributedTest (org.apache.geode.test.junit.categories.DistributedTest)78 HashSet (java.util.HashSet)71 ByteArrayOutputStream (java.io.ByteArrayOutputStream)70 ExecutorService (java.util.concurrent.ExecutorService)70