这是indexloc提供的服务,不要输入任何密码
Skip to content

Activate DevTools before running an integration test that uses DevTools #82393

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

Merged
merged 1 commit into from
May 13, 2021

Conversation

jason-simmons
Copy link
Member

See #82382

@jason-simmons jason-simmons requested review from Hixie and chunhtai May 12, 2021 23:15
@flutter-dashboard flutter-dashboard bot added the tool Affects the "flutter" command-line tool. See also t: labels. label May 12, 2021
@google-cla google-cla bot added the cla: yes label May 12, 2021
Copy link
Contributor

@chunhtai chunhtai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Hixie
Copy link
Contributor

Hixie commented May 12, 2021

LGTM

@jmagman
Copy link
Member

jmagman commented May 13, 2021

@jmagman jmagman merged commit 2581587 into flutter:master May 13, 2021
@zanderso
Copy link
Member

Is there a discussion somewhere that I can read that describes why this helps?

@Hixie
Copy link
Contributor

Hixie commented May 13, 2021

Looking more closely I think this won't help, because it's still inside the same test which is where the timeout is applied. It should probably be moved to before the test.

Also I just noticed that there's a timeout on the test here, which we should remove. That timeout violates our style guide.

@jason-simmons
Copy link
Member Author

I thought the concern was that activating DevTools during flutter run could cause the flutter run execution to exceed the timeout used by the runFlutter function in this test.

The failure logs look like:

(matched /^An Observatory debugger and profiler on Flutter test device is available at: /)
(taking a long time...)
(process is not quitting, trying to send a "q" just in case that helps)
(a functional test should never reach this point)
stdout: Activating Dart DevTools...                                     
stdout: 
stdout: Application finished.
(process terminated with exit code 0)

The "taking a long time"/"process is not quitting" output is based on timeouts within runFlutter. Although the "process is not quitting" timeout appears to be set at 25 seconds, and it seems suspicious that this flutter run invocation would consume that much time even if it needs to activate DevTools.

@Hixie
Copy link
Contributor

Hixie commented May 14, 2021

Those timeouts are non-fatal (as all timeouts must be per our style guide), they're just thresholds for dumping more debugging information.

@jason-simmons
Copy link
Member Author

After the expectedMaxDuration timeout runFlutter sends a quit command to the flutter_tools process (which happened in the log taken from #82382).

There may be a race between this and the DevTools message that the test is waiting for.

Or possibly the DevTools message is not showing up as expected if the DevTools package needed to be activated on demand. I haven't seen that happen in local runs of this test though.

@Hixie
Copy link
Contributor

Hixie commented May 14, 2021

Yeah the intent of the expectedMaxDuration "send q" timeout is that that happens just before the end of the test just to clean things up. It was supposed to help debug things when they got stuck, and help prevent stray processes during debugging. Maybe we should remove that though, if it's causing more confusion than it's helping.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants