<commit_before>test "GET /initialSync with non-numeric 'limit'",
   requires => [qw( do_request_json expect_http_4xx
                    can_initial_sync )],

   check => sub {
      my ( $do_request_json, $expect_http_4xx ) = @_;

      $do_request_json->(
         method => "GET",
         uri    => "/initialSync",

         params => { limit => "hello" },
      )->$expect_http_4xx;
   };

test "GET /events with non-numeric 'limit'",
   requires => [qw( do_request_json_for user expect_http_4xx
                    can_get_events )],

   check => sub {
      my ( $do_request_json_for, $user, $expect_http_4xx ) = @_;

      $do_request_json_for->( $user,
         method => "GET",
         uri    => "/events",

         params => { from => $user->eventstream_token, limit => "hello" },
      )->$expect_http_4xx;
   };

test "GET /events with non-numeric 'timeout'",
   requires => [qw( do_request_json_for user expect_http_4xx
                    can_get_events )],

   check => sub {
      my ( $do_request_json_for, $user, $expect_http_4xx ) = @_;

      $do_request_json_for->( $user,
         method => "GET",
         uri    => "/events",

         params => { from => $user->eventstream_token, timeout => "hello" },
      )->$expect_http_4xx;
   };
<commit_msg>Perform a torture test on a numeric parameter using a negative value<commit_after>test "GET /initialSync with non-numeric 'limit'",
   requires => [qw( do_request_json expect_http_4xx
                    can_initial_sync )],

   check => sub {
      my ( $do_request_json, $expect_http_4xx ) = @_;

      $do_request_json->(
         method => "GET",
         uri    => "/initialSync",

         params => { limit => "hello" },
      )->$expect_http_4xx;
   };

test "GET /events with non-numeric 'limit'",
   requires => [qw( do_request_json_for user expect_http_4xx
                    can_get_events )],

   check => sub {
      my ( $do_request_json_for, $user, $expect_http_4xx ) = @_;

      $do_request_json_for->( $user,
         method => "GET",
         uri    => "/events",

         params => { from => $user->eventstream_token, limit => "hello" },
      )->$expect_http_4xx;
   };

test "GET /events with negative 'limit'",
   requires => [qw( do_request_json_for user expect_http_4xx
                    can_get_events )],

   check => sub {
      my ( $do_request_json_for, $user, $expect_http_4xx ) = @_;

      $do_request_json_for->( $user,
         method => "GET",
         uri    => "/events",

         params => { from => $user->eventstream_token, limit => -2 },
      )->$expect_http_4xx;
   };

test "GET /events with non-numeric 'timeout'",
   requires => [qw( do_request_json_for user expect_http_4xx
                    can_get_events )],

   check => sub {
      my ( $do_request_json_for, $user, $expect_http_4xx ) = @_;

      $do_request_json_for->( $user,
         method => "GET",
         uri    => "/events",

         params => { from => $user->eventstream_token, timeout => "hello" },
      )->$expect_http_4xx;
   };

{'fraction_non_alphanumeric': 0.1470976253298153, 'fraction_numerical': 0.007255936675461741, 'mean_word_length': 2.2718446601941746, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 69, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2332870', 'n_tokens_mistral': 1019, 'n_tokens_neox': 989, 'n_words': 211}