Open rockuw opened 9 years ago
After digging into the code, I find out the cause: RequestRegistry uses a Util::HashCounter to store all the request signatures. When there are two request signatures that equal in the HashCounter, it will only be matched with the request pattern once.
def times_executed(request_pattern)
self.requested_signatures.hash.select { |request_signature, times_executed|
request_pattern.matches?(request_signature)
}.inject(0) {|sum, (_, times_executed)| sum + times_executed }
end
Please fix it.
Hi, with the following code:
I expect the block to be executed 10 times. But only one "req" was printed.
However, if I send different requests each time, the behavior is as expected.
What's the problem here?