不要追求绝对的公平,红尘之中没有公平而言,人活一世,难得糊涂。                                           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

有时候在录制回放的时候,第一次回放会很成功,
8piu I#A0Lr,U8_u0但是如果你把他的迭代次数设置超过2的时候,51Testing软件测试网 T*P#E,Nx;G5C
就会出现10058这样的错误;
y'B3q ]Zx(v!ts-l7R0
S4l{{3\,z0lrs_create_socket51Testing软件测试网&x$Y*cQZ
       ("socket4", "TCP", "RemoteHost=60.191.70.75:9000",    LrsLastArg);51Testing软件测试网pX#~6S/xL7i%R

b3~IF7ee4Nu$l [z0lrs_send("socket4", "buf0", LrsLastArg);-----
迭代2次回放出现问题
['DA:mz9k0
*u }-{ {}'z0lrs_receive("socket4", "buf1", LrsLastArg);

5UCWM(_#A#d TT051Testing软件测试网/FzxLp/dj2U
10058的错误描述是这样的:
Can't send after socket shutdown51Testing软件测试网,u.X|}EO+A#J
51Testing软件测试网-ETq+V7f1Hmi
就是说该端口已经被挂起了,无法向他发送请求了!51Testing软件测试网q(_d5@{
51Testing软件测试网3i'\-f)CK)qck
在这里我们只要修改一下脚本就可以了,出现这个问题其脚本中应该有这样的一句:51Testing软件测试网 q(sH0I{}

zzW&A^;S0lrs_disable_socket("socket4", DISABLE_SEND);51Testing软件测试网 G*T-b O4sd
51Testing软件测试网-^'o @8`cX:Y+W+a
语句解释:Disables an operation for a socket51Testing软件测试网k0l'`-AgR ]D

intlrs_disable_socket( char *s_desc, intoperation);

X8X] T$Y qSg*U Dr0
s_desc
A descrīptor identifying a socket.
operation
The operation to disable: SEND, RECEIVE, SEND-RECEIVE.
51Testing软件测试网RY'dR)~\9U
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.51Testing软件测试网*^&uKS&z"f'T'_r'z
51Testing软件测试网)@"hM*}M^)A
我们把她给注销掉就可以了!!!51Testing软件测试网 Q I(Nb|k

6q$`c+|;K0我们也可以用别的语句:  lrs_close_socket("socket4");51Testing软件测试网"HMd+k;q${

ZA6_*\J0
zHY [}2v/B#b i e0

TAG: 10058

 

评分:0

我来说两句

Open Toolbar