-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use interpreter runtime in wasm tests (#1746)
* use interpreter runtime in wasm tests * small refactor * remove redundant cleanup
- Loading branch information
1 parent
d6e83ce
commit d370cd5
Showing
3 changed files
with
33 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,21 +32,6 @@ import ( | |
"github.com/matryer/is" | ||
) | ||
|
||
func TestRegistry_List(t *testing.T) { | ||
is := is.New(t) | ||
|
||
underTest, err := NewRegistry(log.Test(t), testPluginChaosDir, schema.NewInMemoryService()) | ||
is.NoErr(err) | ||
list := underTest.List() | ||
is.Equal(1, len(list)) | ||
got, ok := list["standalone:[email protected]"] | ||
is.True(ok) // expected spec for standalone:[email protected] | ||
|
||
want := ChaosProcessorSpecifications() | ||
|
||
is.Equal("", cmp.Diff(got, want)) | ||
} | ||
|
||
func TestRegistry_MalformedProcessor(t *testing.T) { | ||
is := is.New(t) | ||
|
||
|
@@ -105,9 +90,9 @@ func TestRegistry_ChaosProcessor(t *testing.T) { | |
|
||
t.Run("ConcurrentProcessors", func(t *testing.T) { | ||
const ( | ||
// spawn 50 processors, each processing 50 records simultaneously | ||
processorCount = 50 | ||
recordCount = 50 | ||
// spawn 25 processors, each processing 25 records simultaneously | ||
processorCount = 25 | ||
recordCount = 25 | ||
) | ||
|
||
var wg csync.WaitGroup | ||
|
@@ -138,7 +123,7 @@ func TestRegistry_ChaosProcessor(t *testing.T) { | |
is.NoErr(p.Teardown(ctx)) | ||
}(i + 1) | ||
} | ||
err = wg.WaitTimeout(ctx, time.Minute) | ||
err = wg.WaitTimeout(ctx, 2*time.Minute) | ||
is.NoErr(err) | ||
}) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters