浏览代码

Updating simulation reset

/with_cloud_tests
Priyesh Wani 4 年前
当前提交
01fa9e28
共有 3 个文件被更改,包括 7 次插入3 次删除
  1. 1
      com.unity.perception/Runtime/GroundTruth/DatasetCapture.cs
  2. 8
      com.unity.perception/Tests/Runtime/GroundTruthTests/DatasetCaptureSensorSchedulingTests.cs
  3. 1
      com.unity.perception/Tests/Runtime/GroundTruthTests/GroundTruthTestBase.cs

1
com.unity.perception/Runtime/GroundTruth/DatasetCapture.cs


var oldSimulationState = SimulationState;
SimulationState = CreateSimulationData();
oldSimulationState.End();
Manager.Instance.CompleteAllTrackedRequests();
}
}

8
com.unity.perception/Tests/Runtime/GroundTruthTests/DatasetCaptureSensorSchedulingTests.cs


{
// Provides accessors and invocation methods for members of SimulationState that would otherwise be in-accessible
// due to protection level - use only when testing protected logic is critical
class SimulationStateTestHelper
class SimulationStateTestHelper : GroundTruthTestBase
{
SimulationState m_State => DatasetCapture.SimulationState;
Dictionary<SensorHandle, SimulationState.SensorData> m_SensorsReference;

m_TestHelper = new SimulationStateTestHelper();
}
[TearDown]
public void TearDown()
[UnityTearDown]
public IEnumerator TearDown()
yield return null;
Debug.Log("Simulation Reset and finished all async requests!");
}
[UnityTest]

1
com.unity.perception/Tests/Runtime/GroundTruthTests/GroundTruthTestBase.cs


[TearDown]
public void TearDown()
{
Debug.Log("Teardown called!");
foreach (var o in m_ObjectsToDestroy)
Object.DestroyImmediate(o);

正在加载...
取消
保存