- 
                Notifications
    You must be signed in to change notification settings 
- Fork 610
Fixes #2306 - remove console.log from export tests due to race conditions #2322
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
Conversation
| The latest updates on your projects. Learn more about Vercel for Git ↗︎ | 
3600d09    to
    2285ba5      
    Compare
  
    429502c    to
    2285ba5      
    Compare
  
    2285ba5    to
    c42d5ad      
    Compare
  
    dc5101c    to
    f3d4bf9      
    Compare
  
    f3d4bf9    to
    b7009f8      
    Compare
  
    | Hi @tonylee80 - I don't think this is the right fix for this. The "database not setup" message implies that there is still something running in the background after the test completes. That usually means we need to wait for a promise or a job to complete. | 
cc10fa8    to
    b371a44      
    Compare
  
    | 
 That's a really good point. I'll refactor to use  | 
| await waitForAsyncJob(initRes.headers['content-location'], app, accessToken); | ||
|  | ||
| let resBody: any; | ||
| await waitFor(async () => { | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moving to waitForAsyncJob to ensure all jobs are completed in export tests. Introducing to this pattern for maintaining these export tests will no longer introduce race conditions where a test ends, but a job might still be running in the background.
| Kudos, SonarCloud Quality Gate passed!     | 
Update client-cloudwatch-logs manual mock to use aws-sdk-client-mock (#2342) Log resource for validator latency warning (#2338) Minor tweaks to aws init tool and docs (#2340) Allow contentReference elements to override cardinality rules (#2339) Fixes #2315 - allow bot success without return value (#2336) Fix app env vars in publish job (#2335) Fixes #2310 - CLI rest with --fhir-url-path (#2313) Unify all of the sleep helper functions (#2331) Increase Fargate health check grace period (#2330) Remove PWA and service worker (#2329) Updating subscription documentation to reflect behavior when resources are deleted (#2328) Add app to publish.sh (#2326) Fixes #2306 - remove console.log from export tests due to race conditions (#2322) Fixed landing page for storybook (#2323) Bring back sourcemaps (#2309) Split custom Medplum search parameter definitions into separate file (#2178) Poll status follow Location header (#2307) Copy .env.defaults to .env if not exists (#2308) Allow extra URL path content with Bot execute (#2305) Fixes #2182- All Patient Export (#2293) Strict validation of property cardinality (#2300) Request from ACN (#2299) Fixed CLI shebang (#2301) ESBuild (#2298) Add logs and parity tests for new validator (#2291) Fixes #2277 - Updated access policies docs (#2292) Add non-null requirements to values in GraphQL array types (#2290) Validating Fixed and Pattern Values (#2288) Fixes #2195 - updated cdk init docs (#2289)
Update client-cloudwatch-logs manual mock to use aws-sdk-client-mock (#2342) Log resource for validator latency warning (#2338) Minor tweaks to aws init tool and docs (#2340) Allow contentReference elements to override cardinality rules (#2339) Fixes #2315 - allow bot success without return value (#2336) Fix app env vars in publish job (#2335) Fixes #2310 - CLI rest with --fhir-url-path (#2313) Unify all of the sleep helper functions (#2331) Increase Fargate health check grace period (#2330) Remove PWA and service worker (#2329) Updating subscription documentation to reflect behavior when resources are deleted (#2328) Add app to publish.sh (#2326) Fixes #2306 - remove console.log from export tests due to race conditions (#2322) Fixed landing page for storybook (#2323) Bring back sourcemaps (#2309) Split custom Medplum search parameter definitions into separate file (#2178) Poll status follow Location header (#2307) Copy .env.defaults to .env if not exists (#2308) Allow extra URL path content with Bot execute (#2305) Fixes #2182- All Patient Export (#2293) Strict validation of property cardinality (#2300) Request from ACN (#2299) Fixed CLI shebang (#2301) ESBuild (#2298) Add logs and parity tests for new validator (#2291) Fixes #2277 - Updated access policies docs (#2292) Add non-null requirements to values in GraphQL array types (#2290) Validating Fixed and Pattern Values (#2288) Fixes #2195 - updated cdk init docs (#2289)








Using
waitForAsyncJobto wait for an async job like Bulk export to complete before the test cases ends.Related PRs
#2022
#2080
#1959
https://github.com/medplum/medplum/actions/runs/5404805700/jobs/9819491438?pr=2322#step:6:1405
