Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
X
xxdk-wasm
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elixxir
xxdk-wasm
Commits
57479849
"network/server-2.yaml" did not exist on "19fa049f99ba3d8ec109edd6542a2fcf39c1c7b5"
Commit
57479849
authored
1 year ago
by
Richard T. Carback III
Browse files
Options
Downloads
Patches
Plain Diff
Fix tests causing occasional crashing
parent
c5244ef8
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
worker/messageManager_test.go
+9
-2
9 additions, 2 deletions
worker/messageManager_test.go
with
9 additions
and
2 deletions
worker/messageManager_test.go
+
9
−
2
View file @
57479849
...
...
@@ -11,13 +11,14 @@ package worker
import
(
"encoding/json"
"github.com/hack-pad/safejs"
"gitlab.com/elixxir/wasm-utils/utils"
"reflect"
"strconv"
"syscall/js"
"testing"
"time"
"github.com/hack-pad/safejs"
"gitlab.com/elixxir/wasm-utils/utils"
)
func
TestNewMessageManager
(
t
*
testing
.
T
)
{
...
...
@@ -106,6 +107,8 @@ func TestMessageManager_processReceivedMessage(t *testing.T) {
if
err
!=
nil
{
t
.
Errorf
(
"Failed to receive message: %+v"
,
err
)
}
time
.
Sleep
(
15
*
time
.
Millisecond
)
}
// Tests MessageManager.processReceivedPort calls the expected callback.
...
...
@@ -149,6 +152,7 @@ func TestMessageManager_processReceivedPort(t *testing.T) {
if
err
!=
nil
{
t
.
Errorf
(
"Failed to receive message: %+v"
,
err
)
}
time
.
Sleep
(
15
*
time
.
Millisecond
)
}
// Tests that MessageManager.RegisterCallback registers a callback that is then
...
...
@@ -178,6 +182,7 @@ func TestMessageManager_RegisterCallback(t *testing.T) {
if
err
!=
nil
{
t
.
Errorf
(
"Failed to receive message: %+v"
,
err
)
}
time
.
Sleep
(
15
*
time
.
Millisecond
)
}
// Tests MessageManager.getReceiverCallback returns the expected callback.
...
...
@@ -232,6 +237,7 @@ func TestMessageManager_registerSenderCallback(t *testing.T) {
if
err
!=
nil
{
t
.
Errorf
(
"Failed to receive message: %+v"
,
err
)
}
time
.
Sleep
(
15
*
time
.
Millisecond
)
}
// Tests MessageManager.getSenderCallback returns the expected callback and
...
...
@@ -317,6 +323,7 @@ func TestMessageManager_RegisterMessageChannelCallback(t *testing.T) {
if
err
!=
nil
{
t
.
Errorf
(
"Failed to receive message: %+v"
,
err
)
}
time
.
Sleep
(
15
*
time
.
Millisecond
)
}
func
TestMessageManager_Stop
(
t
*
testing
.
T
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment