9ebd68f4204ea32539228316a09f5a8de600b8e4,tests/background_cpu_test.py,TestBackgroundWorkload,testWindowsVMCausesError,#TestBackgroundWorkload#,71
Before Change
def testWindowsVMCausesError(self):
windows vm with background_cpu_threads raises exception
with mock_flags.PatchFlags() as mocked_flags:
self.setupCommonFlags(mocked_flags)
mocked_flags["background_cpu_threads"].Parse(1)
mocked_flags["os_type"].Parse(os_types.WINDOWS)
config = configs.LoadConfig(ping_benchmark.BENCHMARK_CONFIG, {}, NAME)
spec = benchmark_spec.BenchmarkSpec(config, NAME, UID)
spec.ConstructVirtualMachines()
with self.assertRaisesRegexp(Exception, "NotImplementedError"):
spec.Prepare()
with self.assertRaisesRegexp(Exception, "NotImplementedError"):
spec.StartBackgroundWorkload()
with self.assertRaisesRegexp(Exception, "NotImplementedError"):
spec.StopBackgroundWorkload()
def testBackgroundWorkloadVM(self):
Check that the background_cpu_threads causes calls
with mock_flags.PatchFlags() as mocked_flags:
self.setupCommonFlags(mocked_flags)
After Change
self.assertEqual(vm0.RemoteCommand.call_count,
expected_remote_post_stop)
def testWindowsVMCausesError(self ):
windows vm with background_cpu_threads raises exception
self ._mocked_flags["background_cpu_threads"].Parse(1)
self._mocked_flags["os_type"].Parse(os_types.WINDOWS)
spec = self._CreateBenchmarkSpec(ping_benchmark.BENCHMARK_CONFIG)
spec.ConstructVirtualMachines()
with self.assertRaisesRegexp(Exception, "NotImplementedError"):
spec.Prepare()
with self.assertRaisesRegexp(Exception, "NotImplementedError"):
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 15
Instances Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 9ebd68f4204ea32539228316a09f5a8de600b8e4
Time: 2016-01-28
Author: skschneider@google.com
File Name: tests/background_cpu_test.py
Class Name: TestBackgroundWorkload
Method Name: testWindowsVMCausesError
Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 9ebd68f4204ea32539228316a09f5a8de600b8e4
Time: 2016-01-28
Author: skschneider@google.com
File Name: tests/background_cpu_test.py
Class Name: TestBackgroundWorkload
Method Name: testBackgroundWorkloadWindows
Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 9ebd68f4204ea32539228316a09f5a8de600b8e4
Time: 2016-01-28
Author: skschneider@google.com
File Name: tests/background_cpu_test.py
Class Name: TestBackgroundWorkload
Method Name: testBackgroundWorkloadVM
Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 9ebd68f4204ea32539228316a09f5a8de600b8e4
Time: 2016-01-28
Author: skschneider@google.com
File Name: tests/background_cpu_test.py
Class Name: TestBackgroundWorkload
Method Name: testBackgroundWorkloadVanillaConfigFlag
Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 9ebd68f4204ea32539228316a09f5a8de600b8e4
Time: 2016-01-28
Author: skschneider@google.com
File Name: tests/background_cpu_test.py
Class Name: TestBackgroundWorkload
Method Name: testWindowsVMCausesError