Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry-pick various test fixes to 5.x #4282

Merged
merged 9 commits into from
May 11, 2017
Merged

Cherry-pick various test fixes to 5.x #4282

merged 9 commits into from
May 11, 2017

Conversation

andrewkroh
Copy link
Member

  • Ignore permission errors in Metricbeat’s TestFileSystemList (Ignore permission errors in Metricbeat’s TestFileSystemList #3562)

    The test can fail if some calls to statfs fail due to permission errors. For example:
    stat("/var/lib/docker/aufs/mnt/50d0d5f599f0f19450e7649f73a0e23da1f172048e555df2b1cb78b3fefa355b", 0x7ffd2e5b8ed0) = -1 EACCES (Permission denied)

  • Less strict error matching in Winlogbeat config_test
    Error string testing is brittle. The PR makes the test less stringent by not checking the full error message that includes the Golang stdlib error.

  • Miscellaneous test fixes (Miscellaneous test fixes #4216)

    • Fix and enable the python smoke test for heartbeat
    • Remove fmt.Printf from metricbeat ceph module
    • Fix Windows path issues in libbeat/paths tests
    • Fix ioutil.TempDir usage in Packetbeat tests (it broke windows)
  • Using single quotes around Windows paths (More test fixes #4235)
    The thrift test config used double quotes around Windows path separators and this was interpreted incorrectly in YAML parsing.

  • Rename TestBadCondition to TestConditions (More test fixes #4235)
    This test doesn’t actually test any bad conditions. Plus there is another test in the same directory with the name TestBadCondition.

  • Use logp.Beta or logp.Experimental in metricsets (More test fixes #4235)
    And in system tests, centralize the logic for asserting that there are no ERR or WARN in logs.

    Filter out errors about “The service process could not connect to the service controller” that occur when testing on Jenkins where Jenkins itself is running as a service. This confuses the Beat because it thinks that it is running as service, but it’s not.

  • Remove OS specific error message check from mockbeat (Remove OS specific error message check from mockbeat #4267)
    The error message “no such file or directory” is an OS specific error message. There is a different error message on Windows. Simply checking for “error loading config file” should be sufficient.

  • Use shorter filename in Filebeat test for Windows (Use shorter filename in Filebeat test for Windows #4271)
    The test was failing on Windows when os.rename failed with [Error 3] The system cannot find the path specified. The root cause of the failure was that the path was ~260 characters on Jenkins which is greater than the MAX_PATH value in Windows. This PR shortens the test log’s name to resolve the issue.

    The other changes to normalize the filepath are nice to have for Windows, but not strictly required.

  • Add filesystem name to test error message (Add filesystem name to test error message #4272)
    Errors that are logged by the system/filesystem test case don’t have enough context to debug them. This adds the filesystem that caused the error to the message.

andrewkroh added 9 commits May 9, 2017 19:35
…3562)

The test can fail if some calls to statfs fail due to permission errors. For example:

`stat("/var/lib/docker/aufs/mnt/50d0d5f599f0f19450e7649f73a0e23da1f172048e555df2b1cb78b3fefa355b", 0x7ffd2e5b8ed0) = -1 EACCES (Permission denied)`
Error string testing is brittle. The PR makes the test less stringent by not checking the full error message that includes the Golang stdlib error.
- Fix and enable the python smoke test for heartbeat
- Remove fmt.Printf from metricbeat ceph module
- Fix Windows path issues in libbeat/paths tests
- Fix ioutil.TempDir usage in Packetbeat tests (it broke windows)
The thrift test config used double quotes around Windows path separators and this was interpreted incorrectly in YAML parsing.
This test doesn’t actually test any bad conditions. Plus there is another test in the same directory with the name TestBadCondition.
And in system tests, centralize the logic for asserting that there are no ERR or WARN in logs.

Filter out errors about “The service process could not connect to the service controller” that occur when testing on Jenkins where Jenkins itself is running as a service. This confuses the Beat because it thinks that it is running as service, but it’s not.
The error message “no such file or directory” is an OS specific error message. There is a different error message on Windows. Simply checking for “error loading config file” should be sufficient.
The test was failing on Windows when `os.rename` failed with `[Error 3] The system cannot find the path specified`. The root cause of the failure was that the path was ~260 characters on Jenkins which is greater than the `MAX_PATH` value in Windows. This PR shortens the test log’s name to resolve the issue.

The other changes to normalize the filepath are nice to have for Windows, but not strictly required.
Errors that are logged by the system/filesystem test case don’t have enough context to debug them. This adds the filesystem that caused the error to the message.
@andrewkroh
Copy link
Member Author

jenkins, test it

@ruflin
Copy link
Contributor

ruflin commented May 11, 2017

jenkins, retest it

@ruflin ruflin merged commit 3442d5b into elastic:5.x May 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants