ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Kukushkin (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (IGNITE-9197) Java thin client querying empty table results in NoSuchElementException
Date Tue, 07 Aug 2018 08:25:00 GMT

    [ https://issues.apache.org/jira/browse/IGNITE-9197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16570447#comment-16570447
] 

Alexey Kukushkin edited comment on IGNITE-9197 at 8/7/18 8:24 AM:
------------------------------------------------------------------

TeamCity: [https://ci.ignite.apache.org/viewType.html?buildTypeId=IgniteTests24Java8_RunAll&branch_IgniteTests24Java8=pull%2F4488%2Fhead&tab=buildTypeStatusDiv] -
the results look OK, all the test failures are unrelated. 


was (Author: kukushal):
TeamCity: https://ci.ignite.apache.org/viewType.html?buildTypeId=IgniteTests24Java8_RunAll&branch_IgniteTests24Java8=pull%2F4488%2Fhead&tab=buildTypeStatusDiv

> Java thin client querying empty table results in NoSuchElementException
> -----------------------------------------------------------------------
>
>                 Key: IGNITE-9197
>                 URL: https://issues.apache.org/jira/browse/IGNITE-9197
>             Project: Ignite
>          Issue Type: Bug
>          Components: thin client
>    Affects Versions: 2.6
>            Reporter: Alexey Kukushkin
>            Assignee: Alexey Kukushkin
>            Priority: Critical
>             Fix For: 2.7
>
>
> +*Reproducer*+
> {code:java}
> @Test
> public void testGettingEmptyResultWhenQueryingEmptyTable() throws Exception {
>     try (Ignite ignored = Ignition.start(Config.getServerConfiguration());
>          IgniteClient client = Ignition.startClient(new ClientConfiguration().setAddresses(Config.SERVER))
>     ) {
>         final String TBL = "Person";
>         client.query(
>             new SqlFieldsQuery("CREATE TABLE IF NOT EXISTS " + TBL + " (id INT PRIMARY
KEY, name VARCHAR)")
>         ).getAll();
>         List<List<?>> res = client.query(new SqlFieldsQuery("SELECT * FROM
" + TBL)).getAll();
>         assertNotNull(res);
>         assertEquals(0, res.size());
>     }
> }
> {code}
> *Expected*
> The test above should pass
> *Actual*
> java.util.NoSuchElementException
>  at java.util.ArrayList$Itr.next(ArrayList.java:862)
>  at org.apache.ignite.internal.client.thin.ClientQueryCursor$1.next(ClientQueryCursor.java:87)
>  at org.apache.ignite.internal.client.thin.ClientQueryCursor.getAll(ClientQueryCursor.java:45)
>  at org.apache.ignite.client.FunctionalQueryTest.testGettingEmptyResultWhenQueryingEmptyTable(FunctionalQueryTest.java:171)
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message