3636import com .google .cloud .spanner .connection .ConnectionOptions ;
3737import com .google .cloud .spanner .connection .ITAbstractSpannerTest ;
3838import com .google .cloud .spanner .connection .SqlScriptVerifier ;
39+ import java .util .Arrays ;
3940import java .util .Collections ;
4041import org .junit .Before ;
4142import org .junit .BeforeClass ;
@@ -101,7 +102,6 @@ public void testDefaultSequenceKind() {
101102 1L , connection .executeUpdate (Statement .of ("insert into test (value) values ('One')" )));
102103 try (ResultSet resultSet = connection .executeQuery (Statement .of ("select * from test" ))) {
103104 assertTrue (resultSet .next ());
104- assertEquals (4611686018427387904L , resultSet .getLong (0 ));
105105 assertEquals ("One" , resultSet .getString (1 ));
106106 assertFalse (resultSet .next ());
107107 }
@@ -147,7 +147,6 @@ public void testDefaultSequenceKind_PostgreSQL() throws Exception {
147147 1L , connection .executeUpdate (Statement .of ("insert into test (value) values ('One')" )));
148148 try (ResultSet resultSet = connection .executeQuery (Statement .of ("select * from test" ))) {
149149 assertTrue (resultSet .next ());
150- assertEquals (4611686018427387904L , resultSet .getLong (0 ));
151150 assertEquals ("One" , resultSet .getString (1 ));
152151 assertFalse (resultSet .next ());
153152 }
@@ -173,7 +172,7 @@ public void testDefaultSequenceKindInBatch() {
173172 connection .execute (statement2 );
174173 SpannerBatchUpdateException exception =
175174 assertThrows (SpannerBatchUpdateException .class , connection ::runBatch );
176- assertEquals (0 , exception .getUpdateCounts (). length );
175+ assertEquals (0 , Arrays . stream ( exception .getUpdateCounts ()). sum () );
177176
178177 // Setting a default sequence kind on the connection should make the statement succeed.
179178 connection .setDefaultSequenceKind ("bit_reversed_positive" );
0 commit comments