Task #3514
closed
Merge Channel test cases as template
Added by Junxiao Shi over 8 years ago.
Updated about 8 years ago.
Description
Merge similar test cases from UnixStreamChannel TcpChannel UdpChannel WebSocketChannel
test suites into test case templates.
- Blocked by Task #3372: UnixStreamChannel: test suite improvement added
- Blocked by Task #3370: TcpChannel: test suite improvement added
- Blocked by Task #3371: UdpChannel: test suite improvement added
- Blocked by Task #3373: WebSocketChannel: test suite improvement added
- Assignee set to Davide Pesavento
@Davide agrees to work on this in #3371 note-9.
This Task does not block 0.4.1 release.
Where should the test case templates reside? channel.t.cpp
?
How much duplication we have (i.e., is it worth effort)?
I would call it "channel-common.t.cpp", to highlight that it is not generic "channel" tests, but common tests of different channels. Though, name doesn't matter much.
Alex Afanasyev wrote:
How much duplication we have (i.e., is it worth effort)?
TcpChannel and UdpChannel are practically identical. WebSocketChannel uses a substantially different model, so I probably won't be able to merge it. I haven't looked at UnixStreamChannel yet.
I would call it "channel-common.t.cpp", to highlight that it is not generic "channel" tests, but common tests of different channels. Though, name doesn't matter much.
Sounds good.
- Status changed from New to In Progress
- Status changed from In Progress to Code review
- % Done changed from 0 to 100
I was able to merge TcpChannel
and UdpChannel
suites relatively easily. UnixStreamChannel
and WebSocketChannel
have some deep differences that are not easy to overcome without making the code much more complex (and probably unreadable), albeit they do have a couple of test cases that look similar. I don't think trying to merge them is worth the effort though, and even then we would still have some special cases for each channel type.
- Status changed from Code review to Closed
Also available in: Atom
PDF