cameronlee314 commented on a change in pull request #1027: SAMZA-2046: 
Startpoint fan out implementation
URL: https://github.com/apache/samza/pull/1027#discussion_r283548084
 
 

 ##########
 File path: 
samza-core/src/test/scala/org/apache/samza/checkpoint/TestOffsetManager.scala
 ##########
 @@ -138,33 +142,35 @@ class TestOffsetManager {
     val config = new MapConfig
     val checkpointManager = getCheckpointManager(systemStreamPartition, 
taskName)
     val startpointManager = getStartpointManager()
+    startpointManager.start
     val systemAdmins = mock(classOf[SystemAdmins])
     when(systemAdmins.getSystemAdmin("test-system")).thenReturn(getSystemAdmin)
     val offsetManager = OffsetManager(systemStreamMetadata, config, 
checkpointManager, getStartpointManager(), systemAdmins, Map(), new 
OffsetManagerMetrics)
     offsetManager.register(taskName, Set(systemStreamPartition))
 
     // Pre-populate startpoint
     startpointManager.writeStartpoint(systemStreamPartition, taskName, new 
StartpointOldest)
+    startpointManager.fanOut(asTaskToSSPMap(taskName, systemStreamPartition))
     offsetManager.start
     // Should get offset 45 back from the checkpoint manager, which is last 
processed, and system admin should return 46 as starting offset.
-    assertNotNull(startpointManager.readStartpoint(systemStreamPartition, 
taskName))
+    assertEquals(1, startpointManager.getFanOutForTask(taskName).size())
 
 Review comment:
   Is this assertion necessary? Is it testing some part of `OffsetManager`? If 
so, then is it possible to check the actual result of `getFanOutForTask`?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to