Skip to content

Commit 830c289

Browse files
authored
Merge pull request #22 from IBMStreams/develop
Prepare new release
2 parents 967b7fb + 391ebe2 commit 830c289

File tree

121 files changed

+2706
-1033
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+2706
-1033
lines changed

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,25 @@
66
## v3.0.0:
77
* Initial version forked from [streams.inet v2.9.6](https://github.com/IBMStreams/streamsx.inet/tree/v2.9.6)
88

9+
## v4.0.0
10+
* Remove target 'setcommitversion' from build.xml - we have now a build.info
11+
* Update jetty server libs to 9.4.18.v20190429
12+
* Sample HTTPTupleInjectAndView is now enabled for secure connections
13+
* Operator HTTPRequestProcess: Corrected and competed parameters and attribute
14+
* Operator HTTPRequestProcess: code cleanup, introduce exception handling in process method and return error responses in such cases
15+
* Operator HTTPRequestProcess: remove parameter statusMessage
16+
* Operator HTTPRequestProcess: Use Async Context instead of deprecated jetty continuation
17+
* Operator HTTPRequestProcess: renaming input attribute names to response...
18+
* Operator HTTPRequestProcess: Ignore WindowMarker and set default for non supplied json response artifacts
19+
* Operator HTTPRequestProcess: Add contextPath attribute to tuple output
20+
* Websocket Operators: Switch implementation from Java-WebSocket to jetty websocket libs
21+
* Fix metrics in HTTPRequestProcess
22+
* Improved documentation
23+
* Samples: Makefiles are now enabled for studio build
24+
* Move junit tests to tests directory
25+
* Integrate junit tests and framework tests into main build.xml test targets
26+
* New Junit Testcases for websocket operators, XMLView, PostBLOB and PostXML
27+
* New Framework Test Cases with HTTPRequestProcess operator attribute checks and runtime tests
28+
* New sample: HTTPXMLView
29+
* Simplified sample RequestProcessTuple
30+
* Removed puzzeling RequestProcessTuple Json Sample

DEVELOPMENT.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,12 @@ The top-level build.xml contains the main targets:
4545

4646
* **all** - Builds and creates SPLDOC for the toolkit and samples. Developers should ensure this target is successful when creating a pull request.
4747
* **toolkit** - Build the complete toolkit code
48-
* **samples-build** - Builds all samples. Developers should ensure this target is successful when creating a pull request.
48+
* **samples** - Builds all samples. Developers should ensure this target is successful when creating a pull request.
4949
* **release** - Builds release artifacts, which is a tar bundle containing the toolkits and samples. It includes stamping the SPLDOC and toolkit version numbers with the git commit number (thus requires git to be available).
50-
* **test** - Start the test
50+
* **test** - Start the quick test
51+
* **test-full** - Start all tests
5152
* **spldoc** - Generate the toolkit documentation
53+
* **clean** - Clean up toolkit code, samples code, all spldocs and downloaded libs
5254

5355
Execute the comman `ant -p` to display the target information.
5456

GRADUATION_STATUS.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ Incubation for projects is covered here: https://github.com/IBMStreams/administr
1212
* Status: SPLDOC complete.
1313
- [ ] :white_check_mark: Project has samples and instructions to help users get started easily
1414
* Status: Multiple samples exist.
15-
- [ ] :large_orange_diamond: Sufficient testing
16-
* Status: Some testing exists, not all operators are tested.
15+
- [ ] :white_check_mark: Sufficient testing
16+
* Status: All operators are tested.
1717
- [ ] :white_check_mark: Instructions on how to get started with development and contributing to project
1818
* Status: Description exists
1919
- [ ] :white_check_mark: Website that contains information and documentation of the project
2020
* Status: http://ibmstreams.github.io/streamsx.inet/
21-
- [ ] :red_circle: Clear release plan
22-
* Status: **TBD**
21+
- [ ] :white_check_mark: Clear release plan
22+
* Status: Clear release plan exists
2323
- [ ] :white_check_mark: At least one active committer
2424
* Status: There are more than one active commiters
2525

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# streamsx.inetserver
22

3-
The INet Server Toolkit
4-
The Internet Toolkit provides support for common internet rest protocol and web socket server protocol.
3+
The Internet Server Toolkit provides support HTTP- and Websocket-Server functions. The functionality is based on an embedded
4+
jetty webserver. It may be used for rest protocol and web socket protocol applications.
55
This toolkit is a split from streamsx.inet 2.9.6
66
[streams.inet v2.9.6](https://github.com/IBMStreams/streamsx.inet/tree/v2.9.6)
77

build.xml

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,16 @@
55
<!-- set global properties for this build -->
66
<property environment="env" />
77
<property name="streams.install" value="${env.STREAMS_INSTALL}" />
8-
<property name="toolkit.dir" value="com.ibm.streamsx.inetserver"/>
8+
<property name="toolkit.string" value="com.ibm.streamsx.inetserver"/>
9+
<property name="toolkit.dir" location="${toolkit.string}"/> <!-- must be absolute because is used in called test scripts -->
910
<property name="doc.string" value="doc"/>
1011
<property name="doc.dir" value="${doc.string}/spldoc"/>
1112
<property name="samples.dir" value="samples"/>
1213
<property name="samples.doc.dir" value="samples/${doc.string}/spldoc"/>
1314
<property name="test.dir" value="tests"/>
15+
<property name="junit.test.dir" value="${test.dir}/junit"/>
1416
<property name="release.dir" value="release" />
15-
<property name="release.info.file" value="${toolkit.dir}/build.info"/>
17+
<property name="release.info.file" value="${toolkit.string}/build.info"/>
1618

1719
<property name="tktitle" value="IBMStreams ${ant.project.name} Toolkit" />
1820
<property name="tkauthor" value="IBMStreams Open Source Community at GitHub - https://github.com/IBMStreams/${ant.project.name}" />
@@ -28,7 +30,7 @@
2830
description="Main target: Build the toolkit code, build the samples index and generate the spl documentation - incremental build"
2931
/>
3032

31-
<target name="clean" depends="spldoc-clean,samples-clean,releaseinfo-clean"
33+
<target name="clean" depends="spldoc-clean,samples-clean,releaseinfo-clean,test-clean"
3234
description="Main target: clean up toolkit code, samples code, all spldocs and downloaded libs">
3335
<ant dir="${toolkit.dir}" target="clean" />
3436
</target>
@@ -44,7 +46,7 @@
4446
</target>
4547

4648
<target name="get_name">
47-
<xmlproperty file="${toolkit.dir}/info.xml" prefix="tkinfo" keepRoot="no"/>
49+
<xmlproperty file="${toolkit.string}/info.xml" prefix="tkinfo" keepRoot="no"/>
4850
<echo message="Toolkit Name: ${tkinfo.identity.name}"/>
4951
<echo message="Toolkit Version: ${tkinfo.identity.version}"/>
5052
</target>
@@ -59,7 +61,7 @@
5961
<arg value="--doc-title" />
6062
<arg value="${tktitle}" />
6163
<arg value="--directory" />
62-
<arg value="${toolkit.dir}" />
64+
<arg value="${toolkit.string}" />
6365
<arg value="--warn-no-comments"/>
6466
<arg value="--copy-image-files" />
6567
<arg value="--output-directory" />
@@ -128,37 +130,38 @@
128130
</target>
129131

130132
<!-- Test targets -->
131-
<target name="test" depends="toolkit"
132-
description="Execute the toolkit test. Requires an up to date toolkit build">
133-
<echo message="Start full test"/>
134-
<exec executable="./runTest.sh" dir="${test.dir}/frameworktests" failonerror="true">
135-
<arg value="--noprompt"/>
136-
<arg value="--no-browser"/>
133+
<target name="test" depends="test-junit"
134+
description="Main target: Execute the toolkit quick test. Includes junit tests.">
135+
<echo message="Start quick test"/>
136+
<exec executable="make" dir="${test.dir}/frameworktests" failonerror="true">
137+
<arg value="test"/>
137138
</exec>
138139
</target>
139140

140-
<target name="test-quick" depends="toolkit"
141-
description="Execute the toolkit quick test. Requires an up to date toolkit build">
142-
<echo message="Start quick test"/>
143-
<exec executable="./runTest.sh" dir="${test.dir}/frameworktests" failonerror="true">
144-
<arg value="--noprompt"/>
145-
<arg value="--no-browser"/>
146-
<arg value="--category"/>
147-
<arg value="quick"/>
141+
<target name="test-full" depends="test-junit"
142+
description="Main target: Execute all toolkit tests. Includes junit tests.">
143+
<echo message="Start full test"/>
144+
<exec executable="make" dir="${test.dir}/frameworktests" failonerror="true">
145+
<arg value="test-full"/>
148146
</exec>
149147
</target>
150148

149+
<target name="test-junit" depends="toolkit"
150+
description="Execute the junit tests">
151+
<echo message="Execute the junit tests"/>
152+
<ant dir="${junit.test.dir}" target="test"/>
153+
</target>
154+
151155
<target name="test-clean"
152156
description="Clean up all generated test artifacts">
157+
<ant dir="${junit.test.dir}" target="clean-all"/>
158+
<exec executable="make" dir="${test.dir}/frameworktests" failonerror="true">
159+
<arg value="clean-all"/>
160+
</exec>
153161
<delete dir="${test.dir}/frameworktests/workdir"/>
154162
<delete dir="${test.dir}/frameworktests/scripts"/>
155163
</target>
156164

157-
<target name="tests" depends="toolkit">
158-
<ant dir="${toolkit.dir}" target="test"/>
159-
<ant dir="${toolkit.test}" target="all"/>
160-
</target>
161-
162165
<!-- Targets to build releases -->
163166
<target name="release" depends="clean"
164167
description="Make a toolkit release archive - purge workspace and build toolkit from scratch">
@@ -183,8 +186,8 @@
183186
<tar compression="gzip" longfile="gnu"
184187
destfile="${releasefilename}"
185188
basedir="${basedir}"
186-
includes="${toolkit.dir}/** samples/** ${doc.string}/** README.md LICENSE"
187-
excludes="**/.toolkitList **/.gitignore **/.gitkeep ${toolkit.dir}/.project ${toolkit.dir}/.settings/ ${toolkit.dir}/.classpath ${toolkit.dir}/impl/java/ ${toolkit.dir}/icons/ ${toolkit.dir}/build.xml ${toolkit.dir}/pom.xml"
189+
includes="${toolkit.string}/** samples/** ${doc.string}/** README.md LICENSE"
190+
excludes="**/.toolkitList **/.gitignore **/.gitkeep ${toolkit.string}/.project ${toolkit.string}/.settings/ ${toolkit.string}/.classpath ${toolkit.string}/impl/java/ ${toolkit.string}/icons/ ${toolkit.string}/build.xml ${toolkit.string}/pom.xml"
188191
/>
189192
<checksum file="${releasefilename}"/>
190193
<checksum algorithm="sha1" file="${releasefilename}"/>

com.ibm.streamsx.inetserver/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
22
/impl/java/src-gen/
33
/impl/java/studio-build/
44
/output/
5-
/unittestrun/
65
/lib/

com.ibm.streamsx.inetserver/build.xml

Lines changed: 3 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ artifacts were left around and caused issues with the ant build.
2727
<property name="gensrc.dir2" location="impl/java/src-gen2"/> <!-- streams studio bin dir / used only on clean target -->
2828
<property name="out.dir" location="output"/> <!-- streams studio bin dir / used only on clean target -->
2929

30-
<property name="test.run.dir" location="unittestrun" />
31-
<property name="test.build.dir" location="${test.run.dir}/bin" />
3230
<property name="downloads.dir" location="opt/downloaded" /> <!-- used for cleanup only -->
3331
<property name="jarfile" value="com.ibm.streamsx.inetserver.jar" />
3432

@@ -87,8 +85,8 @@ artifacts were left around and caused issues with the ant build.
8785
<delete dir="${gensrc.dir}"/>
8886
</target>
8987

90-
<target name="clean" depends="toolkit-clean, test-clean"
91-
description="Clean up generated toolkit artifacts and downloaded libraries and test artifacts">
88+
<target name="clean" depends="toolkit-clean"
89+
description="Clean up generated toolkit artifacts and downloaded libraries">
9290
<delete dir="${lib.dir}"/>
9391
<delete dir="${downloads.dir}" />
9492
<delete dir="doc"/> <!-- delete old doc files -->
@@ -127,8 +125,7 @@ artifacts were left around and caused issues with the ant build.
127125
<target name="compile" depends="maven-deps"
128126
description="Compile the java source components">
129127
<javac srcdir="${src.dir}" destdir="${build.dir}" debug="true" includeantruntime="no"
130-
source="1.8" target="1.8"
131-
excludes="com/ibm/streamsx/inet/*/test/**">
128+
source="1.8" target="1.8">
132129
<classpath>
133130
<path refid="cp.compile" />
134131
</classpath>
@@ -152,45 +149,5 @@ artifacts were left around and caused issues with the ant build.
152149
<!-- <delete dir="${build.dir}" /> do not delete classes to enable incremental build -->
153150
</target>
154151

155-
<!-- assumes Junit 4.3 (or later) is in $HOME/.ant/lib -->
156-
<target name="test" depends="jar"
157-
description="Execute the integrated unit tests">
158-
<mkdir dir="${test.run.dir}" />
159-
<mkdir dir="${test.build.dir}" />
160-
161-
<javac srcdir="${src.dir}" destdir="${test.build.dir}" debug="true" includeantruntime="yes" includes="com/ibm/streamsx/inet/*/test/**">
162-
<classpath>
163-
<pathelement location="${impl.lib.dir}/${jarfile}" />
164-
<path refid="cp.streams" />
165-
</classpath>
166-
</javac>
167-
168-
<junit printsummary="yes" haltonfailure="yes" fork="yes">
169-
<classpath>
170-
<pathelement location="${test.build.dir}" />
171-
<pathelement location="${impl.lib.dir}/${jarfile}" />
172-
<path refid="cp.streams" />
173-
</classpath>
174-
175-
<formatter type="xml" />
176-
177-
<batchtest todir="${test.run.dir}">
178-
<fileset dir="${src.dir}">
179-
<include name="**/*Test.java" />
180-
</fileset>
181-
</batchtest>
182-
</junit>
183-
<!-- <junitreport todir="${test.run.dir}">
184-
<fileset dir="${test.run.dir}">
185-
<include name="TEST-*.xml"/>
186-
</fileset>
187-
<report format="frames" todir="${test.run.dir}/html"/>
188-
</junitreport> -->
189-
</target>
190-
191-
<target name="test-clean" description="Clean generated test artifacts">
192-
<delete dir="${test.run.dir}" />
193-
<delete dir="${test.build.dir}" />
194-
</target>
195152
</project>
196153

com.ibm.streamsx.inetserver/com.ibm.streamsx.inet/namespace-info.spl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* + Sharing the Eclipse Jetty Instance
66
* Multiple operators share a single jetty server instance if:
77
* * they are fused in a single processing element (config placement: partitionColocation),
8-
* * and they use the same `port` parameter
8+
* * and they use the same `port` parameter value
99
* This allows operators to expose streams through the same webserver
1010
* without having to be connected in the SPL graph.
1111
*

com.ibm.streamsx.inetserver/impl/java/src/com/ibm/streamsx/inet/rest/ops/PostJSON.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public static void checkJSONAttribute(OperatorContextChecker checker) {
4545
checker.checkAttributeType(jsonString, MetaType.RSTRING);
4646
continue;
4747
}
48-
48+
4949
Attribute first = port.getStreamSchema().getAttribute(0);
5050
checker.checkAttributeType(first, MetaType.RSTRING);
5151
}

0 commit comments

Comments
 (0)