<commit_before>(ns onyx.windowing.basic-conj-test
  (:require [clojure.core.async :refer [chan >!! <!! close! sliding-buffer]]
            [clojure.test :refer [deftest is]]
            [onyx.plugin.core-async :refer [take-segments!]]
            [onyx.test-helper :refer [load-config]]
            [onyx.api]))

(def input
  [{:id 1  :age 21 :event-time #inst "2015-09-13T03:00:00.829-00:00"}
   {:id 2  :age 12 :event-time #inst "2015-09-13T03:04:00.829-00:00"}
   {:id 3  :age 3  :event-time #inst "2015-09-13T03:05:00.829-00:00"}
   {:id 4  :age 64 :event-time #inst "2015-09-13T03:06:00.829-00:00"}
   {:id 5  :age 53 :event-time #inst "2015-09-13T03:07:00.829-00:00"}
   {:id 6  :age 52 :event-time #inst "2015-09-13T03:08:00.829-00:00"}
   {:id 7  :age 24 :event-time #inst "2015-09-13T03:09:00.829-00:00"}
   {:id 8  :age 35 :event-time #inst "2015-09-13T03:15:00.829-00:00"}
   {:id 9  :age 49 :event-time #inst "2015-09-13T03:25:00.829-00:00"}
   {:id 10 :age 37 :event-time #inst "2015-09-13T03:45:00.829-00:00"}
   {:id 11 :age 15 :event-time #inst "2015-09-13T03:03:00.829-00:00"}
   {:id 12 :age 22 :event-time #inst "2015-09-13T03:56:00.829-00:00"}
   {:id 13 :age 83 :event-time #inst "2015-09-13T03:59:00.829-00:00"}
   {:id 14 :age 60 :event-time #inst "2015-09-13T03:32:00.829-00:00"}
   {:id 15 :age 35 :event-time #inst "2015-09-13T03:16:00.829-00:00"}])

;; Talk to Mike about whether this is expected
(def expected-windows
  [[1442113200000 1442113499999 
    '({:id 2, :age 12, :event-time #inst "2015-09-13T03:04:00.829-00:00"} 
      {:id 1, :age 21, :event-time #inst "2015-09-13T03:00:00.829-00:00"})] 
   [1442113500000 1442113799999 
    '({:id 5, :age 53, :event-time #inst "2015-09-13T03:07:00.829-00:00"} 
      {:id 4, :age 64, :event-time #inst "2015-09-13T03:06:00.829-00:00"} 
      {:id 3, :age 3, :event-time #inst "2015-09-13T03:05:00.829-00:00"})] 
   [1442113200000 1442113499999 
    '({:id 2, :age 12, :event-time #inst "2015-09-13T03:04:00.829-00:00"} 
      {:id 1, :age 21, :event-time #inst "2015-09-13T03:00:00.829-00:00"})] 
   [1442113500000 1442113799999 
    '({:id 7, :age 24, :event-time #inst "2015-09-13T03:09:00.829-00:00"} 
      {:id 6, :age 52, :event-time #inst "2015-09-13T03:08:00.829-00:00"} 
      {:id 5, :age 53, :event-time #inst "2015-09-13T03:07:00.829-00:00"} 
      {:id 4, :age 64, :event-time #inst "2015-09-13T03:06:00.829-00:00"} 
      {:id 3, :age 3, :event-time #inst "2015-09-13T03:05:00.829-00:00"})] 
   [1442114100000 1442114399999 
    '({:id 8, :age 35, :event-time #inst "2015-09-13T03:15:00.829-00:00"})] 
   [1442114700000 1442114999999 
    '({:id 9, :age 49, :event-time #inst "2015-09-13T03:25:00.829-00:00"})] 
   [1442115900000 1442116199999 
    '({:id 10, :age 37, :event-time #inst "2015-09-13T03:45:00.829-00:00"})] 
   [1442113200000 1442113499999 
    '({:id 11, :age 15, :event-time #inst "2015-09-13T03:03:00.829-00:00"} 
      {:id 2, :age 12, :event-time #inst "2015-09-13T03:04:00.829-00:00"} 
      {:id 1, :age 21, :event-time #inst "2015-09-13T03:00:00.829-00:00"})] 
   [1442113500000 1442113799999 
    '({:id 7, :age 24, :event-time #inst "2015-09-13T03:09:00.829-00:00"} 
      {:id 6, :age 52, :event-time #inst "2015-09-13T03:08:00.829-00:00"} 
      {:id 5, :age 53, :event-time #inst "2015-09-13T03:07:00.829-00:00"} 
      {:id 4, :age 64, :event-time #inst "2015-09-13T03:06:00.829-00:00"} 
      {:id 3, :age 3, :event-time #inst "2015-09-13T03:05:00.829-00:00"})] 
   [1442114100000 1442114399999 
    '({:id 15, :age 35, :event-time #inst "2015-09-13T03:16:00.829-00:00"} 
      {:id 8, :age 35, :event-time #inst "2015-09-13T03:15:00.829-00:00"})] 
   [1442114700000 1442114999999 
    '({:id 9, :age 49, :event-time #inst "2015-09-13T03:25:00.829-00:00"})] 
   [1442115900000 1442116199999 
    '({:id 10, :age 37, :event-time #inst "2015-09-13T03:45:00.829-00:00"})] 
   [1442116500000 1442116799999 
    '({:id 13, :age 83, :event-time #inst "2015-09-13T03:59:00.829-00:00"} 
      {:id 12, :age 22, :event-time #inst "2015-09-13T03:56:00.829-00:00"})] 
   [1442115000000 1442115299999 
    '({:id 14, :age 60, :event-time #inst "2015-09-13T03:32:00.829-00:00"})]])<commit_msg>Fix basic-conj-test expected ordering (now in a vec)<commit_after>(ns onyx.windowing.basic-conj-test
  (:require [clojure.core.async :refer [chan >!! <!! close! sliding-buffer]]
            [clojure.test :refer [deftest is]]
            [onyx.plugin.core-async :refer [take-segments!]]
            [onyx.test-helper :refer [load-config]]
            [onyx.api]))

(def input
  [{:id 1  :age 21 :event-time #inst "2015-09-13T03:00:00.829-00:00"}
   {:id 2  :age 12 :event-time #inst "2015-09-13T03:04:00.829-00:00"}
   {:id 3  :age 3  :event-time #inst "2015-09-13T03:05:00.829-00:00"}
   {:id 4  :age 64 :event-time #inst "2015-09-13T03:06:00.829-00:00"}
   {:id 5  :age 53 :event-time #inst "2015-09-13T03:07:00.829-00:00"}
   {:id 6  :age 52 :event-time #inst "2015-09-13T03:08:00.829-00:00"}
   {:id 7  :age 24 :event-time #inst "2015-09-13T03:09:00.829-00:00"}
   {:id 8  :age 35 :event-time #inst "2015-09-13T03:15:00.829-00:00"}
   {:id 9  :age 49 :event-time #inst "2015-09-13T03:25:00.829-00:00"}
   {:id 10 :age 37 :event-time #inst "2015-09-13T03:45:00.829-00:00"}
   {:id 11 :age 15 :event-time #inst "2015-09-13T03:03:00.829-00:00"}
   {:id 12 :age 22 :event-time #inst "2015-09-13T03:56:00.829-00:00"}
   {:id 13 :age 83 :event-time #inst "2015-09-13T03:59:00.829-00:00"}
   {:id 14 :age 60 :event-time #inst "2015-09-13T03:32:00.829-00:00"}
   {:id 15 :age 35 :event-time #inst "2015-09-13T03:16:00.829-00:00"}])

;; Talk to Mike about whether this is expected
(def expected-windows
  [[1442113200000 1442113499999 
    [{:id 1, :age 21, :event-time #inst "2015-09-13T03:00:00.829-00:00"} 
     {:id 2, :age 12, :event-time #inst "2015-09-13T03:04:00.829-00:00"}]] 
   [1442113500000 1442113799999 
    [{:id 3, :age 3, :event-time #inst "2015-09-13T03:05:00.829-00:00"} 
     {:id 4, :age 64, :event-time #inst "2015-09-13T03:06:00.829-00:00"}
     {:id 5, :age 53, :event-time #inst "2015-09-13T03:07:00.829-00:00"}]] 
   [1442113200000 1442113499999
    [{:id 1, :age 21, :event-time #inst "2015-09-13T03:00:00.829-00:00"}
     {:id 2, :age 12, :event-time #inst "2015-09-13T03:04:00.829-00:00"}]] 
   [1442113500000 1442113799999 
    [{:id 3, :age 3, :event-time #inst "2015-09-13T03:05:00.829-00:00"}
     {:id 4, :age 64, :event-time #inst "2015-09-13T03:06:00.829-00:00"}
     {:id 5, :age 53, :event-time #inst "2015-09-13T03:07:00.829-00:00"}
     {:id 6, :age 52, :event-time #inst "2015-09-13T03:08:00.829-00:00"}
     {:id 7, :age 24, :event-time #inst "2015-09-13T03:09:00.829-00:00"}]] 
   [1442114100000 1442114399999 
    [{:id 8, :age 35, :event-time #inst "2015-09-13T03:15:00.829-00:00"}]] 
   [1442114700000 1442114999999 
    [{:id 9, :age 49, :event-time #inst "2015-09-13T03:25:00.829-00:00"}]]
   [1442115900000 1442116199999 
    [{:id 10, :age 37, :event-time #inst "2015-09-13T03:45:00.829-00:00"}]] 
   [1442113200000 1442113499999 
    [{:id 1, :age 21, :event-time #inst "2015-09-13T03:00:00.829-00:00"} 
     {:id 2, :age 12, :event-time #inst "2015-09-13T03:04:00.829-00:00"} 
     {:id 11, :age 15, :event-time #inst "2015-09-13T03:03:00.829-00:00"}]]
   [1442113500000 1442113799999 
    [{:id 3, :age 3, :event-time #inst "2015-09-13T03:05:00.829-00:00"} 
     {:id 4, :age 64, :event-time #inst "2015-09-13T03:06:00.829-00:00"} 
     {:id 5, :age 53, :event-time #inst "2015-09-13T03:07:00.829-00:00"} 
     {:id 6, :age 52, :event-time #inst "2015-09-13T03:08:00.829-00:00"} 
     {:id 7, :age 24, :event-time #inst "2015-09-13T03:09:00.829-00:00"}]] 
   [1442114100000 1442114399999 
    [{:id 8, :age 35, :event-time #inst "2015-09-13T03:15:00.829-00:00"}
     {:id 15, :age 35, :event-time #inst "2015-09-13T03:16:00.829-00:00"}]]
   [1442114700000 1442114999999 
    [{:id 9, :age 49, :event-time #inst "2015-09-13T03:25:00.829-00:00"}]] 
   [1442115900000 1442116199999 
    [{:id 10, :age 37, :event-time #inst "2015-09-13T03:45:00.829-00:00"}]] 
   [1442116500000 1442116799999 
    [{:id 12, :age 22, :event-time #inst "2015-09-13T03:56:00.829-00:00"} 
     {:id 13, :age 83, :event-time #inst "2015-09-13T03:59:00.829-00:00"}]] 
   [1442115000000 1442115299999 
    [{:id 14, :age 60, :event-time #inst "2015-09-13T03:32:00.829-00:00"}]]])
{'fraction_non_alphanumeric': 0.21661509164484646, 'fraction_numerical': 0.3458700309450131, 'mean_word_length': 3.415659485023647, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5923224', 'n_tokens_mistral': 5819, 'n_tokens_neox': 3993, 'n_words': 754}