Skip to content

[FLINK-7554][Tests] Add a testing RuntimeContext to test utilities#6148

Closed
Jiayi-Liao wants to merge 1 commit intoapache:masterfrom
Jiayi-Liao:7554
Closed

[FLINK-7554][Tests] Add a testing RuntimeContext to test utilities#6148
Jiayi-Liao wants to merge 1 commit intoapache:masterfrom
Jiayi-Liao:7554

Conversation

@Jiayi-Liao
Copy link
Contributor

What is the purpose of the change

This pull request adds a TestingRuntimeContext to help developers test their own user-defined functions like CoprocessFunction instead of testing the whole pipeline.

Brief change log

  • TestingRuntimeContext can be directly used in unit testing of both dataset functions and datastream functions, including the support of broadcastVariable, state, accumulator and so on.
  • Documents are written in udf_test, including examples of Java and Scala.

Verifying this change

  • This change has already been verified in new unit testing files in test directory, org.apache.flink.streaming.api.functions.test.TestingRuntimeContextTest and org.apache.flink.streaming.api.functions.test.TestingRuntimeContextTest.

Documentation

  • This pull request is a new feature.
  • Related documents are written in docs directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants