tvalentyn commented on code in PR #27288:
URL: https://github.com/apache/beam/pull/27288#discussion_r1261643587


##########
sdks/python/apache_beam/testing/analyzers/perf_analysis_test.py:
##########
@@ -218,9 +218,10 @@ def 
test_change_point_has_anomaly_marker_in_gh_description(self):
         line for line in description.split(constants._NEW_LINES_JOINER)
         if re.match(r'timestamp: .*, metric_value: .*', line.strip())),
                      '')
-    string_to_search = (
-        'timestamp: Wed Dec 31 19:00:15 1969, metric_value: 3.00 <---- 
Anomaly')
-    self.assertTrue(string_to_search in runs_info)
+    pattern = pattern = (
+        r'timestamp: .+ (\d{4}), metric_value: (\d+.\d+) <---- Anomaly')

Review Comment:
   I think searching for specific anomaly value is fine, e.g. 'metric_value: 
3.00 <---- Anomaly'. You can also modify the anomaly dataset slightly to be:
   
   0, 0, 0, 0, 0, 3, 4, 4, 4 , then having `3 <--- Anomaly` in the test 
condition would also check  that anomaly is reported at the first occurrence of 
the elevated reading.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to