<commit_before>Test = require('connecttest')
require('cardinalities')
local events = require('events')
local mobile_session = require('mobile_session')
local config = require('config')

function Test:WaitActivation()
  description("Waiting for notification")
  EXPECT_NOTIFICATION("OnHMIStatus")
    :Times(0)
  local rid = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications["Test Application"]})
  EXPECT_HMIRESPONSE(rid)
  self.mobileSession:ExpectEvent(events.disconnectedEvent, "Connection started")
    :Pin()
    :Times(AnyNumber())
    :Do(function()
          print("Disconnected!!!")
          quit()
        end)
end

function Test:DelayedExp()
  local event = events.Event()
  event.matches = function(self, e) return self == e end
  EXPECT_EVENT(event, "Delayed event")
  RUN_AFTER(function()
              RAISE_EVENT(event, event)
            end, 2000)<commit_msg>sample.lua fixed<commit_after>Test = require('connecttest')
require('cardinalities')
local events = require('events')
local mobile_session = require('mobile_session')
local config = require('config')

function Test:WaitActivation()
  description("Waiting for notification")
  critical(true)
  EXPECT_NOTIFICATION("OnHMIStatus")
  local rid = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications["Test Application"]})
  EXPECT_HMIRESPONSE(rid)
  self.mobileSession:ExpectEvent(events.disconnectedEvent, "Connection started")
    :Pin()
    :Times(AnyNumber())
    :Do(function()
          print("Disconnected!!!")
          quit()
        end)
end

function Test:DelayedExp()
  local event = events.Event()
  event.matches = function(self, e) return self == e end
  EXPECT_EVENT(event, "Delayed event")
  RUN_AFTER(function()
              RAISE_EVENT(event, event)
            end, 2000)
{'fraction_non_alphanumeric': 0.12871287128712872, 'fraction_numerical': 0.0049504950495049506, 'mean_word_length': 4.596923076923077, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7673828', 'n_tokens_mistral': 549, 'n_tokens_neox': 539, 'n_words': 112}