Package co.paralleluniverse.strands

Examples of co.paralleluniverse.strands.SuspendableRunnable


        }).start().join();
    }
   
    @Test
    public void testRunCommandString() throws ExecutionException, InterruptedException {
        new Fiber<Void>(new SuspendableRunnable() {
            @Override
            public void run() throws SuspendExecution, InterruptedException {
                Document res = mongoDb.runCommand("ping");
                assertEquals("1.0", res.get("ok").getValueAsString());
            }
View Full Code Here


        }).start().join();
    }

    @Test
    public void testRunCommandOptions() throws ExecutionException, InterruptedException {
        new Fiber<Void>(new SuspendableRunnable() {
            @Override
            public void run() throws SuspendExecution, InterruptedException {
                Document res = mongoDb.runCommand("ping", null);
                assertEquals("1.0", res.get("ok").getValueAsString());
            }
View Full Code Here

        }).start().join();
    }

    @Test
    public void testRunCommandNameIntValueOptions() throws ExecutionException, InterruptedException {
        new Fiber<Void>(new SuspendableRunnable() {
            @Override
            public void run() throws SuspendExecution, InterruptedException {
                Document res = mongoDb.runCommand("ping", 1, null);
                assertEquals("1.0", res.get("ok").getValueAsString());
            }
View Full Code Here

        }).start().join();
    }

    @Test
    public void testRunCommandNameStringValueOptions() throws ExecutionException, InterruptedException {
        new Fiber<Void>(new SuspendableRunnable() {
            @Override
            public void run() throws SuspendExecution, InterruptedException {
                Document res = mongoDb.runCommand("ping", "1", null);
                assertEquals("1.0", res.get("ok").getValueAsString());
            }
View Full Code Here

        }).start().join();
    }
   
    @Test
    public void testRunCommandDocumentFuture() throws ExecutionException, InterruptedException {
        new Fiber<Void>(new SuspendableRunnable() {
            @Override
            public void run() throws SuspendExecution, InterruptedException {
                try {
                    Document res = addListenerCalledFlagSetter(mongoDb.runCommandAsync(BuilderFactory.start().add("ping", 1))).get();
                    assertEquals("1.0", res.get("ok").getValueAsString());
View Full Code Here

        }).start().join();
    }
   
    @Test
    public void testRunCommandStringFuture() throws ExecutionException, InterruptedException {
        new Fiber<Void>(new SuspendableRunnable() {
            @Override
            public void run() throws SuspendExecution, InterruptedException {
                try {
                    Document res = addListenerCalledFlagSetter(mongoDb.runCommandAsync("ping")).get();
                    assertEquals("1.0", res.get("ok").getValueAsString());
View Full Code Here

        }).start().join();
    }

    @Test
    public void testRunCommandOptionsFuture() throws ExecutionException, InterruptedException {
        new Fiber<Void>(new SuspendableRunnable() {
            @Override
            public void run() throws SuspendExecution, InterruptedException {
                try {
                    Document res = addListenerCalledFlagSetter(mongoDb.runCommandAsync("ping", null)).get();
                    assertEquals("1.0", res.get("ok").getValueAsString());
View Full Code Here

        }).start().join();
    }

    @Test
    public void testRunCommandNameIntValueOptionsFuture() throws ExecutionException, InterruptedException {
        new Fiber<Void>(new SuspendableRunnable() {
            @Override
            public void run() throws SuspendExecution, InterruptedException {
                try {
                    Document res = addListenerCalledFlagSetter(mongoDb.runCommandAsync("ping", 1, null)).get();
                    assertEquals("1.0", res.get("ok").getValueAsString());
View Full Code Here

        }).start().join();
    }

    @Test
    public void testRunCommandNameStringValueOptionsFuture() throws ExecutionException, InterruptedException {
        new Fiber<Void>(new SuspendableRunnable() {
            @Override
            public void run() throws SuspendExecution, InterruptedException {
                try {
                    Document res = addListenerCalledFlagSetter(mongoDb.runCommandAsync("ping", "1", null)).get();
                    assertEquals("1.0", res.get("ok").getValueAsString());
View Full Code Here

    }
   
    @Before
    public void setUpTest() throws ExecutionException, InterruptedException {
        super.setUpTestBase();
        new Fiber<Void>(new SuspendableRunnable() {
            @Override
            public void run() throws SuspendExecution, InterruptedException {
                mongoColl = mongoDb.getCollection(COLL_NAME);
                mongoColl.createIndex(Index.text(FIELD_STRING_NAME));
                insertTestSet();
View Full Code Here

TOP

Related Classes of co.paralleluniverse.strands.SuspendableRunnable

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.