Skip to content

Commit

Permalink
Fix missing service test. - no longer throws exception, just faults b…
Browse files Browse the repository at this point in the history
…uild.
  • Loading branch information
Enkidu93 committed Nov 8, 2023
1 parent d532be1 commit 9d424a2
Showing 1 changed file with 8 additions and 19 deletions.
27 changes: 8 additions & 19 deletions tests/Serval.E2ETests/MissingServicesTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,26 +61,15 @@ public void UseMissingClearMLAsync()

[Test]
[Category("AWSNotWorking")]
public void UseMissingAWSAsync()
public async Task UseMissingAWSAsync()
{
Assert.ThrowsAsync<ServalApiException>(async () =>
{
string engineId = await _helperClient!.CreateNewEngine("Nmt", "es", "en", "NMT1");
var books = new string[] { "MAT.txt", "1JN.txt", "2JN.txt" };
await _helperClient.AddTextCorpusToEngine(engineId, books, "es", "en", false);
var cId = await _helperClient.AddTextCorpusToEngine(
engineId,
new string[] { "3JN.txt" },
"es",
"en",
true
);
await _helperClient.BuildEngine(engineId);
IList<TranslationBuild>? builds = await _helperClient.translationEnginesClient.GetAllBuildsAsync(
engineId
);
Assert.That(builds.First().State, Is.EqualTo(JobState.Faulted));
});
string engineId = await _helperClient!.CreateNewEngine("Nmt", "es", "en", "NMT1");
var books = new string[] { "MAT.txt", "1JN.txt", "2JN.txt" };
await _helperClient.AddTextCorpusToEngine(engineId, books, "es", "en", false);
await _helperClient.AddTextCorpusToEngine(engineId, new string[] { "3JN.txt" }, "es", "en", true);
await _helperClient.BuildEngine(engineId);
IList<TranslationBuild>? builds = await _helperClient.translationEnginesClient.GetAllBuildsAsync(engineId);
Assert.That(builds.First().State, Is.EqualTo(JobState.Faulted));
}

[Test]
Expand Down

0 comments on commit 9d424a2

Please sign in to comment.