Github user HeartSaVioR commented on a diff in the pull request:

    https://github.com/apache/storm/pull/2735#discussion_r197651740
  
    --- Diff: storm-core/test/clj/org/apache/storm/metrics_test.clj ---
    @@ -87,12 +91,22 @@
           (first) ;; pick first task in the list, ignore other tasks' metric 
data.
           (second)
           (or [])))
    -
    -(defmacro assert-buckets! [comp-id metric-name expected cluster]
    -  `(do
    -     (let [N# (count ~expected)]
    -       (wait-for-atleast-N-buckets! N# ~comp-id ~metric-name ~cluster)
    -       (is (= ~expected (subvec (lookup-bucket-by-comp-id-&-metric-name! 
~comp-id ~metric-name) 0 N#))))))
    +       
    +(defn assert-metric-running-sum! [comp-id metric-name expected min-buckets 
cluster]
    +  (try
    +    (do
    +      (wait-for-atleast-N-buckets! min-buckets comp-id metric-name cluster)
    +      (.until 
    --- End diff --
    
    So as far as I understand the description of issue, the metric value may 
not be added to exactly N bucket though we simulate the time, so we need to 
wait more to check if condition is met, and though we are now having another 
waiting logic, we still have to call `wait-for-atleast-N-buckets!` because of 
advancing simulated time, correct?


---

Reply via email to