From 9abfae34812add5e6bac420fcd4cc915686afe22 Mon Sep 17 00:00:00 2001 From: "phajdan.jr@chromium.org" Date: Mon, 16 Mar 2009 13:43:10 +0000 Subject: This should make ProcessUtilTest.KillSlowChild not-flaky. There is no need to check process count (which tends to induce flakiness). In fact, we are already checking all important facts: - after checking that process handle is a not-null handle we know that the process started successfully - after WaitForSingleProcess returns true we know that the process finished successfully BUG=8811 Review URL: http://codereview.chromium.org/42224 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11728 0039d316-1c4b-4281-b951-d872f2087c98 --- base/process_util_unittest.cc | 9 --------- 1 file changed, 9 deletions(-) (limited to 'base') diff --git a/base/process_util_unittest.cc b/base/process_util_unittest.cc index 578ac3f..acb60e0 100644 --- a/base/process_util_unittest.cc +++ b/base/process_util_unittest.cc @@ -50,22 +50,13 @@ MULTIPROCESS_TEST_MAIN(SlowChildProcess) { return 0; } -#if defined(OS_WIN) -#define EXE_SUFFIX L".exe" -#else -#define EXE_SUFFIX L"" -#endif - TEST_F(ProcessUtilTest, KillSlowChild) { remove("SlowChildProcess.die"); - int oldcount = GetProcessCount(L"base_unittests" EXE_SUFFIX, 0); ProcessHandle handle = this->SpawnChild(L"SlowChildProcess"); ASSERT_NE(static_cast(NULL), handle); - EXPECT_EQ(oldcount+1, GetProcessCount(L"base_unittests" EXE_SUFFIX, 0)); FILE *fp = fopen("SlowChildProcess.die", "w"); fclose(fp); EXPECT_TRUE(base::WaitForSingleProcess(handle, 5000)); - EXPECT_EQ(oldcount, GetProcessCount(L"base_unittests" EXE_SUFFIX, 0)); base::CloseProcessHandle(handle); } -- cgit v1.1