Skip to content

Commit

Permalink
Fix bug in spawncore with stormservices (#1915)
Browse files Browse the repository at this point in the history
* Add a test for the spawncore to make sure the service is available

* Fix spawncore for stormservices
  • Loading branch information
vEpiphyte authored Oct 14, 2020
1 parent b2c1a28 commit 78dd656
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions synapse/lib/spawn.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ async def __anit__(self, spawninfo):

self.svcsbyiden = {}
self.svcsbyname = {}
self.svcsbysvcname = {}

self.stormcmds = {}
self.storm_cmd_ctors = {}
Expand Down
4 changes: 4 additions & 0 deletions synapse/tests/test_lib_spawn.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,10 @@ async def test_stormpkg(self):
async with core.getLocalProxy() as prox:
opts = {'spawn': True}

# Ensure the spawncore loaded the service
coro = prox.storm('$lib.service.wait(real)', opts).list()
msgs = await asyncio.wait_for(coro, 12)

msgs = await prox.storm('help', opts=opts).list()
self.stormIsInPrint('foobar', msgs)

Expand Down

0 comments on commit 78dd656

Please sign in to comment.