Skip to content

Commit

Permalink
skip experiment tests when env RUN_EXPERIMENTAL_TEST="false" is set
Browse files Browse the repository at this point in the history
  • Loading branch information
widmogrod committed Jan 8, 2024
1 parent c5160c6 commit 539b5ee
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:

# run tests
- run: |
export RUN_EXPERIMENTAL_TEST="false"
set -e
retries=3
until [ $retries -le 0 ]; do
Expand Down
13 changes: 13 additions & 0 deletions x/storage/schemaless/projection/triggering_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,18 @@ import (
"github.com/stretchr/testify/assert"
"github.com/widmogrod/mkunion/x/schema"
"math"
"os"
"testing"
"time"
)

func TestTriggers(t *testing.T) {
if os.Getenv("RUN_EXPERIMENTAL_TEST") == "false" {
t.Skip(`Skipping test because:
- RUN_EXPERIMENTAL_TEST=false is set.
`)
}

useCases := map[string]struct {
td TriggerDescription
wd WindowDescription
Expand Down Expand Up @@ -159,6 +166,12 @@ func TestTriggers(t *testing.T) {
}

func TestAggregate(t *testing.T) {
if os.Getenv("RUN_EXPERIMENTAL_TEST") == "false" {
t.Skip(`Skipping test because:
- RUN_EXPERIMENTAL_TEST=false is set.
`)
}

// arithmetic sum of series 0..9, 10..19, 0 .. 19
// 45, 145, 190
useCases := map[string]struct {
Expand Down
25 changes: 25 additions & 0 deletions x/storage/schemaless/projection/windowing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"
"github.com/stretchr/testify/assert"
"github.com/widmogrod/mkunion/x/schema"
"os"
"testing"
"time"
)
Expand All @@ -22,6 +23,12 @@ func printWindow(w *Window) {
}

func TestWindowing(t *testing.T) {
if os.Getenv("RUN_EXPERIMENTAL_TEST") == "false" {
t.Skip(`Skipping test because:
- RUN_EXPERIMENTAL_TEST=false is set.
`)
}

list := []Item{
{
Key: "a",
Expand Down Expand Up @@ -144,6 +151,12 @@ func TestWindowing(t *testing.T) {
}

func TestMergeWindows(t *testing.T) {
if os.Getenv("RUN_EXPERIMENTAL_TEST") == "false" {
t.Skip(`Skipping test because:
- RUN_EXPERIMENTAL_TEST=false is set.
`)
}

list := []Item{
{
Key: "k1",
Expand Down Expand Up @@ -412,6 +425,12 @@ func TestMergeWindows(t *testing.T) {
}

func TestWindowMerginOnly(t *testing.T) {
if os.Getenv("RUN_EXPERIMENTAL_TEST") == "false" {
t.Skip(`Skipping test because:
- RUN_EXPERIMENTAL_TEST=false is set.
`)
}

list := []ItemGroupedByKey{
{
Key: "k1",
Expand Down Expand Up @@ -703,6 +722,12 @@ type triggerCase struct {
}

func TestWindowTrigger(t *testing.T) {
if os.Getenv("RUN_EXPERIMENTAL_TEST") == "false" {
t.Skip(`Skipping test because:
- RUN_EXPERIMENTAL_TEST=false is set.
`)
}

useCases := map[string]struct {
w *Window
td TriggerDescription
Expand Down

0 comments on commit 539b5ee

Please sign in to comment.