315157973 commented on pull request #9740: URL: https://github.com/apache/pulsar/pull/9740#issuecomment-787612041
> I created an alternative fix which fixes a problem with the test itself: #9746 . I put some notes in the description about the relation to this fix. > > > Although the role is null, why do unit tests pass occasionally? > > I added logs and found that the implementation class of Map is not always TreeMap, but occasionally HashMap. > > When it is a HashMap, no error will be reported if the key is null. This problem is caused by Jackson's serialization. > > I guess this explains why it passed in some cases. It's odd that the behavior is so nondeterministic. Why does the serialization get used at all? I had the impression that there's a local cache that will be used if the entries are available locally, however I haven't checked that aspect. > > btw. The null value for the role shouldn't be a normal case. The fix in #9746 fixes the test itself that was invalid. As long as it is serialized and deserialized once, it will become a hashMap. Because zk update takes time, sometimes it is still TreeMap locally. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
