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

[Consensus] HandleStartConsensusCommand test 문의 #1035

Open
sinramyeon opened this issue Nov 5, 2018 · 1 comment
Open

[Consensus] HandleStartConsensusCommand test 문의 #1035

sinramyeon opened this issue Nov 5, 2018 · 1 comment

Comments

@sinramyeon
Copy link
Collaborator


func TestStartConsensusCommandHandler_HandleStartConsensusCommand(t *testing.T) {
	//mockStateApi := newMockStateApi(nil)
	//testHandler := adapter.NewStartConsensusCommandHandler(mockStateApi)
	//
	//// case 1 : success
	//expectedSeal := []byte{'s', 'e', 'a', 'l'}
	//expectedTxList := []event.Tx{}
	//for i := 0; i < 5; i++ {
	//	expectedTxList = append(expectedTxList, event.Tx{
	//		ID: string(i),
	//	})
	//}
	//
	//expectedCommand := event.BlockCreated{
	//	Seal:   expectedSeal,
	//	TxList: expectedTxList,
	//}
	//
	//testResult, testErr := testHandler.HandleStartConsensusCommand(expectedCommand)
	//
	//assert.True(t, testResult)
	//assert.Equal(t, "", testErr.Message)
	//
	//// case 2 : consensus on error
	//consensusStartError := errors.New("on consensus failed!")
	//mockStateApi = newMockStateApi(consensusStartError)
	//testHandler = adapter.NewStartConsensusCommandHandler(mockStateApi)
	//
	//testResult, testErr = testHandler.HandleStartConsensusCommand(expectedCommand)
	//
	//assert.False(t, testResult)
	//assert.Equal(t, consensusStartError.Error(), testErr.Message)
}

consensus 쪽의 TestStartConsensusCommandHandler_HandleStartConsensusCommand 테스트 함수 처리가 주석 되어 있는데 어떤 이유가 있는 건가요??

@hea9549
Copy link
Member

hea9549 commented Nov 14, 2018

@hihiboss

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants