tests: close requests

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1023603 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2010-10-18 00:14:17 +00:00
parent d56d528489
commit 342d75e92d
1 changed files with 3 additions and 2 deletions

View File

@ -65,7 +65,7 @@ public class JSONWriterTest extends SolrTestCaseJ4 {
buf = new StringWriter(); buf = new StringWriter();
w.write(buf, req, rsp); w.write(buf, req, rsp);
assertEquals(buf.toString(), "{\"data1\":\"NaN\",\"data2\":\"-Infinity\",\"data3\":\"Infinity\"}"); assertEquals(buf.toString(), "{\"data1\":\"NaN\",\"data2\":\"-Infinity\",\"data3\":\"Infinity\"}");
req.close();
} }
@Test @Test
@ -80,6 +80,7 @@ public class JSONWriterTest extends SolrTestCaseJ4 {
rsp.add("data3", true); rsp.add("data3", true);
w.write(buf, req, rsp); w.write(buf, req, rsp);
assertEquals(buf.toString(), "a:3:{s:5:\"data1\";s:5:\"hello\";s:5:\"data2\";i:42;s:5:\"data3\";b:1;}"); assertEquals(buf.toString(), "a:3:{s:5:\"data1\";s:5:\"hello\";s:5:\"data2\";i:42;s:5:\"data3\";b:1;}");
req.close();
} }
@Test @Test
@ -96,7 +97,7 @@ public class JSONWriterTest extends SolrTestCaseJ4 {
w.write(buf, req, rsp); w.write(buf, req, rsp);
assertEquals(buf.toString(), "{\"nl\":[[\"data1\",\"hello\"],[null,42]]}"); assertEquals(buf.toString(), "{\"nl\":[[\"data1\",\"hello\"],[null,42]]}");
req.close();
} }
} }