-
-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Json fixes (#91) #92
Json fixes (#91) #92
Conversation
Check.That(responseWithState1).Equals("Test state msg 1"); | ||
|
||
var responseWithState2 = await http.GetStringAsync(url + "/foo"); | ||
var responseWithState2 = new HttpClient().GetStringAsync(url + "/foo").Result; | ||
Check.That(responseWithState2).Equals("Test state msg 2"); |
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.
This assertion fails since responseWithState2
is retrieved using a new HttpClient
instance.
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.
Actually sometimes, I had some failing tests. So I decided to use a new HttpClient each time, which should works fine because it does not matter who calls the server; the server should track state.
The issue could be related to the order and if the mappings are correctly added before the clients connect maybe????
@@ -69,7 +70,7 @@ public class StatefulBehaviorTests : IDisposable | |||
} | |||
|
|||
[Fact] | |||
public async Task Scenario_and_State_TodoList_Example() | |||
public void Scenario_and_State_TodoList_Example() |
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.
I believe async Task
(and await
within the test) was actually better here, or am I missing something here?
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.
Design is better yes, however they failed sometimes (at my machine...)
No description provided.