-
Notifications
You must be signed in to change notification settings - Fork 232
Added test cases for UdpSender.send (#328) #667
Conversation
Signed-off-by: Raja Peddireddyy <rajovictor@gmail.com>
Codecov Report
@@ Coverage Diff @@
## master #667 +/- ##
============================================
- Coverage 89.93% 89.69% -0.24%
+ Complexity 569 567 -2
============================================
Files 69 69
Lines 2086 2086
Branches 266 266
============================================
- Hits 1876 1871 -5
- Misses 129 133 +4
- Partials 81 82 +1
Continue to review full report at Codecov.
|
@guo0693 do you mind reviewing this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line 212 - 225 seems to be duplicated as line 171 - 187. Can we just have one test: testSendSpanWithOperationName() for two test cases:
operationName, expException?
for( test : testCases) {
//create span etc using test.operationName
...
if(test.expException) {
//try send
//assert exception caught
} else {
//assert received spans.
}
}
@@ -132,7 +138,7 @@ public void testAppend() throws Exception { | |||
} | |||
|
|||
@Test | |||
public void testFlushSendsSpan() throws Exception { | |||
public void testFlushAppendsSpan() throws Exception { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel like original name makes sense, the flush function cause the send of the spans, and server side gets the batch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since its appending before Flush, I thought the new name covers the intent well.
Do avoid the duplicate code, I extracted the Span creation into a method.
Signed-off-by: Raja Peddireddyy <rajovictor@gmail.com>
@rajovictor do these tests add something different than #670? If so, could you please rebase? |
Signed-off-by: Raja Shekar Reddy Peddireddyy rajovictor@gmail.com
Which problem is this PR solving?
Short description of the changes