mirror of
https://github.com/wahyd4/pinpoint.git
synced 2026-08-16 00:05:57 +10:00
[강운덕] [LUCYSUS-1744] agendid의 limit 넘을 경우 메시지를 찍도록 변경. 넘을 경우의 후처리가 부족함.
git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-commons/trunk@833 84d0f5b1-2673-498c-a247-62c4ff18d310
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
package com.profiler.common.util;
|
||||
|
||||
import com.profiler.common.dto.Header;
|
||||
import com.profiler.common.util.HeaderUtils;
|
||||
import org.apache.thrift.TException;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class HeaderUtilsTest {
|
||||
|
||||
private final Logger logger = LoggerFactory.getLogger(this.getClass().getName());
|
||||
|
||||
@Test
|
||||
public void validateSignature() throws TException {
|
||||
Header header = new Header();
|
||||
Assert.assertTrue(HeaderUtils.validateSignature(header.getSignature()));
|
||||
|
||||
|
||||
Header error = new Header((byte) 0x11, (byte) 0x20, (short) 1);
|
||||
Assert.assertTrue(!HeaderUtils.validateSignature(error.getSignature()));
|
||||
|
||||
|
||||
logger.info(header.toString());
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user