99
1010import org .assertj .core .api .Assertions ;
1111import org .junit .Assume ;
12+ import org .junit .Ignore ;
1213import org .junit .Test ;
1314
1415import io .weaviate .ConcurrentTest ;
2829 * Additionally, {@code WCS_DUMMY_CI_PW} and {@code OKTA_CLIENT_SECRET}
2930 * environment variables must be set.
3031 */
31- public class OIDCSupportITest extends ConcurrentTest {
32+ public class OidcSupportITest extends ConcurrentTest {
3233 private static final String WCS_DUMMY_CI_USERNAME = "oidc-test-user@weaviate.io" ;
3334 private static final String WCS_DUMMY_CI_PW = System .getenv ("WCS_DUMMY_CI_PW" );
3435
@@ -66,10 +67,7 @@ public void test_bearerToken() throws Exception {
6667 var auth = SpyTokenProvider .spyOn (Authentication .bearerToken (t .accessToken (), t .refreshToken (), 0 ));
6768 pingWeaviate (wcsContainer , auth );
6869
69- var newT = auth .getToken ();
70- Assertions .assertThat (newT .accessToken ())
71- .as ("expect access_token was refreshed" )
72- .isNotEqualTo (t .accessToken ());
70+ eventually (() -> auth .getToken () != t , 100 , 5 , "expect access_token was refreshed" );
7371
7472 // Check that the new token authenticates requests.
7573 pingWeaviate (wcsContainer , auth );
@@ -81,7 +79,7 @@ public void test_resourceOwnerPassword() throws Exception {
8179 Assume .assumeTrue ("WCS_DUMMY_CI_PW is not set" , WCS_DUMMY_CI_PW != null && !WCS_DUMMY_CI_PW .isBlank ());
8280 Assume .assumeTrue ("no internet connection" , hasInternetConnection ());
8381
84- // Check norwal resource owner password flow works.
82+ // Check normal resource owner password flow works.
8583 var password = Authentication .resourceOwnerPassword (WCS_DUMMY_CI_USERNAME , WCS_DUMMY_CI_PW , List .of ());
8684 var auth = SpyTokenProvider .spyOn (password );
8785 pingWeaviate (wcsContainer , auth );
0 commit comments