Skip to content

Commit 2947cf6

Browse files
authored
Disable Azure Functions host file watching (#344)
This sometimes causes spurious process exits when using the FunctionsController.
1 parent 0c55296 commit 2947cf6

13 files changed

Lines changed: 604 additions & 892 deletions

File tree

GitVersion.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ branches:
2020
- feature
2121
- support
2222
- hotfix
23-
next-version: "1.5"
23+
next-version: "1.6"
2424

Solutions/Corvus.Testing.AzureFunctions.DemoFunction/packages.lock.json

Lines changed: 199 additions & 183 deletions
Large diffs are not rendered by default.

Solutions/Corvus.Testing.AzureFunctions.SpecFlow.Demo/Corvus.Testing.AzureFunctions.SpecFlow.Demo.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<PropertyGroup>
66
<TargetFramework>netcoreapp3.1</TargetFramework>
7-
<Copyright>Copyright (c) Endjin Limited 2021. All rights reserved.</Copyright>
7+
<Copyright>Copyright (c) Endjin Limited 2022. All rights reserved.</Copyright>
88
<LangVersion>latest</LangVersion>
99
<!-- Disabling SA1204 because it prioritizes static/non-static over public/non-public, which doesn't fit very well
1010
with bindings in SpecFlow.

Solutions/Corvus.Testing.AzureFunctions.SpecFlow.Demo/packages.lock.json

Lines changed: 182 additions & 337 deletions
Large diffs are not rendered by default.

Solutions/Corvus.Testing.AzureFunctions.SpecFlow.NUnit/Corvus.Testing.AzureFunctions.SpecFlow.NUnit.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>netcoreapp3.1</TargetFramework>
5-
<Copyright>Copyright (c) Endjin Limited 2021. All rights reserved.</Copyright>
5+
<Copyright>Copyright (c) Endjin Limited 2022. All rights reserved.</Copyright>
66
</PropertyGroup>
77

88
<PropertyGroup>

Solutions/Corvus.Testing.AzureFunctions.SpecFlow/Corvus.Testing.AzureFunctions.SpecFlow.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<PropertyGroup>
66
<TargetFramework>netstandard2.0</TargetFramework>
77
<Nullable>enable</Nullable>
8-
<Copyright>Copyright (c) Endjin Limited 2021. All rights reserved.</Copyright>
8+
<Copyright>Copyright (c) Endjin Limited 2022. All rights reserved.</Copyright>
99
</PropertyGroup>
1010
<PropertyGroup>
1111
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>

Solutions/Corvus.Testing.AzureFunctions.Xunit.Demo/packages.lock.json

Lines changed: 67 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,24 @@
44
".NETCoreApp,Version=v3.1": {
55
"Endjin.RecommendedPractices.GitHub": {
66
"type": "Direct",
7-
"requested": "[2.1.1, )",
8-
"resolved": "2.1.1",
9-
"contentHash": "f+fDu+C3yh+fuPrlm3ZOytILw/nl1IYjLSjs8cjf37K8IU45elqsbFM3Q7lkNsUz8v4tG3Ags+WPS7t2c8zH1w==",
7+
"requested": "[2.1.2, )",
8+
"resolved": "2.1.2",
9+
"contentHash": "mBUCmeSdWWrIQKuuYd9zflcwupRDmpF39dsbb07e6azlNIQqaE1J5TQa17c3SFVRXn9IZrClsmKoMporRTAWwQ==",
1010
"dependencies": {
11-
"Endjin.RecommendedPractices": "2.1.1",
11+
"Endjin.RecommendedPractices": "2.1.2",
1212
"Microsoft.SourceLink.GitHub": "1.1.1"
1313
}
1414
},
1515
"Microsoft.Extensions.Logging": {
1616
"type": "Direct",
1717
"requested": "[3.1.*, )",
18-
"resolved": "3.1.24",
19-
"contentHash": "Ju1q7SbuREr3IRUJTRGjGHiWWa4n02HuKQRtviJfgF0sc+Xijr/vjPCvul9vTcT2JE+j6tbXRuVWafGEX1+6Wg==",
18+
"resolved": "3.1.31",
19+
"contentHash": "oGzj3EsjxQss8WD2mPnwk+kr8V4vSjkkIAL/TjUcledv26liAnq85ZjMjSCPMkuaTpnngZ80XNIlIqVjLyQOsg==",
2020
"dependencies": {
21-
"Microsoft.Extensions.Configuration.Binder": "3.1.24",
22-
"Microsoft.Extensions.DependencyInjection": "3.1.24",
23-
"Microsoft.Extensions.Logging.Abstractions": "3.1.24",
24-
"Microsoft.Extensions.Options": "3.1.24"
21+
"Microsoft.Extensions.Configuration.Binder": "3.1.31",
22+
"Microsoft.Extensions.DependencyInjection": "3.1.31",
23+
"Microsoft.Extensions.Logging.Abstractions": "3.1.31",
24+
"Microsoft.Extensions.Options": "3.1.31"
2525
}
2626
},
2727
"Microsoft.NET.Test.Sdk": {
@@ -36,9 +36,9 @@
3636
},
3737
"Roslynator.Analyzers": {
3838
"type": "Direct",
39-
"requested": "[4.1.0, )",
40-
"resolved": "4.1.0",
41-
"contentHash": "xTSs7KdwhIUOTqEubcfW043o0dpSjKpNF+C6Aj5OuJv69rVJ0ypjChNeeXRALB2I1S9W1+qmgbVWYg7qftgoCA=="
39+
"requested": "[4.1.1, )",
40+
"resolved": "4.1.1",
41+
"contentHash": "3cPVlrB1PytlO1ztZZBOExDKQWpMZgI15ZDa0BqLu0l6xv+xIRfEpqjNRcpvUy3aLxWTkPgSKZbbaO+VoFEJ1g=="
4242
},
4343
"Serilog.Extensions.Logging": {
4444
"type": "Direct",
@@ -72,34 +72,34 @@
7272
},
7373
"StyleCop.Analyzers": {
7474
"type": "Direct",
75-
"requested": "[1.2.0-beta.406, )",
76-
"resolved": "1.2.0-beta.406",
77-
"contentHash": "YbsYoczQPZyz+4nmQ7bBiU9uQkk7Q2KUizQWEv01S4/ImCdJFiHvJfm8HAINNS0cvSLOA7xM9Y+KWQ2FOYjgkA==",
75+
"requested": "[1.2.0-beta.435, )",
76+
"resolved": "1.2.0-beta.435",
77+
"contentHash": "TADk7vdGXtfTnYCV7GyleaaRTQjfoSfZXprQrVMm7cSJtJbFc1QIbWPyLvrgrfGdfHbGmUPvaN4ODKNxg2jgPQ==",
7878
"dependencies": {
79-
"StyleCop.Analyzers.Unstable": "1.2.0.406"
79+
"StyleCop.Analyzers.Unstable": "1.2.0.435"
8080
}
8181
},
8282
"xunit": {
8383
"type": "Direct",
84-
"requested": "[2.4.1, )",
85-
"resolved": "2.4.1",
86-
"contentHash": "XNR3Yz9QTtec16O0aKcO6+baVNpXmOnPUxDkCY97J+8krUYxPvXT1szYYEUdKk4sB8GOI2YbAjRIOm8ZnXRfzQ==",
84+
"requested": "[2.4.2, )",
85+
"resolved": "2.4.2",
86+
"contentHash": "6Mj73Ont3zj2CJuoykVJfE0ZmRwn7C+pTuRP8c4bnaaTFjwNG6tGe0prJ1yIbMe9AHrpDys63ctWacSsFJWK/w==",
8787
"dependencies": {
88-
"xunit.analyzers": "0.10.0",
89-
"xunit.assert": "[2.4.1]",
90-
"xunit.core": "[2.4.1]"
88+
"xunit.analyzers": "1.0.0",
89+
"xunit.assert": "2.4.2",
90+
"xunit.core": "[2.4.2]"
9191
}
9292
},
9393
"xunit.runner.visualstudio": {
9494
"type": "Direct",
95-
"requested": "[2.4.3, )",
96-
"resolved": "2.4.3",
97-
"contentHash": "kZZSmOmKA8OBlAJaquPXnJJLM9RwQ27H7BMVqfMLUcTi9xHinWGJiWksa3D4NEtz0wZ/nxd2mogObvBgJKCRhQ=="
95+
"requested": "[2.4.5, )",
96+
"resolved": "2.4.5",
97+
"contentHash": "OwHamvBdUKgqsXfBzWiCW/O98BTx81UKzx2bieIOQI7CZFE5NEQZGi8PBQGIKawDW96xeRffiNf20SjfC0x9hw=="
9898
},
9999
"Endjin.RecommendedPractices": {
100100
"type": "Transitive",
101-
"resolved": "2.1.1",
102-
"contentHash": "GfoEmy/55R7LmnBQbxIbYdGAxYfMaOQCTCOeVS9WKpPBA37YO/vuGMGd0OY8jaolKvsSd02V9jp2qdzQDX6CFw==",
101+
"resolved": "2.1.2",
102+
"contentHash": "Nbj0WS3zVDD2wjfU2/nbkWIWS9Ljg8VN+SSpaCuf5lHBOIEb0Ra201lGcyJHtRHybAciz+hQA9lHj7TnG52qqw==",
103103
"dependencies": {
104104
"Microsoft.Build.Tasks.Git": "1.1.1"
105105
}
@@ -139,59 +139,59 @@
139139
},
140140
"Microsoft.Extensions.Configuration": {
141141
"type": "Transitive",
142-
"resolved": "3.1.24",
143-
"contentHash": "LlZrvELDgcWMUseskpUMBxrAKeGx9iY46YDr3GPjaZpUqNGndkGw2ILVqCd+g0faG+seVfc2PnWkmH+7QKE6cA==",
142+
"resolved": "3.1.31",
143+
"contentHash": "Edrk9O36/1VeWNB93JRE8rxq/yyseOgrQO5aVzvA0gNQEo3O0TuyuGnXwEdRcAskBZFSMfcLlocu6bPpQCtKuA==",
144144
"dependencies": {
145-
"Microsoft.Extensions.Configuration.Abstractions": "3.1.24"
145+
"Microsoft.Extensions.Configuration.Abstractions": "3.1.31"
146146
}
147147
},
148148
"Microsoft.Extensions.Configuration.Abstractions": {
149149
"type": "Transitive",
150-
"resolved": "3.1.24",
151-
"contentHash": "3YeuWZKoBxLe3KjYMY9Hk0cUs9VpqqUOekfUkNP3Px2DlOLi5S+qJx2sUkOjKsbDztbb+35v5TUylSysvdNJvg==",
150+
"resolved": "3.1.31",
151+
"contentHash": "apqvGW9hYd5khi23FQilW76SRqxzk3E5KraEQFN84imt0KREsGyUIvBG4vedIMORfdDtxgPaHdfl7vPs6nm5oQ==",
152152
"dependencies": {
153-
"Microsoft.Extensions.Primitives": "3.1.24"
153+
"Microsoft.Extensions.Primitives": "3.1.31"
154154
}
155155
},
156156
"Microsoft.Extensions.Configuration.Binder": {
157157
"type": "Transitive",
158-
"resolved": "3.1.24",
159-
"contentHash": "PtxfONtAbXBNENMhRTfgpEYFA7MJqjs5RdkClMIa7GTeb6U2ox8TpWbHQL0KVdeCcVCHgpu+KIjPoL2/AO5crg==",
158+
"resolved": "3.1.31",
159+
"contentHash": "5OuT2FZc5yP39JR1/75og199S6AlHOX7zntqKcydzVGZUark+IYb9dVtHmCmOAxya89cpIsWMILv4T3uwoRPLA==",
160160
"dependencies": {
161-
"Microsoft.Extensions.Configuration": "3.1.24"
161+
"Microsoft.Extensions.Configuration": "3.1.31"
162162
}
163163
},
164164
"Microsoft.Extensions.DependencyInjection": {
165165
"type": "Transitive",
166-
"resolved": "3.1.24",
167-
"contentHash": "edKD2klSQqQood/i/S8Wcwj7GdpJrx6YNx6aEwrrD9HPb9E9b6K1jhAEqd5Pjy3YrIgB+lG4a59GB8ZkVDRN6A==",
166+
"resolved": "3.1.31",
167+
"contentHash": "Tz4UPWgUWsbkU8g9nUvAKEnYX5hx+KrVNmbq62GgHCVlN6oF2uQvWqoDQ+ejYUNUvdYHiNIiQ26xAS9MS2EZbw==",
168168
"dependencies": {
169-
"Microsoft.Extensions.DependencyInjection.Abstractions": "3.1.24"
169+
"Microsoft.Extensions.DependencyInjection.Abstractions": "3.1.31"
170170
}
171171
},
172172
"Microsoft.Extensions.DependencyInjection.Abstractions": {
173173
"type": "Transitive",
174-
"resolved": "3.1.24",
175-
"contentHash": "vUVCGgYpwKK3C20t0swdxWKTmom3TByacyyj/sEMPWjfufcGxNM2W+qxgBOTMucFQpvbyPwBIFKAik7gYYFqxw=="
174+
"resolved": "3.1.31",
175+
"contentHash": "lE9FCa0Y0g7bf4k+BOwcknj+/vTBED0U5UV/fzc/PWqRsO9wi311PpAbvzoklEE+TTiVxF33iSXFqf0jMSlhdA=="
176176
},
177177
"Microsoft.Extensions.Logging.Abstractions": {
178178
"type": "Transitive",
179-
"resolved": "3.1.24",
180-
"contentHash": "MQ+UwogdSQdJf+P/97gUw/jo4rPsubi/0POhtgDrR2+qwOTtMjNef1VuplIasPzXazi4AJYNtOA3oGcctge8RQ=="
179+
"resolved": "3.1.31",
180+
"contentHash": "HAcnIEE+IEAJYHytfswpm93Y4WDrbZAIcBGwoyRMehtETxBM+4nk+gBuoalgd861vWUfS3ZtVo25P6s/FyzPVg=="
181181
},
182182
"Microsoft.Extensions.Options": {
183183
"type": "Transitive",
184-
"resolved": "3.1.24",
185-
"contentHash": "vlTnLwP33tzeyoPYsVw+uHlS1BWwMczG8TPdbV8+5SBrmVbjIg+cPwiMT0FMafH6qI6gl+qdHypdVdOetKL9eg==",
184+
"resolved": "3.1.31",
185+
"contentHash": "yoC3tB3rSWL77Ipow+YC7jlM6mWrpIHZ/RMpSDW83VECEijapce3VvmJU52FPia0kmvhV0PRqAvnXBFeMuk7QA==",
186186
"dependencies": {
187-
"Microsoft.Extensions.DependencyInjection.Abstractions": "3.1.24",
188-
"Microsoft.Extensions.Primitives": "3.1.24"
187+
"Microsoft.Extensions.DependencyInjection.Abstractions": "3.1.31",
188+
"Microsoft.Extensions.Primitives": "3.1.31"
189189
}
190190
},
191191
"Microsoft.Extensions.Primitives": {
192192
"type": "Transitive",
193-
"resolved": "3.1.24",
194-
"contentHash": "MCg9BTY32DBAYCIltI5pkE7LbK/2KTpeK3ZknbTQuQOEV+guLVOHv5yNDW7NhiX2n3FTGTL9uhAf7effqYkAbg=="
193+
"resolved": "3.1.31",
194+
"contentHash": "Ta9FclAg2bt7ay40o8ArAMaHKcyojq0eHzPdvZqe1hr28wGLWMSmqxglx1BGgrvY5H9lYiRrReFHovFYx+dsFQ=="
195195
},
196196
"Microsoft.NETCore.Platforms": {
197197
"type": "Transitive",
@@ -453,8 +453,8 @@
453453
},
454454
"StyleCop.Analyzers.Unstable": {
455455
"type": "Transitive",
456-
"resolved": "1.2.0.406",
457-
"contentHash": "FclNdBR81ynIo9l1QNlo+l0I/PaFIYaPQPlMram8XVIMh6G6G43KTa1aCxfwTj13uKlAJS/LhLy6KjOPOeAU4w=="
456+
"resolved": "1.2.0.435",
457+
"contentHash": "ouwPWZxbOV3SmCZxIRqHvljkSzkCyi1tDoMzQtDb/bRP8ctASV/iRJr+A2Gdj0QLaLmWnqTWDrH82/iP+X80Lg=="
458458
},
459459
"System.AppContext": {
460460
"type": "Transitive",
@@ -1248,49 +1248,49 @@
12481248
},
12491249
"xunit.analyzers": {
12501250
"type": "Transitive",
1251-
"resolved": "0.10.0",
1252-
"contentHash": "4/IDFCJfIeg6bix9apmUtIMwvOsiwqdEexeO/R2D4GReIGPLIRODTpId/l4LRSrAJk9lEO3Zx1H0Zx6uohJDNg=="
1251+
"resolved": "1.0.0",
1252+
"contentHash": "BeO8hEgs/c8Ls2647fPfieMngncvf0D0xYNDfIO59MolxtCtVjFRd6SRc+7tj8VMqkVOuJcnc9eh4ngI2cAmLQ=="
12531253
},
12541254
"xunit.assert": {
12551255
"type": "Transitive",
1256-
"resolved": "2.4.1",
1257-
"contentHash": "O/Oe0BS5RmSsM+LQOb041TzuPo5MdH2Rov+qXGS37X+KFG1Hxz7kopYklM5+1Y+tRGeXrOx5+Xne1RuqLFQoyQ==",
1256+
"resolved": "2.4.2",
1257+
"contentHash": "pxJISOFjn2XTTi1mcDCkRZrTFb9OtRRCtx2kZFNF51GdReLr1ls2rnyxvAS4JO247K3aNtflvh5Q0346K5BROA==",
12581258
"dependencies": {
12591259
"NETStandard.Library": "1.6.1"
12601260
}
12611261
},
12621262
"xunit.core": {
12631263
"type": "Transitive",
1264-
"resolved": "2.4.1",
1265-
"contentHash": "Zsj5OMU6JasNGERXZy8s72+pcheG6Q15atS5XpZXqAtULuyQiQ6XNnUsp1gyfC6WgqScqMvySiEHmHcOG6Eg0Q==",
1264+
"resolved": "2.4.2",
1265+
"contentHash": "KB4yGCxNqIVyekhJLXtKSEq6BaXVp/JO3mbGVE1hxypZTLEe7h+sTbAhpA+yZW2dPtXTuiW+C1B2oxxHEkrmOw==",
12661266
"dependencies": {
1267-
"xunit.extensibility.core": "[2.4.1]",
1268-
"xunit.extensibility.execution": "[2.4.1]"
1267+
"xunit.extensibility.core": "[2.4.2]",
1268+
"xunit.extensibility.execution": "[2.4.2]"
12691269
}
12701270
},
12711271
"xunit.extensibility.core": {
12721272
"type": "Transitive",
1273-
"resolved": "2.4.1",
1274-
"contentHash": "yKZKm/8QNZnBnGZFD9SewkllHBiK0DThybQD/G4PiAmQjKtEZyHi6ET70QPU9KtSMJGRYS6Syk7EyR2EVDU4Kg==",
1273+
"resolved": "2.4.2",
1274+
"contentHash": "W1BoXTIN1C6kpVSMw25huSet25ky6IAQUNovu3zGOGN/jWnbgSoTyCrlIhmXSg0tH5nEf8q7h3OjNHOjyu5PfA==",
12751275
"dependencies": {
12761276
"NETStandard.Library": "1.6.1",
12771277
"xunit.abstractions": "2.0.3"
12781278
}
12791279
},
12801280
"xunit.extensibility.execution": {
12811281
"type": "Transitive",
1282-
"resolved": "2.4.1",
1283-
"contentHash": "7e/1jqBpcb7frLkB6XDrHCGXAbKN4Rtdb88epYxCSRQuZDRW8UtTfdTEVpdTl8s4T56e07hOBVd4G0OdCxIY2A==",
1282+
"resolved": "2.4.2",
1283+
"contentHash": "CZmgcKkwpyo8FlupZdWpJCryrAOWLh1FBPG6gmVZuPQkGQsim/oL4PcP4nfrC2hHgXUFtluvaJ0Sp9PQKUMNpg==",
12841284
"dependencies": {
12851285
"NETStandard.Library": "1.6.1",
1286-
"xunit.extensibility.core": "[2.4.1]"
1286+
"xunit.extensibility.core": "[2.4.2]"
12871287
}
12881288
},
12891289
"corvus.testing.azurefunctions": {
12901290
"type": "Project",
12911291
"dependencies": {
1292-
"Microsoft.Extensions.Logging.Abstractions": "3.1.0",
1293-
"System.Management": "4.7.0"
1292+
"Microsoft.Extensions.Logging.Abstractions": "[3.1.*, )",
1293+
"System.Management": "[4.7.*, )"
12941294
}
12951295
}
12961296
}

Solutions/Corvus.Testing.AzureFunctions/Corvus.Testing.AzureFunctions.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<PropertyGroup>
66
<TargetFramework>netstandard2.0</TargetFramework>
77
<Nullable>enable</Nullable>
8-
<Copyright>Copyright (c) Endjin Limited 2021. All rights reserved.</Copyright>
8+
<Copyright>Copyright (c) Endjin Limited 2022. All rights reserved.</Copyright>
99
<NoWarn>RCS1194</NoWarn>
1010
</PropertyGroup>
1111

Solutions/Corvus.Testing.AzureFunctions/Corvus/Testing/AzureFunctions/FunctionsController.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,12 @@ await GetToolPath().ConfigureAwait(false),
311311
}
312312
}
313313

314+
// This prevents the Azure Functions host from observing the filesystem and attempting to restart when
315+
// it thinks something has changed. We never want this in these test scenarios, because nothing should
316+
// be changing, and all that happens is the host exits and then fails to restart. We sometimes see
317+
// spurious restarts, which is why we disable this.
318+
startInfo.EnvironmentVariables["AzureFunctionsJobHost__FileWatchingEnabled"] = "false";
319+
314320
// Force the logging level to debug to ensure we can pick up the message that tells us the function is
315321
// ready to go.
316322
startInfo.EnvironmentVariables["AzureFunctionsJobHost:logging:logLevel:default"] = "Debug";

Solutions/Corvus.Testing.SpecFlow.NUnit/Corvus.Testing.SpecFlow.NUnit.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>netcoreapp3.1</TargetFramework>
5-
<Copyright>Copyright (c) Endjin Limited 2021. All rights reserved.</Copyright>
5+
<Copyright>Copyright (c) Endjin Limited 2022. All rights reserved.</Copyright>
66
</PropertyGroup>
77

88
<PropertyGroup>

0 commit comments

Comments
 (0)