Permalink
Browse files

Merge pull request #2234 from bramwelt/broken-processing

Stop the BenchmarkingCrashStore from subverting HBase
  • Loading branch information...
bramwelt committed Jul 22, 2014
2 parents 755e8d2 + 33dd2c5 commit 2bed2595a875bde2c1350b53c0174245d2474e74
Showing with 32 additions and 0 deletions.
  1. +17 −0 socorro/external/crashstorage_base.py
  2. +15 −0 socorro/unittest/external/test_crashstorage_base.py
@@ -895,6 +895,23 @@ def save_processed(self, processed_crash):
end_time - start_time
)
+ #--------------------------------------------------------------------------
+ def save_raw_and_processed(self, raw_crash, dumps, processed_crash,
+ crash_id):
+ start_time = self.start_timer()
+ self.wrapped_crashstore.save_raw_and_processed(
+ raw_crash,
+ dumps,
+ processed_crash,
+ crash_id
+ )
+ end_time = self.end_timer()
+ self.config.logger.debug(
+ '%s save_raw_and_processed %s',
+ self.tag,
+ end_time - start_time
+ )
+
#--------------------------------------------------------------------------
def get_raw_crash(self, crash_id):
start_time = self.start_timer()
@@ -644,6 +644,21 @@ def test_benchmarking_crashstore(self):
)
mock_logging.debug.reset_mock()
+ crashstorage.save_raw_and_processed({}, 'payload', {}, 'ooid' )
+ crashstorage.wrapped_crashstore.save_raw_and_processed \
+ .assert_called_with(
+ {},
+ 'payload',
+ {},
+ 'ooid'
+ )
+ mock_logging.debug.assert_called_with(
+ '%s save_raw_and_processed %s',
+ 'test',
+ 1
+ )
+ mock_logging.debug.reset_mock()
+
crashstorage.get_raw_crash('uuid')
crashstorage.wrapped_crashstore.get_raw_crash.assert_called_with(
'uuid'

0 comments on commit 2bed259

Please sign in to comment.