()
| 797 | } |
| 798 | |
| 799 | @Test |
| 800 | public void internalErrorDeprecatedJSON() { |
| 801 | HttpQuery query = NettyMocks.getQuery(tsdb, "/?json"); |
| 802 | try { |
| 803 | throw new Exception("Internal Error"); |
| 804 | } catch (Exception e) { |
| 805 | query.internalError(e); |
| 806 | } |
| 807 | assertEquals(HttpResponseStatus.INTERNAL_SERVER_ERROR, |
| 808 | query.response().getStatus()); |
| 809 | assertEquals( |
| 810 | "{\"err\":\"java.lang.Exception: Internal Error", |
| 811 | query.response().getContent().toString(Charset.forName("UTF-8")) |
| 812 | .substring(0, 43)); |
| 813 | } |
| 814 | |
| 815 | @Test |
| 816 | public void internalErrorDefaultSerializer() { |
nothing calls this directly
no test coverage detected