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

Sanjay Dutt edited comment on SOLR-15484 at 5/4/24 10:42 AM:
-------------------------------------------------------------

*This test failed again:-*
 
{code:java}
   44056 INFO 
(TEST-JWTAuthPluginIntegrationTest.mockOAuth2Server-seed#[F98DD07D54DABA29]) 
[n: c: s: r: x: t:] o.a.s.SolrTestCaseJ4 ###Ending mockOAuth2Server    6149 > 
org.junit.ComparisonFailure: Should have received 401 code expected:<[401]> but 
was:<[200]>        6150 > at 
__randomizedtesting.SeedInfo.seed([F98DD07D54DABA29:7E8D312D316646C5]:0)    
6151 > at org.junit.Assert.assertEquals(Assert.java:117)    6152 > at 
org.apache.solr.security.jwt.JWTAuthPluginIntegrationTest.mockOAuth2Server(JWTAuthPluginIntegrationTest.java:145)
    6153 > at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
  6154 > at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    6155 > at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    6156 > at java.base/java.lang.reflect.Method.invoke(Method.java:566)    
6157 > at 
com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1758)
    6158 > at 
com.carrotsearch.randomizedtesting.RandomizedRunner$8.evaluate(RandomizedRunner.java:946)
    6159 > at 
com.carrotsearch.randomizedtesting.RandomizedRunner$9.evaluate(RandomizedRunner.java:982)
    6160 > at 
com.carrotsearch.randomizedtesting.RandomizedRunner$10.evaluate(RandomizedRunner.java:996)
    6161 > at 
com.carrotsearch.randomizedtesting.rules.SystemPropertiesRestoreRule$1.evaluate(SystemPropertiesRestoreRule.java:80)
    6162 > at org.junit.rules.RunRules.evaluate(RunRules.java:20)   

{code}
 

Also there are bunch of other classMethod failures, because of resource leak. 
Once assert failed it did not shutdown the cluster. Two ways to solved it, 
either the whole test block should be inside the try block and in finally we 
should shutdown the cluster. Or, use the existing cluster reference from 
SolrCloudTestCase and that will take care of shutting down the cluster.
 

https://github.com/apache/solr/pull/2373


was (Author: duttsanjay):
*This test failed again:-*
 
{code:java}
   44056 INFO 
(TEST-JWTAuthPluginIntegrationTest.mockOAuth2Server-seed#[F98DD07D54DABA29]) 
[n: c: s: r: x: t:] o.a.s.SolrTestCaseJ4 ###Ending mockOAuth2Server    6149 > 
org.junit.ComparisonFailure: Should have received 401 code expected:<[401]> but 
was:<[200]>        6150 > at 
__randomizedtesting.SeedInfo.seed([F98DD07D54DABA29:7E8D312D316646C5]:0)    
6151 > at org.junit.Assert.assertEquals(Assert.java:117)    6152 > at 
org.apache.solr.security.jwt.JWTAuthPluginIntegrationTest.mockOAuth2Server(JWTAuthPluginIntegrationTest.java:145)
    6153 > at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
  6154 > at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    6155 > at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    6156 > at java.base/java.lang.reflect.Method.invoke(Method.java:566)    
6157 > at 
com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1758)
    6158 > at 
com.carrotsearch.randomizedtesting.RandomizedRunner$8.evaluate(RandomizedRunner.java:946)
    6159 > at 
com.carrotsearch.randomizedtesting.RandomizedRunner$9.evaluate(RandomizedRunner.java:982)
    6160 > at 
com.carrotsearch.randomizedtesting.RandomizedRunner$10.evaluate(RandomizedRunner.java:996)
    6161 > at 
com.carrotsearch.randomizedtesting.rules.SystemPropertiesRestoreRule$1.evaluate(SystemPropertiesRestoreRule.java:80)
    6162 > at org.junit.rules.RunRules.evaluate(RunRules.java:20)   

{code}
 

Also there are bunch of other classMethod failures, because of resource leak. 
Once assert failed it did not shutdown the cluster. Two ways to solved it, 
either the whole test block should be inside the try block and in finally we 
should shutdown the cluster. Or, use the existing cluster reference from 
SolrCloudTestCase and that will take care of shutting down the cluster.
 

> Frequent test failures for JWTAuthPluginIntegrationTest
> -------------------------------------------------------
>
>                 Key: SOLR-15484
>                 URL: https://issues.apache.org/jira/browse/SOLR-15484
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 9.0
>            Reporter: Jan Høydahl
>            Assignee: Jan Høydahl
>            Priority: Major
>             Fix For: 9.5
>
>          Time Spent: 3.5h
>  Remaining Estimate: 0h
>
> Example:
> Build: [https://ci-builds.apache.org/job/Solr/job/Solr-Check-main/1053/]
> {code}
> 1 tests failed.
> FAILED:  
> org.apache.solr.security.JWTAuthPluginIntegrationTest.mockOAuth2Server
> Error Message:
> org.junit.ComparisonFailure: Should have received 401 code expected:<[401]> 
> but was:<[200]>
> Stack Trace:
> org.junit.ComparisonFailure: Should have received 401 code expected:<[401]> 
> but was:<[200]>
>  at __randomizedtesting.SeedInfo.seed([7827798BF4D91EFE:FF2798DB9165E212]:0)
>  at org.junit.Assert.assertEquals(Assert.java:117)
>  at 
> org.apache.solr.security.JWTAuthPluginIntegrationTest.mockOAuth2Server(JWTAuthPluginIntegrationTest.java:143)
> ...
> {code}
> The other test failure is
> {code}
> org.apache.solr.security.JWTAuthPluginTest.initWithInvalidTrustedCertsFile
> Failing for the past 1 build (Since #924 )
> Took 7 ms.
> Error Message
> junit.framework.AssertionFailedError: Expected exception SolrException but no 
> exception was thrown
> Stacktrace
> junit.framework.AssertionFailedError: Expected exception SolrException but no 
> exception was thrown
>       at 
> __randomizedtesting.SeedInfo.seed([8651FF5FA6DE29A1:91C33C9AFD0459B5]:0)
>       at 
> org.apache.lucene.util.LuceneTestCase.expectThrows(LuceneTestCase.java:2863)
>       at 
> org.apache.lucene.util.LuceneTestCase.expectThrows(LuceneTestCase.java:2849)
>       at 
> org.apache.solr.security.JWTAuthPluginTest.initWithInvalidTrustedCertsFile(JWTAuthPluginTest.java:521)
> ...
> {code}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to