Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[stream info] Fix broken StreamInfoImpl test
I'm not fully familiar with the background of the assertStreamInfoSize, but it appears that the purpose of this check is to make sure that changes to StreamInfoImpl aren't going to break setFromForRecreateStream or setFrom. Ideally we would not rely on such a test and instead test setFromForRecreateStream functionality directly, but I understand that it might be difficult to come up with a good test that covers all the cases. However, this test was apprently broken by #35650. This PR addedd a new field to the StreamInfoImpl changing the layout of the structure and with that the test. Interestingly enough, the same PR actually updated StreamInfoImpl::setFrom function (which the test reminds us to do every time we change StreamInfoImpl), but at the same time it didn't change the test. Anyways, keeping the status quo around while I don't have a good alternative solution in mind yet I fix this test and add some comments in the check to give folks a clue as to why sizeof(StreamInfoImpl) may return different values. I also noticed that the list of possible values for the size of StreamInfoImpl is way too long (we don't have that many different ABIs) and even contains a duplicate, so I cleaned it up as well and reduced the list to just 3 values. I will see in free time if I can replace this test with something else that does not rely on a specific layout of the StreamInfoImpl structure. Signed-off-by: Mikhail Krinkin <[email protected]>
- Loading branch information