Elffuss BraidHub

kikocis/java-driver public

Fix locale-specific bug in tests.
Changeset9887657e9b5e477284e573b4d31bb344e8bd1f80ce04da187a137cbecf673895
Authorolim7t <omichallat+github@gmail.com> · 2014-07-29 21:07 +02:00
Committerolim7t <omichallat+github@gmail.com> · 2014-07-29 21:07 +02:00
Parentse8805fe5e9ad

Browse the files at this changeset

1 file changed

modified driver-core/src/test/java/com/datastax/driver/core/SessionTest.java +4 −3
@@ -18,6 +18,7 @@
1818 import java.util.Arrays;
1919 import java.util.Collection;
2020 import java.util.List;
21+import java.util.Locale;
2122
2223 import org.testng.annotations.Test;
2324 import static org.testng.Assert.assertEquals;
@@ -45,7 +46,7 @@
4546 public void executeTest() throws Exception {
4647 // Simple calls to all versions of the execute/executeAsync methods
4748 String key = "execute_test";
48- ResultSet rs = session.execute(String.format(TestUtils.INSERT_FORMAT, TABLE1, key, "foo", 42, 24.03f));
49+ ResultSet rs = session.execute(String.format(Locale.US, TestUtils.INSERT_FORMAT, TABLE1, key, "foo", 42, 24.03f));
4950 assertTrue(rs.isExhausted());
5051
5152 // execute
@@ -62,7 +63,7 @@
6263 // Simple calls to all versions of the execute/executeAsync methods for prepared statements
6364 // Note: the goal is only to exercice the Session methods, PreparedStatementTest have better prepared statement tests.
6465 String key = "execute_prepared_test";
65- ResultSet rs = session.execute(String.format(TestUtils.INSERT_FORMAT, TABLE2, key, "foo", 42, 24.03f));
66+ ResultSet rs = session.execute(String.format(Locale.US, TestUtils.INSERT_FORMAT, TABLE2, key, "foo", 42, 24.03f));
6667 assertTrue(rs.isExhausted());
6768
6869 PreparedStatement p = session.prepare(String.format(TestUtils.SELECT_ALL_FORMAT + " WHERE k = ?", TABLE2));
@@ -113,7 +114,7 @@
113114
114115 // Simple calls to all versions of the execute/executeAsync methods
115116 String key = "execute_compressed_test";
116- ResultSet rs = compressedSession.execute(String.format(TestUtils.INSERT_FORMAT, TABLE3, key, "foo", 42, 24.03f));
117+ ResultSet rs = compressedSession.execute(String.format(Locale.US, TestUtils.INSERT_FORMAT, TABLE3, key, "foo", 42, 24.03f));
117118 assertTrue(rs.isExhausted());
118119
119120 String SELECT_ALL = String.format(TestUtils.SELECT_ALL_FORMAT + " WHERE k = '%s'", TABLE3, key);