-
Notifications
You must be signed in to change notification settings - Fork 11
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
CC-1299: Implement Transactions extension stages #154
Commits on Jun 13, 2024
-
feat: add tests for stages 1 - 3
Use MultiCommandTestCase for testTxIncr1, testTxIncr2, and testTxIncr3
Configuration menu - View commit details
-
Copy full SHA for fecf766 - Browse repository at this point
Copy the full SHA fecf766View commit details -
feat: Add testTxMulti function to internal package
This commit adds the testTxMulti function to the internal package. The function sets up a Redis executable and creates an instrumented RESP connection. It then runs a command test case using the MULTI command with no arguments, asserting that the response is "OK".
Configuration menu - View commit details
-
Copy full SHA for fb6e805 - Browse repository at this point
Copy the full SHA fb6e805View commit details -
feat: Add testTxEmpty function to internal package
This commit adds the testTxEmpty function to the internal package. The function tests an empty transaction by running a Redis executable and executing various test cases. It includes assertions for error handling and ensures that the EXEC command without MULTI returns an error.
Configuration menu - View commit details
-
Copy full SHA for 11c4a5c - Browse repository at this point
Copy the full SHA 11c4a5cView commit details -
feat: Add testTxQueue function for testing transaction queue
This commit adds the `testTxQueue` function to the internal package. The function sets up a Redis executable and creates two instrumented RESP connections. It then runs a transaction test case, followed by a command test case. This new function will be used for testing the transaction queue functionality.
Configuration menu - View commit details
-
Copy full SHA for 2c4393a - Browse repository at this point
Copy the full SHA 2c4393aView commit details -
This commit adds the `testTxExec` function to the internal package. The function sets up a Redis executable, creates an instrumented RESP connection, and runs a test case for the `EXEC` command.
Configuration menu - View commit details
-
Copy full SHA for 2003c23 - Browse repository at this point
Copy the full SHA 2003c23View commit details -
Configuration menu - View commit details
-
Copy full SHA for c1e381f - Browse repository at this point
Copy the full SHA c1e381fView commit details -
feat: Add multiple clients to testTxErr, testTxSuccess, and testTxDis…
…card - Added support for multiple clients in the functions `testTxErr`, `testTxSuccess`, and `testTxDiscard`. - Each client is created with a unique name using the format "client-{index+1}". - The clients are stored in an array for later use. - The clients are closed using the `Close` method before returning from the function.
Configuration menu - View commit details
-
Copy full SHA for a5de8c0 - Browse repository at this point
Copy the full SHA a5de8c0View commit details -
feat: Add
spawnClients
functionThis commit adds the `spawnClients` function. The `spawnClients` function is responsible for creating a specified number of client connections to a given address. It takes in the number of clients, address, stage harness, and logger as parameters. The function creates the clients and appends them to a slice before returning it. This new function is used in multiple places throughout the codebase to create client connections.
Configuration menu - View commit details
-
Copy full SHA for 983add3 - Browse repository at this point
Copy the full SHA 983add3View commit details -
feat: Update function name and add documentation for spawning clients
- Renamed the `spawnClients` function to `SpawnClients` - Added documentation for the `SpawnClients` function, explaining its purpose and usage - The `SpawnClients` function creates multiple clients connected to a given address using the `instrumented_resp_connection.NewFromAddr` function - Clients are expected to be closed after use
Configuration menu - View commit details
-
Copy full SHA for 035058f - Browse repository at this point
Copy the full SHA 035058fView commit details -
feat: update tester_definition with new test cases for transactions
This commit adds new test cases for transaction functionality. The added test cases cover various stages of transactions, including INCR, MULTI, EXEC, and more. These tests ensure that the transaction functionality is working as expected. - Added new test cases for transaction functionality - Covered stages such as INCR-1, INCR-2, INCR-3, MULTI, EXEC, Empty Transaction, Queueing Commands - Ensured proper execution and handling of failed transactions
Configuration menu - View commit details
-
Copy full SHA for b0e7962 - Browse repository at this point
Copy the full SHA b0e7962View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0bd8bac - Browse repository at this point
Copy the full SHA 0bd8bacView commit details -
refactor: Rename test stages from numbered stages to named stages
This commit renames several files in the internal directory for better clarity and organization. The changes include renaming `test_txn_9.go` to `test_txn_discard.go`, `test_txn_11.go` to `test_txn_multi_tx.go`, `test_txn_8.go` to `test_txn_tx.go`, and `test_txn_10.go` to `test_txn_tx_failure.go`. These file name updates improve the readability and maintainability of the codebase.
Configuration menu - View commit details
-
Copy full SHA for 28be476 - Browse repository at this point
Copy the full SHA 28be476View commit details -
refactor: improve transaction test cases
- Skip execution of transaction commands - Use `RunAll` instead of `RunMulti` and `RunQueueAll` - Update result array for each transaction command
Configuration menu - View commit details
-
Copy full SHA for a3957c1 - Browse repository at this point
Copy the full SHA a3957c1View commit details -
Configuration menu - View commit details
-
Copy full SHA for f2c6762 - Browse repository at this point
Copy the full SHA f2c6762View commit details -
feat: Add support for Transactions extension
This commit adds the "Transactions" extension to the Redis implementation. It includes the implementation of commands such as MULTI, EXEC, DISCARD, and handling failures within transactions. The extension also introduces stages for implementing the INCR command in multiple steps.
Configuration menu - View commit details
-
Copy full SHA for a764c12 - Browse repository at this point
Copy the full SHA a764c12View commit details
Commits on Jun 14, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 7b04ff9 - Browse repository at this point
Copy the full SHA 7b04ff9View commit details -
feat: Refactor transaction test cases
- Removed the ShouldSkipExec flag from the TransactionTestCase struct - Renamed the RunAll method to RunWithoutExec in the TransactionTestCase struct - Updated test_txn_discard.go, test_txn_multi.go, test_txn_multi_tx.go, and test_txn_queue.go to use the RunWithoutExec method instead of RunAll
Configuration menu - View commit details
-
Copy full SHA for 715817c - Browse repository at this point
Copy the full SHA 715817cView commit details -
feat: add randomness to test case for transaction failure
This commit adds a new test case to the `testTxErr` function in `internal/test_txn_tx_failure.go`. The test case includes commands to set random values for two keys, and then increment those values within a transaction. The expected result is an error value indicating that the value is not an integer or out of range, followed by the incremented value. After running the transaction, there are assertions to check if the values were updated correctly. The purpose of this change is to ensure that transactions handle errors properly and provide accurate results when dealing with non-integer values.
Configuration menu - View commit details
-
Copy full SHA for 571cdf7 - Browse repository at this point
Copy the full SHA 571cdf7View commit details -
feat: add randomness to test case for transaction success
This commit adds a new transaction test case to the `testTxSuccess` function in `internal/test_txn_tx.go`. The test case includes commands for setting random keys with random integer values, incrementing the values, and retrieving them. The expected results are updated accordingly. Additionally, a command test case is added to verify the final value of one of the keys.
Configuration menu - View commit details
-
Copy full SHA for a37aa7b - Browse repository at this point
Copy the full SHA a37aa7bView commit details -
feat: add random key generation for INCR test cases
This commit adds the functionality to generate random keys for test cases in `test_txn_incr1.go`, `test_txn_incr2.go`, and `test_txn_incr3.go`. The generated keys are used in the `SET` and `INCR` commands. This change improves the flexibility and randomness of the test cases.
Configuration menu - View commit details
-
Copy full SHA for af87ab5 - Browse repository at this point
Copy the full SHA af87ab5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4bf9120 - Browse repository at this point
Copy the full SHA 4bf9120View commit details -
feat: Add randomness to test cases for transaction discard
This commit adds new test cases to the `testTxDiscard` function in `internal/test_txn_discard.go`. The changes include: - Importing the `fmt` package - Generating unique keys using the `random.RandomWords` function - Generating random integers using the `random.RandomInt` function - Modifying the command arguments to use the generated keys and random integers - Updating assertions to use the generated values These changes enhance the test coverage for transaction discards.
Configuration menu - View commit details
-
Copy full SHA for 63b9b01 - Browse repository at this point
Copy the full SHA 63b9b01View commit details -
feat: add randomness to concurrent txn test
- In test_txn_discard, changed the number of uniqueKeys generated from 3 to 2. - In test_txn_multi_tx, updated the commands to set key2 with a random integer value and increment key1. - Also added a comment explaining the expected result in each transaction. - In test_txn_queue, updated the command to set a random key with a random integer value and increment it.
Configuration menu - View commit details
-
Copy full SHA for 263a9cb - Browse repository at this point
Copy the full SHA 263a9cbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3f032d4 - Browse repository at this point
Copy the full SHA 3f032d4View commit details