We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
在测试用例TestRawScanAfterRawPut1中,RawScanRequest的起始key从put的第一个可以值开始扫描,没有测试从中间某个key开始扫描,因此就导致了有些程序错误而测试用例通过的情况。例如:
The text was updated successfully, but these errors were encountered:
针对以上问题,我添加了如下测试用例:
func TestRawScanStartFromMiddle1(t *testing.T) { conf := config.NewTestConfig() s := standalone_storage.NewStandAloneStorage(conf) s.Start() server := NewServer(s) defer cleanUpTestData(conf) defer s.Stop() cf := engine_util.CfDefault assert.Nil(t, Set(s, cf, []byte{1}, []byte{233, 1})) assert.Nil(t, Set(s, cf, []byte{2}, []byte{233, 2})) assert.Nil(t, Set(s, cf, []byte{3}, []byte{233, 3})) assert.Nil(t, Set(s, cf, []byte{4}, []byte{233, 4})) put := &kvrpcpb.RawPutRequest{ Key: []byte{5}, Value: []byte{233, 5}, Cf: cf, } scan := &kvrpcpb.RawScanRequest{ StartKey: []byte{3}, Limit: 10, Cf: cf, } expectedKeys := [][]byte{{3}, {4}, {5}} _, err := server.RawPut(nil, put) assert.Nil(t, err) resp, err := server.RawScan(nil, scan) assert.Nil(t, err) assert.Equal(t, len(expectedKeys), len(resp.Kvs)) for i, kv := range resp.Kvs { assert.Equal(t, expectedKeys[i], kv.Key) assert.Equal(t, append([]byte{233}, expectedKeys[i]...), kv.Value) } }
Sorry, something went wrong.
Welcome to file a PR to add the test case
@awfeequdng please
No branches or pull requests
在测试用例TestRawScanAfterRawPut1中,RawScanRequest的起始key从put的第一个可以值开始扫描,没有测试从中间某个key开始扫描,因此就导致了有些程序错误而测试用例通过的情况。例如:
The text was updated successfully, but these errors were encountered: