here is my rpc.js
import grpc from "k6/net/grpc";
import { check } from 'k6';
export let options = {
scenarios: {
contacts: {
executor: 'per-vu-iterations',
vus: 1,
iterations: 1,
maxDuration: '1s',
},
},
};
const client = new grpc.Client();
client.load(
[],
"coupon.proto",
);
export default () => {
client.connect("localhost:9999");
const data = {
id: 20
};
const response = client.invoke("test.Coupon/TestCoupon", data);
check(response, {
'status is OK': (r) => r && r.status === grpc.StatusOK,
});
console.log(JSON.stringify(response.message));
client.close()
}
and then i get the error
ERRO[0000] GoError: tls: first record does not look like a TLS handshake
Can someone help me?thinks!