[tarantool-patches] Re: [PATCH] jdbc: fix NPE in update

Alexander Turenko alexander.turenko at tarantool.org
Tue Sep 18 02:06:08 MSK 2018


Hi Sergei!

The patch looks good for me in general. Minor comments are below.

WBR, Alexander Turenko.

On Mon, Sep 17, 2018 at 06:09:14PM +0300, Sergei Kalashnikov wrote:
> Updated constants to be in sync with tarantool IPROTO.
> Added integration tests for the working JDBC functionality.
> Fixed travis script to use tarantool 2.0 which is required for SQL.
> Fixed failing user permission calls in tarantool initialization script.
> 
> Closes #39
> ---
> https://github.com/tarantool/tarantool-java/issues/39
> https://github.com/ztarvos/tarantool-java/commits/ztarvos/gh-39-fix-update-npe
> 
> diff --git a/.travis.yml b/.travis.yml
> index e0f434f..852807c 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -11,5 +11,5 @@ before_script:
>    - src/test/travis.pre.sh
>  
>  script:
> -  - mvn test
> +  - mvn verify

Maybe we should run both unit and integration tests. The master barnch
now have one unit test so maybe it worth to leave it here to don't
forget during future rebase on master.

> +            "INSERT INTO test_types VALUES(" +
> +                    "1," +
> +                    "'abcd'," + //CHAR
> +                    "'000000000000000000001'," + //VARCHAR
> +                    "'0000000000000000000000000000000001'," + //LONGVARCHAR
> +                    "100," + // NUMERIC
> +                    "100.1," + // DECIMAL
> +                    "1," + //BIT
> +                    "7," + //TINYINT
> +                    "1000," + //SMALLINT
> +                    "100," + //INTEGER
> +                    "100000000000000000," + //BIGINT
> +                    "-100.2," + //REAL
> +                    "100.3," + //FLOAT
> +                    "X'01020304'," + //BINARY
> +                    "X'0102030405'," +//VARBINARY
> +                    "X'010203040506'," + //LONGVARBINARY
> +                    "'1983-03-14'," + //DATE
> +                    "'12:01:06'," + //TIME
> +                    "129479994)" //TIMESTAMP
> +    };
> +

Can we also store expected values for
JdbcResultSetIT.{testGetColumnByIdx,testGetColumnByName}() somewhere
within this class to improve code locality?




More information about the Tarantool-patches mailing list