Skip to content

test: sends messages#2

Open
jonnadal wants to merge 2 commits intograydon:masterfrom
jonnadal:test-sends-messages
Open

test: sends messages#2
jonnadal wants to merge 2 commits intograydon:masterfrom
jonnadal:test-sends-messages

Conversation

@jonnadal
Copy link
Copy Markdown

This PR builds upon #1

I loaded ConcordeSystem::simple() into Stateright's Explorer and
noticed that the latest version isn't sending any messages. This commit
simply adds a regression test, which is currently failing.

The commit also adds #derive(Clone) to ConcordeActor and
ConcordeSystem as those are necessary for using the Explorer.

jonnadal added 2 commits July 11, 2020 09:53
The following changes in particular may be helpful:

- Fixes Explorer.
- Introduces `System::History`.
- Introduces `assert_properties` helper.
I loaded `ConcordeSystem::simple()` into Stateright's Explorer and
noticed that the latest version isn't sending any messages. This commit
simply adds a regression test, which is currently failing.

The commit also adds `#derive(Clone)` to `ConcordeActor` and
`ConcordeSystem` as those are necessary for using the Explorer.
@jonnadal jonnadal changed the title Test sends messages test: sends messages Jul 11, 2020
@jonnadal
Copy link
Copy Markdown
Author

@graydon I noticed that a recent change altered a filter to require an ordering relationship between items, whereas the older code would allow None w/ regard to the partial order. Not sure if that was intended, so I introduced a change to adopt the old behavior (not yet part of this PR):

diff --git a/src/participant.rs b/src/participant.rs
index 35f141c..6b4bca9 100644
--- a/src/participant.rs
+++ b/src/participant.rs
@@ -119,7 +119,10 @@ impl<ObjLD: LatticeDef + 'static, Peer: DefTraits + 'static> Participant<ObjLD,
             .new_opinion
             .proposed_configs
             .iter()
-            .filter(|u| { *u >= commit_cfg })
+            .filter(|u| {
+                <crate::cfg::CfgLD<Peer> as LatticeDef>::partial_order(&u.value, &commit_cfg.value)
+                    != Some(std::cmp::Ordering::Less)
+            })
             .cloned()
             .collect();
     }

That change results in messages being sent, but then the liveness property is violated, which leads me to think that I might not be on the right track. Thoughts?

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.

1 participant