-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BEAM-13471] [Playground] Tag existing unit-tests #16325
Changes from 5 commits
833d251
54f5d4f
a6b77a1
12c8f5f
ffcf94f
1c6c3f6
d9f166e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -17,6 +17,14 @@ | |||||||
*/ | ||||||||
package org.apache.beam.examples.complete.game; | ||||||||
|
||||||||
// beam-playground: | ||||||||
// name: GameStatsTest | ||||||||
// description: Unit-test for the GameStats example. | ||||||||
// multifile: false | ||||||||
// pipeline_options: | ||||||||
// categories: | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||||||||
// | ||||||||
|
||||||||
import java.io.Serializable; | ||||||||
import java.util.Arrays; | ||||||||
import java.util.List; | ||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,14 @@ | |
*/ | ||
package org.apache.beam.examples.complete.kafkatopubsub; | ||
|
||
// beam-playground: | ||
// name: KafkaToPubsubTest | ||
// description: Unit-test for the KafkaToPubsub example. | ||
// multifile: false | ||
// pipeline_options: | ||
// categories: | ||
// - Streaming | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's remove this file, it doesn't test anything related to Beam |
||
import static org.apache.beam.examples.complete.kafkatopubsub.KafkaPubsubConstants.PASSWORD; | ||
import static org.apache.beam.examples.complete.kafkatopubsub.KafkaPubsubConstants.USERNAME; | ||
import static org.apache.beam.examples.complete.kafkatopubsub.kafka.consumer.Utils.getKafkaCredentialsFromVault; | ||
|
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -17,6 +17,15 @@ | |||||||||
*/ | ||||||||||
package org.apache.beam.examples.cookbook; | ||||||||||
|
||||||||||
// beam-playground: | ||||||||||
// name: DistinctExampleTest | ||||||||||
// description: Unit-test for the DistinctExample example. | ||||||||||
// multifile: false | ||||||||||
// pipeline_options: | ||||||||||
// categories: | ||||||||||
// - IO | ||||||||||
// - Options | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
|
||||||||||
import java.util.Arrays; | ||||||||||
import java.util.List; | ||||||||||
import org.apache.beam.sdk.coders.StringUtf8Coder; | ||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,14 @@ | |
|
||
package symtab | ||
|
||
// beam-playground: | ||
// name: SymtabTest | ||
// description: Unit-test for the Symtab example. | ||
// multifile: false | ||
// pipeline_options: | ||
// categories: | ||
// - Side Input | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's remove this file, it doesn't test anything related to Beam |
||
import ( | ||
"io/ioutil" | ||
"os" | ||
|
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -15,6 +15,13 @@ | |||||||
|
||||||||
package beam_test | ||||||||
|
||||||||
// beam-playground: | ||||||||
// name: PartitionTest | ||||||||
// description: Unit-test for the Partition example. | ||||||||
// multifile: false | ||||||||
// pipeline_options: | ||||||||
// categories: | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||||||||
|
||||||||
import ( | ||||||||
"testing" | ||||||||
|
||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,14 @@ | |
// Package ptest contains utilities for pipeline unit testing. | ||
package ptest | ||
|
||
// beam-playground: | ||
// name: PTest | ||
// description: Contains utilities for pipeline unit testing. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we need utilities? Do they test anything? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, the package doesn't really test anything. Remove tag. |
||
// multifile: false | ||
// pipeline_options: | ||
// categories: | ||
// - Testing | ||
|
||
import ( | ||
"context" | ||
"flag" | ||
|
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -15,6 +15,14 @@ | |||||||
|
||||||||
package filter_test | ||||||||
|
||||||||
// beam-playground: | ||||||||
// name: DistinctTest | ||||||||
// description: Unit-test for the Distinct example. | ||||||||
// multifile: false | ||||||||
// pipeline_options: | ||||||||
// categories: | ||||||||
// - Filtering | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
|
||||||||
import ( | ||||||||
"testing" | ||||||||
|
||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,6 +34,16 @@ | |
// environment setup, or by calling gradle commands in :sdks:go:test. | ||
package integration | ||
|
||
// beam-playground: | ||
// name: CheckFiltersTest | ||
// description: Unit-test checks if an integration test is filtered to be skipped, either | ||
// because the intended runner does not support it, or the test is sickbayed. | ||
// multifile: false | ||
// pipeline_options: | ||
// categories: | ||
// - Filtering | ||
// - Testing | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's remove this file, it doesn't test anything related to Beam |
||
import ( | ||
"fmt" | ||
"regexp" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,14 @@ | |
|
||
package synthetic | ||
|
||
// beam-playground: | ||
// name: SyntheticTest | ||
// description: Unit-test for the Synthetic example. | ||
// multifile: false | ||
// pipeline_options: | ||
// categories: | ||
// - Testing | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems like this test is something internal, let's remove it. It might be not so interesting for Playground users |
||
import ( | ||
"testing" | ||
|
||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -15,6 +15,15 @@ | |||||
|
||||||
package xlang | ||||||
|
||||||
// beam-playground: | ||||||
// name: XLangTest | ||||||
// description: Unit-test for the XLang example. | ||||||
// multifile: false | ||||||
// pipeline_options: | ||||||
// categories: | ||||||
// - Combiners | ||||||
// - Testing | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't understand why it is displayed like this, but in the code it is correct. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's remove this file as well, it's hard to understand and it also seems like not related to Playground users |
||||||
|
||||||
import ( | ||||||
"fmt" | ||||||
"reflect" | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,14 @@ | |
*/ | ||
package org.apache.beam.sdk.io; | ||
|
||
// beam-playground: | ||
// name: FileBasedSourceTest | ||
// description: Unit-test for the FileBasedSource example. | ||
// multifile: false | ||
// pipeline_options: | ||
// categories: | ||
// - IO | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's remove this file, it tests Beam internals |
||
import static org.apache.beam.sdk.testing.SourceTestUtils.assertSplitAtFractionExhaustive; | ||
import static org.apache.beam.sdk.testing.SourceTestUtils.assertSplitAtFractionFails; | ||
import static org.apache.beam.sdk.testing.SourceTestUtils.assertSplitAtFractionSucceedsAndConsistent; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,14 @@ | |
*/ | ||
package org.apache.beam.sdk.schemas.transforms; | ||
|
||
// beam-playground: | ||
// name: ConvertTest | ||
// description: Unit-test for the Convert example. | ||
// multifile: false | ||
// pipeline_options: | ||
// categories: | ||
// - Schemas | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's remove this file, it tests Beam internals |
||
import java.util.Arrays; | ||
import java.util.Map; | ||
import java.util.Objects; | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -17,6 +17,14 @@ | |||||
*/ | ||||||
package org.apache.beam.sdk.testing; | ||||||
|
||||||
// beam-playground: | ||||||
// name: TestStreamTest | ||||||
// description: Unit-test for the TestStream example. | ||||||
// multifile: false | ||||||
// pipeline_options: | ||||||
// categories: | ||||||
// - Testing | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
import static org.apache.beam.sdk.transforms.windowing.Window.into; | ||||||
import static org.hamcrest.MatcherAssert.assertThat; | ||||||
import static org.hamcrest.Matchers.allOf; | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,15 @@ | |
*/ | ||
package org.apache.beam.sdk.transforms.windowing; | ||
|
||
// beam-playground: | ||
// name: WindowingTest | ||
// description: Unit-test for the Windowing kata. | ||
// multifile: false | ||
// pipeline_options: | ||
// categories: | ||
// - Windowing | ||
// - Streaming | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's remove this file, it tests Beam internals |
||
import java.io.File; | ||
import java.io.FileOutputStream; | ||
import java.io.PrintStream; | ||
|
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -19,6 +19,14 @@ | |||||||
|
||||||||
# pytype: skip-file | ||||||||
|
||||||||
# beam-playground: | ||||||||
# name: StreamingWordCountITTest | ||||||||
# description: Unit-test for the streaming WordCount example. | ||||||||
# multifile: false | ||||||||
# pipeline_options: | ||||||||
# categories: | ||||||||
# - Streaming | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
|
||||||||
import logging | ||||||||
import unittest | ||||||||
import uuid | ||||||||
|
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -19,6 +19,14 @@ | |||||||
|
||||||||
# pytype: skip-file | ||||||||
|
||||||||
# beam-playground: | ||||||||
# name: WordCountMinimalTest | ||||||||
# description: Unit-test for the minimal WordCount example. | ||||||||
# multifile: false | ||||||||
# pipeline_options: | ||||||||
# categories: | ||||||||
# - IO | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
|
||||||||
import collections | ||||||||
import logging | ||||||||
import re | ||||||||
|
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -20,6 +20,14 @@ | |||||||
|
||||||||
# pytype: skip-file | ||||||||
|
||||||||
# beam-playground: | ||||||||
# name: WordCountTest | ||||||||
# description: Unit-test for the WordCount example. | ||||||||
# multifile: false | ||||||||
# pipeline_options: | ||||||||
# categories: | ||||||||
# - IO | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
|
||||||||
import collections | ||||||||
import logging | ||||||||
import re | ||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,14 @@ | |
|
||
# pytype: skip-file | ||
|
||
# beam-playground: | ||
# name: FileSystemIOTest | ||
# description: Unit-test for the FileSystemIO example. | ||
# multifile: false | ||
# pipeline_options: | ||
# categories: | ||
# - IO | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's remove this file, it tests Beam internals |
||
import io | ||
import logging | ||
import multiprocessing | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -17,6 +17,14 @@ | |||||
|
||||||
# pytype: skip-file | ||||||
|
||||||
# beam-playground: | ||||||
# name: MetricTest | ||||||
# description: Unit-test for the Metric example. | ||||||
# multifile: false | ||||||
# pipeline_options: | ||||||
# categories: | ||||||
# - Metrics | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ditto |
||||||
|
||||||
import unittest | ||||||
|
||||||
import hamcrest as hc | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.