Skip to content

Commit 32b8a6a

Browse files
committed
fix formatting
1 parent 4674134 commit 32b8a6a

File tree

2 files changed

+37
-35
lines changed

2 files changed

+37
-35
lines changed

micro-grizzly-with-jersey/src/test/java/app/publisher/binder/direct/AsyncPublisherTest.java

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,30 @@
1818

1919
@Microserver
2020
public class AsyncPublisherTest {
21-
RestAgent rest = new RestAgent();
22-
MicroserverApp server;
23-
@Before
24-
public void startServer(){
25-
26-
server = new MicroserverApp(()->"binder");
27-
server.start();
28-
29-
}
30-
31-
@After
32-
public void stopServer(){
33-
server.stop();
34-
}
35-
36-
@Test
37-
public void runAppAndBasicTest() throws InterruptedException, ExecutionException{
38-
39-
40-
//DirectMyIncovationHandler.captured=false;
41-
assertThat(rest.get("http://localhost:8080/binder/test"),is("hello world!"));
42-
//assertTrue(DirectMyIncovationHandler.captured);
43-
44-
45-
}
21+
RestAgent rest = new RestAgent();
22+
MicroserverApp server;
23+
24+
@Before
25+
public void startServer() {
26+
27+
server = new MicroserverApp(() -> "binder");
28+
server.start();
29+
30+
}
31+
32+
@After
33+
public void stopServer() {
34+
server.stop();
35+
}
36+
37+
@Test
38+
public void runAppAndBasicTest() throws InterruptedException, ExecutionException {
39+
40+
41+
//DirectMyIncovationHandler.captured=false;
42+
assertThat(rest.get("http://localhost:8080/binder/test"), is("hello world!"));
43+
//assertTrue(DirectMyIncovationHandler.captured);
44+
45+
46+
}
4647
}

micro-grizzly-with-jersey/src/test/java/app/publisher/binder/direct/AsyncResource.java

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,26 @@
1515
@Path("/test")
1616
public class AsyncResource {
1717

18-
private void sleep(){
18+
private void sleep() {
1919
try {
2020
Thread.sleep(10000);
2121
} catch (InterruptedException e) {
2222
e.printStackTrace();
2323
}
2424
}
2525

26-
@GET
27-
public Future<String> myEndPoint(){
28-
return Future.ofSupplier(()->{
26+
@GET
27+
public Future<String> myEndPoint() {
28+
return Future.ofSupplier(() -> {
2929
sleep();
30-
return "hello world!";
31-
}, Executors.newFixedThreadPool(1));
32-
}
30+
return "hello world!";
31+
}, Executors.newFixedThreadPool(1));
32+
}
33+
3334
@GET
34-
public ReactiveSeq<String> async2(){
35-
return Spouts.publishOn(Stream.of("hello"),Executors.newFixedThreadPool(1));
35+
public ReactiveSeq<String> async2() {
36+
return Spouts.publishOn(Stream.of("hello"), Executors.newFixedThreadPool(1));
3637
}
3738

38-
39+
3940
}

0 commit comments

Comments
 (0)