-
Notifications
You must be signed in to change notification settings - Fork 241
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
Get-TestsFromBCContainer often needs a second try #3589
Comments
Probably a timing issue (as you hint to yourself) |
@freddydk Enjoy your vacation! New-BcContainer $TestApp = 'C:\NAVDVD\Applications\BaseApp\Test\Microsoft_Tests-Bank.app' $RunMyPath = ((Get-BcContainerSharedFolders -containerName $containerName).GetEnumerator() | Where-Object { $_.Value -eq "c:\run\my" }).Key Publish-BcContainerApp $iteration = 1 $tests ... Tests{GetBankAccountNoReturnsIBANWhenIsNotEmpty_BankAccount, GetBankAccountNoReturnsBankaccountNoWhenIBANIsEmpty_BankAccount, GetBankAccountNoThrowsErrorIf... |
@freddydk I can confirm the issue reported by @mishof . I am using AL-Go with CI, and I can verify that when there is initialization code in the Test App, I do not receive any results from Get-TestsFromBCContainer. The output in the pipeline looks like this: 2024-08-21T09:41:04.0751238Z ##[group]Running tests
|
When we use Get-TestsFromBCContainer, the first run often returns empty.
The second run, with the same parameters, returns the Tests from the BC container
script:
$iteration = 1
while ($iteration -le 3) {
Write-Host ('Try {0}.' -f $iteration)
$tests = Get-TestsFromBCContainer
-containerName $PipeLineName
-credential $credential
-extensionId $_.AppId
-ignoreGroups
if ($tests) { break }
$iteration++
}
output:
Try 1.
Setting test codeunit range ''
Try 2.
Setting test codeunit range ''
Connecting to http://localhost:80/BC/cs?tenant=default&company=CRONUS%20International%20Ltd.
Setting test codeunit range ''
Codeunit 72008 .
... running all tests after this as expected.
It happens when the container is newly created and the test app is installed after this.
On a container that is running for a while with test app in it for a while, we do seem to get results at "Try 1".
But it could be Try 1 has been a previous run long before that.
Not sure if it ever worked at once all the time.
BcContainerHelper version 6.0.19
BcContainerHelper is running as administrator
Host is Microsoft Windows Server 2022 Standard - 10.0.20348.2340
Docker Client Version is 25.0.4
Docker Server Version is 25.0.4
The text was updated successfully, but these errors were encountered: