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

Fix SDK tests to build & run properly on Linux #825

Merged
merged 5 commits into from
May 18, 2018
Merged

Conversation

mkistler
Copy link

This PR replaces some test logic that uses features/capabilities that are not available on Linux.

Specifically:

  • Remove all uses of addTeardownBlock, which is not available on Linux. The new logic reuses existing resources in subsequent test runs, so leaving "dangling" resources after test completion is not an issue.
  • Replace wait(for: with waitForExpectations because the former is not supported on Linux. This required some rework to prevent overlap in the scopes of expectations.

I also updated the Dockerfile to use the new Swift 4.1 docker image.

With these changes, the SDK again builds and runs on Linux. The results of my last full test run were:

Test Suite 'All tests' failed at 2018-05-18 20:08:11.982
	 Executed 219 tests, with 5 failures (0 unexpected) in 1555.428 (1555.428) seconds

Two of these failures were VR tests that were disabled in Xcode, so I also disabled them in Linux, two were timeouts in VR tests, and one was just an intermittent failure.

@mkistler mkistler requested a review from mediumTaj May 18, 2018 20:39
Copy link
Contributor

@mediumTaj mediumTaj left a comment

Choose a reason for hiding this comment

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

👍 looks good! just a comment about deleting VR classifiers but I don't think we have a final resolution on that.

// allow zip files to propagate through object storage, so that
// they will be deleted when the service deletes the classifier
// (otherwise they remain and dramatically slow down the tests)
sleep(15) // wait 15 seconds
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we waiting for the classifier to be ready or failed (a short time after, hah)? I think you might be right when you said we should move away from deleting in the tests and do a purge every week or so.

@mkistler mkistler merged commit 6dd75d9 into master May 18, 2018
@mkistler mkistler deleted the mdk/fix-linux-tests branch May 18, 2018 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants