1 package org.openkilda.wfm.topology.stats;
3 import static org.junit.Assert.assertEquals;
4 import static org.junit.Assert.assertFalse;
5 import static org.junit.Assert.assertTrue;
9 import org.junit.rules.ExpectedException;
15 private static final long LEGACY_FORWARD_COOKIE = 0x10400000005d803L;
16 private static final long LEGACY_REVERSE_COOKIE = 0x18400000005d803L;
17 private static final long FORWARD_COOKIE = 0x4000000000000001L;
18 private static final long REVERSE_COOKIE = 0x2000000000000001L;
19 private static final long BAD_COOKIE = 0x235789abcd432425L;
20 private static final String FLOW_ID =
"f3459085345454";
21 private static final String SRC_SWITCH =
"de:ad:be:ef:00:00:00:02";
22 private static final String DST_SWITCH =
"de:ad:be:ef:00:00:00:04";
25 private static Map<String, Object> queryMap;
28 public ExpectedException
thrown = ExpectedException.none();
55 thrown.expect(Exception.class);
56 thrown.expectMessage(LEGACY_FORWARD_COOKIE +
" is not a Kilda flow");
65 thrown.expect(Exception.class);
66 thrown.expectMessage(FORWARD_COOKIE +
" is not a legacy flow");
75 thrown.expect(Exception.class);
76 thrown.expectMessage(BAD_COOKIE +
" is not a Kilda flow");
void getLegacyDirectionTest()
static Direction getLegacyDirection(long cookie)
void isLegacyCookieTest()
static boolean isLegacyCookie(long cookie)
static boolean isKildaCookie(long cookie)
static Direction getKildaDirection(long cookie)
void getKildaDirectionTest()
static Direction findDirection(long cookie)