不要追求绝对的公平,红尘之中没有公平而言,人活一世,难得糊涂。                                           it is no use doing what you like, you have got to like what you do.

10058错误

上一篇 / 下一篇  2007-05-09 10:31:35 / 个人分类:Mercury LoadRunner

有时候在录制回放的时候,第一次回放会很成功,51Testing软件测试网"E qRm,bV
但是如果你把他的迭代次数设置超过2的时候,
b:}f;a`\._1w0就会出现10058这样的错误;
!y'bU#rCztb0
;t_mU)]0lrs_create_socket51Testing软件测试网|1G`*T;x
       ("socket4", "TCP", "RemoteHost=60.191.70.75:9000",    LrsLastArg);51Testing软件测试网N2}FD6N T
51Testing软件测试网/t(^o7RrUm$i$e
lrs_send("socket4", "buf0", LrsLastArg);-----
迭代2次回放出现问题
DS*Yj7I)d0
}t1ZfA#t0lrs_receive("socket4", "buf1", LrsLastArg);

;Oi&{;ij??m051Testing软件测试网]Z.`p9rf*E$j
10058的错误描述是这样的:
Can't send after socket shutdown51Testing软件测试网)Mu6h*e{ B8S+t m4y

r$kD p+z+?7\!T0就是说该端口已经被挂起了,无法向他发送请求了!
]V5yHI3h6c051Testing软件测试网 Mu(F#ks
在这里我们只要修改一下脚本就可以了,出现这个问题其脚本中应该有这样的一句:
;n7H kt7k-D.nj0
s"yE3F8K u u)xa-r0lrs_disable_socket("socket4", DISABLE_SEND);
.u d*Y y7P cA:L051Testing软件测试网,[ j`$Z.UjM+C:ATj
语句解释:Disables an operation for a socket
U#e/_ pe#`x a0

intlrs_disable_socket( char *s_desc, intoperation);51Testing软件测试网@cG&W'}'dqw&NM

s_desc
A descrīptor identifying a socket.
operation
The operation to disable: SEND, RECEIVE, SEND-RECEIVE.
51Testing软件测试网o/})QA d/x*F l^
Thelrs_disable_socketfunction disables an operation for a socket. The operation to disable is specified with the operation argument. To disable receiving data, pass DISABLE_RECV as the operation . To disable sending data, pass DISABLE_SEND. To disable all activity, pass DISABLE_SEND_RECV.
I)J X_])}0
3\&_ a8YH~G B0我们把她给注销掉就可以了!!!
l;o|E,Tc s0K3\E0
[ B {2X:Y8P6ZU&a0我们也可以用别的语句:  lrs_close_socket("socket4");
^Mj4W8P2p7HC0

QvvN5YU+A/?\051Testing软件测试网{~eQ1h z2j};j

TAG: 10058

 

评分:0

我来说两句

Open Toolbar