浏览代码

HADOOP-14281. Fix TestKafkaMetrics#testPutMetrics. Contributed by Alison Yu.

Andrew Wang 8 年之前
父节点
当前提交
b062b323b7

+ 1 - 1
hadoop-tools/hadoop-kafka/src/test/java/org/apache/hadoop/metrics2/impl/TestKafkaMetrics.java

@@ -155,7 +155,7 @@ public class TestKafkaMetrics {
     Date currDate = new Date(timestamp);
     Date currDate = new Date(timestamp);
     SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
     SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
     String date = dateFormat.format(currDate);
     String date = dateFormat.format(currDate);
-    SimpleDateFormat timeFormat = new SimpleDateFormat("hh:mm:ss");
+    SimpleDateFormat timeFormat = new SimpleDateFormat("HH:mm:ss");
     String time = timeFormat.format(currDate);
     String time = timeFormat.format(currDate);
     String hostname = new String("null");
     String hostname = new String("null");
     try {
     try {