Fixed non-deterministic test case 93/247193/1
authorDavid Steele <david.steele@samsung.com>
Fri, 6 Nov 2020 11:12:05 +0000 (11:12 +0000)
committerDavid Steele <david.steele@samsung.com>
Fri, 6 Nov 2020 11:12:12 +0000 (11:12 +0000)
SVG now processes results from the rasterizing thread on both the event
trigger and the core process events. In the test harness, this means
that either application.SendNotification, or
Test::WaitForEventThreadTrigger will complete the rasterizing task.

Added comment to remind testers about this timing, and moved the
test check prior to application.SendNotification.

Change-Id: If2d4298cd38af4f2c3c298f6010f321becfbdaf1

automated-tests/src/dali-toolkit/utc-Dali-VisualFactory.cpp

index ad0dc43..faae3fe 100644 (file)
@@ -1131,9 +1131,9 @@ int UtcDaliVisualFactoryGetSvgVisual(void)
   application.GetScene().Add( actor );
   visual.SetTransformAndSize(DefaultTransform(), Vector2(200.f, 200.f) );
 
   application.GetScene().Add( actor );
   visual.SetTransformAndSize(DefaultTransform(), Vector2(200.f, 200.f) );
 
+  // Either application.SendNotification() or the trigger can now complete the task.
   application.SendNotification();
   application.Render();
   application.SendNotification();
   application.Render();
-
   DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
 
   // renderer is added to actor
   DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
 
   // renderer is added to actor
@@ -1167,9 +1167,9 @@ int UtcDaliVisualFactoryGetSvgVisualLarge(void)
   dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
   application.GetScene().Add( actor );
 
   dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
   application.GetScene().Add( actor );
 
+  // Either application.SendNotification() or the trigger can now complete the task.
   application.SendNotification();
   application.Render();
   application.SendNotification();
   application.Render();
-
   DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
 
   // renderer is added to actor
   DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
 
   // renderer is added to actor
@@ -1210,12 +1210,10 @@ int UtcDaliVisualFactoryGetSvgVisualAtlas(void)
   application.GetScene().Add( actor );
   visual.SetTransformAndSize(DefaultTransform(), Vector2(200.f, 200.f) );
 
   application.GetScene().Add( actor );
   visual.SetTransformAndSize(DefaultTransform(), Vector2(200.f, 200.f) );
 
+  // Either application.SendNotification() or the trigger can now complete the task.
+  DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
   application.SendNotification();
   application.Render();
   application.SendNotification();
   application.Render();
-
-  // renderer is not added to actor until the rasterization is completed.
-  DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
-
   DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
 
   // renderer is added to actor
   DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
 
   // renderer is added to actor