Unit Test Service Fabric Actors when Actors call other Actors

In order to be able to effectively unit test Azure Service Fabric Actors we use a NuGet package called "ServiceFabric.Mocks”. It’s truly fantastic. As the name implies it allows you to Mock all Service Fabric services, not just Actors but the Actor model has unique structure that makes it exceptionally helpful in testing. The way … Continue reading Unit Test Service Fabric Actors when Actors call other Actors

Advertisements

Updating Service Fabric version for an Actor: Step by Step

ONE. Upgrade Actor Projects to .NET Core 2.1 TWO. Update Remoting Provider Decorator [assembly: FabricTransportActorRemotingProvider(RemotingListenerVersion = RemotingListenerVersion.V2, RemotingClientVersion = RemotingClientVersion.V2)] THREE. Remove all references from Tests Project First remove all references to dependent projects (Actor, Actor.Interfaces, Actor.Mocks, Actor.Model). Second open the Package Manager console and run the following commands: Uninstall-Package Microsoft.ServiceFabric Uninstall-Package Microsoft.ServiceFabric.Services Uninstall-Package Microsoft.ServiceFabric.Services.Remoting … Continue reading Updating Service Fabric version for an Actor: Step by Step

DLLHell 2018: Upgrading Service Fabric Project from v3.1.283 to v3.2.176

I’m getting an error from each of my xUnit test projects that there is a package downgrade from Microsoft.NETCore.App from 2.0.9 to 2.0.0. I tried isolating the issue to one project so I unloaded all the test projects in my solution. Then I tried upgrading the version of .NET Core from v2.0 to v2.1. However … Continue reading DLLHell 2018: Upgrading Service Fabric Project from v3.1.283 to v3.2.176

Doing Public Cloud in China: Getting Started with Alibaba Cloud

Setting up Alibaba Cloud is very similar to AWS. However you need to do a couple of extra steps. Activate RAM Cloud Service Every service on Alibaba Cloud requires you to authorize its use. I think this is to make it clear that each service could result in costs being incurred. I actually like this … Continue reading Doing Public Cloud in China: Getting Started with Alibaba Cloud

Using Custom Dimensions in Application Insights Analytics

Application Insights provides a powerful and easy to use solution for application monitoring. Both for server-side components and client-side components as well. Application Insights captures a plethora of information about clients by default but you can also add custom fields (also referred to as custom dimensions). When the information gets logged it gets associated with … Continue reading Using Custom Dimensions in Application Insights Analytics

Switching from “Azure” to “AzureRM” Terraform Backend

Terraform no longer supports “azure” as a backend. So if you have a backend configuration that makes reference to the “azure” backend provider you will get the following warning: All you need to do is change the following property in your backend configuration file: To the following: Nothing else has to change. Just re-initialize your … Continue reading Switching from “Azure” to “AzureRM” Terraform Backend

Publish NuGet Package using VSTS Build Pipeline

Generating a nugget package during build is as simple as the following steps: Define the NuGet Specification Pack the NuGet Package Push the NuGet Package to your repository Now the implementation gets a bit tricky. Define the specification You will need to ensure that nuget.exe is in your path. It’s as simple as creating a … Continue reading Publish NuGet Package using VSTS Build Pipeline

Swagger UI on Service Fabric with Stateless ASP.NET Core WebAPI

I just found that I needed to add the following NuGet package in order to get this to work: Microsoft.AspNetCore.StaticFiles I was using a vanilla configuration in my code where I setup swagger endpoint: And where I setup Swagger UI… Before I installed this package I was getting an HTTP error 500 from http://localhost:8308/swagger and … Continue reading Swagger UI on Service Fabric with Stateless ASP.NET Core WebAPI