Elffuss BraidHub

kikocis/java-driver public

Fix some mapper tests for C* 1.2.
Changesetea7f986172f9eb9fa9a2bc38f4acbbd69cfdbf8b2f83a5a43e3fc361b5ece4f8
Authorolim7t <omichallat+github@gmail.com> · 2015-06-30 15:37 +02:00
Committerolim7t <omichallat+github@gmail.com> · 2015-06-30 15:48 +02:00
Parents5dad311f5093

Browse the files at this changeset

1 file changed

modified driver-mapping/src/test/java/com/datastax/driver/mapping/MapperTest.java +5 −2
@@ -16,6 +16,8 @@
1616 package com.datastax.driver.mapping;
1717
1818 import java.net.InetAddress;
19+
20+import com.datastax.driver.core.utils.CassandraVersion;
1921 import com.datastax.driver.mapping.annotations.Table;
2022 import java.util.*;
2123
@@ -312,6 +314,7 @@
312314 }
313315
314316 @Test(groups = "short")
317+ @CassandraVersion(major=2.0)
315318 public void testDynamicEntity() throws Exception {
316319 MappingManager manager = new MappingManager(session);
317320
@@ -400,7 +403,7 @@
400403 m.save(p3);
401404
402405 // Retrieve posts with a projection query that only retrieves some of the fields
403- ResultSet rs = session.execute("select user_id, post_id, title from posts where user_id = ?", u1.getUserId());
406+ ResultSet rs = session.execute("select user_id, post_id, title from posts where user_id = " + u1.getUserId());
404407
405408 Result<Post> result = m.map(rs);
406409 for (Post post : result) {
@@ -413,6 +416,6 @@
413416 }
414417
415418 // cleanup
416- session.execute("delete from posts where user_id = ?", u1.getUserId());
419+ session.execute("delete from posts where user_id = " + u1.getUserId());
417420 }
418421 }