Details
-
Bug
-
Resolution: Unresolved
-
Major
-
3.1.0.GA
-
None
-
False
-
None
-
False
Description
Steps to reproduce:
- Create the Java 11 with JBoss EAP XP 3.0 Microprofile from the DW Dashboard
- Waiting for IDE, cloning project and Terminal->Run Task->Build
- Terminal->Run Task->Deploy (Make sure that the coffee application is available)
- Change the CoffeeRepositoryService class for example
/* * JBoss, Home of Professional Open Source * Copyright 2020, Red Hat, Inc. and/or its affiliates, and individual * contributors by the @authors tag. See the copyright.txt in the * distribution for a full listing of individual contributors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.wildfly.quickstarts.microprofile.faulttolerance; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.concurrent.atomic.AtomicLong; import java.util.stream.Collectors; import javax.enterprise.context.ApplicationScoped; import org.eclipse.microprofile.faulttolerance.CircuitBreaker; import org.jboss.logging.Logger; /** * @author Radoslav Husar */ @ApplicationScoped public class CoffeeRepositoryService { private static final Logger LOGGER = Logger.getLogger(CoffeeRepositoryService.class); private Map<Integer, Coffee> coffeeList = new HashMap<>(); private Map<Integer, Integer> availability = new HashMap<>(); private AtomicLong counter = new AtomicLong(0); public CoffeeRepositoryService() { coffeeList.put(1, new Coffee(1, "Fernandez Espresso", "Colombia", 23)); coffeeList.put(2, new Coffee(2, "La Scala Whole Beans", "Bolivia", 18)); coffeeList.put(3, new Coffee(394654564, "Dak Lak Filter", "Vietnam", 125)); availability.put(1, 20); availability.put(2, 7); availability.put(3, 40); } public List<Coffee> getAllCoffees() { coffeeList.put(4, new Coffee(2002, "", "Vietnam", 125)); return new ArrayList<>(coffeeList.values()); } public Coffee getCoffeeById(Integer id) { return coffeeList.get(id); } public List<Coffee> getRecommendations(Integer id) { if (id == null) { return Collections.emptyList(); } return coffeeList.values().stream() .filter(coffee -> !id.equals(coffee.id)) .limit(2) .collect(Collectors.toList()); } @CircuitBreaker(requestVolumeThreshold = 4) public Integer getAvailability(Coffee coffee) { maybeFail(); return availability.get(coffee.id); } private void maybeFail() { // introduce some artificial failures final Long invocationNumber = counter.getAndIncrement(); if (invocationNumber % 4 > 1) { // alternate 2 successful and 2 failing invocations LOGGER.errorf("Invocation #%d failing", invocationNumber); throw new RuntimeException("Service failed."); } LOGGER.infof("Invocation #%d OK", invocationNumber); } }
- Invoke the 1-build and then 3-update-existing-deployment commands
Expected result: the App. should be updated with changes in the class
Actual result: There is no any updates