Commit 39df92f
committed
tests: load plugin into default AssemblyLoadContext for MVC controller discovery
Real fix for master CI #22 failure (and likely the original race on
PR #12 we worked around with HTTP-only testing).
Root cause: BTCPay defaults plugin loading to an isolated
AssemblyLoadContext so production plugins can be swapped without
restarting the server. In the test process, the isolated context
makes the plugin's assembly invisible to MVC ApplicationParts
discovery - so the plugin's IBTCPayServerPlugin instance shows up
in the DI list but POSTs to its controller routes 404.
The retry-with-backoff in the previous commit didn't help because
the route never registers, not because it lags. Removing the retry
loop now that the real fix is in.
Mirror of rockstardev/btcPayServerPlugins.RockstarDev's
SharedPluginTestFixture which sets LoadPluginsInDefaultAssemblyContext
= false before ServerTester.StartAsync().1 parent 2250d13 commit 39df92f
1 file changed
Lines changed: 9 additions & 0 deletions
File tree
- SamRockProtocol.Tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
40 | 49 | | |
41 | 50 | | |
42 | 51 | | |
| |||
0 commit comments