Commit graph

19 commits

Author SHA1 Message Date
Sipke Schoorstra f7a63b80c5 Reduce number of DB commits during workflow execution 2021-08-23 11:57:50 +02:00
Sipke Schoorstra f67140f7e2 Cleanup 2021-06-14 14:10:03 +02:00
Sipke Schoorstra 899551463e Refactor workflow collection and execution 2021-05-16 21:05:34 +02:00
Sipke Schoorstra d0affca777 Fix test 2021-05-04 12:32:26 +02:00
Craig Fowler fa7601ca1a WIP #751 - Add integration test for using Postgres
From this commit onwards, in order to run all of the tests, you
must now have postgresql installed and running on your dev
environment.  The credentials/config is:
* Database name: elsa-yessql
* Username: postgres (this is the default anyway)
* Password: Password12! (this matches AppVeyor's postgres password)
* Port: 5432 (this is the default anyway)
2021-04-07 20:38:13 +01:00
Sipke Schoorstra a3e7b1e023 Disable YesSQL test (temp) 2021-04-07 15:06:30 +02:00
Sipke Schoorstra ce957b95e7 Cleanup 2021-04-07 13:13:13 +02:00
Craig Fowler 189b4a69bb
Correct typo 2021-04-02 21:03:33 +01:00
Craig Fowler 2e3aef2740 Merge remote-tracking branch 'elsa-core/feature/elsa-2.0' into 751-postgres-yessql-exception 2021-04-02 13:46:13 +01:00
Sipke Schoorstra 38be994e31 Break up WorkflowRunner into smaller types and extracted reusable trigger logic 2021-04-02 12:43:14 +02:00
Sipke Schoorstra 5796cf2893 Fix warnings and formatting 2021-04-02 12:43:14 +02:00
Craig Fowler 8379d4a70c Complete refactoring for composable attributes
This takes the work begun in
  d285b8b505
and completes it for all other attributes/usages.
2021-04-02 11:41:06 +01:00
Craig Fowler d285b8b505 WIP composing customize attributes
This isn't really related to #751 - it's a refactor of some of
our test logic, to avoid bloat of semi-repeated autofixture
customization attributes.

By switching to a behaviour-driven model, it's possible to
compose them, which means that there's no need to part-duplicate
between them.  It should also reduce the overall number of them,
as combinations can be put together on-demand, rather than needing
a new attribute of their own.
2021-04-02 11:12:21 +01:00
Craig Fowler 4bc3539c4d
Merge branch 'feature/elsa-2.0' into feature/748-multi-tenant-EntityFramework 2021-03-14 13:51:06 +00:00
Craig Fowler 2320d216f2
Resolve #683 - Tests to prove no exception (#758)
As stated in the comments for
  WorkflowMayContainDuplicateActivitiesIntegrationTests

These tests might not describe actually-desired behaviour.
If they begin to "get in the way" in future, then it would
probably be safe to remove them.
2021-03-14 14:38:58 +01:00
Craig Fowler 4873aac316 Resolve #748 - Test coverage for EF Db Contexts
As well as providing a unit test which matches other persistence
provider tests (round-tripping a workflow instance), two other tests
are included here:

* When using the default DI registration extension method, this sets
  up pooling of DB contexts and so a resolved context will come from
  the pool.

* When using the non-pooled DI registration extension method, this
  sets up EF without pooling, which is more useful in a multi-tenanted
  environment.

There are also some other changes in this commit corresponding to
improving the tests.  Mainly de-duplicating logic & improving names.
2021-03-13 15:21:44 +00:00
Craig Fowler 32bcf9a751 WIP #728 - Add test cases for persistence
This also includes a change to the workflow used in the test-case.
There are quite complex reasons for this, as explained here:

  https://github.com/elsa-workflows/elsa-core/issues/728#issuecomment-794319236

The real crux of it is that the workflow must have an activity
which suspends it, and that activity that suspends the workflow
must not be the starting activity.  This is why I added an unused
set-variable activity as the starter.

This commit shows that the various persistence test cases _mostly_
work OK, with the one exception of ActivityExecuted.
2021-03-09 19:57:02 +00:00
Craig Fowler 2c79a9395c WIP #728 - Add test for in-memory persistence
This test case shows that in-memory persistence is
also affected.  It seems that that would mean that this
issue is not related to only a single persistence provider.

In fact, in retrospect this is not really a persistence
problem at all, but a problem with the test case.  More
information is available in the comments to #728.
2021-03-09 19:56:14 +00:00
Craig Fowler 672e32a7ca WIP #552 - Add unit test to repro
Actually, this unit test does not repro the issue.
Frustratingly I can't get it to save the executed workflow
into MongoDB at all.  I see workflow execution logs
being saved, but the instance doesn't go in.

I'm not sure if this is a mistake I'm making or whether
I have found a different bug of some sort.
2021-03-06 17:22:37 +00:00