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


##########
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:
   FYI, test case runs would look like this
   
   ```
   timestamp: Thu Jan  1 00:00:18 1970, metric_value: 4.00
   timestamp: Thu Jan  1 00:00:17 1970, metric_value: 4.00
   timestamp: Thu Jan  1 00:00:16 1970, metric_value: 4.00
   timestamp: Thu Jan  1 00:00:15 1970, metric_value: 4.00
   timestamp: Thu Jan  1 00:00:14 1970, metric_value: 4.00
   timestamp: Thu Jan  1 00:00:13 1970, metric_value: 4.00
   timestamp: Thu Jan  1 00:00:12 1970, metric_value: 3.00 <---- Anomaly
   timestamp: Thu Jan  1 00:00:11 1970, metric_value: 0.00
   timestamp: Thu Jan  1 00:00:10 1970, metric_value: 0.00
   timestamp: Thu Jan  1 00:00:09 1970, metric_value: 0.00
   timestamp: Thu Jan  1 00:00:08 1970, metric_value: 0.00
   timestamp: Thu Jan  1 00:00:07 1970, metric_value: 0.00
   timestamp: Thu Jan  1 00:00:06 1970, metric_value: 0.00
   timestamp: Thu Jan  1 00:00:05 1970, metric_value: 0.00
   timestamp: Thu Jan  1 00:00:04 1970, metric_value: 0.00
   timestamp: Thu Jan  1 00:00:03 1970, metric_value: 0.00
   timestamp: Thu Jan  1 00:00:02 1970, metric_value: 0.00
   ```



-- 
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