@Test public void testPutFile3() { long reqId = 21; String path = "/a/b/testPutFile3"; boolean create = false; boolean append = true; byte[] data = new byte[] {6, 5, 4, 3, 2, 1, 0}; BinaryRawWriterEx message = createMessage(reqId, ModelStorateThinClientProcessor.PROCESSOR_ID, ModelStorateThinClientProcessor.Method.WRITE_FILE); message.writeString(path); message.writeBoolean(create); message.writeBoolean(append); message.writeByteArray(data); ClientCustomQueryRequest req = new ClientCustomQueryRequest(toReader(message)); ClientResponse resp = req.process(connCtx); assertEquals(ClientStatus.FAILED, resp.status()); assertFalse(resp.error().isEmpty()); }
private ClientResponse error(long requestId, String msg) { return new ClientResponse(requestId, msg); }
ModelStorateThinClientProcessor implements CustomQueryProcessor { private ClientResponse error(long requestId, String msg) { return new ClientResponse(requestId, msg); } }
ModelStorateThinClientProcessor implements CustomQueryProcessor { private ClientResponse error(long requestId, String msg) { return new ClientResponse(requestId, msg); } ModelStorateThinClientProcessor(ModelStorage modelStorage); }
ModelStorateThinClientProcessor implements CustomQueryProcessor { private ClientResponse error(long requestId, String msg) { return new ClientResponse(requestId, msg); } ModelStorateThinClientProcessor(ModelStorage modelStorage); @Override ClientResponse call(long requestId, byte methodId, BinaryRawReader reader); @Override String id(); }
ModelStorateThinClientProcessor implements CustomQueryProcessor { private ClientResponse error(long requestId, String msg) { return new ClientResponse(requestId, msg); } ModelStorateThinClientProcessor(ModelStorage modelStorage); @Override ClientResponse call(long requestId, byte methodId, BinaryRawReader reader); @Override String id(); static final String PROCESSOR_ID; }