Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix timeout of RPC tests on Windows #3165

Merged
merged 1 commit into from Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/protocol.unit_testnet.single.yml
Expand Up @@ -58,7 +58,7 @@ ApplicationConfiguration:
MaxGasInvoke: 15
Enabled: true
Addresses:
- "localhost:0" # let the system choose port dynamically
- "127.0.0.1:0" # let the system choose port dynamically
EnableCORSWorkaround: false
Prometheus:
Enabled: false #since it's not useful for unit tests.
Expand Down
8 changes: 4 additions & 4 deletions config/protocol.unit_testnet.yml
Expand Up @@ -12,9 +12,9 @@ ProtocolConfiguration:
- 02c4de32252c50fa171dbe25379e4e2d55cdc12f69e382c39f59a44573ecff2f9d
ValidatorsCount: 4
SeedList:
- localhost:20334
- localhost:20335
- localhost:20336
- 127.0.0.1:20334
- 127.0.0.1:20335
- 127.0.0.1:20336
VerifyTransactions: true
P2PSigExtensions: true
NativeActivations:
Expand Down Expand Up @@ -62,7 +62,7 @@ ApplicationConfiguration:
MaxGasInvoke: 15
Enabled: true
Addresses:
- "localhost:0" # let the system choose port dynamically
- "127.0.0.1:0" # let the system choose port dynamically
EnableCORSWorkaround: false
SessionEnabled: true
SessionExpirationTime: 2 # enough for tests as they run locally.
Expand Down
4 changes: 2 additions & 2 deletions pkg/network/payload/address_test.go
Expand Up @@ -14,7 +14,7 @@ import (

func TestEncodeDecodeAddress(t *testing.T) {
var (
e, _ = net.ResolveTCPAddr("tcp", "localhost:2000")
e, _ = net.ResolveTCPAddr("tcp", "127.0.0.1:2000")
ts = time.Now()
addr = NewAddressAndTime(e, ts, capability.Capabilities{
{
Expand Down Expand Up @@ -45,7 +45,7 @@ func TestEncodeDecodeAddress(t *testing.T) {

func fillAddressList(al *AddressList) {
for i := 0; i < len(al.Addrs); i++ {
e, _ := net.ResolveTCPAddr("tcp", fmt.Sprintf("localhost:20%d", i))
e, _ := net.ResolveTCPAddr("tcp", fmt.Sprintf("127.0.0.1:20%d", i))
al.Addrs[i] = NewAddressAndTime(e, time.Now(), capability.Capabilities{
{
Type: capability.TCPServer,
Expand Down