Coder Social home page Coder Social logo

rxjava-test-service's Introduction

rxjava-test-service's People

Contributors

wkimdev avatar

Watchers

James Cloos avatar

rxjava-test-service's Issues

webflux Content not available yet (No content 404 Not Found Error)

webflux router test 중 아래 error 발생..

  • webflux Content not available yet (No content 404 Not Found Error)

searching

원인

  • pom.xml에서 webflux depengency 이전에 spring starter depengency가 포함되어 있었다. webflux에서는 쓸 필요가 없기 때문에 해당 디펜전시를 지우고 테스트 하니 잘 불러온다...

프로젝트 새로 만들어서 pom.xml 재설정 후 post 재시도(결과 = Timeout on blocking read for 5000 MILLISECONDS in Spring WEBLUX )

  • 잘돌아가는 프로젝트의 pom.xml의 디펜전시를 그대로 붙여놓고, 안쓰는건 전부 뺌.
  • junit 4 --> junit 5 설정

시도1)

시도2) test클래스에 @AutoConfigureWebTestClient(timeout = "36000") 설정

  • java.lang.stackoverflowerror ~~~~ 발생..
  1. pom.xml check --> depengency check
  2. postman check --> stackoverflowerror
  3. error message check -->
  4. get uri request ? --> issue!

rxjava2-webflux와 mysql version 8은 맞지 않는것같다.

  • rxjava2-webflux와 mysql version 8은 맞지 않는것같다.
  • mac에서 brew로 설치한 mysql버전은 8인데 get,post 요청 테스트시 stackoverflow와, connection issue가 발생했다.
  • 버전을 낮추어서 테스트해보려고 했지만(5.5 install) 환경에서 mysql설치가 꼬여서 아직 못했음(..ing)

Redo (webflux post issue)

searching keyword

  1. reactive database insert count
  2. document searching
  • Flowable ? (for rxjava2 backpressure)
  1. rxjava database Flowable insert

<의심가는 곳>

  • response bodyToMono(String.class)

  • mono는 publisher를 상속함.

  • rx 연산자는 결과적으로 Mono의 "at one at"속성을 유지하기 위해 입력 형식에 대한 별칭을 제공합니다.

  • 예를 들어, Mono # flatMap flatMap는 {@link Mono}를 리턴 합니다만, 1 회 이상의 방출을 가지는 Mono # flatMapMany flatMapMany} 별명이 있습니다.

one by one... ㅠㅠ

  • 예전 팀장님 말씀...
  • rdbms 에서는 사용하면 reactive 관련된 부분이 아예 무시된다고 본거 같아서 ㅎ spring 자료에 보면 지원하는 jdbc 가 아예 써 있었던 기억이 있어
  • 스프링 레퍼런스에서도 나온것 처럼 Webflux 사용시 non-blocking을 지원하는 No-SQL을 사용하는 것이 바람직 하지만, 아래 출처
  • 기타 질의 : https://okky.kr/article/446499
  • 그리고 아래 출처...
  • 비동기로 인해서 rxjava2를 이용할 경우 2가지 경우로 해결할 수 있다.
  1. rxjava2-jdbc를 통해 database를 생성시에 nonblocking 옵션을 준다.
  1. mongoDB, Redis처럼 reative를 지원하는 nosql을 사용한다...

다른 test

  • handler에서 string.class로 response받는건 잘된다.
    return route(POST("/update").and(accept(APPLICATION_JSON)), senderHistoryHandler::save);

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (62)

mysql connection issue

try

삭제후 재설치

# Kill rails server and guard
bin/spring stop
brew services stop mysql
brew uninstall mysql
brew install [email protected]
brew link [email protected] --force
brew services start [email protected]
rbenv uninstall 2.3.3
rbenv install 2.3.3
gem install bundle
gem install rubocop-rspec rubocop scss_lint rails_best_practices # (optional)
bundle install
be rails db:migrate:reset
저의 문제점은 mysql 을 최신버전으로 사용하여 spring과 붙지 못했던것 이었습니다. (8버전설치)
8버전은 mysql 에서 스크립트방식으로 처음 만든 방식이니까 이에 맞는 드라이버를 고를수 있음 고르라고 지적받았네요.
저는 mysql 5.6버전으로 낮추어 사용하여 문제를 해결했습니다.

router, post(connection closed prematurely)

(1) post test 중

  • router, post(connection closed prematurely)

logback file detail

  • java.lang.StackOverflowError: null
    at kr.co.doublechain.rx.service.sending.domain.TaskHistoryDTO.title(TaskHistoryDTO.java:53) ~[classes/:na]......
    at kr.co.doublechain.rx.service.sending.domain.TaskHistoryDTO.title(TaskHistoryDTO.java:53) ~[classes/:na]......

(2) search

(1) searching

debug

처음부터 다시 만들기~~

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.