MCPcopy Create free account
hub / github.com/nodejs/node / testRDB

Method testRDB

deps/v8/tools/testrunner/standard_runner_test.py:180–206  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

178 result.json_content_equals('expected_test_results1.json')
179
180 def testRDB(self):
181 with self.with_fake_rdb() as records:
182 # sweet/bananaflakes fails first time on stress but passes on default
183 def tag_dict(tags):
184 return {t['key']: t['value'] for t in tags}
185
186 self.run_tests(
187 '--variants=default,stress',
188 '--rerun-failures-count=2',
189 '--time',
190 'sweet',
191 baseroot='testroot2',
192 infra_staging=False,
193 )
194
195 self.assertEqual(len(records), 3)
196 self.assertEqual(records[0]['testId'], 'sweet/bananaflakes//stress')
197 self.assertEqual(tag_dict(records[0]['tags'])['run'], '1')
198 self.assertFalse(records[0]['expected'])
199
200 self.assertEqual(records[1]['testId'], 'sweet/bananaflakes//stress')
201 self.assertEqual(tag_dict(records[1]['tags'])['run'], '2')
202 self.assertTrue(records[1]['expected'])
203
204 self.assertEqual(records[2]['testId'], 'sweet/bananaflakes//default')
205 self.assertEqual(tag_dict(records[2]['tags'])['run'], '1')
206 self.assertTrue(records[2]['expected'])
207
208 def testFlakeWithRerunAndJSON(self):
209 """Test re-running a failing test and output to json."""

Callers

nothing calls this directly

Calls 2

with_fake_rdbMethod · 0.80
run_testsMethod · 0.45

Tested by

no test coverage detected