fix test code issue (#291)
This commit is contained in:
Родитель
0065184c65
Коммит
d2966c9b51
|
@ -1691,6 +1691,7 @@ namespace AspNetCoreModule.Test
|
|||
|
||||
// reset existing worker process process
|
||||
TestUtility.ResetHelper(ResetHelperMode.KillWorkerProcess);
|
||||
Thread.Sleep(1000);
|
||||
|
||||
for (int i = 0; i < repeatCount; i++)
|
||||
{
|
||||
|
@ -1699,9 +1700,12 @@ namespace AspNetCoreModule.Test
|
|||
|
||||
// send a startup request to start a new worker process
|
||||
TestUtility.RunPowershellScript("( invoke-webrequest http://localhost:" + testSite.TcpPort + " ).StatusCode", "200", retryCount: 5);
|
||||
Thread.Sleep(1000);
|
||||
|
||||
// attach debugger to the worker process
|
||||
testSite.AttachWinDbg(testSite.WorkerProcessID);
|
||||
Thread.Sleep(1000);
|
||||
|
||||
TestUtility.RunPowershellScript("( invoke-webrequest http://localhost:" + testSite.TcpPort + " ).StatusCode", "200", retryCount: 30);
|
||||
|
||||
// verify windbg process is started
|
||||
|
|
|
@ -37,6 +37,7 @@ namespace AspnetCoreModule.TestSites.Standard
|
|||
var result = await webSocket.ReceiveAsync(new ArraySegment<byte>(buffer), CancellationToken.None);
|
||||
bool closeFromServer = false;
|
||||
string closeFromServerCmd = "CloseFromServer";
|
||||
string closingFromServer = "ClosingFromServer";
|
||||
int closeFromServerLength = closeFromServerCmd.Length;
|
||||
|
||||
bool echoBack = true;
|
||||
|
@ -50,27 +51,29 @@ namespace AspnetCoreModule.TestSites.Standard
|
|||
// start closing handshake from backend process when client send "CloseFromServer" text message
|
||||
// or when any message is sent from client during the graceful shutdown.
|
||||
closeFromServer = true;
|
||||
await webSocket.CloseOutputAsync(WebSocketCloseStatus.NormalClosure, closeFromServerCmd, CancellationToken.None);
|
||||
await webSocket.CloseOutputAsync(WebSocketCloseStatus.NormalClosure, closingFromServer, CancellationToken.None);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if (buffer[0] == '_')
|
||||
{
|
||||
string tempString = System.Text.Encoding.ASCII.GetString(buffer).Substring(0, result.Count).ToLower();
|
||||
switch (tempString)
|
||||
{
|
||||
case "_donotecho":
|
||||
case "_off":
|
||||
echoBack = false;
|
||||
break;
|
||||
case "_on":
|
||||
echoBack = true;
|
||||
break;
|
||||
case "_1":
|
||||
repeatCount = 1;
|
||||
break;
|
||||
case "_10":
|
||||
repeatCount = 10;
|
||||
break;
|
||||
case "_100":
|
||||
repeatCount = 100;
|
||||
case "_1000":
|
||||
repeatCount = 1000;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -294,7 +294,7 @@ function Export-CertificateTo($_targetThumbPrint, $_exportToSSLStore, $_password
|
|||
}
|
||||
else
|
||||
{
|
||||
$securedPassword = ConvertTo-SecureString -String $_password -Force –AsPlainText
|
||||
$securedPassword = ConvertTo-SecureString -String $_password -Force -AsPlainText
|
||||
$exportedPfxFile = Export-PfxCertificate -FilePath $_exportToSSLStore -Cert $TargetSSLStore\$_targetThumbPrint -Password $securedPassword
|
||||
if ( ($exportedPfxFile -ne $null) -and (Test-Path $exportedPfxFile.FullName) )
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче