+ // Check that not any unexpected counter are added (this is not working correctly!)
+ // Get current values of all counters
+ currentCountersMap = mc.GetCurrentCounterValues(t, allCountersMap)
+ for _, currentCounter := range currentCountersMap {
+ if _, ok := toBeAddedCountersMap[currentCounter.Name]; ok == false {
+ if beforeCounter, ok := allCountersBeforeMap[currentCounter.Name]; ok == true {
+ if currentCounter.Value != beforeCounter.Value {
+ mc.TestError(t, "Error: unexpected counter added: counterName %v, current value %v, expected value %v",
+ currentCounter.Name, currentCounter.Value, beforeCounter.Value)
+ }
+ }
+ }
+ }
+