Skip to content

Commit

Permalink
hunting test failure in github actions
Browse files Browse the repository at this point in the history
Signed-off-by: Ceki Gulcu <ceki@qos.ch>
  • Loading branch information
ceki committed Sep 6, 2024
1 parent 739ad3c commit b1b14ee
Showing 1 changed file with 16 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -460,16 +460,15 @@ long logOverMultiplePeriods(ConfigParameters cp) {
int endInactivityIndex = startInactivityIndex + cp.numInactivityPeriods * ticksPerPeriod;
long tickDuration = cp.periodDurationInMillis / ticksPerPeriod;


System.out.println("--------------");
System.out.println("["+buildMessageString(new Date(tbrp.timeBasedFileNamingAndTriggeringPolicy.getCurrentTime()), 21)+"]");
System.out.println("--------------");

for (int i = 0; i <= runLength; i++) {
Date currentDate = new Date(tbrp.timeBasedFileNamingAndTriggeringPolicy.getCurrentTime());
if (i < startInactivityIndex || i > endInactivityIndex) {
StringBuilder sb = new StringBuilder("Hello");
String currentDateStr = currentDate.toString();
String iAsString = Integer.toString(i);
sb.append(currentDateStr);
SpacePadder.spacePad(sb, 66 + (3 - iAsString.length() - currentDateStr.length()));
sb.append(iAsString);
rfa.doAppend(sb.toString());
rfa.doAppend(buildMessageString(currentDate, i));
}

tbrp.timeBasedFileNamingAndTriggeringPolicy.setCurrentTime(
Expand All @@ -493,6 +492,16 @@ long logOverMultiplePeriods(ConfigParameters cp) {
return tbrp.timeBasedFileNamingAndTriggeringPolicy.getCurrentTime();
}

private static String buildMessageString(Date currentDate, int i) {
StringBuilder sb = new StringBuilder("Hello");
String currentDateStr = currentDate.toString();
String iAsString = Integer.toString(i);
sb.append(currentDateStr);
SpacePadder.spacePad(sb, 66 + (3 - iAsString.length() - currentDateStr.length()));
sb.append(iAsString);
return sb.toString();
}

void fillWithChar(StringBuffer sb, char c, int count) {
for (int i = 0; i < count; i++) {
sb.append(c);
Expand Down

0 comments on commit b1b14ee

Please sign in to comment.