{"action":"created","comment":{"url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/pulls/comments/37488755","id":37488755,"diff_hunk":"@@ -0,0 +1,96 @@\n+/*\n+ * Copyright 2015 the original author or authors.\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *      http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+package org.springframework.cloud.stream.module.ftp;\n+\n+import java.util.concurrent.TimeUnit;\n+\n+import org.junit.Test;\n+\n+import org.springframework.beans.factory.BeanCreationException;\n+import org.springframework.boot.context.properties.EnableConfigurationProperties;\n+import org.springframework.boot.test.EnvironmentTestUtils;\n+import org.springframework.cloud.stream.module.PeriodicTriggerConfigurationProperties;\n+import org.springframework.context.annotation.AnnotationConfigApplicationContext;\n+import org.springframework.context.annotation.Configuration;\n+\n+import static org.hamcrest.CoreMatchers.equalTo;\n+import static org.hamcrest.MatcherAssert.assertThat;\n+\n+/**\n+ * @author David Turanski\n+ */\n+public class FtpSessionFactoryConfigurationPropertiesTests {\n+","path":"spring-cloud-stream-modules-common-configuration/src/test/java/org/springframework/cloud/stream/module/ftp/FtpSessionFactoryConfigurationPropertiesTests.java","position":36,"original_position":36,"commit_id":"7ba98abc9112ba4553817e35ee1b489d7c9655b7","original_commit_id":"7ba98abc9112ba4553817e35ee1b489d7c9655b7","user":{"login":"markpollack","id":247466,"avatar_url":"https://avatars.githubusercontent.com/u/247466?v=3","gravatar_id":"","url":"https://api.github.com/users/markpollack","html_url":"https://github.com/markpollack","followers_url":"https://api.github.com/users/markpollack/followers","following_url":"https://api.github.com/users/markpollack/following{/other_user}","gists_url":"https://api.github.com/users/markpollack/gists{/gist_id}","starred_url":"https://api.github.com/users/markpollack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markpollack/subscriptions","organizations_url":"https://api.github.com/users/markpollack/orgs","repos_url":"https://api.github.com/users/markpollack/repos","events_url":"https://api.github.com/users/markpollack/events{/privacy}","received_events_url":"https://api.github.com/users/markpollack/received_events","type":"User","site_admin":false},"body":"I think there should be a test that tries to run the app without any env-vars and see that we get a useful error message.  Does an `@ConfigurationProperties` class show all the violations or does it fail fast?","created_at":"2015-08-20T01:50:50Z","updated_at":"2015-08-20T01:50:50Z","html_url":"https://github.com/spring-cloud/spring-cloud-stream-modules/pull/12#discussion_r37488755","pull_request_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/pulls/12","_links":{"self":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/pulls/comments/37488755"},"html":{"href":"https://github.com/spring-cloud/spring-cloud-stream-modules/pull/12#discussion_r37488755"},"pull_request":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/pulls/12"}}},"pull_request":{"url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/pulls/12","id":42493586,"html_url":"https://github.com/spring-cloud/spring-cloud-stream-modules/pull/12","diff_url":"https://github.com/spring-cloud/spring-cloud-stream-modules/pull/12.diff","patch_url":"https://github.com/spring-cloud/spring-cloud-stream-modules/pull/12.patch","issue_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/issues/12","number":12,"state":"open","locked":false,"title":"Xd 3283 Ftp Source Module","user":{"login":"dturanski","id":886859,"avatar_url":"https://avatars.githubusercontent.com/u/886859?v=3","gravatar_id":"","url":"https://api.github.com/users/dturanski","html_url":"https://github.com/dturanski","followers_url":"https://api.github.com/users/dturanski/followers","following_url":"https://api.github.com/users/dturanski/following{/other_user}","gists_url":"https://api.github.com/users/dturanski/gists{/gist_id}","starred_url":"https://api.github.com/users/dturanski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dturanski/subscriptions","organizations_url":"https://api.github.com/users/dturanski/orgs","repos_url":"https://api.github.com/users/dturanski/repos","events_url":"https://api.github.com/users/dturanski/events{/privacy}","received_events_url":"https://api.github.com/users/dturanski/received_events","type":"User","site_admin":false},"body":"Ftp Source is the most complex example to date. I would like some early feedback on how this can be made as simple as possible before we do more., the way the common configuration is used, use of SI DSL, etc. \r\n* spring-cloud-stream-modules-common-configuration -> should these (Mixin replacements, etc.) really go into spring-cloud-stream?\r\n* I don't think we need a separate test-support library here either. \r\n* S-I DSL seems like the easiest way to implement non trivial flows, but a bit clunkier without lambdas. \r\n* Some refactoring, renaming of Mixins to align better with the common @Configuration beans\r\n* What's the easiest way to inject module properties? Maybe create instance of the ConfigurationProperties classes and call the setters directly?. Also, some boot supported type conversions are not obvious, so seems better to initialize with a Properties object as the module property values would look to the DSL.  \r\n\r\n@ilayaperumalg : From the original commit comment:\r\n>>For the Mixins, I like having the mixins at S-C-S-Modules instead of S-C-S so that there is nothing module specific in there.","created_at":"2015-08-14T20:16:07Z","updated_at":"2015-08-20T01:50:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9aa9a1569384480bf5e29bafb11a71b4415ffedf","assignee":{"login":"markpollack","id":247466,"avatar_url":"https://avatars.githubusercontent.com/u/247466?v=3","gravatar_id":"","url":"https://api.github.com/users/markpollack","html_url":"https://github.com/markpollack","followers_url":"https://api.github.com/users/markpollack/followers","following_url":"https://api.github.com/users/markpollack/following{/other_user}","gists_url":"https://api.github.com/users/markpollack/gists{/gist_id}","starred_url":"https://api.github.com/users/markpollack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markpollack/subscriptions","organizations_url":"https://api.github.com/users/markpollack/orgs","repos_url":"https://api.github.com/users/markpollack/repos","events_url":"https://api.github.com/users/markpollack/events{/privacy}","received_events_url":"https://api.github.com/users/markpollack/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/pulls/12/commits","review_comments_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/pulls/12/comments","review_comment_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/issues/12/comments","statuses_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/statuses/7ba98abc9112ba4553817e35ee1b489d7c9655b7","head":{"label":"dturanski:XD-3283","ref":"XD-3283","sha":"7ba98abc9112ba4553817e35ee1b489d7c9655b7","user":{"login":"dturanski","id":886859,"avatar_url":"https://avatars.githubusercontent.com/u/886859?v=3","gravatar_id":"","url":"https://api.github.com/users/dturanski","html_url":"https://github.com/dturanski","followers_url":"https://api.github.com/users/dturanski/followers","following_url":"https://api.github.com/users/dturanski/following{/other_user}","gists_url":"https://api.github.com/users/dturanski/gists{/gist_id}","starred_url":"https://api.github.com/users/dturanski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dturanski/subscriptions","organizations_url":"https://api.github.com/users/dturanski/orgs","repos_url":"https://api.github.com/users/dturanski/repos","events_url":"https://api.github.com/users/dturanski/events{/privacy}","received_events_url":"https://api.github.com/users/dturanski/received_events","type":"User","site_admin":false},"repo":{"id":40662166,"name":"spring-cloud-stream-modules","full_name":"dturanski/spring-cloud-stream-modules","owner":{"login":"dturanski","id":886859,"avatar_url":"https://avatars.githubusercontent.com/u/886859?v=3","gravatar_id":"","url":"https://api.github.com/users/dturanski","html_url":"https://github.com/dturanski","followers_url":"https://api.github.com/users/dturanski/followers","following_url":"https://api.github.com/users/dturanski/following{/other_user}","gists_url":"https://api.github.com/users/dturanski/gists{/gist_id}","starred_url":"https://api.github.com/users/dturanski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dturanski/subscriptions","organizations_url":"https://api.github.com/users/dturanski/orgs","repos_url":"https://api.github.com/users/dturanski/repos","events_url":"https://api.github.com/users/dturanski/events{/privacy}","received_events_url":"https://api.github.com/users/dturanski/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dturanski/spring-cloud-stream-modules","description":"","fork":true,"url":"https://api.github.com/repos/dturanski/spring-cloud-stream-modules","forks_url":"https://api.github.com/repos/dturanski/spring-cloud-stream-modules/forks","keys_url":"https://api.github.com/repos/dturanski/spring-cloud-stream-modules/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dturanski/spring-cloud-stream-modules/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dturanski/spring-cloud-stream-modules/teams","hooks_url":"https://api.github.com/repos/dturanski/spring-cloud-stream-modules/hooks","issue_events_url":"https://api.github.com/repos/dturanski/spring-cloud-stream-modules/issues/events{/number}","events_url":"https://api.github.com/repos/dturanski/spring-cloud-stream-modules/events","assignees_url":"https://api.github.com/repos/dturanski/spring-cloud-stream-modules/assignees{/user}","branches_url":"https://api.github.com/repos/dturanski/spring-cloud-stream-modules/branches{/branch}","tags_url":"https://api.github.com/repos/dturanski/spring-cloud-stream-modules/tags","blobs_url":"https://api.github.com/repos/dturanski/spring-cloud-stream-modules/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dturanski/spring-cloud-stream-modules/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dturanski/spring-cloud-stream-modules/git/refs{/sha}","trees_url":"https://api.github.com/repos/dturanski/spring-cloud-stream-modules/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dturanski/spring-cloud-stream-modules/statuses/{sha}","languages_url":"https://api.github.com/repos/dturanski/spring-cloud-stream-modules/languages","stargazers_url":"https://api.github.com/repos/dturanski/spring-cloud-stream-modules/stargazers","contributors_url":"https://api.github.com/repos/dturanski/spring-cloud-stream-modules/contributors","subscribers_url":"https://api.github.com/repos/dturanski/spring-cloud-stream-modules/subscribers","subscription_url":"https://api.github.com/repos/dturanski/spring-cloud-stream-modules/subscription","commits_url":"https://api.github.com/repos/dturanski/spring-cloud-stream-modules/commits{/sha}","git_commits_url":"https://api.github.com/repos/dturanski/spring-cloud-stream-modules/git/commits{/sha}","comments_url":"https://api.github.com/repos/dturanski/spring-cloud-stream-modules/comments{/number}","issue_comment_url":"https://api.github.com/repos/dturanski/spring-cloud-stream-modules/issues/comments{/number}","contents_url":"https://api.github.com/repos/dturanski/spring-cloud-stream-modules/contents/{+path}","compare_url":"https://api.github.com/repos/dturanski/spring-cloud-stream-modules/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dturanski/spring-cloud-stream-modules/merges","archive_url":"https://api.github.com/repos/dturanski/spring-cloud-stream-modules/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dturanski/spring-cloud-stream-modules/downloads","issues_url":"https://api.github.com/repos/dturanski/spring-cloud-stream-modules/issues{/number}","pulls_url":"https://api.github.com/repos/dturanski/spring-cloud-stream-modules/pulls{/number}","milestones_url":"https://api.github.com/repos/dturanski/spring-cloud-stream-modules/milestones{/number}","notifications_url":"https://api.github.com/repos/dturanski/spring-cloud-stream-modules/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dturanski/spring-cloud-stream-modules/labels{/name}","releases_url":"https://api.github.com/repos/dturanski/spring-cloud-stream-modules/releases{/id}","created_at":"2015-08-13T14:08:45Z","updated_at":"2015-08-13T14:08:45Z","pushed_at":"2015-08-19T18:44:46Z","git_url":"git://github.com/dturanski/spring-cloud-stream-modules.git","ssh_url":"git@github.com:dturanski/spring-cloud-stream-modules.git","clone_url":"https://github.com/dturanski/spring-cloud-stream-modules.git","svn_url":"https://github.com/dturanski/spring-cloud-stream-modules","homepage":null,"size":181,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"spring-cloud:master","ref":"master","sha":"0b2a30615cbafaa12c9da830d0fb4fad296108cc","user":{"login":"spring-cloud","id":7815877,"avatar_url":"https://avatars.githubusercontent.com/u/7815877?v=3","gravatar_id":"","url":"https://api.github.com/users/spring-cloud","html_url":"https://github.com/spring-cloud","followers_url":"https://api.github.com/users/spring-cloud/followers","following_url":"https://api.github.com/users/spring-cloud/following{/other_user}","gists_url":"https://api.github.com/users/spring-cloud/gists{/gist_id}","starred_url":"https://api.github.com/users/spring-cloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spring-cloud/subscriptions","organizations_url":"https://api.github.com/users/spring-cloud/orgs","repos_url":"https://api.github.com/users/spring-cloud/repos","events_url":"https://api.github.com/users/spring-cloud/events{/privacy}","received_events_url":"https://api.github.com/users/spring-cloud/received_events","type":"Organization","site_admin":false},"repo":{"id":40096018,"name":"spring-cloud-stream-modules","full_name":"spring-cloud/spring-cloud-stream-modules","owner":{"login":"spring-cloud","id":7815877,"avatar_url":"https://avatars.githubusercontent.com/u/7815877?v=3","gravatar_id":"","url":"https://api.github.com/users/spring-cloud","html_url":"https://github.com/spring-cloud","followers_url":"https://api.github.com/users/spring-cloud/followers","following_url":"https://api.github.com/users/spring-cloud/following{/other_user}","gists_url":"https://api.github.com/users/spring-cloud/gists{/gist_id}","starred_url":"https://api.github.com/users/spring-cloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spring-cloud/subscriptions","organizations_url":"https://api.github.com/users/spring-cloud/orgs","repos_url":"https://api.github.com/users/spring-cloud/repos","events_url":"https://api.github.com/users/spring-cloud/events{/privacy}","received_events_url":"https://api.github.com/users/spring-cloud/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spring-cloud/spring-cloud-stream-modules","description":"","fork":false,"url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules","forks_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/forks","keys_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/teams","hooks_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/hooks","issue_events_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/issues/events{/number}","events_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/events","assignees_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/assignees{/user}","branches_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/branches{/branch}","tags_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/tags","blobs_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/git/refs{/sha}","trees_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/statuses/{sha}","languages_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/languages","stargazers_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/stargazers","contributors_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/contributors","subscribers_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/subscribers","subscription_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/subscription","commits_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/commits{/sha}","git_commits_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/git/commits{/sha}","comments_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/comments{/number}","issue_comment_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/issues/comments{/number}","contents_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/contents/{+path}","compare_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/merges","archive_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/downloads","issues_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/issues{/number}","pulls_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/pulls{/number}","milestones_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/milestones{/number}","notifications_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/labels{/name}","releases_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/releases{/id}","created_at":"2015-08-02T23:22:20Z","updated_at":"2015-08-02T23:25:00Z","pushed_at":"2015-08-19T22:44:43Z","git_url":"git://github.com/spring-cloud/spring-cloud-stream-modules.git","ssh_url":"git@github.com:spring-cloud/spring-cloud-stream-modules.git","clone_url":"https://github.com/spring-cloud/spring-cloud-stream-modules.git","svn_url":"https://github.com/spring-cloud/spring-cloud-stream-modules","homepage":null,"size":652,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":9,"forks":9,"open_issues":9,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/pulls/12"},"html":{"href":"https://github.com/spring-cloud/spring-cloud-stream-modules/pull/12"},"issue":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/issues/12"},"comments":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-stream-modules/statuses/7ba98abc9112ba4553817e35ee1b489d7c9655b7"}}}}