Elffuss BraidHub

kikocis/java-driver public

Fix failing test.
Changeseta850c7fa6ed027bcb75ed58c706b5171c33418d32950e19dcc16da216f6e0b52
AuthorAlexandre Dutra <alexandre.dutra@datastax.com> · 2015-06-30 16:30 +02:00
CommitterAlexandre Dutra <alexandre.dutra@datastax.com> · 2015-06-30 16:30 +02:00
Parents8d3529ec4748

Browse the files at this changeset

1 file changed

modified driver-core/src/test/java/com/datastax/driver/core/exceptions/FunctionExecutionExceptionTest.java +5 −5
@@ -29,14 +29,14 @@
2929 @Override
3030 protected Collection<String> getTableDefinitions() {
3131 return Lists.newArrayList(
32- "CREATE TABLE foo (k int primary key)",
33- "INSERT INTO foo (k) VALUES (0)",
34- "CREATE FUNCTION inverse(i int) RETURNS NULL ON NULL INPUT RETURNS double LANGUAGE java AS 'return 1.0/i;'"
32+ "CREATE TABLE foo (k int primary key, i int, l list<int>)",
33+ "INSERT INTO foo (k, i, l) VALUES (1, 1, [1])",
34+ "CREATE FUNCTION element_at(l list<int>, i int) RETURNS NULL ON NULL INPUT RETURNS int LANGUAGE java AS 'return (Integer) l.get(i);'"
3535 );
3636 }
3737
3838 @Test(groups = "short", expectedExceptions = FunctionExecutionException.class)
3939 public void should_throw_when_function_execution_fails() {
40- session.execute("SELECT inverse(k) FROM foo");
40+ session.execute("SELECT element_at(l, i) FROM foo WHERE k = 1");
4141 }
42-}
No newline at the end of the file
42+}