MCPcopy Create free account
hub / github.com/apache/pig / testDateTimeForZone

Method testDateTimeForZone

test/org/apache/pig/test/TestDateTime.java:119–135  ·  view source on GitHub ↗
(DateTime testIn)

Source from the content-addressed store, hash-verified

117 }
118
119 private void testDateTimeForZone(DateTime testIn) throws IOException {
120 DateTimeWritable in = new DateTimeWritable(testIn);
121
122 ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
123 DataOutputStream dataOut = new DataOutputStream(outputStream);
124 in.write(dataOut);
125 dataOut.flush();
126
127 // read from byte[]
128 DateTimeWritable out = new DateTimeWritable();
129 ByteArrayInputStream inputStream = new ByteArrayInputStream(
130 outputStream.toByteArray());
131 DataInputStream dataIn = new DataInputStream(inputStream);
132 out.readFields(dataIn);
133
134 assertEquals(in.get(), out.get());
135 }
136
137 @Test
138 public void testLocalExecution() throws Exception {

Callers 1

testDateTimeWritablesMethod · 0.95

Calls 5

writeMethod · 0.95
readFieldsMethod · 0.95
getMethod · 0.95
flushMethod · 0.45
assertEqualsMethod · 0.45

Tested by

no test coverage detected