Skip to content

Add Redis cache to store the tokens #64

Add Redis cache to store the tokens

Add Redis cache to store the tokens #64

GitHub Actions / orcid-api-common Unit Tests failed Jul 26, 2023 in 1s

orcid-api-common Unit Tests ❌

Tests failed

Report Passed Failed Skipped Time
TEST-org.orcid.api.common.analytics.AnalyticsProcessTest.xml 18✅ 312ms
TEST-org.orcid.api.common.analytics.APIEndpointParserTest.xml 9✅ 596ms
TEST-org.orcid.api.common.analytics.client.google.UniversalAnalyticsClientTest.xml 2✅ 667ms
TEST-org.orcid.api.common.filter.ApiVersionCheckFilterTest.xml 8✅ 116ms
TEST-org.orcid.api.common.filter.TokenTargetFilterTest.xml 5✅ 266ms
TEST-org.orcid.api.common.oauth.OrcidClientCredentialEndPointDelegatorTest.xml 5❌ 50s
TEST-org.orcid.api.common.util.ActivityUtilsTest.xml 15✅ 4ms
TEST-org.orcid.api.common.util.v3.ActivityUtilsTest.xml 20✅ 1ms
TEST-org.orcid.api.common.writer.citeproc.WorkToCiteprocTranslatorTest.xml 4✅ 358ms
TEST-org.orcid.api.common.writer.rdf.RDFWriterTest.xml 5✅ 900ms
TEST-org.orcid.api.common.writer.SchemaOrgDocumentTest.xml 1✅ 57ms

✅ TEST-org.orcid.api.common.analytics.AnalyticsProcessTest.xml

18 tests were completed in 312ms with 18 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
org.orcid.api.common.analytics.AnalyticsProcessTest 18✅ 312ms

✅ org.orcid.api.common.analytics.AnalyticsProcessTest

✅ testAnalyticsProcessForGetRequestWithUnknownAcceptHeader
✅ testAnalyticsProcessForAnonymous
✅ testAnalyticsProcessForGetRequestWithXmlAcceptHeader
✅ testAnalyticsProcessForGetRequestWithJsonAcceptHeader
✅ testAnalyticsProcessForGetRequestWithJsonContentTypeHeader
✅ testAnalyticsProcessForGetRequestWithXmlContentTypeHeader
✅ testAnalyticsProcessForGetRequestWithRdfXmlContentTypeHeader
✅ testAnalyticsProcessForIPv6
✅ testAnalyticsProcessForMemberClient
✅ testAnalyticsProcessForPublicClientWithAmpersand
✅ testAnalyticsProcessForGetRequestWithJsonLdContentTypeHeader
✅ testAnalyticsProcessForPublicClient
✅ testAnalyticsProcessForPostRequestWithUnknownContentTypeHeader
✅ testAnalyticsProcessForPostRequestWithXmlContentTypeHeader
✅ testAnalyticsProcessWithNoContentType
✅ testAnalyticsProcessForPostRequestWithJsonContentTypeHeader
✅ testAnalyticsProcessForNoSpecifiedCategory
✅ testSchemeCorrection

✅ TEST-org.orcid.api.common.analytics.APIEndpointParserTest.xml

9 tests were completed in 596ms with 9 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
org.orcid.api.common.analytics.APIEndpointParserTest 9✅ 596ms

✅ org.orcid.api.common.analytics.APIEndpointParserTest

✅ testAPIEndpointParserWithApiVersionWithoutOrcid
✅ testAPIEndpointParserNoCategoryV1
✅ testAPIEndpointParserNoCategoryV2
✅ testAPIEndpointParserNoCategoryV3
✅ testAPIEndpointParserNoCategoryOrVersion
✅ testAPIEndpointParserWithApiVersionAndOrcid
✅ testAPIEndpointParserWithoutApiVersionWithOrcid
✅ testInvalidEventCategory
✅ testAPIEndpointParserWithoutApiVersionOrOrcid

✅ TEST-org.orcid.api.common.analytics.client.google.UniversalAnalyticsClientTest.xml

2 tests were completed in 667ms with 2 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
org.orcid.api.common.analytics.client.google.UniversalAnalyticsClientTest 2✅ 667ms

✅ org.orcid.api.common.analytics.client.google.UniversalAnalyticsClientTest

✅ testSendAnalyticsDataNoTrackingCode
✅ testSendAnalyticsData

✅ TEST-org.orcid.api.common.filter.ApiVersionCheckFilterTest.xml

8 tests were completed in 116ms with 8 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
org.orcid.api.common.filter.ApiVersionCheckFilterTest 8✅ 116ms

✅ org.orcid.api.common.filter.ApiVersionCheckFilterTest

✅ apiV2SchemeTest
✅ api2_0VersionTest
✅ webhooksShouldWorkWithoutVersionTest
✅ apiOauthTokenTest
✅ apiV2HeaderTest
✅ apiV2BlockHttpTest
✅ apiDefaultVersionTest
✅ invalidWebhooksShouldNotWork

✅ TEST-org.orcid.api.common.filter.TokenTargetFilterTest.xml

5 tests were completed in 266ms with 5 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
org.orcid.api.common.filter.TokenTargetFilterTest 5✅ 266ms

✅ org.orcid.api.common.filter.TokenTargetFilterTest

✅ readPublicTokenTest
✅ tokenUsedOnTheRightUserTest
✅ tokenUsedOnTheWrongUser20ApiTest
✅ filterInvokedOnNoOrcidEndpointTest
✅ tokenUsedOnTheWrongUser12ApiTest

❌ TEST-org.orcid.api.common.oauth.OrcidClientCredentialEndPointDelegatorTest.xml

5 tests were completed in 50s with 0 passed, 5 failed and 0 skipped.

Test suite Passed Failed Skipped Time
org.orcid.api.common.oauth.OrcidClientCredentialEndPointDelegatorTest 5❌ 50s

❌ org.orcid.api.common.oauth.OrcidClientCredentialEndPointDelegatorTest

❌ generateRefreshTokenThatExpireAfterParentTokenTest
	java.lang.IllegalStateException: Failed to load ApplicationContext
❌ generateClientCredentialsAccessTokenWithInvalidTokenTest
	java.lang.IllegalStateException: Failed to load ApplicationContext
❌ generateAccessTokenTest
	java.lang.IllegalStateException: Failed to load ApplicationContext
❌ generateRefreshTokenTest
	java.lang.IllegalStateException: Failed to load ApplicationContext
❌ generateClientCredentialsAccessTokenTest
	java.lang.IllegalStateException: Failed to load ApplicationContext

✅ TEST-org.orcid.api.common.util.ActivityUtilsTest.xml

15 tests were completed in 4ms with 15 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
org.orcid.api.common.util.ActivityUtilsTest 15✅ 4ms

✅ org.orcid.api.common.util.ActivityUtilsTest

✅ cleanWorkTest
✅ setPathToFundingsTest
✅ setPathToActivitiesSummaryTest
✅ setPathToWorksTest
✅ setPathToPeerReviewsTest
✅ setPathToActivityTest
✅ cleanBulkWorkTest
✅ cleanFundingTest
✅ cleanEmptyActivitiesSummaryTest
✅ setPathToEmploymentsTest
✅ cleanWorksTest
✅ cleanBulkElementTest
✅ cleanOrganizationTest
✅ cleanWorkSummaryTest
✅ setPathToEducationsTest

✅ TEST-org.orcid.api.common.util.v3.ActivityUtilsTest.xml

20 tests were completed in 1ms with 20 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
org.orcid.api.common.util.v3.ActivityUtilsTest 20✅ 1ms

✅ org.orcid.api.common.util.v3.ActivityUtilsTest

✅ cleanWorkTest
✅ setPathToFundingsTest
✅ setPathToInvitedPositionsTest
✅ setPathToActivitiesSummaryTest
✅ setPathToServicesTest
✅ setPathToDistinctionsTest
✅ setPathToWorksTest
✅ setPathToPeerReviewsTest
✅ setPathToActivityTest
✅ setPathToMembershipsTest
✅ setPathToQualificationTest
✅ cleanBulkWorkTest
✅ cleanFundingTest
✅ cleanEmptyActivitiesSummaryTest
✅ setPathToEmploymentsTest
✅ cleanWorksTest
✅ cleanBulkElementTest
✅ cleanOrganizationTest
✅ cleanWorkSummaryTest
✅ setPathToEducationsTest

✅ TEST-org.orcid.api.common.writer.citeproc.WorkToCiteprocTranslatorTest.xml

4 tests were completed in 358ms with 4 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
org.orcid.api.common.writer.citeproc.WorkToCiteprocTranslatorTest 4✅ 358ms

✅ org.orcid.api.common.writer.citeproc.WorkToCiteprocTranslatorTest

✅ testUnicode
✅ testBibtexWorkTranslationHyperAuthorNoAbrev
✅ testBibtexWorkTranslationHyperAuthor
✅ testBibtexWorkTranslationHyperAuthorLiteralAndMissingDOI

✅ TEST-org.orcid.api.common.writer.rdf.RDFWriterTest.xml

5 tests were completed in 900ms with 5 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
org.orcid.api.common.writer.rdf.RDFWriterTest 5✅ 900ms

✅ org.orcid.api.common.writer.rdf.RDFWriterTest

✅ writeTurte
✅ writeNtriples
✅ missingCreditName
✅ writeJsonLD
✅ writeRdfXML

✅ TEST-org.orcid.api.common.writer.SchemaOrgDocumentTest.xml

1 tests were completed in 57ms with 1 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
org.orcid.api.common.writer.SchemaOrgDocumentTest 1✅ 57ms

✅ org.orcid.api.common.writer.SchemaOrgDocumentTest

✅ testSerialisation

Annotations

Check failure on line 0 in TEST-org.orcid.api.common.oauth.OrcidClientCredentialEndPointDelegatorTest.xml

See this annotation in the file changed.

@github-actions github-actions / orcid-api-common Unit Tests

org.orcid.api.common.oauth.OrcidClientCredentialEndPointDelegatorTest ► generateRefreshTokenThatExpireAfterParentTokenTest

Failed test found in:
  TEST-org.orcid.api.common.oauth.OrcidClientCredentialEndPointDelegatorTest.xml
  TEST-org.orcid.api.common.oauth.OrcidClientCredentialEndPointDelegatorTest.xml
  TEST-org.orcid.api.common.oauth.OrcidClientCredentialEndPointDelegatorTest.xml
  TEST-org.orcid.api.common.oauth.OrcidClientCredentialEndPointDelegatorTest.xml
  TEST-org.orcid.api.common.oauth.OrcidClientCredentialEndPointDelegatorTest.xml
Error:
  java.lang.IllegalStateException: Failed to load ApplicationContext
Raw output
java.lang.IllegalStateException: Failed to load ApplicationContext
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'orcidClientCredentialEndPointDelegator': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'redisClient' defined in URL [file:/home/runner/work/ORCID-Source/ORCID-Source/orcid-api-common/target/classes/orcid-oauth2-api-common-config.xml]: Unsatisfied dependency expressed through constructor parameter 1: Could not convert argument value of type [java.lang.String] to required type [int]: Failed to convert value of type 'java.lang.String' to required type 'int'; nested exception is java.lang.NumberFormatException: For input string: "${org.orcid.core.utils.cache.redis.port}"
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'redisClient' defined in URL [file:/home/runner/work/ORCID-Source/ORCID-Source/orcid-api-common/target/classes/orcid-oauth2-api-common-config.xml]: Unsatisfied dependency expressed through constructor parameter 1: Could not convert argument value of type [java.lang.String] to required type [int]: Failed to convert value of type 'java.lang.String' to required type 'int'; nested exception is java.lang.NumberFormatException: For input string: "${org.orcid.core.utils.cache.redis.port}"