Bug 1620656 - Fix tests broken by removing 'geckoview' telemetry. r=janerik
☠☠ backed out by 954520f48964 ☠ ☠
authorAlessio Placitelli <alessio.placitelli@gmail.com>
Tue, 16 Jun 2020 08:54:41 +0000
changeset 535836 af6b36a497e87e92a101891773fd0b1f3cbf9c64
parent 535835 f0b502580ef071e66d6d834ebe66a49707a5fa35
child 535837 f82a44c95497c4821a758ba031078945a188bc21
push id119097
push useraplacitelli@mozilla.com
push dateTue, 16 Jun 2020 09:49:15 +0000
treeherderautoland@af6b36a497e8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjanerik
bugs1620656
milestone79.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1620656 - Fix tests broken by removing 'geckoview' telemetry. r=janerik Depends on D79522 Differential Revision: https://phabricator.services.mozilla.com/D79792
toolkit/components/telemetry/tests/python/test_gen_event_data_json.py
toolkit/components/telemetry/tests/python/test_gen_scalar_data_json.py
toolkit/components/telemetry/tests/python/test_parse_events.py
toolkit/components/telemetry/tests/python/test_usecounters.py
--- a/toolkit/components/telemetry/tests/python/test_gen_event_data_json.py
+++ b/toolkit/components/telemetry/tests/python/test_gen_event_data_json.py
@@ -42,17 +42,17 @@ with.optin:
   testme2:
     objects: ["test2"]
     bug_numbers: [1456415]
     notification_emails: ["telemetry-client-dev@mozilla.org"]
     record_in_processes: ["main"]
     description: opt-in event
     release_channel_collection: opt-in
     expiry_version: never
-    products: ['firefox', 'fennec', 'geckoview']
+    products: ['firefox', 'fennec']
     extra_keys:
       message: a message 2
         """
 
         EXPECTED_JSON = {
             "with.optout": {
                 "testme1": {
                     "objects": ["test1"],
@@ -67,17 +67,17 @@ with.optin:
             "with.optin": {
                 "testme2": {
                     "objects": ["test2"],
                     "expired": False,
                     "expires": "never",
                     "methods": ["testme2"],
                     "extra_keys": ["message"],
                     "record_on_release": False,
-                    "products": ["firefox", "fennec", "geckoview"],
+                    "products": ["firefox", "fennec"],
                 }
             },
         }
 
         io = StringIO()
         try:
             tmpfile = tempfile.NamedTemporaryFile(suffix=".json", delete=False)
             # Write the event definition to the temporary file
--- a/toolkit/components/telemetry/tests/python/test_gen_scalar_data_json.py
+++ b/toolkit/components/telemetry/tests/python/test_gen_scalar_data_json.py
@@ -41,31 +41,31 @@ newscalar:
     bug_numbers:
       - 1456415
     description: opt-out scalar
     expires: never
     kind: string
     notification_emails: ["telemetry-client-dev@mozilla.org"]
     record_in_processes: ["main"]
     release_channel_collection: opt-out
-    products: ["firefox", "fennec", "geckoview"]
+    products: ["firefox", "fennec"]
     keyed: false
         """
 
         EXPECTED_JSON = {
             "newscalar": {
                 "withoptout": {
                     "kind": "nsITelemetry::SCALAR_TYPE_STRING",
                     "expired": False,
                     "expires": "never",
                     "record_on_release": True,
                     "keyed": False,
                     "keys": [],
                     "stores": ["main"],
-                    "products": ["firefox", "fennec", "geckoview"],
+                    "products": ["firefox", "fennec"],
                 },
                 "withoptin": {
                     "kind": "nsITelemetry::SCALAR_TYPE_COUNT",
                     "expired": False,
                     "expires": "never",
                     "record_on_release": False,
                     "keyed": False,
                     "keys": [],
--- a/toolkit/components/telemetry/tests/python/test_parse_events.py
+++ b/toolkit/components/telemetry/tests/python/test_parse_events.py
@@ -89,32 +89,32 @@ bug_numbers: [12345]
 notification_emails: ["test01@mozilla.com", "test02@mozilla.com"]
 record_in_processes: ["content"]
 description: This is a test entry for Telemetry.
 expiry_version: never
 extra_keys:
   key1: test1
   key2: test2
 products:
-    - geckoview
+    - fennec
 operating_systems:
     - windows
 """
         name = "test_event"
         event = load_event(SAMPLE_EVENT)
         evt = parse_events.EventData("CATEGORY",
                                      name,
                                      event,
                                      strict_type_checks=True)
         ParserError.exit_func()
 
         self.assertEqual(evt.methods, ["method1", "method2"])
         self.assertEqual(evt.objects, ["object1", "object2"])
         self.assertEqual(evt.record_in_processes, ["content"])
-        self.assertEqual(evt.products, ["geckoview"])
+        self.assertEqual(evt.products, ["fennec"])
         self.assertEqual(evt.operating_systems, ["windows"])
         self.assertEqual(sorted(evt.extra_keys), ["key1", "key2"])
 
     def test_absent_products(self):
         SAMPLE_EVENT = """
 methods: ["method1", "method2"]
 objects: ["object1", "object2"]
 bug_numbers: [12345]
--- a/toolkit/components/telemetry/tests/python/test_usecounters.py
+++ b/toolkit/components/telemetry/tests/python/test_usecounters.py
@@ -30,17 +30,17 @@ class TestParser(unittest.TestCase):
         parse_histograms.load_allowlist()
 
         hist = parse_histograms.Histogram('USE_COUNTER2_TEST_HISTOGRAM',
                                           histograms['USE_COUNTER2_TEST_HISTOGRAM'],
                                           strict_type_checks=True)
 
         ParserError.exit_func()
         self.assertEquals(hist.dataset(), "nsITelemetry::DATASET_ALL_CHANNELS")
-        self.assertEquals(hist.products(), ["firefox", "fennec", "geckoview"])
+        self.assertEquals(hist.products(), ["firefox", "fennec"])
 
     def test_usecounter_histogram(self):
         SAMPLE_HISTOGRAM = {
             "USE_COUNTER2_TEST_HISTOGRAM": {
                 "expires_in_version": "never",
                 "kind": "boolean",
                 "description": "Whether a foo used bar"
             }
@@ -51,13 +51,13 @@ class TestParser(unittest.TestCase):
         hist = parse_histograms.Histogram('USE_COUNTER2_TEST_HISTOGRAM',
                                           histograms['USE_COUNTER2_TEST_HISTOGRAM'],
                                           strict_type_checks=True)
 
         ParserError.exit_func()
         self.assertEquals(hist.expiration(), "never")
         self.assertEquals(hist.kind(), "boolean")
         self.assertEquals(hist.description(), "Whether a foo used bar")
-        self.assertEquals(hist.products(), ["firefox", "fennec", "geckoview"])
+        self.assertEquals(hist.products(), ["firefox", "fennec"])
 
 
 if __name__ == '__main__':
     mozunit.main()