Skip to content
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

Merged
merged 3 commits into from
Feb 23, 2018
Merged

Json fixes (#91) #92

merged 3 commits into from
Feb 23, 2018

Conversation

StefH
Copy link
Collaborator

@StefH StefH commented Feb 22, 2018

No description provided.

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");

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.

Copy link
Collaborator Author

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()

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?

Copy link
Collaborator Author

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...)

@StefH StefH self-assigned this Feb 23, 2018
@StefH StefH merged commit 0c25b2e into master Feb 23, 2018
@StefH StefH deleted the json branch February 27, 2018 20:48
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.

None yet

2 participants