# test name
name: "region_available"
creator: "jinpeng"
# type is the type of the test, supported type: prepare / test
# we will run the prepare tests before all test tests
type: "test"
tags:
  - available

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: |-
    Detect region available under no chaos injection.
    Add shuffle-region-scheduler and shuffle-leader-scheduler for PD, this will trigger region balance
    and leader balance. At the same time, detect if region is available, there must be something wrong
    if the request return too slow.
  # describe the purpose of the parameters and optional values
  parameters: |-
    db: The name of the created database
    pwd: Database password
    table: Table name
    max-resp-dur: Max response duration in seconds
    concurrency: Concurrency of Detector
    sleep-dur: sleep duration between two queries in milliseconds
    run-mode: case mode, support values online / dev, default value online
  # notes is to list all matters which need to be noted
  # eg: the special requirements of the test environment
  notes: |-
    If the request's response time exceed max-resp-dur, the region available test will fail to run.
    At least 4 TiKV nodes are required, because we expect to trigger region balance.
