Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions test/Integration/SqlTriggerBindingIntegrationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,15 @@ void OutputHandler(object sender, DataReceivedEventArgs e)

// All trigger integration tests are only using C# functions for testing at the moment.
this.StartFunctionHost(functionName, Common.SupportedLanguages.CSharp, useTestFolder, OutputHandler);

// The functions host generally logs the error message within a second after starting up.
const int BufferTimeForErrorInSeconds = 15;
bool isCompleted = tcs.Task.Wait(TimeSpan.FromSeconds(BufferTimeForErrorInSeconds));

this.FunctionHost.OutputDataReceived -= OutputHandler;
this.FunctionHost.Kill();

Assert.True(isCompleted, "Functions host did not log failure to start SQL trigger listener within specified time.");
Assert.Equal(expectedErrorMessage, errorMessage);
}
}
Expand Down