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

Making it always wait the same amount #267

Merged
merged 3 commits into from Apr 6, 2021

Conversation

@igor-ribeiiro
Copy link
Contributor

@igor-ribeiiro igor-ribeiiro commented Apr 6, 2021

Making test always wait 8000 regardless of flaky tests to make tests more reliable.

@igor-ribeiiro igor-ribeiiro requested a review from TCourtneyOwen Apr 6, 2021
@igor-ribeiiro igor-ribeiiro self-assigned this Apr 6, 2021
@igor-ribeiiro igor-ribeiiro requested a review from OfficeDev/office-platform-devx as a code owner Apr 6, 2021
@akrantz
Copy link
Contributor

@akrantz akrantz commented Apr 6, 2021

8 seconds is a really long time. Could it be smaller?

I'm OK with increasing the value some if that is causing the tests to be flaky, but it would be nice if there was a reliable way to know when the function has returned. One way would be to use an Office.js event to know when the cell value was changed. A less elegant way would be to get the value in a loop until changed (or timed out).

@igor-ribeiiro
Copy link
Contributor Author

@igor-ribeiiro igor-ribeiiro commented Apr 6, 2021

I'm OK with increasing the value some if that is causing the tests to be flaky, but it would be nice if there was a reliable way to know when the function has returned. One way would be to use an Office.js event to know when the cell value was changed. A less elegant way would be to get the value in a loop until changed (or timed out).

Yeah, just waiting around isn't the best, but it was the way it was being done already. A loop solution could give better times on success cases, but fail cases would be the same.
Given that we just have two tests with these sleeps, I guess it shouldn't be that bad to just wait on them.

@akrantz
Copy link
Contributor

@akrantz akrantz commented Apr 6, 2021

How about we make it 5 seconds? That should be more than enough time for any platform.

@TCourtneyOwen
Copy link
Contributor

@TCourtneyOwen TCourtneyOwen commented Apr 6, 2021

That's great to see that this fixes it. Also, I have added the enable-edge-webview artifact to our VM deployment script so we shouldn't hit the webivew hang problem moving forward

@igor-ribeiiro igor-ribeiiro dismissed stale reviews from TCourtneyOwen and akrantz via 7006329 Apr 6, 2021
@igor-ribeiiro
Copy link
Contributor Author

@igor-ribeiiro igor-ribeiiro commented Apr 6, 2021

How about we make it 5 seconds? That should be more than enough time for any platform.

Just did!

@akrantz
akrantz approved these changes Apr 6, 2021
@igor-ribeiiro igor-ribeiiro merged commit dd7151c into OfficeDev:master Apr 6, 2021
2 checks passed
2 checks passed
Excel-Custom-Functions #8047236 succeeded
Details
@microsoft-cla
license/cla All CLA requirements met.
@igor-ribeiiro igor-ribeiiro deleted the igor-ribeiiro:flaky_tests branch Apr 6, 2021
igor-ribeiiro added a commit that referenced this pull request Apr 12, 2021
* Fixing breakpoints for VSCode

* Making HTML not get auto deleted (#266)

Had to override the default behavior of the CleanWebpackPlugin. It normally deletes all files creates by other plugins that are not webpack.
This is the case for out HTML, css and one .xml file. So I made it just clean the files before compiling and not after.

Now you can run npm run build followed by npm start and the project would work.

* Making it always wait the same amount (#267)

Making test always wait 5000 regardless of flaky tests to make tests more reliable.
igor-ribeiiro added a commit that referenced this pull request Apr 12, 2021
* Fixing breakpoints for VSCode

* Making HTML not get auto deleted (#266)

Had to override the default behavior of the CleanWebpackPlugin. It normally deletes all files creates by other plugins that are not webpack.
This is the case for out HTML, css and one .xml file. So I made it just clean the files before compiling and not after.

Now you can run npm run build followed by npm start and the project would work.

* Making it always wait the same amount (#267)

Making test always wait 5000 regardless of flaky tests to make tests more reliable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants