1
This commit is contained in:
parent
e3671026d3
commit
33090b2880
@ -1 +1 @@
|
||||
node ../../tools/robot/app.js -hws://192.168.100.45:7801
|
||||
node ../../tools/robot/app.js -hws://192.168.100.45:7801 -utest134345 -d../../server/imserver/
|
||||
|
@ -47,19 +47,22 @@ class TestCase {
|
||||
|
||||
constructor(url) {
|
||||
this.relationUrl = getArgv('h');
|
||||
this.openId = getArgv('u');
|
||||
this.protoDir = getArgv('d');
|
||||
this.loginData = null;
|
||||
this.userData = null;
|
||||
/*
|
||||
console.log(this.protoDir);
|
||||
this.relationWs = new ClientNet(
|
||||
this.relationUrl,
|
||||
'proto/cs_proto.proto',
|
||||
'proto/cs_msgid.proto'
|
||||
);*/
|
||||
this.protoDir + 'proto/cs_proto.proto',
|
||||
this.protoDir + 'proto/cs_msgid.proto'
|
||||
);
|
||||
}
|
||||
|
||||
async init() {
|
||||
await this.step1();
|
||||
await this.step2();
|
||||
await this.step3();
|
||||
while (true) {
|
||||
await sleep(1000 * 3);
|
||||
}
|
||||
@ -74,11 +77,11 @@ class TestCase {
|
||||
'a': 'auth',
|
||||
'gameid': 2006,
|
||||
'channel': 6513,
|
||||
'openid': 'test1'
|
||||
'openid': this.openId
|
||||
});
|
||||
this.loginData = response;
|
||||
const endTick = getTickCount();
|
||||
console.log('login auth@Login', endTick - startTick, String(err), response);
|
||||
//console.log('login auth@Login', endTick - startTick, String(err), response);
|
||||
}
|
||||
|
||||
async step2() {
|
||||
@ -93,13 +96,13 @@ class TestCase {
|
||||
});
|
||||
this.userData = response;
|
||||
const endTick = getTickCount();
|
||||
console.log('login auth@User', endTick - startTick, String(err), response);
|
||||
//console.log('login auth@User', endTick - startTick, String(err), response);
|
||||
}
|
||||
|
||||
async step3() {
|
||||
await this.relationWs.init();
|
||||
await this.relationWs.connect();
|
||||
/*
|
||||
await this.relationWs.init();
|
||||
await this.relationWs.connect();
|
||||
this.relationWs.on('connect', () => {
|
||||
console.log('relation onConnect');
|
||||
this.relationWs.accountId = this.loginData['account_id'];
|
||||
|
Loading…
x
Reference in New Issue
Block a user