Skip to content

More non-parallel test assumptions #6206

@joshmoore

Description

@joshmoore

Following on from #6156, I tried running the integration tests as background jobs:

./build.py ... python &
./build.py ... java &
...
wait

but https://merge-ci.openmicroscopy.org/jenkins/job/OMERO-test-integration/287/#showFailuresLink failed with CLI assumptions:


Stacktrace

self = <test.integration.clitest.test_user.TestUser object at 0x7f52e4b75198>
capsys = <_pytest.capture.CaptureFixture object at 0x7f520acbbd68>
sort_key = None, group_format = None

    @pytest.mark.parametrize("sort_key", sort_keys)
    @pytest.mark.parametrize("group_format", [None, "count", "long"])
    def testList(self, capsys, sort_key, group_format):
        self.args += ["list"]
        if sort_key:
            self.args += ["--sort-by-%s" % sort_key]
        if group_format:
            self.args += ["--%s" % group_format]
        self.cli.invoke(self.args, strict=True)
    
        # Read from the stdout
        out, err = capsys.readouterr()
        ids = get_user_ids(out, sort_key=sort_key)
    
        # Check all users are listed
        if sort_key == 'login':
            sorted_list = sorted(self.users, key=lambda x: x.omeName.val)
        elif sort_key == 'first-name':
            sorted_list = sorted(self.users, key=lambda x: x.firstName.val)
        elif sort_key == 'last-name':
            sorted_list = sorted(self.users, key=lambda x: x.lastName.val)
        elif sort_key == 'email':
            sorted_list = sorted(self.users, key=lambda x: (
                x.email and x.email.val or ""))
        else:
            sorted_list = sorted(self.users, key=lambda x: x.id.val)
>       assert ids == [user.id.val for user in sorted_list]
E       assert [0, 1, 2, 3, 4, 5, ...] == [0, 1, 2, 3, 4, 5, ...]
E         Left contains 2 more items, first extra item: 3127
E         Full diff:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions