Created
September 19, 2019 21:18
-
-
Save stackdump/21f18940dfad2d8961e4058d41b61061 to your computer and use it in GitHub Desktop.
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
package simtest | |
import ( | |
"testing" | |
"github.com/FactomProject/factomd/engine" | |
. "github.com/FactomProject/factomd/testHelper" | |
) | |
/* | |
*/ | |
func TestMissingData(t *testing.T) { | |
ResetSimHome(t) // clear out old test home | |
state0 := SetupSim("LF", map[string]string{"--debuglog": ".", "--blktime": "15"}, 25, 1, 1, t) | |
WaitForBlock(state0, 2) | |
RunCmd("1") | |
RunCmd("x") // take node1 offline | |
RunCmd("R1") // generate entries | |
WaitForBlock(state0, 12) | |
RunCmd("R0") // stop entries | |
RunCmd("1") // bring node1 online | |
RunCmd("x") | |
state1 := engine.GetFnodes()[1].State // Get new node | |
WaitForBlock(state1, 20) | |
// TODO: improve test to assert missing data was received | |
Halt(t) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment