Skip to content

Commit

Permalink
test: use grpc-js in benchwrapper (#1172)
Browse files Browse the repository at this point in the history
* test: use grpc-js in benchwrapper

* npm run fix
  • Loading branch information
jkwlui committed Apr 30, 2020
1 parent 38d5a9f commit a92b7bb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions bin/benchwrapper.js
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

const grpc = require('grpc');
const grpc = require('@grpc/grpc-js');
const protoLoader = require('@grpc/proto-loader');
const {Storage} = require('../build/src');

Expand Down Expand Up @@ -61,5 +61,10 @@ server.addService(storageBenchWrapper['StorageBenchWrapper']['service'], {
write: write,
});
console.log('starting on localhost:' + argv.port);
server.bind('0.0.0.0:' + argv.port, grpc.ServerCredentials.createInsecure());
server.start();
server.bindAsync(
'0.0.0.0:' + argv.port,
grpc.ServerCredentials.createInsecure(),
() => {
server.start();
}
);
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -75,6 +75,7 @@
},
"devDependencies": {
"@google-cloud/pubsub": "^1.0.0",
"@grpc/grpc-js": "^1.0.3",
"@grpc/proto-loader": "^0.5.1",
"@types/compressible": "^2.0.0",
"@types/concat-stream": "^1.6.0",
Expand All @@ -97,7 +98,6 @@
"c8": "^7.0.0",
"codecov": "^3.0.0",
"form-data": "^3.0.0",
"grpc": "^1.22.2",
"gts": "^2.0.0",
"jsdoc": "^3.6.2",
"jsdoc-fresh": "^1.0.1",
Expand Down

0 comments on commit a92b7bb

Please sign in to comment.