<commit_before><?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:util="http://www.springframework.org/schema/util"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
                           http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd
                           http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd">

   <!-- input: test adds messages directly to queue, they get delivered to container -->
   <bean id="inputQueue" class="java.util.concurrent.ArrayBlockingQueue">
      <constructor-arg value="16" />
   </bean>

   <bean id="inputTransport"
      class="com.nokia.dempsy.messagetransport.blockingqueue.BlockingQueueAdaptor" init-method="start" destroy-method="stop">
      <property name="queue" ref="inputQueue" />
      <property name="listener" ref="container" />
   </bean>

   <!-- output: dispatcher sends messages to transport wrapping output queue -->
   <bean id="outputQueue" class="java.util.concurrent.LinkedBlockingQueue">
      <!--  <constructor-arg value="16"/> unbounded -->
   </bean>

   <bean id="distributor" class="com.nokia.dempsy.container.TestMpContainer$DummyDispatcher">
      <property name="sender">
         <bean id="outputTransport" class="com.nokia.dempsy.messagetransport.blockingqueue.BlockingQueueSender">
            <property name="queue" ref="outputQueue" />
         </bean>
      </property>
   </bean>

   <!-- containers should be explicitly configured, not auto-wired; too much plumbing -->
   <bean id="container" class="com.nokia.dempsy.container.MpContainer">
      <constructor-arg>
        <bean class="com.nokia.dempsy.config.ClusterId">
          <constructor-arg index="0" value="test" />
          <constructor-arg index="1" value="test" />
        </bean>
      </constructor-arg>
      <property name="prototype" ref="testMP" />
      <property name="dispatcher" ref="distributor" />
      <property name="statCollector">
        <bean class="com.nokia.dempsy.monitoring.coda.StatsCollectorCoda">
           <constructor-arg>
              <bean class="com.nokia.dempsy.config.ClusterId">
                 <constructor-arg index="0" value="test" />
                 <constructor-arg index="1" value="test" />
               </bean>
           </constructor-arg>
        </bean>
      </property>
   </bean>

   <!-- in a real app, these would be inner beans; for testing, we want to access them -->
   <bean id="testMP" class="com.nokia.dempsy.container.TestMpContainer$TestProcessor" />

</beans>
<commit_msg>Fix BlockingQueue transport test failures - more.<commit_after><?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:util="http://www.springframework.org/schema/util"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
                           http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd
                           http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd">

   <bean name="statsCollector" class="com.nokia.dempsy.monitoring.basic.BasicStatsCollector" />
   
   <!-- input: test adds messages directly to queue, they get delivered to container -->
   <bean id="inputQueue" class="java.util.concurrent.ArrayBlockingQueue">
      <constructor-arg value="16" />
   </bean>

   <bean id="inputTransport"
      class="com.nokia.dempsy.messagetransport.blockingqueue.BlockingQueueAdaptor" init-method="start" destroy-method="stop">
      <property name="queue" ref="inputQueue" />
      <property name="listener" ref="container" />
   </bean>

   <!-- output: dispatcher sends messages to transport wrapping output queue -->
   <bean id="outputQueue" class="java.util.concurrent.LinkedBlockingQueue">
      <!--  <constructor-arg value="16"/> unbounded -->
   </bean>

   <bean id="distributor" class="com.nokia.dempsy.container.TestMpContainer$DummyDispatcher">
      <property name="sender">
         <bean id="outputTransport" class="com.nokia.dempsy.messagetransport.blockingqueue.BlockingQueueSender">
            <constructor-arg ref="statsCollector" />
            <property name="queue" ref="outputQueue" />
         </bean>
      </property>
   </bean>

   <!-- containers should be explicitly configured, not auto-wired; too much plumbing -->
   <bean id="container" class="com.nokia.dempsy.container.MpContainer">
      <constructor-arg>
        <bean class="com.nokia.dempsy.config.ClusterId">
          <constructor-arg index="0" value="test" />
          <constructor-arg index="1" value="test" />
        </bean>
      </constructor-arg>
      <property name="prototype" ref="testMP" />
      <property name="dispatcher" ref="distributor" />
      <property name="statCollector">
        <bean class="com.nokia.dempsy.monitoring.coda.StatsCollectorCoda">
           <constructor-arg>
              <bean class="com.nokia.dempsy.config.ClusterId">
                 <constructor-arg index="0" value="test" />
                 <constructor-arg index="1" value="test" />
               </bean>
           </constructor-arg>
        </bean>
      </property>
   </bean>

   <!-- in a real app, these would be inner beans; for testing, we want to access them -->
   <bean id="testMP" class="com.nokia.dempsy.container.TestMpContainer$TestProcessor" />

</beans>

{'fraction_non_alphanumeric': 0.15370401478246262, 'fraction_numerical': 0.0067193011926759616, 'mean_word_length': 3.0148347943358056, 'pattern_counts': {'":': 0, '<': 97, '<?xml version=': 2, '>': 97, 'https://': 0, 'lorem ipsum': 0, 'www.': 20, 'xml': 10}, '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': '6267092', 'n_tokens_mistral': 1764, 'n_tokens_neox': 1694, 'n_words': 294}