Skip to content

Commit

Permalink
chore: add e2e test for udsource java sdk
Browse files Browse the repository at this point in the history
Signed-off-by: Keran Yang <[email protected]>
  • Loading branch information
KeranYang committed Sep 18, 2023
1 parent a639fd8 commit 4258adf
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
21 changes: 21 additions & 0 deletions test/udsource-e2e/testdata/simple-source-java.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: numaflow.numaproj.io/v1alpha1
kind: Pipeline
metadata:
name: simple-source
spec:
vertices:
- name: in
source:
udsource:
container:
# A simple user-defined source for e2e testing
# See https://github.com/numaproj/numaflow-java/tree/main/examples/src/main/java/io/numaproj/numaflow/examples/source/simple
image: quay.io/numaio/numaflow-java/source-simple-source:v0.5.1
limits:
readBatchSize: 2
- name: out
sink:
log: {}
edges:
- from: in
to: out
13 changes: 11 additions & 2 deletions test/udsource-e2e/udsource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ limitations under the License.
package e2e

import (
"fmt"
"testing"

"github.com/stretchr/testify/suite"
Expand All @@ -30,8 +31,16 @@ type UserDefinedSourceSuite struct {
E2ESuite
}

func (s *UserDefinedSourceSuite) TestSimpleSource() {
w := s.Given().Pipeline("@testdata/simple-source.yaml").
func (s *UserDefinedSourceSuite) TestSimpleSourceGo() {
s.testSimpleSource("go")
}

func (s *UserDefinedSourceSuite) TestSimpleSourceJava() {
s.testSimpleSource("java")
}

func (s *UserDefinedSourceSuite) testSimpleSource(lang string) {
w := s.Given().Pipeline(fmt.Sprintf("@testdata/simple-source-%s.yaml", lang)).
When().
CreatePipelineAndWait()
defer w.DeletePipelineAndWait()
Expand Down

0 comments on commit 4258adf

Please sign in to comment.