()
| 1197 | |
| 1198 | // TODO - to be fixed in the source code |
| 1199 | @Test (expected = ArrayIndexOutOfBoundsException.class) |
| 1200 | public void handleMetaZnodeUpperLimitofMeta() throws Exception { |
| 1201 | final ZKCallback cb = zk_client.new ZKCallback(); |
| 1202 | final byte[] string = "127.0.0.1,50511,1388534400000".getBytes(CHARSET); |
| 1203 | final byte[] data = new byte[string.length + 65004]; |
| 1204 | data[0] = ZKCallback.MAGIC; |
| 1205 | Bytes.setInt(data, 64999, 1); |
| 1206 | System.arraycopy(string, 0, data, 65004, string.length); |
| 1207 | |
| 1208 | final RegionClient rc = cb.handleMetaZnode(data); |
| 1209 | assertNotNull(rc); |
| 1210 | assertEquals("127.0.0.1:50511", rc.getRemoteAddress()); |
| 1211 | verifyPrivate(client).invoke("newClient", "127.0.0.1", 50511); |
| 1212 | } |
| 1213 | |
| 1214 | @Test |
| 1215 | public void handleMetaZnodeNoPBufMagic() throws Exception { |
nothing calls this directly
no test coverage detected