1
0
Fork 0

231 Commits (3f15a89a1dccb2323d810685986132715f1e280f)

Author SHA1 Message Date
Philip O'Toole e6b703a0c0 Remove ability to trigger chunked-loading
The low-level Raft system still recognizes the Chunk command, so that
this system can interop with older versions, which might still have a
Chunk command in logs.
9 months ago
Philip O'Toole cc4addf7e0 Noop() returns ApplyFuture 9 months ago
Philip O'Toole 6fdd454632 Introduce explicit FSM type
This will make the code cleaner, and help clean up un-closed file
handles.
9 months ago
Philip O'Toole e0c6861ca8 Improve test 10 months ago
Philip O'Toole e6ddf27072 Unit test sync between chunked loading and Snapshotting 10 months ago
Philip O'Toole 59e928d058 Remove superfluous blank line 10 months ago
Philip O'Toole 1f1ebf209f Don't delete last log 10 months ago
Philip O'Toole 97e9b14bdf Fix race during testing 10 months ago
Philip O'Toole 8adc11fb83 Snapshot in a goroutine 10 months ago
Philip O'Toole 4b272d04f1 Better use of counters in testing 10 months ago
Philip O'Toole c39d3472bc Check snapshot occurs at unit level 10 months ago
Philip O'Toole c93447e29f Delete chunked load entries in log after loading 10 months ago
Philip O'Toole 0dcc67f6f1 Perform full snapshot after chunked load
This must happen as chunked loading directly changes the SQLite file,
invalidating any existing Snapshots. Also, add missing unit tests for
chunked loading.
10 months ago
Philip O'Toole dfb8a60c17 Move Store Provide to a distinct type 10 months ago
Philip O'Toole 5b4ff9b8ce Fix test code 1 year ago
Philip O'Toole 1a24557c19 Merge remote-tracking branch 'origin' into wal-snapshot-store-v3 1 year ago
Philip O'Toole 208fc20659 Fix more uses of random 1 year ago
Philip O'Toole 54713b63f4 Merge remote-tracking branch 'origin' into wal-snapshot-store-v3 1 year ago
Philip O'Toole c51b8364e8 Fix import path 1 year ago
Philip O'Toole c1a8b4a13a Use global, sync'ed random source
Almost unbelievably it appears tests on AppVeyor get the same value when
seeding the random generator. See https://ci.appveyor.com/project/otoolep/rqlite/builds/47853399
1 year ago
Philip O'Toole c6e214de1a Remember store attributes 1 year ago
Philip O'Toole a9e895bee2 Some cleanups 1 year ago
Philip O'Toole ea8dc3ed18 More test fix-up post removal of in-memory 1 year ago
Philip O'Toole 6895525482 Rename some tests 1 year ago
Philip O'Toole aa72408bc5 Remove racy use of rand 1 year ago
Philip O'Toole b931e387be First pass at removing in-memory support 1 year ago
Philip O'Toole 23b8b6e5c9 Actually rename 1 year ago
Philip O'Toole e4a0d96f23 Further refactoring 1 year ago
Philip O'Toole 6c7c32ab4e Remove racy test code 1 year ago
Philip O'Toole aed541b98e Poll nodes 1 year ago
Philip O'Toole 8a8e126061 Use some loops 1 year ago
Philip O'Toole ef42d28e36 Refactor and log more during test
https://ci.appveyor.com/project/otoolep/rqlite/builds/47107026 - this
looks racy, as the Leader had been detected, but the config not yet
applied. Leave for now and see if more info can be gathered. This may be
happening because WaitForLeader() has a fast path now.
1 year ago
Philip O'Toole 1b299b7e9b Tigher logic 1 year ago
Philip O'Toole 9faea33da7 Give time for new leader to be elected 1 year ago
Philip O'Toole 498cc39925 Fix Store unit tests 1 year ago
Philip O'Toole 562b1de03b Multi-node testing of WaitForRemoval() 1 year ago
Philip O'Toole 94dbff6851 Unit test WaitForRemoval() on Store 1 year ago
Philip O'Toole c23d3e60b1 Reuse existing consistency level 1 year ago
Philip O'Toole ee01569f53 Request Freshness testing 1 year ago
Philip O'Toole 2186fa0c66 Merge branch 'master' of github.com:rqlite/rqlite 1 year ago
Philip O'Toole c40303b6ae Fix test error message 1 year ago
Philip O'Toole ddea64ebe0 Fix Store tests 1 year ago
Philip O'Toole 3058d3e9fc Fix transaction handling in db.Request() 1 year ago
Philip O'Toole c995986630 Add parameter tests 1 year ago
Philip O'Toole 061ba8eed5 Add Request Tx unit test 1 year ago
Philip O'Toole 2261cb30c9 First unit test of Store.Request() 1 year ago
Philip O'Toole e171b2e725 Unit test RequiresLeader 1 year ago
Philip O'Toole 42fd612cf3 Better auto-restore counts compare 1 year ago
Philip O'Toole ee55a35c03 SetRestorePath unit testing 1 year ago
Philip O'Toole 88fe7e6847 ResetStats for this test 1 year ago
Philip O'Toole e7919a906f Avoid the race during testing 1 year ago
Philip O'Toole 7c88b93979 Fix race during testing 1 year ago
Philip O'Toole 31467482a3 Store-level multi-node auto-restore testing
This test ensures that auto-restoring works as expected when
Bootstrapping is enabled.
1 year ago
Philip O'Toole bf1e1cb1cd Add first tested version of Store auto-restore 1 year ago
Philip O'Toole 716f84ff28 Store supports registering "ready" channels 1 year ago
Philip O'Toole 372e4dd4a9 Store implements simpler Provide() interface 1 year ago
Philip O'Toole 102869eb6d Unit test Provide() on the Store 1 year ago
Philip O'Toole 1794724ef0 Remove unused code and fix error handling 1 year ago
Philip O'Toole ff001bc5a8 Migrate to a Protos data model for Notify Requests 2 years ago
Philip O'Toole a782513a11 Migrate to a join-request proto 2 years ago
Philip O'Toole 5636febf9a Add IsVoter() and add to status/ output 2 years ago
Philip O'Toole 90b4dc0745 Silently ignore unchanged node self-joins 2 years ago
Philip O'Toole 4131cdb743 Unit test stepdown on shutdown 2 years ago
Philip O'Toole 98575d727b Start adding remote remove node
More testing, including unit testing, required.
2 years ago
Philip O'Toole e74bfc182a Use new Encoder everywhere 2 years ago
Philip O'Toole edec152ec9 Fix Store unit test 2 years ago
Philip O'Toole e158ae8a72 Start HTTP server ASAP 2 years ago
Eng Zer Jun da103c9b3e
test: fix failing Test_OpenStoreSingleNode on Windows
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2 years ago
Eng Zer Jun 6444926be7
test: fix failing Test_SingleNodeSnapshotInMem on Windows
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2 years ago
Eng Zer Jun 6969165330
test: fix failing Test_SingleNodeSnapshotOnDisk on Windows
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2 years ago
Eng Zer Jun 5141eff5fc
test: use `T.TempDir` to create temporary test directory
This commit replaces `ioutil.TempDir` with `t.TempDir` in tests. The
directory created by `t.TempDir` is automatically removed when the test
and all its subtests complete.

Prior to this commit, temporary directory created using `ioutil.TempDir`
needs to be removed manually by calling `os.RemoveAll`, which is omitted
in some tests. The error handling boilerplate e.g.
	defer func() {
		if err := os.RemoveAll(dir); err != nil {
			t.Fatal(err)
		}
	}
is also tedious, but `t.TempDir` handles this for us nicely.

Reference: https://pkg.go.dev/testing#T.TempDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2 years ago
Philip O'Toole 47d79c859a Log database backup time 2 years ago
Philip O'Toole 31bba4c577 Move to Backup proto model 2 years ago
Philip O'Toole 67a6042afb More style changes 2 years ago
Philip O'Toole 7bfc7afef0 Minor style changes to test logic 2 years ago
Abirdcfly 1b033f3b58 fix minor unreachable code caused by t.Fatal
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
2 years ago
Philip O'Toole 9dbf590634 Better unit test 2 years ago
Philip O'Toole dc2b9f5b6f Ignore freshness when serving queries on Leader
It doesn't make sense to check the last leader-contact time when the
node itself is the leader. Any read, when served by the leader, is going
to be within the freshness bound.

Fixes https://github.com/rqlite/rqlite/issues/1048
2 years ago
Philip O'Toole da8d4fcbe9 Unit test that pre-existing data is gone 2 years ago
Philip O'Toole 89b132ac26 Fix Store-level unit tests 2 years ago
Philip O'Toole 9783ef24b1 Switch to error on self-join attempt 3 years ago
Philip O'Toole e4fed0cee3
Add bootstrap-expect (#974)
Add cluster-boostrap
3 years ago
Philip O'Toole 4aea326959
Consul and etcd autoclustering (#957)
This PR introduces new node-discovery integration with Consul and etcd. By using one of those systems with rqlite, automatic clustering of rqlite is much easier.
3 years ago
Philip O'Toole 63b7d24814 Init rand seed once at Store level 3 years ago
Philip O'Toole 24a5dc8c4b Much better random file names 3 years ago
Philip O'Toole 58adcb87c9 Fix Store unit tests 3 years ago
Philip O'Toole f3a9b79b34 Close obsolete Listeners during Store testing 3 years ago
Philip O'Toole 05534cc94c Don't use Windows file paths as IDs 3 years ago
Philip O'Toole 7093cb25d3 Fix race in test 3 years ago
Philip O'Toole 9fb114c07f Recover test after snapshot 3 years ago
Philip O'Toole 519a91e635 Actual recovery node test passes on Linux 3 years ago
Philip O'Toole f9bcde0722 Back to no-change test 3 years ago
Philip O'Toole e2e199633a
Fix JSON string in unit test 3 years ago
Philip O'Toole c111df7ed5 Simpler node-recovery test 3 years ago
Philip O'Toole 92d5bc8b64 Unit test fixes (?) 3 years ago
Philip O'Toole 1b158d09fb Simple unit test of node-recovery 3 years ago
Philip O'Toole dd71c07c73 ABL 3 years ago
Philip O'Toole 00f4c6bc35 Wait, or timeout, for LeaderID to be set
Address https://ci.appveyor.com/project/otoolep/rqlite/builds/40607771
failures.
3 years ago
Philip O'Toole 5c63ff9bff Check for WaitForLeader errors 3 years ago
Philip O'Toole c9fdd7d05d Ensure SQLite file was actually created 3 years ago