aboutsummaryrefslogtreecommitdiffstats
path: root/integration_test/stats_test.go
diff options
context:
space:
mode:
authorMission Liao <mission.liao@dexon.org>2018-09-10 16:11:10 +0800
committerGitHub <noreply@github.com>2018-09-10 16:11:10 +0800
commit2439f49063d8498eadf26d4fa1220c5eac8412a8 (patch)
tree1142ad5a5e4393315f956324191ddb7e03b804c3 /integration_test/stats_test.go
parent2b5c97e53e9734dda971456ff483bf2b34f0f021 (diff)
downloaddexon-consensus-2439f49063d8498eadf26d4fa1220c5eac8412a8.tar
dexon-consensus-2439f49063d8498eadf26d4fa1220c5eac8412a8.tar.gz
dexon-consensus-2439f49063d8498eadf26d4fa1220c5eac8412a8.tar.bz2
dexon-consensus-2439f49063d8498eadf26d4fa1220c5eac8412a8.tar.lz
dexon-consensus-2439f49063d8498eadf26d4fa1220c5eac8412a8.tar.xz
dexon-consensus-2439f49063d8498eadf26d4fa1220c5eac8412a8.tar.zst
dexon-consensus-2439f49063d8498eadf26d4fa1220c5eac8412a8.zip
test: add transport layer (#97)
The purpose of transport layer is to abstract the way to send messages and setup connections between peers in a p2p network. The peer discovery is simulated by a hosted server: every peer sends its address to a known server. Once collecting enough peers, respond the whole peers lists to all peers. Changes: - Add test.Trasnport interface - Add test.Transport implementation by golang channel. - Add test.transport implementation by TCP connection. - Move LatencyModel to core/test package - Add Marshaller interface
Diffstat (limited to 'integration_test/stats_test.go')
-rw-r--r--integration_test/stats_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/integration_test/stats_test.go b/integration_test/stats_test.go
index e0be126..8816e8c 100644
--- a/integration_test/stats_test.go
+++ b/integration_test/stats_test.go
@@ -16,8 +16,8 @@ func (s *EventStatsTestSuite) TestCalculate() {
// Setup a test with fixed latency in proposing and network,
// and make sure the calculated statistics is expected.
var (
- networkLatency = &FixedLatencyModel{Latency: 100}
- proposingLatency = &FixedLatencyModel{Latency: 300}
+ networkLatency = &test.FixedLatencyModel{Latency: 100}
+ proposingLatency = &test.FixedLatencyModel{Latency: 300}
req = s.Require()
)