[jira] [Comment Edited] (CALCITE-5501) SqlToRelConverterTest.checkActualAndReferenceFiles fails intermittently in Jenkins CI

2023-01-27 Thread Alessandro Solimando (Jira)


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

Alessandro Solimando edited comment on CALCITE-5501 at 1/28/23 7:53 AM:


>From your description I think you are referring to CALCITE-3517.

I think that even writing the file once per test class,  we would still be 
having a race condition, because one of the two test classes might be writing 
when the other one is comparing.

Of course it would limit sensibly the chances of the race condition to happen 
(once per class vs once per test) but we would still need a lock on 
_SqlToRelConverterTest.xml_ which remains shared, so I think that my proposed 
patch would still be needed.

I therefore suggest to get this in (once the release is over) and tackle the 
performance improvement separately as part of CALCITE-3517, if that makes sense 
to you too.


was (Author: asolimando):
>From your description I think you are referring to CALCITE-3517.

I think that even writing the file once per test class,  we would still be 
having a race condition, because one of the two test classes might be writing 
when the other one is comparing.

Of course it would limit sensibly the chances of the race condition to happen 
(once per class vs once per test) but we would still need a lock on 
_SqlToRelConverterTest.xml_ which remains shared, so I think that my propose 
patch would still be needed.

I therefore suggest to get this in (once the release is over) and tackle the 
performance improvement separately as part of CALCITE-3517, if that makes sense 
to you too.

> 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
>Assignee: Alessandro Solimando
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 1.5h
>  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)


[jira] [Comment Edited] (CALCITE-5501) SqlToRelConverterTest.checkActualAndReferenceFiles fails intermittently in Jenkins CI

2023-01-27 Thread Alessandro Solimando (Jira)


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

Alessandro Solimando edited comment on CALCITE-5501 at 1/28/23 7:42 AM:


[@ResourceLock|https://junit.org/junit5/docs/current/api/org.junit.jupiter.api/org/junit/jupiter/api/parallel/ResourceLock.html]
 from JUnit5 to the rescue here, I have updated my 
[PR|https://github.com/apache/calcite/pull/3049] by making 
_SqlToRelConverterExtendedTest_ and _SqlToRelConverterTest_ classes run 
sequentially, while keeping their execution w.r.t. the other classes and for 
the test cases within them, parallel.

Running "./gradlew assemble --no-build-cache cleanTest :core:test" repeatedly 
on the main branch and with the PR on my machine did not provide noticeable 
difference in the total execution time, because the tests from the two classes 
are still executed in parallel with all the rest of the tests, the two classes 
simply don't step on each other toes anymore.

I will check in the ML if there is still time to fix this before the release, 
or if it will wait for main to be open again.


was (Author: asolimando):
[@ResourceLock|https://junit.org/junit5/docs/current/api/org.junit.jupiter.api/org/junit/jupiter/api/parallel/ResourceLock.html]
 from JUnit5 to the rescue here, I have updated my 
[PR|https://github.com/apache/calcite/pull/3049] by making 
_SqlToRelConverterExtendedTest_ and _SqlToRelConverterTest_ classes __ run 
sequentially, while __ keeping their execution w.r.t. the other classes and for 
the test cases within them, parallel.

Running "./gradlew assemble --no-build-cache cleanTest :core:test" repeatedly 
on the main branch and with the PR on my machine did not provide noticeable 
difference in the total execution time, because the tests from the two classes 
are still executed in parallel with all the rest of the tests, the two classes 
simply don't step on each other toes anymore.

I will check in the ML if there is still time to fix this before the release, 
or if it will wait for main to be open again.

> 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
>Assignee: Alessandro Solimando
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 1.5h
>  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)