This repository has been archived by the owner on Jan 18, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 77
Fix bug where CommandSender would not reenable after being disabled #1429
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
improbable-prow-robot
added
jira/no-ticket
Indicates a PR has no corresponding JIRA ticket
do-not-merge/work-in-progress
Indicates that a PR should not merge because it is a work in progress.
size/XS
Denotes a PR that changes 0-14 lines, ignoring generated files.
labels
Jul 17, 2020
improbable-prow-robot
added
A: playground
Area: Playground
size/M
Denotes a PR that changes 40-149 lines, ignoring generated files.
and removed
size/XS
Denotes a PR that changes 0-14 lines, ignoring generated files.
labels
Jul 17, 2020
improbable-prow-robot
removed
the
do-not-merge/work-in-progress
Indicates that a PR should not merge because it is a work in progress.
label
Jul 17, 2020
paulbalaji
reviewed
Jul 17, 2020
workers/unity/Assets/Tests/EditmodeTests/Correctness/Subscriptions/RequireablesReenableTests.cs
Outdated
Show resolved
Hide resolved
paulbalaji
approved these changes
Jul 17, 2020
zeroZshadow
approved these changes
Jul 17, 2020
.Step((world, behaviour) => | ||
{ | ||
Assert.IsNull(behaviour.CommandReceiver); | ||
Assert.IsNull(behaviour.CommandSender); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this check if the captured command sender/receiver is invalidated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
BryanJY-Wong
approved these changes
Jul 17, 2020
jamiebrynes7
changed the title
Fix bug where
Fix bug where CommandSender would not reenable after being disabled
Jul 17, 2020
CommandSender
would not re-enable after being disabled
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
A: core
Area: Core GDK
A: playground
Area: Playground
jira/no-ticket
Indicates a PR has no corresponding JIRA ticket
size/M
Denotes a PR that changes 40-149 lines, ignoring generated files.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
If you have a behaviour that looks like:
If this behaviour is disabled due to
OtherComponent
losing authority,receiver
will be set tonull
and the underlying object hasIsValid
set tofalse
.If then the behaviour is re-enabled due to
OtherComponent
gaining authority,receiver
will be re-injected, butIsValid
will not be set to true.This is the same bug as #1326, but for the sender rather than the readers. The fix is to have everything implement
IRequireable
. This is a consequence of #1297 where we changed the behaviour of behaviours with multiple requireables.Tests
Test cases for reader/writer/commandsender/commandreceiver
Documentation