kikocis/java-driver public
Changesets · Branches · Tags · Compare
| Changeset | e732fdbdeb44d707e9b2ca795079a2651c434b466ed295138afd6d05c2b8a7a3 |
|---|---|
| Author | Alexandre Dutra <alexandre.dutra@datastax.com> · 2015-08-12 21:54 +02:00 |
| Committer | olim7t <omichallat+github@gmail.com> · 2015-08-19 19:47 +02:00 |
| Parents | d7f0623b9f4f |
1 file changed
modified driver-core/src/test/java/com/datastax/driver/core/CustomPayloadTest.java +5 −8
| @@ -180,17 +180,14 @@ | ||
| 180 | 180 | */ |
| 181 | 181 | @Test(groups = "short") |
| 182 | 182 | public void should_echo_custom_payload_when_paginating() throws Exception { |
| 183 | - session.execute("INSERT INTO t1 (c1) VALUES (1)"); | |
| 184 | - session.execute("INSERT INTO t1 (c1) VALUES (2)"); | |
| 185 | - Statement statement = session.newSimpleStatement("SELECT c2 FROM t1 where c1 IN (1,2)"); | |
| 183 | + session.execute("INSERT INTO t1 (c1, c2) VALUES (1, 'a')"); | |
| 184 | + session.execute("INSERT INTO t1 (c1, c2) VALUES (1, 'b')"); | |
| 185 | + Statement statement = session.newSimpleStatement("SELECT c2 FROM t1 where c1 = 1"); | |
| 186 | 186 | statement.setFetchSize(1); |
| 187 | 187 | statement.setOutgoingPayload(payload1); |
| 188 | 188 | ResultSet rows = session.execute(statement); |
| 189 | 189 | rows.all(); |
| 190 | - for (ExecutionInfo info : rows.getAllExecutionInfo()) { | |
| 191 | - Map<String, ByteBuffer> actual = info.getIncomingPayload(); | |
| 192 | - assertThat(actual).isEqualTo(payload1); | |
| 193 | - } | |
| 190 | + assertThat(rows.getAllExecutionInfo()).extracting("incomingPayload").containsOnly(payload1); | |
| 194 | 191 | } |
| 195 | 192 | |
| 196 | 193 | // TODO retries, spec execs |
| @@ -298,7 +295,7 @@ | ||
| 298 | 295 | |
| 299 | 296 | @Override |
| 300 | 297 | protected Collection<String> getTableDefinitions() { |
| 301 | - return Collections.singletonList("CREATE TABLE t1 (c1 int PRIMARY KEY, c2 text)"); | |
| 298 | + return Collections.singletonList("CREATE TABLE t1 (c1 int, c2 text, PRIMARY KEY (c1, c2))"); | |
| 302 | 299 | } |
| 303 | 300 | |
| 304 | 301 | } |