@Ignore @Test public void testAsynPut() throws IOException, InterruptedException, ExecutionException { client.use("kk"); for (int i = 0; i < 3; i++) { Job job = new Job("haha".getBytes()); Assert.assertEquals(0, client.asynput(job)); } }
@Test public void testAsynReserve() throws IOException, InterruptedException, ExecutionException { client.watch("kk"); for (int i = 0; i < 3; i++) { client.asynreserve(); } List<Job> jobs = client.getJobs(3); Assert.assertEquals("haha", new String(jobs.get(0).getData())); client.stop(); }
@Ignore @Test public void testReserve() throws IOException, InterruptedException, ExecutionException { client.watch("kk"); for (int i = 0; i < 6; i++) { Job job = client.reserve(); Assert.assertEquals("haha", new String(job.getData())); client.delete(job); } }
@Test public void testPut() throws IOException { client.use("kk"); for (int i = 0; i < 3; i++) { Job job = new Job("haha".getBytes()); int res = client.put(job); Assert.assertEquals(0, res); ; } }
@Test public void testStats() throws IOException, InterruptedException, ExecutionException { Assert.assertNotNull(client.stats(servers.get(0)).get("cmd-reserve")); }