mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-06 11:02:25 +00:00
working towards fixing the SwissTiming test cases after migrating the sample data to the new format
This commit is contained in:
1 parent
f2056de871
commit
54bcc75920
5 files changed
+22
-22
No files matched your search
+5
-5
@@ -1,5 +1,5 @@
|
||||
0|RAC|2|4711;A wonderful test race|4712;Not such a wonderful race
|
||||
1|STL|4711|2|GER 8414;GER;Polgar/Koy|GER 8140;GER;Schlonski/Bohn
|
||||
2|STL|4712|3|GER 8340;GER;Stanjek/Kleen|GER 8433;GER;Babendererde/Jacobs|GER 8299;GER;Elsner/Schulz
|
||||
3|CCG|4711|2|0;Mark1 Description;SailNumber1;SailNumber2|1;Mark2 Description;SailNumber3
|
||||
4|CCG|4712|2|0;Mark2 Description;SailNumber1;SailNumber2|1;Mark7 Description;SailNumber4
|
||||
0|RAC|2|c34c423c-0295-4fe5-91ca-336681624711;A wonderful test race|c34c423c-0295-4fe5-91ca-336681624712;Not such a wonderful race
|
||||
1|STL|c34c423c-0295-4fe5-91ca-336681624711|2|GER 8414;GER;Polgar/Koy|GER 8140;GER;Schlonski/Bohn
|
||||
2|STL|c34c423c-0295-4fe5-91ca-336681624712|3|GER 8340;GER;Stanjek/Kleen|GER 8433;GER;Babendererde/Jacobs|GER 8299;GER;Elsner/Schulz
|
||||
3|CCG|c34c423c-0295-4fe5-91ca-336681624711|2|0;Mark1 Description;SailNumber1;SailNumber2|1;Mark2 Description;SailNumber3
|
||||
4|CCG|c34c423c-0295-4fe5-91ca-336681624712|2|0;Mark2 Description;SailNumber1;SailNumber2|1;Mark7 Description;SailNumber4
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
0|RAC|1|W4702;A simulated SwissTiming race
|
||||
0|RAC|1|c34c423c-0295-4fe5-91ca-336681624702;A simulated SwissTiming race
|
||||
1|STL|c34c423c-0295-4fe5-91ca-336681624702|46|GER 12;GER;Competitor 25|GBR 812;GBR;Competitor 19|NED 24;NED;Competitor 35|CRO 111;CRO;Competitor 11|ARG 8;ARG;Competitor 0|FRA 12;FRA;Competitor 16|CAN 610;CAN;Competitor 6|CHN 616;CHN;Competitor 10|CHN 1261;CHN;Competitor 8|ESP 133;ESP;Competitor 13|GER 72;GER;Competitor 29|EST 20;EST;Competitor 15|NZL 75;NZL;Competitor 36|SLO 64;SLO;Competitor 39|GBR 831;GBR;Competitor 20|RUS 12;RUS;Competitor 37|ITA 23;ITA;Competitor 31|ESP 696;ESP;Competitor 14|GBR 847;GBR;Competitor 22|DEN 143;DEN;Competitor 12|ISR 311;ISR;Competitor 30|GER 21;GER;Competitor 26|NED 11;NED;Competitor 34|GBR 850;GBR;Competitor 23|BRA 177;BRA;Competitor 3|AUT 431;AUT;Competitor 2|FRA 9;FRA;Competitor 18|FRA 4;FRA;Competitor 17|GBR 855;GBR;Competitor 24|BRA 1187;BRA;Competitor 4|USA 1712;USA;Competitor 43|SWE 344;SWE;Competitor 42|GER 61;GER;Competitor 27|SWE 342;SWE;Competitor 41|CHN 1211;CHN;Competitor 7|USA 1757;USA;Competitor 45|GER 66;GER;Competitor 28|SUI 14;SUI;Competitor 40|JPN 4151;JPN;Competitor 32|JPN 4321;JPN;Competitor 33|CAN 11;CAN;Competitor 5|AUS 7;AUS;Competitor 1|USA 1736;USA;Competitor 44|RUS 700;RUS;Competitor 38|CHN 221;CHN;Competitor 9|GBR 841;GBR;Competitor 21
|
||||
2|CCG|c34c423c-0295-4fe5-91ca-336681624702|7|0;StartGate;M1;M7|1;Buoy6;M6|2;Buoy5;M5|3;LeeGate;M2;M3|4;Buoy6;M6|5;Buoy5;M5|6;FinishGate;M1;M4
|
||||
+1
-1
@@ -134,7 +134,7 @@ public class ActivelyConnectingStoreAndForwardTest {
|
||||
}
|
||||
}
|
||||
});
|
||||
String rawMessage = "RAC|2|4711;A wonderful test race|4712;Not such a wonderful race";
|
||||
String rawMessage = "0|RAC|2|c34c423c-0295-4fe5-91ca-336681624711;A wonderful test race|c34c423c-0295-4fe5-91ca-336681624712;Not such a wonderful race";
|
||||
transceiver.sendMessage(rawMessage, sendingStream);
|
||||
synchronized (this) {
|
||||
for (int i=0; i<1000 && !receivedSomething[0]; i++) {
|
||||
|
||||
+13
-13
@@ -142,7 +142,7 @@ public class EndToEndListeningStoreAndFowardTest {
|
||||
|
||||
@Test
|
||||
public void testEndToEndScenarioWithInitMessages() throws Exception {
|
||||
String[] racesToTrack = new String[] { "4711", "4712" };
|
||||
String[] racesToTrack = new String[] { "c34c423c-0295-4fe5-91ca-336681624711", "c34c423c-0295-4fe5-91ca-336681624712" };
|
||||
String scriptName = "/InitMessagesScript.txt";
|
||||
setUpUsingScript(racesToTrack, scriptName);
|
||||
|
||||
@@ -154,7 +154,7 @@ public class EndToEndListeningStoreAndFowardTest {
|
||||
raceIDs.add(race.getName());
|
||||
}
|
||||
Set<String> expectedRaceIDs = new HashSet<String>();
|
||||
for (String raceIDToTrack : new String[] { "4711", "4712" }) {
|
||||
for (String raceIDToTrack : new String[] { "c34c423c-0295-4fe5-91ca-336681624711", "c34c423c-0295-4fe5-91ca-336681624712" }) {
|
||||
expectedRaceIDs.add(raceIDToTrack);
|
||||
}
|
||||
assertEquals(expectedRaceIDs, raceIDs);
|
||||
@@ -162,7 +162,7 @@ public class EndToEndListeningStoreAndFowardTest {
|
||||
|
||||
@Test
|
||||
public void testLongRaceLog() throws Exception {
|
||||
String[] racesToTrack = new String[] { "W4702" };
|
||||
String[] racesToTrack = new String[] { "c34c423c-0295-4fe5-91ca-336681624702" };
|
||||
String scriptName1 = "/SailMasterDataInterfaceRACandSTL.txt";
|
||||
String scriptName2 = "/SailMasterDataInterface-ExampleAsText.txt";
|
||||
setUpUsingScript(racesToTrack, scriptName1, scriptName2);
|
||||
@@ -171,7 +171,7 @@ public class EndToEndListeningStoreAndFowardTest {
|
||||
|
||||
@Test
|
||||
public void testLongRaceLogNewVersion() throws Exception {
|
||||
String[] racesToTrack = new String[] { "W4702" };
|
||||
String[] racesToTrack = new String[] { "c34c423c-0295-4fe5-91ca-336681624702" };
|
||||
String scriptName1 = "/W4702RACandSTLandCCG.txt";
|
||||
String scriptName2 = "/W4702AsText.txt";
|
||||
setUpUsingScript(racesToTrack, scriptName1, scriptName2);
|
||||
@@ -230,7 +230,7 @@ public class EndToEndListeningStoreAndFowardTest {
|
||||
|
||||
@Test
|
||||
public void testLongLogRaceNewConfig() throws Exception {
|
||||
String[] racesToTrack = new String[] { "W4702" };
|
||||
String[] racesToTrack = new String[] { "c34c423c-0295-4fe5-91ca-336681624702" };
|
||||
String scriptName1 = "/SailMasterDataInterfaceRACandSTL.txt";
|
||||
String scriptName2 = "/SailMasterDataInterface-ExampleAsText.txt";
|
||||
String scriptNewCourseConfig = "/SailMasterDataInterfaceNewCourseConfig.txt";
|
||||
@@ -277,7 +277,7 @@ public class EndToEndListeningStoreAndFowardTest {
|
||||
}
|
||||
}
|
||||
Set<String> expectedRaceIDs = new HashSet<String>();
|
||||
for (String raceIDToTrack : new String[] { "W4702" }) {
|
||||
for (String raceIDToTrack : new String[] { "c34c423c-0295-4fe5-91ca-336681624702" }) {
|
||||
expectedRaceIDs.add(raceIDToTrack);
|
||||
}
|
||||
assertEquals(expectedRaceIDs, raceIDs);
|
||||
@@ -285,7 +285,7 @@ public class EndToEndListeningStoreAndFowardTest {
|
||||
|
||||
@Test
|
||||
public void testDuplicateCCGMessageAndWaypointUniqueness() throws Exception {
|
||||
String[] racesToTrack = new String[] { "W4702" };
|
||||
String[] racesToTrack = new String[] { "c34c423c-0295-4fe5-91ca-336681624702" };
|
||||
setUpUsingScript(racesToTrack, "/DuplicateCCG.txt");
|
||||
|
||||
Set<TrackedRace> allTrackedRaces = getAllTrackedRaces();
|
||||
@@ -301,12 +301,12 @@ public class EndToEndListeningStoreAndFowardTest {
|
||||
@Test
|
||||
public void testTMDMessageBeforeReceivingStartTime() throws Exception {
|
||||
final DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ");
|
||||
String[] racesToTrack = new String[] { "SAM005923" };
|
||||
String[] racesToTrack = new String[] { "c34c423c-0295-4fe5-91ca-336681625923" };
|
||||
setUpUsingScript(racesToTrack, "/TMDBeforeStartTimeExample.txt");
|
||||
Set<TrackedRace> allTrackedRaces = getAllTrackedRaces();
|
||||
assertEquals(1, allTrackedRaces.size());
|
||||
TrackedRace trackedRace = allTrackedRaces.iterator().next();
|
||||
assertEquals("SAM005923", trackedRace.getRace().getName());
|
||||
assertEquals("c34c423c-0295-4fe5-91ca-336681625923", trackedRace.getRace().getName());
|
||||
assertEquals(dateFormat.parse("2013-04-04T13:45:00+0200"), trackedRace.getStartOfRace().asDate());
|
||||
for (Competitor competitor : trackedRace.getRace().getCompetitors()) {
|
||||
if (competitor.getBoat().getSailID().equals("GBR-828")) {
|
||||
@@ -333,12 +333,12 @@ public class EndToEndListeningStoreAndFowardTest {
|
||||
@Test
|
||||
public void testTMDMessageBeforeReceivingStartTimeWithManyTMDs() throws Exception {
|
||||
final DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ");
|
||||
String[] racesToTrack = new String[] { "SAM005923" };
|
||||
String[] racesToTrack = new String[] { "c34c423c-0295-4fe5-91ca-336681625923" };
|
||||
setUpUsingScript(racesToTrack, "/TMDBeforeStartTimeExample_ManyTMDs.txt");
|
||||
Set<TrackedRace> allTrackedRaces = getAllTrackedRaces();
|
||||
assertEquals(1, allTrackedRaces.size());
|
||||
TrackedRace trackedRace = allTrackedRaces.iterator().next();
|
||||
assertEquals("SAM005923", trackedRace.getRace().getName());
|
||||
assertEquals("c34c423c-0295-4fe5-91ca-336681625923", trackedRace.getRace().getName());
|
||||
assertEquals(dateFormat.parse("2013-04-04T13:45:00+0200"), trackedRace.getStartOfRace().asDate());
|
||||
for (Competitor competitor : trackedRace.getRace().getCompetitors()) {
|
||||
NavigableSet<MarkPassing> markPassings = trackedRace.getMarkPassings(competitor);
|
||||
@@ -352,7 +352,7 @@ public class EndToEndListeningStoreAndFowardTest {
|
||||
|
||||
@Test
|
||||
public void testRongRaceLogRACZero() throws Exception{
|
||||
String[] racesToTrack = new String[] { "W4702" };
|
||||
String[] racesToTrack = new String[] { "c34c423c-0295-4fe5-91ca-336681624702" };
|
||||
String scriptName2 = "/SailMasterDataInterfaceRACZero.txt";
|
||||
setUpUsingScript(racesToTrack, scriptName2);
|
||||
Set<TrackedRace> allNewTrackedRaces = getAllTrackedRaces();
|
||||
@@ -361,7 +361,7 @@ public class EndToEndListeningStoreAndFowardTest {
|
||||
|
||||
@Test
|
||||
public void testEndToEndWithSwissTimingData() throws Exception {
|
||||
String[] racesToTrack = new String[] { "W4702" };
|
||||
String[] racesToTrack = new String[] { "c34c423c-0295-4fe5-91ca-336681624702" };
|
||||
String scriptName1 = "/SailMasterDataInterfaceRACandSTL.txt";
|
||||
String scriptName2 = "/SailMasterDataInterface-ExampleAsText.txt";
|
||||
setUpUsingScript(racesToTrack, scriptName1, scriptName2);
|
||||
|
||||
+2
-2
@@ -109,7 +109,7 @@ public class OverlappingStoredAndReceivedMessagesTest implements RaceSpecificMes
|
||||
assert STORED < COUNT-UNBUFFERED && STORED-OVERLAP >= 0;
|
||||
final String[] rawMessage = new String[COUNT];
|
||||
for (int i=0; i<COUNT; i++) {
|
||||
rawMessage[i] = "CCG|4711|2|1;Lee Gate;LG1;LG2|"+i+";Windward;WW1";
|
||||
rawMessage[i] = ""+i+"|CCG|c34c423c-0295-4fe5-91ca-336681624711|2|1;Lee Gate;LG1;LG2|"+i+";Windward;WW1";
|
||||
if (i<STORED) {
|
||||
messagesToLoad.add(swissTimingFactory.createMessage(rawMessage[i], (long) i));
|
||||
}
|
||||
@@ -143,7 +143,7 @@ public class OverlappingStoredAndReceivedMessagesTest implements RaceSpecificMes
|
||||
}
|
||||
};
|
||||
bufferingMessageSenderThread.start();
|
||||
connector.trackRace("4711"); // this should transitively invoke loadMessages which blocks until the first STORED messages have been sent
|
||||
connector.trackRace("c34c423c-0295-4fe5-91ca-336681624711"); // this should transitively invoke loadMessages which blocks until the first STORED messages have been sent
|
||||
assertTrue(loadMessagesCalled);
|
||||
// send more messages after buffering
|
||||
for (int i=COUNT-UNBUFFERED; i<COUNT; i++) {
|
||||
|
||||
Reference in new issue
Block a user