Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
duniter
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nodes
typescript
duniter
Commits
1fce4ed0
Commit
1fce4ed0
authored
7 years ago
by
Cédric Moreau
Browse files
Options
Downloads
Patches
Plain Diff
[fix] Make tests pass since initial peersignal is delayed
parent
49c4011f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/integration/tools/node.js
+3
-1
3 additions, 1 deletion
test/integration/tools/node.js
test/integration/tools/toolbox.ts
+4
-3
4 additions, 3 deletions
test/integration/tools/toolbox.ts
with
7 additions
and
4 deletions
test/integration/tools/node.js
+
3
−
1
View file @
1fce4ed0
...
@@ -131,7 +131,9 @@ function Node (dbName, options) {
...
@@ -131,7 +131,9 @@ function Node (dbName, options) {
// Launching server
// Launching server
that
.
server
=
server
;
that
.
server
=
server
;
started
=
true
;
started
=
true
;
next
();
server
.
PeeringService
.
generateSelfPeer
(
server
.
conf
,
0
)
.
then
(()
=>
next
())
.
catch
(
next
)
},
},
function
(
next
)
{
function
(
next
)
{
that
.
http
=
contacter
(
options
.
remoteipv4
,
options
.
remoteport
);
that
.
http
=
contacter
(
options
.
remoteipv4
,
options
.
remoteport
);
...
...
This diff is collapsed.
Click to expand it.
test/integration/tools/toolbox.ts
+
4
−
3
View file @
1fce4ed0
...
@@ -674,11 +674,12 @@ export const simpleWS2PNetwork: (s1: TestingServer, s2: TestingServer) => Promis
...
@@ -674,11 +674,12 @@ export const simpleWS2PNetwork: (s1: TestingServer, s2: TestingServer) => Promis
const
cluster1
=
WS2PCluster
.
plugOn
(
s1
.
_server
)
const
cluster1
=
WS2PCluster
.
plugOn
(
s1
.
_server
)
const
cluster2
=
WS2PCluster
.
plugOn
(
s2
.
_server
)
const
cluster2
=
WS2PCluster
.
plugOn
(
s2
.
_server
)
const
ws2ps
=
await
cluster1
.
listen
(
'
localhost
'
,
port
)
const
ws2ps
=
await
cluster1
.
listen
(
'
localhost
'
,
port
)
const
ws2pc
=
await
cluster2
.
connect
(
'
localhost
'
,
port
,
new
WS2PServerMessageHandler
(
s2
.
_server
,
cluster2
),
s1
.
_server
.
conf
.
pair
.
pub
)
const
connexionPromise
=
new
Promise
(
res
=>
{
await
new
Promise
(
res
=>
{
ws2ps
.
on
(
'
newConnection
'
,
res
)
ws2ps
.
on
(
'
newConnection
'
,
res
)
})
})
const
ws2pc
=
await
cluster2
.
connect
(
'
localhost
'
,
port
,
new
WS2PServerMessageHandler
(
s2
.
_server
,
cluster2
),
s1
.
_server
.
conf
.
pair
.
pub
)
await
connexionPromise
w1
=
await
ws2ps
.
getConnection
(
clientPub
)
w1
=
await
ws2ps
.
getConnection
(
clientPub
)
if
(
!
w1
)
{
if
(
!
w1
)
{
throw
"
Connection coming from
"
+
clientPub
+
"
was not found
"
throw
"
Connection coming from
"
+
clientPub
+
"
was not found
"
...
...
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