[ 
https://issues.apache.org/jira/browse/GEODE-9333?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Anthony Baker updated GEODE-9333:
---------------------------------
    Labels: testing  (was: )

> SessionsAndCrashesDUnitTest.sessionOperationsDoNotFail_whileServersAreRestarted
>  may fail due to IndexOutOfBoundsException
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: GEODE-9333
>                 URL: https://issues.apache.org/jira/browse/GEODE-9333
>             Project: Geode
>          Issue Type: Bug
>          Components: redis
>    Affects Versions: 1.15.0
>            Reporter: Donal Evans
>            Assignee: Jens Deppe
>            Priority: Major
>              Labels: testing
>             Fix For: 1.15.0
>
>
> Seen in a PR pre-checkin test run:
> {noformat}
> org.apache.geode.redis.session.SessionsAndCrashesDUnitTest > 
> sessionOperationsDoNotFail_whileServersAreRestarted FAILED
>     java.lang.IndexOutOfBoundsException: Index -5 out of bounds for length 100
>         at jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
>         at 
> jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
>         at jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248)
>         at java.util.Objects.checkIndex(Objects.java:372)
>         at java.util.ArrayList.get(ArrayList.java:459)
>         at 
> org.apache.geode.redis.session.SessionsAndCrashesDUnitTest.validateSessionAttributes(SessionsAndCrashesDUnitTest.java:179)
>         at 
> org.apache.geode.redis.session.SessionsAndCrashesDUnitTest.sessionOperationsDoNotFail_whileServersAreRestarted(SessionsAndCrashesDUnitTest.java:170)
> {noformat}
> This occurs in the below block when {{totalUpdates}} is less than 
> {{NUM_SESSIONS}}.
> {code:java}
> for (int i = totalUpdates - NUM_SESSIONS; i < totalUpdates; i++) {
>   int sessionIdx = i % NUM_SESSIONS;
>   String sessionId = sessionIds.get(sessionIdx);
> ...
> {code}
> Running the test locally with some trace logging added, it seems that 
> {{totalUpdates}} is typically ~120, so if something were to cause updates to 
> be 20% slower on a run of the test, this failure could show up. A solution 
> might be to either await until at least {{NUM_SESSIONS}} updates have been 
> performed by the updater threads, or to put in some logic to handle the case 
> when {{totalUpdates}} is less than {{NUM_SESSIONS}}. 



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to