Skip to content

Commit

Permalink
stress: use connectrpc http2 (#600)
Browse files Browse the repository at this point in the history
Copy-pasted from the notification service

Closes #543

---------

Co-authored-by: texuf <[email protected]>
  • Loading branch information
miguel-nascimento and texuf authored Aug 5, 2024
1 parent 09aa462 commit 761fe1c
Show file tree
Hide file tree
Showing 16 changed files with 446 additions and 345 deletions.
10 changes: 10 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,15 @@
"args": ["${file}", "--config", "${workspaceFolder}/packages/sdk/jest.config.ts", "-i", "--no-cache", "--forceExit"],
"console": "integratedTerminal",
},
{
"name": "Jest: current file in 'packages/stress/' (single entitlements)",
"type": "node",
"request": "launch",
"env": { "NODE_ENV": "development", "NODE_TLS_REJECT_UNAUTHORIZED": "0", "RIVER_ENV": "local_single", "DEBUG": "csb:*,test:*", "DEBUG_DEPTH":"1" },
"program": "${workspaceFolder}/node_modules/.bin/jest",
"runtimeArgs": ["--experimental-vm-modules", "--experimental-wasm-modules"],
"args": ["${file}", "--config", "${workspaceFolder}/packages/stress/jest.config.ts", "-i", "--no-cache", "--forceExit"],
"console": "integratedTerminal",
},
]
}
3 changes: 2 additions & 1 deletion packages/sdk/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ import {
UserDeviceCollection,
makeSessionKeys,
} from '@river-build/encryption'
import { StreamRpcClient } from './makeStreamRpcClient'
import { errorContains, getRpcErrorProperty } from './rpcInterceptors'
import { assert, isDefined } from './check'
import { errorContains, getRpcErrorProperty, StreamRpcClient } from './makeStreamRpcClient'
import EventEmitter from 'events'
import TypedEmitter from 'typed-emitter'
import {
Expand Down
1 change: 1 addition & 0 deletions packages/sdk/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export * from './observable/persistedObservable'
export * from './persistenceStore'
export * from './riverConfig'
export * from './riverDbManager'
export * from './rpcInterceptors'
export * from './sign'
export * from './signerContext'
export * from './store/store'
Expand Down
3 changes: 2 additions & 1 deletion packages/sdk/src/makeRiverRpcClient.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { RiverChainConfig, createRiverRegistry } from '@river-build/web3'
import { RetryParams, StreamRpcClient, makeStreamRpcClient } from './makeStreamRpcClient'
import { StreamRpcClient, makeStreamRpcClient } from './makeStreamRpcClient'
import { RetryParams } from './rpcInterceptors'
import { ethers } from 'ethers'

export async function makeRiverRpcClient(
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/src/makeStreamRpcClient.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import { Err, InfoRequest, InfoResponse } from '@river-build/proto'
import { makeTestRpcClient } from './util.test'
import { errorContains } from './makeStreamRpcClient'
import { errorContains } from './rpcInterceptors'
import { makeRiverRpcClient } from './makeRiverRpcClient'
import { LocalhostWeb3Provider } from '@river-build/web3'
import { makeRiverChainConfig } from './riverConfig'
Expand Down
Loading

0 comments on commit 761fe1c

Please sign in to comment.