Skip to content

[Unity plugin] 2 tests stochastically fail in the plugin test suite. #3175

@Balint-H

Description

@Balint-H

Intro

During the maintenance of the Unity plugin I ran into strange behaviour in the test suite.

My setup

This was observed on Windows 11, Unity 6000.3.10f1, and using #3164 version of the plugin.

What's happening? What did you expect?

Two of the tests of the Unity plugin, namely MjcfHierarchyMirrorsTheHierarchyOfUnityObjects and SceneRecreatedAfterDeletion fail stochastically (i.e. rerunning the tests causes them to pass sometimes).

It is unclear at the moment whether it is a limitation of the tests or if it is a bug, but warrants some attention.

The first suspicion is that it might be due to the ordering of components not being deterministic, but in an initial scan I could not find a step that is known to have non-defined orders.

Steps for reproduction

Add the plugin from disk to a Unity project, then add "testables": ["org.mujoco"] to the project manifest. Afterwards, you can run the tests from Window>General>Test runner. Running the tests multiple times will cause the tests to sometimes fail or succeed, seemingly randomly.

Minimal model for reproduction

No response

Code required for reproduction

No response

Confirmations

Metadata

Metadata

Assignees

Labels

UnityUnity plug-inbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions