SlideShare una empresa de Scribd logo
1 de 14
mgray@pivotal.io ~ ❯❯❯ $ hostname
Bootiful Reactive Testing & CDC w/ Spring Boot.local
mgray@pivotal.io ~ ❯❯❯ $ whoami
Name: MarioGray
Role: Developer Advocate / Principal Technologist
Twitter: @mariogray
Code/Github: https://www.github.com/marios-code-path/bootiful-testing
mgray@pivotal.io ~ ❯❯❯ $ history
… more history ...
2006 cat < /var/spool/jobs/EdwardJones > /dev/analyst
2011 write `cat ~/co-authors` “Pro Spring Integration”
2013 mv ~ la ; cat < /var/spool/jobs/NFL_Media > /dev/integrator
2015 cat /var/spool/jobs/MobCrush > /dev/microservices/video/stream
2017 cat /var/spool/jobs/pivotal > /dev/advocate
mgray@pivotal.io ❯❯❯ $ cat /etc/issue
And now for a word about Testing:
mgray@pivotal.io ❯❯❯ $ cat /etc/tdd/issue
1. Don’t test trivial code getter/setter - Kent Beck
2. You can’t write tests to cover code that other
people will write later ; that’s their responsibility -
@kief
3. Be negative - in your tests - it can be powerful to
both check positive and negative outcomes.
Consumer-Driven Contract tests can be a real game changer to establish autonomous teams that can move fast and
with confidence. Do yourself a favor, read up on that concept and give it a try. A solid suite of CDC tests is invaluable
for being able to move fast without breaking other services and cause a lot of frustration with other teams.
mgray@pivotal.io ❯❯❯ $ cat /etc/tdd/bobmartin/laws
1. You are not allowed to write any production code
unless it is to make a failing unit test pass.
2. You are not allowed to write any more of a unit
test than is sufficient to fail; and compilation
failures are test failures.
3. You are not allowed to write any more production
code than is sufficient to pass the one failing unit
test.
mgray@pivotal.io ❯❯❯ $ vi ~/.reactive
Let’s get (re)Active
mgray@pivotal.io ~ ❯❯❯ $ whois reactive
Core: Fully Non-blocking foundation with efficient demand management. It directly
interacts with Java 8 functional API, Completable Future, Stream and Duration.
Types: Reactor offers [0|1|N] sequences in 2 reactive composable components:
Flux[N] and Mono[0|1] extensively implementing Reactive Extensions.
Comms: Non-Blocking IPC that is suited for Microservices. Reactor IPC offers
backpressure-ready network engines for TCP, UDP, HTTP and WebSockets.
Encoder/Decoder functionality is fully supported.
mgray@pivotal.io ~ ❯❯❯ $ cat /etc/reactive/interfaces
Reactive Streams: 4 interfaces
● Publisher<T> // subscribe( sub )
● Subscriber<T> // onSubscribe( sub )
● Subscription // request ( n )
● Processor<T, R> // subscribe (s) && onSubscribe(s)
mgray@pivotal.io ~ ❯❯❯ $ cat /etc/reactive/operators
filter( x )
map ( x )
flatMap ( x[][] )
zipWith( x[] )
reduce( i, x )
repeat( )
… And More !
mgray@pivotal.io ~ ❯❯❯ $ cat /etc/reactive/publisher/mono
Source: https://projectreactor.io/docs/core/snapshot/api/reactor/core/publisher/Mono.html
mgray@pivotal.io ~ ❯❯❯ $ cat /etc/reactive/publisher/flux
Source: https://projectreactor.io/docs/core/snapshot/api/reactor/core/publisher/Flux.html
Demo Time!
mgray@pivotal.io ~ ❯❯❯ $ cat /etc/issue
Say Hello to / / / (Plus the other “usual suspects”)
mgray@pivotal.io ~ ❯❯❯ $ exit
This talk is shutting down in 60 seconds.
Link to this talk: https://www.github.com/marios-code-path/bootiful-testing
Eat pizza, be merry, and code!
BLOG: http://www.sudoinit5.com
Don’t forget to fork() and | bind()
Use your left
Questions?
Here are some helpful resources:
http://www.reactive-streams.org
https://projectreactor.io/docs/core
https://martinfowler.com/articles/201701-event-driven.html
http://jonasboner.com/foreword-reactive-design-patterns
https://projectreactor.io/docs/core/snapshot/api
https://github.com/mkheck/FSRx
(R2DBC WIP!: https://github.com/mkheck/coffee-service-r2dbc)

Más contenido relacionado

La actualidad más candente

Rails Plugins 1 Plugin
Rails Plugins 1 PluginRails Plugins 1 Plugin
Rails Plugins 1 Plugin
oscon2007
 

La actualidad más candente (20)

GR8Conf 2015 - Spring Boot and Groovy. What more do you need?
GR8Conf 2015 - Spring Boot and Groovy. What more do you need?GR8Conf 2015 - Spring Boot and Groovy. What more do you need?
GR8Conf 2015 - Spring Boot and Groovy. What more do you need?
 
What can possibly go wrong if i dont e2 e test my packages?
What can possibly go wrong if i dont e2 e test my packages?What can possibly go wrong if i dont e2 e test my packages?
What can possibly go wrong if i dont e2 e test my packages?
 
TDD on OSGi, in practice.
TDD on OSGi, in practice.TDD on OSGi, in practice.
TDD on OSGi, in practice.
 
Spring IO '15 - Developing microservices, Spring Boot or Grails?
Spring IO '15 - Developing microservices, Spring Boot or Grails?Spring IO '15 - Developing microservices, Spring Boot or Grails?
Spring IO '15 - Developing microservices, Spring Boot or Grails?
 
Composer at Scale, Release and Dependency Management
Composer at Scale, Release and Dependency ManagementComposer at Scale, Release and Dependency Management
Composer at Scale, Release and Dependency Management
 
Audit your reactive applications
Audit your reactive applicationsAudit your reactive applications
Audit your reactive applications
 
Put an end to regression with codeception testing
Put an end to regression with codeception testingPut an end to regression with codeception testing
Put an end to regression with codeception testing
 
Gestión de infraestructura tomcat/Tom EE con tfactory
Gestión de infraestructura tomcat/Tom EE con tfactoryGestión de infraestructura tomcat/Tom EE con tfactory
Gestión de infraestructura tomcat/Tom EE con tfactory
 
Jump into React-Native (Class 6)
Jump into React-Native  (Class 6)Jump into React-Native  (Class 6)
Jump into React-Native (Class 6)
 
Continuous Integration for your Android projects
Continuous Integration for your Android projectsContinuous Integration for your Android projects
Continuous Integration for your Android projects
 
Creando microservicios con Java y Microprofile - Nicaragua JUG
Creando microservicios con Java y Microprofile - Nicaragua JUGCreando microservicios con Java y Microprofile - Nicaragua JUG
Creando microservicios con Java y Microprofile - Nicaragua JUG
 
Create an architecture for web test automation
Create an architecture for web test automationCreate an architecture for web test automation
Create an architecture for web test automation
 
Meetup React Sanca - 29/11/18 - React Testing
Meetup React Sanca - 29/11/18 - React TestingMeetup React Sanca - 29/11/18 - React Testing
Meetup React Sanca - 29/11/18 - React Testing
 
Rails Plugins 1 Plugin
Rails Plugins 1 PluginRails Plugins 1 Plugin
Rails Plugins 1 Plugin
 
Hidden Dragons of CGO
Hidden Dragons of CGOHidden Dragons of CGO
Hidden Dragons of CGO
 
Building serverless-applications
Building serverless-applicationsBuilding serverless-applications
Building serverless-applications
 
Simple Unit Testing in Appcelerator Titanium Alloy
Simple Unit Testing in Appcelerator Titanium AlloySimple Unit Testing in Appcelerator Titanium Alloy
Simple Unit Testing in Appcelerator Titanium Alloy
 
Angular Vienna - Use React tools for better Angular apps
Angular Vienna - Use React tools for better Angular appsAngular Vienna - Use React tools for better Angular apps
Angular Vienna - Use React tools for better Angular apps
 
Ci for-android-apps
Ci for-android-appsCi for-android-apps
Ci for-android-apps
 
Testing Grails Applications With Selenium Rc
Testing Grails Applications With Selenium RcTesting Grails Applications With Selenium Rc
Testing Grails Applications With Selenium Rc
 

Similar a Bootiful Reactive Testing with Mario Gray

Tempest scenariotests 20140512
Tempest scenariotests 20140512Tempest scenariotests 20140512
Tempest scenariotests 20140512
Masayuki Igawa
 
Testing of javacript
Testing of javacriptTesting of javacript
Testing of javacript
Lei Kang
 
Rapidly Building and Deploying Scalable Web Architectures
Rapidly Building and Deploying Scalable Web ArchitecturesRapidly Building and Deploying Scalable Web Architectures
Rapidly Building and Deploying Scalable Web Architectures
Keith Fitzgerald
 

Similar a Bootiful Reactive Testing with Mario Gray (20)

Bootiful Reactive Testing - Mario Gray
Bootiful Reactive Testing - Mario GrayBootiful Reactive Testing - Mario Gray
Bootiful Reactive Testing - Mario Gray
 
Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020
Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020
Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020
 
GWTcon 2015 - Beyond GWT 3.0 Panic
GWTcon 2015 - Beyond GWT 3.0 PanicGWTcon 2015 - Beyond GWT 3.0 Panic
GWTcon 2015 - Beyond GWT 3.0 Panic
 
Continuous Delivery for Front-End Engineers
Continuous Delivery for Front-End EngineersContinuous Delivery for Front-End Engineers
Continuous Delivery for Front-End Engineers
 
Shift Remote: Mobile - Devops-ify your life with Github Actions - Nicola Cort...
Shift Remote: Mobile - Devops-ify your life with Github Actions - Nicola Cort...Shift Remote: Mobile - Devops-ify your life with Github Actions - Nicola Cort...
Shift Remote: Mobile - Devops-ify your life with Github Actions - Nicola Cort...
 
Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017
Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017
Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017
 
Scaling Prometheus Metrics in Kubernetes with Telegraf | Chris Goller | Influ...
Scaling Prometheus Metrics in Kubernetes with Telegraf | Chris Goller | Influ...Scaling Prometheus Metrics in Kubernetes with Telegraf | Chris Goller | Influ...
Scaling Prometheus Metrics in Kubernetes with Telegraf | Chris Goller | Influ...
 
Tempest scenariotests 20140512
Tempest scenariotests 20140512Tempest scenariotests 20140512
Tempest scenariotests 20140512
 
GIDS_15FactorWorkshop.pdf
GIDS_15FactorWorkshop.pdfGIDS_15FactorWorkshop.pdf
GIDS_15FactorWorkshop.pdf
 
Continuous delivery w projekcie open source - Marcin Stachniuk
Continuous delivery w projekcie open source - Marcin StachniukContinuous delivery w projekcie open source - Marcin Stachniuk
Continuous delivery w projekcie open source - Marcin Stachniuk
 
Building Mobile Friendly APIs in Rails
Building Mobile Friendly APIs in RailsBuilding Mobile Friendly APIs in Rails
Building Mobile Friendly APIs in Rails
 
DevOps Pipelines and Metrics Driven Feedback Loops
DevOps Pipelines and Metrics Driven Feedback LoopsDevOps Pipelines and Metrics Driven Feedback Loops
DevOps Pipelines and Metrics Driven Feedback Loops
 
Testing of javacript
Testing of javacriptTesting of javacript
Testing of javacript
 
Monitoring using Prometheus and Grafana
Monitoring using Prometheus and GrafanaMonitoring using Prometheus and Grafana
Monitoring using Prometheus and Grafana
 
Rapidly Building and Deploying Scalable Web Architectures
Rapidly Building and Deploying Scalable Web ArchitecturesRapidly Building and Deploying Scalable Web Architectures
Rapidly Building and Deploying Scalable Web Architectures
 
Reactive application using meteor
Reactive application using meteorReactive application using meteor
Reactive application using meteor
 
Apache Flink Worst Practices
Apache Flink Worst PracticesApache Flink Worst Practices
Apache Flink Worst Practices
 
Bootiful Reactive Testing - Mario Gray
Bootiful Reactive Testing - Mario GrayBootiful Reactive Testing - Mario Gray
Bootiful Reactive Testing - Mario Gray
 
Choose Your Own Adventure with JHipster & Kubernetes - Denver JUG 2020
Choose Your Own Adventure with JHipster & Kubernetes - Denver JUG 2020Choose Your Own Adventure with JHipster & Kubernetes - Denver JUG 2020
Choose Your Own Adventure with JHipster & Kubernetes - Denver JUG 2020
 
Testing Vue Apps with Cypress.io (STLJS Meetup April 2018)
Testing Vue Apps with Cypress.io (STLJS Meetup April 2018)Testing Vue Apps with Cypress.io (STLJS Meetup April 2018)
Testing Vue Apps with Cypress.io (STLJS Meetup April 2018)
 

Más de VMware Tanzu

Más de VMware Tanzu (20)

What AI Means For Your Product Strategy And What To Do About It
What AI Means For Your Product Strategy And What To Do About ItWhat AI Means For Your Product Strategy And What To Do About It
What AI Means For Your Product Strategy And What To Do About It
 
Make the Right Thing the Obvious Thing at Cardinal Health 2023
Make the Right Thing the Obvious Thing at Cardinal Health 2023Make the Right Thing the Obvious Thing at Cardinal Health 2023
Make the Right Thing the Obvious Thing at Cardinal Health 2023
 
Enhancing DevEx and Simplifying Operations at Scale
Enhancing DevEx and Simplifying Operations at ScaleEnhancing DevEx and Simplifying Operations at Scale
Enhancing DevEx and Simplifying Operations at Scale
 
Spring Update | July 2023
Spring Update | July 2023Spring Update | July 2023
Spring Update | July 2023
 
Platforms, Platform Engineering, & Platform as a Product
Platforms, Platform Engineering, & Platform as a ProductPlatforms, Platform Engineering, & Platform as a Product
Platforms, Platform Engineering, & Platform as a Product
 
Building Cloud Ready Apps
Building Cloud Ready AppsBuilding Cloud Ready Apps
Building Cloud Ready Apps
 
Spring Boot 3 And Beyond
Spring Boot 3 And BeyondSpring Boot 3 And Beyond
Spring Boot 3 And Beyond
 
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdfSpring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
 
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
 
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
 
tanzu_developer_connect.pptx
tanzu_developer_connect.pptxtanzu_developer_connect.pptx
tanzu_developer_connect.pptx
 
Tanzu Virtual Developer Connect Workshop - French
Tanzu Virtual Developer Connect Workshop - FrenchTanzu Virtual Developer Connect Workshop - French
Tanzu Virtual Developer Connect Workshop - French
 
Tanzu Developer Connect Workshop - English
Tanzu Developer Connect Workshop - EnglishTanzu Developer Connect Workshop - English
Tanzu Developer Connect Workshop - English
 
Virtual Developer Connect Workshop - English
Virtual Developer Connect Workshop - EnglishVirtual Developer Connect Workshop - English
Virtual Developer Connect Workshop - English
 
Tanzu Developer Connect - French
Tanzu Developer Connect - FrenchTanzu Developer Connect - French
Tanzu Developer Connect - French
 
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
 
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring BootSpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
 
SpringOne Tour: The Influential Software Engineer
SpringOne Tour: The Influential Software EngineerSpringOne Tour: The Influential Software Engineer
SpringOne Tour: The Influential Software Engineer
 
SpringOne Tour: Domain-Driven Design: Theory vs Practice
SpringOne Tour: Domain-Driven Design: Theory vs PracticeSpringOne Tour: Domain-Driven Design: Theory vs Practice
SpringOne Tour: Domain-Driven Design: Theory vs Practice
 
SpringOne Tour: Spring Recipes: A Collection of Common-Sense Solutions
SpringOne Tour: Spring Recipes: A Collection of Common-Sense SolutionsSpringOne Tour: Spring Recipes: A Collection of Common-Sense Solutions
SpringOne Tour: Spring Recipes: A Collection of Common-Sense Solutions
 

Último

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Último (20)

EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 

Bootiful Reactive Testing with Mario Gray

  • 1. mgray@pivotal.io ~ ❯❯❯ $ hostname Bootiful Reactive Testing & CDC w/ Spring Boot.local mgray@pivotal.io ~ ❯❯❯ $ whoami Name: MarioGray Role: Developer Advocate / Principal Technologist Twitter: @mariogray Code/Github: https://www.github.com/marios-code-path/bootiful-testing mgray@pivotal.io ~ ❯❯❯ $ history … more history ... 2006 cat < /var/spool/jobs/EdwardJones > /dev/analyst 2011 write `cat ~/co-authors` “Pro Spring Integration” 2013 mv ~ la ; cat < /var/spool/jobs/NFL_Media > /dev/integrator 2015 cat /var/spool/jobs/MobCrush > /dev/microservices/video/stream 2017 cat /var/spool/jobs/pivotal > /dev/advocate
  • 2. mgray@pivotal.io ❯❯❯ $ cat /etc/issue And now for a word about Testing:
  • 3. mgray@pivotal.io ❯❯❯ $ cat /etc/tdd/issue 1. Don’t test trivial code getter/setter - Kent Beck 2. You can’t write tests to cover code that other people will write later ; that’s their responsibility - @kief 3. Be negative - in your tests - it can be powerful to both check positive and negative outcomes. Consumer-Driven Contract tests can be a real game changer to establish autonomous teams that can move fast and with confidence. Do yourself a favor, read up on that concept and give it a try. A solid suite of CDC tests is invaluable for being able to move fast without breaking other services and cause a lot of frustration with other teams.
  • 4. mgray@pivotal.io ❯❯❯ $ cat /etc/tdd/bobmartin/laws 1. You are not allowed to write any production code unless it is to make a failing unit test pass. 2. You are not allowed to write any more of a unit test than is sufficient to fail; and compilation failures are test failures. 3. You are not allowed to write any more production code than is sufficient to pass the one failing unit test.
  • 5. mgray@pivotal.io ❯❯❯ $ vi ~/.reactive Let’s get (re)Active
  • 6. mgray@pivotal.io ~ ❯❯❯ $ whois reactive Core: Fully Non-blocking foundation with efficient demand management. It directly interacts with Java 8 functional API, Completable Future, Stream and Duration. Types: Reactor offers [0|1|N] sequences in 2 reactive composable components: Flux[N] and Mono[0|1] extensively implementing Reactive Extensions. Comms: Non-Blocking IPC that is suited for Microservices. Reactor IPC offers backpressure-ready network engines for TCP, UDP, HTTP and WebSockets. Encoder/Decoder functionality is fully supported.
  • 7. mgray@pivotal.io ~ ❯❯❯ $ cat /etc/reactive/interfaces Reactive Streams: 4 interfaces ● Publisher<T> // subscribe( sub ) ● Subscriber<T> // onSubscribe( sub ) ● Subscription // request ( n ) ● Processor<T, R> // subscribe (s) && onSubscribe(s)
  • 8. mgray@pivotal.io ~ ❯❯❯ $ cat /etc/reactive/operators filter( x ) map ( x ) flatMap ( x[][] ) zipWith( x[] ) reduce( i, x ) repeat( ) … And More !
  • 9. mgray@pivotal.io ~ ❯❯❯ $ cat /etc/reactive/publisher/mono Source: https://projectreactor.io/docs/core/snapshot/api/reactor/core/publisher/Mono.html
  • 10. mgray@pivotal.io ~ ❯❯❯ $ cat /etc/reactive/publisher/flux Source: https://projectreactor.io/docs/core/snapshot/api/reactor/core/publisher/Flux.html
  • 12. mgray@pivotal.io ~ ❯❯❯ $ cat /etc/issue Say Hello to / / / (Plus the other “usual suspects”)
  • 13. mgray@pivotal.io ~ ❯❯❯ $ exit This talk is shutting down in 60 seconds. Link to this talk: https://www.github.com/marios-code-path/bootiful-testing Eat pizza, be merry, and code! BLOG: http://www.sudoinit5.com Don’t forget to fork() and | bind() Use your left
  • 14. Questions? Here are some helpful resources: http://www.reactive-streams.org https://projectreactor.io/docs/core https://martinfowler.com/articles/201701-event-driven.html http://jonasboner.com/foreword-reactive-design-patterns https://projectreactor.io/docs/core/snapshot/api https://github.com/mkheck/FSRx (R2DBC WIP!: https://github.com/mkheck/coffee-service-r2dbc)

Notas del editor

  1. exec(‘/bin/rewrite’) > /dev/profile 2>/dev/null;