Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-10191

Incorrect comparison of lists in RendezvousAffinityFunctionSimpleBenchmark#testAffinityCompatibility

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.6
    • 2.8
    • None

    Description

      RendezvousAffinityFunctionSimpleBenchmark#testAffinityCompatibility (in current codebase muted by renaming to _testAffinityCompatibility) looks troublesome: apparent bug is incorrect comparison of lists expecting elements to be always in the same order which doesn't look like the case for the tested API:

                  List<List<ClusterNode>> assignment0 = assignPartitions(aff0, nodes, null, backups, 0).get2();
      
                        List<List<ClusterNode>> assignment1 = assignPartitions(aff1, nodes, null, backups, 0).get2();
      
                        assertEquals (assignment0, assignment1);
      

      Though test kept failing even after I experimented with replacing comparison to one that was insensitive to the order of list elements.

      Brief checking of code intended to be tested suggests that maybe it isn't even supposed to be deterministic - in case if this is correct test should be very thoroughly redesigned.

      Attachments

        Activity

          People

            oignatenko Oleg Ignatenko
            oignatenko Oleg Ignatenko
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: