Skip to content

Commit 51eb801

Browse files
committed
revert
1 parent a4c74b1 commit 51eb801

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

tests/GraphQL.Client.Tests.Common/Helpers/ObservableTester.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ public class ObservableTester<TSubscriptionPayload> : IDisposable
1818
private readonly EventLoopScheduler _observeScheduler = new EventLoopScheduler();
1919

2020
/// <summary>
21-
/// The timeout for SubscriptionAssertions.***Have*** methods. Defaults to 30 seconds.
21+
/// The timeout for SubscriptionAssertions.***Have*** methods. Defaults to 3 seconds.
2222
/// </summary>
23-
public TimeSpan Timeout { get; set; } = TimeSpan.FromSeconds(30);
23+
public TimeSpan Timeout { get; set; } = TimeSpan.FromSeconds(3);
2424

2525
/// <summary>
26-
/// Indicates that an update has been received since the last <see cref="Reset()"/>
26+
/// Indicates that an update has been received since the last reset of <see cref="_updateReceived"/>
2727
/// </summary>
2828
public bool UpdateReceived => _updateReceived.IsSet;
2929

@@ -102,9 +102,10 @@ public AndWhichConstraint<SubscriptionAssertions<TPayload>, TPayload> HaveReceiv
102102
.ForCondition(isSet => isSet)
103103
.FailWith("Expected {context:Subscription} to receive new payload{reason}, but did not receive an update within {0}", timeout);
104104

105-
Subject.Reset();
105+
Subject._updateReceived.Reset();
106106
return new AndWhichConstraint<SubscriptionAssertions<TPayload>, TPayload>(this, Subject.LastPayload);
107107
}
108+
108109
public AndWhichConstraint<SubscriptionAssertions<TPayload>, TPayload> HaveReceivedPayload(string because = "", params object[] becauseArgs)
109110
=> HaveReceivedPayload(Subject.Timeout, because, becauseArgs);
110111

@@ -117,7 +118,7 @@ public AndConstraint<SubscriptionAssertions<TPayload>> NotHaveReceivedPayload(Ti
117118
.ForCondition(isSet => !isSet)
118119
.FailWith("Expected {context:Subscription} to not receive a new payload{reason}, but did receive an update: {0}", Subject.LastPayload);
119120

120-
Subject.Reset();
121+
Subject._updateReceived.Reset();
121122
return new AndConstraint<SubscriptionAssertions<TPayload>>(this);
122123
}
123124
public AndConstraint<SubscriptionAssertions<TPayload>> NotHaveReceivedPayload(string because = "", params object[] becauseArgs)

0 commit comments

Comments
 (0)