kymera 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c82eaabac4677d7d7c25c48c3158ebe2d0a1c4ee
4
- data.tar.gz: ed0410d78817931fe190c362a5a84c2ec7f8d288
3
+ metadata.gz: 4c19699686e5847e74e029fa8b565aa5656f3e80
4
+ data.tar.gz: eb6131673665a32abec766b398b049d7244c00b9
5
5
  SHA512:
6
- metadata.gz: 2e5effe750d775ed7529c54ece17da64a6ee132b772712dcf52b7381cf1faaf1a6f31ea3e70c8f6d8ce785b5e52309d5144f2ffec4897a9835222106249d713a
7
- data.tar.gz: f128ceb189c9875f894c8aa01d5428c8b3e22b792af1681df6773b90a1057caf20b1bdcaab95d41aed03d2e15b457e597bcb16b2cc1a4bf4fdcd359c170a7f41
6
+ metadata.gz: c3e4b4f28defcfbb0e9e34ead7049a459f41c50bbb08d1611159f964b3356d715f8e205f29b9878e378f046a60dfc18d748388b6ea8d09cb76b4575f52b810a1
7
+ data.tar.gz: f03d32b1fd05ad623b63046b3ca08da0d65eaf89047dfb9ec15f5f19302e37aba1f91ec473ec7df9ad432104a32b715fe371d82d340f7db64c1ad5bde73e04ca
data/.idea/kymera.iml CHANGED
@@ -178,7 +178,7 @@
178
178
  <orderEntry type="library" scope="PROVIDED" name="ffi-rzmq (v2.0.1, ruby-2.0.0-p481) [gem]" level="application" />
179
179
  <orderEntry type="library" scope="PROVIDED" name="ffi-rzmq-core (v1.0.3, ruby-2.0.0-p481) [gem]" level="application" />
180
180
  <orderEntry type="library" scope="PROVIDED" name="gherkin (v2.12.2, ruby-2.0.0-p481) [gem]" level="application" />
181
- <orderEntry type="library" scope="PROVIDED" name="json (v1.8.1, ruby-2.0.0-p481) [gem]" level="application" />
181
+ <orderEntry type="library" scope="PROVIDED" name="json (v1.8.2, ruby-2.0.0-p481) [gem]" level="application" />
182
182
  <orderEntry type="library" scope="PROVIDED" name="mongo (v1.10.2, ruby-2.0.0-p481) [gem]" level="application" />
183
183
  <orderEntry type="library" scope="PROVIDED" name="multi_json (v1.10.1, ruby-2.0.0-p481) [gem]" level="application" />
184
184
  <orderEntry type="library" scope="PROVIDED" name="multi_test (v0.1.1, ruby-2.0.0-p481) [gem]" level="application" />
data/.idea/workspace.xml CHANGED
@@ -2,7 +2,13 @@
2
2
  <project version="4">
3
3
  <component name="ChangeListManager">
4
4
  <list default="true" id="fe8b228f-39c5-4d1c-a114-7c0c9683636f" name="Default" comment="">
5
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/kymera/broker.rb" afterPath="$PROJECT_DIR$/lib/kymera/broker.rb" />
6
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/spec/full_run_for_linux_spec.rb" afterPath="$PROJECT_DIR$/lib/spec/full_run_for_linux_spec.rb" />
7
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/kymera.iml" afterPath="$PROJECT_DIR$/.idea/kymera.iml" />
8
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/kymera/test_results_collector.rb" afterPath="$PROJECT_DIR$/lib/kymera/test_results_collector.rb" />
5
9
  <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/kymera/version.rb" afterPath="$PROJECT_DIR$/lib/kymera/version.rb" />
10
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/kymera/worker.rb" afterPath="$PROJECT_DIR$/lib/kymera/worker.rb" />
11
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
6
12
  </list>
7
13
  <ignored path="kymera.iws" />
8
14
  <ignored path=".idea/workspace.xml" />
@@ -40,18 +46,18 @@
40
46
  <file leaf-file-name="broker.rb" pinned="false" current-in-tab="false">
41
47
  <entry file="file://$PROJECT_DIR$/lib/kymera/broker.rb">
42
48
  <provider selected="true" editor-type-id="text-editor">
43
- <state vertical-scroll-proportion="0.0" vertical-offset="165" max-vertical-offset="2220">
44
- <caret line="52" column="15" selection-start-line="52" selection-start-column="15" selection-end-line="52" selection-end-column="15" />
49
+ <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="2460">
50
+ <caret line="22" column="26" selection-start-line="22" selection-start-column="26" selection-end-line="22" selection-end-column="26" />
45
51
  <folding />
46
52
  </state>
47
53
  </provider>
48
54
  </entry>
49
55
  </file>
50
- <file leaf-file-name="array_exten.rb" pinned="false" current-in-tab="false">
51
- <entry file="file://$PROJECT_DIR$/lib/kymera/array_exten.rb">
56
+ <file leaf-file-name="kymera.gemspec" pinned="false" current-in-tab="false">
57
+ <entry file="file://$PROJECT_DIR$/kymera.gemspec">
52
58
  <provider selected="true" editor-type-id="text-editor">
53
- <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="240">
54
- <caret line="10" column="3" selection-start-line="10" selection-start-column="3" selection-end-line="10" selection-end-column="3" />
59
+ <state vertical-scroll-proportion="0.0" vertical-offset="165" max-vertical-offset="555">
60
+ <caret line="11" column="64" selection-start-line="11" selection-start-column="64" selection-end-line="11" selection-end-column="64" />
55
61
  <folding />
56
62
  </state>
57
63
  </provider>
@@ -60,8 +66,18 @@
60
66
  <file leaf-file-name="test_results_collector.rb" pinned="false" current-in-tab="false">
61
67
  <entry file="file://$PROJECT_DIR$/lib/kymera/test_results_collector.rb">
62
68
  <provider selected="true" editor-type-id="text-editor">
63
- <state vertical-scroll-proportion="0.0" vertical-offset="885" max-vertical-offset="1965">
64
- <caret line="92" column="9" selection-start-line="92" selection-start-column="9" selection-end-line="92" selection-end-column="9" />
69
+ <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="1545">
70
+ <caret line="11" column="29" selection-start-line="11" selection-start-column="29" selection-end-line="11" selection-end-column="29" />
71
+ <folding />
72
+ </state>
73
+ </provider>
74
+ </entry>
75
+ </file>
76
+ <file leaf-file-name="szmq.rb" pinned="false" current-in-tab="false">
77
+ <entry file="file://$PROJECT_DIR$/lib/kymera/szmq/szmq.rb">
78
+ <provider selected="true" editor-type-id="text-editor">
79
+ <state vertical-scroll-proportion="0.0" vertical-offset="1745" max-vertical-offset="3870">
80
+ <caret line="140" column="6" selection-start-line="140" selection-start-column="6" selection-end-line="140" selection-end-column="6" />
65
81
  <folding />
66
82
  </state>
67
83
  </provider>
@@ -70,8 +86,8 @@
70
86
  <file leaf-file-name="full_run_for_linux_spec.rb" pinned="false" current-in-tab="false">
71
87
  <entry file="file://$PROJECT_DIR$/lib/spec/full_run_for_linux_spec.rb">
72
88
  <provider selected="true" editor-type-id="text-editor">
73
- <state vertical-scroll-proportion="0.0" vertical-offset="75" max-vertical-offset="855">
74
- <caret line="41" column="120" selection-start-line="41" selection-start-column="120" selection-end-line="41" selection-end-column="120" />
89
+ <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="855">
90
+ <caret line="35" column="3" selection-start-line="35" selection-start-column="3" selection-end-line="35" selection-end-column="3" />
75
91
  <folding />
76
92
  </state>
77
93
  </provider>
@@ -90,8 +106,8 @@
90
106
  <file leaf-file-name="client.rb" pinned="false" current-in-tab="false">
91
107
  <entry file="file://$PROJECT_DIR$/lib/kymera/client.rb">
92
108
  <provider selected="true" editor-type-id="text-editor">
93
- <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="1545">
94
- <caret line="34" column="21" selection-start-line="34" selection-start-column="21" selection-end-line="34" selection-end-column="21" />
109
+ <state vertical-scroll-proportion="0.0" vertical-offset="255" max-vertical-offset="1590">
110
+ <caret line="17" column="36" selection-start-line="17" selection-start-column="36" selection-end-line="17" selection-end-column="36" />
95
111
  <folding />
96
112
  </state>
97
113
  </provider>
@@ -100,18 +116,8 @@
100
116
  <file leaf-file-name="worker.rb" pinned="false" current-in-tab="false">
101
117
  <entry file="file://$PROJECT_DIR$/lib/kymera/worker.rb">
102
118
  <provider selected="true" editor-type-id="text-editor">
103
- <state vertical-scroll-proportion="0.0" vertical-offset="690" max-vertical-offset="2055">
104
- <caret line="78" column="0" selection-start-line="78" selection-start-column="0" selection-end-line="78" selection-end-column="0" />
105
- <folding />
106
- </state>
107
- </provider>
108
- </entry>
109
- </file>
110
- <file leaf-file-name="cucumber_test_runner.rb" pinned="false" current-in-tab="false">
111
- <entry file="file://$PROJECT_DIR$/lib/kymera/cucumber/cucumber_test_runner.rb">
112
- <provider selected="true" editor-type-id="text-editor">
113
- <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="1215">
114
- <caret line="32" column="48" selection-start-line="32" selection-start-column="48" selection-end-line="32" selection-end-column="48" />
119
+ <state vertical-scroll-proportion="0.0" vertical-offset="1350" max-vertical-offset="2100">
120
+ <caret line="115" column="0" selection-start-line="115" selection-start-column="0" selection-end-line="115" selection-end-column="0" />
115
121
  <folding />
116
122
  </state>
117
123
  </provider>
@@ -120,18 +126,8 @@
120
126
  <file leaf-file-name="platform_utils.rb" pinned="false" current-in-tab="false">
121
127
  <entry file="file://$PROJECT_DIR$/lib/kymera/platform_utils.rb">
122
128
  <provider selected="true" editor-type-id="text-editor">
123
- <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="1185">
124
- <caret line="9" column="10" selection-start-line="9" selection-start-column="10" selection-end-line="9" selection-end-column="10" />
125
- <folding />
126
- </state>
127
- </provider>
128
- </entry>
129
- </file>
130
- <file leaf-file-name="kymera.rb" pinned="false" current-in-tab="false">
131
- <entry file="file://$PROJECT_DIR$/lib/kymera.rb">
132
- <provider selected="true" editor-type-id="text-editor">
133
- <state vertical-scroll-proportion="0.0" vertical-offset="165" max-vertical-offset="1380">
134
- <caret line="19" column="81" selection-start-line="19" selection-start-column="81" selection-end-line="19" selection-end-column="81" />
129
+ <state vertical-scroll-proportion="0.0" vertical-offset="210" max-vertical-offset="1320">
130
+ <caret line="49" column="23" selection-start-line="49" selection-start-column="23" selection-end-line="49" selection-end-column="23" />
135
131
  <folding />
136
132
  </state>
137
133
  </provider>
@@ -154,7 +150,6 @@
154
150
  <option value="$PROJECT_DIR$/lib/kymera/cucumber/cucumber_html_parser.rb" />
155
151
  <option value="$PROJECT_DIR$/lib/spec/config_options.txt" />
156
152
  <option value="$PROJECT_DIR$/lib/spec/test_file_paths_spec.rb" />
157
- <option value="$PROJECT_DIR$/lib/kymera/test_results_collector.rb" />
158
153
  <option value="$PROJECT_DIR$/lib/kymera/config/config.yaml" />
159
154
  <option value="$PROJECT_DIR$/lib/kymera/results_bus.rb" />
160
155
  <option value="$PROJECT_DIR$/lib/kymera/config/config.rb" />
@@ -162,19 +157,22 @@
162
157
  <option value="$PROJECT_DIR$/bin/start_kymera_collector.rb" />
163
158
  <option value="$PROJECT_DIR$/bin/kymera.rb" />
164
159
  <option value="$PROJECT_DIR$/bin/kymera" />
165
- <option value="$PROJECT_DIR$/lib/spec/client_test_run_spec.rb" />
166
160
  <option value="$PROJECT_DIR$/kymera.gemspec" />
167
161
  <option value="$PROJECT_DIR$/README.md" />
168
162
  <option value="$PROJECT_DIR$/config.md" />
169
163
  <option value="$PROJECT_DIR$/lib/kymera/array_exten.rb" />
170
164
  <option value="$PROJECT_DIR$/lib/spec/startup_broker_bus_collector_spec.rb" />
171
165
  <option value="$PROJECT_DIR$/lib/spec/worker_test_run_spec.rb" />
166
+ <option value="$PROJECT_DIR$/lib/kymera.rb" />
172
167
  <option value="$PROJECT_DIR$/lib/kymera/platform_utils.rb" />
173
- <option value="$PROJECT_DIR$/lib/kymera/broker.rb" />
174
168
  <option value="$PROJECT_DIR$/lib/kymera/client.rb" />
175
- <option value="$PROJECT_DIR$/lib/kymera.rb" />
176
- <option value="$PROJECT_DIR$/lib/kymera/worker.rb" />
169
+ <option value="$PROJECT_DIR$/lib/kymera/cucumber/cucumber_test_runner.rb" />
170
+ <option value="$PROJECT_DIR$/lib/spec/client_test_run_spec.rb" />
177
171
  <option value="$PROJECT_DIR$/lib/spec/full_run_for_linux_spec.rb" />
172
+ <option value="$PROJECT_DIR$/lib/kymera/szmq/szmq.rb" />
173
+ <option value="$PROJECT_DIR$/lib/kymera/test_results_collector.rb" />
174
+ <option value="$PROJECT_DIR$/lib/kymera/worker.rb" />
175
+ <option value="$PROJECT_DIR$/lib/kymera/broker.rb" />
178
176
  <option value="$PROJECT_DIR$/lib/kymera/version.rb" />
179
177
  </list>
180
178
  </option>
@@ -303,28 +301,6 @@
303
301
  <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
304
302
  </PATH_ELEMENT>
305
303
  </PATH>
306
- <PATH>
307
- <PATH_ELEMENT>
308
- <option name="myItemId" value="kymera" />
309
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
310
- </PATH_ELEMENT>
311
- <PATH_ELEMENT>
312
- <option name="myItemId" value="kymera" />
313
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
314
- </PATH_ELEMENT>
315
- <PATH_ELEMENT>
316
- <option name="myItemId" value="lib" />
317
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
318
- </PATH_ELEMENT>
319
- <PATH_ELEMENT>
320
- <option name="myItemId" value="kymera" />
321
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
322
- </PATH_ELEMENT>
323
- <PATH_ELEMENT>
324
- <option name="myItemId" value="config" />
325
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
326
- </PATH_ELEMENT>
327
- </PATH>
328
304
  </subPane>
329
305
  </pane>
330
306
  <pane id="Scope" />
@@ -336,7 +312,7 @@
336
312
  <property name="recentsLimit" value="5" />
337
313
  <property name="options.lastSelected" value="org.jetbrains.plugins.ruby.settings.RubyActiveModuleSdkConfigurable" />
338
314
  <property name="SearchEverywhereHistory" value="s&#10;@" />
339
- <property name="last_opened_file_path" value="$USER_HOME$/express_automation" />
315
+ <property name="last_opened_file_path" value="$PROJECT_DIR$" />
340
316
  <property name="FullScreen" value="false" />
341
317
  <property name="options.searchVisible" value="true" />
342
318
  <property name="options.splitter.details.proportions" value="0.2" />
@@ -653,7 +629,7 @@
653
629
  <servers />
654
630
  </component>
655
631
  <component name="ToolWindowManager">
656
- <frame x="0" y="23" width="1440" height="821" extended-state="0" />
632
+ <frame x="0" y="23" width="1440" height="821" extended-state="6" />
657
633
  <editor active="true" />
658
634
  <layout>
659
635
  <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
@@ -662,7 +638,7 @@
662
638
  <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
663
639
  <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
664
640
  <window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" />
665
- <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.20347223" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
641
+ <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.23680556" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
666
642
  <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
667
643
  <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32972974" sideWeight="0.5" order="8" side_tool="true" content_ui="tabs" />
668
644
  <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
@@ -676,6 +652,27 @@
676
652
  <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
677
653
  <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3284974" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
678
654
  </layout>
655
+ <layout-to-restore>
656
+ <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
657
+ <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
658
+ <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="11" side_tool="false" content_ui="tabs" />
659
+ <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
660
+ <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
661
+ <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
662
+ <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3277635" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
663
+ <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
664
+ <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
665
+ <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32972974" sideWeight="0.5" order="8" side_tool="true" content_ui="tabs" />
666
+ <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
667
+ <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
668
+ <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
669
+ <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
670
+ <window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" />
671
+ <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.20347223" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
672
+ <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3284974" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
673
+ <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
674
+ <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
675
+ </layout-to-restore>
679
676
  </component>
680
677
  <component name="Vcs.Log.UiProperties">
681
678
  <option name="RECENTLY_FILTERED_USER_GROUPS">
@@ -711,7 +708,6 @@
711
708
  <provider selected="true" editor-type-id="text-editor">
712
709
  <state vertical-scroll-proportion="0.0" vertical-offset="240" max-vertical-offset="465">
713
710
  <caret line="16" column="26" selection-start-line="16" selection-start-column="26" selection-end-line="16" selection-end-column="26" />
714
- <folding />
715
711
  </state>
716
712
  </provider>
717
713
  </entry>
@@ -719,7 +715,6 @@
719
715
  <provider selected="true" editor-type-id="text-editor">
720
716
  <state vertical-scroll-proportion="0.0" vertical-offset="485" max-vertical-offset="3870">
721
717
  <caret line="50" column="6" selection-start-line="50" selection-start-column="6" selection-end-line="55" selection-end-column="9" />
722
- <folding />
723
718
  </state>
724
719
  </provider>
725
720
  </entry>
@@ -856,13 +851,6 @@
856
851
  </state>
857
852
  </provider>
858
853
  </entry>
859
- <entry file="file://$PROJECT_DIR$/lib/kymera/cucumber/cucumber_results_parser.rb">
860
- <provider selected="true" editor-type-id="text-editor">
861
- <state vertical-scroll-proportion="0.0" vertical-offset="329" max-vertical-offset="1666">
862
- <caret line="65" column="27" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
863
- </state>
864
- </provider>
865
- </entry>
866
854
  <entry file="file://$PROJECT_DIR$/lib/kymera/cucumber/cucumber_html_parser.rb">
867
855
  <provider selected="true" editor-type-id="text-editor">
868
856
  <state vertical-scroll-proportion="0.0" vertical-offset="375" max-vertical-offset="1290">
@@ -898,14 +886,6 @@
898
886
  </state>
899
887
  </provider>
900
888
  </entry>
901
- <entry file="file://$PROJECT_DIR$/lib/kymera/szmq/szmq.rb">
902
- <provider selected="true" editor-type-id="text-editor">
903
- <state vertical-scroll-proportion="0.0" vertical-offset="485" max-vertical-offset="3870">
904
- <caret line="50" column="6" selection-start-line="50" selection-start-column="6" selection-end-line="55" selection-end-column="9" />
905
- <folding />
906
- </state>
907
- </provider>
908
- </entry>
909
889
  <entry file="file://$PROJECT_DIR$/bin/kymera">
910
890
  <provider selected="true" editor-type-id="text-editor">
911
891
  <state vertical-scroll-proportion="0.0" vertical-offset="180" max-vertical-offset="1035">
@@ -913,13 +893,6 @@
913
893
  </state>
914
894
  </provider>
915
895
  </entry>
916
- <entry file="file://$PROJECT_DIR$/kymera.gemspec">
917
- <provider selected="true" editor-type-id="text-editor">
918
- <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="555">
919
- <caret line="11" column="64" selection-start-line="11" selection-start-column="64" selection-end-line="11" selection-end-column="64" />
920
- </state>
921
- </provider>
922
- </entry>
923
896
  <entry file="file://$PROJECT_DIR$/README.md">
924
897
  <provider selected="true" editor-type-id="text-editor">
925
898
  <state vertical-scroll-proportion="0.0" vertical-offset="735" max-vertical-offset="1545">
@@ -944,7 +917,6 @@
944
917
  <provider selected="true" editor-type-id="text-editor">
945
918
  <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="615">
946
919
  <caret line="12" column="10" selection-start-line="12" selection-start-column="10" selection-end-line="12" selection-end-column="10" />
947
- <folding />
948
920
  </state>
949
921
  </provider>
950
922
  </entry>
@@ -967,7 +939,6 @@
967
939
  <provider selected="true" editor-type-id="text-editor">
968
940
  <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="615">
969
941
  <caret line="11" column="38" selection-start-line="11" selection-start-column="38" selection-end-line="11" selection-end-column="38" />
970
- <folding />
971
942
  </state>
972
943
  </provider>
973
944
  </entry>
@@ -978,97 +949,119 @@
978
949
  </state>
979
950
  </provider>
980
951
  </entry>
981
- <entry file="file://$PROJECT_DIR$/lib/spec/client_test_run_spec.rb">
952
+ <entry file="file://$PROJECT_DIR$/lib/spec/startup_broker_bus_collector_spec.rb">
982
953
  <provider selected="true" editor-type-id="text-editor">
983
- <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="120">
984
- <caret line="2" column="0" selection-start-line="2" selection-start-column="0" selection-end-line="2" selection-end-column="139" />
985
- <folding />
954
+ <state vertical-scroll-proportion="0.68" vertical-offset="0" max-vertical-offset="750">
955
+ <caret line="34" column="3" selection-start-line="34" selection-start-column="3" selection-end-line="34" selection-end-column="3" />
986
956
  </state>
987
957
  </provider>
988
958
  </entry>
989
- <entry file="file://$PROJECT_DIR$/lib/spec/startup_broker_bus_collector_spec.rb">
959
+ <entry file="file://$PROJECT_DIR$/lib/kymera/array_exten.rb">
990
960
  <provider selected="true" editor-type-id="text-editor">
991
- <state vertical-scroll-proportion="0.68" vertical-offset="0" max-vertical-offset="750">
992
- <caret line="34" column="3" selection-start-line="34" selection-start-column="3" selection-end-line="34" selection-end-column="3" />
961
+ <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="240">
962
+ <caret line="10" column="3" selection-start-line="10" selection-start-column="3" selection-end-line="10" selection-end-column="3" />
993
963
  </state>
994
964
  </provider>
995
965
  </entry>
996
- <entry file="file://$PROJECT_DIR$/lib/kymera/results_bus.rb">
966
+ <entry file="file://$PROJECT_DIR$/lib/kymera.rb">
997
967
  <provider selected="true" editor-type-id="text-editor">
998
- <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="465">
999
- <caret line="16" column="26" selection-start-line="16" selection-start-column="26" selection-end-line="16" selection-end-column="26" />
968
+ <state vertical-scroll-proportion="0.0" vertical-offset="165" max-vertical-offset="1380">
969
+ <caret line="19" column="81" selection-start-line="19" selection-start-column="81" selection-end-line="19" selection-end-column="81" />
970
+ </state>
971
+ </provider>
972
+ </entry>
973
+ <entry file="file://$PROJECT_DIR$/lib/spec/client_test_run_spec.rb">
974
+ <provider selected="true" editor-type-id="text-editor">
975
+ <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="135">
976
+ <caret line="3" column="27" selection-start-line="3" selection-start-column="27" selection-end-line="3" selection-end-column="27" />
977
+ <folding />
978
+ </state>
979
+ </provider>
980
+ </entry>
981
+ <entry file="file://$PROJECT_DIR$/lib/kymera/client.rb">
982
+ <provider selected="true" editor-type-id="text-editor">
983
+ <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="1590">
984
+ <caret line="17" column="36" selection-start-line="17" selection-start-column="36" selection-end-line="17" selection-end-column="36" />
1000
985
  <folding />
1001
986
  </state>
1002
987
  </provider>
1003
988
  </entry>
1004
989
  <entry file="file://$PROJECT_DIR$/lib/kymera/platform_utils.rb">
1005
990
  <provider selected="true" editor-type-id="text-editor">
1006
- <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="1185">
1007
- <caret line="9" column="10" selection-start-line="9" selection-start-column="10" selection-end-line="9" selection-end-column="10" />
991
+ <state vertical-scroll-proportion="0.0" vertical-offset="210" max-vertical-offset="1320">
992
+ <caret line="49" column="23" selection-start-line="49" selection-start-column="23" selection-end-line="49" selection-end-column="23" />
1008
993
  <folding />
1009
994
  </state>
1010
995
  </provider>
1011
996
  </entry>
1012
- <entry file="file://$PROJECT_DIR$/lib/kymera/array_exten.rb">
997
+ <entry file="file://$PROJECT_DIR$/kymera.gemspec">
1013
998
  <provider selected="true" editor-type-id="text-editor">
1014
- <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="240">
1015
- <caret line="10" column="3" selection-start-line="10" selection-start-column="3" selection-end-line="10" selection-end-column="3" />
999
+ <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="555">
1000
+ <caret line="11" column="64" selection-start-line="11" selection-start-column="64" selection-end-line="11" selection-end-column="64" />
1016
1001
  <folding />
1017
1002
  </state>
1018
1003
  </provider>
1019
1004
  </entry>
1020
1005
  <entry file="file://$PROJECT_DIR$/lib/kymera/cucumber/cucumber_test_runner.rb">
1021
1006
  <provider selected="true" editor-type-id="text-editor">
1022
- <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="1215">
1023
- <caret line="32" column="48" selection-start-line="32" selection-start-column="48" selection-end-line="32" selection-end-column="48" />
1007
+ <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="1320">
1008
+ <caret line="48" column="0" selection-start-line="48" selection-start-column="0" selection-end-line="48" selection-end-column="0" />
1024
1009
  <folding />
1025
1010
  </state>
1026
1011
  </provider>
1027
1012
  </entry>
1028
- <entry file="file://$PROJECT_DIR$/lib/kymera/test_results_collector.rb">
1013
+ <entry file="file://$PROJECT_DIR$/lib/kymera/cucumber/cucumber_results_parser.rb">
1029
1014
  <provider selected="true" editor-type-id="text-editor">
1030
- <state vertical-scroll-proportion="0.0" vertical-offset="885" max-vertical-offset="1965">
1031
- <caret line="92" column="9" selection-start-line="92" selection-start-column="9" selection-end-line="92" selection-end-column="9" />
1015
+ <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="1470">
1016
+ <caret line="14" column="46" selection-start-line="14" selection-start-column="46" selection-end-line="14" selection-end-column="46" />
1032
1017
  <folding />
1033
1018
  </state>
1034
1019
  </provider>
1035
1020
  </entry>
1036
- <entry file="file://$PROJECT_DIR$/lib/kymera/broker.rb">
1021
+ <entry file="file://$PROJECT_DIR$/lib/kymera/szmq/szmq.rb">
1037
1022
  <provider selected="true" editor-type-id="text-editor">
1038
- <state vertical-scroll-proportion="0.0" vertical-offset="165" max-vertical-offset="2220">
1039
- <caret line="52" column="15" selection-start-line="52" selection-start-column="15" selection-end-line="52" selection-end-column="15" />
1023
+ <state vertical-scroll-proportion="0.0" vertical-offset="1745" max-vertical-offset="3870">
1024
+ <caret line="140" column="6" selection-start-line="140" selection-start-column="6" selection-end-line="140" selection-end-column="6" />
1040
1025
  <folding />
1041
1026
  </state>
1042
1027
  </provider>
1043
1028
  </entry>
1044
- <entry file="file://$PROJECT_DIR$/lib/kymera.rb">
1029
+ <entry file="file://$PROJECT_DIR$/lib/kymera/test_results_collector.rb">
1045
1030
  <provider selected="true" editor-type-id="text-editor">
1046
- <state vertical-scroll-proportion="0.0" vertical-offset="165" max-vertical-offset="1380">
1047
- <caret line="19" column="81" selection-start-line="19" selection-start-column="81" selection-end-line="19" selection-end-column="81" />
1031
+ <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="1545">
1032
+ <caret line="11" column="29" selection-start-line="11" selection-start-column="29" selection-end-line="11" selection-end-column="29" />
1048
1033
  <folding />
1049
1034
  </state>
1050
1035
  </provider>
1051
1036
  </entry>
1052
1037
  <entry file="file://$PROJECT_DIR$/lib/kymera/worker.rb">
1053
1038
  <provider selected="true" editor-type-id="text-editor">
1054
- <state vertical-scroll-proportion="0.0" vertical-offset="690" max-vertical-offset="2055">
1055
- <caret line="78" column="0" selection-start-line="78" selection-start-column="0" selection-end-line="78" selection-end-column="0" />
1039
+ <state vertical-scroll-proportion="0.0" vertical-offset="1350" max-vertical-offset="2100">
1040
+ <caret line="115" column="0" selection-start-line="115" selection-start-column="0" selection-end-line="115" selection-end-column="0" />
1056
1041
  <folding />
1057
1042
  </state>
1058
1043
  </provider>
1059
1044
  </entry>
1060
- <entry file="file://$PROJECT_DIR$/lib/kymera/client.rb">
1045
+ <entry file="file://$PROJECT_DIR$/lib/kymera/results_bus.rb">
1046
+ <provider selected="true" editor-type-id="text-editor">
1047
+ <state vertical-scroll-proportion="0.32" vertical-offset="0" max-vertical-offset="750">
1048
+ <caret line="16" column="26" selection-start-line="16" selection-start-column="26" selection-end-line="16" selection-end-column="26" />
1049
+ <folding />
1050
+ </state>
1051
+ </provider>
1052
+ </entry>
1053
+ <entry file="file://$PROJECT_DIR$/lib/kymera/broker.rb">
1061
1054
  <provider selected="true" editor-type-id="text-editor">
1062
- <state vertical-scroll-proportion="0.0" vertical-offset="90" max-vertical-offset="1545">
1063
- <caret line="34" column="21" selection-start-line="34" selection-start-column="21" selection-end-line="34" selection-end-column="21" />
1055
+ <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="2460">
1056
+ <caret line="22" column="26" selection-start-line="22" selection-start-column="26" selection-end-line="22" selection-end-column="26" />
1064
1057
  <folding />
1065
1058
  </state>
1066
1059
  </provider>
1067
1060
  </entry>
1068
1061
  <entry file="file://$PROJECT_DIR$/lib/spec/full_run_for_linux_spec.rb">
1069
1062
  <provider selected="true" editor-type-id="text-editor">
1070
- <state vertical-scroll-proportion="0.0" vertical-offset="75" max-vertical-offset="855">
1071
- <caret line="41" column="120" selection-start-line="41" selection-start-column="120" selection-end-line="41" selection-end-column="120" />
1063
+ <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="855">
1064
+ <caret line="35" column="3" selection-start-line="35" selection-start-column="3" selection-end-line="35" selection-end-column="3" />
1072
1065
  <folding />
1073
1066
  </state>
1074
1067
  </provider>
data/lib/kymera/broker.rb CHANGED
@@ -5,14 +5,13 @@ module Kymera
5
5
 
6
6
  class Broker
7
7
 
8
- #test_address is the port you want to listen on for incoming test runs. client_address is the internal address used for sending tests to the proxy
9
- #worker_address is the port that the workers will connect to for test distribution. num_of_con is the number of concurrent requests you want running at any given time
10
- #This number can be tuned depending on the machine the broker is running on.
11
8
  def initialize
12
9
  config = Kymera::Config.new
13
10
  @zmq = Kymera::SZMQ.new
14
11
  #This will change once I get the worker registry up and running. When that is up, there will be one connection spawned for
15
- #each of the workers that are connected
12
+ #each of the workers that are connected. Edit - Thats actually not sustainable. The number of workers should be able to change
13
+ #dynamically without impact to the broker. An inventory check should be made at the start of every new test run. There should also
14
+ # be some logic to handle the disconnection of workers in the middle of a test run.
16
15
  @num_of_connections = config.broker["number_of_connections"]
17
16
  #This socket is for getting tests from the client
18
17
  @client_address = "tcp://*:#{config.broker["client_listening_port"]}"
@@ -23,6 +22,7 @@ module Kymera
23
22
  @front_end = @zmq.socket(@internal_address, 'router')
24
23
  @back_end = @zmq.socket(@worker_address, 'dealer')
25
24
  @proxy = Thread.new {@zmq.start_proxy(@front_end, @back_end)}
25
+ @results = ''
26
26
  end
27
27
 
28
28
  #This brings up the broker so that it can receive test run requests.
@@ -38,56 +38,68 @@ module Kymera
38
38
 
39
39
  #This is the start of the test run and is called when the broker receives a test run request
40
40
  def start_test_run(test_run)
41
+ puts 'Starting test run...'
41
42
  test_run = JSON.parse(test_run)
43
+ puts 'Copying over tests..'
42
44
  tests = test_run["tests"].copy
43
45
  threads = []
44
-
46
+ puts "Checking for group configuration...#{test_run['grouped']}"
47
+ puts "This is the test run message:\n"
48
+ puts "#{test_run}"
45
49
  if test_run["grouped"] || test_run["grouped"].to_s.downcase == 'true'
50
+ puts 'Grouping tests....'
46
51
  tests = group_tests(tests)
47
52
  end unless test_run["grouped"].nil?
48
53
 
49
54
  @test_count = test_run["tests"].length
50
55
  report_test_config(test_run)
51
- # puts "###############################################"
52
- # puts "These are the tests"
53
- # p tests
54
- # puts "#" * 25
55
56
 
57
+ @results = ''
56
58
  if tests.length > @num_of_connections.to_i
59
+ puts "Test count was higher than connections. Starting tests and initiating run queue"
57
60
  1.upto @num_of_connections.to_i do
58
61
  test = tests.pop
59
62
  break if test.nil?
60
63
  threads << run_test(test, test_run)
61
64
  end
62
65
  work_queue(threads, tests, test_run)
63
- puts "Tests Complete"
66
+
67
+ puts "Test run completed"
64
68
 
65
69
  else
70
+ puts "Test count was not higher than the connections. Starting all tests."
66
71
  1.upto tests.length do
67
72
  test = tests.pop
68
73
  break if test.nil?
69
74
  threads << run_test(test, test_run)
70
75
  end
76
+
71
77
  threads.each do |t|
78
+ puts "waiting for threads"
72
79
  t.join
73
80
  end
74
- puts "Tests Complete"
75
81
 
76
82
  end
77
83
 
84
+ puts "Test run completed. Sending results"
85
+ Kymera::TestResultsCollector.new.finalize_results(test_run["test_count"], test_run["run_id"], @results, test_run["runner"], test_run["start_time"])
86
+
78
87
 
79
88
  end
80
89
 
90
+
81
91
  def group_tests(tests)
82
92
  #This creates a group for each of the available connection as specified by the @num_of_connections variable
83
93
  #It will then iterate over all of the tests and add a test to each of the groups
84
94
  #at the end of the iteration, if any groups are left empty, they are deleted and the trimmed array is returned
85
95
  groups = []
86
96
 
87
- 1.upto @num_of_connections do
97
+ puts "Setting group containers..."
98
+ 1.upto @num_of_connections.to_i do
88
99
  groups << []
89
100
  end
90
101
 
102
+ puts "Distributing tests..."
91
103
  while tests.length > 0
92
104
  groups.each do |group|
93
105
  test = tests.pop
@@ -110,6 +122,7 @@ module Kymera
110
122
  end
111
123
  end
112
124
  threads.each do |t|
125
+ puts "waiting for threads"
113
126
  t.join
114
127
  end
115
128
  end
@@ -118,13 +131,16 @@ module Kymera
118
131
  def run_test(test, options)
119
132
  port = @internal_address.split(':')[2]
120
133
  Thread.new {
134
+ zmq = Kymera::SZMQ.new
121
135
  message = JSON.generate({:test => test, :runner => options["runner"], :options => options["options"], :run_id => options["run_id"],
122
136
  :test_count => @test_count, :branch => options["branch"], :start_time => options["start_time"]})
123
- socket = @zmq.socket("tcp://127.0.0.1:#{port}", 'request')
137
+ socket = zmq.socket("tcp://127.0.0.1:#{port}", 'request')
124
138
  socket.connect
125
139
  puts "Sending: #{message}"
126
- socket.send_message(message)
127
- socket.close}
140
+ results = socket.send_message(message)
141
+ @results << results
142
+ socket.close
143
+ }
128
144
  end
129
145
 
130
146
  #This gives a print out of the test run that was received
data/lib/kymera/client.rb CHANGED
@@ -39,6 +39,8 @@ module Kymera
39
39
  socket = @zmq.socket(@broker_address, 'push')
40
40
  socket.connect
41
41
  message = JSON.generate(test_run)
42
+ # puts "Sending the following message: \n"
43
+ # puts message
42
44
  socket.send_message(message)
43
45
 
44
46
  channels = ["end_#{@full_run_id}"]
@@ -68,6 +70,7 @@ module Kymera
68
70
  #test parser should use for parsing out the tests.
69
71
  def parse_tests(tests, runner, options)
70
72
 
73
+ #This needs to be here for the parsing of the tests. I should probably push this task off to the broker. Will keep it here for now.
71
74
  test_path = nil
72
75
  if Kymera.is_linux?
73
76
  if tests.include? 'c:'
@@ -6,9 +6,9 @@ module Kymera
6
6
  #This is the test runner. It is responsible for the actual running of the test. It takes in 3 parameters. The first being options(Array). These are the options to be used
7
7
  #for the cucumber test run. The run_id(String), this is a unique id identifying the test run that this test is for. It is used as the channel name for publishing results
8
8
  #on the results bus. And lastly results_bus(SSocket), this is a socket object representing the results bus. This is what is used for publishing results to that bus
9
- def initialize(options, run_id, result_bus = nil)
9
+ def initialize(options, run_id, result_address = nil)
10
10
  @options = options
11
- @result_bus = result_bus
11
+ @result_address = result_address
12
12
  @run_id = run_id
13
13
  ENV["AUTOTEST"] = "1" if $stdout.tty?
14
14
  end
@@ -17,6 +17,12 @@ module Kymera
17
17
  #it uses the options passed in with the constructor. run_id(String) is the id of test run that this test is associated with. This is also defaulted with what was passed in
18
18
  #with the constructor
19
19
  def run_test(test, branch, options = @options, run_id = @run_id)
20
+ result_bus = nil
21
+ unless @result_address.nil?
22
+ result_bus = SZMQ.new.socket(@result_address, 'pub')
23
+ result_bus.connect
24
+ end
25
+
20
26
  _results = ''
21
27
  _options = ''
22
28
  options.each do |option|
@@ -29,12 +35,13 @@ module Kymera
29
35
  io = Object::IO.popen("bundle exec cucumber #{test} #{_options}")
30
36
  until io.eof? do
31
37
  result = io.gets
32
- unless @result_bus.nil?
33
- @result_bus.publish_message(run_id, result)
38
+ unless result_bus.nil?
39
+ result_bus.publish_message(run_id, result)
34
40
  end
35
41
  _results += result
36
42
  end
37
43
  Process.wait2(io.pid)
44
+ result_bus.close unless result_bus.nil?
38
45
  _results
39
46
  end
40
47
 
@@ -45,6 +45,15 @@ module Kymera
45
45
 
46
46
  end
47
47
 
48
+ def self.is_windows?
49
+ case RbConfig::CONFIG['host_os']
50
+ when /mswin|mingw/
51
+ true
52
+ else
53
+ false
54
+ end
55
+ end
56
+
48
57
 
49
58
  def self.ip_address
50
59
  ips = Socket.ip_address_list
@@ -10,77 +10,46 @@ module Kymera
10
10
  def initialize
11
11
  @config = Kymera::Config.new
12
12
  @zmq = Kymera::SZMQ.new
13
- @inc_socket = @zmq.socket("tcp://*:#{@config.result_collector["inc_listening_port"]}", 'pull')
14
13
  @out_socket = @zmq.socket(@config.result_collector["result_bus_address"], 'pub')
15
- @inc_socket.bind
16
14
  @out_socket.connect
17
15
  end
18
16
 
19
17
  def listen
20
18
  puts "Test collector started..."
21
- test_count = ''
22
- start_test_count = ''
23
19
  @run_id = ''
24
20
  results = ''
25
- runner = ''
26
- start_time = ''
27
- count = 0
28
21
  @inc_socket.receive do |message|
29
22
  parsed_message = JSON.parse message
30
- if count < 1
31
- @run_id = parsed_message["run_id"]
32
- test_count = parsed_message["test_count"].to_i
33
- start_test_count = parsed_message["test_count"]
34
- runner = parsed_message["runner"]
35
- results << parsed_message["results"]
36
- start_time = parsed_message["start_time"]
37
- puts 'Results run started with the following configuration:'
38
- puts "Run ID: #{@run_id}"
39
- puts "Test count: #{test_count}"
40
- test_count -= 1
41
- count +=1
42
- elsif test_count > 0
43
- results << parsed_message["results"]
44
- test_count -= 1
45
- end
46
-
47
- if test_count <= 0
48
- finalize_results(start_test_count, @run_id, results, runner, start_time)
49
- test_count = ''
50
- @run_id = ''
51
- results = ''
52
- runner = ''
53
- start_time = ''
54
- count = 0
55
- end
56
-
57
-
23
+ @run_id = parsed_message["run_id"]
24
+ test_count = parsed_message["test_count"].to_i
25
+ start_test_count = parsed_message["test_count"]
26
+ runner = parsed_message["runner"]
27
+ results << parsed_message["results"]
28
+ start_time = parsed_message["start_time"]
29
+ puts 'Results run started with the following configuration:'
30
+ puts "Run ID: #{@run_id}"
31
+ puts "Test count: #{test_count}"
32
+ finalize_results(start_test_count, @run_id, results, runner, start_time)
58
33
  end
59
34
 
60
35
  end
61
36
 
62
- private
63
-
64
37
  def finalize_results(test_count, run_id, results, runner, start_time)
65
38
  if runner.downcase == 'cucumber'
66
39
 
67
40
  begin
68
- #r_results = Kymera::Cucumber::ResultsParser.summarize_results(results)
69
41
  puts "Summarizing results.."
70
42
  r_results = Kymera::Cucumber::ResultsParser.summarize_results(results)
71
43
  puts "Getting pass count..."
72
44
  pass_count = Kymera::Cucumber::ResultsParser.scenario_counts[:pass]
73
45
  puts "Getting fail count..."
74
46
  fail_count = Kymera::Cucumber::ResultsParser.scenario_counts[:fail]
75
- # r_results = Kymera::Cucumber::ResultsParser.summarize_results(results)
76
47
  puts "Converting results to html..."
77
48
  html_results = Kymera::Cucumber::HTMLResultsParser.to_html(results)
78
49
  puts "Converting summary to html..."
79
50
  html_summary = Kymera::Cucumber::HTMLResultsParser.to_html(r_results)
80
51
  puts "Setting end time"
81
52
  end_time = Time.now
82
- # puts html_results
83
- # Kymera::MongoDriver.log_results(build_test_log(test_count, run_id, results, r_results), '10.6.49.83', 27017, 'apollo', 'test_runs')
84
53
  puts "Starting database logging processes..."
85
54
  Kymera::MongoDriver.log_results(build_test_log(test_count, run_id, html_results, html_summary, start_time, end_time.to_s, pass_count, fail_count), @config.result_collector["mongodb_address"],
86
55
  @config.result_collector["mongodb_port"].to_i, @config.result_collector["mongodb_database_name"], @config.result_collector["mongodb_collection_name"])
@@ -89,13 +58,16 @@ module Kymera
89
58
  puts "There was an error in the logging process:"
90
59
  puts e
91
60
  ensure
92
- run_id = "end_#{@run_id}"
93
- puts "Sending results to client..."
61
+ run_id = "end_#{run_id}"
62
+ puts "Sending results to client...#{run_id}"
94
63
  @out_socket.publish_message(run_id, r_results)
95
64
  end
96
65
  end
97
66
  end
98
67
 
68
+ private
69
+
70
+
99
71
  def build_test_log(test_count, run_id, results, summary, start_time, end_time, pass_count, fail_count)
100
72
  begin
101
73
  log_message = {}
@@ -1,3 +1,3 @@
1
1
  module Kymera
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
data/lib/kymera/worker.rb CHANGED
@@ -15,13 +15,7 @@ module Kymera
15
15
  #worker at a time instead of load balancing them. It may be more advantageous to use a request/reply structure for sending tests and managing the test run queue
16
16
  #manually.
17
17
  @test_socket = @zmq.socket(@test_address, 'reply')
18
- @results_socket = @zmq.socket(@results_address, 'push')
19
- @result_bus_socket = @zmq.socket(@result_bus_address, 'pub')
20
- @result_bus_socket.connect
21
18
  @test_socket.connect
22
- #Even though this is a push socket, I am connecting instead of binding because the static point is going to be the pull socket where the results are aggregated
23
- #Static points are bound, dynamic points are connected
24
- @results_socket.connect
25
19
  @threads = []
26
20
  @runner_id = Kymera.host_name
27
21
  end
@@ -34,11 +28,9 @@ module Kymera
34
28
  stop
35
29
  break
36
30
  else
37
- # results = run_test(message)
38
- # @results_socket.send_message(results)
39
31
  puts "Received tests to run"
40
- run_test(message, @results_socket)
41
- @test_socket.send_message ''
32
+ results = run_test(message)
33
+ @test_socket.send_message results
42
34
  end
43
35
  end
44
36
 
@@ -47,8 +39,9 @@ module Kymera
47
39
  #I need to pass in the runner and runner options. Thinking about using JSON to get those options and instantiate a runner object based on that information
48
40
  #The idea is to be able to take in any number of different test runners (cucumber/rspec) without having the restart the worker object
49
41
  #This is why passing in the runner on worker instantiation isnt really an option
50
- def run_test(test, results_socket)
42
+ def run_test(test)
51
43
  puts "Setting up tests..."
44
+ results = ''
52
45
  test = JSON.parse(test)
53
46
  runner = get_runner(test["runner"], test["options"], test["run_id"])
54
47
  tests = !test["test"].is_a?(Array) ? [test["test"]] : test["test"]
@@ -65,16 +58,24 @@ module Kymera
65
58
  rescue => e
66
59
  puts e
67
60
  end
61
+ elsif Kymera.is_windows?
62
+ puts "This is a windows machine. Making adjustments if needed..."
63
+ tests.each do |_test|
64
+ if _test.include? '~'
65
+ _test.gsub!('~', 'c:')
66
+ end
67
+ end
68
+
68
69
  end
69
70
 
70
71
  puts "Received #{tests.length} test(s). Running those tests with a max number of threads of #{@max_threads}"
71
72
 
72
- #TODO: Right now I am passing around a reference to a socket that is created on instantiation, I really should be creating and destroying a socket
73
- #for each thread I am creating not passing one in.
74
- 0.upto @max_threads do
73
+ 1.upto @max_threads do
75
74
  _test = tests.pop
76
75
  break if _test.nil?
77
- @threads << Thread.new {send_results(runner.run_test(_test, test['branch']), test, results_socket)}
76
+ @threads << Thread.new {
77
+ results << runner.run_test(_test, test['branch'])
78
+ }
78
79
  end
79
80
 
80
81
  puts "Created #{thread_count} threads...."
@@ -83,34 +84,36 @@ module Kymera
83
84
  puts "There were more tests than could be run at one time. Starting test queue."
84
85
  end
85
86
  while tests.length > 0
87
+ $stdout << "\rTest Remaining: #{tests.length} | Active Thread Count: #{thread_count}"
88
+ $stdout.flush
86
89
  if thread_count < @max_threads
87
90
  _test = tests.pop
88
- @threads << Thread.new {send_results(runner.run_test(_test, test['branch']), test, results_socket)}
91
+ break if _test.nil?
92
+ @threads << Thread.new {
93
+ results << runner.run_test(_test, test['branch'])
94
+ }
89
95
  end
90
96
  end
91
97
 
92
- @threads.each do |t|
93
- t.join
94
- end unless @threads.empty?
98
+ until @threads.empty?
99
+ thread_count
100
+ # text = "Remaining thread count: #{thread_count}"
101
+ # $stdout << "\r" + (" " * text.length)
102
+ # $stdout << "\r#{text}"
103
+ end
104
+
105
+ puts "\nNo more tests to be run"
95
106
 
107
+ @threads = []
108
+ results
96
109
  end
97
110
 
98
111
  def stop
99
112
  @test_socket.close
100
- @results_socket.close
101
113
  end
102
114
 
103
115
  private
104
116
 
105
- def send_results(results, message, socket)
106
- begin
107
- socket.send_message(JSON.generate({:run_id => message["run_id"], :runner_id => @runner_id, :test_count => message["test_count"], :runner => message["runner"], :results => results, :start_time => message["start_time"]} ))
108
- rescue => e
109
- puts e
110
- end
111
-
112
- end
113
-
114
117
  def thread_count
115
118
  @threads.delete_if {|th| !th.alive?}.length
116
119
  end
@@ -119,7 +122,7 @@ module Kymera
119
122
  #Right now I am just doing some simple if/then logic to get predefined runners.
120
123
  def get_runner(runner, options, run_id)
121
124
  if runner.downcase == 'cucumber'
122
- Kymera::Cucumber::Runner.new(options, run_id, @result_bus_socket)
125
+ Kymera::Cucumber::Runner.new(options, run_id, @result_bus_address)
123
126
  else
124
127
  nil
125
128
  end
@@ -1,3 +1,4 @@
1
- # require_relative '../../lib/kymera'
2
- require 'kymera'
3
- Kymera.run_tests('~/apollo/source/integration_tests/features/login_and_session/login.feature', 'cucumber', ['-p default'], 'develop', true)
1
+ require_relative '../../lib/kymera'
2
+ # require 'kymera'
3
+ Kymera.run_tests('c:/apollo/source/integration_tests/features/posting/entry_common', 'cucumber', ['-p default'], 'develop', true)
4
+ # Kymera.run_tests('c:/apollo/source/integration_tests/features/login_and_session/login.feature', 'cucumber', ['-p default'], 'develop', true)
@@ -8,25 +8,25 @@ trap('INT') do
8
8
  @close = true
9
9
  end
10
10
 
11
- #Results bus thread
11
+ # Broker thread
12
12
  threads << Thread.new {
13
- Kymera.start_bus
13
+ Kymera.start_broker
14
14
  }
15
15
 
16
- #Broker thread
16
+ #Results bus thread
17
17
  threads << Thread.new {
18
- Kymera.start_broker
18
+ Kymera.start_bus
19
19
  }
20
20
 
21
21
  #Results collector thread
22
22
  threads << Thread.new {
23
23
  Kymera.start_collector
24
24
  }
25
-
25
+ #
26
26
  threads << Thread.new {
27
27
  Kymera.start_worker
28
28
  }
29
- #
29
+
30
30
  # threads << Thread.new {
31
31
  # Kymera.start_worker
32
32
  # }
@@ -38,8 +38,8 @@ threads << Thread.new {
38
38
  #give stuff a chance to start up
39
39
  sleep 2
40
40
 
41
- # Kymera.run_tests('~/apollo/source/integration_tests/features/posting/delete', 'cucumber', ['-p default'], 'develop', true)
42
- Kymera.run_tests('~/apollo/source/integration_tests/features/login_and_session', 'cucumber', ['-p default'], 'develop', true)
41
+ # Kymera.run_tests('c:/apollo/source/integration_tests/features/posting/entry_common', 'cucumber', ['-p default'], 'develop', true)
42
+ Kymera.run_tests('~/apollo/source/integration_tests/features/login_and_session/', 'cucumber', ['-p default'], 'develop', true)
43
43
 
44
44
 
45
45
  loop do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kymera
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - jakesa
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-30 00:00:00.000000000 Z
11
+ date: 2015-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler