You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by GitBox <gi...@apache.org> on 2019/11/13 18:57:15 UTC

[GitHub] [samza] mynameborat commented on a change in pull request #1217: SAMZA-2381: Refactor JobRunner#run and split into multiple util methods.

mynameborat commented on a change in pull request #1217: SAMZA-2381: Refactor JobRunner#run and split into multiple util methods.
URL: https://github.com/apache/samza/pull/1217#discussion_r345939740
 
 

 ##########
 File path: samza-core/src/test/scala/org/apache/samza/util/TestCoordinatorStreamUtil.scala
 ##########
 @@ -84,4 +84,19 @@ class TestCoordinatorStreamUtil {
     Assert.assertEquals(configFromCoordinatorStream.get(keyForEmptyVal), emptyVal)
     Assert.assertFalse(configFromCoordinatorStream.containsKey(keyForNullVal))
   }
+
+  @Test
+  def testWriteConfigToCoordinatorStream() {
+    val addConfig = new util.HashMap[String, String]
+    addConfig.put("job.name", "test-job-name")
+    addConfig.put("job.id", "i001")
+    addConfig.put("job.coordinator.system", "samzatest")
+    addConfig.put("systems.samzatest.test","test")
+    addConfig.put("test.only","nothing")
+    addConfig.put("systems.samzatest.samza.factory", "org.apache.samza.system.MockSystemFactory")
+    val config = new MapConfig(addConfig)
+    val configMap = CoordinatorStreamUtil.buildCoordinatorStreamConfig(config)
+
+    CoordinatorStreamUtil.writeConfigToCoordinatorStream(configMap)
 
 Review comment:
   Can we verify if the configs are piped to the mock system producer? 
   Now that you are adding tests, maybe add one for resetJobConfig to make sure the configs not part of the old configs get deleted?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services