Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-5622

TestYarnCLI.testGetContainers fails due to mismatched date formats

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2.8.0, 3.0.0-alpha2
    • None
    • None
    • Reviewed

    Description

      ApplicationCLI.listContainers uses Times.format to print timestamps, while TestYarnCLI.testGetContainers formats them using dateFormat.format with its own defined format. The test should be consistent and use Times.format.

      org.junit.ComparisonFailure: expected:<...1234_0005_01_000001	[Thu Jan 01 00:00:01 +0000 1970	Thu Jan 01 00:00:05 +0000 1970	            COMPLETE	           host:1234	    http://host:2345	                             logURL
       container_1234_0005_01_000002	Thu Jan 01 00:00:01 +0000 1970	Thu Jan 01 00:00:05 +0000 1970	            COMPLETE	           host:1234	    http://host:2345	                             logURL
       container_1234_0005_01_000003	Thu Jan 01 00:00:01 +0000 1970]	                 N/...> but was:<...1234_0005_01_000001	[ 1-Jan-1970 00:00:01	 1-Jan-1970 00:00:05	            COMPLETE	           host:1234	    http://host:2345	                             logURL
       container_1234_0005_01_000002	 1-Jan-1970 00:00:01	 1-Jan-1970 00:00:05	            COMPLETE	           host:1234	    http://host:2345	                             logURL
       container_1234_0005_01_000003	 1-Jan-1970 00:00:01]	                 N/...>
      	at org.junit.Assert.assertEquals(Assert.java:115)
      	at org.junit.Assert.assertEquals(Assert.java:144)
      	at org.apache.hadoop.yarn.client.cli.TestYarnCLI.testGetContainers(TestYarnCLI.java:330)
      

      Attachments

        1. YARN-5622.001.patch
          3 kB
          Eric Badger

        Activity

          People

            ebadger Eric Badger
            ebadger Eric Badger
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: