Skip to content

Commit

Permalink
fix backend tor test
Browse files Browse the repository at this point in the history
  • Loading branch information
adrastaea committed Nov 8, 2024
1 parent c7e94bc commit bb6ceb4
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,11 @@ describe('Connections manager', () => {
localDbService.setIdentity(userIdentity)

expect(connectionsManagerService.communityState).toBe(undefined)
// community will fail to launch from storage on init because factory community id
// will not match the one in the storage set in beforeEach

localDbService.setCommunity({ ...community, peerList: peerList })
localDbService.setCurrentCommunityId(community.id)
logger.info('Launching community', community.id, 'with peer list', peerList)
await connectionsManagerService.init()
await connectionsManagerService.launchCommunity({ ...community, peerList: peerList })
await sleep(5000)

expect(connectionsManagerService.communityState).toBe(ServiceState.LAUNCHED)
Expand Down Expand Up @@ -332,10 +333,9 @@ describe('Connections manager', () => {
localDbService.setIdentity(userIdentity)

expect(connectionsManagerService.communityState).toBe(undefined)
// community will fail to launch from storage on init because factory community id
// will not match the one in the storage set in beforeEach
localDbService.setCommunity({ ...community, peerList: peerList })
localDbService.setCurrentCommunityId(community.id)
await connectionsManagerService.init()
await connectionsManagerService.launchCommunity({ ...community, peerList: peerList })
await sleep(5000)

expect(connectionsManagerService.communityState).toBe(ServiceState.LAUNCHED)
Expand Down

0 comments on commit bb6ceb4

Please sign in to comment.