Commit Graph

332 Commits

Author SHA1 Message Date
Juergen Hoeller
c44bb29aa5 Polishing 2024-01-09 12:56:52 +01:00
Juergen Hoeller
99327b7db1 Preserve nested square brackets within parameter name
Closes gh-31596
2023-11-14 12:51:19 +01:00
Sam Brannen
c5bcfc7682 Polish contribution
See gh-31554
2023-11-07 17:08:44 +01:00
Sam Brannen
5752e03d97 Polishing 2023-11-07 16:58:21 +01:00
Stéphane Nicoll
50e55d5219 Polish "Add SAP HANA duplicate key exception error code"
See gh-31554
2023-11-07 10:33:14 +01:00
Juergen Hoeller
659500bc1f Polishing 2023-09-13 17:27:32 +02:00
Juergen Hoeller
db7654225e Polishing 2023-09-11 17:36:57 +02:00
Juergen Hoeller
c0c4298048 Polishing 2023-09-03 01:14:55 +02:00
Juergen Hoeller
2aae0a4e0c Polishing 2023-08-07 14:51:58 +02:00
Juergen Hoeller
bbde68c49e Polishing 2023-07-25 19:12:07 +02:00
Sam Brannen
a34f9fa66c Update copyright headers 2023-07-15 13:10:46 +02:00
Sam Brannen
68f2b0ca59 Rely on auto-boxing in tests 2023-07-12 11:49:02 +02:00
Sébastien Deleuze
b3de1b8e95 Use consistently *KotlinTests naming for Kotlin tests
Closes gh-30837
2023-07-08 11:02:20 +02:00
Juergen Hoeller
35c7e3960e Polishing 2023-07-07 13:46:57 +02:00
Juergen Hoeller
d2906253f1 Fall back to plain setObject call for non-supported SQL type
Closes gh-30556
2023-06-03 17:16:36 +02:00
Krzysztof Krasoń
1734deca1e Refactor AssertJ assertions into more idiomatic ones
This commit refactors some AssertJ assertions into more idiomatic and
readable ones. Using the dedicated assertion instead of a generic one
will produce more meaningful error messages. 

For instance, consider collection size:
```
// expected: 5 but was: 2
assertThat(collection.size()).equals(5);
// Expected size: 5 but was: 2 in: [1, 2]
assertThat(collection).hasSize(5);
```

Closes gh-30104
2023-04-04 17:34:07 +02:00
Simon Baslé
90b0f451f0 Add a couple missing java.time types to StatementCreatorUtils
This commit adds mapping for two types from the `java.time` package,
complementing the types that are already translatable to Sql types
TIME, DATE and TIMESTAMP:
 - `OffsetTime` maps to a `TIME_WITH_TIMEZONE`
 - `OffsetDateTime` maps to a `TIMESTAMP_WITH_TIMEZONE`

This is in accordance with the B.4 table provided in the JDBC 4.2
specification.

When preparing statements, these `java.time` types use the `setObject`
method. Tests covering the 5 `java.time` classes have also been added.

See gh-28778
See gh-28527
Closes gh-30123
2023-04-04 16:51:24 +02:00
Juergen Hoeller
ca9439657e Detect MSSQL code 2601 as duplicate key (aligned with sql-error-codes.xml)
Closes gh-29950
2023-02-09 14:59:09 +01:00
Sam Brannen
5f458e2578 Polish RowMapper tests 2023-02-07 19:05:38 +01:00
Sam Brannen
84bc1dfa89 Polish RowMapper tests 2023-02-03 17:47:50 +01:00
Sam Brannen
159a3e71f2 Clarify semantics of primitivesDefaultedForNullValue in BeanPropertyRowMapper
Closes gh-29923
2023-02-03 17:47:50 +01:00
Sam Brannen
3f148c2aaa Avoid warnings / Polishing 2023-01-20 15:22:47 +01:00
Sam Brannen
0502d18e3d Update copyright headers 2023-01-19 16:20:03 +01:00
Sam Brannen
c4c786596f Migrate to Mockito.mock(T...) where feasible 2023-01-19 16:20:02 +01:00
Sam Brannen
11df955d88 Update copyright headers 2023-01-09 18:33:06 +01:00
Johnny Lim
62cf2f0a4f Fix wrong asserted code in SQLExceptionSubclassTranslatorTests (#29748)
There was a typo in the test, covering the wrong SQLState code.

Polishes a644245.
Relates to gh-29699.
2023-01-03 10:57:02 +01:00
Juergen Hoeller
254c3725e2 Polishing 2022-12-23 15:14:11 +01:00
Juergen Hoeller
a644245e0e Check well-known database error codes in case of generic SQL state 23000
Closes gh-29699
2022-12-23 15:13:29 +01:00
Juergen Hoeller
4c69892f39 Detect SQL state 23505/40001 as DuplicateKeyException/CannotAcquireLockException
Favors PessimisticLockingFailureException over plain ConcurrencyFailureException.
Deprecates CannotSerializeTransactionException and DeadlockLoserDataAccessException.

Closes gh-29511
Closes gh-29675
2022-12-13 11:07:13 +01:00
Sam Brannen
ad60164911 Update copyright headers for source code changed since August 2022
The changes in this commit were performed using the newly introduced
update_copyright_headers.sh script.
2022-11-29 19:38:42 +01:00
Sam Brannen
7fcd1de8e3 Use AssertJ's isEmpty() instead of hasSize(0)
Achieved via global search-and-replace.
2022-11-22 17:11:50 +01:00
Sam Brannen
d5b0b2b1a1 User AssertJ's hasSize() for arrays
Achieved via global search-and-replace.
2022-11-22 17:03:45 +01:00
Sam Brannen
36f7597f25 Use AssertJ's hasSize() for collections and maps
Achieved via a global search-and-replace.
2022-11-22 16:50:10 +01:00
Sam Brannen
f26a7dee97 Fix broken tests, update copyright dates, and polish
See gh-29414
2022-11-08 20:07:53 +01:00
Kulwant Singh
b2c8546013 Rely on automatic boxing/unboxing in tests
Closes gh-29414
2022-11-08 19:38:03 +01:00
Sam Brannen
e058a6061a Move DataFieldMaxValueIncrementerTests to the appropriate package 2022-11-08 18:02:19 +01:00
Mahmoud Ben Hassine
f9ed0721a8 Introduce DataFieldMaxValueIncrementer for SQL Server sequences
This commit introduces SqlServerSequenceMaxValueIncrementer to support
SQL Server sequences, complementing the existing
SqlServerMaxValueIncrementer for table-based support.

Closes gh-29447
2022-11-08 17:54:16 +01:00
Sam Brannen
210019cad1 Polish contribution
See gh-29379
2022-11-01 11:41:41 +01:00
Mahmoud Ben Hassine
39f24f0244 Introduce DataFieldMaxValueIncrementer for MariaDB
Closes gh-29379
2022-11-01 11:27:34 +01:00
Juergen Hoeller
aaa22ad07d Remove square brackets with index/key expressions from generated SQL
See gh-27925
2022-10-19 18:23:49 +02:00
Juergen Hoeller
d4fac82d68 Preserve square brackets for index/key expressions
Closes gh-27925
2022-10-18 22:39:53 +02:00
Sam Brannen
ae368a20b8 Merge branch '5.3.x'
# Conflicts:
#	spring-web/src/test/kotlin/org/springframework/http/codec/json/KotlinSerializationJsonDecoderTests.kt
#	spring-web/src/test/kotlin/org/springframework/http/codec/json/KotlinSerializationJsonEncoderTests.kt
2022-10-08 14:06:41 +02:00
Johnny Lim
1c1a0afbed Use AssertJ static imports consistently in 5.3.x
Closes gh-29282
2022-10-08 13:57:21 +02:00
Sébastien Deleuze
ff81d64fb5 Add reflection hint for EmbeddedDataSourceProxy#shutdown
This commit adds a reflection hint on
EmbeddedDatabaseFactory$EmbeddedDataSourceProxy#shutdown when
EmbeddedDatabaseFactory is reachable in order to allow its usage
as bean destroy method.

Closes gh-29259
2022-10-05 14:08:09 +02:00
Sam Brannen
261124f497 Remove flaky executesHugeScriptInReasonableTime() tests
These tests often fail on the CI server and do not provide any
meaningful information when they fail, since only a proper benchmark
would suffice. Furthermore, the test method was introduced 10 years
ago to address deficiencies in JDK 7 which no longer exist.

See gh-14415
2022-09-08 13:18:05 +02:00
ben-enfuse-io
21577c4777 Treat MariaDB as an independent database type
See gh-28355
2022-08-23 07:44:02 +02:00
Stephane Nicoll
f9ee8a93ad Polish "Improve test coverage of RdbmsOperation"
See gh-28472
2022-07-29 17:36:33 +02:00
Jiayi Li
608be54a58 Improve test coverage of RdbmsOperation
See gh-28472
2022-07-29 17:28:00 +02:00
Sam Brannen
0fb9de5d0e Merge branch '5.3.x' 2022-07-13 16:36:01 +02:00
Marc Wrobel
bd3499671c Fix typos in test code
This commit fixes typos in test class names, test method names, and
test variable names.

Closes gh-28807
2022-07-13 16:24:11 +02:00