[ 
https://issues.apache.org/jira/browse/BEAM-3545?focusedWorklogId=223026&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-223026
 ]

ASF GitHub Bot logged work on BEAM-3545:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 04/Apr/19 15:04
            Start Date: 04/Apr/19 15:04
    Worklog Time Spent: 10m 
      Work Description: lostluck commented on pull request #8218: [BEAM-3545] 
Support Metrics in Go SDK CombineFns
URL: https://github.com/apache/beam/pull/8218#discussion_r272225416
 
 

 ##########
 File path: sdks/go/pkg/beam/core/metrics/metrics_test.go
 ##########
 @@ -25,6 +25,44 @@ import (
 // bID is a bundleId to use in the tests, if nothing more specific is needed.
 const bID = "bID"
 
+// TestRobustness validates metrics not panicking if the context doesn't
+// have the bundle or transform ID.
+func TestRobustness(t *testing.T) {
+       ns, n := "Test", "myCount"
+       m := NewCounter(ns, n)
+       m.Inc(context.Background(), 3)
+       ptCtx := SetPTransformID(context.Background(), "MY_TRANSFORM")
+       m.Inc(ptCtx, 3)
+       bCtx := SetBundleID(context.Background(), "MY_BUNDLE")
 
 Review comment:
   Done. Also removed the variables for namespace and name (ns, n) because they 
weren't re-used in this small test.
 
----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 223026)
    Time Spent: 10.5h  (was: 10h 20m)

> Fn API metrics in Go SDK harness
> --------------------------------
>
>                 Key: BEAM-3545
>                 URL: https://issues.apache.org/jira/browse/BEAM-3545
>             Project: Beam
>          Issue Type: Sub-task
>          Components: sdk-go
>            Reporter: Kenneth Knowles
>            Priority: Major
>              Labels: portability, triaged
>          Time Spent: 10.5h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to