From db177fbce68c267a4304117d1922a18bbe02bb2a Mon Sep 17 00:00:00 2001 From: Vincent Herrin Date: Mon, 21 Dec 2015 16:04:53 -0600 Subject: [PATCH] Add small delay so the model is ready for delete. #136 --- .../LanguageTranslation/Tests/LanguageTranslationTests.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/WatsonDeveloperCloud/LanguageTranslation/Tests/LanguageTranslationTests.swift b/WatsonDeveloperCloud/LanguageTranslation/Tests/LanguageTranslationTests.swift index b2e939a72..687649ec7 100644 --- a/WatsonDeveloperCloud/LanguageTranslation/Tests/LanguageTranslationTests.swift +++ b/WatsonDeveloperCloud/LanguageTranslation/Tests/LanguageTranslationTests.swift @@ -149,6 +149,10 @@ class LanguageTranslationTests: XCTestCase { Log.sharedLogger.error("\(error)") creationExpectation.fulfill() + // Add a small delay so the model is ready for delete. This is not a normal flow of create and delete immediately + // so this is only a testing issue + sleep(3) + self.service.deleteModel(model!) { error in XCTAssertNil(error) deletionExpectation.fulfill()