This commit temporarily ignores tests that are failing
intermittently on Windows. A link to the corresponding
issue has been added to each test.
FTR, I tried to ignore those tests only on Windows by
using `Assume.assumeFalse(SystemUtils.IS_OS_WINDOWS);`
where `SystemUtils` is from `org.apache.commons.lang3`
but this assumption does not seem to work as expected.
The test `testCompareNewWithOldAfterCopy` does
not work on linux/unix unless a `Thread.sleep`
is added before the file copying (see cbcf28c3).
This test does not work on windows neither,
because it is based on apache commons
`FileUtils.copyFile` which does not honor
`preserveFileDate=false` on windows.
The following test works on linux/unix
but not on windows:
```
@Test
public void testLastModifiedAfterCopy() throws IOException {
File existing = new FileSystemResource(FILE_PATH).getFile();
File temp = new File("target/temp.txt");
assertFalse(temp.exists());
FileUtils.copyFile(existing, temp, false);
assertTrue(temp.lastModified() > existing.lastModified());
}
```
On windows, even though `preserveFileDate=false`,
the last modification date of the copy is equal
(ie preserved) to the one of the original file,
which is not the case on linux/unix. Trying to
use an alternative like `java.nio.file.Files#copy`
does not work since it only offers the ability
to either copy file attributes or replace the
existing file (which is not the idea of this test).
This test does not add any value and should have
been removed since a long time (see TODO in 12d6613).
Before this commit, tests in this change set
were failing on MS Windows due to the file
comparison method which was based on file
content hash comparison. With this method,
differences between OS line endings
(LF vs CRLF) in generated json files produce
different hashes.
This commit uses a logical json comparison
based on the jsonassert library.
This test fails on Java 15 because the Javascript engine
has been removed in Java 15 (JEP 372).
This commit updates the test to assume that the JavaScript
engine is provided to the JVM through a factory (similar
to other tests).
This commit updates the configuration to run unit tests
with maven-surefire-plugin and integration tests with
maven-failsafe-plugin. JSR-352 TCK tests are considered
as integration tests and are executed with other integration
tests (no need for a separate profile to run them).
Some unit tests were failing when integration tests were
skipped.. Those tests have been temporarily ignored.
* Corrects unit tests with expected behavior.
* Creates integration tests highlighting Hibernate lazy-loading failure if the reader has requested the page on open().
Issue #1074
Tests in this class fail intermittently because
they send messages to Kafka in an asynchronous
way and assert on the results immediately without
waiting for the send operation to complete.
This commit updates the tests to wait for
send results before asserting on them
(similar to a140a9f5).
This change makes it possible to (re)use the same connection used in
the openCursor method to clean up resources when the reader is closed.
Resolves#1696
* Add query creation test in JpaNamedQueryProviderTests
* Make JpaPagingItemReaderNamedQueryIntegrationTests consistent
with JpaPagingItemReaderNativeQueryIntegrationTests
Before this commit, the `RepositoryItemWriter` did not use
`CrudRepository#saveAll` by default and one must override
`doWrite` and call it manually, which is not convenient.
This commit makes the writer use `CrudRepository#saveAll`
by default while keeping the possibility to use another
method if desired through the `methodName` parameter.
Resolves#3720
TransactionAwareBufferedWriter offers a number of optimization
potentials. First it creates an unnecessary local, temporary char[]
in write(char[], int, int). Second it does not overwrite any of the
#write(String) methods leading to unnecessary intermediate copies.
* avoid local, temporary char[] in #write(char[], int, int)
* overwrite #write(String) methods to avoid copies
Together these two changes should help to reduce allocation rate.
Issue: #1166