-
Notifications
You must be signed in to change notification settings - Fork 511
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
Removed the extra space in expected test result #689
Conversation
Signed-off-by: Arash Rohani <Arash.Rohani@gmail.com>
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.
LGTM. To get the test passing
Signed-off-by: Arash Rohani <Arash.Rohani@gmail.com>
LGTM, works in my local kubernetes. Let's try it in the action now. Thank you for the contribution @Arashrohani |
1 similar comment
LGTM, works in my local kubernetes. Let's try it in the action now. Thank you for the contribution @Arashrohani |
Hi @paulyuk Thanks Paul, it seems that the order of messages is different sometimes, would you please re-run the workflow or do you have any suggestions on how to fix the order issue? |
Hey @Arashrohani - I can rerun it easily but I dont have a good suggestion for now how we can deal with the async nature of it. I'm noticing one other thing that may be a problem in the C# test-- see how this shows Here is a reference to the failure I see still: https://github.com/dapr/quickstarts/runs/6779030966?check_suite_focus=true#step:19:334 One more thing do you happen to be on Discord or some other way to faster chat as we figure this out? |
@paulyuk You think that would fix the issue regarding the order? Can we add delay between sending the sample messages to fix the order issue because the code is working, the problem is that the test runner is looking for those messages in order? if you want me to replace those calls with Console.Writeline() I would do it, Unfortunately I don't use discord :( |
…test issue. Signed-off-by: Arash Rohani <Arash.Rohani@gmail.com>
@paulyuk Replaced it with Console.WriteLine but it didn't fix the order issue (it broke the first test also but I think that is related to whitespaces), I think the best approach is to add a delay or update the test runner or we can just keep one of those messages in the step (I don't like this) |
Ok do you want to try the delay? The test runner update might be impactful and more than we bargained for -- for now. |
Hey @paulyuk Hmm, Sure, where should I update that? in readme? I though that is going to be somewhere else?! Do you want me to change it back to use logger? |
Yes I suggest we add a sleep to the readme to the mechanical markdown that the user won't see. Looks like there is a sleep directive: https://github.com/dapr/mechanical-markdown/blob/main/examples/background.md#sleeping |
- "B: Message on B" | ||
- "C: Message on C" | ||
- "A: Message on A" | ||
- "B: Message on B" |
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.
Given there is a bit of a race and timing condition here, I suggest we put in a sleep to give each message more time to process and validate in order.
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.
@paulyuk I just noticed that the first csharp subscriber step already has the sleep on it but I have seen that sometimes is failing because of order, I think we should put sleep in places that we are sending the messages for each step?
Are those steps in the Readme also? is this one of them?
<!-- STEP
name: Curl validation k8s
After I got your confirmation I would apply the change and change the messages to use logger again and push it up.
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.
Yes I believe we should expand on sleeps to make it as deterministic as possible. Perhaps we really increase sleeps like to 5 seconds to ensure?
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.
also agree it might be bette rto try where we're sending the messages. Those all come from the same process and might be more deterministic.
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.
@paulyuk Sounds good, so Should I just revert the Console to logger and push it up or do I need to add sleep for steps also?
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.
Hey. I could be ok either way. What's your preference ? My only thought is most other quickstarts use console
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.
Hey @paulyuk I prefer consistency, I fixed the whitespace issue after adding the Console and added sleep directive to C# subscriber step only. Please let me know what else I need to do?
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.
Ok I like the choice you made. Does it pass well and "look good to you now"? I will also test.
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.
It seems that it does, and I think it looks good, thanks for asking me :)
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.
Awesome. I will carve out some time to give it a test and final look, today hopefully.
Thank you so much for driving this. Improving test stability has a lot of positive impact on the project.
Signed-off-by: Arash Rohani <Arash.Rohani@gmail.com>
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.
LGTM!
@Arashrohani - Really appreciate this contribution and finding this issue! |
Signed-off-by: Arash Rohani Arash.Rohani@gmail.com
Description
Removed the extra space in expected test result to fix the test workflow.
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: