Closed Sinclo closed 1 month ago
While looking at one of the sample snippets provided in my previous comment (20240913_formatTypeReferenceArray_IndividualTestFailure.txt), I did observe a difference in indentations between the expected vs actual result (even though my IDE did not point this out).
As seen in the image, the closing bracket under the actual results is indented by 2 characters (column 3). Meanwhile the closing bracket under the expected results is under column 1.
Further investigation shows that
The tests specifically in the "BeanOutputConverterTest" class are failing, due to only expecting the use of \n
as part of formatting, but actually using \r\n
in its actual format output. Example of "actual results" can be seen in the following screenshot.
I've also discovered that the reason for mvn package
failing goes well beyond the BeanOutputConverterTest
class. This process failing is actually caused by numerous test failures and errors from other test classes as well (i.e. ContentFormatterTests.java
, OllamaRuntimeHintsTests.java
, PagePdfDocumentReaderTests.java
, etc). . In other words, even if all of the test failures in the "BeanOutputConverterTest" class are addressed as part of the initial reported issue, mvn package
will continue to fail until further effort is put into several additional classes & tests across the project as well.
Closing this issue. After further digging, it appears the test failures I'm facing are specific to the IDE that I'm using (IntelliJ IDEA), and seem to be specific to the line separator settings.
I've tried several steps to resolve the issue in the IDE with no luck. That said, while I haven't yet found a fix to the problem, I do know enough to say that the failures seem to be a problem with the IDE, not with the tests.
Bug description
When running the
mvn package
ormvn clean package
command, thepackage
process fails on the "Spring AI Core" module, due to several test failures in the "BeanOutputConverterTest" class.Note:
mvn clean package -DskipTests
).Environment
main
branch (currently commit5a35213
at the time of writing this), if this helps.Steps to reproduce
Option A:
mvn clean package
. Observe the test failuresOption B:
mvn clean
(this will return successful build logs)mvn package
(this will return the test failures)The main thing is running
mvn package
in some way, to produce the failures.Expected behavior
mvn package
without having to skip testsMinimal Complete Reproducible example
Other notes
formatTypeReferenceArray
test (located inspring-ai-core/src/test/java/org/springframework/ai/converter/BeanOutputConverterTest.java
), I got a failed result due to the following error: 20240913_formatTypeReferenceArray_IndividualTestFailure.txtThe test failures seem bizarre, and there's no immediate reason that I can see as to why these issues are happening. But unfortunately its happening, hence this issue being filed. I am still actively investigating this issue as well, just in case this turns out being a silly "me" issue in some way.