This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Test | |
| public void cancellingAScheduledFutureWhileItIsRunningHasNoEffect() { | |
| DeterministicScheduler deterministicScheduler = new DeterministicScheduler(); | |
| SchedulerContainer schedulerContainer = new SchedulerContainer(deterministicScheduler); | |
| schedulerContainer.scheduleSelfCancellingTask(); | |
| deterministicScheduler.tick(2,TimeUnit.SECONDS); | |
| assertThat(schedulerContainer.runCount(), is(1)); | |
| } | |
| public static class SchedulerContainer { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Test | |
| public void cancellingAScheduledFutureWhileItIsRunningProhibitsItFromRunningJMock() throws InterruptedException { | |
| final CountDownLatch scheduledHasStarted = new CountDownLatch(1); | |
| final CountDownLatch scheduledHasBeenCancelled = new CountDownLatch(1); | |
| final AtomicInteger counter = new AtomicInteger(); | |
| DeterministicScheduler deterministicScheduler = new DeterministicScheduler(); | |
| final ScheduledFuture<?> scheduledFuture = deterministicScheduler.scheduleAtFixedRate(new Runnable() { | |
| @Override | |
| public void run() { | |
| scheduledHasStarted.countDown(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import com.fasterxml.jackson.databind.{ObjectMapper, JsonNode} | |
| import scala.Some | |
| import org.specs2.mutable.SpecificationWithJUnit | |
| import com.fasterxml.jackson.module.scala.DefaultScalaModule | |
| class JsonNodeOptionDeserializerTest extends SpecificationWithJUnit { | |
| "Option[JsonNode] " should { | |
| "serialize its content when contained in an object" in { | |
| val mapper = new ObjectMapper().registerModule(DefaultScalaModule) | |
| val json: String = """{"prop":"value"}""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.wixpress.report | |
| import com.fasterxml.jackson.databind.{DeserializationFeature, ObjectMapper} | |
| import com.fasterxml.jackson.datatype.guava.GuavaModule | |
| import com.fasterxml.jackson.module.scala.DefaultScalaModule | |
| import org.junit._ | |
| import Assert._ | |
| /** | |
| * @author: ittaiz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mvn org.apache.maven.plugins:maven-dependency-plugin:2.7:tree |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| >mvn dependency:tree -Dverbose -Dincludes=org.springframework | |
| ... | |
| (omitted for clarity) | |
| ... | |
| [INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ wix-feature-toggle-administration --- | |
| [INFO] artifact org.springframework:spring-beans: checking for updates from central | |
| [INFO] artifact org.springframework:spring-beans: checking for updates from snapshots | |
| [INFO] artifact org.springframework:spring-expression: checking for updates from central | |
| [INFO] artifact org.springframework:spring-expression: checking for updates from snapshots | |
| [INFO] artifact org.springframework:spring-tx: checking for updates from central |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <dependency> | |
| <groupId>org.springframework.data</groupId> | |
| <artifactId>spring-data-mongodb</artifactId> | |
| <version>1.0.1.RELEASE</version> | |
| <exclusions> | |
| <exclusion> | |
| <groupId>org.springframework</groupId> | |
| <artifactId>spring-beans</artifactId> | |
| </exclusion> | |
| </exclusions> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.wixpress.springVersionBug; | |
| import org.junit.*; | |
| import org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory; | |
| import org.springframework.core.GenericTypeResolver; | |
| import java.security.CodeSource; | |
| import static org.hamcrest.Matchers.endsWith; | |
| /** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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" xmlns:rabbit="http://www.springframework.org/schema/rabbit" | |
| xsi:schemaLocation="http://www.springframework.org/schema/rabbit http://www.springframework.org/schema/rabbit/spring-rabbit-1.1.xsd | |
| http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd | |
| http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd | |
| http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"> | |
| <util:properties id="queueProperties" location="classpath:/queueProperties.properties" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 10:01:21.838 [main] INFO org.elasticsearch.node - [Connors, Curtis] {0.18.7}[4304]: initializing ... | |
| 10:01:21.847 [main] INFO org.elasticsearch.plugins - [Connors, Curtis] loaded [], sites [] | |
| 10:01:22.405 [main] DEBUG org.elasticsearch.threadpool - [Connors, Curtis] creating thread_pool [cached], type [cached], keep_alive [30s] | |
| 10:01:22.406 [main] DEBUG org.elasticsearch.threadpool - [Connors, Curtis] creating thread_pool [index], type [cached], keep_alive [5m] | |
| 10:01:22.406 [main] DEBUG org.elasticsearch.threadpool - [Connors, Curtis] creating thread_pool [search], type [cached], keep_alive [5m] | |
| 10:01:22.406 [main] DEBUG org.elasticsearch.threadpool - [Connors, Curtis] creating thread_pool [percolate], type [cached], keep_alive [5m] | |
| 10:01:22.406 [main] DEBUG org.elasticsearch.threadpool - [Connors, Curtis] creating thread_pool [management], type [scaling], min [1], size [20], keep_alive [5m] | |
| 10:01:22.407 [main] DEBUG org.elasticsearch.threadpool - [Connors, Curtis] creating thread_pool [merge], type [scalin |