@Test
public void testEntryWriteCreateTable() throws Exception {
Ignite ignite = startGridWithLogCapture();
IgniteCache def = ignite.createCache("default");
def.query(new SqlFieldsQuery("CREATE TABLE binary (id INT PRIMARY KEY, str VARCHAR) " +
"WITH \"cache_name=binary, key_type=IdKey, value_type=Payload\"").setSchema("PUBLIC"));
IgniteCache<Integer, Payload> binary = ignite.cache("binary");
binary.put(1, new Payload("foo"));
binary.put(2, new Payload("bar"));
assertEquals(0, countRows(binary));
assertContainsExactlyOnce(capture.toString(), MESSAGE_PAYLOAD_VALUE);
capture.reset();
def.query(new SqlFieldsQuery("CREATE TABLE binary2 (id INT PRIMARY KEY, str VARCHAR) " +
"WITH \"cache_name=binary2, key_type=IdKey, value_type=Payload\"").setSchema("PUBLIC"));
IgniteCache<Integer, Payload> binary2 = ignite.cache("binary2");
binary2.put(1, new Payload("foo"));
binary2.put(2, new Payload("bar"));
assertEquals(0, countRows(binary2));
assertContainsExactlyOnce(capture.toString(), MESSAGE_PAYLOAD_VALUE);
}