英文:
when i am jmater executing on the time" time stamp different "is showing i have time stamp code also
问题
当我在 JMeter 上执行时,时间戳不同,我已经提供了时间戳代码,但我收到了以下错误消息:
"Request Rejected >> getAccountFromDB . 服务器时间戳不匹配 'TO CLIENT': {"ERRORCODE":"520","ERRORMSG":"ERR_INVALID_REQ","MSG":"请求被拒绝 >> getAccountDetails . 服务器到客户端时间差为: 43307(秒)","GUID":""}"
英文:
when i am j meter executing on the on time" time stamp different "is showing i have time stamp code also i am give but i have got the is error
Request Rejected >> getAccountFromDB . Timestamp Mismatch with Server 'TO CLIENT': '{"ERRORCODE":"520","ERRORMSG":"ERR_INVALID_REQ","MSG":"R
Request Rejected >> getAccountFromDB . Timestamp Mismatch with Server
'TO CLIENT': '{"ERRORCODE":"520","ERRORMSG":"ERR_INVALID_REQ","MSG":"Request Rejected >> getAccountDetails . Server to Client Time Diff is : 43307(secs)","GUID":""}'
答案1
得分: 0
我猜你在你的请求中有一个硬编码的(已记录的?)时间戳,服务器不接受它,因为时间不是当前的。
你需要找到这个参数并用__time()函数替换它,默认情况下,它返回自Unix纪元开始以毫秒为单位的当前时间戳,如果你的参数格式不同,你可以通过SimpleDateFormat模式修正输出。
有关JMeter函数概念的更多信息:Apache JMeter Functions - An Introduction
英文:
I guess you have a hard-coded (recorded?) timestamp somewhere in your request which is not accepted by the server because the time is not current.
You need to find this parameter and replace it with __time() function, by default it returns current timestamp in milliseconds since beginning of Unix epoch, if your parameter format is different you can amend the output via SimpleDateFormat patterns.
More information on JMeter Functions concept: Apache JMeter Functions - An Introduction
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论