Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] 执行退出 报错:panic: interface conversion: interface {} is int64, not []uint8 #120

Open
mytrygithub opened this issue May 18, 2023 · 0 comments

Comments

@mytrygithub
Copy link

mytrygithub commented May 18, 2023

1、遇到的问题
执行测试报错:panic: interface conversion: interface {} is int64, not []uint8

2、分析
错误位置:
CheckFullValueFetchAll 中:targetValue = targetReply[i].([]byte)

错误直接原因:
PipeRawCommand 中执行p.conn.Receive出现错误,继续执行到了 result[i] = common.TypeChanged

相关代码:
src/full_check/client/client.go 中PipeRawCommand代码:

// 此处处理不太好,但是别人代码写死了,我只能这么改了
				if strings.HasPrefix(err.Error(), specialErrorPrefix) {

我的测试简单调用关系为:
CheckFullValueFetchAll->PipeValueCommand->PipeRawCommand(commands, "")

3、初步结论:
PipeRawCommand 中 specialErrorPrefix 在一些调用中设置为“”, 这样就忽略掉了一些错误,都设置为common.TypeChanged。
这样导致无法发现server的一些错误,同时测试过程无法继续。

@mytrygithub mytrygithub changed the title 执行测试从从库接收数据错误,没有异常输出 执行报错:panic: interface conversion: interface {} is int64, not []uint8 May 18, 2023
@mytrygithub mytrygithub changed the title 执行报错:panic: interface conversion: interface {} is int64, not []uint8 [bug] 执行退出 报错:panic: interface conversion: interface {} is int64, not []uint8 May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant