Skip to content

Fixing win_perf_counters tests#3068

Merged
danielnelson merged 1 commit intoinfluxdata:masterfrom
Brightspace:fixing-win-perf-counter-tests
Jul 31, 2017
Merged

Fixing win_perf_counters tests#3068
danielnelson merged 1 commit intoinfluxdata:masterfrom
Brightspace:fixing-win-perf-counter-tests

Conversation

@JeffAshton
Copy link
Contributor

Addresses issue #3062

Minimal changes to get the existing unit tests compiling and passing again.

Required for all PRs:

  • [Y] Signed CLA.
  • [N/A] Associated README.md updated.
  • [Y] Has appropriate unit tests.

@JeffAshton JeffAshton force-pushed the fixing-win-perf-counter-tests branch from ca56cd5 to f161e3a Compare July 28, 2017 22:56
@JeffAshton
Copy link
Contributor Author

instances[0] = "_Total"
counters[0] = "Parking Status"

var expectedCounter string = "Parking_Status"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These tests were broken as a part of this change set for Sanitize Field name: 015261a

objectname := "Processor Information"
instances[0] = "_Total"
instances[1] = "0"
instances[1] = "0,1"
Copy link
Contributor Author

@JeffAshton JeffAshton Jul 28, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Later versions of windows have multi-core support, so these tests didn't pass anymore.

image

)

func TestWinPerfcountersConfigGet1(t *testing.T) {
validmetrics := itemList{}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

itemList was removed in this pull request #2800


perfobjects[0] = PerfObject

m := Win_PerfCounters{PrintValid: false, TestName: "ConfigGet1", Object: perfobjects}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TestName was also removed in this pull request #2800

require.NoError(t, err)

if len(metrics.items) == 1 {
var parsedItems = m.GetParsedItemsForTesting()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added GetParsedItemsForTesting to satisfy existing tests without too drastic a rewrite

@danielnelson danielnelson merged commit c31e7d0 into influxdata:master Jul 31, 2017
@danielnelson danielnelson added this to the 1.4.0 milestone Jul 31, 2017
@danielnelson
Copy link
Contributor

Thank you

@JeffAshton JeffAshton deleted the fixing-win-perf-counter-tests branch December 11, 2017 16:31
MrMaxBuilds pushed a commit that referenced this pull request Jun 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants