Skip to content

Commit

Permalink
chore: add missed tests for java (#1953)
Browse files Browse the repository at this point in the history
Signed-off-by: Keran Yang <[email protected]>
  • Loading branch information
KeranYang authored Aug 16, 2024
1 parent c14abd5 commit 0489eae
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 32 deletions.
12 changes: 5 additions & 7 deletions test/sdks-e2e/sdks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ func (s *SDKsSuite) TestMapStreamUDFunctionAndSink() {
VertexPodLogContains("go-split", LogUDFVertexStarted, PodLogCheckOptionWithContainer("numa")).
VertexPodLogContains("go-udsink", SinkVertexStarted, PodLogCheckOptionWithContainer("numa")).
VertexPodLogContains("python-split", LogUDFVertexStarted, PodLogCheckOptionWithContainer("numa")).
VertexPodLogContains("python-udsink", SinkVertexStarted, PodLogCheckOptionWithContainer("numa"))
//VertexPodLogContains("java-split", LogUDFVertexStarted, PodLogCheckOptionWithContainer("numa")).
// VertexPodLogContains("java-udsink", SinkVertexStarted, PodLogCheckOptionWithContainer("numa"))
VertexPodLogContains("python-udsink", SinkVertexStarted, PodLogCheckOptionWithContainer("numa")).
VertexPodLogContains("java-split", LogUDFVertexStarted, PodLogCheckOptionWithContainer("numa")).
VertexPodLogContains("java-udsink", SinkVertexStarted, PodLogCheckOptionWithContainer("numa"))

w.SendMessageTo(pipelineName, "in", NewHttpPostRequest().WithBody([]byte("hello,hello,hello"))).
SendMessageTo(pipelineName, "in", NewHttpPostRequest().WithBody([]byte("hello")))
Expand All @@ -90,10 +90,8 @@ func (s *SDKsSuite) TestMapStreamUDFunctionAndSink() {
VertexPodLogContains("go-udsink-2", "hello", PodLogCheckOptionWithContainer("udsink"), PodLogCheckOptionWithCount(4))
w.Expect().
VertexPodLogContains("python-udsink", "hello", PodLogCheckOptionWithContainer("udsink"), PodLogCheckOptionWithCount(4))

// FIXME(map-batch): enable Java
//w.Expect().
// VertexPodLogContains("java-udsink", "hello", PodLogCheckOptionWithContainer("udsink"), PodLogCheckOptionWithCount(4))
w.Expect().
VertexPodLogContains("java-udsink", "hello", PodLogCheckOptionWithContainer("udsink"), PodLogCheckOptionWithCount(4))
}

func (s *SDKsSuite) TestBatchMapUDFunctionAndSink() {
Expand Down
49 changes: 24 additions & 25 deletions test/sdks-e2e/testdata/flatmap-stream.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,27 +62,26 @@ spec:
# https://github.com/numaproj/numaflow-python/tree/main/examples/sink/log
image: quay.io/numaio/numaflow-python/sink-log:stable
imagePullPolicy: Always
## FIXME(map-batch): enable Java
# - name: java-split
# partitions: 3
# limits:
# readBatchSize: 1
# scale:
# min: 1
# udf:
# container:
# # Split input message into an array with comma, see https://github.com/numaproj/numaflow-java/tree/main/examples/src/main/java/io/numaproj/numaflow/examples/mapstream/flatmapstream
# image: quay.io/numaio/numaflow-java/flat-map-stream:stable
# imagePullPolicy: Always
# - name: java-udsink
# scale:
# min: 1
# sink:
# udsink:
# container:
# # https://github.com/numaproj/numaflow-java/tree/main/examples/src/main/java/io/numaproj/numaflow/examples/sink/simple
# image: quay.io/numaio/numaflow-java/simple-sink:stable
# imagePullPolicy: Always
- name: java-split
partitions: 3
limits:
readBatchSize: 1
scale:
min: 1
udf:
container:
# Split input message into an array with comma, see https://github.com/numaproj/numaflow-java/tree/main/examples/src/main/java/io/numaproj/numaflow/examples/mapstream/flatmapstream
image: quay.io/numaio/numaflow-java/flat-map-stream:stable
imagePullPolicy: Always
- name: java-udsink
scale:
min: 1
sink:
udsink:
container:
# https://github.com/numaproj/numaflow-java/tree/main/examples/src/main/java/io/numaproj/numaflow/examples/sink/simple
image: quay.io/numaio/numaflow-java/simple-sink:stable
imagePullPolicy: Always
edges:
- from: in
to: go-split
Expand All @@ -94,7 +93,7 @@ spec:
to: python-split
- from: python-split
to: python-udsink
# - from: in
# to: java-split
# - from: java-split
# to: java-udsink
- from: in
to: java-split
- from: java-split
to: java-udsink

0 comments on commit 0489eae

Please sign in to comment.