Skip to content

Commit

Permalink
Merge pull request #1572 from brendandburns/release-11-fix
Browse files Browse the repository at this point in the history
Fix the build for JODA time
  • Loading branch information
k8s-ci-robot authored Mar 3, 2021
2 parents c6915b7 + 3f3d278 commit 321440e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ private static class EventLog {
private String resourceVersion;
}

static V1Patch buildEventPatch(int count, String message, OffsetDateTime now) {
static V1Patch buildEventPatch(int count, String message, DateTime now) {
return new V1Patch(
String.format(
"{\"message\":\"%s\",\"count\":%d,\"lastTimestamp\":%s}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
import static org.junit.Assert.*;

import io.kubernetes.client.custom.V1Patch;
import java.time.OffsetDateTime;
import org.junit.Test;
import org.joda.time.DateTime;

public class EventLoggerTest {

@Test
public void buildEventPatch() {
String expectedStr = "2021-03-02T15:02:48.179000Z";
OffsetDateTime expected = OffsetDateTime.parse("2021-03-02T15:02:48.179000Z");
String expectedStr = "2021-03-02T15:02:48.179Z";
DateTime expected = DateTime.parse("2021-03-02T15:02:48.179Z");
V1Patch patch = EventLogger.buildEventPatch(1, "foo", expected);
assertEquals(
"{\"message\":\"foo\",\"count\":1,\"lastTimestamp\":\"" + expectedStr + "\"}",
Expand Down

0 comments on commit 321440e

Please sign in to comment.