Skip to content
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

Cancellation message fix #1667

Merged
merged 5 commits into from
Jul 6, 2018
Merged
Show file tree
Hide file tree
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
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>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something like "The operation was cancelled." seems better. We can check the existing IDE cancellation message to get more input.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

</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