Retry not working for 5xx error in istio 1.4.3

Hi I have following virtual service configured for my test app.
I have configured the retires for 5xx error only.
But this is not working.
Instead of 3 times it retries only once.

apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: test-app
spec:
  gateways:
  - test-app-gateway-public
  - test-app-gateway-private
  hosts:
  - '*'
  http:
  - match:
    - uri:
        prefix: /api/test
    retries:
      attempts: 3
      perTryTimeout: 1s
      retryOn: 5xx
    route:
    - destination:
        host: test-app
        port:
          number: 8080
      weight: 100
    timeout: 1000s