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

615 Run tests through expressions compiled by AssemblyCompiler #616

Conversation

baseTwo
Copy link
Collaborator

@baseTwo baseTwo commented Oct 21, 2024

Work for

In the CqlToElmTests, the Base.Run(..) method was changed to accept a library as well. This will be passed to Extensions.RunLambda, which takes an AssemblyCompiler on its first param. This new way will run tests through an AssemblyLoadContext which has all the additional fixes in the C# generation step.

This change requires packaging services to be included returned from Base.ServiceCollection(..)

Note, two unit tests failed, which will be ignored and fixed in the next PR #614 . When searching for "[Ignore("Will be fixed in PR 614")]" these are the two tests:

  • DataSourceTests.FiltersOnSpecificProp. I'm not sure why, but this test does throw an exception as asserted anymore. Instead it successfully retrieves an array of zero Patients. Is this the intended behavior?
  • NotEqualTest.Tuple_Equal_Tuple_Null_Equals_Null

Also, a few other unit tests had to have they cql changed so that it can compile in the AssemblyCompiler. In the cql the The null's were changed to null as Integer:

  • InTest.TestInNullBoundaries
  • IntervalTest.Interval_Properly_Included_in_Interval_Null
  • IntevalTest.Interval_Null_Starts_Interval

⚠️I'm having trouble running the XmlTests through the AssemblyCompiler, so these tests are still compiling the lambdas directly

@baseTwo baseTwo linked an issue Oct 21, 2024 that may be closed by this pull request
@baseTwo baseTwo marked this pull request as ready for review October 21, 2024 11:50
@baseTwo baseTwo changed the title Run tests through expressions compiled by AssemblyCompiler 615 Run tests through expressions compiled by AssemblyCompiler Oct 22, 2024
@baseTwo
Copy link
Collaborator Author

baseTwo commented Oct 22, 2024

@baseTwo
Copy link
Collaborator Author

baseTwo commented Oct 22, 2024

@baseTwo create separate issue to fix XmlTests

@ewoutkramer
Copy link
Member

@ewoutkramer please check DataSourceTests.FiltersOnSpecificProp
#621

It's broken on develop-2.0, it breaks in my totally unrelated branch too 😨

@baseTwo baseTwo merged commit 3541a2a into develop-2.0 Oct 22, 2024
2 checks passed
@baseTwo baseTwo deleted the 615-change-unit-tests-to-compile-and-run-via-assemblycompiler branch October 22, 2024 14:12
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

Successfully merging this pull request may close these issues.

Change CqlToElm unit tests to compile and run via AssemblyCompiler
2 participants