Skip to content

Commit

Permalink
Cancellation message fix (#1667)
Browse files Browse the repository at this point in the history
* Fixing error messaging for the cancel during WaitForRequestHandlerConnection and LaunchHost

* Changes as per comments.
  • Loading branch information
singhsarab committed Jul 6, 2018
1 parent 64a4c97 commit a4c5506
Show file tree
Hide file tree
Showing 39 changed files with 199 additions and 114 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ namespace Microsoft.VisualStudio.TestPlatform.Client.DesignMode
using System.Threading.Tasks;

using Microsoft.VisualStudio.TestPlatform.Client.RequestHelper;
using Microsoft.VisualStudio.TestPlatform.Common.Utilities;
using Microsoft.VisualStudio.TestPlatform.CommunicationUtilities;
using Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.Interfaces;
using Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.ObjectModel;
Expand Down Expand Up @@ -262,7 +263,7 @@ public int LaunchCustomHost(TestProcessStartInfo testProcessStartInfo, Cancellat
// Since the IDEs own user-UI-experience here, TP will let the custom host launch as much time as IDEs define it for their users
WaitHandle.WaitAny(new WaitHandle[] { waitHandle, cancellationToken.WaitHandle });

cancellationToken.ThrowIfCancellationRequested();
cancellationToken.ThrowTestPlatformExceptionIfCancellationRequested();

this.onAckMessageReceived = null;

Expand Down
59 changes: 32 additions & 27 deletions src/Microsoft.TestPlatform.Common/Resources/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/Microsoft.TestPlatform.Common/Resources/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="CancellationRequested" xml:space="preserve">
<value>Cancelling the operation as requested.</value>
</data>
<data name="DataCollectionMessageFormat" xml:space="preserve">
<value>Data collection : {0}</value>
</data>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,11 @@
<target state="translated">Při vytváření rychlého filtru došlo k chybě.</target>
<note />
</trans-unit>
<trans-unit id="CancellationRequested">
<source>Cancelling the operation as requested.</source>
<target state="new">Cancelling the operation as requested.</target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,11 @@
<target state="translated">Fehler beim Erstellen eines Schnellfilters.</target>
<note />
</trans-unit>
<trans-unit id="CancellationRequested">
<source>Cancelling the operation as requested.</source>
<target state="new">Cancelling the operation as requested.</target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,11 @@
<target state="translated">Error al crear el filtro rápido.</target>
<note />
</trans-unit>
<trans-unit id="CancellationRequested">
<source>Cancelling the operation as requested.</source>
<target state="new">Cancelling the operation as requested.</target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,11 @@
<target state="translated">Une erreur s'est produite lors de la création du filtre rapide.</target>
<note />
</trans-unit>
<trans-unit id="CancellationRequested">
<source>Cancelling the operation as requested.</source>
<target state="new">Cancelling the operation as requested.</target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,11 @@
<target state="translated">Si è verificato un errore durante la creazione del filtro Fast.</target>
<note />
</trans-unit>
<trans-unit id="CancellationRequested">
<source>Cancelling the operation as requested.</source>
<target state="new">Cancelling the operation as requested.</target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,11 @@
<target state="translated">高速フィルターを作成中にエラーが発生しました。</target>
<note />
</trans-unit>
<trans-unit id="CancellationRequested">
<source>Cancelling the operation as requested.</source>
<target state="new">Cancelling the operation as requested.</target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,11 @@
<target state="translated">빠른 필터를 만드는 중 오류가 발생했습니다.</target>
<note />
</trans-unit>
<trans-unit id="CancellationRequested">
<source>Cancelling the operation as requested.</source>
<target state="new">Cancelling the operation as requested.</target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,11 @@
<target state="translated">Wystąpił błąd podczas tworzenia szybkiego filtru.</target>
<note />
</trans-unit>
<trans-unit id="CancellationRequested">
<source>Cancelling the operation as requested.</source>
<target state="new">Cancelling the operation as requested.</target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,11 @@
<target state="translated">Ocorreu um erro ao criar o filtro Rápido.</target>
<note />
</trans-unit>
<trans-unit id="CancellationRequested">
<source>Cancelling the operation as requested.</source>
<target state="new">Cancelling the operation as requested.</target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,11 @@
<target state="translated">При создании быстрого (Fast) фильтра произошла ошибка.</target>
<note />
</trans-unit>
<trans-unit id="CancellationRequested">
<source>Cancelling the operation as requested.</source>
<target state="new">Cancelling the operation as requested.</target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,11 @@
<target state="translated">Hızlı filtre oluşturulurken bir hata oluştu.</target>
<note />
</trans-unit>
<trans-unit id="CancellationRequested">
<source>Cancelling the operation as requested.</source>
<target state="new">Cancelling the operation as requested.</target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>
5 changes: 5 additions & 0 deletions src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@
<target state="new">An error occured while creating Fast filter.</target>
<note></note>
</trans-unit>
<trans-unit id="CancellationRequested">
<source>Cancelling the operation as requested.</source>
<target state="new">Cancelling the operation as requested.</target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,11 @@
<target state="translated">创建“快”筛选器时遇到错误。</target>
<note />
</trans-unit>
<trans-unit id="CancellationRequested">
<source>Cancelling the operation as requested.</source>
<target state="new">Cancelling the operation as requested.</target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,11 @@
<target state="translated">建立快速篩選時發生錯誤。</target>
<note />
</trans-unit>
<trans-unit id="CancellationRequested">
<source>Cancelling the operation as requested.</source>
<target state="new">Cancelling the operation as requested.</target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>
Loading

0 comments on commit a4c5506

Please sign in to comment.