This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#region Using Directives | |
using System; | |
using Endjin.Core.Retry.Policies; | |
#endregion | |
public class RetryUntilLeaseAcquiredPolicy : IRetryPolicy | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#region Using Directives | |
using System; | |
using System.Net; | |
using Endjin.Core.Retry.Policies; | |
using Microsoft.WindowsAzure.Storage; | |
#endregion |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#region Using Directives | |
using System; | |
using System.Diagnostics; | |
using System.Net; | |
using Endjin.Core.Retry.Policies; | |
using Endjin.Kpi.Core.Extensions; | |
using Microsoft.WindowsAzure.Storage; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#region Using Directives | |
using System; | |
using System.Net.Http; | |
using Endjin.Core.Retry.Policies; | |
#endregion | |
public class HttpRequestExceptionRetryPolicy : IRetryPolicy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Scenario: Actor A attempts to execute a long running task whilst Actor B is currently running the task | |
Given the long running task takes 20 seconds to complete | |
And the lease name is "long-running-task" | |
And actor B is currently running the task | |
When Actor A executes the task | |
Then it should not throw any exceptions | |
And it should return successfully | |
And 2 actions should have completed successfully |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'); | |
var app = express(); | |
var server = require('http').createServer(app); | |
var https = require('https'); | |
function HttpPostToAzure(jsonData) | |
{ | |
// Build the HTTP Post | |
// Currently using hardcoded auth string, this auth string could come via the device | |
var post_options = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<!-- | |
This configuration file is required if iisnode is used to run node processes behind | |
IIS or IIS Express. For more information, visit: | |
https://github.com/tjanczuk/iisnode/blob/master/src/samples/configuration/web.config | |
--> | |
<configuration> | |
<system.webServer> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
loggingEnabled: true | |
devErrorsEnabled: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<activePackageSource> | |
<add key="All" value="(Aggregate source)" /> | |
</activePackageSource> | |
<packageSources> | |
<add key="nuget.org" value="https://www.nuget.org/api/v2/" /> | |
<add key="custom_package_source" value="https://custom_package_source/nuget/v1/FeedService.svc/" /> | |
</packageSources> | |
<disabledPackageSources /> | |
<packageSourceCredentials> | |
<custom_package_source> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@container @storage_emulator | |
Scenario: A long running task runs to completion | |
Given the long running task takes 3 seconds to complete | |
And the task is told to cancel if the cancellation token '19d411fc-5014-4eaa-8f84-0fe3d4b93068' is issued | |
And no cancelation token is issued | |
When I execute the task | |
Then it should complete sucessfully |