Skip to content

Commit d6078a4

Browse files
authored
move rpc adapter tests to slow (#5575)
1 parent ff8f5a6 commit d6078a4

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

ironfish/src/rpc/adapters/tests/adapterTest.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export function createAdapterTest(
6262

6363
await adapter.stop()
6464
expect(adapter.started).toBe(false)
65-
}, 20000)
65+
})
6666

6767
it('should send and receive message', async () => {
6868
router.routes.register('foo/bar', yup.string(), (request) => {
@@ -71,7 +71,7 @@ export function createAdapterTest(
7171

7272
const response = await client.request('foo/bar', 'hello world').waitForEnd()
7373
expect(response.content).toBe('hello world')
74-
}, 20000)
74+
})
7575

7676
it('should stream message', async () => {
7777
router.routes.register('foo/bar', yup.object({}), (request) => {
@@ -86,7 +86,7 @@ export function createAdapterTest(
8686

8787
await response.waitForEnd()
8888
expect(response.content).toBe(undefined)
89-
}, 20000)
89+
})
9090

9191
it('should not crash on disconnect while streaming', async () => {
9292
const [waitPromise, waitResolve] = PromiseUtils.split<void>()
@@ -99,7 +99,7 @@ export function createAdapterTest(
9999

100100
expect.assertions(0)
101101
await next
102-
}, 20000)
102+
})
103103

104104
it('should handle errors', async () => {
105105
router.routes.register('foo/bar', yup.object({}), () => {
@@ -114,7 +114,7 @@ export function createAdapterTest(
114114
code: 'hello-error',
115115
codeMessage: 'hello error',
116116
})
117-
}, 20000)
117+
})
118118

119119
it('should handle request errors', async () => {
120120
// Requires this
@@ -133,5 +133,5 @@ export function createAdapterTest(
133133
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
134134
codeMessage: expect.stringContaining('this must be defined'),
135135
})
136-
}, 20000)
136+
})
137137
}

ironfish/src/rpc/adapters/tests/http.adapter.test.ts renamed to ironfish/src/rpc/adapters/tests/http.adapter.test.slow.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { IRpcAdapter } from '../adapter'
1111
import { RpcHttpAdapter } from '../httpAdapter'
1212
import { createAdapterTest } from './adapterTest'
1313

14-
describe('TlsAdapter', () => {
14+
describe('HttpAdapter', () => {
1515
let mitm: ReturnType<typeof Mitm>
1616
let client: RpcHttpClient
1717
let adapter: RpcHttpAdapter

ironfish/src/rpc/adapters/tests/tcp.adapter.test.ts renamed to ironfish/src/rpc/adapters/tests/tcp.adapter.test.slow.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ describe('TlsAdapter', () => {
7575

7676
const response = await client.request('foo/bar', 'hello world').waitForEnd()
7777
expect(response.content).toBe('hello world')
78-
}, 20000)
78+
})
7979

8080
it('should reject when authentication failed', async () => {
8181
adapter.enableAuthentication = true
@@ -117,5 +117,5 @@ describe('TlsAdapter', () => {
117117
code: RPC_ERROR_CODES.UNAUTHENTICATED,
118118
codeMessage: expect.stringContaining('Missing authentication token'),
119119
})
120-
}, 20000)
120+
})
121121
})

0 commit comments

Comments
 (0)