# test name 
name: "bank2"
creator: "menglong"
# type is the type of the test, supported type: prepare / test
# we will run the prepare tests before all test tests
type: "test"
tags:
  - transaction

environment: 
  # machine resources
  resources:
    limits:
      cpu: 1000m
      memory: 2Gi
    requests:
      cpu: 500m
      memory: 1Gi
  # image is a docker execution image for running test 
  # default image: hub.pingcap.net/schrodinger/agent:latest
  # image: hub.pingcap.net/schrodinger/agent:latest

  # execution arguments
  args: ""

# manual for users 
manual:
  # description is to introduce the test purpose and instructions for this case.
  description: |-
    Simulate the transfer business. 
    There is a system account and many common accounts in the system. When the account is updated, 
    the transfer records are written to the transaction and transaction_leg tables 
    in the same transaction to simulate the stability of a large number of conflicts.
  # describe the purpose of the parameters and optional values
  parameters: |-
    db: the name of the created database
    pw: database password
    accounts: number of accounts
    interval: Send metrics frequency
    concurrency: Concurrency of transfer transactions
    retry-limit: The number of transaction retries, if the accounts are small, the conflict is serious.
    min-value-length: Minimum value length inserted into RocksDB.
    max-value-length: Maximum value length inserted into RocksDB.
    run-mode: case mode, support values online / dev, default value online
    contention: support values high / low. High contention means transfer from or to a fixed system account
    pessimistic: whether to run the test under pessimistic transactions
  # notes is to list all matters which need to be noted
  # eg: the special requirements of the test environment
  notes: |-
    If there is an error, the bank2 will fail to run.
    If you are running in dev mode, you need to set:
      export TIDBS="127.0.0.1:4000"--your local tidb cluster
      export TIDB_SERVICE="127.0.0.1:4000"--your local tidb cluster
