Commit Graph

41 Commits

Author SHA1 Message Date
Janne Valkealahti
e62b09d2bb Overhaul gradle build
- Focus of this commit is to have modern gradle build.
- Migrate most of a plugin configurations from dsl
  into buildSrc.
- This fixes issues with existing docs build.
- Allows to sign files so that we have that part
  done for central in a build.
- We can skip publishing samples.
- We're able to share similar logic for modules
  which are meant for publish or just being samples.
- It's easier to upgrade gradle versions without
  getting various build issues.
- Relates #1143
2024-03-14 12:26:47 +00:00
Janne Valkealahti
2025282e06 Polish "Upgrade to Spring Boot 3" 2023-10-05 12:49:46 +01:00
Erik Greijus
497eebe55c Upgrade to Spring Boot 3 2023-08-29 12:52:50 +02:00
Janne Valkealahti
07cf924578 Port build-tests tests to assertj 2020-11-28 19:56:11 +00:00
Janne Valkealahti
2297ee93d1 Tag mongodb and redis tests 2020-11-22 14:08:49 +00:00
Janne Valkealahti
3d2e1de237 Allow some blockhound block methods
- Looks like some tests fails with redis
  as new lettuse driver, during connect phase,
  will block as there's a timeout which cause
  a block within netty internals(which a bit weird).
- Time of this commit block error came from
  https://github.com/netty/netty/blame/4.1/common/src/main/java/io/netty/util/HashedWheelTimer.java#L349
2020-10-31 14:51:50 +00:00
Janne Valkealahti
066e80dbdd Fix wrong transition with join complete
- Oversight with original reactor work.
2020-10-24 09:53:48 +01:00
Janne Valkealahti
45627e4f63 Reactive PseudoStates
- Change entry/exit functions to reactive types
  to have those in a reactive stack.
- Fixes #878
2020-10-11 13:06:53 +01:00
Janne Valkealahti
b456ea823a Fix TimerSmokeTests
- Now doing stop assert in same step where machine
  actually stops which is more reliable way to test.
2019-12-25 07:29:33 +00:00
Janne Valkealahti
49860418f8 Duplicate base junit4 classes for junit5
- AbstractStateMachineTests to AbstractStateMachineJUnit4Tests
- StateMachineTestPlanBuilderTests to StateMachineTestPlanBuilderJUnit4Tests
- Add AbstractStateMachineJUnit5Tests and StateMachineTestPlanBuilderJUnit5Tests
- Move away from junit4 assertThat methods
- Fixes #780
- Also completes and Fixes #771
2019-12-24 20:37:11 +00:00
Janne Valkealahti
10ce7a65a4 Move to junit5 in all framework tests
- Just a migration
- Replace RedisRule with EnabledOnRedis
- Replace MongoDbRule with EnabledOnMongoDb
- spring-statemachine-test and some docs contains refs to junit4
  but those are support packages and will stay in place.
- Fixes #779
- Relates #771
2019-12-24 16:52:22 +00:00
Janne Valkealahti
7fac746298 TimerSmokeTests to junit5
- Start using tag smoke to exclude those from a normal
  ci build cycle(will have a separate plan).
- Relates #779
2019-08-03 16:01:01 +01:00
Janne Valkealahti
da9c68f4e6 Remove TaskExecutor and TaskScheduler
- As all execution and scheduling is now in reactor,
  remove all traces of these spring interfaces.
- Fixes #800
2019-08-03 14:40:37 +01:00
Janne Valkealahti
63e1816587 Tweak TimerSmokeTests
- Change await time as testDeadlock seems to fail on ci
  to wait machine stop. Now use 5 sec instead of 1.
- Relates to #744
2019-05-26 09:54:05 +01:00
Janne Valkealahti
99568472b1 Fix RedisPersistTests
- Fixing a simple type in an origin changes
  which caused this test to fail.
- Relates #744
2019-05-13 19:53:04 +01:00
Janne Valkealahti
0de68f9d85 Fix use of deprecated method in MongoDbRule
- Switch to use a simple port check instead of trying
  to actually connect via mongo client.
- Relates #397
2019-05-12 08:11:51 +01:00
Janne Valkealahti
32dfb58a4b Testing polish and generic reactive changes
- Remove use of statemachine assertj assertions to prepare move
- Move statemachine assertj assertion to spring-statemachine-test
- Polish some tests and user TestUtils from core tests
- Remove most of a deprecation warning from core tests
- Relates #744
2019-05-10 14:54:14 +01:00
Spring Operator
426fa163b2 URL Cleanup
- Merge/squash #686 and #694
2019-05-03 15:01:31 +01:00
Janne Valkealahti
55b7ff09cf Fix exit logic with fork/join
- In a case where fork/join happens within a substate we should not exit parent state
  which causes cascading stops for forked regions thus causing inconsistent lifecycle
  states within that kind of a machine structure. This for example caused parent submachine
  to end up stopped and all regions running even if some regions ended up into terminal state.
- Fixes #737
2019-05-03 09:50:35 +01:00
jvalkeal
65c9bfac89 Remove spring-statemachine-redis
- For now classes just moved under
  spring-statemachine-data-redis
- Fixes #514
2018-02-23 12:23:32 +02:00
jvalkeal
a4d43131ea Add support for completion transitions
- Currently into as internal new feature, add state
  completed concecept and use it in various places.
- Main focus for this commit is to add support using
  anonymous transitions with state do actions which
  requires proper completion schematics.
- Internal functionality here will probably expose to
  user level in future releases using various other
  concepts.
- Backport #466
- Relates #504
2018-02-13 12:37:04 +02:00
Janne Valkealahti
8d7fe80bdb NPE on sendEvent
- Adding null check for current state
- Remove synchronization from scheduleEventQueueProcessing
  method in executor. Looks like this sync is not really needed
  and indeed may cause jvm level deadlocks if threads are used
  for execution.
- Change how some internals in
  AbstractStateMachine are synchronized
  to limit changes for deadlock.
- Relates to #307
- Backport of #359 #360
2017-05-19 07:52:31 +01:00
Janne Valkealahti
c4af0e700b StateMachineContextSerializer handles history and id
- Add missing serialisation for history map and machine id
- Fix possible NPE with extended state
- Backport #331
- Backport #333
- Relates #307
2017-05-05 14:53:51 +01:00
Janne Valkealahti
1a3f7da81c Make mongo tests faster
- There is a newer mongo client with changed behaviour
  as junit rule skipping tests if mongo is not running
  waits 30s for a connect failure. Add new server
  select timeout.
- Fixes #314
2017-02-10 16:12:03 +00:00
Janne Valkealahti
5fefff4418 Add new tck test
- New ShowcaseMachine test
- Remove old showcase uml tests
- Relates to #278
2016-11-23 17:59:18 +00:00
Janne Valkealahti
56d05a036a Add new tck test
- New SimpleSubMachine test
- Relates to #278
2016-11-20 11:18:33 +00:00
Janne Valkealahti
b79413bc72 Add tck tests
- SimpleMachine tests for factory and builder.
- Relates to #278
2016-11-20 09:43:15 +00:00
Janne Valkealahti
55c6faf225 Fix Redis/Mongo entity states
- Fix RedisRepositoryState and MongoDbStateRepository not to use
  null for machineid in any case as contract is that empty machineid
  is always empty not null.
- This issue was found when adding initial tck config tests, thus
  this commit also adds initial tck tests.
- Fixes #279
- Relates to #278
2016-11-19 17:51:15 +00:00
Janne Valkealahti
d1f7f31aeb Fix problems in JoinPseudoState
- Fix possible NPE which is a regression.
- Fix state entry notification for JOIN states.
- Fixes #229
2016-11-06 14:39:19 +00:00
Janne Valkealahti
8fc7592404 Fix wrong event object comparison
- Classic case of using == vs. equals if Strings are involved.
- In DefaultStateMachineExecutor change event comparison
  from == to equals.
- Tests using enums naturally work, but some tests using Strings
  had a wrong checks.
- Fixes #253
2016-09-26 10:29:01 +01:00
Janne Valkealahti
e9cb3af785 Fix possible NPE
- getState() now handles null better when checking
  running state when possibly going to return
  final state.
- Fixes #227
2016-05-21 09:54:21 +01:00
Janne Valkealahti
914f39e282 Add tests
- Adding some new tests related to wait loops
  and error handling.
2016-05-12 09:10:30 +01:00
Janne Valkealahti
7602cf68ce Pseudostates may cause exit from parent
- Fix better handling of when parent state
  is trying to enter if transition happens
  with pseudostate in substates.
- Fixes #223
2016-05-12 07:45:49 +01:00
Janne Valkealahti
751f95b44f Fix state exit with fork
- Fix a case where state leading into a fork
  doesn't exit.
- Relates to work in #221
2016-05-08 14:02:56 +01:00
Janne Valkealahti
66295d9ed2 State exists in regions
- Related to work done in #221 where we got
  into trouble for properly exiting states when
  fork/join is used.
2016-05-08 08:58:50 +01:00
Janne Valkealahti
2eb8788ce3 Direct region entry doesn't bypass initial state entry
- Enhance state context to have more info about target
  states which is needed to make a proper decision if
  region needs to be started.
- Fix RegionState to not to start if it looks like
  direct entry will be done later.
- Relates to #221
2016-05-07 15:52:12 +01:00
Janne Valkealahti
12137222a8 Join state should not be entered
- Fix join pseudostate to be transient.
- Fix tests which uses wrong concepts.
- Fixes #222
2016-05-06 17:24:54 +01:00
Janne Valkealahti
2836902635 Direct region entry doesn't bypass initial state entry
- Fix a case where region is entered directly. Essentially
  now trying to see if entry into a RegionState needs to
  start a region as otherwise we assume direct entry will
  do a start anyway.
- Fix some tests which kinda tested wrong scenarios.
- Fixes #221
2016-05-06 15:41:29 +01:00
Janne Valkealahti
9c4524e1cb Complex linked pseudostates cause trouble
- Fix complex linked state handling.
- Fixes #217
2016-05-04 07:33:25 +01:00
Janne Valkealahti
3cf40e8220 Add uml tests for showcase 2016-05-01 10:31:09 +01:00
Janne Valkealahti
50d32c2c26 Add new tests for Choice exit
- New test for choice exit scenario which
  I thought was broken.
- Add new spring-statemachine-build-tests project to
  ease testing so that we can mix everything. This
  project is a topdog which can depend on all other
  modules.
- Relates to #203
2016-04-19 19:20:06 +01:00