Skip to content

Fixing Racy ClusterLogVerboseEnabledSpec - #5548

Merged
Aaronontheweb merged 4 commits into
akkadotnet:devfrom
eaba:cluster_log_verbose_cluster_events
Jan 29, 2022
Merged

Aaronontheweb merged 4 commits into
akkadotnet:devfrom
eaba:cluster_log_verbose_cluster_events

Conversation

@eaba

@eaba eaba commented Jan 28, 2022 •

Copy link
Copy Markdown
Contributor

Changes

  • [Exp.] Increase TimeOut to 1 mins from default 3s
  • Converted test to async/await
  • Added JoinAsync and DownAsync

Checklist

For significant changes, please ensure that the following have been completed (delete if not relevant):

* Converted test to `async/await`
await EventFilter
.Info(contains: expected)
.ExpectOne(() => _cluster.Join(_selfAddress));
.ExpectOneAsync(TimeSpan.FromMinutes(1), () => _cluster.Join(_selfAddress));

@eaba eaba Jan 28, 2022 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default timeout was 3s....bumped this up to see how that goes! The test failed at times due to timeout.

* Created `DownAsync` of `Down`
@eaba eaba changed the title Attempt Fixing Racy ClusterLogVerboseEnabledSpec Fixing Racy ClusterLogVerboseEnabledSpec Jan 28, 2022
@Aaronontheweb

Copy link
Copy Markdown
Member

What's the error message this test usually fails with?

@eaba

eaba commented Jan 29, 2022

Copy link
Copy Markdown
Contributor Author

What's the error message this test usually fails with?

Timeout (00:00:03) while waiting for messages. Only received 0/1 messages that matched filter [Info when Message contains " - event MemberUp"]

Expected: True

Actual:   False
at Akka.TestKit.Xunit2.XunitAssertions.Fail(String format, Object[] args) in D:\a\1\s\src\contrib\testkits\Akka.TestKit.Xunit2\XunitAssertions.cs:line 26

   at Akka.TestKit.Internal.InternalEventFilterApplier.Intercept[T](Func`1 func, ActorSystem system, Nullable`1 timeout, Nullable`1 expectedOccurrences, MatchedEventHandler matchedEventHandler) in D:\a\1\s\src\core\Akka.TestKit\EventFilter\Internal\EventFilterApplier.cs:line 309

   at Akka.TestKit.Internal.InternalEventFilterApplier.InternalExpect(Action action, ActorSystem actorSystem, Int32 expectedCount, Nullable`1 timeout) in D:\a\1\s\src\core\Akka.TestKit\EventFilter\Internal\EventFilterApplier.cs:line 451

   at Akka.TestKit.Internal.InternalEventFilterApplier.ExpectOne(Action action) in D:\a\1\s\src\core\Akka.TestKit\EventFilter\Internal\EventFilterApplier.cs:line 46

   at Akka.Cluster.Tests.ClusterLogSpec.<>c__DisplayClass9_0.<Join>b__0() in D:\a\1\s\src\core\Akka.Cluster.Tests\ClusterLogSpec.cs:line 65

   at Akka.TestKit.TestKitBase.<>c__DisplayClass158_0.<Within>b__0() in D:\a\1\s\src\core\Akka.TestKit\TestKitBase_Within.cs:line 57

   at Akka.TestKit.TestKitBase.Within[T](TimeSpan min, TimeSpan max, Func`1 function, String hint, Nullable`1 epsilonValue) in D:\a\1\s\src\core\Akka.TestKit\TestKitBase_Within.cs:line 134

   at Akka.TestKit.TestKitBase.Within(TimeSpan min, TimeSpan max, Action action, String hint, Nullable`1 epsilonValue) in D:\a\1\s\src\core\Akka.TestKit\TestKitBase_Within.cs:line 57

   at Akka.TestKit.TestKitBase.Within(TimeSpan max, Action action, Nullable`1 epsilonValue) in D:\a\1\s\src\core\Akka.TestKit\TestKitBase_Within.cs:line 32

   at Akka.Cluster.Tests.ClusterLogSpec.Join(String expected) in D:\a\1\s\src\core\Akka.Cluster.Tests\ClusterLogSpec.cs:line 63

   at Akka.Cluster.Tests.ClusterLogVerboseEnabledSpec.A_cluster_must_log_verbose_cluster_events_when_log_info_verbose_is_on() in D:\a\1\s\src\core\Akka.Cluster.Tests\ClusterLogSpec.cs:line 131

@Aaronontheweb
Aaronontheweb merged commit e5a5bd3 into akkadotnet:dev Jan 29, 2022
@Aaronontheweb

Copy link
Copy Markdown
Member

LGTM

@eaba
eaba deleted the cluster_log_verbose_cluster_events branch January 29, 2022 01:48
@Aaronontheweb

Copy link
Copy Markdown
Member

This spec is still failing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants