[ 
https://issues.apache.org/jira/browse/CALCITE-5501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17681409#comment-17681409
 ] 

Alessandro Solimando commented on CALCITE-5501:
-----------------------------------------------

I haven't had time to look in-depth yet but I had the same idea of 
[~julianhyde], it smells of a race condition on the output file.

IIUC _SqlToRelConverterExtendedTest_ just tests the "Rel -> Json -> Rel" 
round-trip for each test in the base class {_}SqlToRelConverterTest{_}, is it 
possible that we don't need to write to an XML at all in the subclass?

In that case, simply removing the _DiffRepository_ from the test fixture in 
_SqlToRelConverterExtendedTest_ would do, like this:
 
{code:java}
@Override public SqlToRelFixture fixture() {
  return SqlToRelFixture.DEFAULT;
}{code}
It would be nice to avoid to duplicate the output file because it enforces a 
bit more manual work for contributors of new tests (on the bright side the 
current machinery at least guarantees that they would stay in sync and 
up-to-date).

Of course if there is no other way and what I proposed does not work (or breaks 
assumptions over _SqlToRelConverterExtendedTest_ that I missed), I am good with 
at least recovering from the actual flaky state, and we can improve further in 
a second moment.

> SqlToRelConverterTest.checkActualAndReferenceFiles fails intermittently in 
> Jenkins CI
> -------------------------------------------------------------------------------------
>
>                 Key: CALCITE-5501
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5501
>             Project: Calcite
>          Issue Type: Bug
>          Components: tests
>    Affects Versions: 1.32.0
>            Reporter: Stamatis Zampetakis
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> Sample runs that failed due to 
> SqlToRelConverterTest.checkActualAndReferenceFiles:
> * 
> https://ci-builds.apache.org/job/Calcite/job/Calcite-sonar/job/main/15/console
> * 
> https://ci-builds.apache.org/job/Calcite/job/Calcite-sonar/job/main/18/console
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to