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

ASF GitHub Bot commented on CALCITE-2219:
-----------------------------------------

Github user risdenk commented on a diff in the pull request:

    https://github.com/apache/calcite-avatica/pull/33#discussion_r193910328
  
    --- Diff: 
core/src/test/java/org/apache/calcite/avatica/AvaticaClosedCheckHelper.java ---
    @@ -0,0 +1,187 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to you under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + * http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.calcite.avatica;
    +
    +import org.junit.internal.Throwables;
    +import org.mockito.Answers;
    +import org.mockito.Mockito;
    +
    +import java.lang.reflect.InvocationTargetException;
    +import java.lang.reflect.Method;
    +import java.sql.SQLClientInfoException;
    +import java.sql.SQLException;
    +import java.sql.SQLFeatureNotSupportedException;
    +import java.util.Arrays;
    +import java.util.function.Function;
    +import java.util.function.Predicate;
    +import java.util.stream.Collectors;
    +import java.util.stream.Stream;
    +
    +import static org.hamcrest.CoreMatchers.endsWith;
    +import static org.hamcrest.CoreMatchers.instanceOf;
    +import static org.hamcrest.CoreMatchers.is;
    +import static org.junit.Assert.assertThat;
    +import static org.junit.Assert.fail;
    +
    +/**
    + * Helper class for tests checkign close behavior
    --- End diff --
    
    sp nit: checking


> Avatica Connection/Statement/ResultSet don't throw if resource is closed
> ------------------------------------------------------------------------
>
>                 Key: CALCITE-2219
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2219
>             Project: Calcite
>          Issue Type: Bug
>          Components: avatica
>            Reporter: Laurent Goujon
>            Assignee: Laurent Goujon
>            Priority: Major
>
> According to JDBC spec/Javadoc, almost all methods of 
> {{Connection}}/{{Statement}}/{{PreparedStatement}}/{{ResultSet}} should throw 
> an exception if resource is closed.



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

Reply via email to