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

R4JDBCExamplesProcessor fails to test parameter flush to db #4023

Closed
lmsurpre opened this issue Oct 13, 2022 · 1 comment
Closed

R4JDBCExamplesProcessor fails to test parameter flush to db #4023

lmsurpre opened this issue Oct 13, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@lmsurpre
Copy link
Member

lmsurpre commented Oct 13, 2022

Describe the bug
Prasanna found #4021 by manually executing our fhir-server-test suite.
This was a bad regression and pointed to a fundamental gap in our testing.

For 5.0, the parameter processing was reworked so that the parameter inserts happen just before the transaction commits
This relies on the use of our FHIRPersistenceTransaction abstraction under fhir-persistence.

However, when I dug into this test it turns out it was using SimpleTransactionProvider from fhir-database-utils instead, and so we were never calling the IFHIRTransactionAdapterCallback which triggers the inserts.

Environment
Which version of LinuxForHealth FHIR Server? 5.0

To Reproduce
Steps to reproduce the behavior:

  1. manufacture an error such as the one described in Truncate String parameter value before persisting to the database #4021
  2. ensure the problem example is included in the index being executed
  3. execute R4JDBCExamplesProcessor.process

Note that the test succeeds. This is because the problematic search parameter was never actually written.

Expected behavior
The test should execute the IFHIRTransactionAdapterCallback and thus it should fail when there is a problem with this code.

Additional context
Add any other context about the problem here.

@lmsurpre lmsurpre added the bug Something isn't working label Oct 13, 2022
lmsurpre added a commit that referenced this issue Oct 13, 2022
…rovider

Signed-off-by: Lee Surprenant <lmsurpre@merative.com>
@lmsurpre lmsurpre self-assigned this Oct 18, 2022
lmsurpre added a commit that referenced this issue Oct 20, 2022
…rovider

Signed-off-by: Lee Surprenant <lmsurpre@merative.com>
lmsurpre added a commit that referenced this issue Oct 21, 2022
issue #4023 - use FHIRPersistenceTransaction instead of ITransactionProvider
@lmsurpre
Copy link
Member Author

After the fix, the CI pipeline was failing as expected until the fix for #4021 landed. I think that is sufficient to show that the persistence tests are now covering the parameters flush (at least on derby).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant