Skip to content

Commit

Permalink
Merge pull request #408 from BalassaMarton/ci-test-failures
Browse files Browse the repository at this point in the history
Enable and fix flaky tests
  • Loading branch information
BalassaMarton authored Jan 31, 2024
2 parents f75ced0 + 55f9108 commit 216b00e
Show file tree
Hide file tree
Showing 24 changed files with 1,430 additions and 528 deletions.
1 change: 1 addition & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
<PackageVersion Include="TestableIO.System.IO.Abstractions" Version="19.2.69" />
<PackageVersion Include="Testably.Abstractions.Testing" Version="2.4.1" />
<PackageVersion Include="Xunit.Combinatorial" Version="1.6.24" />
<PackageVersion Include="xunit.extensibility.execution" Version="2.4.2" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.4.5" />
<PackageVersion Include="xunit" Version="2.4.2" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public async Task GetApps_loads_the_data_from_a_file(
apps.Should().BeEquivalentTo(GetAppsExpectation);
}

[Theory (Skip ="Fail"), CombinatorialData]
[Theory, CombinatorialData]
public async Task GetApps_reloads_the_data_if_the_source_file_has_changed(bool useApiSchema)
{
var source = "/apps.json";
Expand All @@ -62,8 +62,8 @@ await fileSystem.File.WriteAllTextAsync(
useApiSchema ? GetAppsApiResponseChanged : GetAppsJsonArrayChanged,
Encoding.UTF8);

await TaskExtensions.WaitForBackgroundTasksAsync(TimeSpan.FromMilliseconds(100));
await TaskExtensions.WaitForBackgroundTasksAsync(TimeSpan.FromSeconds(20));

var apps = await appDirectory.GetApps();

apps.Should().BeEquivalentTo(GetAppsExpectationChanged);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -405,19 +405,19 @@ public async Task StoreIntentResult_succeeds_with_channel()
var target = await _mockModuleLoader.Object.StartModule(new("appId4"));
var targetFdc3InstanceId = Fdc3InstanceIdRetriever.Get(target);
var raiseIntentRequest = new RaiseIntentRequest()
{
MessageId = int.MaxValue,
Fdc3InstanceId = Guid.NewGuid().ToString(),
Intent = "intentMetadata4",
Selected = false,
Context = new Context("context2"),
TargetAppIdentifier = new AppIdentifier() { AppId = "appId4", InstanceId = targetFdc3InstanceId }
};
{
MessageId = int.MaxValue,
Fdc3InstanceId = Guid.NewGuid().ToString(),
Intent = "intentMetadata4",
Selected = false,
Context = new Context("context2"),
TargetAppIdentifier = new AppIdentifier() { AppId = "appId4", InstanceId = targetFdc3InstanceId }
};

var raiseIntentResult = await _fdc3.HandleRaiseIntent(raiseIntentRequest, new MessageContext());
raiseIntentResult.Should().NotBeNull();

raiseIntentResult.Should().NotBeNull();
raiseIntentResult!.Error.Should().BeNull();
raiseIntentResult.AppMetadata.Should().NotBeNull();
raiseIntentResult!.AppMetadata.Should().HaveCount(1);

var storeIntentRequest = new StoreIntentResultRequest()
Expand Down
2 changes: 1 addition & 1 deletion src/messaging/dotnet/Messaging.sln
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "lib", "lib", "{B7E63957-3C1
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MorganStanley.ComposeUI.Testing", "..\..\shared\dotnet\MorganStanley.ComposeUI.Testing\MorganStanley.ComposeUI.Testing.csproj", "{AE71CBC4-FD4E-4C66-B894-D7C31DE4D1BE}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MorganStanley.ComposeUI.Messaging.Host.Tests", "test\Host.Tests\MorganStanley.ComposeUI.Messaging.Host.Tests.csproj", "{CEF78D3F-C645-4471-BAD2-9C538A0CA763}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MorganStanley.ComposeUI.Messaging.Host.Tests", "test\Host.Tests\MorganStanley.ComposeUI.Messaging.Host.Tests.csproj", "{CEF78D3F-C645-4471-BAD2-9C538A0CA763}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
1 change: 1 addition & 0 deletions src/messaging/dotnet/Messaging.sln.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ to in writing, software distributed under the License is distributed on an&#xD;
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express&#xD;
or implied. See the License for the specific language governing permissions&#xD;
and limitations under the License.</s:String>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EFeature_002EServices_002ECodeCleanup_002EFileHeader_002EFileHeaderSettingsMigrate/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=unregister/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
Loading

0 comments on commit 216b00e

Please sign in to comment.