Skip to content

Commit 447c496

Browse files
Back porting test fix. (#1238)
1 parent 4c77c77 commit 447c496

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

test/src/org/labkey/test/tests/targetedms/InstrumentSchedulingTest.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,8 @@ public void testSchedule()
134134
clickAndWait(Locator.linkWithText(PROJECT_1));
135135
waitAndClickAndWait(Locator.linkWithText("Schedule instrument time"));
136136

137-
String yearMonth = Calendar.getInstance().get(Calendar.YEAR) + "-";
138137
int month = (Calendar.getInstance().get(Calendar.MONTH) + 1);
139-
if (month < 10)
140-
{
141-
yearMonth += yearMonth;
142-
}
143-
yearMonth += month;
138+
String yearMonth = Calendar.getInstance().get(Calendar.YEAR) + "-" + (month < 10 ? "0" + month : "" + month);
144139

145140
scheduleInstrument(yearMonth + "-02");
146141
scheduleInstrument(yearMonth + "-03");

0 commit comments

Comments
 (0)