State leak in unit tests
Reported by
oleg...@yandex-team.ru,
May 3 2017
|
||||
Issue descriptionWhen some unit tests which initialize ServiceManagerConnection are executed sequentially like this: unit_tests --gtest_filter=DeclarativeContentActionTest.ShowPageAction:RequestContentScriptTest.MissingScripts DCHECK in service_manager_connection_impl.cc(408) fails: [11281:11281:0420/181735.782814:786677145905:FATAL:service_manager_connection_impl.cc(408)] Check failed: !g_connection_for_process.Get(). #0 0x7fb198d8fadb base::debug::StackTrace::StackTrace() #1 0x7fb198d8e7dc base::debug::StackTrace::StackTrace() #2 0x7fb198e01ef3 logging::LogMessage::~LogMessage() #3 0x7fb1939a2e42 content::ServiceManagerConnection::SetForProcess() #4 0x7fb194caabcc content::ServiceManagerContext::ServiceManagerContext() #5 0x00000374982f content::TestServiceManagerContext::TestServiceManagerContext() #6 0x000003728365 content::InProcessUtilityThreadHelper::InProcessUtilityThreadHelper() #7 0x00000186b06d extensions::ExtensionServiceTestBase::ExtensionServiceTestBase() #8 0x0000015d435f extensions::(anonymous namespace)::RequestContentScriptTest::RequestContentScriptTest() ...
,
May 15 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/5ffddc43be38516f89c6c631872285324778eb39 commit 5ffddc43be38516f89c6c631872285324778eb39 Author: olegmax <olegmax@yandex-team.ru> Date: Mon May 15 08:26:12 2017 Isolate tests that initialize ServiceManagerConnection Some unit tests initialize ServiceManagerConnection and leave it initialized (e.g. in RenderProcessHostImpl::InitializeChannelProxy). On the other hand, tests that use TestServiceManagerContext/ServiceManagerContext expect ServiceManagerConnection to be unitialized on test start or DCHECK(!g_connection_for_process.Get()) fails. Change to explicitly uninitialize ServiceManagerConnection on creation of TestServiceManagerContext. BUG= 717928 ,697217 Review-Url: https://codereview.chromium.org/2861503003 Cr-Commit-Position: refs/heads/master@{#471696} [modify] https://crrev.com/5ffddc43be38516f89c6c631872285324778eb39/content/public/test/test_service_manager_context.cc
,
May 15 2017
This issue is resolved by commit in previous comment. I don't have rights to change issue status.
,
Jul 20 2017
As per the comment #3 please confirm can we change the issue status to fixed ? Thanks,
,
Jul 20 2017
Yes, as for me it is fixed.
,
Jul 20 2017
Thank you for providing more feedback. Adding requester "kavvaru@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jul 20 2017
Thanks for the quick update.Marking it as fixed as per comment #5 |
||||
►
Sign in to add a comment |
||||
Comment 1 by ajha@chromium.org
, May 10 2017