Uploaded image for project: 'Bigtop'
  1. Bigtop
  2. BIGTOP-1197

iTest PackageManagerTests are failing

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.7.0
    • Fix Version/s: 0.8.0
    • Component/s: tests
    • Labels:
      None
    • Environment:

      fc19 32 bit (bitness shouldn't matter)

      Description

      Failed tests:
      searchForGcc(org.apache.bigtop.itest.pmanager.PackageManagerTest)
      testGetServicesCron(org.apache.bigtop.itest.pmanager.PackageManagerTest)
      testGetContentList(org.apache.bigtop.itest.pmanager.PackageManagerTest)
      testGetAllAlternatives(org.apache.bigtop.itest.posix.AlternativeTest)

      Reason is, that rpm package cron isn't there indeed.

      [root@localhost mantonov]# rpm -q cron
      package cron is not installed

      1. BIGTOP-1197.patch
        9 kB
        Mikhail Antonov
      2. BIGTOP-1197.patch
        7 kB
        Mikhail Antonov

        Activity

        Hide
        cos Konstantin Boudnik added a comment -

        Committed as
        e8addc0..525da0a HEAD -> master
        Thanks Michail!

        Show
        cos Konstantin Boudnik added a comment - Committed as e8addc0..525da0a HEAD -> master Thanks Michail!
        Hide
        cos Konstantin Boudnik added a comment -

        Neat. Works on my Ubuntu machine now!

        +1 on the patch. I will commit it shortly, unless there are objections.

        Show
        cos Konstantin Boudnik added a comment - Neat. Works on my Ubuntu machine now! +1 on the patch. I will commit it shortly, unless there are objections.
        Hide
        mantonov Mikhail Antonov added a comment -

        feedback addressed, new patch attached

        Show
        mantonov Mikhail Antonov added a comment - feedback addressed, new patch attached
        Hide
        cos Konstantin Boudnik added a comment -

        All seems ok, except that PackageManagerTest is still failing. Something like this though

        -    assertFalse("can not get description for the gcc package", pkgs.get(0).getMeta()["description"].length() == 0);
        +    assertFalse("can not get size for the gcc package", pkgs.get(0).getMeta()["size"]?.size() == 0);
        

        would fix the issue

        Show
        cos Konstantin Boudnik added a comment - All seems ok, except that PackageManagerTest is still failing. Something like this though - assertFalse("can not get description for the gcc package", pkgs.get(0).getMeta()["description"].length() == 0); + assertFalse("can not get size for the gcc package", pkgs.get(0).getMeta()["size"]?.size() == 0); would fix the issue
        Hide
        mantonov Mikhail Antonov added a comment -

        Also as a side comment, certain code in Alternatives.groovy seems to only be working on Ubuntu-like distros, like "update-alternatives --get-selections". Perhaps needs to be fixed more carefully, so for now I just disabled alternatives test for redhat-based distros.

        Show
        mantonov Mikhail Antonov added a comment - Also as a side comment, certain code in Alternatives.groovy seems to only be working on Ubuntu-like distros, like "update-alternatives --get-selections". Perhaps needs to be fixed more carefully, so for now I just disabled alternatives test for redhat-based distros.
        Hide
        mantonov Mikhail Antonov added a comment -

        First version of patch, all tests for bigtop itest are passing on my Fedora. Would appreciate test on Ubuntu/Suse.

        Show
        mantonov Mikhail Antonov added a comment - First version of patch, all tests for bigtop itest are passing on my Fedora. Would appreciate test on Ubuntu/Suse.
        Hide
        mantonov Mikhail Antonov added a comment -

        Sure, I just grabbed the first obvious error in the list with cron, didn't go deeper. Thanks for the snippet.

        Show
        mantonov Mikhail Antonov added a comment - Sure, I just grabbed the first obvious error in the list with cron, didn't go deeper. Thanks for the snippet.
        Hide
        cos Konstantin Boudnik added a comment -

        Also, I am pretty sure that

        searchForGcc(org.apache.bigtop.itest.pmanager.PackageManagerTest)

        doesn't fail because of the absence of cron package.

        Show
        cos Konstantin Boudnik added a comment - Also, I am pretty sure that searchForGcc(org.apache.bigtop.itest.pmanager.PackageManagerTest) doesn't fail because of the absence of cron package.
        Hide
        cos Konstantin Boudnik added a comment -

        org.apache.bigtop.itest.pmanager.PackageManagerTest is failing on Ubuntu as well (for a long time, I think)
        it happens because
        pkgs.get(0).getMeta()["description"] returns null

        the fix would be apparent (and if you are working on the patch you might consider it):
        pkgs.get(0).getMeta()["description"]?.length()

        Show
        cos Konstantin Boudnik added a comment - org.apache.bigtop.itest.pmanager.PackageManagerTest is failing on Ubuntu as well (for a long time, I think) it happens because pkgs.get(0).getMeta() ["description"] returns null the fix would be apparent (and if you are working on the patch you might consider it): pkgs.get(0).getMeta() ["description"] ?.length()

          People

          • Assignee:
            mantonov Mikhail Antonov
            Reporter:
            mantonov Mikhail Antonov
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development