fix: Intermittent Python sample bot test failures (#3562)

* Fix npm run test error TS2345 for generator

* Revert "Fix npm run test error TS2345 for generator"

This reverts commit e49afb6c1f.

* Fix Django Component Governance security warning

* Fix Django 2.2 before 2.2.10 has a security vulnerability.

* Upgrade to 4.14.0

* Add continueonerror

* continueOnError 2

* Run tests 6 times

* Add a 7th test with no sleep delay

* Group dotnet tests in pairs

* Same for the other py pipeline.

* Prime the bot in the tests

* Remove the extra tests

* Test comment update
This commit is contained in:
BruceHaley 2021-11-01 14:47:03 -07:00 коммит произвёл GitHub
Родитель 1fae009928
Коммит 9cd433714d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
4 изменённых файлов: 7 добавлений и 10 удалений

Просмотреть файл

@ -409,11 +409,6 @@ jobs:
inputs:
projects: $(System.DefaultWorkingDirectory)/samples/csharp_dotnetcore/tests/Samples.$(SampleBotName).FunctionalTests/Samples.$(SampleBotName).FunctionalTests.csproj
- powershell: |
Start-Sleep -Seconds 700
displayName: 'Sleep for 11 min 40 sec'
enabled: true
- task: DotNetCoreCLI@2
displayName: dotnet test
inputs:

Просмотреть файл

@ -419,11 +419,6 @@ jobs:
inputs:
projects: $(System.DefaultWorkingDirectory)/samples/csharp_dotnetcore/tests/Samples.$(SampleBotName).FunctionalTests/Samples.$(SampleBotName).FunctionalTests.csproj
- powershell: |
Start-Sleep -Seconds 800
displayName: 'Sleep for 800 seconds'
enabled: true
- task: DotNetCoreCLI@2
displayName: dotnet test
inputs:

Просмотреть файл

@ -23,6 +23,10 @@ namespace Samples.CoreBot.FunctionalTests
GetEnvironmentVars();
string input = "";
// "Prime" the bot. Running StartBotConversationAsync() twice succeeds the second time.
await StartBotConversationAsync(input);
var botAnswer = await StartBotConversationAsync(input);
Assert.IsTrue(!String.IsNullOrWhiteSpace(botAnswer) && botAnswer.Contains("travel", StringComparison.OrdinalIgnoreCase),
$"Expected: A message containing 'travel'. Actual:<{botAnswer}>.");

Просмотреть файл

@ -27,6 +27,9 @@ namespace Samples.EchoBot.FunctionalTests
echoGuid = Guid.NewGuid().ToString();
input += echoGuid;
// "Prime" the bot. Running StartBotConversationAsync() twice succeeds the second time.
await StartBotConversationAsync();
var botAnswer = await StartBotConversationAsync();
Assert.AreEqual($"Echo: {input}", botAnswer);