Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

e2e test for Analytics - getUsageLogs is failing #37

Closed
shazron opened this issue Apr 13, 2021 · 4 comments
Closed

e2e test for Analytics - getUsageLogs is failing #37

shazron opened this issue Apr 13, 2021 · 4 comments
Assignees

Comments

@shazron
Copy link
Member

shazron commented Apr 13, 2021

This is a problem with our e2e instance, it doesn't occur with other instances. The e2e test has been commented out with a reason in the comments for now.

Log:

FAIL e2e/e2e.js (17.198s)
  ✓ sdk init test (41ms)
  ✓ test getCollections and getCollectionById (2152ms)
  ✕ test getUsageLogs (877ms)
  ✓ test getMetrics and getMetricById (1233ms)
  ✓ test getCalculatedMetrics and getCalculatedMetricById (973ms)
  ✓ test getDateRanges and getDateRangeById (788ms)
  ✓ test getDimensions and getDimensionById (8168ms)
  ✓ test getSegments and validateSegment (461ms)
  ✓ test getUsers and getCurrentUser (1414ms)

  ● test getUsageLogs

    AnalyticsSDKError: [AnalyticsSDK:ERROR_GET_USAGE_LOGS] Error: Internal Server Error

      466 |         })
      467 |         .catch(err => {
    > 468 |           reject(new codes.ERROR_GET_USAGE_LOGS({ sdkDetails, messageValues: err }))
          |                  ^
      469 |         })
      470 |     })
      471 |   }

      at http (node_modules/swagger-client/lib/http.js:106:19)
      at processTicksAndRejections (internal/process/task_queues.js:97:5) {
        status: 500,
        statusCode: 500,
        response: [Object]
      }
      at new <anonymous> (node_modules/@adobe/aio-lib-core-errors/src/AioCoreSDKErrorWrapper.js:33:9)
      at src/index.js:468:18

Test Suites: 1 failed, 1 total
Tests:       1 failed, 8 passed, 9 total
Snapshots:   0 total
Time:        17.734s
@sandeep-paliwal sandeep-paliwal self-assigned this Apr 13, 2021
@sandeep-paliwal
Copy link
Contributor

Analytics API throws 500 error on our test instance. Commenting out the test for logs api - adobe/aio-lib-analytics#56

@shazron
Copy link
Member Author

shazron commented Apr 14, 2021

We should do a conditional test, based on perhaps an environment variable that is descriptive (until we can get to the bottom of it). Perhaps ANALYTICS_SKIP_GET_USAGE_LOGS, and use this code:
jestjs/jest#7245 (comment)

@shazron
Copy link
Member Author

shazron commented May 4, 2021

@sandeep-paliwal I believe the test server has been fixed so this issue can be closed? can you confirm

@sandeep-paliwal
Copy link
Contributor

yeah, it was permission related issue and test server has been updated to fix this. We can close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants