Tabnine Logo
ProfileUpdateEvent.getProfileId
Code IndexAdd Tabnine to your IDE (free)

How to use
getProfileId
method
in
rocks.inspectit.server.ci.event.ProfileUpdateEvent

Best Java code snippets using rocks.inspectit.server.ci.event.ProfileUpdateEvent.getProfileId (Showing top 9 results out of 315)

origin: inspectIT/inspectIT

  @Test
  @SuppressWarnings({ "unchecked", "rawtypes" })
  public void futureThrowsInterruptedException() throws InterruptedException, ExecutionException, TimeoutException {
    cacheMap.put(1L, cacheEntry);
    when(event.isProfileActive()).thenReturn(true);
    when(event.getProfileId()).thenReturn("id_1");
    when(configurationHolder.isInitialized()).thenReturn(true);
    when(environment.getProfileIds()).thenReturn(Sets.newHashSet("id_1"));
    when(objectFactory.getObject()).thenReturn(updateJob);
    when(executor.submit(updateJob)).thenReturn((Future) future);
    when(future.get(1L, TimeUnit.MINUTES)).thenThrow(InterruptedException.class);
    eventListener.onApplicationEvent(event);
    verify(future).get(1L, TimeUnit.MINUTES);
  }
}
origin: inspectIT/inspectIT

@Test
@SuppressWarnings({ "unchecked", "rawtypes" })
public void futureThrowsExecutionException() throws InterruptedException, ExecutionException, TimeoutException {
  cacheMap.put(1L, cacheEntry);
  when(event.isProfileActive()).thenReturn(true);
  when(event.getProfileId()).thenReturn("id_1");
  when(configurationHolder.isInitialized()).thenReturn(true);
  when(environment.getProfileIds()).thenReturn(Sets.newHashSet("id_1"));
  when(objectFactory.getObject()).thenReturn(updateJob);
  when(executor.submit(updateJob)).thenReturn((Future) future);
  when(future.get(1L, TimeUnit.MINUTES)).thenThrow(ExecutionException.class);
  eventListener.onApplicationEvent(event);
  verify(future).get(1L, TimeUnit.MINUTES);
}
origin: inspectIT/inspectIT

@Test
public void emptyCacheMap() {
  when(event.isProfileActive()).thenReturn(true);
  when(event.getProfileId()).thenReturn("id_1");
  eventListener.onApplicationEvent(event);
  verify(event).isProfileActive();
  verify(nextGenInstrumentationManager).getAgentCacheMap();
  verifyNoMoreInteractions(event, nextGenInstrumentationManager);
  verifyZeroInteractions(cacheEntry, configurationHolder, environment, updateJob, future, objectFactory, executor);
}
origin: inspectIT/inspectIT

@Test
public void configurationNotInitialized() {
  cacheMap.put(1L, cacheEntry);
  when(event.isProfileActive()).thenReturn(true);
  when(event.getProfileId()).thenReturn("id_1");
  when(configurationHolder.isInitialized()).thenReturn(false);
  eventListener.onApplicationEvent(event);
  verify(event).isProfileActive();
  verify(nextGenInstrumentationManager).getAgentCacheMap();
  verify(cacheEntry).getConfigurationHolder();
  verify(configurationHolder).isInitialized();
  verifyNoMoreInteractions(event, cacheEntry, configurationHolder, nextGenInstrumentationManager);
  verifyZeroInteractions(environment, updateJob, future, objectFactory, executor);
}
origin: inspectIT/inspectIT

@Test
public void unknownProfile() {
  cacheMap.put(1L, cacheEntry);
  when(event.isProfileActive()).thenReturn(true);
  when(event.getProfileId()).thenReturn("id_unknown");
  when(configurationHolder.isInitialized()).thenReturn(true);
  when(environment.getProfileIds()).thenReturn(Sets.newHashSet("id_1"));
  eventListener.onApplicationEvent(event);
  verify(event).isProfileActive();
  verify(event).getProfileId();
  verify(nextGenInstrumentationManager).getAgentCacheMap();
  verify(cacheEntry).getConfigurationHolder();
  verify(configurationHolder).getEnvironment();
  verify(configurationHolder).isInitialized();
  verify(environment, times(2)).getProfileIds();
  verifyNoMoreInteractions(event, cacheEntry, configurationHolder, environment, nextGenInstrumentationManager);
  verifyZeroInteractions(updateJob, future, objectFactory, executor);
}
origin: inspectIT/inspectIT

@Test
@SuppressWarnings("unchecked")
public void emptyEnvironment() {
  cacheMap.put(1L, cacheEntry);
  when(event.isProfileActive()).thenReturn(true);
  when(event.getProfileId()).thenReturn("id_1");
  when(configurationHolder.isInitialized()).thenReturn(true);
  when(environment.getProfileIds()).thenReturn(Collections.EMPTY_SET);
  eventListener.onApplicationEvent(event);
  verify(event).isProfileActive();
  verify(nextGenInstrumentationManager).getAgentCacheMap();
  verify(cacheEntry).getConfigurationHolder();
  verify(configurationHolder).getEnvironment();
  verify(configurationHolder).isInitialized();
  verify(environment).getProfileIds();
  verifyNoMoreInteractions(event, cacheEntry, configurationHolder, environment, nextGenInstrumentationManager);
  verifyZeroInteractions(updateJob, future, objectFactory, executor);
}
origin: inspectIT/inspectIT

if (CollectionUtils.isEmpty(environment.getProfileIds()) || !environment.getProfileIds().contains(event.getProfileId())) {
  continue;
origin: inspectIT/inspectIT

@Test
@SuppressWarnings({ "unchecked", "rawtypes" })
public void successful() throws InterruptedException, ExecutionException, TimeoutException {
  cacheMap.put(1L, cacheEntry);
  when(event.isProfileActive()).thenReturn(true);
  when(event.getProfileId()).thenReturn("id_1");
  when(configurationHolder.isInitialized()).thenReturn(true);
  when(environment.getProfileIds()).thenReturn(Sets.newHashSet("id_1"));
  when(objectFactory.getObject()).thenReturn(updateJob);
  when(executor.submit(updateJob)).thenReturn((Future) future);
  eventListener.onApplicationEvent(event);
  verify(event).isProfileActive();
  verify(event).getProfileId();
  verify(nextGenInstrumentationManager).getAgentCacheMap();
  verify(cacheEntry).getConfigurationHolder();
  verify(configurationHolder).getEnvironment();
  verify(configurationHolder).isInitialized();
  verify(environment, times(2)).getProfileIds();
  verify(objectFactory).getObject();
  verify(executor).submit(updateJob);
  verify(updateJob).setAgentCacheEntry(cacheEntry);
  verify(updateJob).setProfileUpdateEvent(event);
  verify(future).get(1L, TimeUnit.MINUTES);
  verifyNoMoreInteractions(event, cacheEntry, configurationHolder, environment, updateJob, future, nextGenInstrumentationManager, objectFactory, executor);
}
origin: inspectIT/inspectIT

@Test
@SuppressWarnings({ "unchecked", "rawtypes" })
public void profileWasDeactivated() throws InterruptedException, ExecutionException, TimeoutException {
  cacheMap.put(1L, cacheEntry);
  when(event.isProfileDeactivated()).thenReturn(true);
  when(event.getProfileId()).thenReturn("id_1");
  when(configurationHolder.isInitialized()).thenReturn(true);
  when(environment.getProfileIds()).thenReturn(Sets.newHashSet("id_1"));
  when(objectFactory.getObject()).thenReturn(updateJob);
  when(executor.submit(updateJob)).thenReturn((Future) future);
  eventListener.onApplicationEvent(event);
  verify(event).isProfileActive();
  verify(event).isProfileDeactivated();
  verify(event).getProfileId();
  verify(nextGenInstrumentationManager).getAgentCacheMap();
  verify(cacheEntry).getConfigurationHolder();
  verify(configurationHolder).getEnvironment();
  verify(configurationHolder).isInitialized();
  verify(environment, times(2)).getProfileIds();
  verify(objectFactory).getObject();
  verify(executor).submit(updateJob);
  verify(updateJob).setAgentCacheEntry(cacheEntry);
  verify(updateJob).setProfileUpdateEvent(event);
  verify(future).get(1L, TimeUnit.MINUTES);
  verifyNoMoreInteractions(event, cacheEntry, configurationHolder, environment, updateJob, future, nextGenInstrumentationManager, objectFactory, executor);
}
rocks.inspectit.server.ci.eventProfileUpdateEventgetProfileId

Javadoc

Returns id of the profile being updated.

Popular methods of ProfileUpdateEvent

  • <init>
    Default constructor.
  • getAddedSensorAssignments
    Returns all AbstractClassSensorAssignment that are "added" as result of this update. If profile was
  • getRemovedSensorAssignments
    Returns all AbstractClassSensorAssignment that are "removed" as result of this update. If profile wa
  • isProfileActivated
    If profile was activated as the result of the update action.
  • isProfileActive
    Returns if the profile is active.
  • isProfileDeactivated
    If profile was deactivated as the result of the update action.
  • getAllSensorAssignments
    Returns all AbstractClassSensorAssignments from the profile.
  • getAssignmentsDifference
    Finds AbstractClassSensorAssignments that exists in first profile and not in the second one.

Popular in Java

  • Reading from database using SQL prepared statement
  • compareTo (BigDecimal)
  • getExternalFilesDir (Context)
  • setScale (BigDecimal)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now