From ff4699bebf2571cbd648cbf8bccf1e957c7547e5 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Mon, 3 Dec 2018 02:35:51 +0300 Subject: [PATCH 001/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - wip - added @Test -- verified with diffs overview --- .../GridCacheAffinityBackupsSelfTest.java | 3 +- .../GridSuppressedExceptionSelfTest.java | 5 + .../ignite/IgniteCacheAffinitySelfTest.java | 3 +- ...CacheEntryProcessorSequentialCallTest.java | 9 +- .../cache/IgniteWarmupClosureSelfTest.java | 3 +- .../ignite/cache/LargeEntryUpdateTest.java | 1 + .../ignite/cache/ResetLostPartitionTest.java | 2 + .../AbstractAffinityFunctionSelfTest.java | 9 + .../affinity/AffinityClientNodeSelfTest.java | 3 +- .../AffinityDistributionLoggingTest.java | 6 + ...yFunctionBackupFilterAbstractSelfTest.java | 2 + ...ctionExcludeNeighborsAbstractSelfTest.java | 4 +- .../affinity/AffinityHistoryCleanupTest.java | 1 + .../local/LocalAffinityFunctionTest.java | 1 + ...ezvousAffinityFunctionSimpleBenchmark.java | 5 + ...ThroughDisabledTransactionalCacheTest.java | 3 + .../store/CacheStoreReadFromBackupTest.java | 4 + ...eStoreSessionListenerAbstractSelfTest.java | 8 +- ...StoreSessionListenerLifecycleSelfTest.java | 4 + ...rReadWriteThroughDisabledAbstractTest.java | 6 + ...SessionListenerWriteBehindEnabledTest.java | 4 + .../cache/store/CacheStoreWriteErrorTest.java | 2 + .../GridCacheBalancingStoreSelfTest.java | 5 + ...GridCacheLoadOnlyStoreAdapterSelfTest.java | 2 + .../cache/store/GridStoreLoadCacheTest.java | 1 + .../IgniteCacheExpiryStoreLoadSelfTest.java | 7 +- .../store/StoreResourceInjectionSelfTest.java | 3 + .../CacheJdbcPojoStoreAbstractSelfTest.java | 14 + ...JdbcPojoStoreBinaryMarshallerSelfTest.java | 6 + .../store/jdbc/CacheJdbcPojoStoreTest.java | 4 + ...dbcStoreAbstractMultithreadedSelfTest.java | 3 + ...cheJdbcBlobStoreMultithreadedSelfTest.java | 5 +- .../jdbc/JdbcTypesDefaultTransformerTest.java | 1 + .../ignite/client/SslParametersTest.java | 14 +- .../failure/FailureHandlerTriggeredTest.java | 1 + .../FailureHandlingConfigurationTest.java | 5 + .../failure/IoomFailureHandlerTest.java | 5 + .../ignite/failure/OomFailureHandlerTest.java | 5 + .../failure/StopNodeFailureHandlerTest.java | 1 + .../StopNodeOrHaltFailureHandlerTest.java | 1 + .../failure/SystemWorkersBlockingTest.java | 1 + .../failure/SystemWorkersTerminationTest.java | 1 + .../igfs/IgfsEventsAbstractSelfTest.java | 11 +- .../ignite/igfs/IgfsFragmentizerSelfTest.java | 10 +- .../IgfsFragmentizerTopologySelfTest.java | 3 +- .../apache/ignite/igfs/IgfsPathSelfTest.java | 4 +- .../apache/ignite/internal/ClassSetTest.java | 5 +- .../ClusterBaselineNodesMetricsSelfTest.java | 1 + .../internal/ClusterGroupAbstractTest.java | 7 +- .../internal/ClusterGroupHostsSelfTest.java | 2 + .../ignite/internal/ClusterGroupSelfTest.java | 11 + .../internal/ClusterMetricsSelfTest.java | 2 + .../internal/ClusterNodeMetricsSelfTest.java | 6 + .../ClusterNodeMetricsUpdateTest.java | 1 + .../ComputeJobCancelWithServiceSelfTest.java | 1 + .../internal/GridAffinityMappedTest.java | 1 + .../internal/GridAffinityNoCacheSelfTest.java | 4 + .../internal/GridAffinityP2PSelfTest.java | 4 + .../ignite/internal/GridAffinitySelfTest.java | 1 + .../GridAlwaysFailoverSpiFailSelfTest.java | 4 +- ...ePartitionExchangeManagerHistSizeTest.java | 1 + .../GridCancelOnGridStopSelfTest.java | 3 +- .../internal/GridCancelUnusedJobSelfTest.java | 3 +- .../GridCancelledJobsMetricsSelfTest.java | 1 + .../GridCollisionJobsContextSelfTest.java | 3 +- .../internal/GridCommunicationSelfTest.java | 3 +- ...putationBinarylizableClosuresSelfTest.java | 6 + .../GridContinuousJobAnnotationSelfTest.java | 5 +- .../GridContinuousJobSiblingsSelfTest.java | 4 +- .../internal/GridContinuousTaskSelfTest.java | 7 + .../GridDeploymentMultiThreadedSelfTest.java | 3 +- .../internal/GridDeploymentSelfTest.java | 7 +- .../internal/GridDiscoveryEventSelfTest.java | 7 +- .../internal/GridDiscoverySelfTest.java | 8 +- ...ridEventStorageCheckAllEventsSelfTest.java | 6 + .../GridEventStorageDefaultExceptionTest.java | 2 + ...ntStorageRuntimeConfigurationSelfTest.java | 8 +- .../internal/GridEventStorageSelfTest.java | 6 + ...dFailFastNodeFailureDetectionSelfTest.java | 1 + .../GridFailedInputParametersSelfTest.java | 9 +- .../GridFailoverCustomTopologySelfTest.java | 3 +- .../ignite/internal/GridFailoverSelfTest.java | 3 +- ...GridFailoverTaskWithPredicateSelfTest.java | 5 +- .../GridFailoverTopologySelfTest.java | 3 +- .../internal/GridGetOrStartSelfTest.java | 2 + .../ignite/internal/GridHomePathSelfTest.java | 3 +- .../GridJobCheckpointCleanupSelfTest.java | 3 +- .../GridJobCollisionCancelSelfTest.java | 3 +- .../internal/GridJobContextSelfTest.java | 3 +- .../GridJobMasterLeaveAwareSelfTest.java | 19 +- .../internal/GridJobServicesAddNodeTest.java | 1 + .../internal/GridJobStealingSelfTest.java | 12 +- ...GridJobStealingZeroActiveJobsSelfTest.java | 3 +- .../internal/GridJobSubjectIdSelfTest.java | 4 +- ...ridKernalConcurrentAccessStopSelfTest.java | 3 +- .../internal/GridLifecycleBeanSelfTest.java | 12 +- .../internal/GridListenActorSelfTest.java | 7 +- .../GridLocalEventListenerSelfTest.java | 3 +- .../ignite/internal/GridMBeansTest.java | 2 + .../internal/GridMultipleJobsSelfTest.java | 4 +- .../internal/GridMultipleSpisSelfTest.java | 3 +- ...ridMultipleVersionsDeploymentSelfTest.java | 4 +- .../GridMultithreadedJobStealingSelfTest.java | 4 +- .../internal/GridNodeFilterSelfTest.java | 3 +- .../internal/GridNodeLocalSelfTest.java | 4 +- .../internal/GridNodeMetricsLogSelfTest.java | 1 + .../GridNodeVisorAttributesSelfTest.java | 5 +- .../GridNonHistoryMetricsSelfTest.java | 3 +- .../GridProjectionForCachesSelfTest.java | 8 +- ...tionLocalJobMultipleArgumentsSelfTest.java | 6 +- .../ignite/internal/GridReduceSelfTest.java | 4 +- .../internal/GridReleaseTypeSelfTest.java | 4 +- .../GridRuntimeExceptionSelfTest.java | 6 +- .../internal/GridSameVmStartupSelfTest.java | 3 +- .../apache/ignite/internal/GridSelfTest.java | 10 +- .../internal/GridSpiExceptionSelfTest.java | 3 +- .../internal/GridStartStopSelfTest.java | 5 +- .../internal/GridStopWithCancelSelfTest.java | 3 +- .../internal/GridStopWithWaitSelfTest.java | 4 +- .../GridTaskCancelSingleNodeSelfTest.java | 4 +- .../GridTaskContinuousMapperSelfTest.java | 5 +- .../GridTaskExecutionContextSelfTest.java | 5 +- .../internal/GridTaskExecutionSelfTest.java | 3 + .../GridTaskFailoverAffinityRunTest.java | 4 +- .../internal/GridTaskFailoverSelfTest.java | 3 +- .../GridTaskFutureImplStopGridSelfTest.java | 3 +- .../GridTaskInstanceExecutionSelfTest.java | 3 +- .../GridTaskInstantiationSelfTest.java | 3 +- .../internal/GridTaskJobRejectSelfTest.java | 3 +- .../internal/GridTaskListenerSelfTest.java | 3 +- .../internal/GridTaskMapAsyncSelfTest.java | 3 +- .../GridTaskNameAnnotationSelfTest.java | 6 +- .../internal/GridTaskResultCacheSelfTest.java | 5 +- .../internal/GridTaskTimeoutSelfTest.java | 5 +- .../GridTopicExternalizableSelfTest.java | 10 +- .../ignite/internal/GridVersionSelfTest.java | 3 +- ...tConnectAfterCommunicationFailureTest.java | 2 + ...IgniteClientReconnectApiExceptionTest.java | 1 + .../IgniteClientReconnectAtomicsTest.java | 16 + ...IgniteClientReconnectBinaryContexTest.java | 1 + .../IgniteClientReconnectCacheTest.java | 16 + .../IgniteClientReconnectCollectionsTest.java | 8 + .../IgniteClientReconnectComputeTest.java | 5 +- ...lientReconnectContinuousProcessorTest.java | 7 +- .../IgniteClientReconnectDelayedSpiTest.java | 1 + ...niteClientReconnectDiscoveryStateTest.java | 3 +- .../IgniteClientReconnectFailoverTest.java | 6 +- .../IgniteClientReconnectServicesTest.java | 6 +- .../IgniteClientReconnectStopTest.java | 3 +- .../IgniteClientReconnectStreamerTest.java | 4 +- .../internal/IgniteClientRejoinTest.java | 3 + .../IgniteComputeEmptyClusterGroupTest.java | 4 +- .../IgniteComputeJobOneThreadTest.java | 1 + .../IgniteComputeResultExceptionTest.java | 12 + .../IgniteComputeTopologyExceptionTest.java | 2 + ...oncurrentEntryProcessorAccessStopTest.java | 1 + ...nectionConcurrentReserveAndRemoveTest.java | 1 + .../IgniteDiscoveryMassiveNodeFailTest.java | 6 + .../internal/IgniteExecutorServiceTest.java | 9 +- ...iteExplicitImplicitDeploymentSelfTest.java | 6 +- .../IgniteInternalCacheRemoveTest.java | 3 +- .../IgniteLocalNodeMapBeforeStartTest.java | 1 + .../IgniteReflectionFactorySelfTest.java | 1 + ...undRobinErrorAfterClientReconnectTest.java | 1 + .../IgniteSlowClientDetectionSelfTest.java | 3 +- ...dateNotifierPerClusterSettingSelfTest.java | 2 + .../internal/LongJVMPauseDetectorTest.java | 2 + .../MarshallerContextLockingSelfTest.java | 1 + .../MemoryLeaksOnRestartNodeTest.java | 3 +- .../ignite/internal/TaskNodeRestartTest.java | 1 + .../TransactionMetricsMxBeanImplTest.java | 2 + .../internal/TransactionsMXBeanImplTest.java | 1 + .../VisorManagementEventSelfTest.java | 4 + .../BinaryArrayIdentityResolverSelfTest.java | 5 + .../binary/BinaryBasicIdMapperSelfTest.java | 2 + .../binary/BinaryBasicNameMapperSelfTest.java | 2 + ...inaryConfigurationConsistencySelfTest.java | 8 + ...ConfigurationCustomSerializerSelfTest.java | 1 + .../internal/binary/BinaryEnumsSelfTest.java | 22 +- .../binary/BinaryFieldExtractionSelfTest.java | 3 + .../binary/BinaryFieldsAbstractSelfTest.java | 30 + .../BinaryFooterOffsetsAbstractSelfTest.java | 5 + .../binary/BinaryMarshallerSelfTest.java | 106 ++++ ...BinaryObjectBuilderAdditionalSelfTest.java | 70 +++ ...ryObjectBuilderDefaultMappersSelfTest.java | 45 ++ .../binary/BinaryObjectExceptionSelfTest.java | 2 + .../binary/BinaryObjectToStringSelfTest.java | 1 + .../BinaryObjectTypeCompatibilityTest.java | 1 + ...inarySerialiedFieldComparatorSelfTest.java | 30 +- .../BinarySimpleNameTestPropertySelfTest.java | 3 + .../internal/binary/BinaryTreeSelfTest.java | 12 + .../binary/GridBinaryAffinityKeySelfTest.java | 3 + ...idBinaryMarshallerCtxDisabledSelfTest.java | 1 + .../binary/GridBinaryWildcardsSelfTest.java | 21 + ...ltBinaryMappersBinaryMetaDataSelfTest.java | 6 + ...AbstractBinaryStreamByteOrderSelfTest.java | 12 + .../BinaryAbstractOutputStreamTest.java | 1 + .../CommandHandlerParsingTest.java | 8 + ...teBufferStreamImplV2ByteOrderSelfTest.java | 14 +- .../EncryptedCacheBigEntryTest.java | 1 + .../encryption/EncryptedCacheCreateTest.java | 3 + .../encryption/EncryptedCacheDestroyTest.java | 2 + .../EncryptedCacheGroupCreateTest.java | 2 + .../EncryptedCacheNodeJoinTest.java | 8 + ...ncryptedCachePreconfiguredRestartTest.java | 4 +- .../encryption/EncryptedCacheRestartTest.java | 1 + ...idManagerLocalMessageListenerSelfTest.java | 3 + ...anagerMxBeanIllegalArgumentHandleTest.java | 1 + .../managers/GridManagerStopSelfTest.java | 10 +- .../managers/GridNoopManagerSelfTest.java | 3 +- .../IgniteDiagnosticMessagesTest.java | 6 + .../GridCheckpointManagerSelfTest.java | 8 +- .../GridCheckpointTaskSelfTest.java | 4 +- ...CommunicationManagerListenersSelfTest.java | 6 +- .../GridCommunicationSendMessageSelfTest.java | 5 +- .../communication/GridIoManagerSelfTest.java | 6 +- .../IgniteCommunicationBalanceTest.java | 3 + .../IgniteIoTestMessagesTest.java | 1 + .../IgniteVariousConnectionNumberTest.java | 1 + .../GridDeploymentManagerStopSelfTest.java | 3 +- .../GridDeploymentMessageCountSelfTest.java | 4 +- ...ridDiscoveryManagerAliveCacheSelfTest.java | 2 + ...ridDiscoveryManagerAttributesSelfTest.java | 8 + .../IgniteTopologyPrintFormatSelfTest.java | 8 +- .../GridEventStorageManagerSelfTest.java | 5 +- .../OptimizedMarshallerEnumSelfTest.java | 3 +- .../OptimizedMarshallerNodeFailoverTest.java | 5 +- .../OptimizedMarshallerSelfTest.java | 6 +- ...shallerSerialPersistentFieldsSelfTest.java | 3 +- .../optimized/OptimizedMarshallerTest.java | 13 + .../OptimizedObjectStreamSelfTest.java | 74 ++- .../pagemem/impl/PageIdUtilsSelfTest.java | 6 + .../impl/PageMemoryNoLoadSelfTest.java | 5 + ...ridCacheTxLoadFromStoreOnLockSelfTest.java | 4 +- ...GridAffinityProcessorAbstractSelfTest.java | 4 +- .../GridAffinityProcessorMemoryLeakTest.java | 1 + .../Authentication1kUsersNodeRestartTest.java | 1 + ...uthenticationConfigurationClusterTest.java | 6 + .../AuthenticationOnNotActiveClusterTest.java | 2 + ...AuthenticationProcessorNPEOnStartTest.java | 1 + ...uthenticationProcessorNodeRestartTest.java | 5 + .../AuthenticationProcessorSelfTest.java | 15 + .../AtomicCacheAffinityConfigurationTest.java | 3 + ...aRegistrationInsideEntryProcessorTest.java | 3 +- .../cache/CacheAffinityCallSelfTest.java | 3 + ...CacheAtomicSingleMessageCountSelfTest.java | 3 + .../cache/CacheClientStoreSelfTest.java | 11 +- .../processors/cache/CacheComparatorTest.java | 1 + .../cache/CacheConcurrentReadThroughTest.java | 1 + .../cache/CacheConfigurationLeakTest.java | 1 + .../cache/CacheConnectionLeakStoreTxTest.java | 11 +- .../CacheDataRegionConfigurationTest.java | 10 + .../cache/CacheDeferredDeleteQueueTest.java | 1 + .../CacheDeferredDeleteSanitySelfTest.java | 1 + ...eDhtLocalPartitionAfterRemoveSelfTest.java | 3 +- .../CacheEntryProcessorCopySelfTest.java | 2 + .../CacheEnumOperationsAbstractTest.java | 3 + ...cheExchangeMessageDuplicatedStateTest.java | 1 + .../cache/CacheFutureExceptionSelfTest.java | 3 +- .../cache/CacheGetEntryAbstractTest.java | 8 + ...ntryPessimisticRepeatableReadSeltTest.java | 3 +- .../processors/cache/CacheGetFromJobTest.java | 3 +- .../CacheGetsDistributionAbstractTest.java | 4 + .../CacheGroupLocalConfigurationSelfTest.java | 2 + .../cache/CacheGroupMetricsMBeanTest.java | 2 + .../CacheGroupsMetricsRebalanceTest.java | 3 + ...ceptorPartitionCounterLocalSanityTest.java | 6 + ...rPartitionCounterRandomOperationsTest.java | 21 + .../cache/CacheKeepBinaryTransactionTest.java | 3 + .../cache/CacheMetricsEntitiesCountTest.java | 1 + .../CacheMetricsForClusterGroupSelfTest.java | 3 + .../cache/CacheMetricsManageTest.java | 9 + .../processors/cache/CacheNamesSelfTest.java | 1 + .../CacheNamesWithSpecialCharactersTest.java | 1 + .../cache/CacheNearReaderUpdateTest.java | 4 + ...eNearUpdateTopologyChangeAbstractTest.java | 3 +- .../cache/CacheNoAffinityExchangeTest.java | 2 + .../cache/CacheOffheapMapEntrySelfTest.java | 3 +- ...eOptimisticTransactionsWithFilterTest.java | 4 + .../CachePutEventListenerErrorSelfTest.java | 4 + .../cache/CachePutIfAbsentTest.java | 1 + .../CacheReadThroughRestartSelfTest.java | 6 +- .../CacheRebalanceConfigValidationTest.java | 1 + .../cache/CacheRebalancingSelfTest.java | 3 + .../cache/CacheRemoveAllSelfTest.java | 3 +- .../CacheSerializableTransactionsTest.java | 90 +++ .../CacheStartupInDeploymentModesTest.java | 2 + .../cache/CacheStopAndDestroySelfTest.java | 15 + ...sageMultinodeDynamicStartAbstractTest.java | 12 +- ...UsageMultinodeStaticStartAbstractTest.java | 12 +- .../cache/CacheTxFastFinishTest.java | 2 + .../CacheTxNotAllowReadFromBackupTest.java | 6 +- .../cache/CacheValidatorMetricsTest.java | 1 + .../cache/CashEventWithTxLabelTest.java | 1 + .../cache/ClusterReadOnlyModeTest.java | 2 + .../cache/ClusterStateAbstractTest.java | 5 + .../cache/ConcurrentCacheStartTest.java | 1 + .../processors/cache/CrossCacheLockTest.java | 1 + .../CrossCacheTxRandomOperationsTest.java | 5 + ...ataStorageConfigurationValidationTest.java | 3 + ...ntryVersionConsistencyReadThroughTest.java | 6 + ...AbstractCacheInterceptorRebalanceTest.java | 6 + .../GridCacheAbstractFailoverSelfTest.java | 2 + .../GridCacheAbstractFailoverTxSelfTest.java | 14 +- ...eAbstractFullApiMultithreadedSelfTest.java | 15 +- .../GridCacheAbstractFullApiSelfTest.java | 148 +++++ .../GridCacheAbstractIteratorsSelfTest.java | 6 +- .../GridCacheAbstractLocalStoreSelfTest.java | 14 +- .../GridCacheAbstractMetricsSelfTest.java | 36 ++ .../GridCacheAbstractRemoveFailureTest.java | 5 +- .../cache/GridCacheAbstractTxReadTest.java | 8 +- ...heAbstractUsersAffinityMapperSelfTest.java | 3 +- .../cache/GridCacheAffinityApiSelfTest.java | 13 +- .../GridCacheAffinityMapperSelfTest.java | 5 +- .../GridCacheAffinityRoutingSelfTest.java | 8 + ...GridCacheAsyncOperationsLimitSelfTest.java | 3 +- ...tomicEntryProcessorDeploymentSelfTest.java | 4 + .../GridCacheAtomicMessageCountSelfTest.java | 4 +- .../cache/GridCacheBasicApiAbstractTest.java | 14 +- .../GridCacheBasicStoreAbstractTest.java | 10 +- ...heBasicStoreMultithreadedAbstractTest.java | 3 +- .../cache/GridCacheClearAllSelfTest.java | 4 +- .../cache/GridCacheClearLocallySelfTest.java | 10 +- .../cache/GridCacheClearSelfTest.java | 12 + ...idCacheConcurrentGetCacheOnClientTest.java | 1 + .../cache/GridCacheConcurrentMapSelfTest.java | 5 + ...ridCacheConcurrentTxMultiNodeLoadTest.java | 1 + ...ridCacheConditionalDeploymentSelfTest.java | 3 + ...CacheConfigurationConsistencySelfTest.java | 26 +- ...dCacheConfigurationValidationSelfTest.java | 4 +- .../GridCacheDaemonNodeAbstractSelfTest.java | 3 + .../cache/GridCacheDeploymentSelfTest.java | 11 + .../GridCacheEntryMemorySizeSelfTest.java | 4 + .../cache/GridCacheEntryVersionSelfTest.java | 5 +- .../GridCacheEvictionEventAbstractTest.java | 3 +- .../GridCacheFinishPartitionsSelfTest.java | 6 +- ...cheFullTextQueryMultithreadedSelfTest.java | 1 + ...CacheGetAndTransformStoreAbstractTest.java | 3 +- .../GridCacheIncrementTransformTest.java | 4 +- .../GridCacheInterceptorAbstractSelfTest.java | 13 +- .../GridCacheIteratorPerformanceTest.java | 5 +- .../cache/GridCacheKeyCheckSelfTest.java | 8 +- .../processors/cache/GridCacheLeakTest.java | 2 + .../GridCacheLifecycleAwareSelfTest.java | 5 +- .../GridCacheMarshallerTxAbstractTest.java | 3 +- .../GridCacheMarshallingNodeJoinSelfTest.java | 3 +- ...GridCacheMissingCommitVersionSelfTest.java | 1 + ...idCacheMixedPartitionExchangeSelfTest.java | 3 +- .../GridCacheMultiUpdateLockSelfTest.java | 4 +- ...dCacheMultinodeUpdateAbstractSelfTest.java | 3 +- ...odeUpdateNearEnabledNoBackupsSelfTest.java | 3 +- ...cheMultinodeUpdateNearEnabledSelfTest.java | 5 +- .../cache/GridCacheMvccFlagsTest.java | 4 +- .../cache/GridCacheMvccManagerSelfTest.java | 5 +- .../GridCacheMvccPartitionedSelfTest.java | 16 + .../cache/GridCacheMvccSelfTest.java | 28 + .../cache/GridCacheNestedTxAbstractTest.java | 5 +- .../GridCacheObjectToStringSelfTest.java | 10 +- ...apMultiThreadedUpdateAbstractSelfTest.java | 6 +- ...cheOffHeapMultiThreadedUpdateSelfTest.java | 5 + .../cache/GridCacheOffheapUpdateSelfTest.java | 4 +- .../GridCacheOnCopyFlagAbstractSelfTest.java | 2 + .../GridCacheOrderedPreloadingSelfTest.java | 6 +- .../cache/GridCacheP2PUndeploySelfTest.java | 10 +- .../GridCachePartitionedGetSelfTest.java | 5 +- ...PartitionedProjectionAffinitySelfTest.java | 2 + .../cache/GridCachePartitionedWritesTest.java | 3 +- .../GridCachePreloadingEvictionsSelfTest.java | 1 + .../GridCachePutAllFailoverSelfTest.java | 12 + ...ridCacheQueryIndexingDisabledSelfTest.java | 6 +- .../GridCacheQueryInternalKeysSelfTest.java | 3 +- ...dCacheQuerySqlFieldInlineSizeSelfTest.java | 6 +- .../GridCacheReferenceCleanupSelfTest.java | 17 +- .../cache/GridCacheReloadSelfTest.java | 6 +- ...dCacheReplicatedSynchronousCommitTest.java | 4 +- .../GridCacheReturnValueTransferSelfTest.java | 4 +- .../cache/GridCacheSlowTxWarnTest.java | 3 +- .../cache/GridCacheStopSelfTest.java | 6 + ...dCacheStoreManagerDeserializationTest.java | 3 + .../cache/GridCacheStorePutxSelfTest.java | 4 +- .../GridCacheStoreValueBytesSelfTest.java | 3 +- .../cache/GridCacheSwapPreloadSelfTest.java | 6 +- ...heTcpClientDiscoveryMultiThreadedTest.java | 3 +- ...eTransactionalAbstractMetricsSelfTest.java | 27 + .../GridCacheTtlManagerEvictionSelfTest.java | 5 +- .../cache/GridCacheTtlManagerLoadTest.java | 1 + .../GridCacheTtlManagerNotificationTest.java | 5 +- .../cache/GridCacheTtlManagerSelfTest.java | 5 +- .../cache/GridCacheUtilsSelfTest.java | 1 + ...GridCacheValueBytesPreloadingSelfTest.java | 3 +- ...CacheValueConsistencyAbstractSelfTest.java | 4 + .../GridCacheVariableTopologySelfTest.java | 3 +- .../cache/GridCacheVersionMultinodeTest.java | 6 +- .../cache/GridCacheVersionSelfTest.java | 4 +- .../GridCacheVersionTopologyChangeTest.java | 3 + ...orageConfigurationConsistencySelfTest.java | 1 + .../cache/GridEvictionPolicyMBeansTest.java | 1 + ...lCacheStoreManagerDeserializationTest.java | 2 + .../GridLocalIgniteSerializationTest.java | 4 + ...ojectionForCachesOnDaemonNodeSelfTest.java | 3 + ...niteAbstractDynamicCacheStartFailTest.java | 23 + .../IgniteCacheAbstractStopBusySelfTest.java | 8 +- .../IgniteCacheAtomicStopBusySelfTest.java | 14 +- ...niteCacheBinaryEntryProcessorSelfTest.java | 4 + .../IgniteCacheBinaryObjectsScanSelfTest.java | 1 + ...gniteCacheConfigVariationsFullApiTest.java | 148 +++++ ...CacheConfigurationDefaultTemplateTest.java | 3 +- .../IgniteCacheConfigurationTemplateTest.java | 8 +- ...gniteCacheContainsKeyAbstractSelfTest.java | 4 +- .../IgniteCacheContainsKeyAtomicTest.java | 2 + ...teCacheCopyOnReadDisabledAbstractTest.java | 1 + .../IgniteCacheCreateRestartSelfTest.java | 1 + .../cache/IgniteCacheDynamicStopSelfTest.java | 2 + .../IgniteCacheEntryListenerAbstractTest.java | 9 + ...teCacheEntryListenerExpiredEventsTest.java | 2 + .../IgniteCacheEntryProcessorCallTest.java | 1 + ...IgniteCacheEntryProcessorNodeJoinTest.java | 4 + ...teCacheExpireAndUpdateConsistencyTest.java | 6 + ...niteCacheGetCustomCollectionsSelfTest.java | 1 + .../cache/IgniteCacheGroupsTest.java | 92 ++++ .../cache/IgniteCacheIncrementTxTest.java | 3 + .../cache/IgniteCacheInvokeAbstractTest.java | 6 +- ...eCacheInvokeReadThroughSingleNodeTest.java | 8 + .../IgniteCacheInvokeReadThroughTest.java | 10 + ...iteCacheLoadRebalanceEvictionSelfTest.java | 1 + .../IgniteCacheManyAsyncOperationsTest.java | 3 +- .../IgniteCacheNearLockValueSelfTest.java | 3 +- .../cache/IgniteCacheNoSyncForGetTest.java | 3 + .../cache/IgniteCacheObjectPutSelfTest.java | 2 + .../IgniteCacheP2pUnmarshallingErrorTest.java | 3 +- ...iteCacheP2pUnmarshallingNearErrorTest.java | 5 +- ...cheP2pUnmarshallingRebalanceErrorTest.java | 3 +- ...gniteCacheP2pUnmarshallingTxErrorTest.java | 5 +- .../IgniteCachePartitionMapUpdateTest.java | 6 +- .../IgniteCachePeekModesAbstractTest.java | 6 + .../cache/IgniteCachePutAllRestartTest.java | 4 +- .../IgniteCachePutStackOverflowSelfTest.java | 3 + ...gniteCacheReadThroughEvictionSelfTest.java | 4 + .../IgniteCacheReadThroughStoreCallTest.java | 1 + ...eCacheScanPredicateDeploymentSelfTest.java | 1 + .../IgniteCacheSerializationSelfTest.java | 1 + .../cache/IgniteCacheStartStopLoadTest.java | 1 + .../cache/IgniteCacheStartTest.java | 3 + .../cache/IgniteCacheStoreCollectionTest.java | 1 + .../IgniteCacheStoreValueAbstractTest.java | 2 + ...iteCacheTransactionalStopBusySelfTest.java | 14 +- .../cache/IgniteCacheTxNearPeekModesTest.java | 3 +- .../cache/IgniteCacheTxPeekModesTest.java | 5 +- .../IgniteCacheTxPreloadNoWriteTest.java | 4 +- .../cache/IgniteCachingProviderSelfTest.java | 4 +- ...gniteClientAffinityAssignmentSelfTest.java | 3 +- ...niteClientCacheInitializationFailTest.java | 4 + .../IgniteClientCacheStartFailoverTest.java | 9 + .../IgniteClusterActivateDeactivateTest.java | 33 ++ ...ActivateDeactivateTestWithPersistence.java | 8 + .../IgniteDaemonNodeMarshallerCacheTest.java | 4 +- .../cache/IgniteDynamicCacheAndNodeStop.java | 1 + .../cache/IgniteDynamicCacheFilterTest.java | 1 + .../IgniteDynamicCacheMultinodeTest.java | 2 + ...amicCacheStartCoordinatorFailoverTest.java | 517 +++++++++--------- ...ynamicCacheStartNoExchangeTimeoutTest.java | 10 +- .../IgniteDynamicCacheStartSelfTest.java | 26 + ...teDynamicCacheStartStopConcurrentTest.java | 1 + ...teDynamicCacheWithConfigStartSelfTest.java | 3 +- ...IgniteDynamicClientCacheStartSelfTest.java | 13 +- .../IgniteExchangeFutureHistoryTest.java | 3 +- ...niteGetNonPlainKeyReadThroughSelfTest.java | 2 + .../IgniteIncompleteCacheObjectSelfTest.java | 1 + .../cache/IgniteInternalCacheTypesTest.java | 1 + ...eMarshallerCacheClassNameConflictTest.java | 1 + ...rCacheClientRequestsMappingOnMissTest.java | 5 + ...arshallerCacheConcurrentReadWriteTest.java | 1 + .../IgniteMarshallerCacheFSRestoreTest.java | 2 + ...IgniteMvccTxMultiThreadedAbstractTest.java | 2 + ...gniteMvccTxSingleThreadedAbstractTest.java | 4 +- .../cache/IgniteNearClientCacheCloseTest.java | 7 + .../cache/IgniteOnePhaseCommitInvokeTest.java | 1 + .../IgniteOnePhaseCommitNearReadersTest.java | 4 + .../IgniteOnePhaseCommitNearSelfTest.java | 1 + .../IgniteOutOfMemoryPropagationTest.java | 2 + .../cache/IgnitePutAllLargeBatchSelfTest.java | 14 +- ...llUpdateNonPreloadedPartitionSelfTest.java | 3 +- ...IgniteStartCacheInTransactionSelfTest.java | 9 +- .../cache/IgniteStaticCacheStartSelfTest.java | 3 +- .../cache/IgniteSystemCacheOnClientTest.java | 3 +- ...iteTopologyValidatorAbstractCacheTest.java | 1 + ...ogyValidatorAbstractTxCacheGroupsTest.java | 5 +- ...eTopologyValidatorAbstractTxCacheTest.java | 5 +- ...ologyValidatorCacheGroupsAbstractTest.java | 3 +- ...teTopologyValidatorGridSplitCacheTest.java | 2 + .../IgniteTxConcurrentGetAbstractTest.java | 3 +- .../cache/IgniteTxConfigCacheSelfTest.java | 2 + .../IgniteTxExceptionAbstractSelfTest.java | 14 + .../cache/IgniteTxMultiNodeAbstractTest.java | 9 +- .../IgniteTxMultiThreadedAbstractTest.java | 13 + .../IgniteTxReentryAbstractSelfTest.java | 3 +- .../IgniteTxSingleThreadedAbstractTest.java | 14 +- ...gniteTxStoreExceptionAbstractSelfTest.java | 16 +- ...eptorCacheConfigVariationsFullApiTest.java | 9 +- .../MarshallerCacheJobRunNodeRestartTest.java | 1 + .../MemoryPolicyConfigValidationTest.java | 10 + ...finityCoordinatorDynamicStartStopTest.java | 1 + ...apCacheMetricsForClusterGroupSelfTest.java | 1 + ...itionsExchangeCoordinatorFailoverTest.java | 2 + ...xchangeOnDiscoveryHistoryOverflowTest.java | 1 + ...etTxTimeoutOnPartitionMapExchangeTest.java | 5 + .../cache/WalModeChangeAbstractSelfTest.java | 10 + .../cache/WalModeChangeAdvancedSelfTest.java | 8 + .../cache/WithKeepBinaryCacheFullApiTest.java | 12 + .../binary/BinaryMetadataUpdatesFlowTest.java | 3 + .../BinaryTxCacheLocalEntriesSelfTest.java | 1 + .../CacheKeepBinaryWithInterceptorTest.java | 1 + ...tomicEntryProcessorDeploymentSelfTest.java | 4 + ...ryObjectMetadataExchangeMultinodeTest.java | 4 + ...heBinaryObjectUserClassloaderSelfTest.java | 2 + ...ryObjectsAbstractDataStreamerSelfTest.java | 1 + ...yObjectsAbstractMultiThreadedSelfTest.java | 3 +- ...ridCacheBinaryObjectsAbstractSelfTest.java | 31 ++ .../GridCacheBinaryStoreAbstractSelfTest.java | 6 + ...NodeBinaryObjectMetadataMultinodeTest.java | 3 + ...cheClientNodeBinaryObjectMetadataTest.java | 1 + .../GridDataStreamerImplSelfTest.java | 4 + ...niteCacheAbstractExecutionContextTest.java | 1 + ...bstractDataStructuresFailoverSelfTest.java | 48 ++ ...tQueueFailoverDataConsistencySelfTest.java | 6 +- ...cheAtomicReferenceApiSelfAbstractTest.java | 8 +- ...eAtomicReferenceMultiNodeAbstractTest.java | 4 +- ...CacheAtomicStampedApiSelfAbstractTest.java | 7 +- .../GridCacheQueueApiSelfAbstractTest.java | 25 + .../GridCacheQueueCleanupSelfTest.java | 3 +- .../GridCacheQueueClientDisconnectTest.java | 255 ++++----- ...dCacheQueueJoinedNodeSelfAbstractTest.java | 3 +- ...idCacheQueueMultiNodeAbstractSelfTest.java | 11 +- ...acheQueueMultiNodeConsistencySelfTest.java | 6 +- ...cheQueueRotativeMultiNodeAbstractTest.java | 5 +- .../GridCacheSequenceApiSelfAbstractTest.java | 16 +- ...acheSequenceMultiNodeAbstractSelfTest.java | 5 +- .../GridCacheSetAbstractSelfTest.java | 21 + .../GridCacheSetFailoverAbstractSelfTest.java | 1 + .../IgniteAtomicLongApiAbstractSelfTest.java | 14 +- ...gniteClientDataStructuresAbstractTest.java | 7 + .../IgniteCountDownLatchAbstractSelfTest.java | 5 + .../IgniteDataStructureUniqueNameTest.java | 4 + .../IgniteDataStructureWithJobTest.java | 3 +- ...changeLatchManagerCoordinatorFailTest.java | 3 + .../IgniteLockAbstractSelfTest.java | 16 + .../IgniteSemaphoreAbstractSelfTest.java | 5 + .../IgniteSequenceInternalCleanupTest.java | 1 + ...emaphoreFailoverNoWaitingAcquirerTest.java | 4 +- ...maphoreFailoverSafeReleasePermitsTest.java | 2 + .../IgniteLocalCountDownLatchSelfTest.java | 5 +- .../local/IgniteLocalLockSelfTest.java | 3 +- .../local/IgniteLocalSemaphoreSelfTest.java | 3 +- ...tionedAtomicSequenceMultiThreadedTest.java | 14 +- ...hePartitionedAtomicSequenceTxSelfTest.java | 4 +- ...ePartitionedAtomicSetFailoverSelfTest.java | 3 +- ...CachePartitionedNodeRestartTxSelfTest.java | 5 +- ...rtitionedQueueCreateMultiNodeSelfTest.java | 2 + ...achePartitionedQueueEntryMoveSelfTest.java | 3 +- ...idCachePartitionedSetFailoverSelfTest.java | 5 +- .../IgnitePartitionedQueueNoBackupsTest.java | 1 + ...IgnitePartitionedSetNoBackupsSelfTest.java | 1 + .../distributed/Cache64kPartitionsTest.java | 2 + .../CacheAbstractRestartSelfTest.java | 1 + .../distributed/CacheAffinityEarlyTest.java | 3 +- ...heAsyncOperationsFailoverAbstractTest.java | 5 +- .../distributed/CacheAsyncOperationsTest.java | 5 +- ...acheAtomicPrimarySyncBackPressureTest.java | 2 + .../CacheBaselineTopologyTest.java | 11 + .../distributed/CacheBlockOnGetAllTest.java | 96 ++-- .../CacheBlockOnReadAbstractTest.java | 36 ++ .../distributed/CacheBlockOnScanTest.java | 36 +- .../CacheBlockOnSingleGetTest.java | 96 ++-- .../CacheClientsConcurrentStartTest.java | 3 +- .../CacheDataLossOnPartitionMoveTest.java | 1 + .../CacheDiscoveryDataConcurrentJoinTest.java | 4 +- .../distributed/CacheExchangeMergeTest.java | 28 + .../CacheGetFutureHangsSelfTest.java | 1 + ...acheGetInsideLockChangingTopologyTest.java | 6 + .../distributed/CacheGroupsPreloadTest.java | 8 + ...inityAssignmentNodeJoinValidationTest.java | 2 + .../CacheLateAffinityAssignmentTest.java | 53 ++ ...cheLoadingConcurrentGridStartSelfTest.java | 7 + .../CacheLockReleaseNodeLeaveTest.java | 6 + .../CacheOperationsInterruptTest.java | 3 +- .../CachePageWriteLockUnlockTest.java | 1 + .../distributed/CacheParallelStartTest.java | 2 + .../distributed/CachePartitionStateTest.java | 8 + .../CachePutAllFailoverAbstractTest.java | 3 + .../CacheRentingStateRepairTest.java | 1 + ...cheResultIsNotNullOnPartitionLossTest.java | 3 + .../distributed/CacheStartOnJoinTest.java | 4 +- .../CacheTryLockMultithreadedTest.java | 1 + ...actDistributedByteArrayValuesSelfTest.java | 6 +- .../GridCacheAbstractJobExecutionTest.java | 4 +- .../GridCacheAbstractNodeRestartSelfTest.java | 19 + .../GridCacheAbstractPrimarySyncSelfTest.java | 3 +- .../GridCacheBasicOpAbstractTest.java | 6 +- .../GridCacheClientModesAbstractSelfTest.java | 5 +- .../GridCacheEntrySetAbstractSelfTest.java | 3 +- ...heEntrySetIterationPreloadingSelfTest.java | 3 +- .../GridCacheEventAbstractTest.java | 13 + .../GridCacheLockAbstractTest.java | 5 + .../GridCacheMixedModeSelfTest.java | 3 +- .../GridCacheMultiNodeAbstractTest.java | 9 +- .../GridCacheMultiNodeLockAbstractTest.java | 8 +- ...acheMultithreadedFailoverAbstractTest.java | 3 +- .../GridCacheNodeFailureAbstractTest.java | 10 +- ...tionEvictionDuringReadThroughSelfTest.java | 1 + ...dCachePartitionNotLoadedEventSelfTest.java | 4 + ...ePartitionedReloadAllAbstractSelfTest.java | 3 +- ...ridCachePreloadEventsAbstractSelfTest.java | 3 +- ...idCachePreloadRestartAbstractSelfTest.java | 5 +- .../GridCacheTransformEventSelfTest.java | 24 + ...etadataUpdateChangingTopologySelfTest.java | 2 + ...teBinaryMetadataUpdateNodeRestartTest.java | 3 +- .../IgniteCache150ClientsTest.java | 3 +- .../IgniteCacheAtomicNodeRestartTest.java | 5 +- ...ClientMultiNodeUpdateTopologyLockTest.java | 1 + ...teCacheClientNodeChangingTopologyTest.java | 26 + .../IgniteCacheClientNodeConcurrentStart.java | 3 +- ...CacheClientNodePartitionsExchangeTest.java | 10 +- .../IgniteCacheClientReconnectTest.java | 5 +- .../IgniteCacheConnectionRecoveryTest.java | 1 + ...IgniteCacheCreatePutMultiNodeSelfTest.java | 3 +- .../distributed/IgniteCacheCreatePutTest.java | 4 +- .../IgniteCacheFailedUpdateResponseTest.java | 2 + .../IgniteCacheGetRestartTest.java | 4 + ...acheGroupsPartitionLossPolicySelfTest.java | 5 + .../IgniteCacheManyClientsTest.java | 5 +- ...gniteCacheMessageRecoveryAbstractTest.java | 3 +- ...acheMessageRecoveryIdleConnectionTest.java | 2 + .../IgniteCacheMessageWriteTimeoutTest.java | 1 + ...gniteCacheNearRestartRollbackSelfTest.java | 1 + .../IgniteCacheNodeJoinAbstractTest.java | 4 +- ...gniteCachePartitionLossPolicySelfTest.java | 24 + .../IgniteCachePrimarySyncTest.java | 1 + .../IgniteCachePutGetRestartAbstractTest.java | 3 +- .../IgniteCacheReadFromBackupTest.java | 4 + .../IgniteCacheServerNodeConcurrentStart.java | 3 +- .../IgniteCacheSingleGetMessageTest.java | 1 + .../IgniteCacheSizeFailoverTest.java | 3 +- ...IgniteCacheSystemTransactionsSelfTest.java | 4 +- .../IgniteCacheThreadLocalTxTest.java | 2 + .../IgniteCacheTxIteratorSelfTest.java | 4 +- .../IgniteCrossCacheTxStoreSelfTest.java | 5 +- .../IgniteMvccTxTimeoutAbstractTest.java | 1 + .../IgniteOptimisticTxSuspendResumeTest.java | 12 + .../IgnitePessimisticTxSuspendResumeTest.java | 1 + .../IgniteRejectConnectOnNodeStopTest.java | 1 + .../IgniteTxCachePrimarySyncTest.java | 7 + ...SynchronizationModesMultithreadedTest.java | 6 + .../IgniteTxConcurrentRemoveObjectsTest.java | 1 + ...eTxConsistencyRestartAbstractSelfTest.java | 3 +- .../distributed/IgniteTxGetAfterStopTest.java | 5 +- ...riginatingNodeFailureAbstractSelfTest.java | 2 + ...riginatingNodeFailureAbstractSelfTest.java | 4 + .../IgniteTxPreloadAbstractTest.java | 3 + .../IgniteTxRemoveTimeoutObjectsTest.java | 1 + .../IgniteTxTimeoutAbstractTest.java | 6 + .../CacheGetReadFromBackupFailoverTest.java | 3 +- ...hePartitionPartialCountersMapSelfTest.java | 3 +- ...artitionedOnlyByteArrayValuesSelfTest.java | 3 +- ...AbstractTransformWriteThroughSelfTest.java | 14 +- .../dht/GridCacheAtomicFullApiSelfTest.java | 6 +- .../dht/GridCacheAtomicNearCacheSelfTest.java | 4 +- .../dht/GridCacheColocatedDebugTest.java | 29 +- ...olocatedOptimisticTransactionSelfTest.java | 3 +- .../dht/GridCacheDhtEntrySelfTest.java | 3 + ...idCacheDhtEvictionNearReadersSelfTest.java | 3 +- ...GridCacheDhtEvictionsDisabledSelfTest.java | 5 +- .../dht/GridCacheDhtMappingSelfTest.java | 3 +- .../dht/GridCacheDhtMultiBackupTest.java | 1 + .../GridCacheDhtPreloadBigDataSelfTest.java | 4 +- .../GridCacheDhtPreloadDelayedSelfTest.java | 8 +- .../GridCacheDhtPreloadDisabledSelfTest.java | 4 +- .../GridCacheDhtPreloadMessageCountTest.java | 3 +- ...dCacheDhtPreloadMultiThreadedSelfTest.java | 5 +- .../GridCacheDhtPreloadPerformanceTest.java | 1 + .../GridCacheDhtPreloadPutGetSelfTest.java | 11 +- .../dht/GridCacheDhtPreloadSelfTest.java | 16 +- .../GridCacheDhtPreloadStartStopSelfTest.java | 3 +- .../GridCacheDhtPreloadUnloadSelfTest.java | 6 +- .../dht/GridCacheGlobalLoadTest.java | 5 +- ...hePartitionedNearDisabledLockSelfTest.java | 5 +- ...artitionedNearDisabledMetricsSelfTest.java | 3 +- ...achePartitionedTopologyChangeSelfTest.java | 9 +- ...ionedTxOriginatingNodeFailureSelfTest.java | 4 + ...dCachePartitionedUnloadEventsSelfTest.java | 1 + ...ridCachePartitionsStateValidationTest.java | 2 + ...CachePartitionsStateValidatorSelfTest.java | 2 + .../dht/GridCacheTxNodeFailureSelfTest.java | 12 + ...iteAtomicLongChangingTopologySelfTest.java | 7 + .../IgniteCacheClearDuringRebalanceTest.java | 1 + .../IgniteCacheCommitDelayTxRecoveryTest.java | 4 + .../IgniteCacheConcurrentPutGetRemove.java | 2 + .../IgniteCacheCrossCacheTxFailoverTest.java | 8 + .../dht/IgniteCacheLockFailoverSelfTest.java | 4 +- .../dht/IgniteCacheMultiTxLockSelfTest.java | 5 +- ...titionedBackupNodeFailureRecoveryTest.java | 1 + ...rimaryNodeFailureRecoveryAbstractTest.java | 16 + .../IgniteCachePutRetryAbstractSelfTest.java | 13 +- .../IgniteCachePutRetryAtomicSelfTest.java | 3 +- ...iteCachePutRetryTransactionalSelfTest.java | 7 + .../dht/IgniteCacheStartWithLoadTest.java | 1 + .../IgniteCacheTxRecoveryRollbackTest.java | 12 + .../dht/IgniteCrossCacheTxSelfTest.java | 5 + .../dht/NotMappedPartitionInTxTest.java | 4 + .../dht/TxRecoveryStoreEnabledTest.java | 2 + .../AtomicPutAllChangingTopologyTest.java | 3 +- ...tomicInvalidPartitionHandlingSelfTest.java | 3 + .../GridCacheAtomicPreloadSelfTest.java | 6 +- .../atomic/IgniteCacheAtomicProtocolTest.java | 26 + ...micClientOnlyMultiNodeFullApiSelfTest.java | 26 +- ...tomicNearOnlyMultiNodeFullApiSelfTest.java | 5 +- ...omicPartitionedTckMetricsSelfTestImpl.java | 8 +- .../near/GridCacheGetStoreErrorSelfTest.java | 6 +- .../GridCacheNearAtomicMetricsSelfTest.java | 1 + .../near/GridCacheNearClientHitTest.java | 1 + .../near/GridCacheNearEvictionSelfTest.java | 3 + .../near/GridCacheNearMetricsSelfTest.java | 13 + .../near/GridCacheNearMultiGetSelfTest.java | 22 +- .../near/GridCacheNearMultiNodeSelfTest.java | 21 +- .../near/GridCacheNearOneNodeSelfTest.java | 10 +- ...CacheNearOnlyMultiNodeFullApiSelfTest.java | 17 +- .../near/GridCacheNearOnlySelfTest.java | 3 +- .../GridCacheNearOnlyTopologySelfTest.java | 8 + ...GridCacheNearPartitionedClearSelfTest.java | 3 +- .../GridCacheNearReaderPreloadSelfTest.java | 3 +- .../near/GridCacheNearReadersSelfTest.java | 7 + .../near/GridCacheNearTxForceKeyTest.java | 1 + .../GridCacheNearTxMultiNodeSelfTest.java | 2 + ...finityExcludeNeighborsPerformanceTest.java | 4 +- .../GridCachePartitionedAffinitySelfTest.java | 4 +- .../GridCachePartitionedBasicOpSelfTest.java | 14 +- ...artitionedBasicStoreMultiNodeSelfTest.java | 10 +- ...nedClientOnlyNoPrimaryFullApiSelfTest.java | 4 +- .../GridCachePartitionedEvictionSelfTest.java | 8 +- ...tionedExplicitLockNodeFailureSelfTest.java | 1 + ...idCachePartitionedFilteredPutSelfTest.java | 4 +- .../GridCachePartitionedFullApiSelfTest.java | 3 +- ...CachePartitionedHitsAndMissesSelfTest.java | 3 +- ...GridCachePartitionedLoadCacheSelfTest.java | 4 +- ...hePartitionedMultiNodeCounterSelfTest.java | 6 +- ...hePartitionedMultiNodeFullApiSelfTest.java | 7 + ...CachePartitionedMultiNodeLockSelfTest.java | 17 +- ...artitionedMultiThreadedPutGetSelfTest.java | 8 +- .../GridCachePartitionedNodeRestartTest.java | 47 +- ...artitionedOptimisticTxNodeRestartTest.java | 47 +- ...hePartitionedPreloadLifecycleSelfTest.java | 4 + .../GridCachePartitionedStorePutSelfTest.java | 3 +- ...idCachePartitionedTxMultiNodeSelfTest.java | 23 +- ...GridCachePartitionedTxSalvageSelfTest.java | 6 +- .../near/GridCachePutArrayValueSelfTest.java | 3 +- ...CacheRendezvousAffinityClientSelfTest.java | 3 +- .../near/GridNearCacheStoreUpdateTest.java | 5 + .../GridPartitionedBackupLoadSelfTest.java | 3 +- .../near/IgniteCacheNearOnlyTxTest.java | 6 +- .../IgniteCacheNearReadCommittedTest.java | 3 +- .../near/IgniteCacheNearTxRollbackTest.java | 3 +- .../NearCacheMultithreadedUpdateTest.java | 4 + .../near/NearCachePutAllMultinodeTest.java | 3 +- .../near/NearCacheSyncUpdateTest.java | 3 + .../near/NoneRebalanceModeSelfTest.java | 3 +- .../CacheManualRebalancingTest.java | 3 +- .../rebalancing/CacheNodeSafeAssertion.java | 3 +- ...ngDelayedPartitionMapExchangeSelfTest.java | 1 + .../GridCacheRebalancingAsyncSelfTest.java | 3 +- .../GridCacheRebalancingCancelTest.java | 1 + .../GridCacheRebalancingOrderingTest.java | 1 + ...CacheRebalancingPartitionCountersTest.java | 1 + ...eRebalancingPartitionDistributionTest.java | 4 +- ...GridCacheRebalancingSyncCheckDataTest.java | 1 + .../GridCacheRebalancingSyncSelfTest.java | 3 + ...ebalancingUnmarshallingFailedSelfTest.java | 1 + ...CacheRebalancingWithAsyncClearingTest.java | 2 + .../GridCacheReplicatedLockSelfTest.java | 5 +- ...ridCacheReplicatedNodeRestartSelfTest.java | 48 +- ...idCacheReplicatedTxMultiNodeBasicTest.java | 21 +- ...ridCacheSyncReplicatedPreloadSelfTest.java | 4 +- .../GridReplicatedTxPreloadTest.java | 3 +- .../IgniteCacheSyncRebalanceModeSelfTest.java | 2 + ...cheReplicatedPreloadLifecycleSelfTest.java | 4 + .../GridCacheReplicatedPreloadSelfTest.java | 17 + ...licatedPreloadStartStopEventsSelfTest.java | 3 +- .../eviction/DhtAndNearEvictionTest.java | 2 + .../cache/eviction/EvictionAbstractTest.java | 24 +- .../EvictionPolicyFactoryAbstractTest.java | 24 +- ...ConcurrentEvictionConsistencySelfTest.java | 11 +- .../GridCacheConcurrentEvictionsSelfTest.java | 5 +- ...GridCacheEmptyEntriesAbstractSelfTest.java | 3 +- .../GridCacheEmptyEntriesLocalSelfTest.java | 5 +- ...dCacheEmptyEntriesPartitionedSelfTest.java | 5 +- ...GridCacheEvictableEntryEqualsSelfTest.java | 1 + .../GridCacheEvictionFilterSelfTest.java | 7 +- .../GridCacheEvictionLockUnlockSelfTest.java | 5 +- .../GridCacheEvictionTouchSelfTest.java | 6 +- .../lru/LruEvictionPolicyFactorySelfTest.java | 3 +- .../lru/LruEvictionPolicySelfTest.java | 3 +- .../lru/LruNearEvictionPolicySelfTest.java | 4 +- ...LruNearOnlyNearEvictionPolicySelfTest.java | 6 +- .../paged/PageEvictionMetricTest.java | 1 + .../PageEvictionMultinodeAbstractTest.java | 1 + ...eEvictionPagesRecyclingAndReusingTest.java | 4 + .../paged/PageEvictionReadThroughTest.java | 4 + .../paged/PageEvictionTouchOrderTest.java | 4 + ...PageEvictionWithRebalanceAbstractTest.java | 1 + .../SortedEvictionPolicyPerformanceTest.java | 3 +- .../IgniteCacheClientNearCacheExpiryTest.java | 3 +- .../IgniteCacheExpiryPolicyAbstractTest.java | 13 + ...acheExpiryPolicyWithStoreAbstractTest.java | 6 +- .../IgniteCacheLargeValueExpireTest.java | 1 + ...acheOnlyOneTtlCleanupThreadExistsTest.java | 1 + ...gniteCacheTxExpiryPolicyWithStoreTest.java | 5 +- .../IgniteCacheLoadAllAbstractTest.java | 3 +- .../IgniteCacheLoaderWriterAbstractTest.java | 6 +- ...eCacheNoLoadPreviousValueAbstractTest.java | 3 +- .../IgniteCacheNoReadThroughAbstractTest.java | 3 +- ...IgniteCacheNoWriteThroughAbstractTest.java | 3 +- ...niteCacheStoreNodeRestartAbstractTest.java | 3 +- .../IgniteCacheStoreSessionAbstractTest.java | 3 +- ...heStoreSessionWriteBehindAbstractTest.java | 5 +- .../IgniteCacheTxStoreSessionTest.java | 4 +- ...acheAtomicLocalTckMetricsSelfTestImpl.java | 6 +- ...GridCacheLocalByteArrayValuesSelfTest.java | 7 +- .../local/GridCacheLocalFullApiSelfTest.java | 3 + .../GridCacheLocalIsolatedNodesSelfTest.java | 3 +- .../local/GridCacheLocalLoadAllSelfTest.java | 3 +- .../local/GridCacheLocalLockSelfTest.java | 5 +- .../GridCacheLocalMultithreadedSelfTest.java | 7 +- .../GridCacheLocalTxTimeoutSelfTest.java | 6 + ...micNearEnabledMultiJvmFullApiSelfTest.java | 5 +- ...icatedNearOnlyMultiJvmFullApiSelfTest.java | 5 +- ...cAbstractBasicCoordinatorFailoverTest.java | 3 + ...heMvccAbstractCoordinatorFailoverTest.java | 11 + .../mvcc/CacheMvccClusterRestartTest.java | 3 + .../CacheMvccConfigurationValidationTest.java | 6 + ...IteratorWithConcurrentTransactionTest.java | 1 + ...lEntriesWithConcurrentTransactionTest.java | 1 + .../mvcc/CacheMvccOperationChecksTest.java | 5 + ...vccPartitionedCoordinatorFailoverTest.java | 14 + .../mvcc/CacheMvccProcessorLazyStartTest.java | 4 + .../cache/mvcc/CacheMvccProcessorTest.java | 2 + .../CacheMvccRemoteTxOnNearNodeStartTest.java | 1 + ...canQueryWithConcurrentTransactionTest.java | 1 + ...MvccSizeWithConcurrentTransactionTest.java | 1 + .../cache/mvcc/CacheMvccTransactionsTest.java | 91 +++ .../cache/mvcc/CacheMvccTxFailoverTest.java | 7 + .../cache/mvcc/CacheMvccVacuumTest.java | 4 + .../cache/mvcc/MvccCachePeekTest.java | 1 + .../mvcc/MvccUnsupportedTxModesTest.java | 46 ++ ...aselineAffinityTopologyActivationTest.java | 21 + .../IgniteDataStorageMetricsSelfTest.java | 1 + ...PdsBinaryMetadataOnClusterRestartTest.java | 8 + .../IgnitePdsBinarySortObjectFieldsTest.java | 1 + ...itePdsCacheAssignmentNodeRestartsTest.java | 3 +- ...ConfigurationFileConsistencyCheckTest.java | 3 + ...eObjectBinaryProcessorOnDiscoveryTest.java | 1 + ...IgnitePdsCacheRebalancingAbstractTest.java | 6 + ...sCacheStartStopWithFreqCheckpointTest.java | 1 + .../IgnitePdsContinuousRestartTest.java | 14 + .../IgnitePdsCorruptedIndexTest.java | 1 + .../IgnitePdsCorruptedStoreTest.java | 6 + .../IgnitePdsDestroyCacheTest.java | 6 +- ...PdsDestroyCacheWithoutCheckpointsTest.java | 2 + .../IgnitePdsDynamicCacheTest.java | 2 + ...IgnitePdsExchangeDuringCheckpointTest.java | 2 + ...rshallerMappingRestoreOnNodeStartTest.java | 1 + .../persistence/IgnitePdsPageSizesTest.java | 5 + .../IgnitePdsPartitionFilesDestroyTest.java | 5 + .../IgnitePdsPartitionsStateRecoveryTest.java | 2 + ...itePdsRecoveryAfterFileCorruptionTest.java | 1 + .../IgnitePdsRemoveDuringRebalancingTest.java | 1 + .../IgnitePdsTaskCancelingTest.java | 2 + .../IgnitePdsTxCacheRebalancingTest.java | 1 + .../IgnitePersistentStoreCacheGroupsTest.java | 9 + ...nitePersistentStoreDataStructuresTest.java | 8 + ...RebalanceScheduleResendPartitionsTest.java | 1 + ...ngeDuringRebalanceOnNonNodeAssignTest.java | 1 + ...alModeChangeDuringRebalancingSelfTest.java | 8 + .../MemoryPolicyInitializationTest.java | 6 + ...ersistenceDirectoryWarningLoggingTest.java | 2 + ...entAffinityAssignmentWithBaselineTest.java | 30 +- ...teAbsentEvictionNodeOutOfBaselineTest.java | 1 + .../db/CheckpointBufferDeadlockTest.java | 2 + .../db/IgniteLogicalRecoveryTest.java | 6 + .../db/IgnitePdsCacheRestoreTest.java | 2 + ...ePdsCacheWalDisabledOnRebalancingTest.java | 4 +- .../db/IgnitePdsDataRegionMetricsTest.java | 4 + .../IgnitePdsMultiNodePutGetRestartTest.java | 1 + ...sPageEvictionDuringPartitionClearTest.java | 1 + .../db/IgnitePdsPageEvictionTest.java | 1 + .../db/IgnitePdsPartitionPreloadTest.java | 23 + ...PdsRebalancingOnNotStableTopologyTest.java | 1 + .../db/IgnitePdsReserveWalSegmentsTest.java | 2 + .../db/IgnitePdsTransactionsHangTest.java | 1 + .../db/IgnitePdsWholeClusterRestartTest.java | 1 + .../persistence/db/IgnitePdsWithTtlTest.java | 6 +- ...owHistoricalRebalanceSmallHistoryTest.java | 1 + ...iteCheckpointDirtyPagesForLowLoadTest.java | 3 +- .../checkpoint/IgniteMassLoadSandboxTest.java | 4 + ...ultPageSizeBackwardsCompatibilityTest.java | 1 + ...tePdsCacheDestroyDuringCheckpointTest.java | 1 + .../file/IgnitePdsCacheIntegrationTest.java | 2 + .../file/IgnitePdsCheckpointSimpleTest.java | 1 + ...pointSimulationWithRealCpDisabledTest.java | 5 + .../IgnitePdsDiskErrorsRecoveringTest.java | 5 + .../file/IgnitePdsNoActualWalHistoryTest.java | 1 + .../db/file/IgnitePdsPageReplacementTest.java | 1 + .../file/IgnitePdsThreadInterruptionTest.java | 4 +- .../IgniteUidAsConsistentIdMigrationTest.java | 14 + .../wal/FsyncWalRolloverDoesNotBlockTest.java | 3 +- ...IgniteNodeStoppedDuringDisableWALTest.java | 1 + ...ReachedDuringIterationOverArchiveTest.java | 2 + .../db/wal/IgniteWalFlushFailoverTest.java | 2 + ...lushMultiNodeFailoverAbstractSelfTest.java | 2 + .../wal/IgniteWalFormatFileFailoverTest.java | 509 ++++++++--------- .../wal/IgniteWalHistoryReservationsTest.java | 5 + ...iteWalIteratorExceptionDuringReadTest.java | 1 + .../IgniteWalIteratorSwitchSegmentTest.java | 3 + .../db/wal/IgniteWalRebalanceTest.java | 7 +- .../db/wal/IgniteWalRecoveryPPCTest.java | 2 + .../IgniteWalRecoverySeveralRestartsTest.java | 3 + .../wal/IgniteWalSerializerVersionTest.java | 2 + .../db/wal/WalCompactionAfterRestartTest.java | 1 + .../persistence/db/wal/WalCompactionTest.java | 5 + .../wal/WalDeletionArchiveAbstractTest.java | 5 + .../persistence/db/wal/WalPathsTest.java | 2 + .../wal/WalRecoveryTxLogicalRecordsTest.java | 9 + .../db/wal/WalRolloverRecordLoggingTest.java | 1 + .../db/wal/WalRolloverTypesTest.java | 16 + ...niteAbstractWalIteratorInvalidCrcTest.java | 3 + .../db/wal/crc/IgniteDataIntegrityTests.java | 4 + .../crc/IgnitePureJavaCrcCompatibility.java | 1 + ...IgniteReplayWalIteratorInvalidCrcTest.java | 3 +- .../db/wal/reader/IgniteWalReaderTest.java | 13 + .../persistence/file/FileDownloaderTest.java | 3 +- .../IgniteMetaStorageBasicTest.java | 4 + .../pagemem/FillFactorMetricTest.java | 2 + .../pagemem/PageIdDistributionTest.java | 2 + .../pagemem/PageMemoryImplNoLoadTest.java | 3 +- .../pagemem/PageMemoryImplTest.java | 5 + .../pagemem/PageMemoryNoStoreLeakTest.java | 1 + .../PagesWriteThrottleSandboxTest.java | 1 + .../pagemem/PagesWriteThrottleSmokeTest.java | 1 + .../IgniteChangeGlobalStateCacheTest.java | 3 + ...niteChangeGlobalStateDataStreamerTest.java | 1 + ...iteChangeGlobalStateDataStructureTest.java | 3 + .../IgniteChangeGlobalStateFailOverTest.java | 3 + .../IgniteChangeGlobalStateServiceTest.java | 1 + .../IgniteChangeGlobalStateTest.java | 14 + ...IgniteNoParrallelClusterIsAllowedTest.java | 1 + .../IgniteStandByClusterTest.java | 8 + .../join/JoinActiveNodeToActiveCluster.java | 30 +- .../join/JoinActiveNodeToInActiveCluster.java | 30 +- .../join/JoinInActiveNodeToActiveCluster.java | 30 +- .../JoinInActiveNodeToInActiveCluster.java | 30 +- ...iveNodeToActiveClusterWithPersistence.java | 12 +- .../IgniteStandByClientReconnectTest.java | 4 + ...tandByClientReconnectToNewClusterTest.java | 4 + .../tree/io/TrackingPageIOTest.java | 9 +- .../wal/SegmentedRingByteBufferTest.java | 12 +- .../wal/aware/SegmentAwareTest.java | 30 +- .../StandaloneWalRecordsIteratorTest.java | 4 +- .../query/CacheScanQueryFailoverTest.java | 2 + .../GridCacheQueryTransformerSelfTest.java | 14 + .../cache/query/GridCircularQueueTest.java | 3 +- .../IgniteCacheQueryCacheDestroySelfTest.java | 1 + .../cache/query/IndexingSpiQuerySelfTest.java | 5 + .../query/IndexingSpiQueryTxSelfTest.java | 3 + .../ScanQueryOffheapExpiryPolicySelfTest.java | 1 + .../CacheContinuousBatchAckTest.java | 16 + ...nuousQueryAsyncFailoverMvccTxSelfTest.java | 9 +- ...ontinuousQueryAsyncFilterListenerTest.java | 40 ++ ...ousQueryConcurrentPartitionUpdateTest.java | 12 + ...cheContinuousQueryCounterAbstractTest.java | 5 + .../CacheContinuousQueryEventBufferTest.java | 2 + ...heContinuousQueryExecuteInPrimaryTest.java | 9 + ...QueryFactoryFilterRandomOperationTest.java | 1 + ...ntinuousQueryFailoverAbstractSelfTest.java | 18 + ...ContinuousQueryFailoverMvccTxSelfTest.java | 11 +- ...CacheContinuousQueryLostPartitionTest.java | 7 + ...tinuousQueryOperationFromCallbackTest.java | 11 + .../CacheContinuousQueryOperationP2PTest.java | 12 + ...CacheContinuousQueryOrderingEventTest.java | 18 + ...heContinuousQueryRandomOperationsTest.java | 46 ++ .../CacheContinuousQueryVariationsTest.java | 14 +- ...ContinuousWithTransformerFailoverTest.java | 3 + ...uousWithTransformerReplicatedSelfTest.java | 18 + ...ntryProcessorExternalizableFailedTest.java | 13 + ...acheEntryProcessorNonSerializableTest.java | 13 + ...cheKeepBinaryIterationNearEnabledTest.java | 6 +- ...heKeepBinaryIterationStoreEnabledTest.java | 6 +- .../CacheKeepBinaryIterationTest.java | 8 +- .../ClientReconnectContinuousQueryTest.java | 1 + .../ContinuousQueryMarshallerTest.java | 2 + .../ContinuousQueryPeerClassLoadingTest.java | 3 + .../ContinuousQueryReassignmentTest.java | 3 + ...emoteFilterMissingInClassPathSelfTest.java | 4 + ...dCacheContinuousQueryAbstractSelfTest.java | 17 + ...ridCacheContinuousQueryAtomicSelfTest.java | 5 +- ...ridCacheContinuousQueryConcurrentTest.java | 10 + ...ontinuousQueryMultiNodesFilteringTest.java | 2 + ...acheContinuousQueryNodesFilteringTest.java | 2 + ...ontinuousQueryPartitionedOnlySelfTest.java | 5 +- ...ntinuousQueryReplicatedAtomicSelfTest.java | 5 +- ...acheContinuousQueryReplicatedSelfTest.java | 4 +- ...ontinuousQueryReplicatedTxOneNodeTest.java | 4 + .../GridCacheContinuousQueryTxSelfTest.java | 5 +- ...teCacheContinuousQueryBackupQueueTest.java | 3 + ...cheContinuousQueryClientReconnectTest.java | 4 +- .../IgniteCacheContinuousQueryClientTest.java | 5 +- ...acheContinuousQueryImmutableEntryTest.java | 4 +- ...CacheContinuousQueryNoUnsubscribeTest.java | 2 + ...niteCacheContinuousQueryReconnectTest.java | 2 + ...GridCacheWriteBehindStoreAbstractTest.java | 5 +- ...WriteBehindStoreMultithreadedSelfTest.java | 6 + ...hindStorePartitionedMultiNodeSelfTest.java | 5 +- .../GridCacheWriteBehindStoreSelfTest.java | 13 + ...gniteCacheWriteBehindNoUpdateSelfTest.java | 1 + ...cheClientWriteBehindStoreAbstractTest.java | 3 +- ...ientWriteBehindStoreNonCoalescingTest.java | 1 + .../AtomicOperationsInTxTest.java | 3 + .../transactions/DepthFirstSearchTest.java | 5 + ...tegrityWithPrimaryIndexCorruptionTest.java | 12 + ...ionIntegrityWithSystemWorkerDeathTest.java | 1 + .../TxDataConsistencyOnCommitFailureTest.java | 3 + .../transactions/TxDeadlockCauseTest.java | 5 + ...adlockDetectionMessageMarshallingTest.java | 1 + .../TxDeadlockDetectionNoHangsTest.java | 2 + .../transactions/TxDeadlockDetectionTest.java | 5 + ...xDeadlockDetectionUnmasrhalErrorsTest.java | 1 + .../cache/transactions/TxLabelTest.java | 1 + .../TxMultiCacheAsyncOpsTest.java | 2 + .../transactions/TxOnCachesStartTest.java | 1 + ...misticDeadlockDetectionCrossCacheTest.java | 1 + .../TxOptimisticDeadlockDetectionTest.java | 4 + .../TxOptimisticOnPartitionExchangeTest.java | 3 +- ...timisticPrepareOnUnstableTopologyTest.java | 1 + ...misticDeadlockDetectionCrossCacheTest.java | 4 + .../TxPessimisticDeadlockDetectionTest.java | 4 + .../transactions/TxRollbackAsyncTest.java | 11 + .../TxRollbackOnIncorrectParamsTest.java | 5 + ...TxRollbackOnTimeoutOnePhaseCommitTest.java | 3 + .../transactions/TxRollbackOnTimeoutTest.java | 23 + .../TxRollbackOnTopologyChangeTest.java | 1 + .../transactions/TxStateChangeEventTest.java | 2 + ...thSmallTimeoutAndContentionOneKeyTest.java | 1 + .../CacheVersionedEntryAbstractTest.java | 6 +- .../GridClosureProcessorRemoteTest.java | 3 + .../closure/GridClosureProcessorSelfTest.java | 11 +- .../closure/GridClosureSerializationTest.java | 3 + .../cluster/GridAddressResolverSelfTest.java | 1 + .../cluster/GridUpdateNotifierSelfTest.java | 1 + ...mputeJobExecutionErrorToLogManualTest.java | 1 + ...iteComputeConfigVariationsFullApiTest.java | 153 ++++-- ...teCustomExecutorConfigurationSelfTest.java | 1 + .../IgniteComputeCustomExecutorSelfTest.java | 2 + .../PublicThreadpoolStarvationTest.java | 1 + .../continuous/GridEventConsumeSelfTest.java | 20 + .../continuous/GridMessageListenSelfTest.java | 11 +- .../IgniteNoCustomEventsOnNodeStart.java | 1 + .../database/BPlusTreeSelfTest.java | 67 +++ .../database/CacheFreeListImplSelfTest.java | 10 + .../database/DataRegionMetricsSelfTest.java | 4 + .../IgniteDbDynamicCacheSelfTest.java | 2 + .../IgniteDbMemoryLeakAbstractTest.java | 1 + .../database/IgniteDbPutGetAbstractTest.java | 22 + .../IgniteDbPutGetWithCacheStoreTest.java | 2 + .../IgniteDbSingleNodeTinyPutGetTest.java | 64 ++- .../database/IndexStorageSelfTest.java | 1 + .../SwapPathConstructionSelfTest.java | 2 + .../DataStreamProcessorMvccSelfTest.java | 9 +- .../DataStreamProcessorSelfTest.java | 17 + ...lientReconnectAfterClusterRestartTest.java | 4 + .../DataStreamerImplSelfTest.java | 11 + .../DataStreamerMultiThreadedSelfTest.java | 4 +- .../DataStreamerMultinodeCreateCacheTest.java | 3 +- .../datastreamer/DataStreamerTimeoutTest.java | 2 + .../DataStreamerUpdateAfterLoadTest.java | 1 + .../IgniteDataStreamerPerformanceTest.java | 3 +- .../processors/igfs/IgfsAbstractSelfTest.java | 72 +++ .../igfs/IgfsAttributesSelfTest.java | 3 +- .../igfs/IgfsBackupFailoverSelfTest.java | 6 +- ...ckMessageSystemPoolStarvationSelfTest.java | 1 + ...achePerBlockLruEvictionPolicySelfTest.java | 8 +- .../processors/igfs/IgfsCacheSelfTest.java | 3 +- .../igfs/IgfsDataManagerSelfTest.java | 8 +- .../igfs/IgfsDualAbstractSelfTest.java | 77 ++- .../processors/igfs/IgfsFileInfoSelfTest.java | 2 + .../processors/igfs/IgfsFileMapSelfTest.java | 8 +- ...fsGroupDataBlockKeyMapperHashSelfTest.java | 2 + ...condaryFileSystemDualAbstractSelfTest.java | 10 +- ...LocalSecondaryFileSystemProxySelfTest.java | 8 +- .../igfs/IgfsMetaManagerSelfTest.java | 2 + .../processors/igfs/IgfsMetricsSelfTest.java | 5 +- .../igfs/IgfsModeResolverSelfTest.java | 4 + .../processors/igfs/IgfsModesSelfTest.java | 11 +- .../igfs/IgfsOneClientNodeTest.java | 3 +- .../igfs/IgfsPrimaryMultiNodeSelfTest.java | 5 +- ...ryRelaxedConsistencyMultiNodeSelfTest.java | 3 +- .../igfs/IgfsProcessorSelfTest.java | 18 +- .../igfs/IgfsProcessorValidationSelfTest.java | 17 +- ...sSecondaryFileSystemInjectionSelfTest.java | 2 + ...cEndpointRegistrationAbstractSelfTest.java | 4 +- ...ointRegistrationOnLinuxAndMacSelfTest.java | 3 +- ...EndpointRegistrationOnWindowsSelfTest.java | 3 +- .../processors/igfs/IgfsSizeSelfTest.java | 10 +- .../processors/igfs/IgfsStartCacheTest.java | 3 +- .../processors/igfs/IgfsStreamsSelfTest.java | 3 + .../processors/igfs/IgfsTaskSelfTest.java | 4 +- .../igfs/benchmark/IgfsBenchmark.java | 5 + ...fsByteDelimiterRecordResolverSelfTest.java | 10 +- ...IgfsFixedLengthRecordResolverSelfTest.java | 3 +- ...ewLineDelimiterRecordResolverSelfTest.java | 3 +- ...StringDelimiterRecordResolverSelfTest.java | 3 +- .../GridJobMetricsProcessorLoadTest.java | 3 +- ...teMessagingConfigVariationFullApiTest.java | 14 + .../OdbcConfigurationValidationSelfTest.java | 8 + .../odbc/OdbcEscapeSequenceSelfTest.java | 35 ++ .../port/GridPortProcessorSelfTest.java | 4 +- .../GridCacheCommandHandlerSelfTest.java | 3 + .../log/GridLogCommandHandlerTest.java | 9 + .../query/GridQueryCommandHandlerTest.java | 5 + .../top/CacheTopologyCommandHandlerTest.java | 3 + .../ClosureServiceClientsNodesTest.java | 7 +- .../service/GridServiceClientNodeTest.java | 3 + ...ridServiceContinuousQueryRedeployTest.java | 1 + ...rviceDeploymentCompoundFutureSelfTest.java | 1 + ...iceDeploymentExceptionPropagationTest.java | 1 + .../GridServicePackagePrivateSelfTest.java | 1 + .../GridServiceProcessorAbstractSelfTest.java | 20 + ...idServiceProcessorBatchDeploySelfTest.java | 13 + ...rviceProcessorMultiNodeConfigSelfTest.java | 6 + ...GridServiceProcessorMultiNodeSelfTest.java | 8 +- .../GridServiceProcessorProxySelfTest.java | 10 + ...ridServiceProcessorSingleNodeSelfTest.java | 3 +- .../GridServiceProcessorStopSelfTest.java | 2 + ...idServiceProxyClientReconnectSelfTest.java | 2 + .../GridServiceProxyNodeStopSelfTest.java | 1 + .../GridServiceReassignmentSelfTest.java | 6 +- .../GridServiceSerializationSelfTest.java | 1 + ...iteServiceConfigVariationsFullApiTest.java | 5 + ...ent2ClassLoadersDefaultMarshallerTest.java | 3 + ...mentClassLoadingDefaultMarshallerTest.java | 3 + .../IgniteServiceDynamicCachesSelfTest.java | 2 + ...iteServiceProxyTimeoutInitializedTest.java | 5 +- .../IgniteServiceReassignmentTest.java | 5 + .../ServiceDeploymentOnActivationTest.java | 8 + .../ServiceDeploymentOutsideBaselineTest.java | 12 + .../ServicePredicateAccessCacheTest.java | 1 + .../service/SystemCacheNotConfiguredTest.java | 1 + .../timeout/GridTimeoutProcessorSelfTest.java | 11 +- .../product/GridProductVersionSelfTest.java | 3 +- .../sql/SqlParserBulkLoadSelfTest.java | 1 + .../sql/SqlParserCreateIndexSelfTest.java | 1 + .../sql/SqlParserDropIndexSelfTest.java | 1 + .../sql/SqlParserSetStreamingSelfTest.java | 1 + ...qlParserTransactionalKeywordsSelfTest.java | 3 + .../internal/sql/SqlParserUserSelfTest.java | 3 + .../internal/util/GridArraysSelfTest.java | 4 + .../ignite/internal/util/GridCleanerTest.java | 1 + .../util/GridHandleTableSelfTest.java | 1 + ...tartupWithUndefinedIgniteHomeSelfTest.java | 3 +- .../internal/util/IgniteDevOnlyLogTest.java | 3 + .../util/IgniteExceptionRegistrySelfTest.java | 4 +- .../internal/util/IgniteUtilsSelfTest.java | 37 ++ .../internal/util/StripedExecutorTest.java | 6 + .../future/GridCompoundFutureSelfTest.java | 7 +- .../future/GridEmbeddedFutureSelfTest.java | 4 +- .../future/GridFutureAdapterSelfTest.java | 8 +- .../util/future/GridFutureQueueTest.java | 5 +- .../util/future/IgniteFutureImplTest.java | 13 +- .../nio/GridNioEmbeddedFutureSelfTest.java | 3 +- .../future/nio/GridNioFutureSelfTest.java | 6 +- ...nsafeDataInputOutputByteOrderSelfTest.java | 14 +- ...idUnsafeDataOutputArraySizingSelfTest.java | 6 +- ...IpcSharedMemoryCrashDetectionSelfTest.java | 5 +- .../IpcSharedMemoryNativeLoaderSelfTest.java | 3 +- .../shmem/IpcSharedMemorySpaceSelfTest.java | 6 +- .../shmem/IpcSharedMemoryUtilsSelfTest.java | 4 +- .../nio/GridNioDelimitedBufferSelfTest.java | 4 +- .../internal/util/nio/GridNioSelfTest.java | 13 + .../nio/GridNioSessionMetaKeySelfTest.java | 3 +- .../internal/util/nio/GridNioSslSelfTest.java | 8 +- .../internal/util/nio/GridRoundTripTest.java | 4 +- .../IgniteExceptionInNioWorkerSelfTest.java | 1 + .../nio/impl/GridNioFilterChainSelfTest.java | 3 +- .../GridOffHeapMapAbstractSelfTest.java | 18 +- ...GridOffHeapMapPerformanceAbstractTest.java | 5 +- ...OffHeapPartitionedMapAbstractSelfTest.java | 24 +- ...PartitionedMapPerformanceAbstractTest.java | 6 +- .../unsafe/GridUnsafeMemorySelfTest.java | 12 + .../unsafe/GridUnsafeStripedLruSefTest.java | 9 +- .../CircularStringBuilderSelfTest.java | 2 + .../tostring/GridToStringBuilderSelfTest.java | 14 + .../IncludeSensitiveAbstractTest.java | 1 + .../org/apache/ignite/jvmtest/FileIOTest.java | 5 +- .../apache/ignite/jvmtest/FileLocksTest.java | 4 +- .../ignite/jvmtest/LinkedHashMapTest.java | 5 +- .../ignite/jvmtest/NetworkFailureTest.java | 6 +- .../QueueSizeCounterMultiThreadedTest.java | 3 +- .../ReadWriteLockMultiThreadedTest.java | 7 +- .../org/apache/ignite/jvmtest/RegExpTest.java | 3 +- .../ServerSocketMultiThreadedTest.java | 3 +- .../lang/GridByteArrayListSelfTest.java | 9 +- .../ignite/lang/GridFuncPerformanceTest.java | 3 +- .../GridMetadataAwareAdapterLoadTest.java | 1 + .../GridMetadataAwareAdapterSelfTest.java | 1 + .../ignite/lang/GridSetWrapperSelfTest.java | 8 +- .../apache/ignite/lang/GridTupleSelfTest.java | 4 + .../org/apache/ignite/lang/GridXSelfTest.java | 6 +- .../ignite/lang/IgniteUuidSelfTest.java | 6 +- ...oundedConcurrentLinkedHashMapSelfTest.java | 1 + ...idBoundedConcurrentOrderedMapSelfTest.java | 4 +- .../GridBoundedPriorityQueueSelfTest.java | 1 + .../GridCircularBufferPerformanceTest.java | 7 +- .../utils/GridCircularBufferSelfTest.java | 6 +- .../GridConcurrentLinkedHashMapSelfTest.java | 7 + .../GridConcurrentWeakHashSetSelfTest.java | 6 +- .../utils/GridConsistentHashSelfTest.java | 6 +- .../utils/GridLeanIdentitySetSelfTest.java | 3 +- .../utils/GridLeanMapPerformanceTest.java | 3 +- .../lang/utils/GridLeanMapSelfTest.java | 12 +- .../lang/utils/GridListSetSelfTest.java | 5 +- .../lang/utils/GridStripedLockSelfTest.java | 5 +- .../IgniteOffheapReadWriteLockSelfTest.java | 5 + .../loadtests/GridCacheMultiNodeLoadTest.java | 3 +- .../GridCacheWriteBehindStoreLoadTest.java | 4 +- .../GridIoManagerBenchmark0.java | 5 +- .../GridTcpCommunicationBenchmark.java | 11 +- ...ridCachePartitionedAtomicLongLoadTest.java | 3 +- .../multisplit/GridMultiSplitsLoadTest.java | 1 + .../GridMultiSplitsRedeployLoadTest.java | 1 + ...dSingleSplitsNewNodesAbstractLoadTest.java | 1 + .../GridSingleSplitsRedeployLoadTest.java | 1 + .../direct/session/GridSessionLoadTest.java | 1 + .../direct/stealing/GridStealingLoadTest.java | 1 + .../hashmap/GridHashMapLoadTest.java | 3 + .../ignite/logger/java/JavaLoggerTest.java | 3 +- ...micProxySerializationMultiJvmSelfTest.java | 3 + .../GridMarshallerAbstractTest.java | 25 +- .../GridMarshallerMappingConsistencyTest.java | 2 + .../GridMarshallerPerformanceTest.java | 6 +- .../marshaller/MarshallerContextSelfTest.java | 6 + .../MarshallerEnumDeadlockMultiJvmTest.java | 3 + ...idMessagingNoPeerClassLoadingSelfTest.java | 5 +- .../messaging/GridMessagingSelfTest.java | 13 + .../IgniteMessagingSendAsyncTest.java | 8 + .../IgniteMessagingWithClientTest.java | 3 +- .../DeploymentClassLoaderCallableTest.java | 3 + ...ltinodeRedeployContinuousModeSelfTest.java | 3 +- ...MultinodeRedeployIsolatedModeSelfTest.java | 3 +- ...dMultinodeRedeployPrivateModeSelfTest.java | 3 +- ...idMultinodeRedeploySharedModeSelfTest.java | 3 +- .../p2p/GridP2PClassLoadingSelfTest.java | 3 +- .../GridP2PContinuousDeploymentSelfTest.java | 4 +- .../GridP2PDifferentClassLoaderSelfTest.java | 10 +- .../p2p/GridP2PDoubleDeploymentSelfTest.java | 6 +- .../p2p/GridP2PHotRedeploymentSelfTest.java | 10 +- .../p2p/GridP2PJobClassLoaderSelfTest.java | 6 +- .../p2p/GridP2PLocalDeploymentSelfTest.java | 8 +- ...ridP2PMissedResourceCacheSizeSelfTest.java | 10 +- .../ignite/p2p/GridP2PNodeLeftSelfTest.java | 4 +- .../p2p/GridP2PRecursionTaskSelfTest.java | 4 + .../GridP2PRemoteClassLoadersSelfTest.java | 6 +- .../p2p/GridP2PSameClassLoaderSelfTest.java | 4 + .../p2p/GridP2PTestTaskExecutionTest.java | 3 +- .../ignite/p2p/GridP2PTimeoutSelfTest.java | 10 +- .../ignite/p2p/GridP2PUndeploySelfTest.java | 10 +- .../ignite/p2p/P2PScanQueryUndeployTest.java | 1 + .../p2p/P2PStreamingClassLoaderTest.java | 3 + .../ignite/p2p/SharedDeploymentTest.java | 1 + ...tformDefaultJavaObjectFactorySelfTest.java | 8 + ...latformJavaObjectFactoryProxySelfTest.java | 8 + .../SecurityPermissionSetBuilderTest.java | 1 + .../services/ServiceThreadPoolSelfTest.java | 4 + ...ssionCancelSiblingsFromFutureSelfTest.java | 4 +- ...dSessionCancelSiblingsFromJobSelfTest.java | 4 +- ...SessionCancelSiblingsFromTaskSelfTest.java | 4 +- .../GridSessionCheckpointSelfTest.java | 3 + .../GridSessionCollisionSpiSelfTest.java | 3 +- ...SessionFutureWaitJobAttributeSelfTest.java | 4 +- ...essionFutureWaitTaskAttributeSelfTest.java | 4 +- .../GridSessionJobFailoverSelfTest.java | 3 +- ...idSessionJobWaitTaskAttributeSelfTest.java | 4 +- .../session/GridSessionLoadSelfTest.java | 4 +- ...GridSessionSetFutureAttributeSelfTest.java | 4 +- ...etFutureAttributeWaitListenerSelfTest.java | 3 +- .../GridSessionSetJobAttribute2SelfTest.java | 3 +- ...idSessionSetJobAttributeOrderSelfTest.java | 3 +- .../GridSessionSetJobAttributeSelfTest.java | 4 +- ...onSetJobAttributeWaitListenerSelfTest.java | 3 +- .../GridSessionSetTaskAttributeSelfTest.java | 4 +- ...idSessionTaskWaitJobAttributeSelfTest.java | 4 +- .../GridSessionWaitAttributeSelfTest.java | 10 +- .../spi/GridSpiLocalHostInjectionTest.java | 10 +- .../spi/GridSpiStartStopAbstractTest.java | 4 +- .../spi/GridTcpSpiForwardingSelfTest.java | 4 + .../GridCheckpointSpiAbstractTest.java | 5 +- .../CacheCheckpointSpiConfigSelfTest.java | 3 +- ...CacheCheckpointSpiSecondCacheSelfTest.java | 3 +- .../jdbc/JdbcCheckpointSpiConfigSelfTest.java | 3 +- ...idSharedFsCheckpointSpiConfigSelfTest.java | 3 +- ...dFsCheckpointSpiMultiThreadedSelfTest.java | 3 +- ...ckpointSpiMultipleDirectoriesSelfTest.java | 3 +- ...idFifoQueueCollisionSpiConfigSelfTest.java | 3 +- .../GridFifoQueueCollisionSpiSelfTest.java | 6 +- ...tealingCollisionSpiAttributesSelfTest.java | 9 +- ...JobStealingCollisionSpiConfigSelfTest.java | 3 +- ...ingCollisionSpiCustomTopologySelfTest.java | 3 +- .../GridJobStealingCollisionSpiSelfTest.java | 10 +- ...iorityQueueCollisionSpiConfigSelfTest.java | 3 +- ...GridPriorityQueueCollisionSpiSelfTest.java | 13 +- .../GridAbstractCommunicationSelfTest.java | 4 +- .../GridCacheMessageSelfTest.java | 2 + .../tcp/GridCacheDhtLockBackupSelfTest.java | 1 + .../GridTcpCommunicationSpiAbstractTest.java | 7 +- ...unicationSpiConcurrentConnectSelfTest.java | 7 + ...GridTcpCommunicationSpiConfigSelfTest.java | 2 + .../GridTcpCommunicationSpiLanLoadTest.java | 2 + ...CommunicationSpiMultithreadedSelfTest.java | 3 + ...cpCommunicationSpiRecoveryAckSelfTest.java | 5 +- ...onSpiRecoveryFailureDetectionSelfTest.java | 3 +- ...idTcpCommunicationSpiRecoverySelfTest.java | 4 + ...icationSpiTcpFailureDetectionSelfTest.java | 3 +- ...mmunicationRecoveryAckClosureSelfTest.java | 5 +- .../tcp/TcpCommunicationSpiDropNodesTest.java | 2 + .../TcpCommunicationSpiFaultyClientTest.java | 2 + ...municationSpiHalfOpenedConnectionTest.java | 2 + ...cpCommunicationSpiSkipMessageSendTest.java | 1 + .../tcp/TcpCommunicationStatisticsTest.java | 1 + .../local/GridLocalDeploymentSpiSelfTest.java | 2 + .../AbstractDiscoveryRandomStartStopTest.java | 3 +- .../discovery/AbstractDiscoverySelfTest.java | 9 +- .../spi/discovery/AbstractDiscoveryTest.java | 3 +- .../discovery/AuthenticationRestartTest.java | 1 + ...usterMetricsSnapshotSerializeSelfTest.java | 3 + .../FilterDataForClientNodeDiscoveryTest.java | 4 +- .../IgniteDiscoveryCacheReuseSelfTest.java | 3 +- .../LongClientConnectToClusterTest.java | 1 + .../DiscoveryUnmarshalVulnerabilityTest.java | 6 + .../tcp/IgniteClientConnectTest.java | 3 +- ...iteClientReconnectMassiveShutdownTest.java | 3 + ...lientDiscoveryMarshallerCheckSelfTest.java | 3 + ...ientDiscoverySpiCoordinatorChangeTest.java | 1 + ...entDiscoverySpiFailureTimeoutSelfTest.java | 7 + .../TcpClientDiscoverySpiMulticastTest.java | 5 +- .../tcp/TcpClientDiscoverySpiSelfTest.java | 52 ++ .../TcpClientDiscoveryUnresolvedHostTest.java | 1 + .../TcpDiscoveryClientSuspensionSelfTest.java | 3 + .../tcp/TcpDiscoveryConcurrentStartTest.java | 4 +- .../TcpDiscoveryMarshallerCheckSelfTest.java | 4 +- .../tcp/TcpDiscoveryMultiThreadedTest.java | 8 + ...ryNodeAttributesUpdateOnReconnectTest.java | 1 + ...scoveryNodeConfigConsistentIdSelfTest.java | 3 +- .../TcpDiscoveryNodeConsistentIdSelfTest.java | 3 +- ...cpDiscoveryPendingMessageDeliveryTest.java | 2 + .../tcp/TcpDiscoveryRestartTest.java | 3 +- .../TcpDiscoverySegmentationPolicyTest.java | 1 + .../discovery/tcp/TcpDiscoverySelfTest.java | 47 ++ .../tcp/TcpDiscoverySnapshotHistoryTest.java | 6 +- .../tcp/TcpDiscoverySpiConfigSelfTest.java | 2 + ...TcpDiscoverySpiFailureTimeoutSelfTest.java | 5 + .../tcp/TcpDiscoverySpiMBeanTest.java | 1 + .../TcpDiscoverySpiReconnectDelayTest.java | 8 + .../tcp/TcpDiscoverySpiWildcardSelfTest.java | 3 +- .../tcp/TcpDiscoverySslParametersTest.java | 8 + .../TcpDiscoverySslSecuredUnsecuredTest.java | 8 + .../TcpDiscoverySslTrustedUntrustedTest.java | 7 + .../tcp/TcpDiscoveryWithWrongServerTest.java | 4 + .../TcpDiscoveryIpFinderAbstractSelfTest.java | 1 + .../TcpDiscoveryJdbcIpFinderSelfTest.java | 3 +- ...TcpDiscoveryMulticastIpFinderSelfTest.java | 3 +- .../TcpDiscoverySharedFsIpFinderSelfTest.java | 3 +- .../vm/TcpDiscoveryVmIpFinderSelfTest.java | 5 +- .../KeystoreEncryptionSpiSelfTest.java | 11 +- ...moryEventStorageMultiThreadedSelfTest.java | 3 +- ...idMemoryEventStorageSpiConfigSelfTest.java | 3 +- .../GridMemoryEventStorageSpiSelfTest.java | 2 + .../GridAlwaysFailoverSpiConfigSelfTest.java | 3 +- .../always/GridAlwaysFailoverSpiSelfTest.java | 5 +- ...dJobStealingFailoverSpiConfigSelfTest.java | 3 +- ...JobStealingFailoverSpiOneNodeSelfTest.java | 4 +- .../GridJobStealingFailoverSpiSelfTest.java | 9 +- .../never/GridNeverFailoverSpiSelfTest.java | 3 +- ...daptiveLoadBalancingSpiConfigSelfTest.java | 3 +- ...eLoadBalancingSpiMultipleNodeSelfTest.java | 3 +- .../GridAdaptiveLoadBalancingSpiSelfTest.java | 5 +- ...ridInternalTasksLoadBalancingSelfTest.java | 2 + ...ancingNotPerTaskMultithreadedSelfTest.java | 3 +- ...obinLoadBalancingSpiLocalNodeSelfTest.java | 3 +- ...LoadBalancingSpiMultipleNodesSelfTest.java | 4 +- ...binLoadBalancingSpiNotPerTaskSelfTest.java | 6 +- ...oadBalancingSpiTopologyChangeSelfTest.java | 3 +- ...dRandomLoadBalancingSpiConfigSelfTest.java | 3 +- ...eightedRandomLoadBalancingSpiSelfTest.java | 4 +- ...andomLoadBalancingSpiWeightedSelfTest.java | 3 +- .../cmdline/GridCommandLineLoaderTest.java | 1 + .../GridCommandLineTransformerSelfTest.java | 9 +- .../NotStringSystemPropertyTest.java | 1 + .../servlet/GridServletLoaderTest.java | 3 +- .../stream/socket/SocketStreamerSelfTest.java | 11 +- ...ketStreamerUnmarshalVulnerabilityTest.java | 6 + .../assertions/AlwaysAssertion.java | 3 +- .../testframework/assertions/Assertion.java | 1 + .../cache/GridAbstractCacheStoreSelfTest.java | 6 + .../GridAbstractLifecycleAwareSelfTest.java | 3 +- .../ConfigVariationsTestSuiteBuilderTest.java | 6 +- .../test/ListeningTestLoggerTest.java | 16 +- .../testframework/test/ParametersTest.java | 2 + .../test/VariationsIteratorTest.java | 6 + .../testsuites/IgniteCacheMvccTestSuite.java | 6 +- ...GridThreadPoolExecutorServiceSelfTest.java | 7 +- .../apache/ignite/thread/GridThreadTest.java | 3 +- .../thread/IgniteThreadPoolSizeTest.java | 9 + .../util/AttributeNodeFilterSelfTest.java | 6 + .../util/GridCommandHandlerSslTest.java | 1 + .../ignite/util/GridCommandHandlerTest.java | 33 ++ ...oncurrentLinkedDequeMultiThreadedTest.java | 1 + .../GridConcurrentLinkedDequeSelfTest.java | 7 +- ...entLinkedHashMapMultiThreadedSelfTest.java | 10 + .../ignite/util/GridIntListSelfTest.java | 4 + ...GridInternalTaskUnusedWalSegmentsTest.java | 1 + .../ignite/util/GridLogThrottleTest.java | 1 + .../ignite/util/GridLongListSelfTest.java | 7 +- .../util/GridMessageCollectionTest.java | 1 + .../ignite/util/GridPartitionMapSelfTest.java | 6 + .../apache/ignite/util/GridQueueSelfTest.java | 3 +- .../ignite/util/GridRandomSelfTest.java | 1 + .../ignite/util/GridSnapshotLockSelfTest.java | 3 +- .../util/GridSpinReadWriteLockSelfTest.java | 6 +- .../GridStringBuilderFactorySelfTest.java | 3 +- .../util/GridTopologyHeapSizeSelfTest.java | 5 +- .../apache/ignite/util/GridTransientTest.java | 3 +- .../util/mbeans/GridMBeanBaselineTest.java | 1 + .../util/mbeans/GridMBeanDisableSelfTest.java | 2 + .../mbeans/GridMBeanExoticNamesSelfTest.java | 4 +- .../ignite/util/mbeans/GridMBeanSelfTest.java | 6 + .../util/mbeans/WorkersControlMXBeanTest.java | 198 +++---- 1440 files changed, 9122 insertions(+), 1728 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/GridCacheAffinityBackupsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/GridCacheAffinityBackupsSelfTest.java index 5e7b4e26b2bcf..cfc2a23772869 100644 --- a/modules/core/src/test/java/org/apache/ignite/GridCacheAffinityBackupsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/GridCacheAffinityBackupsSelfTest.java @@ -63,6 +63,7 @@ public class GridCacheAffinityBackupsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRendezvousBackups() throws Exception { for (int i = 0; i < nodesCnt; i++) checkBackups(i); @@ -97,4 +98,4 @@ private void checkBackups(int backups) throws Exception { stopAllGrids(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/GridSuppressedExceptionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/GridSuppressedExceptionSelfTest.java index 55e54fb884fac..48b1cd3900573 100644 --- a/modules/core/src/test/java/org/apache/ignite/GridSuppressedExceptionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/GridSuppressedExceptionSelfTest.java @@ -29,6 +29,7 @@ public class GridSuppressedExceptionSelfTest extends TestCase { /** * @throws Exception If failed. */ + @Test public void testHasCause() throws Exception { IgniteCheckedException me = prepareMultiException(); @@ -40,6 +41,7 @@ public void testHasCause() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetCause() throws Exception { IgniteCheckedException me = prepareMultiException(); @@ -55,6 +57,7 @@ public void testGetCause() throws Exception { /** * @throws Exception If failed. */ + @Test public void testXHasCause() throws Exception { IgniteCheckedException me = prepareMultiException(); @@ -71,6 +74,7 @@ public void testXHasCause() throws Exception { /** * @throws Exception If failed. */ + @Test public void testXGetSuppressedList() throws Exception { IgniteCheckedException me = prepareMultiException(); @@ -91,6 +95,7 @@ public void testXGetSuppressedList() throws Exception { /** * @throws Exception If failed. */ + @Test public void testXCause() throws Exception { IgniteCheckedException me = prepareMultiException(); diff --git a/modules/core/src/test/java/org/apache/ignite/IgniteCacheAffinitySelfTest.java b/modules/core/src/test/java/org/apache/ignite/IgniteCacheAffinitySelfTest.java index cf54949f7800b..16f1d8014b0d1 100644 --- a/modules/core/src/test/java/org/apache/ignite/IgniteCacheAffinitySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/IgniteCacheAffinitySelfTest.java @@ -87,6 +87,7 @@ public class IgniteCacheAffinitySelfTest extends IgniteCacheAbstractTest { /** * @throws Exception if failed. */ + @Test public void testAffinity() throws Exception { checkAffinity(); @@ -301,4 +302,4 @@ private static void checkEqualPartitionMaps(Map map1, Map< private Collection nodes() { return grid(0).cluster().nodes(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/cache/IgniteCacheEntryProcessorSequentialCallTest.java b/modules/core/src/test/java/org/apache/ignite/cache/IgniteCacheEntryProcessorSequentialCallTest.java index 165bca78b2aa8..38a8ef76e0969 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/IgniteCacheEntryProcessorSequentialCallTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/IgniteCacheEntryProcessorSequentialCallTest.java @@ -66,6 +66,7 @@ public class IgniteCacheEntryProcessorSequentialCallTest extends GridCommonAbstr /** * */ + @Test public void testOptimisticSerializableTxInvokeSequentialCall() throws Exception { transactionInvokeSequentialCallOnPrimaryNode(TransactionConcurrency.OPTIMISTIC, TransactionIsolation.SERIALIZABLE); @@ -75,6 +76,7 @@ public void testOptimisticSerializableTxInvokeSequentialCall() throws Exception /** * */ + @Test public void testOptimisticRepeatableReadTxInvokeSequentialCall() throws Exception { transactionInvokeSequentialCallOnPrimaryNode(TransactionConcurrency.OPTIMISTIC, TransactionIsolation.REPEATABLE_READ); @@ -84,6 +86,7 @@ public void testOptimisticRepeatableReadTxInvokeSequentialCall() throws Exceptio /** * */ + @Test public void testOptimisticReadCommittedTxInvokeSequentialCall() throws Exception { transactionInvokeSequentialCallOnPrimaryNode(TransactionConcurrency.OPTIMISTIC, TransactionIsolation.READ_COMMITTED); @@ -93,6 +96,7 @@ public void testOptimisticReadCommittedTxInvokeSequentialCall() throws Exception /** * */ + @Test public void testPessimisticSerializableTxInvokeSequentialCall() throws Exception { transactionInvokeSequentialCallOnPrimaryNode(TransactionConcurrency.PESSIMISTIC, TransactionIsolation.SERIALIZABLE); @@ -102,6 +106,7 @@ public void testPessimisticSerializableTxInvokeSequentialCall() throws Exception /** * */ + @Test public void testPessimisticRepeatableReadTxInvokeSequentialCall() throws Exception { transactionInvokeSequentialCallOnPrimaryNode(TransactionConcurrency.PESSIMISTIC, TransactionIsolation.REPEATABLE_READ); @@ -111,6 +116,7 @@ public void testPessimisticRepeatableReadTxInvokeSequentialCall() throws Excepti /** * */ + @Test public void testPessimisticReadCommittedTxInvokeSequentialCall() throws Exception { transactionInvokeSequentialCallOnPrimaryNode(TransactionConcurrency.PESSIMISTIC, TransactionIsolation.READ_COMMITTED); @@ -204,6 +210,7 @@ public void transactionInvokeSequentialCallOnNearNode(TransactionConcurrency tra * Test for sequential entry processor invocation. During transaction value is changed externally, which leads to * optimistic conflict exception. */ + @Test public void testTxInvokeSequentialOptimisticConflict() throws Exception { TestKey key = new TestKey(1L); @@ -308,4 +315,4 @@ public void value(String val) { this.val = val; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/cache/IgniteWarmupClosureSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/IgniteWarmupClosureSelfTest.java index 1fccb904313d6..9101a1b92397d 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/IgniteWarmupClosureSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/IgniteWarmupClosureSelfTest.java @@ -72,7 +72,8 @@ public IgniteWarmupClosureSelfTest(){ /** * @throws Exception If failed. */ + @Test public void testWarmupClosure() throws Exception { startGrid(1); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/cache/LargeEntryUpdateTest.java b/modules/core/src/test/java/org/apache/ignite/cache/LargeEntryUpdateTest.java index 008da71b6679a..b464a92c99bab 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/LargeEntryUpdateTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/LargeEntryUpdateTest.java @@ -95,6 +95,7 @@ public class LargeEntryUpdateTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testEntryUpdate() throws Exception { try (Ignite ignite = startGrid()) { for (int i = 0; i < CACHE_COUNT; ++i) { diff --git a/modules/core/src/test/java/org/apache/ignite/cache/ResetLostPartitionTest.java b/modules/core/src/test/java/org/apache/ignite/cache/ResetLostPartitionTest.java index 6f1e78bc23f8f..653dc169cc912 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/ResetLostPartitionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/ResetLostPartitionTest.java @@ -130,6 +130,7 @@ private IgniteConfiguration getClientConfiguration(String igniteInstanceName) th * * @throws Exception if fail. */ + @Test public void testReactivateGridBeforeResetLostPartitions() throws Exception { doRebalanceAfterPartitionsWereLost(true); } @@ -139,6 +140,7 @@ public void testReactivateGridBeforeResetLostPartitions() throws Exception { * * @throws Exception if fail. */ + @Test public void testResetLostPartitions() throws Exception { doRebalanceAfterPartitionsWereLost(false); } diff --git a/modules/core/src/test/java/org/apache/ignite/cache/affinity/AbstractAffinityFunctionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/affinity/AbstractAffinityFunctionSelfTest.java index 8f8d78a96803b..1ee800fd8b4d8 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/affinity/AbstractAffinityFunctionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/affinity/AbstractAffinityFunctionSelfTest.java @@ -50,6 +50,7 @@ public abstract class AbstractAffinityFunctionSelfTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + @Test public void testNodeRemovedNoBackups() throws Exception { checkNodeRemoved(0); } @@ -57,6 +58,7 @@ public void testNodeRemovedNoBackups() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNodeRemovedOneBackup() throws Exception { checkNodeRemoved(1); } @@ -64,6 +66,7 @@ public void testNodeRemovedOneBackup() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNodeRemovedTwoBackups() throws Exception { checkNodeRemoved(2); } @@ -71,6 +74,7 @@ public void testNodeRemovedTwoBackups() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNodeRemovedThreeBackups() throws Exception { checkNodeRemoved(3); } @@ -78,6 +82,7 @@ public void testNodeRemovedThreeBackups() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRandomReassignmentNoBackups() throws Exception { checkRandomReassignment(0); } @@ -85,6 +90,7 @@ public void testRandomReassignmentNoBackups() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRandomReassignmentOneBackup() throws Exception { checkRandomReassignment(1); } @@ -92,6 +98,7 @@ public void testRandomReassignmentOneBackup() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRandomReassignmentTwoBackups() throws Exception { checkRandomReassignment(2); } @@ -99,6 +106,7 @@ public void testRandomReassignmentTwoBackups() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRandomReassignmentThreeBackups() throws Exception { checkRandomReassignment(3); } @@ -107,6 +115,7 @@ public void testRandomReassignmentThreeBackups() throws Exception { * @param backups Number of backups. * @throws Exception If failed. */ + @Test public void testNullKeyForPartitionCalculation() throws Exception { AffinityFunction aff = affinityFunction(); diff --git a/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityClientNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityClientNodeSelfTest.java index 6d1c0209d4eea..25a0c04203701 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityClientNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityClientNodeSelfTest.java @@ -109,6 +109,7 @@ public class AffinityClientNodeSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClientNodeNotInAffinity() throws Exception { checkCache(CACHE1, 2); @@ -238,4 +239,4 @@ private static class TestNodesFilter implements IgnitePredicate { return true; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityDistributionLoggingTest.java b/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityDistributionLoggingTest.java index 0168c7c483f30..2e67039137f17 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityDistributionLoggingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityDistributionLoggingTest.java @@ -102,6 +102,7 @@ public class AffinityDistributionLoggingTest extends GridCommonAbstractTest { /** * @throws Exception In case of an error. */ + @Test public void test2PartitionsIdealDistributionIsNotLogged() throws Exception { System.setProperty(IGNITE_PART_DISTRIBUTION_WARN_THRESHOLD, "0"); @@ -117,6 +118,7 @@ public void test2PartitionsIdealDistributionIsNotLogged() throws Exception { /** * @throws Exception In case of an error. */ + @Test public void test120PartitionsIdeadDistributionIsNotLogged() throws Exception { System.setProperty(IGNITE_PART_DISTRIBUTION_WARN_THRESHOLD, "0.0"); @@ -132,6 +134,7 @@ public void test120PartitionsIdeadDistributionIsNotLogged() throws Exception { /** * @throws Exception In case of an error. */ + @Test public void test5PartitionsNotIdealDistributionIsLogged() throws Exception { System.setProperty(IGNITE_PART_DISTRIBUTION_WARN_THRESHOLD, "50.0"); @@ -147,6 +150,7 @@ public void test5PartitionsNotIdealDistributionIsLogged() throws Exception { /** * @throws Exception In case of an error. */ + @Test public void test5PartitionsNotIdealDistributionSuppressedLoggingOnClientNode() throws Exception { System.setProperty(IGNITE_PART_DISTRIBUTION_WARN_THRESHOLD, "0.0"); @@ -162,6 +166,7 @@ public void test5PartitionsNotIdealDistributionSuppressedLoggingOnClientNode() t /** * @throws Exception In case of an error. */ + @Test public void test7PartitionsNotIdealDistributionSuppressedLogging() throws Exception { System.setProperty(IGNITE_PART_DISTRIBUTION_WARN_THRESHOLD, "50.0"); @@ -177,6 +182,7 @@ public void test7PartitionsNotIdealDistributionSuppressedLogging() throws Except /** * @throws Exception In case of an error. */ + @Test public void test5PartitionsNotIdealDistributionSuppressedLogging() throws Exception { System.setProperty(IGNITE_PART_DISTRIBUTION_WARN_THRESHOLD, "65"); diff --git a/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityFunctionBackupFilterAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityFunctionBackupFilterAbstractSelfTest.java index 3f7a710838484..f81a4cd25221f 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityFunctionBackupFilterAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityFunctionBackupFilterAbstractSelfTest.java @@ -156,6 +156,7 @@ public abstract class AffinityFunctionBackupFilterAbstractSelfTest extends GridC /** * @throws Exception If failed. */ + @Test public void testPartitionDistribution() throws Exception { backups = 1; @@ -205,6 +206,7 @@ private void checkPartitions() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPartitionDistributionWithAffinityBackupFilter() throws Exception { backups = 3; diff --git a/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityFunctionExcludeNeighborsAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityFunctionExcludeNeighborsAbstractSelfTest.java index 6df7850249125..d4d24a78dbec7 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityFunctionExcludeNeighborsAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityFunctionExcludeNeighborsAbstractSelfTest.java @@ -107,6 +107,7 @@ private static Collection nodes(Affinity aff, Obj /** * @throws Exception If failed. */ + @Test public void testAffinityMultiNode() throws Exception { int grids = 9; @@ -158,6 +159,7 @@ public void testAffinityMultiNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAffinitySingleNode() throws Exception { Ignite g = startGrid(); @@ -174,4 +176,4 @@ public void testAffinitySingleNode() throws Exception { stopAllGrids(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityHistoryCleanupTest.java b/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityHistoryCleanupTest.java index f89d9ee7381ad..c8b7d389ed975 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityHistoryCleanupTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityHistoryCleanupTest.java @@ -81,6 +81,7 @@ public class AffinityHistoryCleanupTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testAffinityHistoryCleanup() throws Exception { String histProp = System.getProperty(IgniteSystemProperties.IGNITE_AFFINITY_HISTORY_SIZE); diff --git a/modules/core/src/test/java/org/apache/ignite/cache/affinity/local/LocalAffinityFunctionTest.java b/modules/core/src/test/java/org/apache/ignite/cache/affinity/local/LocalAffinityFunctionTest.java index e08d2120cea13..fc4a238dff342 100755 --- a/modules/core/src/test/java/org/apache/ignite/cache/affinity/local/LocalAffinityFunctionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/affinity/local/LocalAffinityFunctionTest.java @@ -61,6 +61,7 @@ public class LocalAffinityFunctionTest extends GridCommonAbstractTest { startGrids(NODE_CNT); } + @Test public void testWronglySetAffinityFunctionForLocalCache() { Ignite node = ignite(NODE_CNT - 1); diff --git a/modules/core/src/test/java/org/apache/ignite/cache/affinity/rendezvous/RendezvousAffinityFunctionSimpleBenchmark.java b/modules/core/src/test/java/org/apache/ignite/cache/affinity/rendezvous/RendezvousAffinityFunctionSimpleBenchmark.java index 452a1fb7dafde..e87007f2b9490 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/affinity/rendezvous/RendezvousAffinityFunctionSimpleBenchmark.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/affinity/rendezvous/RendezvousAffinityFunctionSimpleBenchmark.java @@ -346,6 +346,7 @@ private double chiSquare(List> byNodes, int parts, double goldenNo /** * @throws IOException On error. */ + @Test public void testDistribution() throws IOException { AffinityFunction aff0 = new RendezvousAffinityFunction(true, 1024); @@ -397,6 +398,7 @@ private void affinityDistribution(AffinityFunction aff0, AffinityFunction aff1) /** * */ + @Test public void testAffinityBenchmarkAdd() { mode = TopologyModificationMode.ADD; @@ -410,6 +412,7 @@ public void testAffinityBenchmarkAdd() { /** * */ + @Test public void testAffinityBenchmarkChangeLast() { mode = TopologyModificationMode.CHANGE_LAST_NODE; @@ -503,6 +506,7 @@ private int countPartitionsToMigrate(List> affOld, List cfg = cacheConfiguration(DEFAULT_CACHE_NAME, CacheAtomicityMode.ATOMIC); @@ -134,6 +135,7 @@ public void testAtomicCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTransactionalCache() throws Exception { CacheConfiguration cfg = cacheConfiguration(DEFAULT_CACHE_NAME, CacheAtomicityMode.TRANSACTIONAL); @@ -159,6 +161,7 @@ public void testTransactionalCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testExplicitTransaction() throws Exception { CacheConfiguration cfg = cacheConfiguration(DEFAULT_CACHE_NAME, CacheAtomicityMode.TRANSACTIONAL); @@ -184,6 +187,7 @@ public void testExplicitTransaction() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCrossCacheTransaction() throws Exception { CacheConfiguration cfg1 = cacheConfiguration("cache1", CacheAtomicityMode.TRANSACTIONAL); CacheConfiguration cfg2 = cacheConfiguration("cache2", CacheAtomicityMode.TRANSACTIONAL); @@ -212,6 +216,7 @@ public void testCrossCacheTransaction() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCommit() throws Exception { write.set(true); @@ -241,6 +246,7 @@ public void testCommit() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRollback() throws Exception { write.set(true); fail.set(true); @@ -329,4 +335,4 @@ private CacheConfiguration cacheConfiguration(String name, Cac * @return Session listener factory. */ protected abstract Factory sessionListenerFactory(); -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerLifecycleSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerLifecycleSelfTest.java index ff176c5f0f7c1..b7f46c38e7d2a 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerLifecycleSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerLifecycleSelfTest.java @@ -75,6 +75,7 @@ public class CacheStoreSessionListenerLifecycleSelfTest extends GridCommonAbstra /** * @throws Exception If failed. */ + @Test public void testNoCaches() throws Exception { try { startGrid(); @@ -90,6 +91,7 @@ public void testNoCaches() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNoOverride() throws Exception { try { Ignite ignite = startGrid(); @@ -152,6 +154,7 @@ public void testNoOverride() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPartialOverride() throws Exception { try { Ignite ignite = startGrid(); @@ -227,6 +230,7 @@ public void testPartialOverride() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOverride() throws Exception { try { Ignite ignite = startGrid(); diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerReadWriteThroughDisabledAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerReadWriteThroughDisabledAbstractTest.java index 774d4f7aac694..8681e31a3a6b7 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerReadWriteThroughDisabledAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerReadWriteThroughDisabledAbstractTest.java @@ -81,6 +81,7 @@ public abstract class CacheStoreSessionListenerReadWriteThroughDisabledAbstractT * * @throws Exception If failed. */ + @Test public void testLookup() throws Exception { IgniteCache cache = grid(0).getOrCreateCache(DEFAULT_CACHE_NAME); @@ -97,6 +98,7 @@ public void testLookup() throws Exception { * * @throws Exception If failed. */ + @Test public void testBatchLookup() throws Exception { IgniteCache cache = grid(0).getOrCreateCache(DEFAULT_CACHE_NAME); @@ -117,6 +119,7 @@ public void testBatchLookup() throws Exception { * * @throws Exception If failed. */ + @Test public void testUpdate() throws Exception { IgniteCache cache = grid(0).getOrCreateCache(DEFAULT_CACHE_NAME); @@ -133,6 +136,7 @@ public void testUpdate() throws Exception { * * @throws Exception If failed. */ + @Test public void testBatchUpdate() throws Exception { IgniteCache cache = grid(0).getOrCreateCache(DEFAULT_CACHE_NAME); @@ -153,6 +157,7 @@ public void testBatchUpdate() throws Exception { * * @throws Exception If failed. */ + @Test public void testRemove() throws Exception { IgniteCache cache = grid(0).getOrCreateCache(DEFAULT_CACHE_NAME); @@ -174,6 +179,7 @@ public void testRemove() throws Exception { * * @throws Exception If failed. */ + @Test public void testBatchRemove() throws Exception { IgniteCache cache = grid(0).getOrCreateCache(DEFAULT_CACHE_NAME); diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerWriteBehindEnabledTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerWriteBehindEnabledTest.java index 9314dbb05f1f8..07b80cbe31005 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerWriteBehindEnabledTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerWriteBehindEnabledTest.java @@ -106,6 +106,7 @@ public class CacheStoreSessionListenerWriteBehindEnabledTest extends GridCacheAb * Tests that there are no redundant calls of {@link CacheStoreSessionListener#onSessionStart(CacheStoreSession)} * while {@link IgniteCache#get(Object)} performed. */ + @Test public void testLookup() { IgniteCache cache = grid(0).getOrCreateCache(DEFAULT_CACHE_NAME); @@ -119,6 +120,7 @@ public void testLookup() { * Tests that there are no redundant calls of {@link CacheStoreSessionListener#onSessionStart(CacheStoreSession)} * while {@link IgniteCache#put(Object, Object)} performed. */ + @Test public void testUpdate() { IgniteCache cache = grid(0).getOrCreateCache(DEFAULT_CACHE_NAME); @@ -132,6 +134,7 @@ public void testUpdate() { * Tests that there are no redundant calls of {@link CacheStoreSessionListener#onSessionStart(CacheStoreSession)} * while {@link IgniteCache#remove(Object)} performed. */ + @Test public void testRemove() { IgniteCache cache = grid(0).getOrCreateCache(DEFAULT_CACHE_NAME); @@ -145,6 +148,7 @@ public void testRemove() { /** * Tests that cache store session listeners are notified by write-behind store. */ + @Test public void testFlushSingleValue() throws Exception { CacheConfiguration cfg = cacheConfiguration(getTestIgniteInstanceName()); diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreWriteErrorTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreWriteErrorTest.java index fce1f5d65c3d0..7104f5330c944 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreWriteErrorTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreWriteErrorTest.java @@ -60,6 +60,7 @@ public class CacheStoreWriteErrorTest extends GridCommonAbstractTest { /** * Checks primary error while saving batch with one entry. */ + @Test public void testPrimaryErrorForBatchSize1() { checkPrimaryError(1); } @@ -67,6 +68,7 @@ public void testPrimaryErrorForBatchSize1() { /** * Checks primary error while saving batch with two entries. */ + @Test public void testPrimaryErrorForBatchSize2() { checkPrimaryError(2); } diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/GridCacheBalancingStoreSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/GridCacheBalancingStoreSelfTest.java index d1e33b60ecf31..e9146c3adcf34 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/GridCacheBalancingStoreSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/GridCacheBalancingStoreSelfTest.java @@ -51,6 +51,7 @@ public class GridCacheBalancingStoreSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testLoads() throws Exception { final int range = 300; @@ -127,6 +128,7 @@ public void testLoads() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConcurrentLoad() throws Exception { CacheConfiguration cfg = new CacheConfiguration(DEFAULT_CACHE_NAME); @@ -138,6 +140,7 @@ public void testConcurrentLoad() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConcurrentLoadCustomThreshold() throws Exception { CacheConfiguration cfg = new CacheConfiguration(DEFAULT_CACHE_NAME); @@ -179,6 +182,7 @@ private void doTestConcurrentLoad(int threads, final int keys, int threshold) th /** * @throws Exception If failed. */ + @Test public void testConcurrentLoadAll() throws Exception { CacheConfiguration cfg = new CacheConfiguration(DEFAULT_CACHE_NAME); @@ -190,6 +194,7 @@ public void testConcurrentLoadAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConcurrentLoadAllCustomThreshold() throws Exception { CacheConfiguration cfg = new CacheConfiguration(DEFAULT_CACHE_NAME); diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/GridCacheLoadOnlyStoreAdapterSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/GridCacheLoadOnlyStoreAdapterSelfTest.java index 2a1e23a8bcbd7..cdb7659e4a977 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/GridCacheLoadOnlyStoreAdapterSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/GridCacheLoadOnlyStoreAdapterSelfTest.java @@ -80,6 +80,7 @@ public class GridCacheLoadOnlyStoreAdapterSelfTest extends GridCacheAbstractSelf /** * @throws Exception If failed. */ + @Test public void testStore() throws Exception { try { int inputSize = 100; @@ -107,6 +108,7 @@ public void testStore() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStoreSmallQueueSize() throws Exception { try { int inputSize = 1500; diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/GridStoreLoadCacheTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/GridStoreLoadCacheTest.java index d88c4318ee27e..0523980b166a0 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/GridStoreLoadCacheTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/GridStoreLoadCacheTest.java @@ -61,6 +61,7 @@ public class GridStoreLoadCacheTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void test() throws Exception { for (int i = 0; i < 3; i++) { IgniteEx srv1 = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/IgniteCacheExpiryStoreLoadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/IgniteCacheExpiryStoreLoadSelfTest.java index cdc4277974bf7..6c6060108f75d 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/IgniteCacheExpiryStoreLoadSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/IgniteCacheExpiryStoreLoadSelfTest.java @@ -79,6 +79,7 @@ public class IgniteCacheExpiryStoreLoadSelfTest extends GridCacheAbstractSelfTes /** * @throws Exception If failed. */ + @Test public void testLoadCacheWithExpiry() throws Exception { checkLoad(false); } @@ -86,6 +87,7 @@ public void testLoadCacheWithExpiry() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLoadCacheWithExpiryAsync() throws Exception { checkLoad(true); } @@ -119,6 +121,7 @@ private void checkLoad(boolean async) throws Exception { /** * @throws Exception If failed. */ + @Test public void testLocalLoadCacheWithExpiry() throws Exception { checkLocalLoad(false); } @@ -126,6 +129,7 @@ public void testLocalLoadCacheWithExpiry() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLocalLoadCacheWithExpiryAsync() throws Exception { checkLocalLoad(true); } @@ -159,6 +163,7 @@ private void checkLocalLoad(boolean async) throws Exception { /** * @throws Exception If failed. */ + @Test public void testLoadAllWithExpiry() throws Exception { IgniteCache cache = ignite(0).cache(DEFAULT_CACHE_NAME) .withExpiryPolicy(new CreatedExpiryPolicy(new Duration(MILLISECONDS, TIME_TO_LIVE))); @@ -239,4 +244,4 @@ private static class TestStore implements CacheStore { // No-op. } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/StoreResourceInjectionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/StoreResourceInjectionSelfTest.java index f043746893691..735e2d1acbf82 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/StoreResourceInjectionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/StoreResourceInjectionSelfTest.java @@ -62,6 +62,7 @@ public class StoreResourceInjectionSelfTest extends GridCommonAbstractTest { /** * */ + @Test public void testResourcesInStoreFactory() throws Exception { cacheCfg.setCacheStoreFactory(new MyCacheStoreFactory()); @@ -71,6 +72,7 @@ public void testResourcesInStoreFactory() throws Exception { /** * */ + @Test public void testResourcesInLoaderFactory() throws Exception { cacheCfg.setCacheLoaderFactory(new MyCacheStoreFactory()); @@ -80,6 +82,7 @@ public void testResourcesInLoaderFactory() throws Exception { /** * */ + @Test public void testResourcesInWriterFactory() throws Exception { cacheCfg.setCacheWriterFactory(new MyCacheStoreFactory()); diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreAbstractSelfTest.java index 703cbe18908b9..e0701d5fa5ed7 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreAbstractSelfTest.java @@ -370,6 +370,7 @@ protected void checkCacheLoadWithStatement() throws SQLException { /** * @throws Exception If failed. */ + @Test public void testLoadCacheWithStatement() throws Exception { startTestGrid(false, false, false, false, 512); @@ -379,6 +380,7 @@ public void testLoadCacheWithStatement() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLoadCacheWithStatementTx() throws Exception { startTestGrid(false, false, false, true, 512); @@ -388,6 +390,7 @@ public void testLoadCacheWithStatementTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLoadCache() throws Exception { startTestGrid(false, false, false, false, 512); @@ -397,6 +400,7 @@ public void testLoadCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLoadCacheAll() throws Exception { startTestGrid(false, false, false, false, ORGANIZATION_CNT + PERSON_CNT + 1); @@ -406,6 +410,7 @@ public void testLoadCacheAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLoadCacheWithSql() throws Exception { startTestGrid(false, false, false, false, 512); @@ -415,6 +420,7 @@ public void testLoadCacheWithSql() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLoadCacheTx() throws Exception { startTestGrid(false, false, false, true, 512); @@ -424,6 +430,7 @@ public void testLoadCacheTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLoadCacheWithSqlTx() throws Exception { startTestGrid(false, false, false, true, 512); @@ -433,6 +440,7 @@ public void testLoadCacheWithSqlTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLoadCachePrimitiveKeys() throws Exception { startTestGrid(true, false, false, false, 512); @@ -442,6 +450,7 @@ public void testLoadCachePrimitiveKeys() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLoadCachePrimitiveKeysTx() throws Exception { startTestGrid(true, false, false, true, 512); @@ -532,6 +541,7 @@ private void checkPutRemove() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutRemoveBuiltIn() throws Exception { startTestGrid(true, false, false, false, 512); @@ -541,6 +551,7 @@ public void testPutRemoveBuiltIn() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutRemove() throws Exception { startTestGrid(false, false, false, false, 512); @@ -550,6 +561,7 @@ public void testPutRemove() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutRemoveTxBuiltIn() throws Exception { startTestGrid(true, false, false, true, 512); @@ -559,6 +571,7 @@ public void testPutRemoveTxBuiltIn() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutRemoveTx() throws Exception { startTestGrid(false, false, false, true, 512); @@ -568,6 +581,7 @@ public void testPutRemoveTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLoadNotRegisteredType() throws Exception { startTestGrid(false, false, false, false, 512); diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreBinaryMarshallerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreBinaryMarshallerSelfTest.java index b6d6fe13ac275..4e532684c774b 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreBinaryMarshallerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreBinaryMarshallerSelfTest.java @@ -32,6 +32,7 @@ public class CacheJdbcPojoStoreBinaryMarshallerSelfTest extends CacheJdbcPojoSto /** * @throws Exception If failed. */ + @Test public void testLoadCacheNoKeyClasses() throws Exception { startTestGrid(false, true, false, false, 512); @@ -41,6 +42,7 @@ public void testLoadCacheNoKeyClasses() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLoadCacheNoKeyClassesTx() throws Exception { startTestGrid(false, true, false, true, 512); @@ -50,6 +52,7 @@ public void testLoadCacheNoKeyClassesTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLoadCacheNoValueClasses() throws Exception { startTestGrid(false, false, true, false, 512); @@ -59,6 +62,7 @@ public void testLoadCacheNoValueClasses() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLoadCacheNoValueClassesTx() throws Exception { startTestGrid(false, false, true, true, 512); @@ -68,6 +72,7 @@ public void testLoadCacheNoValueClassesTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLoadCacheNoKeyAndValueClasses() throws Exception { startTestGrid(false, true, true, false, 512); @@ -77,6 +82,7 @@ public void testLoadCacheNoKeyAndValueClasses() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLoadCacheNoKeyAndValueClassesTx() throws Exception { startTestGrid(false, true, true, true, 512); diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreTest.java index ea2808fa7cd7c..990ecf5e71df0 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreTest.java @@ -269,6 +269,7 @@ public CacheJdbcPojoStoreTest() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLoadCache() throws Exception { Connection conn = store.openConnection(false); @@ -442,6 +443,7 @@ else if (k instanceof PersonComplexKey && v instanceof Person) { /** * @throws Exception If failed. */ + @Test public void testParallelLoad() throws Exception { Connection conn = store.openConnection(false); @@ -503,6 +505,7 @@ public void testParallelLoad() throws Exception { /** * @throws Exception If failed. */ + @Test public void testWriteRetry() throws Exception { CacheJdbcPojoStore store = store(); @@ -556,6 +559,7 @@ public void testWriteRetry() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTimestamp() throws Exception { Timestamp k = new Timestamp(System.currentTimeMillis()); diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcStoreAbstractMultithreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcStoreAbstractMultithreadedSelfTest.java index b1f8cd3c17746..3861de3bb9d5c 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcStoreAbstractMultithreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcStoreAbstractMultithreadedSelfTest.java @@ -195,6 +195,7 @@ protected CacheConfiguration cacheConfiguration() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultithreadedPut() throws Exception { IgniteInternalFuture fut1 = runMultiThreadedAsync(new Callable() { private final Random rnd = new Random(); @@ -243,6 +244,7 @@ public void testMultithreadedPut() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultithreadedPutAll() throws Exception { multithreaded(new Callable() { private final Random rnd = new Random(); @@ -285,6 +287,7 @@ public void testMultithreadedPutAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultithreadedExplicitTx() throws Exception { runMultiThreaded(new Callable() { private final Random rnd = new Random(); diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/GridCacheJdbcBlobStoreMultithreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/GridCacheJdbcBlobStoreMultithreadedSelfTest.java index 1f6849030a664..c12d683aff57c 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/GridCacheJdbcBlobStoreMultithreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/GridCacheJdbcBlobStoreMultithreadedSelfTest.java @@ -120,6 +120,7 @@ public class GridCacheJdbcBlobStoreMultithreadedSelfTest extends GridCommonAbstr /** * @throws Exception If failed. */ + @Test public void testMultithreadedPut() throws Exception { IgniteInternalFuture fut1 = runMultiThreadedAsync(new Callable() { private final Random rnd = new Random(); @@ -158,6 +159,7 @@ public void testMultithreadedPut() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultithreadedPutAll() throws Exception { runMultiThreaded(new Callable() { private final Random rnd = new Random(); @@ -184,6 +186,7 @@ public void testMultithreadedPutAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultithreadedExplicitTx() throws Exception { runMultiThreaded(new Callable() { private final Random rnd = new Random(); @@ -262,4 +265,4 @@ private void checkOpenedClosedCount() { assertEquals(opened, closed); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/JdbcTypesDefaultTransformerTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/JdbcTypesDefaultTransformerTest.java index 5e490f7368053..0f7cc839648e1 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/JdbcTypesDefaultTransformerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/JdbcTypesDefaultTransformerTest.java @@ -36,6 +36,7 @@ public class JdbcTypesDefaultTransformerTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testTransformer() throws Exception { // Connection to H2. String jdbcUrl = "jdbc:h2:mem:JdbcTypesDefaultTransformerTest"; diff --git a/modules/core/src/test/java/org/apache/ignite/client/SslParametersTest.java b/modules/core/src/test/java/org/apache/ignite/client/SslParametersTest.java index eb577c4465e98..dd9511d996ace 100644 --- a/modules/core/src/test/java/org/apache/ignite/client/SslParametersTest.java +++ b/modules/core/src/test/java/org/apache/ignite/client/SslParametersTest.java @@ -91,6 +91,7 @@ protected ClientConfiguration getClientConfiguration() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSameCipherSuite() throws Exception { cipherSuites = new String[] { "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", @@ -115,6 +116,7 @@ public void testSameCipherSuite() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOneCommonCipherSuite() throws Exception { cipherSuites = new String[] { "TLS_RSA_WITH_AES_128_GCM_SHA256", @@ -122,7 +124,7 @@ public void testOneCommonCipherSuite() throws Exception { }; startGrid(); - + checkSuccessfulClientStart( new String[][] { new String[] { @@ -137,13 +139,14 @@ public void testOneCommonCipherSuite() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNoCommonCipherSuite() throws Exception { cipherSuites = new String[] { "TLS_RSA_WITH_AES_128_GCM_SHA256" }; startGrid(); - + checkClientStartFailure( new String[][] { new String[] { @@ -158,13 +161,14 @@ public void testNoCommonCipherSuite() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNonExistentCipherSuite() throws Exception { cipherSuites = new String[] { "TLS_RSA_WITH_AES_128_GCM_SHA256" }; startGrid(); - + checkClientStartFailure( new String[][] { new String[] { @@ -181,6 +185,7 @@ public void testNonExistentCipherSuite() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNoCommonProtocols() throws Exception { protocols = new String[] { "TLSv1.1", @@ -203,6 +208,7 @@ public void testNoCommonProtocols() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNonExistentProtocol() throws Exception { protocols = new String[] { "SSLv3" @@ -226,6 +232,7 @@ public void testNonExistentProtocol() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSameProtocols() throws Exception { protocols = new String[] { "TLSv1.1", @@ -247,6 +254,7 @@ public void testSameProtocols() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOneCommonProtocol() throws Exception { protocols = new String[] { "TLSv1", diff --git a/modules/core/src/test/java/org/apache/ignite/failure/FailureHandlerTriggeredTest.java b/modules/core/src/test/java/org/apache/ignite/failure/FailureHandlerTriggeredTest.java index 23c7e0895b4b9..035ce0179e996 100644 --- a/modules/core/src/test/java/org/apache/ignite/failure/FailureHandlerTriggeredTest.java +++ b/modules/core/src/test/java/org/apache/ignite/failure/FailureHandlerTriggeredTest.java @@ -37,6 +37,7 @@ public class FailureHandlerTriggeredTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testFailureHandlerTriggeredOnExchangeWorkerTermination() throws Exception { try { CountDownLatch latch = new CountDownLatch(1); diff --git a/modules/core/src/test/java/org/apache/ignite/failure/FailureHandlingConfigurationTest.java b/modules/core/src/test/java/org/apache/ignite/failure/FailureHandlingConfigurationTest.java index 4e5b7535bb3a3..728fbfe70b038 100644 --- a/modules/core/src/test/java/org/apache/ignite/failure/FailureHandlingConfigurationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/failure/FailureHandlingConfigurationTest.java @@ -106,6 +106,7 @@ private class TestFailureHandler extends AbstractFailureHandler { /** * @throws Exception If failed. */ + @Test public void testCfgParamsPropagation() throws Exception { sysWorkerBlockedTimeout = 30_000L; checkpointReadLockTimeout = 20_000L; @@ -130,6 +131,7 @@ public void testCfgParamsPropagation() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPartialCfgParamsPropagation() throws Exception { sysWorkerBlockedTimeout = 30_000L; checkpointReadLockTimeout = null; @@ -154,6 +156,7 @@ public void testPartialCfgParamsPropagation() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNegativeParamValues() throws Exception { sysWorkerBlockedTimeout = -1L; checkpointReadLockTimeout = -85L; @@ -178,6 +181,7 @@ public void testNegativeParamValues() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOverridingBySysProps() throws Exception { String prevWorkerProp = System.getProperty(IGNITE_SYSTEM_WORKER_BLOCKED_TIMEOUT); String prevCheckpointProp = System.getProperty(IGNITE_CHECKPOINT_READ_LOCK_TIMEOUT); @@ -228,6 +232,7 @@ public void testOverridingBySysProps() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMBeanParamsChanging() throws Exception { IgniteEx ignite = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/failure/IoomFailureHandlerTest.java b/modules/core/src/test/java/org/apache/ignite/failure/IoomFailureHandlerTest.java index 7557d34ba26b2..c73a99f8cd98b 100644 --- a/modules/core/src/test/java/org/apache/ignite/failure/IoomFailureHandlerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/failure/IoomFailureHandlerTest.java @@ -96,6 +96,7 @@ public class IoomFailureHandlerTest extends AbstractFailureHandlerTest { /** * Test IgniteOutOfMemoryException handling with no store. */ + @Test public void testIoomErrorNoStoreHandling() throws Exception { testIoomErrorHandling(false, false); } @@ -103,6 +104,7 @@ public void testIoomErrorNoStoreHandling() throws Exception { /** * Test IgniteOutOfMemoryException handling with PDS. */ + @Test public void testIoomErrorPdsHandling() throws Exception { testIoomErrorHandling(true, false); } @@ -110,6 +112,7 @@ public void testIoomErrorPdsHandling() throws Exception { /** * Test IgniteOutOfMemoryException handling with no store. */ + @Test public void testIoomErrorMvccNoStoreHandling() throws Exception { testIoomErrorHandling(false, true); } @@ -117,6 +120,7 @@ public void testIoomErrorMvccNoStoreHandling() throws Exception { /** * Test IgniteOutOfMemoryException handling with PDS. */ + @Test public void testIoomErrorMvccPdsHandling() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10185"); @@ -126,6 +130,7 @@ public void testIoomErrorMvccPdsHandling() throws Exception { /** * Test IOOME handling. */ + @Test public void testIoomErrorHandling(boolean pds, boolean mvcc) throws Exception { this.pds = pds; this.mvcc = mvcc; diff --git a/modules/core/src/test/java/org/apache/ignite/failure/OomFailureHandlerTest.java b/modules/core/src/test/java/org/apache/ignite/failure/OomFailureHandlerTest.java index 2af94b88ee3e4..eb6fa3233d433 100644 --- a/modules/core/src/test/java/org/apache/ignite/failure/OomFailureHandlerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/failure/OomFailureHandlerTest.java @@ -64,6 +64,7 @@ public class OomFailureHandlerTest extends AbstractFailureHandlerTest { /** * Test OOME in IgniteCompute. */ + @Test public void testComputeOomError() throws Exception { IgniteEx ignite0 = startGrid(0); IgniteEx ignite1 = startGrid(1); @@ -88,6 +89,7 @@ public void testComputeOomError() throws Exception { /** * Test OOME in EntryProcessor. */ + @Test public void testEntryProcessorOomError() throws Exception { IgniteEx ignite0 = startGrid(0); IgniteEx ignite1 = startGrid(1); @@ -121,6 +123,7 @@ public void testEntryProcessorOomError() throws Exception { /** * Test OOME in service method invocation. */ + @Test public void testServiceInvokeOomError() throws Exception { IgniteEx ignite0 = startGrid(0); IgniteEx ignite1 = startGrid(1); @@ -149,6 +152,7 @@ public void testServiceInvokeOomError() throws Exception { /** * Test OOME in service execute. */ + @Test public void testServiceExecuteOomError() throws Exception { IgniteEx ignite0 = startGrid(0); IgniteEx ignite1 = startGrid(1); @@ -168,6 +172,7 @@ public void testServiceExecuteOomError() throws Exception { /** * Test OOME in event listener. */ + @Test public void testEventListenerOomError() throws Exception { IgniteEx ignite0 = startGrid(0); IgniteEx ignite1 = startGrid(1); diff --git a/modules/core/src/test/java/org/apache/ignite/failure/StopNodeFailureHandlerTest.java b/modules/core/src/test/java/org/apache/ignite/failure/StopNodeFailureHandlerTest.java index fb75aaeb40a92..fb249fbc51e43 100644 --- a/modules/core/src/test/java/org/apache/ignite/failure/StopNodeFailureHandlerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/failure/StopNodeFailureHandlerTest.java @@ -43,6 +43,7 @@ public class StopNodeFailureHandlerTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testNodeStopped() throws Exception { try { IgniteEx ignite0 = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/failure/StopNodeOrHaltFailureHandlerTest.java b/modules/core/src/test/java/org/apache/ignite/failure/StopNodeOrHaltFailureHandlerTest.java index 05e3e6e8faee1..e9f9b54fc1870 100644 --- a/modules/core/src/test/java/org/apache/ignite/failure/StopNodeOrHaltFailureHandlerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/failure/StopNodeOrHaltFailureHandlerTest.java @@ -56,6 +56,7 @@ public class StopNodeOrHaltFailureHandlerTest extends GridCommonAbstractTest { /** * Tests failed node's JVM is halted after triggering StopNodeOrHaltFailureHandler. */ + @Test public void testJvmHalted() throws Exception { IgniteEx g = grid(0); IgniteEx rmt1 = grid(1); diff --git a/modules/core/src/test/java/org/apache/ignite/failure/SystemWorkersBlockingTest.java b/modules/core/src/test/java/org/apache/ignite/failure/SystemWorkersBlockingTest.java index 3ca7948a38c76..72d42bb0af28c 100644 --- a/modules/core/src/test/java/org/apache/ignite/failure/SystemWorkersBlockingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/failure/SystemWorkersBlockingTest.java @@ -72,6 +72,7 @@ public class SystemWorkersBlockingTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testBlockingWorker() throws Exception { IgniteEx ignite = grid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/failure/SystemWorkersTerminationTest.java b/modules/core/src/test/java/org/apache/ignite/failure/SystemWorkersTerminationTest.java index 1cebe2204ac52..31fd9d4c4a147 100644 --- a/modules/core/src/test/java/org/apache/ignite/failure/SystemWorkersTerminationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/failure/SystemWorkersTerminationTest.java @@ -75,6 +75,7 @@ public class SystemWorkersTerminationTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testSyntheticWorkerTermination() throws Exception { IgniteEx ignite = grid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/igfs/IgfsEventsAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/igfs/IgfsEventsAbstractSelfTest.java index bb84ae3ec78dd..0d984e324f529 100644 --- a/modules/core/src/test/java/org/apache/ignite/igfs/IgfsEventsAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/igfs/IgfsEventsAbstractSelfTest.java @@ -184,6 +184,7 @@ protected static int[] concat(@Nullable int[] arr, int... obj) { * * @throws Exception If failed. */ + @Test public void testSingleFileNestedDirs() throws Exception { final List evtList = new ArrayList<>(); @@ -265,6 +266,7 @@ public void testSingleFileNestedDirs() throws Exception { * * @throws Exception If failed. */ + @Test public void testDirWithFiles() throws Exception { final List evtList = new ArrayList<>(); @@ -346,6 +348,7 @@ public void testDirWithFiles() throws Exception { * * @throws Exception If failed. */ + @Test public void testSingleEmptyDir() throws Exception { final List evtList = new ArrayList<>(); @@ -403,6 +406,7 @@ public void testSingleEmptyDir() throws Exception { * * @throws Exception If failed. */ + @Test public void testTwoFiles() throws Exception { final List evtList = new ArrayList<>(); @@ -490,6 +494,7 @@ public void testTwoFiles() throws Exception { * * @throws Exception If failed. */ + @Test public void testDeleteNonRecursive() throws Exception { final List evtList = new ArrayList<>(); @@ -544,6 +549,7 @@ public void testDeleteNonRecursive() throws Exception { * * @throws Exception If failed. */ + @Test public void testMoveFile() throws Exception { final List evtList = new ArrayList<>(); @@ -611,6 +617,7 @@ public void testMoveFile() throws Exception { * * @throws Exception If failed. */ + @Test public void testNestedEmptyDirs() throws Exception { final List evtList = new ArrayList<>(); @@ -661,6 +668,7 @@ public void testNestedEmptyDirs() throws Exception { * * @throws Exception If failed. */ + @Test public void testSingleFileOverwrite() throws Exception { final List evtList = new ArrayList<>(); @@ -747,6 +755,7 @@ public void testSingleFileOverwrite() throws Exception { * * @throws Exception If failed. */ + @Test public void testFileDataEvents() throws Exception { final List evtList = new ArrayList<>(); @@ -836,4 +845,4 @@ private static class EventPredicate implements IgnitePredicate { return e0.type() == evt && e0.path().equals(path); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/igfs/IgfsFragmentizerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/igfs/IgfsFragmentizerSelfTest.java index b95fc9cecdac7..962b1bba33d6f 100644 --- a/modules/core/src/test/java/org/apache/ignite/igfs/IgfsFragmentizerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/igfs/IgfsFragmentizerSelfTest.java @@ -36,6 +36,7 @@ public class IgfsFragmentizerSelfTest extends IgfsFragmentizerAbstractSelfTest { /** * @throws Exception If failed. */ + @Test public void testReadFragmentizing() throws Exception { IgniteFileSystem igfs = grid(0).fileSystem("igfs"); @@ -70,6 +71,7 @@ public void testReadFragmentizing() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAppendFragmentizing() throws Exception { checkAppendFragmentizing(IGFS_BLOCK_SIZE / 4, false); } @@ -77,6 +79,7 @@ public void testAppendFragmentizing() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAppendFragmentizingAligned() throws Exception { checkAppendFragmentizing(IGFS_BLOCK_SIZE, false); } @@ -84,6 +87,7 @@ public void testAppendFragmentizingAligned() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAppendFragmentizingDifferentNodes() throws Exception { checkAppendFragmentizing(IGFS_BLOCK_SIZE / 4, true); } @@ -91,6 +95,7 @@ public void testAppendFragmentizingDifferentNodes() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAppendFragmentizingAlignedDifferentNodes() throws Exception { checkAppendFragmentizing(IGFS_BLOCK_SIZE, true); } @@ -158,6 +163,7 @@ private void checkAppendFragmentizing(int chunkSize, boolean rotate) throws Exce /** * @throws Exception If failed. */ + @Test public void testFlushFragmentizing() throws Exception { checkFlushFragmentizing(IGFS_BLOCK_SIZE / 4); } @@ -165,6 +171,7 @@ public void testFlushFragmentizing() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFlushFragmentizingAligned() throws Exception { checkFlushFragmentizing(IGFS_BLOCK_SIZE); } @@ -223,6 +230,7 @@ private void checkFlushFragmentizing(int chunkSize) throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeleteFragmentizing() throws Exception { IgfsImpl igfs = (IgfsImpl)grid(0).fileSystem("igfs"); @@ -265,4 +273,4 @@ private static void readFully(InputStream in, byte[] data) throws IOException { while(read < data.length) read += in.read(data, read, data.length - read); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/igfs/IgfsFragmentizerTopologySelfTest.java b/modules/core/src/test/java/org/apache/ignite/igfs/IgfsFragmentizerTopologySelfTest.java index 9cc500624beb6..8b10416b8979d 100644 --- a/modules/core/src/test/java/org/apache/ignite/igfs/IgfsFragmentizerTopologySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/igfs/IgfsFragmentizerTopologySelfTest.java @@ -26,6 +26,7 @@ public class IgfsFragmentizerTopologySelfTest extends IgfsFragmentizerAbstractSe /** * @throws Exception If failed. */ + @Test public void testCoordinatorLeave() throws Exception { stopGrid(0); @@ -46,4 +47,4 @@ public void testCoordinatorLeave() throws Exception { startGrid(0); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/igfs/IgfsPathSelfTest.java b/modules/core/src/test/java/org/apache/ignite/igfs/IgfsPathSelfTest.java index 8e25054a799bc..346c88d261017 100644 --- a/modules/core/src/test/java/org/apache/ignite/igfs/IgfsPathSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/igfs/IgfsPathSelfTest.java @@ -46,6 +46,7 @@ public IgfsPathSelfTest() throws IgniteCheckedException { * * @throws Exception In case of any exception. */ + @Test public void testMethods() throws Exception { IgfsPath path = new IgfsPath("/a/s/d/f"); @@ -96,6 +97,7 @@ private T mu(T obj) throws IgniteCheckedException { * @throws Exception In case of any exception. */ @SuppressWarnings("TooBroadScope") + @Test public void testConstructors() throws Exception { String pathStr = "///"; URI uri = URI.create(pathStr); @@ -157,4 +159,4 @@ private void expectConstructorThrows(Class cls, final Objec } }, cls, null); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/ClassSetTest.java b/modules/core/src/test/java/org/apache/ignite/internal/ClassSetTest.java index c51957a0e7082..0352bc0980f36 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/ClassSetTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/ClassSetTest.java @@ -26,6 +26,7 @@ public class ClassSetTest extends TestCase { /** * @throws Exception If failed. */ + @Test public void testAddAndContains() throws Exception { ClassSet clsSet = new ClassSet(); @@ -39,6 +40,7 @@ public void testAddAndContains() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAddWithMaskAndContains() throws Exception { ClassSet clsSet = new ClassSet(); @@ -52,6 +54,7 @@ public void testAddWithMaskAndContains() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReduceOnAddWithMask() throws Exception { ClassSet clsSet = new ClassSet(); @@ -68,4 +71,4 @@ public void testReduceOnAddWithMask() throws Exception { assertTrue(clsSet.contains("org.apache.ignite.Ignition")); assertTrue(clsSet.contains("org.apache.ignite.NotIgnite")); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/ClusterBaselineNodesMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/ClusterBaselineNodesMetricsSelfTest.java index 46b09ac3b1819..299d9a365ce08 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/ClusterBaselineNodesMetricsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/ClusterBaselineNodesMetricsSelfTest.java @@ -53,6 +53,7 @@ public class ClusterBaselineNodesMetricsSelfTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testBaselineNodes() throws Exception { // Start 2 server nodes. IgniteEx ignite0 = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupAbstractTest.java index fbf938d0ea913..ba44a3d700b83 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupAbstractTest.java @@ -184,6 +184,7 @@ private Collection projectionNodeIds() { /** * Test for projection on not existing node IDs. */ + @Test public void testInvalidProjection() { Collection ids = new HashSet<>(); @@ -198,6 +199,7 @@ public void testInvalidProjection() { /** * @throws Exception If test failed. */ + @Test public void testProjection() throws Exception { assert prj != null; @@ -217,6 +219,7 @@ public void testProjection() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testRemoteNodes() throws Exception { Collection remoteNodeIds = remoteNodeIds(); @@ -247,6 +250,7 @@ public void testRemoteNodes() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testRemoteProjection() throws Exception { Collection remoteNodeIds = remoteNodeIds(); @@ -277,6 +281,7 @@ public void testRemoteProjection() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testExecution() throws Exception { String name = "oneMoreGrid"; @@ -757,4 +762,4 @@ public static class TestJob extends ComputeJobAdapter { @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { // No-op. } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupHostsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupHostsSelfTest.java index 141f4af7f9194..b30576af23a17 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupHostsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupHostsSelfTest.java @@ -60,6 +60,7 @@ public class ClusterGroupHostsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testForHosts() throws Exception { if (!tcpDiscovery()) return; @@ -89,6 +90,7 @@ public void testForHosts() throws Exception { /** * @throws Exception If failed. */ + @Test public void testHostNames() throws Exception { Ignite ignite = grid(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupSelfTest.java index 0c4812f61a5e7..b7f5d4a0b1dfe 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupSelfTest.java @@ -89,6 +89,7 @@ public class ClusterGroupSelfTest extends ClusterGroupAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRandom() throws Exception { assertTrue(ignite.cluster().nodes().contains(ignite.cluster().forRandom().node())); } @@ -96,6 +97,7 @@ public void testRandom() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOldest() throws Exception { ClusterGroup oldest = ignite.cluster().forOldest(); @@ -121,6 +123,7 @@ public void testOldest() throws Exception { /** * @throws Exception If failed. */ + @Test public void testYoungest() throws Exception { ClusterGroup youngest = ignite.cluster().forYoungest(); @@ -146,6 +149,7 @@ public void testYoungest() throws Exception { /** * @throws Exception If failed. */ + @Test public void testForDaemons() throws Exception { assertEquals(4, ignite.cluster().nodes().size()); @@ -171,6 +175,7 @@ public void testForDaemons() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNewNodes() throws Exception { ClusterGroup youngest = ignite.cluster().forYoungest(); ClusterGroup oldest = ignite.cluster().forOldest(); @@ -194,6 +199,7 @@ public void testNewNodes() throws Exception { /** * @throws Exception If failed. */ + @Test public void testForPredicate() throws Exception { IgnitePredicate evenP = new IgnitePredicate() { @Override public boolean apply(ClusterNode node) { @@ -237,6 +243,7 @@ public void testForPredicate() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAgeClusterGroupSerialization() throws Exception { Marshaller marshaller = ignite.configuration().getMarshaller(); @@ -260,6 +267,7 @@ public void testAgeClusterGroupSerialization() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientServer() throws Exception { ClusterGroup srv = ignite.cluster().forServers(); @@ -277,6 +285,7 @@ public void testClientServer() throws Exception { /** * @throws Exception If failed. */ + @Test public void testForCacheNodesOnDynamicCacheCreateDestroy() throws Exception { Random rnd = ThreadLocalRandom.current(); @@ -294,6 +303,7 @@ public void testForCacheNodesOnDynamicCacheCreateDestroy() throws Exception { /** * @throws Exception If failed. */ + @Test public void testForClientNodesOnDynamicCacheCreateDestroy() throws Exception { Random rnd = ThreadLocalRandom.current(); @@ -370,6 +380,7 @@ private void addException(AtomicReference exHldr, Exception ex) { /** * @throws Exception If failed. */ + @Test public void testEmptyGroup() throws Exception { ClusterGroup emptyGrp = ignite.cluster().forAttribute("nonExistent", "val"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/ClusterMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/ClusterMetricsSelfTest.java index 7168d3a2cca11..aeb69f19489cd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/ClusterMetricsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/ClusterMetricsSelfTest.java @@ -69,6 +69,7 @@ public class ClusterMetricsSelfTest extends GridCommonAbstractTest { /** * @throws Exception In case of error. */ + @Test public void testEmptyProjection() throws Exception { try { grid(0).cluster().forPredicate(F.alwaysFalse()).metrics(); @@ -83,6 +84,7 @@ public void testEmptyProjection() throws Exception { /** * */ + @Test public void testTaskExecution() { for (int i = 0; i < ITER_CNT; i++) { info("Starting new iteration: " + i); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsSelfTest.java index 22bb07f903670..92f3a5a214e00 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsSelfTest.java @@ -120,6 +120,7 @@ public class ClusterNodeMetricsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testAllocatedMemory() throws Exception { IgniteEx ignite = grid(); @@ -185,6 +186,7 @@ private void fillCache(final IgniteCache cache) throws Exceptio /** * @throws Exception If failed. */ + @Test public void testSingleTaskMetrics() throws Exception { Ignite ignite = grid(); @@ -243,6 +245,7 @@ public void testSingleTaskMetrics() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInternalTaskMetrics() throws Exception { Ignite ignite = grid(); @@ -300,6 +303,7 @@ public void testInternalTaskMetrics() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIoMetrics() throws Exception { Ignite ignite0 = grid(); Ignite ignite1 = startGrid(1); @@ -353,6 +357,7 @@ public void testIoMetrics() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClusterNodeMetrics() throws Exception { final Ignite ignite0 = grid(); final Ignite ignite1 = startGrid(1); @@ -381,6 +386,7 @@ public void testClusterNodeMetrics() throws Exception { * * @throws Exception If failed. */ + @Test public void testJmxClusterMetrics() throws Exception { Ignite node = grid(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsUpdateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsUpdateTest.java index 6e6b4a4fd8344..dd6496e3c1c57 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsUpdateTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsUpdateTest.java @@ -62,6 +62,7 @@ public class ClusterNodeMetricsUpdateTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testMetrics() throws Exception { int NODES = 6; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/ComputeJobCancelWithServiceSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/ComputeJobCancelWithServiceSelfTest.java index 6978ba2973ecc..d2ad8ee742d3e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/ComputeJobCancelWithServiceSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/ComputeJobCancelWithServiceSelfTest.java @@ -61,6 +61,7 @@ public class ComputeJobCancelWithServiceSelfTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testJobCancel() throws Exception { Ignite server = startGrid("server"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityMappedTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityMappedTest.java index 79c903114fcac..3a0204061137c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityMappedTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityMappedTest.java @@ -88,6 +88,7 @@ public GridAffinityMappedTest() { /** * @throws IgniteCheckedException If failed. */ + @Test public void testMappedAffinity() throws IgniteCheckedException { Ignite g1 = grid(1); Ignite g2 = grid(2); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityNoCacheSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityNoCacheSelfTest.java index bdd1ce6b9a13e..f31be4341487e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityNoCacheSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityNoCacheSelfTest.java @@ -52,6 +52,7 @@ public class GridAffinityNoCacheSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testAffinityProxyNoCache() throws Exception { checkAffinityProxyNoCache(new Object()); } @@ -59,6 +60,7 @@ public void testAffinityProxyNoCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAffinityProxyNoCacheCacheObject() throws Exception { checkAffinityProxyNoCache(new TestCacheObject(new Object())); } @@ -81,6 +83,7 @@ private void checkAffinityProxyNoCache(Object key) { /** * @throws Exception If failed. */ + @Test public void testAffinityImplCacheDeleted() throws Exception { checkAffinityImplCacheDeleted(new Object()); } @@ -88,6 +91,7 @@ public void testAffinityImplCacheDeleted() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAffinityImplCacheDeletedCacheObject() throws Exception { checkAffinityImplCacheDeleted(new TestCacheObject(new Object())); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityP2PSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityP2PSelfTest.java index a87e5d3e01974..712c04b046c82 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityP2PSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityP2PSelfTest.java @@ -118,6 +118,7 @@ public GridAffinityP2PSelfTest() { * * @throws Exception if error occur. */ + @Test public void testPrivateMode() throws Exception { depMode = DeploymentMode.PRIVATE; @@ -129,6 +130,7 @@ public void testPrivateMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testIsolatedMode() throws Exception { depMode = DeploymentMode.ISOLATED; @@ -140,6 +142,7 @@ public void testIsolatedMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testContinuousMode() throws Exception { depMode = DeploymentMode.CONTINUOUS; @@ -151,6 +154,7 @@ public void testContinuousMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testSharedMode() throws Exception { depMode = DeploymentMode.SHARED; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridAffinitySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridAffinitySelfTest.java index f85b2c0f5a8ea..f2cfc1d8d44fa 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridAffinitySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridAffinitySelfTest.java @@ -84,6 +84,7 @@ public class GridAffinitySelfTest extends GridCommonAbstractTest { /** * @throws IgniteCheckedException If failed. */ + @Test public void testAffinity() throws Exception { Ignite g1 = grid(1); Ignite g2 = grid(2); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridAlwaysFailoverSpiFailSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridAlwaysFailoverSpiFailSelfTest.java index 6fd8a8a08e47b..e05741c7b28f8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridAlwaysFailoverSpiFailSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridAlwaysFailoverSpiFailSelfTest.java @@ -62,6 +62,7 @@ public GridAlwaysFailoverSpiFailSelfTest() { /** * @throws Exception If failed. */ + @Test public void testFailoverTask() throws Exception { isFailoverCalled = false; @@ -85,6 +86,7 @@ public void testFailoverTask() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNoneFailoverTask() throws Exception { isFailoverCalled = false; @@ -162,4 +164,4 @@ private static class GridTestFailoverJob extends ComputeJobAdapter { throw this.argument(0); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridCachePartitionExchangeManagerHistSizeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridCachePartitionExchangeManagerHistSizeTest.java index 69d7368c652c7..9185fc5d5368d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridCachePartitionExchangeManagerHistSizeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridCachePartitionExchangeManagerHistSizeTest.java @@ -66,6 +66,7 @@ public class GridCachePartitionExchangeManagerHistSizeTest extends GridCommonAbs /** * @throws Exception If failed. */ + @Test public void testSingleExchangeHistSize() throws Exception { System.setProperty(IGNITE_EXCHANGE_HISTORY_SIZE, "1"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridCancelOnGridStopSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridCancelOnGridStopSelfTest.java index 61ed2b3ecb129..737d9e88f1c6f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridCancelOnGridStopSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridCancelOnGridStopSelfTest.java @@ -53,6 +53,7 @@ public GridCancelOnGridStopSelfTest() { /** * @throws Exception If failed. */ + @Test public void testCancelingJob() throws Exception { cancelCall = false; @@ -108,4 +109,4 @@ private static final class CancelledTask extends ComputeTaskAdapter empty = Collections.emptyList(); @@ -121,4 +122,4 @@ public UUID getSenderId() { return buf.toString(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridComputationBinarylizableClosuresSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridComputationBinarylizableClosuresSelfTest.java index a0e49b01ae1f0..88e7e06c713cd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridComputationBinarylizableClosuresSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridComputationBinarylizableClosuresSelfTest.java @@ -88,6 +88,7 @@ public class GridComputationBinarylizableClosuresSelfTest extends GridCommonAbst * * @throws Exception If failed. */ + @Test public void testJob() throws Exception { Ignite ignite = startGrid(1); startGrid(2); @@ -110,6 +111,7 @@ public void testJob() throws Exception { * * @throws Exception If failed. */ + @Test public void testMasterLeaveAwareJob() throws Exception { Ignite ignite = startGrid(1); startGrid(2); @@ -134,6 +136,7 @@ public void testMasterLeaveAwareJob() throws Exception { * * @throws Exception If failed. */ + @Test public void testCallable() throws Exception { Ignite ignite = startGrid(1); startGrid(2); @@ -153,6 +156,7 @@ public void testCallable() throws Exception { * * @throws Exception If failed. */ + @Test public void testMasterLeaveAwareCallable() throws Exception { Ignite ignite = startGrid(1); startGrid(2); @@ -174,6 +178,7 @@ public void testMasterLeaveAwareCallable() throws Exception { * * @throws Exception If failed. */ + @Test public void testRunnable() throws Exception { Ignite ignite = startGrid(1); startGrid(2); @@ -193,6 +198,7 @@ public void testRunnable() throws Exception { * * @throws Exception If failed. */ + @Test public void testMasterLeaveAwareRunnable() throws Exception { Ignite ignite = startGrid(1); startGrid(2); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousJobAnnotationSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousJobAnnotationSelfTest.java index 55ba0fe98f32b..234c49d4ac799 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousJobAnnotationSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousJobAnnotationSelfTest.java @@ -70,6 +70,7 @@ public class GridContinuousJobAnnotationSelfTest extends GridCommonAbstractTest /** * @throws Exception If test failed. */ + @Test public void testJobAnnotation() throws Exception { testContinuousJobAnnotation(TestJob.class); } @@ -77,6 +78,7 @@ public void testJobAnnotation() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testJobChildAnnotation() throws Exception { testContinuousJobAnnotation(TestJobChild.class); } @@ -85,6 +87,7 @@ public void testJobChildAnnotation() throws Exception { * @param jobCls Job class. * @throws Exception If test failed. */ + @Test public void testContinuousJobAnnotation(Class jobCls) throws Exception { try { Ignite ignite = startGrid(0); @@ -224,4 +227,4 @@ private static class TestJobChild extends TestJob { // No-op. } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousJobSiblingsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousJobSiblingsSelfTest.java index 5bbbd855d0df7..b1ec746bbb9d0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousJobSiblingsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousJobSiblingsSelfTest.java @@ -49,6 +49,7 @@ public class GridContinuousJobSiblingsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If test failed. */ + @Test public void testContinuousJobSiblings() throws Exception { try { Ignite ignite = startGrid(0); @@ -64,6 +65,7 @@ public void testContinuousJobSiblings() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testContinuousJobSiblingsLocalNode() throws Exception { try { Ignite ignite = startGrid(0); @@ -154,4 +156,4 @@ private static class TestJob extends ComputeJobAdapter { return null; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousTaskSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousTaskSelfTest.java index 6589dced7262f..f9e466d203cdf 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousTaskSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousTaskSelfTest.java @@ -70,6 +70,7 @@ public class GridContinuousTaskSelfTest extends GridCommonAbstractTest { /** * @throws Exception If test failed. */ + @Test public void testContinuousJobsChain() throws Exception { try { Ignite ignite = startGrid(0); @@ -89,6 +90,7 @@ public void testContinuousJobsChain() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testContinuousJobsChainMultiThreaded() throws Exception { try { final Ignite ignite = startGrid(0); @@ -121,6 +123,7 @@ public void testContinuousJobsChainMultiThreaded() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testContinuousJobsSessionChain() throws Exception { try { Ignite ignite = startGrid(0); @@ -137,6 +140,7 @@ public void testContinuousJobsSessionChain() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testContinuousSlowMap() throws Exception { try { Ignite ignite = startGrid(0); @@ -154,6 +158,7 @@ public void testContinuousSlowMap() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testClearTimeouts() throws Exception { int holdccTimeout = 4000; @@ -176,6 +181,7 @@ public void testClearTimeouts() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testMultipleHoldccCalls() throws Exception { try { Ignite grid = startGrid(0); @@ -190,6 +196,7 @@ public void testMultipleHoldccCalls() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testClosureWithNestedInternalTask() throws Exception { try { IgniteEx ignite = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridDeploymentMultiThreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridDeploymentMultiThreadedSelfTest.java index cabcba16404e1..1e86065620b3d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridDeploymentMultiThreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridDeploymentMultiThreadedSelfTest.java @@ -47,6 +47,7 @@ public class GridDeploymentMultiThreadedSelfTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testDeploy() throws Exception { try { final Ignite ignite = startGrid(0); @@ -123,4 +124,4 @@ private static class GridDeploymentTestTask extends ComputeTaskAdapter nodes = ignite.cluster().forRemotes().nodes(); @@ -110,6 +111,7 @@ public void testGetRemoteNodes() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetAllNodes() throws Exception { Collection nodes = ignite.cluster().nodes(); @@ -122,6 +124,7 @@ public void testGetAllNodes() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetLocalNode() throws Exception { ClusterNode node = ignite.cluster().localNode(); @@ -136,6 +139,7 @@ public void testGetLocalNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPingNode() throws Exception { ClusterNode node = ignite.cluster().localNode(); @@ -149,6 +153,7 @@ public void testPingNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDiscoveryListener() throws Exception { ClusterNode node = ignite.cluster().localNode(); @@ -218,6 +223,7 @@ else if (EVT_NODE_LEFT == evt.type() || EVT_NODE_FAILED == evt.type()) { * * @throws Exception In case of any exception. */ + @Test public void testCacheNodes() throws Exception { // Validate only original node is available. GridDiscoveryManager discoMgr = ((IgniteKernal) ignite).context().discovery(); @@ -399,4 +405,4 @@ private static class GridDiscoveryTestNode extends GridMetadataAwareAdapter impl return id().hashCode(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageCheckAllEventsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageCheckAllEventsSelfTest.java index 91869023211fc..abcfd5ad7c5d0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageCheckAllEventsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageCheckAllEventsSelfTest.java @@ -132,6 +132,7 @@ private void assertEvent(int evtType, int expType, List evts) { /** * @throws Exception If test failed. */ + @Test public void testCheckpointEvents() throws Exception { long tstamp = startTimestamp(); @@ -158,6 +159,7 @@ public void testCheckpointEvents() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testTaskUndeployEvents() throws Exception { final long tstamp = startTimestamp(); @@ -201,6 +203,7 @@ public void testTaskUndeployEvents() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testSuccessTask() throws Exception { generateEvents(null, new GridAllEventsSuccessTestJob()).get(); @@ -228,6 +231,7 @@ public void testSuccessTask() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testFailoverJobTask() throws Exception { startGrid(0); @@ -269,6 +273,7 @@ public void testFailoverJobTask() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testFailTask() throws Exception { long tstamp = startTimestamp(); @@ -300,6 +305,7 @@ public void testFailTask() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testTimeoutTask() throws Exception { long tstamp = startTimestamp(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageDefaultExceptionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageDefaultExceptionTest.java index 2cf727e6f1be9..97235585c3f75 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageDefaultExceptionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageDefaultExceptionTest.java @@ -48,6 +48,7 @@ public GridEventStorageDefaultExceptionTest() { /** * @throws Exception In case of error. */ + @Test public void testLocalNodeEventStorage() throws Exception { try { grid().events().localQuery(F.alwaysTrue()); @@ -64,6 +65,7 @@ public void testLocalNodeEventStorage() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testRemoteNodeEventStorage() throws Exception { try { grid().events().remoteQuery(F.alwaysTrue(), 0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageRuntimeConfigurationSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageRuntimeConfigurationSelfTest.java index cf401c59341c6..2d9bc4f426055 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageRuntimeConfigurationSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageRuntimeConfigurationSelfTest.java @@ -61,6 +61,7 @@ public class GridEventStorageRuntimeConfigurationSelfTest extends GridCommonAbst /** * @throws Exception If failed. */ + @Test public void testEnableWithDefaults() throws Exception { inclEvtTypes = null; @@ -95,6 +96,7 @@ public void testEnableWithDefaults() throws Exception { /** * @throws Exception If failed. */ + @Test public void testEnableWithIncludes() throws Exception { inclEvtTypes = new int[] { EVT_TASK_STARTED, EVT_TASK_FINISHED }; @@ -129,6 +131,7 @@ public void testEnableWithIncludes() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDisableWithIncludes() throws Exception { inclEvtTypes = null; @@ -165,6 +168,7 @@ public void testDisableWithIncludes() throws Exception { /** * @throws Exception If failed. */ + @Test public void testEnableDisable() throws Exception { inclEvtTypes = null; @@ -188,6 +192,7 @@ public void testEnableDisable() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvalidTypes() throws Exception { inclEvtTypes = new int[]{EVT_TASK_STARTED}; @@ -223,6 +228,7 @@ public void testInvalidTypes() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetters() throws Exception { inclEvtTypes = new int[]{EVT_TASK_STARTED, EVT_TASK_FINISHED, 30000}; @@ -353,4 +359,4 @@ private int[] getEnabledEvents(int limit, Ignite g, int... customTypes) { return U.toIntArray(res); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageSelfTest.java index 4f98b0c271171..1a617c2d04700 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageSelfTest.java @@ -82,6 +82,7 @@ public GridEventStorageSelfTest() { /** * @throws Exception In case of error. */ + @Test public void testAddRemoveGlobalListener() throws Exception { IgnitePredicate lsnr = new IgnitePredicate() { @Override public boolean apply(Event evt) { @@ -99,6 +100,7 @@ public void testAddRemoveGlobalListener() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testAddRemoveDiscoListener() throws Exception { IgnitePredicate lsnr = new IgnitePredicate() { @Override public boolean apply(Event evt) { @@ -117,6 +119,7 @@ public void testAddRemoveDiscoListener() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testLocalNodeEventStorage() throws Exception { TestEventListener lsnr = new TestEventListener(); @@ -164,6 +167,7 @@ public void testLocalNodeEventStorage() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testRemoteNodeEventStorage() throws Exception { IgnitePredicate filter = new TestEventFilter(); @@ -180,6 +184,7 @@ public void testRemoteNodeEventStorage() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testRemoteAndLocalNodeEventStorage() throws Exception { IgnitePredicate filter = new TestEventFilter(); @@ -211,6 +216,7 @@ private void checkGridInternalEvent(Event evt) { /** * @throws Exception In case of error. */ + @Test public void testGridInternalEvents() throws Exception { IgnitePredicate lsnr = new IgnitePredicate() { @Override public boolean apply(Event evt) { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridFailFastNodeFailureDetectionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridFailFastNodeFailureDetectionSelfTest.java index 79dc81ae84152..bef1fe75986cd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridFailFastNodeFailureDetectionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridFailFastNodeFailureDetectionSelfTest.java @@ -69,6 +69,7 @@ public class GridFailFastNodeFailureDetectionSelfTest extends GridCommonAbstract /** * @throws Exception If failed. */ + @Test public void testFailFast() throws Exception { startGridsMultiThreaded(5); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridFailedInputParametersSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridFailedInputParametersSelfTest.java index 9446db68eabd9..363b5f8d625ba 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridFailedInputParametersSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridFailedInputParametersSelfTest.java @@ -47,6 +47,7 @@ public GridFailedInputParametersSelfTest() { /** * @throws Exception Thrown in case of any errors. */ + @Test public void testAddEventLocalListener() throws Exception { try { ignite.events().localListen(null, EVTS_ALL); @@ -61,6 +62,7 @@ public void testAddEventLocalListener() throws Exception { /** * @throws Exception Thrown in case of any errors. */ + @Test public void testRemoveEventLocalListener() throws Exception { try { ignite.events().stopLocalListen(null); @@ -75,6 +77,7 @@ public void testRemoveEventLocalListener() throws Exception { /** * @throws Exception Thrown in case of any errors. */ + @Test public void testAddDiscoveryListener() throws Exception { try { ignite.events().localListen(null, EVTS_ALL); @@ -89,6 +92,7 @@ public void testAddDiscoveryListener() throws Exception { /** * @throws Exception Thrown in case of any errors. */ + @Test public void testRemoveDiscoveryListener() throws Exception { try { ignite.events().stopLocalListen(null); @@ -103,6 +107,7 @@ public void testRemoveDiscoveryListener() throws Exception { /** * @throws Exception Thrown in case of any errors. */ + @Test public void testGetNode() throws Exception { try { ignite.cluster().node(null); @@ -117,6 +122,7 @@ public void testGetNode() throws Exception { /** * @throws Exception Thrown in case of any errors. */ + @Test public void testPingNode() throws Exception { try { ignite.cluster().pingNode(null); @@ -131,6 +137,7 @@ public void testPingNode() throws Exception { /** * @throws Exception Thrown in case of any errors. */ + @Test public void testDeployTask() throws Exception { try { ignite.compute().localDeployTask(null, null); @@ -153,4 +160,4 @@ public void testDeployTask() throws Exception { // Check for exceptions. ignite.compute().localDeployTask(GridTestTask.class, U.detectClassLoader(GridTestTask.class)); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverCustomTopologySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverCustomTopologySelfTest.java index 86bca80e88906..01173e5ff93d2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverCustomTopologySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverCustomTopologySelfTest.java @@ -81,6 +81,7 @@ public GridFailoverCustomTopologySelfTest() { * @throws Exception If failed. */ @SuppressWarnings({"WaitNotInLoop", "UnconditionalWait"}) + @Test public void testFailoverTopology() throws Exception { try { Ignite ignite1 = startGrid(1); @@ -192,4 +193,4 @@ public static class JobTask extends ComputeTaskAdapter { return results.get(0).getData(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverSelfTest.java index 5ed22459d48a0..87733a9ac0df0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverSelfTest.java @@ -66,6 +66,7 @@ public GridFailoverSelfTest() { /** * @throws Exception If failed. */ + @Test public void testJobFail() throws Exception { try { Ignite ignite1 = startGrid(1); @@ -160,4 +161,4 @@ private static class JobFailTask implements ComputeTask { return results.get(0).getData(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverTaskWithPredicateSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverTaskWithPredicateSelfTest.java index 84f31cb9485b0..78a637f227a54 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverTaskWithPredicateSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverTaskWithPredicateSelfTest.java @@ -98,6 +98,7 @@ public class GridFailoverTaskWithPredicateSelfTest extends GridCommonAbstractTes * * @throws Exception If failed. */ + @Test public void testJobNotFailedOver() throws Exception { failed.set(false); routed.set(false); @@ -129,6 +130,7 @@ public void testJobNotFailedOver() throws Exception { * * @throws Exception If failed. */ + @Test public void testJobFailedOver() throws Exception { failed.set(false); routed.set(false); @@ -166,6 +168,7 @@ public void testJobFailedOver() throws Exception { * * @throws Exception If error happens. */ + @Test public void testJobNotFailedOverWithStaticProjection() throws Exception { failed.set(false); routed.set(false); @@ -255,4 +258,4 @@ private static class JobFailTask implements ComputeTask { } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverTopologySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverTopologySelfTest.java index dd78768333658..19119beab8309 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverTopologySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverTopologySelfTest.java @@ -92,6 +92,7 @@ public GridFailoverTopologySelfTest() { * * @throws Exception If failed. */ + @Test public void testFailoverTopology() throws Exception { try { Ignite ignite1 = startGrid(1); @@ -164,4 +165,4 @@ private static class JobFailTask implements ComputeTask { return results.get(0).getData(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridGetOrStartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridGetOrStartSelfTest.java index 74d50cfcbf8d4..49deaf852f203 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridGetOrStartSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridGetOrStartSelfTest.java @@ -37,6 +37,7 @@ public GridGetOrStartSelfTest() { /** * Tests default Ignite instance */ + @Test public void testDefaultIgniteInstanceGetOrStart() throws Exception { IgniteConfiguration cfg = getConfiguration(null); try(Ignite ignite = Ignition.getOrStart(cfg)) { @@ -54,6 +55,7 @@ public void testDefaultIgniteInstanceGetOrStart() throws Exception { /** * Tests named Ignite instance */ + @Test public void testNamedIgniteInstanceGetOrStart() throws Exception { IgniteConfiguration cfg = getConfiguration("test"); try(Ignite ignite = Ignition.getOrStart(cfg)) { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridHomePathSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridHomePathSelfTest.java index 281c360d48b27..affd021e541da 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridHomePathSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridHomePathSelfTest.java @@ -41,6 +41,7 @@ public class GridHomePathSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testHomeOverride() throws Exception { try { startGrid(0); @@ -73,4 +74,4 @@ public void testHomeOverride() throws Exception { stopAllGrids(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridJobCheckpointCleanupSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridJobCheckpointCleanupSelfTest.java index eca7ebee3067c..b5a8b91b3efa4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridJobCheckpointCleanupSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridJobCheckpointCleanupSelfTest.java @@ -64,6 +64,7 @@ public class GridJobCheckpointCleanupSelfTest extends GridCommonAbstractTest { * * @throws Exception if failed. */ + @Test public void testCheckpointCleanup() throws Exception { try { checkpointSpi = new TestCheckpointSpi("task-checkpoints", cntr); @@ -169,4 +170,4 @@ private static class CheckpointCountingTestTask extends ComputeTaskAdapter>() { @Override public IgniteFuture applyx(ClusterGroup grid) { @@ -282,6 +287,7 @@ public void testApply1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testApply2() throws Exception { testMasterLeaveAwareCallback(2, new CX1>() { @Override public IgniteFuture applyx(ClusterGroup grid) { @@ -293,6 +299,7 @@ public void testApply2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testApply3() throws Exception { testMasterLeaveAwareCallback(2, new CX1>() { @Override public IgniteFuture applyx(ClusterGroup grid) { @@ -314,6 +321,7 @@ public void testApply3() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRun1() throws Exception { testMasterLeaveAwareCallback(1, new CX1>() { @Override public IgniteFuture applyx(ClusterGroup prj) { @@ -325,6 +333,7 @@ public void testRun1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRun2() throws Exception { testMasterLeaveAwareCallback(2, new CX1>() { @Override public IgniteFuture applyx(ClusterGroup prj) { @@ -336,6 +345,7 @@ public void testRun2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCall1() throws Exception { testMasterLeaveAwareCallback(1, new CX1>() { @Override public IgniteFuture applyx(ClusterGroup prj) { @@ -347,6 +357,7 @@ public void testCall1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCall2() throws Exception { testMasterLeaveAwareCallback(2, new CX1>() { @Override public IgniteFuture applyx(ClusterGroup prj) { @@ -358,6 +369,7 @@ public void testCall2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCall3() throws Exception { testMasterLeaveAwareCallback(2, new CX1>() { @Override public IgniteFuture applyx(ClusterGroup prj) { @@ -379,6 +391,7 @@ public void testCall3() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBroadcast1() throws Exception { testMasterLeaveAwareCallback(1, new CX1>() { @Override public IgniteFuture applyx(ClusterGroup prj) { @@ -390,6 +403,7 @@ public void testBroadcast1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBroadcast2() throws Exception { testMasterLeaveAwareCallback(1, new CX1>() { @Override public IgniteFuture applyx(ClusterGroup prj) { @@ -401,6 +415,7 @@ public void testBroadcast2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBroadcast3() throws Exception { testMasterLeaveAwareCallback(1, new CX1>() { @Override public IgniteFuture applyx(ClusterGroup prj) { @@ -412,6 +427,7 @@ public void testBroadcast3() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAffinityRun() throws Exception { testMasterLeaveAwareCallback(1, new CX1>() { @Override public IgniteFuture applyx(ClusterGroup prj) { @@ -427,6 +443,7 @@ public void testAffinityRun() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAffinityCall() throws Exception { testMasterLeaveAwareCallback(1, new CX1>() { @Override public IgniteFuture applyx(ClusterGroup prj) { @@ -767,4 +784,4 @@ private void awaitResponse() throws IgniteInterruptedCheckedException { U.await(respLatch); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridJobServicesAddNodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridJobServicesAddNodeTest.java index aab33db8334c7..a700ed5b84d6d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridJobServicesAddNodeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridJobServicesAddNodeTest.java @@ -83,6 +83,7 @@ public class GridJobServicesAddNodeTest extends GridCommonAbstractTest { /** * @throws Exception If test failed. */ + @Test public void testServiceDescriptorsJob() throws Exception { final int tasks = 5000; final int threads = 10; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridJobStealingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridJobStealingSelfTest.java index 04f7bfc523535..c18652faa729e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridJobStealingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridJobStealingSelfTest.java @@ -96,6 +96,7 @@ public GridJobStealingSelfTest() { * * @throws IgniteCheckedException If test failed. */ + @Test public void testTwoJobs() throws IgniteCheckedException { executeAsync(ignite1.compute(), new JobStealingSingleNodeTask(2), null).get(TASK_EXEC_TIMEOUT_MS); @@ -110,6 +111,7 @@ public void testTwoJobs() throws IgniteCheckedException { * * @throws IgniteCheckedException If test failed. */ + @Test public void testTwoJobsNullPredicate() throws IgniteCheckedException { executeAsync(ignite1.compute(), new JobStealingSingleNodeTask(2), null).get(TASK_EXEC_TIMEOUT_MS); @@ -124,6 +126,7 @@ public void testTwoJobsNullPredicate() throws IgniteCheckedException { * * @throws IgniteCheckedException If test failed. */ + @Test public void testTwoJobsTaskNameNullPredicate() throws IgniteCheckedException { executeAsync(ignite1.compute(), JobStealingSingleNodeTask.class.getName(), null).get(TASK_EXEC_TIMEOUT_MS); @@ -138,6 +141,7 @@ public void testTwoJobsTaskNameNullPredicate() throws IgniteCheckedException { * * @throws IgniteCheckedException If test failed. */ + @Test public void testTwoJobsPartiallyNullPredicate() throws IgniteCheckedException { IgnitePredicate topPred = new IgnitePredicate() { @Override public boolean apply(ClusterNode e) { @@ -158,6 +162,7 @@ public void testTwoJobsPartiallyNullPredicate() throws IgniteCheckedException { * * @throws Exception If failed. */ + @Test public void testProjectionPredicate() throws Exception { final Ignite ignite3 = startGrid(3); @@ -181,6 +186,7 @@ public void testProjectionPredicate() throws Exception { * * @throws Exception If failed. */ + @Test public void testProjectionPredicateInternalStealing() throws Exception { final Ignite ignite3 = startGrid(3); @@ -209,6 +215,7 @@ public void testProjectionPredicateInternalStealing() throws Exception { * * @throws Exception If failed. */ + @Test public void testSingleNodeTopology() throws Exception { IgnitePredicate p = new IgnitePredicate() { @Override public boolean apply(ClusterNode e) { @@ -229,6 +236,7 @@ public void testSingleNodeTopology() throws Exception { * * @throws Exception If failed. */ + @Test public void testSingleNodeProjection() throws Exception { ClusterGroup prj = ignite1.cluster().forNodeIds(Collections.singleton(ignite1.cluster().localNode().id())); @@ -244,6 +252,7 @@ public void testSingleNodeProjection() throws Exception { * * @throws Exception If failed. */ + @Test public void testSingleNodeProjectionNullPredicate() throws Exception { ClusterGroup prj = ignite1.cluster().forNodeIds(Collections.singleton(ignite1.cluster().localNode().id())); @@ -260,6 +269,7 @@ public void testSingleNodeProjectionNullPredicate() throws Exception { * @throws Exception If failed. */ @SuppressWarnings("unchecked") + @Test public void testProjectionPredicateDifferentClassLoaders() throws Exception { final Ignite ignite3 = startGrid(3); @@ -447,4 +457,4 @@ private static final class GridJobStealingJob extends ComputeJobAdapter { return ignite.cluster().localNode().id(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridJobStealingZeroActiveJobsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridJobStealingZeroActiveJobsSelfTest.java index 31015cefe4791..24a56a8b9e547 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridJobStealingZeroActiveJobsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridJobStealingZeroActiveJobsSelfTest.java @@ -75,6 +75,7 @@ public GridJobStealingZeroActiveJobsSelfTest() { * * @throws IgniteCheckedException If test failed. */ + @Test public void testTwoJobs() throws IgniteCheckedException { ignite1.compute().execute(JobStealingTask.class, null); } @@ -176,4 +177,4 @@ public static final class GridJobStealingJob extends ComputeJobAdapter { return ignite.name(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridJobSubjectIdSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridJobSubjectIdSelfTest.java index 95a792697ecfe..5d84c295c0911 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridJobSubjectIdSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridJobSubjectIdSelfTest.java @@ -85,6 +85,7 @@ public class GridJobSubjectIdSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testJobSubjectId() throws Exception { node2.events().localListen(new IgnitePredicate() { @Override public boolean apply(Event evt) { @@ -110,6 +111,7 @@ public void testJobSubjectId() throws Exception { * * @throws Exception If failed. */ + @Test public void testModifiedSubjectId() throws Exception { node1.events().localListen(new IgnitePredicate() { @Override public boolean apply(Event evt) { @@ -197,4 +199,4 @@ public static class Job extends ComputeJobAdapter { return null; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridKernalConcurrentAccessStopSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridKernalConcurrentAccessStopSelfTest.java index 2db34e0761c62..90c361c22887a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridKernalConcurrentAccessStopSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridKernalConcurrentAccessStopSelfTest.java @@ -41,6 +41,7 @@ public class GridKernalConcurrentAccessStopSelfTest extends GridCommonAbstractT /** * */ + @Test public void testConcurrentAccess() { for (int i = 0; i < GRIDS; i++) { grid(i).events().localListen(new IgnitePredicate() { @@ -56,4 +57,4 @@ public void testConcurrentAccess() { }, EVT_NODE_FAILED, EVT_NODE_LEFT, EVT_NODE_JOINED); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridLifecycleBeanSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridLifecycleBeanSelfTest.java index 7fe0924d1f88d..1a97b687249d2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridLifecycleBeanSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridLifecycleBeanSelfTest.java @@ -61,6 +61,7 @@ public class GridLifecycleBeanSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testGetIgnite() throws Exception { final AtomicBoolean done = new AtomicBoolean(); @@ -96,6 +97,7 @@ public void testGetIgnite() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNoErrors() throws Exception { bean = new LifeCycleBaseBean(); @@ -125,6 +127,7 @@ public void testNoErrors() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGridErrorBeforeStart() throws Exception { checkBeforeStart(true); } @@ -132,6 +135,7 @@ public void testGridErrorBeforeStart() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOtherErrorBeforeStart() throws Exception { checkBeforeStart(false); } @@ -139,6 +143,7 @@ public void testOtherErrorBeforeStart() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGridErrorAfterStart() throws Exception { checkAfterStart(true); } @@ -146,6 +151,7 @@ public void testGridErrorAfterStart() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOtherErrorAfterStart() throws Exception { checkAfterStart(false); } @@ -207,6 +213,7 @@ private void checkAfterStart(boolean gridErr) throws Exception { /** * @throws Exception If failed. */ + @Test public void testGridErrorBeforeStop() throws Exception { checkOnStop(BEFORE_NODE_STOP, true); @@ -219,6 +226,7 @@ public void testGridErrorBeforeStop() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOtherErrorBeforeStop() throws Exception { checkOnStop(BEFORE_NODE_STOP, false); @@ -231,6 +239,7 @@ public void testOtherErrorBeforeStop() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGridErrorAfterStop() throws Exception { checkOnStop(AFTER_NODE_STOP, true); @@ -243,6 +252,7 @@ public void testGridErrorAfterStop() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOtherErrorAfterStop() throws Exception { checkOnStop(AFTER_NODE_STOP, false); @@ -356,4 +366,4 @@ private LifeCycleExceptionBean(LifecycleEventType errType, boolean gridErr) { super.onLifecycleEvent(evt); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridListenActorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridListenActorSelfTest.java index efa25a7b28ae7..c2716f3b6cb61 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridListenActorSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridListenActorSelfTest.java @@ -52,6 +52,7 @@ public class GridListenActorSelfTest extends GridCommonAbstractTest { * * @throws Exception Thrown if failed. */ + @Test public void testBasicFlow() throws Exception { final AtomicInteger cnt = new AtomicInteger(0); @@ -85,6 +86,7 @@ public void testBasicFlow() throws Exception { /** * @throws Exception If failed. */ + @Test public void testImmediateStop() throws Exception { doSendReceive(MSG_QTY, 1); } @@ -92,6 +94,7 @@ public void testImmediateStop() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReceiveAll() throws Exception { doSendReceive(MSG_QTY, MSG_QTY); } @@ -101,6 +104,7 @@ public void testReceiveAll() throws Exception { * * @throws Exception If failed. */ + @Test public void testRespondToRemote() throws Exception { startGrid(1); @@ -144,6 +148,7 @@ public void testRespondToRemote() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPingPong() throws Exception { final AtomicInteger pingCnt = new AtomicInteger(); final AtomicInteger pongCnt = new AtomicInteger(); @@ -219,4 +224,4 @@ private void doSendReceive(int snd, final int rcv) throws Exception { assert cnt.intValue() == rcv; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridLocalEventListenerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridLocalEventListenerSelfTest.java index 43371789f2914..5cbdc8cc74a1c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridLocalEventListenerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridLocalEventListenerSelfTest.java @@ -67,9 +67,10 @@ public class GridLocalEventListenerSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testListener() throws Exception { startGrids(2); assert fired.await(5000, TimeUnit.MILLISECONDS); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridMBeansTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridMBeansTest.java index 1c3998257e955..4c52d0999c57c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridMBeansTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridMBeansTest.java @@ -54,6 +54,7 @@ public GridMBeansTest() { } /** Check that kernal bean is available */ + @Test public void testKernalBeans() throws Exception { checkBean("Kernal", "IgniteKernal", "InstanceName", grid().name()); checkBean("Kernal", "ClusterMetricsMXBeanImpl", "TotalServerNodes", 1); @@ -61,6 +62,7 @@ public void testKernalBeans() throws Exception { } /** Check that kernal bean is available */ + @Test public void testExecutorBeans() throws Exception { // standard executors checkBean("Thread Pools", "GridExecutionExecutor", "Terminated", false); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridMultipleJobsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridMultipleJobsSelfTest.java index 22f0fa7a8aae3..ac07739dc43a8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridMultipleJobsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridMultipleJobsSelfTest.java @@ -99,6 +99,7 @@ public class GridMultipleJobsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If test failed. */ + @Test public void testNotAffinityJobs() throws Exception { /* =========== Test properties =========== */ int jobsNum = 5000; @@ -110,6 +111,7 @@ public void testNotAffinityJobs() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testAffinityJobs() throws Exception { /* =========== Test properties =========== */ int jobsNum = 5000; @@ -223,4 +225,4 @@ public static class AffinityJob implements IgniteCallable { return true; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridMultipleSpisSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridMultipleSpisSelfTest.java index edadcfe4371af..f94fd47d4cefc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridMultipleSpisSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridMultipleSpisSelfTest.java @@ -109,6 +109,7 @@ public GridMultipleSpisSelfTest() { /** * @throws Exception If failed. */ + @Test public void testFailoverTask() throws Exception { // Start local and remote grids. Ignite ignite1 = startGrid(1); @@ -310,4 +311,4 @@ private static class GridTestMultipleSpisJob extends ComputeJobAdapter { return argument(0); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridMultipleVersionsDeploymentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridMultipleVersionsDeploymentSelfTest.java index dc5c16daa2def..d3452b2489d31 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridMultipleVersionsDeploymentSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridMultipleVersionsDeploymentSelfTest.java @@ -101,6 +101,7 @@ private boolean checkDeployed(Ignite ignite, String taskName) { * @throws Exception If test failed. */ @SuppressWarnings("unchecked") + @Test public void testMultipleVersionsLocalDeploy() throws Exception { try { Ignite ignite = startGrid(1); @@ -160,6 +161,7 @@ public void testMultipleVersionsLocalDeploy() throws Exception { * @throws Exception If test failed. */ @SuppressWarnings("unchecked") + @Test public void testMultipleVersionsP2PDeploy() throws Exception { try { Ignite g1 = startGrid(1); @@ -317,4 +319,4 @@ public static class GridDeploymentTestJob extends ComputeJobAdapter { } } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridMultithreadedJobStealingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridMultithreadedJobStealingSelfTest.java index 605cb3d8b999b..7595fb1d2ee82 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridMultithreadedJobStealingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridMultithreadedJobStealingSelfTest.java @@ -81,6 +81,7 @@ public GridMultithreadedJobStealingSelfTest() { * * @throws Exception If test failed. */ + @Test public void testTwoJobsMultithreaded() throws Exception { final AtomicReference fail = new AtomicReference<>(null); @@ -136,6 +137,7 @@ public void testTwoJobsMultithreaded() throws Exception { * * @throws Exception If test failed. */ + @Test public void testJoinedNodeCanStealJobs() throws Exception { final AtomicReference fail = new AtomicReference<>(null); @@ -341,4 +343,4 @@ public JobStealingResult(int stolen, int nonStolen, Set nodes) { '}'; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridNodeFilterSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridNodeFilterSelfTest.java index 7a07deff3769c..0863a7687f99d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridNodeFilterSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridNodeFilterSelfTest.java @@ -51,6 +51,7 @@ public GridNodeFilterSelfTest() { /** * @throws Exception If failed. */ + @Test public void testSynchronousExecute() throws Exception { UUID nodeId = ignite.cluster().localNode().id(); @@ -66,4 +67,4 @@ public void testSynchronousExecute() throws Exception { assert rmtNodes.size() == 1; assert rmtNodes.iterator().next().id().equals(rmtNodeId); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridNodeLocalSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridNodeLocalSelfTest.java index 8d8b59f476041..1e34ab3b434a7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridNodeLocalSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridNodeLocalSelfTest.java @@ -42,6 +42,7 @@ public GridNodeLocalSelfTest() { * * @throws Exception If test failed. */ + @Test public void testNodeLocal() throws Exception { Ignite g = G.ignite(getTestIgniteInstanceName()); @@ -70,6 +71,7 @@ public void testNodeLocal() throws Exception { * * @throws Exception if test failed. */ + @Test public void testClearNodeLocalMap() throws Exception { final String key = "key"; final String value = "value"; @@ -86,4 +88,4 @@ public void testClearNodeLocalMap() throws Exception { igniteMXBean.clearNodeLocalMap(); assert nodeLocalMap.isEmpty() : "Not empty node local map"; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridNodeMetricsLogSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridNodeMetricsLogSelfTest.java index 7b76b07773d2d..4dc9a6b69235e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridNodeMetricsLogSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridNodeMetricsLogSelfTest.java @@ -76,6 +76,7 @@ public class GridNodeMetricsLogSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testNodeMetricsLog() throws Exception { IgniteCache cache1 = grid(0).createCache("TestCache1"); IgniteCache cache2 = grid(1).createCache("TestCache2"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridNodeVisorAttributesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridNodeVisorAttributesSelfTest.java index 78385a1784bbc..79ba2a9a997bd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridNodeVisorAttributesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridNodeVisorAttributesSelfTest.java @@ -82,6 +82,7 @@ private void startGridAndCheck() throws Exception { * * @throws Exception If failed. */ + @Test public void testIncludeNull() throws Exception { inclProps = null; @@ -94,6 +95,7 @@ public void testIncludeNull() throws Exception { * @throws Exception If failed. */ @SuppressWarnings("ZeroLengthArrayAllocation") + @Test public void testIncludeEmpty() throws Exception { inclProps = new String[] {}; @@ -105,9 +107,10 @@ public void testIncludeEmpty() throws Exception { * * @throws Exception If failed. */ + @Test public void testIncludeNonEmpty() throws Exception { inclProps = new String[] {"prop1", "prop2"}; startGridAndCheck(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridNonHistoryMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridNonHistoryMetricsSelfTest.java index 2fcbf49d7e73d..457d0e281bc6d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridNonHistoryMetricsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridNonHistoryMetricsSelfTest.java @@ -66,6 +66,7 @@ public class GridNonHistoryMetricsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testSingleTaskMetrics() throws Exception { final Ignite ignite = grid(); @@ -126,4 +127,4 @@ private static class TestTask extends ComputeTaskSplitAdapter { return results; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionForCachesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionForCachesSelfTest.java index 3548234902b38..bf67e5daab98b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionForCachesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionForCachesSelfTest.java @@ -126,6 +126,7 @@ private CacheConfiguration cacheConfiguration( /** * @throws Exception If failed. */ + @Test public void testProjectionForDefaultCache() throws Exception { final ClusterGroup prj = ignite.cluster().forCacheNodes(DEFAULT_CACHE_NAME); @@ -149,6 +150,7 @@ public void testProjectionForDefaultCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testProjectionForNamedCache() throws Exception { final ClusterGroup prj = ignite.cluster().forCacheNodes(CACHE_NAME); @@ -171,6 +173,7 @@ public void testProjectionForNamedCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testProjectionForDataCaches() throws Exception { ClusterGroup prj = ignite.cluster().forDataNodes(DEFAULT_CACHE_NAME); @@ -182,6 +185,7 @@ public void testProjectionForDataCaches() throws Exception { /** * @throws Exception If failed. */ + @Test public void testProjectionForClientCaches() throws Exception { ClusterGroup prj = ignite.cluster().forClientNodes(CACHE_NAME); @@ -193,6 +197,7 @@ public void testProjectionForClientCaches() throws Exception { /** * @throws Exception If failed. */ + @Test public void testProjectionForWrongCacheName() throws Exception { ClusterGroup prj = ignite.cluster().forCacheNodes("wrong"); @@ -203,6 +208,7 @@ public void testProjectionForWrongCacheName() throws Exception { /** * @throws Exception If failed. */ + @Test public void testProjections() throws Exception { ClusterNode locNode = ignite.cluster().localNode(); UUID locId = locNode.id(); @@ -320,4 +326,4 @@ private AttributeFilter(String... attrs) { return false; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionLocalJobMultipleArgumentsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionLocalJobMultipleArgumentsSelfTest.java index d9cc732985d36..f8a6335457632 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionLocalJobMultipleArgumentsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionLocalJobMultipleArgumentsSelfTest.java @@ -84,6 +84,7 @@ public GridProjectionLocalJobMultipleArgumentsSelfTest() { /** * @throws Exception If failed. */ + @Test public void testAffinityCall() throws Exception { Collection res = new ArrayList<>(); @@ -104,6 +105,7 @@ public void testAffinityCall() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAffinityRun() throws Exception { for (int i : F.asList(1, 2, 3)) { grid().compute().affinityRun(DEFAULT_CACHE_NAME, i, new IgniteRunnable() { @@ -122,6 +124,7 @@ public void testAffinityRun() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCall() throws Exception { Collection res = grid().compute().apply(new C1() { @Override public Integer apply(Integer arg) { @@ -138,6 +141,7 @@ public void testCall() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCallWithProducer() throws Exception { Collection args = Arrays.asList(1, 2, 3); @@ -152,4 +156,4 @@ public void testCallWithProducer() throws Exception { assertEquals(36, F.sumInt(res)); assertEquals(3, ids.size()); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridReduceSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridReduceSelfTest.java index 827e2a2040c2f..b6aaab3371dbd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridReduceSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridReduceSelfTest.java @@ -37,6 +37,7 @@ public class GridReduceSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testReduce() throws Exception { startGrids(GRID_CNT); @@ -79,6 +80,7 @@ public void testReduce() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReduceAsync() throws Exception { startGrids(GRID_CNT); @@ -187,4 +189,4 @@ private static class ReducerTestClosure implements IgniteCallable { } } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridReleaseTypeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridReleaseTypeSelfTest.java index b3e69a070aa07..7acb8a07501c6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridReleaseTypeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridReleaseTypeSelfTest.java @@ -74,6 +74,7 @@ public class GridReleaseTypeSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testOsEditionDoesNotSupportRollingUpdates() throws Exception { nodeVer = "1.0.0"; @@ -101,6 +102,7 @@ public void testOsEditionDoesNotSupportRollingUpdates() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOsEditionDoesNotSupportRollingUpdatesClientMode() throws Exception { nodeVer = "1.0.0"; @@ -125,4 +127,4 @@ public void testOsEditionDoesNotSupportRollingUpdatesClientMode() throws Excepti throw e; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridRuntimeExceptionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridRuntimeExceptionSelfTest.java index a1f946b5b867f..8030174762595 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridRuntimeExceptionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridRuntimeExceptionSelfTest.java @@ -77,6 +77,7 @@ public GridRuntimeExceptionSelfTest() { /** * @throws Exception If failed. */ + @Test public void testExecuteFailed() throws Exception { Ignite ignite = G.ignite(getTestIgniteInstanceName()); @@ -107,6 +108,7 @@ public void testExecuteFailed() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMapFailed() throws Exception { Ignite ignite = G.ignite(getTestIgniteInstanceName()); @@ -137,6 +139,7 @@ public void testMapFailed() throws Exception { /** * @throws Exception If failed. */ + @Test public void testResultFailed() throws Exception { Ignite ignite = G.ignite(getTestIgniteInstanceName()); @@ -167,6 +170,7 @@ public void testResultFailed() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReduceFailed() throws Exception { Ignite ignite = G.ignite(getTestIgniteInstanceName()); @@ -305,4 +309,4 @@ private static class GridTaskFailedTestJob extends ComputeJobAdapter { return true; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridSameVmStartupSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridSameVmStartupSelfTest.java index a04c38e7a7590..23277eb2bd782 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridSameVmStartupSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridSameVmStartupSelfTest.java @@ -53,6 +53,7 @@ public GridSameVmStartupSelfTest() { * * @throws Exception If failed. */ + @Test public void testSameVmStartup() throws Exception { Ignite ignite1 = startGrid(1); @@ -118,4 +119,4 @@ public void testSameVmStartup() throws Exception { assert G.allGrids().isEmpty(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridSelfTest.java index 36d26d8047331..9c226f26f9b97 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridSelfTest.java @@ -65,7 +65,8 @@ public class GridSelfTest extends ClusterGroupAbstractTest { } /** {@inheritDoc} */ - @Override public void testRemoteNodes() throws Exception { + @Override @Test + public void testRemoteNodes() throws Exception { int size = remoteNodeIds().size(); String name = "oneMoreGrid"; @@ -85,7 +86,8 @@ public class GridSelfTest extends ClusterGroupAbstractTest { } /** {@inheritDoc} */ - @Override public void testRemoteProjection() throws Exception { + @Override @Test + public void testRemoteProjection() throws Exception { ClusterGroup remotePrj = projection().forRemotes(); int size = remotePrj.nodes().size(); @@ -109,6 +111,7 @@ public class GridSelfTest extends ClusterGroupAbstractTest { /** * @throws Exception If failed. */ + @Test public void testAsyncListen() throws Exception { final String hello = "HELLO!"; @@ -154,6 +157,7 @@ public void testAsyncListen() throws Exception { /** * @throws Exception If failed. */ + @Test public void testForOthers() throws Exception { ClusterNode node0 = grid(0).localNode(); ClusterNode node1 = grid(1).localNode(); @@ -170,4 +174,4 @@ public void testForOthers() throws Exception { assertEquals(1, grid(0).cluster().forOthers(node1, node2, node3).nodes().size()); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridSpiExceptionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridSpiExceptionSelfTest.java index a588ce0dd2e99..5466498b5871a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridSpiExceptionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridSpiExceptionSelfTest.java @@ -66,6 +66,7 @@ public GridSpiExceptionSelfTest() { /** * @throws Exception If failed. */ + @Test public void testSpiFail() throws Exception { Ignite ignite = startGrid(); @@ -182,4 +183,4 @@ private static class GridTestSpiException extends IgniteSpiException { super(msg, cause); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridStartStopSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridStartStopSelfTest.java index c596f747ee974..a1e47c42d7354 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridStartStopSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridStartStopSelfTest.java @@ -57,6 +57,7 @@ public class GridStartStopSelfTest extends GridCommonAbstractTest { /** */ + @Test public void testStartStop() { IgniteConfiguration cfg = new IgniteConfiguration(); @@ -78,6 +79,7 @@ public void testStartStop() { /** * @throws Exception If failed. */ + @Test public void testStopWhileInUse() throws Exception { IgniteConfiguration cfg = new IgniteConfiguration(); @@ -145,6 +147,7 @@ public void testStopWhileInUse() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStoppedState() throws Exception { IgniteConfiguration cfg = new IgniteConfiguration(); @@ -218,4 +221,4 @@ public void testStoppedState() throws Exception { assertTrue(errs, errs == null || errs.isEmpty()); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridStopWithCancelSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridStopWithCancelSelfTest.java index 5cc9e9b6728cd..22f08896dbcfb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridStopWithCancelSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridStopWithCancelSelfTest.java @@ -60,6 +60,7 @@ public GridStopWithCancelSelfTest() { /** * @throws Exception If an error occurs. */ + @Test public void testStopGrid() throws Exception { cancelCorrect = false; @@ -125,4 +126,4 @@ public static final class CancelledTask extends ComputeTaskAdapter { return res.get(0).getData(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridTaskCancelSingleNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridTaskCancelSingleNodeSelfTest.java index 950f89db09c24..01eaa507b7400 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridTaskCancelSingleNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridTaskCancelSingleNodeSelfTest.java @@ -61,6 +61,7 @@ public class GridTaskCancelSingleNodeSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testImmediateCancellation() throws Exception { checkCancellation(0L); } @@ -68,6 +69,7 @@ public void testImmediateCancellation() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCancellation() throws Exception { checkCancellation(2000L); } @@ -203,4 +205,4 @@ private static class TestTask extends ComputeTaskSplitAdapter { return null; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridTaskContinuousMapperSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridTaskContinuousMapperSelfTest.java index a6f7f0e48ecb3..dbb313f3c80ed 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridTaskContinuousMapperSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridTaskContinuousMapperSelfTest.java @@ -47,6 +47,7 @@ public class GridTaskContinuousMapperSelfTest extends GridCommonAbstractTest { /** * @throws Exception If test failed. */ + @Test public void testContinuousMapperMethods() throws Exception { try { Ignite ignite = startGrid(0); @@ -63,6 +64,7 @@ public void testContinuousMapperMethods() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testContinuousMapperLifeCycle() throws Exception { try { Ignite ignite = startGrid(0); @@ -77,6 +79,7 @@ public void testContinuousMapperLifeCycle() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testContinuousMapperNegative() throws Exception { try { Ignite ignite = startGrid(0); @@ -338,4 +341,4 @@ public TestJob(int idx) { return argument(0); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridTaskExecutionContextSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridTaskExecutionContextSelfTest.java index c31c80508f58f..53c1a3b6a2e3c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridTaskExecutionContextSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridTaskExecutionContextSelfTest.java @@ -56,6 +56,7 @@ public class GridTaskExecutionContextSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testWithName() throws Exception { IgniteCallable f = new IgniteCallable() { @TaskSessionResource @@ -80,6 +81,7 @@ public void testWithName() throws Exception { /** * @throws Exception If failed. */ + @Test public void testWithNoFailoverClosure() throws Exception { final IgniteRunnable r = new GridAbsClosureX() { @Override public void applyx() { @@ -110,6 +112,7 @@ public void testWithNoFailoverClosure() throws Exception { /** * @throws Exception If failed. */ + @Test public void testWithNoFailoverTask() throws Exception { final Ignite g = grid(0); @@ -165,4 +168,4 @@ private TestTask(boolean fail) { return F.first(results).getData(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridTaskExecutionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridTaskExecutionSelfTest.java index e197908c15ec2..2c2d1d76dfa45 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridTaskExecutionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridTaskExecutionSelfTest.java @@ -78,6 +78,7 @@ protected boolean peerClassLoadingEnabled() { /** * @throws Exception If failed. */ + @Test public void testSynchronousExecute() throws Exception { ComputeTaskFuture fut = ignite.compute().executeAsync(GridTestTask.class, "testArg"); @@ -91,6 +92,7 @@ public void testSynchronousExecute() throws Exception { * * @throws Exception If failed. */ + @Test public void testJobIdCollision() throws Exception { fail("Test refactoring is needed: https://issues.apache.org/jira/browse/IGNITE-4706"); @@ -155,6 +157,7 @@ public void testJobIdCollision() throws Exception { * * @throws Exception If failed. */ + @Test public void testExecuteTaskWithInvalidName() throws Exception { try { ComputeTaskFuture fut = ignite.compute().execute("invalid.task.name", null); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridTaskFailoverAffinityRunTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridTaskFailoverAffinityRunTest.java index 1358936a7a100..35b48c066bea5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridTaskFailoverAffinityRunTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridTaskFailoverAffinityRunTest.java @@ -86,6 +86,7 @@ public class GridTaskFailoverAffinityRunTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testNodeRestart() throws Exception { clientMode = false; @@ -95,6 +96,7 @@ public void testNodeRestart() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNodeRestartClient() throws Exception { clientMode = true; @@ -169,4 +171,4 @@ private static class TestJob implements IgniteCallable { return null; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridTaskFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridTaskFailoverSelfTest.java index bc0af82023c51..db57c3a41db42 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridTaskFailoverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridTaskFailoverSelfTest.java @@ -49,6 +49,7 @@ public GridTaskFailoverSelfTest() { /** * @throws Exception If test failed. */ + @Test public void testFailover() throws Exception { Ignite ignite = startGrid(); @@ -119,4 +120,4 @@ public static class GridFailoverTestTask extends ComputeTaskSplitAdapter() { @Override public boolean apply(Event evt) { @@ -156,4 +157,4 @@ private static final class SleepJob extends ComputeJobAdapter { return null; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridTaskListenerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridTaskListenerSelfTest.java index 26da6aa7d796e..a25140ac2a168 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridTaskListenerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridTaskListenerSelfTest.java @@ -51,6 +51,7 @@ public GridTaskListenerSelfTest() { * @throws Exception If failed. */ @SuppressWarnings({"BusyWait"}) + @Test public void testGridTaskListener() throws Exception { final AtomicInteger cnt = new AtomicInteger(0); @@ -110,4 +111,4 @@ private static class TestTask extends ComputeTaskSplitAdapter { return 1; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectServicesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectServicesTest.java index 1e6dd64f970b2..60a01bc483ca9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectServicesTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectServicesTest.java @@ -48,6 +48,7 @@ public class IgniteClientReconnectServicesTest extends IgniteClientReconnectAbst /** * @throws Exception If failed. */ + @Test public void testReconnect() throws Exception { Ignite client = grid(serverCount()); @@ -83,6 +84,7 @@ public void testReconnect() throws Exception { /** * @throws Exception If failed. */ + @Test public void testServiceRemove() throws Exception { Ignite client = grid(serverCount()); @@ -125,6 +127,7 @@ public void testServiceRemove() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReconnectInDeploying() throws Exception { Ignite client = grid(serverCount()); @@ -172,6 +175,7 @@ public void testReconnectInDeploying() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReconnectInProgress() throws Exception { Ignite client = grid(serverCount()); @@ -262,4 +266,4 @@ public static class TestServiceImpl implements Service, TestService { return ignite.cluster().topologyVersion(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectStopTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectStopTest.java index b5c3ee86d0d4a..56431178221b7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectStopTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectStopTest.java @@ -43,6 +43,7 @@ public class IgniteClientReconnectStopTest extends IgniteClientReconnectAbstract /** * @throws Exception If failed. */ + @Test public void testStopWhenDisconnected() throws Exception { clientMode = true; @@ -112,4 +113,4 @@ public void testStopWhenDisconnected() throws Exception { log.info("Expected reconnect exception: " + e); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectStreamerTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectStreamerTest.java index 36b989093440e..252a54029bd6f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectStreamerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectStreamerTest.java @@ -66,6 +66,7 @@ public class IgniteClientReconnectStreamerTest extends IgniteClientReconnectAbst /** * @throws Exception If failed. */ + @Test public void testStreamerReconnect() throws Exception { final Ignite client = grid(serverCount()); @@ -130,6 +131,7 @@ public void testStreamerReconnect() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStreamerReconnectInProgress() throws Exception { Ignite client = grid(serverCount()); @@ -234,4 +236,4 @@ private void checkStreamerClosed(IgniteDataStreamer streamer) streamer.close(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientRejoinTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientRejoinTest.java index 8744465402ce4..1acec842af293 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientRejoinTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientRejoinTest.java @@ -115,6 +115,7 @@ public class IgniteClientRejoinTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClientsReconnectAfterStart() throws Exception { Ignite srv1 = startGrid("server1"); @@ -192,6 +193,7 @@ public void testClientsReconnectAfterStart() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientsReconnect() throws Exception { Ignite srv1 = startGrid("server1"); @@ -268,6 +270,7 @@ public void testClientsReconnect() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientsReconnectDisabled() throws Exception { clientReconnectDisabled = true; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteComputeEmptyClusterGroupTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteComputeEmptyClusterGroupTest.java index f346b8edbfce9..9f0cb9bf6be17 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteComputeEmptyClusterGroupTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteComputeEmptyClusterGroupTest.java @@ -70,6 +70,7 @@ public class IgniteComputeEmptyClusterGroupTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testAsync() throws Exception { ClusterGroup empty = ignite(0).cluster().forNodeId(UUID.randomUUID()); @@ -89,6 +90,7 @@ public void testAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSync() throws Exception { ClusterGroup empty = ignite(0).cluster().forNodeId(UUID.randomUUID()); @@ -177,4 +179,4 @@ private static class FailCallable implements IgniteCallable { return null; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteComputeJobOneThreadTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteComputeJobOneThreadTest.java index 76f669e5eadf7..16b1996d20a1e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteComputeJobOneThreadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteComputeJobOneThreadTest.java @@ -55,6 +55,7 @@ public class IgniteComputeJobOneThreadTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testNoTimeout() throws Exception { Ignite ignite = ignite(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteComputeResultExceptionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteComputeResultExceptionTest.java index fab5de6d25229..3a783cc71ac26 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteComputeResultExceptionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteComputeResultExceptionTest.java @@ -38,31 +38,37 @@ */ public class IgniteComputeResultExceptionTest extends GridCommonAbstractTest { /** */ + @Test public void testIgniteExceptionExecute() throws Exception { checkExecuteException(new IgniteException()); } /** */ + @Test public void testIgniteExceptionWithCauseExecute() throws Exception { checkExecuteException(new IgniteException(new Exception())); } /** */ + @Test public void testIgniteExceptionWithCauseChainExecute() throws Exception { checkExecuteException(new IgniteException(new Exception(new Throwable()))); } /** */ + @Test public void testCustomExceptionExecute() throws Exception { checkExecuteException(new TaskException()); } /** */ + @Test public void testCustomExceptionWithCauseExecute() throws Exception { checkExecuteException(new TaskException(new Exception())); } /** */ + @Test public void testCustomExceptionWithCauseChainExecute() throws Exception { checkExecuteException(new TaskException(new Exception(new Throwable()))); } @@ -80,32 +86,38 @@ private void checkExecuteException(IgniteException resE) throws Exception { } /** */ + @Test public void testIgniteExceptionExecuteAsync() throws Exception { checkExecuteAsyncException(new IgniteException()); } /** */ + @Test public void testIgniteExceptionWithCauseExecuteAsync() throws Exception { checkExecuteAsyncException(new IgniteException(new Exception())); } /** */ + @Test public void testIgniteExceptionWithCauseChainExecuteAsync() throws Exception { checkExecuteAsyncException(new IgniteException(new Exception(new Throwable()))); } /** */ + @Test public void testCustomExceptionExecuteAsync() throws Exception { checkExecuteAsyncException(new TaskException()); } /** */ + @Test public void testCustomExceptionWithCauseExecuteAsync() throws Exception { checkExecuteAsyncException(new TaskException(new Exception())); } /** */ + @Test public void testCustomExceptionWithCauseChainExecuteAsync() throws Exception { checkExecuteAsyncException(new TaskException(new Exception(new Throwable()))); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteComputeTopologyExceptionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteComputeTopologyExceptionTest.java index a82373b618507..f6eb74f79ac68 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteComputeTopologyExceptionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteComputeTopologyExceptionTest.java @@ -46,6 +46,7 @@ public class IgniteComputeTopologyExceptionTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCorrectException() throws Exception { Ignite ignite = ignite(0); @@ -72,6 +73,7 @@ public void testCorrectException() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCorrectCheckedException() throws Exception { IgniteKernal ignite0 = (IgniteKernal)ignite(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteConcurrentEntryProcessorAccessStopTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteConcurrentEntryProcessorAccessStopTest.java index af65ffba2f51a..b210ea00ed7da 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteConcurrentEntryProcessorAccessStopTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteConcurrentEntryProcessorAccessStopTest.java @@ -38,6 +38,7 @@ public class IgniteConcurrentEntryProcessorAccessStopTest extends GridCommonAbst * * @throws Exception If failed. */ + @Test public void testConcurrentAccess() throws Exception { CacheConfiguration ccfg = new CacheConfiguration<>(DEFAULT_CACHE_NAME); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteConnectionConcurrentReserveAndRemoveTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteConnectionConcurrentReserveAndRemoveTest.java index fb194491b7c6b..c8a50c0635fdd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteConnectionConcurrentReserveAndRemoveTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteConnectionConcurrentReserveAndRemoveTest.java @@ -79,6 +79,7 @@ private static final class TestClosure implements IgniteCallable { } + @Test public void test() throws Exception { IgniteEx svr = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteDiscoveryMassiveNodeFailTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteDiscoveryMassiveNodeFailTest.java index 32ce9783c0332..c5a3651f1bff1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteDiscoveryMassiveNodeFailTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteDiscoveryMassiveNodeFailTest.java @@ -118,6 +118,7 @@ public class IgniteDiscoveryMassiveNodeFailTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testMassiveFailDisabledRecovery() throws Exception { timeout = 0; // Disable previous node check. @@ -176,6 +177,7 @@ private long waitTime() { * * @throws Exception If failed. */ + @Test public void testMassiveFailSelfKill() throws Exception { startGrids(5); @@ -211,6 +213,7 @@ public void testMassiveFailSelfKill() throws Exception { * * @throws Exception If failed. */ + @Test public void testMassiveFailAndRecovery() throws Exception { startGrids(5); @@ -254,6 +257,7 @@ public void testMassiveFailAndRecovery() throws Exception { * * @throws Exception If failed. */ + @Test public void testMassiveFail() throws Exception { failNodes = true; @@ -270,6 +274,7 @@ public void testMassiveFail() throws Exception { * * @throws Exception If failed. */ + @Test public void testMassiveFailForceNodeFail() throws Exception { failNodes = true; @@ -285,6 +290,7 @@ public void testMassiveFailForceNodeFail() throws Exception { * * @throws Exception If failed. */ + @Test public void testRecoveryOnDisconnect() throws Exception { startGrids(3); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteExecutorServiceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteExecutorServiceTest.java index d0289227e8de8..3593a08fe9d55 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteExecutorServiceTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteExecutorServiceTest.java @@ -46,6 +46,7 @@ public IgniteExecutorServiceTest() { /** * @throws Exception Thrown in case of test failure. */ + @Test public void testExecute() throws Exception { Ignite ignite = G.ignite(getTestIgniteInstanceName()); @@ -70,6 +71,7 @@ public void testExecute() throws Exception { /** * @throws Exception Thrown in case of test failure. */ + @Test public void testSubmit() throws Exception { Ignite ignite = G.ignite(getTestIgniteInstanceName()); @@ -107,6 +109,7 @@ public void testSubmit() throws Exception { /** * @throws Exception Thrown in case of test failure. */ + @Test public void testSubmitWithFutureTimeout() throws Exception { Ignite ignite = G.ignite(getTestIgniteInstanceName()); @@ -134,6 +137,7 @@ public void testSubmitWithFutureTimeout() throws Exception { * @throws Exception Thrown in case of test failure. */ @SuppressWarnings("TooBroadScope") + @Test public void testInvokeAll() throws Exception { Ignite ignite = G.ignite(getTestIgniteInstanceName()); @@ -164,6 +168,7 @@ public void testInvokeAll() throws Exception { /** * @throws Exception Thrown in case of test failure. */ + @Test public void testInvokeAllWithTimeout() throws Exception { Ignite ignite = G.ignite(getTestIgniteInstanceName()); @@ -210,6 +215,7 @@ public void testInvokeAllWithTimeout() throws Exception { * @throws Exception Thrown in case of test failure. */ @SuppressWarnings("TooBroadScope") + @Test public void testInvokeAny() throws Exception { Ignite ignite = G.ignite(getTestIgniteInstanceName()); @@ -235,6 +241,7 @@ public void testInvokeAny() throws Exception { /** * @throws Exception Thrown in case of test failure. */ + @Test public void testInvokeAnyWithTimeout() throws Exception { Ignite ignite = G.ignite(getTestIgniteInstanceName()); @@ -315,4 +322,4 @@ private static class TestRunnable implements Runnable, Serializable { assert ignite != null; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteExplicitImplicitDeploymentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteExplicitImplicitDeploymentSelfTest.java index 46a7035c14218..bc702be889994 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteExplicitImplicitDeploymentSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteExplicitImplicitDeploymentSelfTest.java @@ -73,6 +73,7 @@ public IgniteExplicitImplicitDeploymentSelfTest() { /** * @throws Exception If test failed. */ + @Test public void testImplicitDeployLocally() throws Exception { execImplicitDeployLocally(true, true, true); } @@ -80,6 +81,7 @@ public void testImplicitDeployLocally() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testImplicitDeployP2P() throws Exception { execImplicitDeployP2P(true, true, true); } @@ -87,6 +89,7 @@ public void testImplicitDeployP2P() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testExplicitDeployLocally() throws Exception { execExplicitDeployLocally(true, true, true); } @@ -94,6 +97,7 @@ public void testExplicitDeployLocally() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testExplicitDeployP2P() throws Exception { execExplicitDeployP2P(true, true, true); } @@ -489,4 +493,4 @@ public static final class GridDeploymentResourceTestJob extends ComputeJobAdapte } } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteInternalCacheRemoveTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteInternalCacheRemoveTest.java index ce45dc2e5c644..19ac5dd73caaf 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteInternalCacheRemoveTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteInternalCacheRemoveTest.java @@ -32,10 +32,11 @@ public class IgniteInternalCacheRemoveTest extends GridCacheAbstractSelfTest { /** * @throws IgniteCheckedException If failed. */ + @Test public void testRemove() throws IgniteCheckedException { jcache().put("key", 1); assert jcache().remove("key", 1); assert !jcache().remove("key", 1); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteLocalNodeMapBeforeStartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteLocalNodeMapBeforeStartTest.java index 7eae2ce2e6f37..040417040bea1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteLocalNodeMapBeforeStartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteLocalNodeMapBeforeStartTest.java @@ -39,6 +39,7 @@ public class IgniteLocalNodeMapBeforeStartTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testNodeLocalMapFromLifecycleBean() throws Exception { IgniteConfiguration cfg = getConfiguration(getTestIgniteInstanceName(0)); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteReflectionFactorySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteReflectionFactorySelfTest.java index 899728c66a56d..e317722725276 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteReflectionFactorySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteReflectionFactorySelfTest.java @@ -30,6 +30,7 @@ public class IgniteReflectionFactorySelfTest extends TestCase { /** * @throws Exception If failed. */ + @Test public void testByteMethod() throws Exception { byte expByteVal = 42; short expShortVal = 42; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteRoundRobinErrorAfterClientReconnectTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteRoundRobinErrorAfterClientReconnectTest.java index 00a33a61ab656..c82fb0d44b502 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteRoundRobinErrorAfterClientReconnectTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteRoundRobinErrorAfterClientReconnectTest.java @@ -65,6 +65,7 @@ public class IgniteRoundRobinErrorAfterClientReconnectTest extends GridCommonAbs /** * @throws Exception If failed. */ + @Test public void testClientReconnect() throws Exception { final Ignite cli = grid(CLI_IDX); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteSlowClientDetectionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteSlowClientDetectionSelfTest.java index d7387845c6e5d..3e7ed6520a2d0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteSlowClientDetectionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteSlowClientDetectionSelfTest.java @@ -99,6 +99,7 @@ private int nodeCount() { /** * @throws Exception If failed. */ + @Test public void testSlowClient() throws Exception { final IgniteEx slowClient = grid(nodeCount() - 1); @@ -189,4 +190,4 @@ private static class Listener implements CacheEntryUpdatedListener>>> Received update: " + iterable); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteUpdateNotifierPerClusterSettingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteUpdateNotifierPerClusterSettingSelfTest.java index a348ea555b4fe..f47c4a63e04f8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteUpdateNotifierPerClusterSettingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteUpdateNotifierPerClusterSettingSelfTest.java @@ -65,6 +65,7 @@ public class IgniteUpdateNotifierPerClusterSettingSelfTest extends GridCommonAbs /** * @throws Exception If failed. */ + @Test public void testNotifierEnabledForCluster() throws Exception { checkNotifierStatusForCluster(true); } @@ -72,6 +73,7 @@ public void testNotifierEnabledForCluster() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNotifierDisabledForCluster() throws Exception { checkNotifierStatusForCluster(false); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/LongJVMPauseDetectorTest.java b/modules/core/src/test/java/org/apache/ignite/internal/LongJVMPauseDetectorTest.java index 267f389bdc1e9..3a200b1ce1ffb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/LongJVMPauseDetectorTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/LongJVMPauseDetectorTest.java @@ -46,6 +46,7 @@ public class LongJVMPauseDetectorTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testJulMessage() throws Exception { this.strLog = new GridStringLogger(true); @@ -59,6 +60,7 @@ public void testJulMessage() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStopWorkerThread() throws Exception { strLog = new GridStringLogger(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/MarshallerContextLockingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/MarshallerContextLockingSelfTest.java index f31a56da46975..7ac948b2ea62e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/MarshallerContextLockingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/MarshallerContextLockingSelfTest.java @@ -73,6 +73,7 @@ public class MarshallerContextLockingSelfTest extends GridCommonAbstractTest { /** * Multithreaded test, used custom class loader */ + @Test public void testMultithreadedUpdate() throws Exception { multithreaded(new Callable() { @Override public Object call() throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/MemoryLeaksOnRestartNodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/MemoryLeaksOnRestartNodeTest.java index bf0c91104fb53..b8420d063cdac 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/MemoryLeaksOnRestartNodeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/MemoryLeaksOnRestartNodeTest.java @@ -70,6 +70,7 @@ public class MemoryLeaksOnRestartNodeTest extends GridCommonAbstractTest { /** * @throws Exception On failed. */ + @Test public void test() throws Exception { // Warmup for (int i = 0; i < RESTARTS / 2; ++i) { @@ -108,4 +109,4 @@ public void test() throws Exception { // Remove dump if successful. dumpFile.delete(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/TaskNodeRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/TaskNodeRestartTest.java index 7cab4e6dc8423..765db8a938443 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/TaskNodeRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/TaskNodeRestartTest.java @@ -75,6 +75,7 @@ public class TaskNodeRestartTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testTaskNodeRestart() throws Exception { final AtomicBoolean finished = new AtomicBoolean(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/TransactionMetricsMxBeanImplTest.java b/modules/core/src/test/java/org/apache/ignite/internal/TransactionMetricsMxBeanImplTest.java index 91bd9bcf98271..c4d41fdee4857 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/TransactionMetricsMxBeanImplTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/TransactionMetricsMxBeanImplTest.java @@ -84,6 +84,7 @@ public class TransactionMetricsMxBeanImplTest extends GridCommonAbstractTest { /** * */ + @Test public void testTxMetric() throws Exception { //given: int keysNumber = 10; @@ -171,6 +172,7 @@ public void testTxMetric() throws Exception { /** * */ + @Test public void testNearTxInfo() throws Exception { IgniteEx primaryNode1 = startGrid(0); IgniteEx primaryNode2 = startGrid(1); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/TransactionsMXBeanImplTest.java b/modules/core/src/test/java/org/apache/ignite/internal/TransactionsMXBeanImplTest.java index d358c72e79917..cda697010366c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/TransactionsMXBeanImplTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/TransactionsMXBeanImplTest.java @@ -73,6 +73,7 @@ public class TransactionsMXBeanImplTest extends GridCommonAbstractTest { /** * */ + @Test public void testBasic() throws Exception { IgniteEx ignite = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/VisorManagementEventSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/VisorManagementEventSelfTest.java index 1e8e0ca89c324..643c6b393e91f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/VisorManagementEventSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/VisorManagementEventSelfTest.java @@ -86,6 +86,7 @@ public class VisorManagementEventSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testManagementOneNodeVisorTask() throws Exception { IgniteEx ignite = startGrid(0); @@ -98,6 +99,7 @@ public void testManagementOneNodeVisorTask() throws Exception { * * @throws Exception If failed. */ + @Test public void testManagementMultiNodeVisorTask() throws Exception { IgniteEx ignite = startGrid(0); @@ -110,6 +112,7 @@ public void testManagementMultiNodeVisorTask() throws Exception { * * @throws Exception If failed. */ + @Test public void testNotManagementOneNodeVisorTask() throws Exception { IgniteEx ignite = startGrid(0); @@ -122,6 +125,7 @@ public void testNotManagementOneNodeVisorTask() throws Exception { * * @throws Exception If failed. */ + @Test public void testNotManagementMultiNodeVisorTask() throws Exception { IgniteEx ignite = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryArrayIdentityResolverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryArrayIdentityResolverSelfTest.java index 7548cf0442e75..859625d825ea4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryArrayIdentityResolverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryArrayIdentityResolverSelfTest.java @@ -88,6 +88,7 @@ public class BinaryArrayIdentityResolverSelfTest extends GridCommonAbstractTest /** * Test hash code generation for simple object. */ + @Test public void testHashCode() { InnerClass obj = new InnerClass(1, "2", 3); @@ -99,6 +100,7 @@ public void testHashCode() { /** * Test hash code generation for simple object. */ + @Test public void testHashCodeBinarylizable() { InnerClassBinarylizable obj = new InnerClassBinarylizable(1, "2", 3); @@ -110,6 +112,7 @@ public void testHashCodeBinarylizable() { /** * Test equals for simple object. */ + @Test public void testEquals() { InnerClass obj = new InnerClass(1, "2", 3); @@ -128,6 +131,7 @@ public void testEquals() { /** * Test equals for simple object. */ + @Test public void testEqualsBinarilyzable() { InnerClassBinarylizable obj = new InnerClassBinarylizable(1, "2", 3); @@ -148,6 +152,7 @@ public void testEqualsBinarilyzable() { /** * Test equals for different type IDs. */ + @Test public void testEqualsDifferenTypes() { InnerClass obj1 = new InnerClass(1, "2", 3); InnerClassBinarylizable obj2 = new InnerClassBinarylizable(1, "2", 3); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryBasicIdMapperSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryBasicIdMapperSelfTest.java index 1d6da2cadd1fb..95cf84b5c8609 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryBasicIdMapperSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryBasicIdMapperSelfTest.java @@ -28,6 +28,7 @@ public class BinaryBasicIdMapperSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testLowerCase() throws Exception { BinaryBasicIdMapper mapper = new BinaryBasicIdMapper(true); @@ -40,6 +41,7 @@ public void testLowerCase() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDefaultCase() throws Exception { BinaryBasicIdMapper mapper = new BinaryBasicIdMapper(false); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryBasicNameMapperSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryBasicNameMapperSelfTest.java index 70fb8e7d76535..1e7b27140d1e3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryBasicNameMapperSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryBasicNameMapperSelfTest.java @@ -28,6 +28,7 @@ public class BinaryBasicNameMapperSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testSimpleName() throws Exception { BinaryBasicNameMapper mapper = new BinaryBasicNameMapper(true); @@ -39,6 +40,7 @@ public void testSimpleName() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFullName() throws Exception { BinaryBasicNameMapper mapper = new BinaryBasicNameMapper(false); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryConfigurationConsistencySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryConfigurationConsistencySelfTest.java index 3dfa17925549e..69625b688734e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryConfigurationConsistencySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryConfigurationConsistencySelfTest.java @@ -66,6 +66,7 @@ public class BinaryConfigurationConsistencySelfTest extends GridCommonAbstractTe /** * @throws Exception If failed. */ + @Test public void testSkipCheckConsistencyFlagEnabled() throws Exception { String backup = System.setProperty(IGNITE_SKIP_CONFIGURATION_CONSISTENCY_CHECK, "true"); @@ -95,6 +96,7 @@ public void testSkipCheckConsistencyFlagEnabled() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPositiveNullConfig() throws Exception { binaryCfg = null; @@ -108,6 +110,7 @@ public void testPositiveNullConfig() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPositiveEmptyConfig() throws Exception { binaryCfg = new BinaryConfiguration(); @@ -121,6 +124,7 @@ public void testPositiveEmptyConfig() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPositiveCustomConfig() throws Exception { binaryCfg = customConfig(false); @@ -134,6 +138,7 @@ public void testPositiveCustomConfig() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNegativeNullEmptyConfigs() throws Exception { checkNegative(null, new BinaryConfiguration()); } @@ -141,6 +146,7 @@ public void testNegativeNullEmptyConfigs() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNegativeEmptyNullConfigs() throws Exception { checkNegative(new BinaryConfiguration(), null); } @@ -148,6 +154,7 @@ public void testNegativeEmptyNullConfigs() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNegativeEmptyCustomConfigs() throws Exception { checkNegative(new BinaryConfiguration(), customConfig(false)); } @@ -156,6 +163,7 @@ public void testNegativeEmptyCustomConfigs() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNegativeCustomNullConfigs() throws Exception { checkNegative(customConfig(false), null); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryConfigurationCustomSerializerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryConfigurationCustomSerializerSelfTest.java index cedbbaf5f4bc1..856994da6ff48 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryConfigurationCustomSerializerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryConfigurationCustomSerializerSelfTest.java @@ -88,6 +88,7 @@ public class BinaryConfigurationCustomSerializerSelfTest extends GridCommonAbstr * * @throws Exception If failed. */ + @Test public void testThinClientConnected() throws Exception { UUID nid = ignite(0).cluster().localNode().id(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryEnumsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryEnumsSelfTest.java index 89ee35fe60656..8655b9ae0f7af 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryEnumsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryEnumsSelfTest.java @@ -144,6 +144,7 @@ private void startUp(boolean register) throws Exception { * * @throws Exception If failed. */ + @Test public void testSimpleRegistered() throws Exception { checkSimple(true); } @@ -153,6 +154,7 @@ public void testSimpleRegistered() throws Exception { * * @throws Exception If failed. */ + @Test public void testSimpleNotRegistered() throws Exception { checkSimple(false); } @@ -162,6 +164,7 @@ public void testSimpleNotRegistered() throws Exception { * * @throws Exception If failed. */ + @Test public void testNestedRegistered() throws Exception { checkNested(true); } @@ -171,6 +174,7 @@ public void testNestedRegistered() throws Exception { * * @throws Exception If failed. */ + @Test public void testNestedNotRegistered() throws Exception { checkNested(false); } @@ -180,6 +184,7 @@ public void testNestedNotRegistered() throws Exception { * * @throws Exception If failed. */ + @Test public void testSimpleBuilderRegistered() throws Exception { checkSimpleBuilder(true); } @@ -189,6 +194,7 @@ public void testSimpleBuilderRegistered() throws Exception { * * @throws Exception If failed. */ + @Test public void testSimpleBuilderNotRegistered() throws Exception { checkSimpleBuilder(false); } @@ -198,6 +204,7 @@ public void testSimpleBuilderNotRegistered() throws Exception { * * @throws Exception If failed. */ + @Test public void testNestedBuilderRegistered() throws Exception { checkNestedBuilder(true); } @@ -207,6 +214,7 @@ public void testNestedBuilderRegistered() throws Exception { * * @throws Exception If failed. */ + @Test public void testNestedBuilderNotRegistered() throws Exception { checkNestedBuilder(false); } @@ -214,6 +222,7 @@ public void testNestedBuilderNotRegistered() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInstanceFromBytes() throws Exception { startUp(true); @@ -353,6 +362,7 @@ public void checkSimpleBuilder(boolean registered) throws Exception { * * @throws Exception If failed. */ + @Test public void testSimpleArrayRegistered() throws Exception { checkSimpleArray(true); } @@ -362,6 +372,7 @@ public void testSimpleArrayRegistered() throws Exception { * * @throws Exception If failed. */ + @Test public void testSimpleArrayNotRegistered() throws Exception { checkSimpleArray(false); } @@ -371,6 +382,7 @@ public void testSimpleArrayNotRegistered() throws Exception { * * @throws Exception If failed. */ + @Test public void testSimpleBuilderArrayRegistered() throws Exception { checkSimpleBuilderArray(true); } @@ -380,6 +392,7 @@ public void testSimpleBuilderArrayRegistered() throws Exception { * * @throws Exception If failed. */ + @Test public void testSimpleBuilderArrayNotRegistered() throws Exception { checkSimpleBuilderArray(false); } @@ -420,6 +433,7 @@ public void checkSimpleBuilderArray(boolean registered) throws Exception { * * @throws Exception If failed. */ + @Test public void testZeroTypeId() throws Exception { startUp(true); @@ -437,6 +451,7 @@ public void testZeroTypeId() throws Exception { * * @throws Exception */ + @Test public void testBinaryTypeEnumValues() throws Exception { startUp(false); @@ -455,6 +470,7 @@ public void testBinaryTypeEnumValues() throws Exception { * * @throws Exception */ + @Test public void testEnumWrongBinaryConfig() throws Exception { this.register = true; @@ -472,6 +488,7 @@ public void testEnumWrongBinaryConfig() throws Exception { * * @throws Exception */ + @Test public void testEnumValidation() throws Exception { startUp(false); @@ -493,6 +510,7 @@ public void testEnumValidation() throws Exception { * * @throws Exception */ + @Test public void testEnumMerge() throws Exception { startUp(false); @@ -543,6 +561,7 @@ public void testEnumMerge() throws Exception { * * @throws Exception If failed. */ + @Test public void testDeclaredBodyEnumRegistered() throws Exception { checkDeclaredBodyEnum(true); } @@ -552,6 +571,7 @@ public void testDeclaredBodyEnumRegistered() throws Exception { * * @throws Exception If failed. */ + @Test public void testDeclaredBodyEnumNotRegistered() throws Exception { checkDeclaredBodyEnum(false); } @@ -644,7 +664,7 @@ private void validate(BinaryObject obj, EnumType val) { if (register) assertEquals(val.name(), obj.enumName()); } - + /** * Validate single value. * diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryFieldExtractionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryFieldExtractionSelfTest.java index 38decf793e884..c406a20ada168 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryFieldExtractionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryFieldExtractionSelfTest.java @@ -60,6 +60,7 @@ protected BinaryMarshaller createMarshaller() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPrimitiveMarshalling() throws Exception { BinaryMarshaller marsh = createMarshaller(); @@ -101,6 +102,7 @@ public void testPrimitiveMarshalling() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTimeMarshalling() throws Exception { BinaryMarshaller marsh = createMarshaller(); @@ -122,6 +124,7 @@ public void testTimeMarshalling() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDecimalFieldMarshalling() throws Exception { BinaryMarshaller marsh = createMarshaller(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryFieldsAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryFieldsAbstractSelfTest.java index f139c4c52a83a..eeba763556ab6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryFieldsAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryFieldsAbstractSelfTest.java @@ -105,6 +105,7 @@ protected static BinaryContext binaryContext(BinaryMarshaller marsh) { * * @throws Exception If failed. */ + @Test public void testByte() throws Exception { check("fByte"); } @@ -114,6 +115,7 @@ public void testByte() throws Exception { * * @throws Exception If failed. */ + @Test public void testByteArray() throws Exception { check("fByteArr"); } @@ -123,6 +125,7 @@ public void testByteArray() throws Exception { * * @throws Exception If failed. */ + @Test public void testBoolean() throws Exception { check("fBool"); } @@ -132,6 +135,7 @@ public void testBoolean() throws Exception { * * @throws Exception If failed. */ + @Test public void testBooleanArray() throws Exception { check("fBoolArr"); } @@ -141,6 +145,7 @@ public void testBooleanArray() throws Exception { * * @throws Exception If failed. */ + @Test public void testShort() throws Exception { check("fShort"); } @@ -150,6 +155,7 @@ public void testShort() throws Exception { * * @throws Exception If failed. */ + @Test public void testShortArray() throws Exception { check("fShortArr"); } @@ -159,6 +165,7 @@ public void testShortArray() throws Exception { * * @throws Exception If failed. */ + @Test public void testChar() throws Exception { check("fChar"); } @@ -168,6 +175,7 @@ public void testChar() throws Exception { * * @throws Exception If failed. */ + @Test public void testCharArray() throws Exception { check("fCharArr"); } @@ -177,6 +185,7 @@ public void testCharArray() throws Exception { * * @throws Exception If failed. */ + @Test public void testInt() throws Exception { check("fInt"); } @@ -186,6 +195,7 @@ public void testInt() throws Exception { * * @throws Exception If failed. */ + @Test public void testIntArray() throws Exception { check("fIntArr"); } @@ -195,6 +205,7 @@ public void testIntArray() throws Exception { * * @throws Exception If failed. */ + @Test public void testLong() throws Exception { check("fLong"); } @@ -204,6 +215,7 @@ public void testLong() throws Exception { * * @throws Exception If failed. */ + @Test public void testLongArray() throws Exception { check("fLongArr"); } @@ -213,6 +225,7 @@ public void testLongArray() throws Exception { * * @throws Exception If failed. */ + @Test public void testFloat() throws Exception { check("fFloat"); } @@ -222,6 +235,7 @@ public void testFloat() throws Exception { * * @throws Exception If failed. */ + @Test public void testFloatArray() throws Exception { check("fFloatArr"); } @@ -231,6 +245,7 @@ public void testFloatArray() throws Exception { * * @throws Exception If failed. */ + @Test public void testDouble() throws Exception { check("fDouble"); } @@ -240,6 +255,7 @@ public void testDouble() throws Exception { * * @throws Exception If failed. */ + @Test public void testDoubleArray() throws Exception { check("fDoubleArr"); } @@ -249,6 +265,7 @@ public void testDoubleArray() throws Exception { * * @throws Exception If failed. */ + @Test public void testString() throws Exception { check("fString"); } @@ -258,6 +275,7 @@ public void testString() throws Exception { * * @throws Exception If failed. */ + @Test public void testStringArray() throws Exception { check("fStringArr"); } @@ -267,6 +285,7 @@ public void testStringArray() throws Exception { * * @throws Exception If failed. */ + @Test public void testDate() throws Exception { check("fDate"); } @@ -276,6 +295,7 @@ public void testDate() throws Exception { * * @throws Exception If failed. */ + @Test public void testDateArray() throws Exception { check("fDateArr"); } @@ -285,6 +305,7 @@ public void testDateArray() throws Exception { * * @throws Exception If failed. */ + @Test public void testTimestamp() throws Exception { check("fTimestamp"); } @@ -294,6 +315,7 @@ public void testTimestamp() throws Exception { * * @throws Exception If failed. */ + @Test public void testTimestampArray() throws Exception { check("fTimestampArr"); } @@ -303,6 +325,7 @@ public void testTimestampArray() throws Exception { * * @throws Exception If failed. */ + @Test public void testUuid() throws Exception { check("fUuid"); } @@ -312,6 +335,7 @@ public void testUuid() throws Exception { * * @throws Exception If failed. */ + @Test public void testUuidArray() throws Exception { check("fUuidArr"); } @@ -321,6 +345,7 @@ public void testUuidArray() throws Exception { * * @throws Exception If failed. */ + @Test public void testDecimal() throws Exception { check("fDecimal"); } @@ -330,6 +355,7 @@ public void testDecimal() throws Exception { * * @throws Exception If failed. */ + @Test public void testDecimalArray() throws Exception { check("fDecimalArr"); } @@ -339,6 +365,7 @@ public void testDecimalArray() throws Exception { * * @throws Exception If failed. */ + @Test public void testObject() throws Exception { check("fObj"); } @@ -348,6 +375,7 @@ public void testObject() throws Exception { * * @throws Exception If failed. */ + @Test public void testObjectArray() throws Exception { check("fObjArr"); } @@ -357,6 +385,7 @@ public void testObjectArray() throws Exception { * * @throws Exception If failed. */ + @Test public void testNull() throws Exception { check("fNull"); } @@ -366,6 +395,7 @@ public void testNull() throws Exception { * * @throws Exception If failed. */ + @Test public void testMissing() throws Exception { String fieldName = "fMissing"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryFooterOffsetsAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryFooterOffsetsAbstractSelfTest.java index 265d283d3d378..20d10c19a3546 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryFooterOffsetsAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryFooterOffsetsAbstractSelfTest.java @@ -78,6 +78,7 @@ protected boolean compactFooter() { * * @throws Exception If failed. */ + @Test public void test1Byte() throws Exception { check(POW_8 >> 2); } @@ -87,6 +88,7 @@ public void test1Byte() throws Exception { * * @throws Exception If failed. */ + @Test public void test1ByteSign() throws Exception { check(POW_8 >> 1); } @@ -96,6 +98,7 @@ public void test1ByteSign() throws Exception { * * @throws Exception If failed. */ + @Test public void test2Bytes() throws Exception { check(POW_16 >> 2); } @@ -105,6 +108,7 @@ public void test2Bytes() throws Exception { * * @throws Exception If failed. */ + @Test public void test2BytesSign() throws Exception { check(POW_16 >> 1); } @@ -114,6 +118,7 @@ public void test2BytesSign() throws Exception { * * @throws Exception If failed. */ + @Test public void test4Bytes() throws Exception { check(POW_16 << 2); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryMarshallerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryMarshallerSelfTest.java index 8635f69e7e530..1128d17e5d35c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryMarshallerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryMarshallerSelfTest.java @@ -110,6 +110,7 @@ public class BinaryMarshallerSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testNull() throws Exception { assertNull(marshalUnmarshal(null)); } @@ -117,6 +118,7 @@ public void testNull() throws Exception { /** * @throws Exception If failed. */ + @Test public void testByte() throws Exception { assertEquals((byte)100, marshalUnmarshal((byte)100).byteValue()); } @@ -124,6 +126,7 @@ public void testByte() throws Exception { /** * @throws Exception If failed. */ + @Test public void testShort() throws Exception { assertEquals((short)100, marshalUnmarshal((short)100).shortValue()); } @@ -131,6 +134,7 @@ public void testShort() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInt() throws Exception { assertEquals(100, marshalUnmarshal(100).intValue()); } @@ -138,6 +142,7 @@ public void testInt() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLong() throws Exception { assertEquals(100L, marshalUnmarshal(100L).longValue()); } @@ -145,6 +150,7 @@ public void testLong() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFloat() throws Exception { assertEquals(100.001f, marshalUnmarshal(100.001f), 0); } @@ -152,6 +158,7 @@ public void testFloat() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDouble() throws Exception { assertEquals(100.001d, marshalUnmarshal(100.001d), 0); } @@ -159,6 +166,7 @@ public void testDouble() throws Exception { /** * @throws Exception If failed. */ + @Test public void testChar() throws Exception { assertEquals((char)100, marshalUnmarshal((char)100).charValue()); } @@ -166,6 +174,7 @@ public void testChar() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBoolean() throws Exception { assertEquals(true, marshalUnmarshal(true).booleanValue()); } @@ -173,6 +182,7 @@ public void testBoolean() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDecimal() throws Exception { BigDecimal val; @@ -189,6 +199,7 @@ public void testDecimal() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNegativeScaleDecimal() throws Exception { BigDecimal val; @@ -201,6 +212,7 @@ public void testNegativeScaleDecimal() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNegativeScaleRoundingModeDecimal() throws Exception { BigDecimal val; @@ -217,6 +229,7 @@ public void testNegativeScaleRoundingModeDecimal() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStringVer1() throws Exception { doTestString(false); } @@ -224,6 +237,7 @@ public void testStringVer1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStringVer2() throws Exception { doTestString(true); } @@ -285,6 +299,7 @@ private void doTestString(boolean ver2) throws Exception { /** * @throws Exception If failed. */ + @Test public void testUuid() throws Exception { UUID uuid = UUID.randomUUID(); @@ -294,6 +309,7 @@ public void testUuid() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIgniteUuid() throws Exception { IgniteUuid uuid = IgniteUuid.randomUuid(); @@ -303,6 +319,7 @@ public void testIgniteUuid() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDate() throws Exception { Date date = new Date(); @@ -315,6 +332,7 @@ public void testDate() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTimestamp() throws Exception { Timestamp ts = new Timestamp(System.currentTimeMillis()); @@ -326,6 +344,7 @@ public void testTimestamp() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTime() throws Exception { Time time = new Time(System.currentTimeMillis()); assertEquals(time, marshalUnmarshal(time)); @@ -334,6 +353,7 @@ public void testTime() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTimeArray() throws Exception { Time[] times = new Time[]{new Time(System.currentTimeMillis()), new Time(123456789)}; assertArrayEquals(times, marshalUnmarshal(times)); @@ -342,6 +362,7 @@ public void testTimeArray() throws Exception { /** * @throws Exception If failed. */ + @Test public void testByteArray() throws Exception { byte[] arr = new byte[] {10, 20, 30}; @@ -351,6 +372,7 @@ public void testByteArray() throws Exception { /** * @throws Exception If failed. */ + @Test public void testShortArray() throws Exception { short[] arr = new short[] {10, 20, 30}; @@ -360,6 +382,7 @@ public void testShortArray() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIntArray() throws Exception { int[] arr = new int[] {10, 20, 30}; @@ -369,6 +392,7 @@ public void testIntArray() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLongArray() throws Exception { long[] arr = new long[] {10, 20, 30}; @@ -378,6 +402,7 @@ public void testLongArray() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFloatArray() throws Exception { float[] arr = new float[] {10.1f, 20.1f, 30.1f}; @@ -387,6 +412,7 @@ public void testFloatArray() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDoubleArray() throws Exception { double[] arr = new double[] {10.1d, 20.1d, 30.1d}; @@ -396,6 +422,7 @@ public void testDoubleArray() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCharArray() throws Exception { char[] arr = new char[] {10, 20, 30}; @@ -405,6 +432,7 @@ public void testCharArray() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBooleanArray() throws Exception { boolean[] arr = new boolean[] {true, false, true}; @@ -414,6 +442,7 @@ public void testBooleanArray() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDecimalArray() throws Exception { BigDecimal[] arr = new BigDecimal[] {BigDecimal.ZERO, BigDecimal.ONE, BigDecimal.TEN}; @@ -423,6 +452,7 @@ public void testDecimalArray() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStringArray() throws Exception { String[] arr = new String[] {"str1", "str2", "str3"}; @@ -432,6 +462,7 @@ public void testStringArray() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUuidArray() throws Exception { UUID[] arr = new UUID[] {UUID.randomUUID(), UUID.randomUUID(), UUID.randomUUID()}; @@ -441,6 +472,7 @@ public void testUuidArray() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDateArray() throws Exception { Date[] arr = new Date[] {new Date(11111), new Date(22222), new Date(33333)}; @@ -450,6 +482,7 @@ public void testDateArray() throws Exception { /** * @throws Exception If failed. */ + @Test public void testObjectArray() throws Exception { Object[] arr = new Object[] {1, 2, 3}; @@ -459,6 +492,7 @@ public void testObjectArray() throws Exception { /** * @throws Exception If failed. */ + @Test public void testException() throws Exception { Exception ex = new RuntimeException(); @@ -470,6 +504,7 @@ public void testException() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCollection() throws Exception { testCollection(new ArrayList(3)); testCollection(new LinkedHashSet()); @@ -492,6 +527,7 @@ private void testCollection(Collection col) throws Exception { /** * @throws Exception If failed. */ + @Test public void testMap() throws Exception { testMap(new HashMap()); testMap(new LinkedHashMap()); @@ -517,6 +553,7 @@ private void testMap(Map map) throws Exception { * @throws Exception If failed. */ @SuppressWarnings("unchecked") + @Test public void testCustomCollections() throws Exception { CustomCollections cc = new CustomCollections(); @@ -540,6 +577,7 @@ public void testCustomCollections() throws Exception { * @throws Exception If failed. */ @SuppressWarnings("unchecked") + @Test public void testCustomCollections2() throws Exception { CustomArrayList arrList = new CustomArrayList(); @@ -562,6 +600,7 @@ public void testCustomCollections2() throws Exception { * @throws Exception If failed. */ @SuppressWarnings("unchecked") + @Test public void testCustomCollectionsWithFactory() throws Exception { CustomCollectionsWithFactory cc = new CustomCollectionsWithFactory(); @@ -580,6 +619,7 @@ public void testCustomCollectionsWithFactory() throws Exception { /** * @throws Exception If failed. */ + @Test public void testExternalizableInEnclosing() throws Exception { SimpleEnclosingObject obj = new SimpleEnclosingObject(); obj.simpl = new SimpleExternalizable("field"); @@ -592,6 +632,7 @@ public void testExternalizableInEnclosing() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMapEntry() throws Exception { Map.Entry e = new GridMapEntry<>(1, "str1"); @@ -612,6 +653,7 @@ public void testMapEntry() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBinaryObject() throws Exception { BinaryMarshaller marsh = binaryMarshaller(Arrays.asList(new BinaryTypeConfiguration(SimpleObject.class.getName()))); @@ -639,6 +681,7 @@ public void testBinaryObject() throws Exception { /** * @throws Exception If failed. */ + @Test public void testEnum() throws Exception { BinaryMarshaller marsh = binaryMarshaller(Arrays.asList(new BinaryTypeConfiguration(TestEnum.class.getName()))); @@ -648,6 +691,7 @@ public void testEnum() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeclaredBodyEnum() throws Exception { final MarshallerContextTestImpl ctx = new MarshallerContextTestImpl(); ctx.registerClassName((byte)0, 1, EnumObject.class.getName()); @@ -674,6 +718,7 @@ public void testDeclaredBodyEnum() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDateAndTimestampInSingleObject() throws Exception { BinaryTypeConfiguration cfg1 = new BinaryTypeConfiguration(DateClass1.class.getName()); @@ -711,6 +756,7 @@ public void testDateAndTimestampInSingleObject() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSimpleObject() throws Exception { BinaryMarshaller marsh = binaryMarshaller(Arrays.asList( new BinaryTypeConfiguration(SimpleObject.class.getName()) @@ -794,6 +840,7 @@ public void testSimpleObject() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBinary() throws Exception { BinaryMarshaller marsh = binaryMarshaller(Arrays.asList( new BinaryTypeConfiguration(SimpleObject.class.getName()), @@ -915,6 +962,7 @@ public void testBinary() throws Exception { /** * @throws Exception If failed. */ + @Test public void testObjectFieldOfExternalizableCollection() throws Exception { EnclosingObj obj = new EnclosingObj(); @@ -926,6 +974,7 @@ public void testObjectFieldOfExternalizableCollection() throws Exception { /** * @throws Exception If failed. */ + @Test public void testVoid() throws Exception { Class clazz = Void.class; @@ -939,6 +988,7 @@ public void testVoid() throws Exception { /** * @throws Exception If failed. */ + @Test public void testWriteReplacePrivate() throws Exception { BinaryMarshaller marsh = binaryMarshaller(Collections.singleton( new BinaryTypeConfiguration(TestObject.class.getName()) @@ -956,6 +1006,7 @@ public void testWriteReplacePrivate() throws Exception { /** * @throws Exception If failed. */ + @Test public void testWriteReplaceInheritable() throws Exception { ImmutableList obj = ImmutableList.of("This is a test"); @@ -1113,6 +1164,7 @@ private void checkSimpleObjectData(SimpleObject obj, BinaryObject po) { /** * @throws Exception If failed. */ + @Test public void testClassWithoutPublicConstructor() throws Exception { BinaryMarshaller marsh = binaryMarshaller(Arrays.asList( new BinaryTypeConfiguration(NoPublicConstructor.class.getName()), @@ -1139,6 +1191,7 @@ public void testClassWithoutPublicConstructor() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCustomSerializer() throws Exception { BinaryTypeConfiguration type = new BinaryTypeConfiguration(CustomSerializedObject1.class.getName()); @@ -1157,6 +1210,7 @@ public void testCustomSerializer() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCustomSerializerWithGlobal() throws Exception { BinaryTypeConfiguration type1 = new BinaryTypeConfiguration(CustomSerializedObject1.class.getName()); @@ -1183,6 +1237,7 @@ public void testCustomSerializerWithGlobal() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCustomIdMapper() throws Exception { BinaryTypeConfiguration type = new BinaryTypeConfiguration(CustomMappedObject1.class.getName()); @@ -1223,6 +1278,7 @@ else if ("val2".equals(fieldName)) /** * @throws Exception If failed. */ + @Test public void testCustomIdMapperWithGlobal() throws Exception { BinaryTypeConfiguration type1 = new BinaryTypeConfiguration(CustomMappedObject1.class.getName()); @@ -1293,6 +1349,7 @@ else if ("val2".equals(fieldName)) /** * @throws Exception If failed. */ + @Test public void testSimpleNameLowerCaseMappers() throws Exception { BinaryTypeConfiguration innerClassType = new BinaryTypeConfiguration(InnerMappedObject.class.getName()); BinaryTypeConfiguration publicClassType = new BinaryTypeConfiguration(TestMappedObject.class.getName()); @@ -1350,6 +1407,7 @@ else if ("val2".equals(fieldName)) /** * @throws Exception If failed. */ + @Test public void testDynamicObject() throws Exception { BinaryMarshaller marsh = binaryMarshaller(Arrays.asList( new BinaryTypeConfiguration(DynamicObject.class.getName()) @@ -1395,6 +1453,7 @@ public void testDynamicObject() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCycleLink() throws Exception { BinaryMarshaller marsh = binaryMarshaller(Arrays.asList( new BinaryTypeConfiguration(CycleLinkObject.class.getName()) @@ -1414,6 +1473,7 @@ public void testCycleLink() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDetached() throws Exception { BinaryMarshaller marsh = binaryMarshaller(Arrays.asList( new BinaryTypeConfiguration(DetachedTestObject.class.getName()), @@ -1468,6 +1528,7 @@ public void testDetached() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCollectionFields() throws Exception { BinaryMarshaller marsh = binaryMarshaller(Arrays.asList( new BinaryTypeConfiguration(CollectionFieldsObject.class.getName()), @@ -1508,6 +1569,7 @@ public void testCollectionFields() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDefaultMapping() throws Exception { BinaryTypeConfiguration customMappingType = new BinaryTypeConfiguration(TestBinary.class.getName()); @@ -1546,6 +1608,7 @@ public void testDefaultMapping() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTypeNamesSimpleNameMapper() throws Exception { BinaryTypeConfiguration customType1 = new BinaryTypeConfiguration(Value.class.getName()); @@ -1624,6 +1687,7 @@ public void testTypeNamesSimpleNameMapper() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTypeNamesFullNameMappers() throws Exception { BinaryTypeConfiguration customType1 = new BinaryTypeConfiguration(Value.class.getName()); @@ -1702,6 +1766,7 @@ public void testTypeNamesFullNameMappers() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTypeNamesSimpleNameMappers() throws Exception { BinaryTypeConfiguration customType1 = new BinaryTypeConfiguration(Value.class.getName()); @@ -1789,6 +1854,7 @@ public void testTypeNamesSimpleNameMappers() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTypeNamesCustomIdMapper() throws Exception { BinaryTypeConfiguration customType1 = new BinaryTypeConfiguration(Value.class.getName()); @@ -1903,6 +1969,7 @@ else if ("NonExistentClass4".equals(clsName)) /** * @throws Exception If failed. */ + @Test public void testCustomTypeRegistration() throws Exception { BinaryTypeConfiguration customType = new BinaryTypeConfiguration(Value.class.getName()); @@ -1944,6 +2011,7 @@ public void testCustomTypeRegistration() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFieldIdMapping() throws Exception { BinaryTypeConfiguration customType1 = new BinaryTypeConfiguration(Value.class.getName()); @@ -2008,6 +2076,7 @@ public void testFieldIdMapping() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDuplicateTypeId() throws Exception { BinaryTypeConfiguration customType1 = new BinaryTypeConfiguration("org.gridgain.Class1"); @@ -2049,6 +2118,7 @@ public void testDuplicateTypeId() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBinaryCopy() throws Exception { BinaryMarshaller marsh = binaryMarshaller(Arrays.asList( new BinaryTypeConfiguration(SimpleObject.class.getName()) @@ -2172,6 +2242,7 @@ public void testBinaryCopy() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBinaryCopyString() throws Exception { BinaryMarshaller marsh = binaryMarshaller(Arrays.asList( new BinaryTypeConfiguration(SimpleObject.class.getName()) @@ -2193,6 +2264,7 @@ public void testBinaryCopyString() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBinaryCopyUuid() throws Exception { BinaryMarshaller marsh = binaryMarshaller(Arrays.asList( new BinaryTypeConfiguration(SimpleObject.class.getName()) @@ -2216,6 +2288,7 @@ public void testBinaryCopyUuid() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBinaryCopyByteArray() throws Exception { BinaryMarshaller marsh = binaryMarshaller(Arrays.asList( new BinaryTypeConfiguration(SimpleObject.class.getName()) @@ -2253,6 +2326,7 @@ private BinaryObject copy(BinaryObject po, Map fields) { /** * @throws Exception If failed. */ + @Test public void testBinaryCopyShortArray() throws Exception { BinaryMarshaller marsh = binaryMarshaller(Arrays.asList( new BinaryTypeConfiguration(SimpleObject.class.getName()) @@ -2274,6 +2348,7 @@ public void testBinaryCopyShortArray() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBinaryCopyIntArray() throws Exception { BinaryMarshaller marsh = binaryMarshaller(Arrays.asList( new BinaryTypeConfiguration(SimpleObject.class.getName()) @@ -2295,6 +2370,7 @@ public void testBinaryCopyIntArray() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBinaryCopyLongArray() throws Exception { BinaryMarshaller marsh = binaryMarshaller(Arrays.asList( new BinaryTypeConfiguration(SimpleObject.class.getName()) @@ -2316,6 +2392,7 @@ public void testBinaryCopyLongArray() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBinaryCopyFloatArray() throws Exception { BinaryMarshaller marsh = binaryMarshaller(Arrays.asList( new BinaryTypeConfiguration(SimpleObject.class.getName()) @@ -2337,6 +2414,7 @@ public void testBinaryCopyFloatArray() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBinaryCopyDoubleArray() throws Exception { BinaryMarshaller marsh = binaryMarshaller(Arrays.asList( new BinaryTypeConfiguration(SimpleObject.class.getName()) @@ -2358,6 +2436,7 @@ public void testBinaryCopyDoubleArray() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBinaryCopyCharArray() throws Exception { BinaryMarshaller marsh = binaryMarshaller(Arrays.asList( new BinaryTypeConfiguration(SimpleObject.class.getName()) @@ -2379,6 +2458,7 @@ public void testBinaryCopyCharArray() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBinaryCopyStringArray() throws Exception { BinaryMarshaller marsh = binaryMarshaller(Arrays.asList( new BinaryTypeConfiguration(SimpleObject.class.getName()) @@ -2400,6 +2480,7 @@ public void testBinaryCopyStringArray() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBinaryCopyObject() throws Exception { BinaryMarshaller marsh = binaryMarshaller(Arrays.asList( new BinaryTypeConfiguration(SimpleObject.class.getName()) @@ -2427,6 +2508,7 @@ public void testBinaryCopyObject() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBinaryCopyNonPrimitives() throws Exception { BinaryMarshaller marsh = binaryMarshaller(Arrays.asList( new BinaryTypeConfiguration(SimpleObject.class.getName()) @@ -2464,6 +2546,7 @@ public void testBinaryCopyNonPrimitives() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBinaryCopyMixed() throws Exception { BinaryMarshaller marsh = binaryMarshaller(Arrays.asList(new BinaryTypeConfiguration(SimpleObject.class.getName()))); @@ -2508,6 +2591,7 @@ public void testBinaryCopyMixed() throws Exception { /** * @throws Exception If failed. */ + @Test public void testKeepDeserialized() throws Exception { BinaryMarshaller marsh = binaryMarshaller(Arrays.asList(new BinaryTypeConfiguration(SimpleObject.class.getName()))); @@ -2525,6 +2609,7 @@ public void testKeepDeserialized() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOffheapBinary() throws Exception { BinaryMarshaller marsh = binaryMarshaller(Arrays.asList(new BinaryTypeConfiguration(SimpleObject.class.getName()))); @@ -2619,6 +2704,7 @@ public void testOffheapBinary() throws Exception { /** * */ + @Test public void testReadResolve() throws Exception { BinaryMarshaller marsh = binaryMarshaller(Arrays.asList( new BinaryTypeConfiguration(MySingleton.class.getName()), @@ -2636,6 +2722,7 @@ public void testReadResolve() throws Exception { /** * */ + @Test public void testReadResolveOnBinaryAware() throws Exception { BinaryMarshaller marsh = binaryMarshaller(Collections.singletonList( new BinaryTypeConfiguration(MyTestClass.class.getName()))); @@ -2650,6 +2737,7 @@ public void testReadResolveOnBinaryAware() throws Exception { /** * */ + @Test public void testDecimalFields() throws Exception { Collection clsNames = new ArrayList<>(); @@ -2720,6 +2808,7 @@ public void testDecimalFields() throws Exception { /** * @throws IgniteCheckedException If failed. */ + @Test public void testFinalField() throws IgniteCheckedException { BinaryMarshaller marsh = binaryMarshaller(); @@ -2733,6 +2822,7 @@ public void testFinalField() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testThreadLocalArrayReleased() throws Exception { // Checking the writer directly. assertEquals(false, INSTANCE.isAcquired()); @@ -2774,6 +2864,7 @@ public void testThreadLocalArrayReleased() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDuplicateNameSimpleNameMapper() throws Exception { BinaryMarshaller marsh = binaryMarshaller(new BinaryBasicNameMapper(true), new BinaryBasicIdMapper(true), null, null, null); @@ -2798,6 +2889,7 @@ public void testDuplicateNameSimpleNameMapper() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDuplicateNameFullNameMapper() throws Exception { BinaryMarshaller marsh = binaryMarshaller(new BinaryBasicNameMapper(false), new BinaryBasicIdMapper(false), null, null, null); @@ -2813,6 +2905,7 @@ public void testDuplicateNameFullNameMapper() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClass() throws Exception { BinaryMarshaller marsh = binaryMarshaller(); @@ -2826,6 +2919,7 @@ public void testClass() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClassFieldsMarshalling() throws Exception { BinaryMarshaller marsh = binaryMarshaller(); @@ -2849,6 +2943,7 @@ public void testClassFieldsMarshalling() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMarshallingThroughJdk() throws Exception { BinaryMarshaller marsh = binaryMarshaller(); @@ -2885,6 +2980,7 @@ public void testMarshallingThroughJdk() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPredefinedTypeIds() throws Exception { BinaryMarshaller marsh = binaryMarshaller(); @@ -2913,6 +3009,7 @@ public void testPredefinedTypeIds() throws Exception { /** * @throws Exception If failed. */ + @Test public void testProxy() throws Exception { BinaryMarshaller marsh = binaryMarshaller(); @@ -2942,6 +3039,7 @@ public void testProxy() throws Exception { * * @throws Exception If fails. */ + @Test public void testObjectContainingProxy() throws Exception { BinaryMarshaller marsh = binaryMarshaller(); @@ -2971,6 +3069,7 @@ public void testObjectContainingProxy() throws Exception { * * @throws Exception If failed. */ + @Test public void testDuplicateFields() throws Exception { BinaryMarshaller marsh = binaryMarshaller(); @@ -3026,6 +3125,7 @@ public void testDuplicateFields() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSingleHandle() throws Exception { SingleHandleA a = new SingleHandleA(new SingleHandleB()); @@ -3041,6 +3141,7 @@ public void testSingleHandle() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUnregisteredClass() throws Exception { BinaryMarshaller m = binaryMarshaller(null, Collections.singletonList(Value.class.getName())); @@ -3052,6 +3153,7 @@ public void testUnregisteredClass() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMixedRawCollections() throws Exception { Collection excludedClasses = Arrays.asList( ObjectRaw.class.getName(), @@ -3079,6 +3181,7 @@ public void testMixedRawCollections() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBinaryEquals() throws Exception { Collection excludedClasses = Arrays.asList( ObjectRaw.class.getName(), @@ -3214,6 +3317,7 @@ private void checkEquals(Object binObj0, Object binObj1) { /** * @throws Exception If failed. */ + @Test public void testBinaryEqualsComplexObject() throws Exception { List excludedClasses = Arrays.asList( TestClass0.class.getName(), @@ -3272,6 +3376,7 @@ public void testBinaryEqualsComplexObject() throws Exception { * * @throws Exception If failed. */ + @Test public void testFieldOrder() throws Exception { if (BinaryUtils.FIELDS_SORTED_ORDER) return; @@ -3301,6 +3406,7 @@ public void testFieldOrder() throws Exception { * * @throws Exception If failed. */ + @Test public void testFieldOrderByBuilder() throws Exception { if (BinaryUtils.FIELDS_SORTED_ORDER) return; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectBuilderAdditionalSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectBuilderAdditionalSelfTest.java index 95fa0e021b290..8ec8c2b368e54 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectBuilderAdditionalSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectBuilderAdditionalSelfTest.java @@ -127,6 +127,7 @@ protected IgniteBinary binaries() { /** * @throws Exception If failed. */ + @Test public void testSimpleTypeFieldRead() throws Exception { GridBinaryTestClasses.TestObjectAllTypes exp = new GridBinaryTestClasses.TestObjectAllTypes(); @@ -161,6 +162,7 @@ public void testSimpleTypeFieldRead() throws Exception { /** * */ + @Test public void testSimpleTypeFieldSerialize() { GridBinaryTestClasses.TestObjectAllTypes exp = new GridBinaryTestClasses.TestObjectAllTypes(); @@ -176,6 +178,7 @@ public void testSimpleTypeFieldSerialize() { /** * @throws Exception If any error occurs. */ + @Test public void testSimpleTypeFieldOverride() throws Exception { GridBinaryTestClasses.TestObjectAllTypes exp = new GridBinaryTestClasses.TestObjectAllTypes(); @@ -194,6 +197,7 @@ public void testSimpleTypeFieldOverride() throws Exception { /** * @throws Exception If any error occurs. */ + @Test public void testSimpleTypeFieldSetNull() throws Exception { GridBinaryTestClasses.TestObjectAllTypes exp = new GridBinaryTestClasses.TestObjectAllTypes(); @@ -217,6 +221,7 @@ public void testSimpleTypeFieldSetNull() throws Exception { /** * @throws IgniteCheckedException If any error occurs. */ + @Test public void testMakeCyclicDependency() throws IgniteCheckedException { GridBinaryTestClasses.TestObjectOuter outer = new GridBinaryTestClasses.TestObjectOuter(); outer.inner = new GridBinaryTestClasses.TestObjectInner(); @@ -237,6 +242,7 @@ public void testMakeCyclicDependency() throws IgniteCheckedException { /** * */ + @Test public void testDateArrayModification() { GridBinaryTestClasses.TestObjectAllTypes obj = new GridBinaryTestClasses.TestObjectAllTypes(); @@ -255,6 +261,7 @@ public void testDateArrayModification() { /** * */ + @Test public void testTimestampArrayModification() { GridBinaryTestClasses.TestObjectAllTypes obj = new GridBinaryTestClasses.TestObjectAllTypes(); @@ -273,6 +280,7 @@ public void testTimestampArrayModification() { /** * */ + @Test public void testUUIDArrayModification() { GridBinaryTestClasses.TestObjectAllTypes obj = new GridBinaryTestClasses.TestObjectAllTypes(); @@ -291,6 +299,7 @@ public void testUUIDArrayModification() { /** * */ + @Test public void testDecimalArrayModification() { GridBinaryTestClasses.TestObjectAllTypes obj = new GridBinaryTestClasses.TestObjectAllTypes(); @@ -310,6 +319,7 @@ public void testDecimalArrayModification() { /** * */ + @Test public void testBooleanArrayModification() { GridBinaryTestClasses.TestObjectAllTypes obj = new GridBinaryTestClasses.TestObjectAllTypes(); @@ -333,6 +343,7 @@ public void testBooleanArrayModification() { /** * */ + @Test public void testCharArrayModification() { GridBinaryTestClasses.TestObjectAllTypes obj = new GridBinaryTestClasses.TestObjectAllTypes(); @@ -351,6 +362,7 @@ public void testCharArrayModification() { /** * */ + @Test public void testDoubleArrayModification() { GridBinaryTestClasses.TestObjectAllTypes obj = new GridBinaryTestClasses.TestObjectAllTypes(); @@ -369,6 +381,7 @@ public void testDoubleArrayModification() { /** * */ + @Test public void testFloatArrayModification() { GridBinaryTestClasses.TestObjectAllTypes obj = new GridBinaryTestClasses.TestObjectAllTypes(); @@ -389,6 +402,7 @@ public void testFloatArrayModification() { /** * */ + @Test public void testLongArrayModification() { GridBinaryTestClasses.TestObjectAllTypes obj = new GridBinaryTestClasses.TestObjectAllTypes(); @@ -407,6 +421,7 @@ public void testLongArrayModification() { /** * */ + @Test public void testIntArrayModification() { GridBinaryTestClasses.TestObjectAllTypes obj = new GridBinaryTestClasses.TestObjectAllTypes(); @@ -425,6 +440,7 @@ public void testIntArrayModification() { /** * */ + @Test public void testShortArrayModification() { GridBinaryTestClasses.TestObjectAllTypes obj = new GridBinaryTestClasses.TestObjectAllTypes(); @@ -443,6 +459,7 @@ public void testShortArrayModification() { /** * */ + @Test public void testByteArrayModification() { GridBinaryTestClasses.TestObjectAllTypes obj = new GridBinaryTestClasses.TestObjectAllTypes(); @@ -461,6 +478,7 @@ public void testByteArrayModification() { /** * */ + @Test public void testStringArrayModification() { GridBinaryTestClasses.TestObjectAllTypes obj = new GridBinaryTestClasses.TestObjectAllTypes(); @@ -479,6 +497,7 @@ public void testStringArrayModification() { /** * */ + @Test public void testModifyObjectArray() { GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer(); obj.foo = new Object[] {"a"}; @@ -499,6 +518,7 @@ public void testModifyObjectArray() { /** * */ + @Test public void testOverrideObjectArrayField() { BinaryObjectBuilderImpl mutObj = wrap(new GridBinaryTestClasses.TestObjectContainer()); @@ -516,6 +536,7 @@ public void testOverrideObjectArrayField() { /** * */ + @Test public void testDeepArray() { GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer(); obj.foo = new Object[] {new Object[] {"a", obj}}; @@ -540,6 +561,7 @@ public void testDeepArray() { /** * */ + @Test public void testArrayListRead() { GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer(); obj.foo = Lists.newArrayList(obj, "a"); @@ -554,6 +576,7 @@ public void testArrayListRead() { /** * */ + @Test public void testArrayListOverride() { GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer(); @@ -574,6 +597,7 @@ public void testArrayListOverride() { /** * */ + @Test public void testArrayListModification() { GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer(); obj.foo = Lists.newArrayList("a", "b", "c"); @@ -601,6 +625,7 @@ public void testArrayListModification() { /** * */ + @Test public void testArrayListClear() { GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer(); obj.foo = Lists.newArrayList("a", "b", "c"); @@ -617,6 +642,7 @@ public void testArrayListClear() { /** * */ + @Test public void testArrayListWriteUnmodifiable() { GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer(); @@ -638,6 +664,7 @@ public void testArrayListWriteUnmodifiable() { /** * */ + @Test public void testLinkedListRead() { GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer(); obj.foo = Lists.newLinkedList(Arrays.asList(obj, "a")); @@ -652,6 +679,7 @@ public void testLinkedListRead() { /** * */ + @Test public void testLinkedListOverride() { GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer(); @@ -672,6 +700,7 @@ public void testLinkedListOverride() { /** * */ + @Test public void testLinkedListModification() { GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer(); @@ -700,6 +729,7 @@ public void testLinkedListModification() { /** * */ + @Test public void testLinkedListWriteUnmodifiable() { GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer(); @@ -721,6 +751,7 @@ public void testLinkedListWriteUnmodifiable() { /** * */ + @Test public void testHashSetRead() { GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer(); obj.foo = Sets.newHashSet(obj, "a"); @@ -735,6 +766,7 @@ public void testHashSetRead() { /** * */ + @Test public void testHashSetOverride() { GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer(); @@ -756,6 +788,7 @@ public void testHashSetOverride() { /** * */ + @Test public void testHashSetModification() { GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer(); obj.foo = Sets.newHashSet("a", "b", "c"); @@ -780,6 +813,7 @@ public void testHashSetModification() { /** * */ + @Test public void testHashSetWriteUnmodifiable() { GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer(); @@ -800,6 +834,7 @@ public void testHashSetWriteUnmodifiable() { /** * */ + @Test public void testMapRead() { GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer(); obj.foo = Maps.newHashMap(ImmutableMap.of(obj, "a", "b", obj)); @@ -814,6 +849,7 @@ public void testMapRead() { /** * */ + @Test public void testMapOverride() { GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer(); @@ -831,6 +867,7 @@ public void testMapOverride() { /** * */ + @Test public void testMapModification() { GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer(); obj.foo = Maps.newHashMap(ImmutableMap.of(1, "a", 2, "b")); @@ -852,6 +889,7 @@ public void testMapModification() { /** * */ + @Test public void testEnumArrayModification() { GridBinaryTestClasses.TestObjectAllTypes obj = new GridBinaryTestClasses.TestObjectAllTypes(); @@ -870,6 +908,7 @@ public void testEnumArrayModification() { /** * */ + @Test public void testEditObjectWithRawData() { GridBinaryMarshalerAwareTestClass obj = new GridBinaryMarshalerAwareTestClass(); @@ -888,6 +927,7 @@ public void testEditObjectWithRawData() { /** * */ + @Test public void testHashCode() { GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer(); @@ -901,6 +941,7 @@ public void testHashCode() { /** * */ + @Test public void testCollectionsInCollection() { GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer(); obj.foo = Lists.newArrayList( @@ -918,6 +959,7 @@ public void testCollectionsInCollection() { /** * */ + @Test public void testMapEntryOverride() { GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer(); @@ -933,6 +975,7 @@ public void testMapEntryOverride() { /** * */ + @Test public void testMetadataChangingDoublePut() { BinaryObjectBuilderImpl mutableObj = wrap(new GridBinaryTestClasses.TestObjectContainer()); @@ -949,6 +992,7 @@ public void testMetadataChangingDoublePut() { /** * */ + @Test public void testMetadataChangingDoublePut2() { BinaryObjectBuilderImpl mutableObj = wrap(new GridBinaryTestClasses.TestObjectContainer()); @@ -965,6 +1009,7 @@ public void testMetadataChangingDoublePut2() { /** * */ + @Test public void testMetadataChanging() { GridBinaryTestClasses.TestObjectContainer c = new GridBinaryTestClasses.TestObjectContainer(); @@ -999,6 +1044,7 @@ public void testMetadataChanging() { /** * */ + @Test public void testWrongMetadataNullField() { BinaryObjectBuilder builder = binaries().builder("SomeType"); @@ -1036,6 +1082,7 @@ public void testWrongMetadataNullField() { /** * */ + @Test public void testWrongMetadataNullField2() { BinaryObjectBuilder builder = binaries().builder("SomeType1"); @@ -1073,6 +1120,7 @@ public void testWrongMetadataNullField2() { /** * */ + @Test public void testCorrectMetadataNullField() { BinaryObjectBuilder builder = binaries().builder("SomeType2"); @@ -1095,6 +1143,7 @@ public void testCorrectMetadataNullField() { /** * */ + @Test public void testCorrectMetadataNullField2() { BinaryObjectBuilder builder = binaries().builder("SomeType3"); @@ -1116,6 +1165,7 @@ public void testCorrectMetadataNullField2() { /** * */ + @Test public void testDateInObjectField() { GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer(); @@ -1129,6 +1179,7 @@ public void testDateInObjectField() { /** * */ + @Test public void testTimestampInObjectField() { GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer(); @@ -1142,6 +1193,7 @@ public void testTimestampInObjectField() { /** * */ + @Test public void testDateInCollection() { GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer(); @@ -1155,6 +1207,7 @@ public void testDateInCollection() { /** * */ + @Test public void testTimestampInCollection() { GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer(); @@ -1168,6 +1221,7 @@ public void testTimestampInCollection() { /** * */ + @Test public void testDateArrayOverride() { GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer(); @@ -1186,6 +1240,7 @@ public void testDateArrayOverride() { /** * */ + @Test public void testTimestampArrayOverride() { GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer(); @@ -1204,6 +1259,7 @@ public void testTimestampArrayOverride() { /** * */ + @Test public void testChangeMap() { GridBinaryTestClasses.Addresses addrs = new GridBinaryTestClasses.Addresses(); @@ -1246,6 +1302,7 @@ public void testChangeMap() { /** * */ + @Test public void testSavingObjectWithNotZeroStart() { GridBinaryTestClasses.TestObjectOuter out = new GridBinaryTestClasses.TestObjectOuter(); GridBinaryTestClasses.TestObjectInner inner = new GridBinaryTestClasses.TestObjectInner(); @@ -1265,6 +1322,7 @@ public void testSavingObjectWithNotZeroStart() { /** * */ + @Test public void testBinaryObjectField() { GridBinaryTestClasses.TestObjectContainer container = new GridBinaryTestClasses.TestObjectContainer(toBinary(new GridBinaryTestClasses.TestObjectArrayList())); @@ -1279,6 +1337,7 @@ public void testBinaryObjectField() { /** * */ + @Test public void testAssignBinaryObject() { GridBinaryTestClasses.TestObjectContainer container = new GridBinaryTestClasses.TestObjectContainer(); @@ -1293,6 +1352,7 @@ public void testAssignBinaryObject() { /** * */ + @Test public void testRemoveFromNewObject() { BinaryObjectBuilderImpl wrapper = newWrapper(GridBinaryTestClasses.TestObjectAllTypes.class); @@ -1306,6 +1366,7 @@ public void testRemoveFromNewObject() { /** * */ + @Test public void testRemoveFromExistingObject() { GridBinaryTestClasses.TestObjectAllTypes obj = new GridBinaryTestClasses.TestObjectAllTypes(); obj.setDefaultData(); @@ -1320,6 +1381,7 @@ public void testRemoveFromExistingObject() { /** * */ + @Test public void testCyclicArrays() { GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer(); @@ -1341,6 +1403,7 @@ public void testCyclicArrays() { * */ @SuppressWarnings("TypeMayBeWeakened") + @Test public void testCyclicArrayList() { GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer(); @@ -1362,6 +1425,7 @@ public void testCyclicArrayList() { /** * @throws Exception If failed. */ + @Test public void testSameBinaryKey() throws Exception { IgniteCache replicatedCache = jcache(0).withKeepBinary(); @@ -1389,6 +1453,7 @@ public void testSameBinaryKey() throws Exception { /** * Ensure that object w/o schema can be re-built. */ + @Test public void testBuildFromObjectWithoutSchema() { BinaryObjectBuilderImpl binBuilder = wrap(new GridBinaryTestClass2()); @@ -1438,6 +1503,7 @@ private BinaryObjectBuilderImpl newWrapper(String typeName) { /** * Check that correct type is stored in binary object. */ + @Test public void testCollectionsSerialization() { final BinaryObjectBuilder root = newWrapper(BigInteger.class); @@ -1519,6 +1585,7 @@ public void testCollectionsSerialization() { * * @throws Exception If failed. */ + @Test public void testBuilderExternalizable() throws Exception { BinaryObjectBuilder builder = newWrapper("TestType"); @@ -1554,6 +1621,7 @@ public void testBuilderExternalizable() throws Exception { * * @throws Exception If failed. */ + @Test public void testEnum() throws Exception { BinaryObjectBuilder builder = newWrapper("TestType"); @@ -1577,6 +1645,7 @@ public void testEnum() throws Exception { /** * Test {@link BinaryObjectBuilder#build()} adds type mapping to the binary marshaller's cache. */ + @Test public void testMarshallerMappings() throws IgniteCheckedException, ClassNotFoundException { String typeName = "TestType"; @@ -1611,6 +1680,7 @@ private TestEnum[] deserializeEnumBinaryArray(Object obj) { /** * @throws Exception If fails */ + @Test public void testBuilderReusage() throws Exception { // Check: rewrite null field value. BinaryObjectBuilder builder = newWrapper("SimpleCls1"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectBuilderDefaultMappersSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectBuilderDefaultMappersSelfTest.java index 306699358f081..f3dd8af5a0acd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectBuilderDefaultMappersSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectBuilderDefaultMappersSelfTest.java @@ -110,6 +110,7 @@ protected boolean compactFooter() { /** * */ + @Test public void testAllFieldsSerialization() { GridBinaryTestClasses.TestObjectAllTypes obj = new GridBinaryTestClasses.TestObjectAllTypes(); obj.setDefaultData(); @@ -123,6 +124,7 @@ public void testAllFieldsSerialization() { /** * @throws Exception If failed. */ + @Test public void testNullField() throws Exception { BinaryObjectBuilder builder = builder("Class"); @@ -151,6 +153,7 @@ public void testNullField() throws Exception { /** * @throws Exception If failed. */ + @Test public void testByteField() throws Exception { BinaryObjectBuilder builder = builder("Class"); @@ -167,6 +170,7 @@ public void testByteField() throws Exception { /** * @throws Exception If failed. */ + @Test public void testShortField() throws Exception { BinaryObjectBuilder builder = builder("Class"); @@ -183,6 +187,7 @@ public void testShortField() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIntField() throws Exception { BinaryObjectBuilder builder = builder("Class"); @@ -199,6 +204,7 @@ public void testIntField() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLongField() throws Exception { BinaryObjectBuilder builder = builder("Class"); @@ -215,6 +221,7 @@ public void testLongField() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFloatField() throws Exception { BinaryObjectBuilder builder = builder("Class"); @@ -231,6 +238,7 @@ public void testFloatField() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDoubleField() throws Exception { BinaryObjectBuilder builder = builder("Class"); @@ -247,6 +255,7 @@ public void testDoubleField() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCharField() throws Exception { BinaryObjectBuilder builder = builder("Class"); @@ -280,6 +289,7 @@ private int expectedHashCode(String fullName) { /** * @throws Exception If failed. */ + @Test public void testBooleanField() throws Exception { BinaryObjectBuilder builder = builder("Class"); @@ -296,6 +306,7 @@ public void testBooleanField() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDecimalField() throws Exception { BinaryObjectBuilder builder = builder("Class"); @@ -312,6 +323,7 @@ public void testDecimalField() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStringField() throws Exception { BinaryObjectBuilder builder = builder("Class"); @@ -328,6 +340,7 @@ public void testStringField() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDateField() throws Exception { Date date = new Date(); @@ -337,6 +350,7 @@ public void testDateField() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTimestampField() throws Exception { Timestamp ts = new Timestamp(new Date().getTime()); ts.setNanos(1000); @@ -347,6 +361,7 @@ public void testTimestampField() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUuidField() throws Exception { BinaryObjectBuilder builder = builder("Class"); @@ -365,6 +380,7 @@ public void testUuidField() throws Exception { /** * @throws Exception If failed. */ + @Test public void testByteArrayField() throws Exception { BinaryObjectBuilder builder = builder("Class"); @@ -381,6 +397,7 @@ public void testByteArrayField() throws Exception { /** * @throws Exception If failed. */ + @Test public void testShortArrayField() throws Exception { BinaryObjectBuilder builder = builder("Class"); @@ -397,6 +414,7 @@ public void testShortArrayField() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIntArrayField() throws Exception { BinaryObjectBuilder builder = builder("Class"); @@ -413,6 +431,7 @@ public void testIntArrayField() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLongArrayField() throws Exception { BinaryObjectBuilder builder = builder("Class"); @@ -429,6 +448,7 @@ public void testLongArrayField() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFloatArrayField() throws Exception { BinaryObjectBuilder builder = builder("Class"); @@ -445,6 +465,7 @@ public void testFloatArrayField() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDoubleArrayField() throws Exception { BinaryObjectBuilder builder = builder("Class"); @@ -461,6 +482,7 @@ public void testDoubleArrayField() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCharArrayField() throws Exception { BinaryObjectBuilder builder = builder("Class"); @@ -477,6 +499,7 @@ public void testCharArrayField() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBooleanArrayField() throws Exception { BinaryObjectBuilder builder = builder("Class"); @@ -498,6 +521,7 @@ public void testBooleanArrayField() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDecimalArrayField() throws Exception { BinaryObjectBuilder builder = builder("Class"); @@ -514,6 +538,7 @@ public void testDecimalArrayField() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStringArrayField() throws Exception { BinaryObjectBuilder builder = builder("Class"); @@ -530,6 +555,7 @@ public void testStringArrayField() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDateArrayField() throws Exception { Date date1 = new Date(); Date date2 = new Date(date1.getTime() + 1000); @@ -542,6 +568,7 @@ public void testDateArrayField() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTimestampArrayField() throws Exception { Timestamp ts1 = new Timestamp(new Date().getTime()); Timestamp ts2 = new Timestamp(new Date().getTime() + 1000); @@ -557,6 +584,7 @@ public void testTimestampArrayField() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUuidArrayField() throws Exception { BinaryObjectBuilder builder = builder("Class"); @@ -575,6 +603,7 @@ public void testUuidArrayField() throws Exception { /** * @throws Exception If failed. */ + @Test public void testObjectField() throws Exception { BinaryObjectBuilder builder = builder("Class"); @@ -591,6 +620,7 @@ public void testObjectField() throws Exception { /** * @throws Exception If failed. */ + @Test public void testObjectArrayField() throws Exception { BinaryObjectBuilder builder = builder("Class"); @@ -612,6 +642,7 @@ public void testObjectArrayField() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCollectionField() throws Exception { BinaryObjectBuilder builder = builder("Class"); @@ -639,6 +670,7 @@ public void testCollectionField() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMapField() throws Exception { BinaryObjectBuilder builder = builder("Class"); @@ -670,6 +702,7 @@ public void testMapField() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSeveralFields() throws Exception { BinaryObjectBuilder builder = builder("Class"); @@ -700,6 +733,7 @@ public void testSeveralFields() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOffheapBinary() throws Exception { BinaryObjectBuilder builder = builder("Class"); @@ -760,6 +794,7 @@ public void testOffheapBinary() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBuildAndDeserialize() throws Exception { BinaryObjectBuilder builder = builder(Value.class.getName()); @@ -776,6 +811,7 @@ public void testBuildAndDeserialize() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMetaData2() throws Exception { BinaryObjectBuilder builder = builder("org.test.MetaTest2"); @@ -805,6 +841,7 @@ private String expectedTypeName(String fullClsName) { /** * @throws Exception If failed. */ + @Test public void testMetaData() throws Exception { BinaryObjectBuilder builder = builder("org.test.MetaTest"); @@ -854,6 +891,7 @@ public void testMetaData() throws Exception { /** * */ + @Test public void testGetFromCopiedObj() { BinaryObject objStr = builder(GridBinaryTestClasses.TestObjectAllTypes.class.getName()).setField("str", "aaa").build(); @@ -871,6 +909,7 @@ public void testGetFromCopiedObj() { * */ @SuppressWarnings("unchecked") + @Test public void testCopyFromInnerObjects() { ArrayList list = new ArrayList<>(); list.add(new GridBinaryTestClasses.TestObjectAllTypes()); @@ -895,6 +934,7 @@ public void testCopyFromInnerObjects() { /** * */ + @Test public void testSetBinaryObject() { // Prepare marshaller context. CacheObjectBinaryProcessorImpl proc = ((CacheObjectBinaryProcessorImpl)(grid(0)).context().cacheObjects()); @@ -914,6 +954,7 @@ public void testSetBinaryObject() { /** * */ + @Test public void testPlainBinaryObjectCopyFrom() { GridBinaryTestClasses.TestObjectPlainBinary obj = new GridBinaryTestClasses.TestObjectPlainBinary(toBinary(new GridBinaryTestClasses.TestObjectAllTypes())); @@ -927,6 +968,7 @@ public void testPlainBinaryObjectCopyFrom() { /** * */ + @Test public void testRemoveFromNewObject() { BinaryObjectBuilder builder = builder(GridBinaryTestClasses.TestObjectAllTypes.class.getName()); @@ -940,6 +982,7 @@ public void testRemoveFromNewObject() { /** * */ + @Test public void testRemoveFromExistingObject() { GridBinaryTestClasses.TestObjectAllTypes obj = new GridBinaryTestClasses.TestObjectAllTypes(); obj.setDefaultData(); @@ -959,6 +1002,7 @@ public void testRemoveFromExistingObject() { /** * */ + @Test public void testRemoveFromExistingObjectAfterGet() { GridBinaryTestClasses.TestObjectAllTypes obj = new GridBinaryTestClasses.TestObjectAllTypes(); obj.setDefaultData(); @@ -976,6 +1020,7 @@ public void testRemoveFromExistingObjectAfterGet() { /** * @throws IgniteCheckedException If any error occurs. */ + @Test public void testDontBrokeCyclicDependency() throws IgniteCheckedException { GridBinaryTestClasses.TestObjectOuter outer = new GridBinaryTestClasses.TestObjectOuter(); outer.inner = new GridBinaryTestClasses.TestObjectInner(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectExceptionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectExceptionSelfTest.java index 6e1b4a36f78e4..6462aff7b1c30 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectExceptionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectExceptionSelfTest.java @@ -86,6 +86,7 @@ public class BinaryObjectExceptionSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testUnexpectedFieldType() throws Exception { IgniteEx grid = grid(0); @@ -156,6 +157,7 @@ public void testUnexpectedFieldType() throws Exception { * * @throws Exception If failed. */ + @Test public void testFailedMarshallingLogging() throws Exception { BinaryMarshaller marshaller = createStandaloneBinaryMarshaller(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectToStringSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectToStringSelfTest.java index e208daac0032d..e252baeb8548f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectToStringSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectToStringSelfTest.java @@ -59,6 +59,7 @@ public class BinaryObjectToStringSelfTest extends GridCommonAbstractTest { * @throws Exception If failed. */ @SuppressWarnings("unchecked") + @Test public void testToString() throws Exception { MyObject obj = new MyObject(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectTypeCompatibilityTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectTypeCompatibilityTest.java index 3ef4a83b20ee8..240dcad926202 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectTypeCompatibilityTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectTypeCompatibilityTest.java @@ -69,6 +69,7 @@ public class BinaryObjectTypeCompatibilityTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCompatibilityWithObject() throws Exception { Ignite ignite = startGrid(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinarySerialiedFieldComparatorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinarySerialiedFieldComparatorSelfTest.java index 1e0c5c9932b5f..f7d3b47fac1d3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinarySerialiedFieldComparatorSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinarySerialiedFieldComparatorSelfTest.java @@ -80,6 +80,7 @@ public class BinarySerialiedFieldComparatorSelfTest extends GridCommonAbstractTe * * @throws Exception If failed. */ + @Test public void testByte() throws Exception { checkTwoValues((byte)1, (byte)2); } @@ -89,6 +90,7 @@ public void testByte() throws Exception { * * @throws Exception If failed. */ + @Test public void testBoolean() throws Exception { checkTwoValues(true, false); } @@ -98,6 +100,7 @@ public void testBoolean() throws Exception { * * @throws Exception If failed. */ + @Test public void testShort() throws Exception { checkTwoValues((short)1, (short)2); } @@ -107,6 +110,7 @@ public void testShort() throws Exception { * * @throws Exception If failed. */ + @Test public void testChar() throws Exception { checkTwoValues('a', 'b'); } @@ -116,6 +120,7 @@ public void testChar() throws Exception { * * @throws Exception If failed. */ + @Test public void testInt() throws Exception { checkTwoValues(1, 2); } @@ -125,6 +130,7 @@ public void testInt() throws Exception { * * @throws Exception If failed. */ + @Test public void testLong() throws Exception { checkTwoValues(1L, 2L); } @@ -134,6 +140,7 @@ public void testLong() throws Exception { * * @throws Exception If failed. */ + @Test public void testFloat() throws Exception { checkTwoValues(1.0f, 2.0f); } @@ -143,6 +150,7 @@ public void testFloat() throws Exception { * * @throws Exception If failed. */ + @Test public void testDouble() throws Exception { checkTwoValues(1.0d, 2.0d); } @@ -152,6 +160,7 @@ public void testDouble() throws Exception { * * @throws Exception If failed. */ + @Test public void testString() throws Exception { checkTwoValues("str1", "str2"); } @@ -161,6 +170,7 @@ public void testString() throws Exception { * * @throws Exception If failed. */ + @Test public void testDate() throws Exception { long time = System.currentTimeMillis(); @@ -172,6 +182,7 @@ public void testDate() throws Exception { * * @throws Exception If failed. */ + @Test public void testTimestamp() throws Exception { long time = System.currentTimeMillis(); @@ -183,6 +194,7 @@ public void testTimestamp() throws Exception { * * @throws Exception If failed. */ + @Test public void testUuid() throws Exception { checkTwoValues(UUID.randomUUID(), UUID.randomUUID()); } @@ -192,6 +204,7 @@ public void testUuid() throws Exception { * * @throws Exception If failed. */ + @Test public void testDecimal() throws Exception { checkTwoValues(new BigDecimal("12.3E+7"), new BigDecimal("12.4E+7")); checkTwoValues(new BigDecimal("12.3E+7"), new BigDecimal("12.3E+8")); @@ -202,6 +215,7 @@ public void testDecimal() throws Exception { * * @throws Exception If failed. */ + @Test public void testInnerObject() throws Exception { checkTwoValues(new InnerClass(1), new InnerClass(2)); } @@ -211,6 +225,7 @@ public void testInnerObject() throws Exception { * * @throws Exception If failed. */ + @Test public void testByteArray() throws Exception { checkTwoValues(new byte[] { 1, 2 }, new byte[] { 1, 3 }); checkTwoValues(new byte[] { 1, 2 }, new byte[] { 1 }); @@ -223,6 +238,7 @@ public void testByteArray() throws Exception { * * @throws Exception If failed. */ + @Test public void testBooleanArray() throws Exception { checkTwoValues(new boolean[] { true, false }, new boolean[] { false, true }); checkTwoValues(new boolean[] { true, false }, new boolean[] { true }); @@ -235,6 +251,7 @@ public void testBooleanArray() throws Exception { * * @throws Exception If failed. */ + @Test public void testShortArray() throws Exception { checkTwoValues(new short[] { 1, 2 }, new short[] { 1, 3 }); checkTwoValues(new short[] { 1, 2 }, new short[] { 1 }); @@ -247,6 +264,7 @@ public void testShortArray() throws Exception { * * @throws Exception If failed. */ + @Test public void testCharArray() throws Exception { checkTwoValues(new char[] { 1, 2 }, new char[] { 1, 3 }); checkTwoValues(new char[] { 1, 2 }, new char[] { 1 }); @@ -259,6 +277,7 @@ public void testCharArray() throws Exception { * * @throws Exception If failed. */ + @Test public void testIntArray() throws Exception { checkTwoValues(new int[] { 1, 2 }, new int[] { 1, 3 }); checkTwoValues(new int[] { 1, 2 }, new int[] { 1 }); @@ -271,6 +290,7 @@ public void testIntArray() throws Exception { * * @throws Exception If failed. */ + @Test public void testLongArray() throws Exception { checkTwoValues(new long[] { 1, 2 }, new long[] { 1, 3 }); checkTwoValues(new long[] { 1, 2 }, new long[] { 1 }); @@ -283,6 +303,7 @@ public void testLongArray() throws Exception { * * @throws Exception If failed. */ + @Test public void testFloatArray() throws Exception { checkTwoValues(new float[] { 1.0f, 2.0f }, new float[] { 1.0f, 3.0f }); checkTwoValues(new float[] { 1.0f, 2.0f }, new float[] { 1.0f }); @@ -295,6 +316,7 @@ public void testFloatArray() throws Exception { * * @throws Exception If failed. */ + @Test public void testDoubleArray() throws Exception { checkTwoValues(new double[] { 1.0d, 2.0d }, new double[] { 1.0d, 3.0d }); checkTwoValues(new double[] { 1.0d, 2.0d }, new double[] { 1.0d }); @@ -307,6 +329,7 @@ public void testDoubleArray() throws Exception { * * @throws Exception If failed. */ + @Test public void testStringArray() throws Exception { checkTwoValues(new String[] { "a", "b" }, new String[] { "a", "c" }); checkTwoValues(new String[] { "a", "b" }, new String[] { "a" }); @@ -319,6 +342,7 @@ public void testStringArray() throws Exception { * * @throws Exception If failed. */ + @Test public void testDateArray() throws Exception { long curTime = System.currentTimeMillis(); @@ -337,6 +361,7 @@ public void testDateArray() throws Exception { * * @throws Exception If failed. */ + @Test public void testTimestampArray() throws Exception { long curTime = System.currentTimeMillis(); @@ -355,6 +380,7 @@ public void testTimestampArray() throws Exception { * * @throws Exception If failed. */ + @Test public void testUuidArray() throws Exception { UUID v1 = UUID.randomUUID(); UUID v2 = UUID.randomUUID(); @@ -371,6 +397,7 @@ public void testUuidArray() throws Exception { * * @throws Exception If failed. */ + @Test public void testDecimalArray() throws Exception { BigDecimal v1 = new BigDecimal("12.3E+7"); BigDecimal v2 = new BigDecimal("12.4E+7"); @@ -395,6 +422,7 @@ public void testDecimalArray() throws Exception { * * @throws Exception If failed. */ + @Test public void testInnerObjectArray() throws Exception { InnerClass v1 = new InnerClass(1); InnerClass v2 = new InnerClass(2); @@ -558,4 +586,4 @@ public InnerClass(int val) { this.val = val; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinarySimpleNameTestPropertySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinarySimpleNameTestPropertySelfTest.java index b9077d1c6b2f8..a7057b9cbf2a0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinarySimpleNameTestPropertySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinarySimpleNameTestPropertySelfTest.java @@ -55,6 +55,7 @@ public class BinarySimpleNameTestPropertySelfTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testPropertyEnabled() throws Exception { String useSimpleNameBackup = GridTestProperties.getProperty(BINARY_MARSHALLER_USE_SIMPLE_NAME_MAPPER); @@ -72,6 +73,7 @@ public void testPropertyEnabled() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPropertyDisabled() throws Exception { checkProperty("org.ignite.test.TestClass"); } @@ -80,6 +82,7 @@ public void testPropertyDisabled() throws Exception { * Check if Binary facade is disabled test. Test uses JDK marshaller to provide warranty facade is not available * @throws Exception If failed. */ + @Test public void testBinaryDisabled() throws Exception { enableJdkMarshaller = true; assertNull(startGrid().binary()); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryTreeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryTreeSelfTest.java index 8d84f54d072d4..3229118f15e86 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryTreeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryTreeSelfTest.java @@ -69,6 +69,7 @@ public class BinaryTreeSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testTreeMapAsValueRegularNoComparator() throws Exception { checkTreeMapAsValue(false, false); } @@ -78,6 +79,7 @@ public void testTreeMapAsValueRegularNoComparator() throws Exception { * * @throws Exception If failed. */ + @Test public void testTreeMapAsValueRegularComparator() throws Exception { checkTreeMapAsValue(false, true); } @@ -87,6 +89,7 @@ public void testTreeMapAsValueRegularComparator() throws Exception { * * @throws Exception If failed. */ + @Test public void testTreeMapAsValueBinaryNoComparator() throws Exception { checkTreeMapAsValue(true, false); } @@ -96,6 +99,7 @@ public void testTreeMapAsValueBinaryNoComparator() throws Exception { * * @throws Exception If failed. */ + @Test public void testTreeMapAsValueBinaryComparator() throws Exception { checkTreeMapAsValue(true, true); } @@ -105,6 +109,7 @@ public void testTreeMapAsValueBinaryComparator() throws Exception { * * @throws Exception If failed. */ + @Test public void testTreeMapAsKeyNoComparator() throws Exception { checkTreeMapAsKey(false); } @@ -114,6 +119,7 @@ public void testTreeMapAsKeyNoComparator() throws Exception { * * @throws Exception If failed. */ + @Test public void testTreeMapAsKeyComparator() throws Exception { checkTreeMapAsKey(true); } @@ -224,6 +230,7 @@ private TreeMap testMap(boolean useComp) { * * @throws Exception If failed. */ + @Test public void testTreeSetAsValueRegularNoComparator() throws Exception { checkTreeSetAsValue(false, false); } @@ -233,6 +240,7 @@ public void testTreeSetAsValueRegularNoComparator() throws Exception { * * @throws Exception If failed. */ + @Test public void testTreeSetAsValueRegularComparator() throws Exception { checkTreeSetAsValue(false, true); } @@ -242,6 +250,7 @@ public void testTreeSetAsValueRegularComparator() throws Exception { * * @throws Exception If failed. */ + @Test public void testTreeSetAsValueBinaryNoComparator() throws Exception { checkTreeSetAsValue(true, false); } @@ -251,6 +260,7 @@ public void testTreeSetAsValueBinaryNoComparator() throws Exception { * * @throws Exception If failed. */ + @Test public void testTreeSetAsValueBinaryComparator() throws Exception { checkTreeSetAsValue(true, true); } @@ -260,6 +270,7 @@ public void testTreeSetAsValueBinaryComparator() throws Exception { * * @throws Exception If failed. */ + @Test public void testTreeSetAsKeyNoComparator() throws Exception { checkTreeSetAsKey(false); } @@ -269,6 +280,7 @@ public void testTreeSetAsKeyNoComparator() throws Exception { * * @throws Exception If failed. */ + @Test public void testTreeSetAsKeyComparator() throws Exception { checkTreeSetAsKey(true); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryAffinityKeySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryAffinityKeySelfTest.java index 345f24dc93644..256e8e10f888b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryAffinityKeySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryAffinityKeySelfTest.java @@ -98,6 +98,7 @@ public class GridBinaryAffinityKeySelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testAffinity() throws Exception { checkAffinity(grid(0)); @@ -167,6 +168,7 @@ private void checkAffinity(Ignite ignite) throws Exception { /** * @throws Exception If failed. */ + @Test public void testAffinityRun() throws Exception { Affinity aff = grid(0).affinity(DEFAULT_CACHE_NAME); @@ -200,6 +202,7 @@ public void testAffinityRun() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAffinityCall() throws Exception { Affinity aff = grid(0).affinity(DEFAULT_CACHE_NAME); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryMarshallerCtxDisabledSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryMarshallerCtxDisabledSelfTest.java index bb7c65d6d2136..cc53039c98f95 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryMarshallerCtxDisabledSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryMarshallerCtxDisabledSelfTest.java @@ -42,6 +42,7 @@ public class GridBinaryMarshallerCtxDisabledSelfTest extends GridCommonAbstractT /** * @throws Exception If failed. */ + @Test public void testObjectExchange() throws Exception { BinaryMarshaller marsh = new BinaryMarshaller(); marsh.setContext(new MarshallerContextWithNoStorage()); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryWildcardsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryWildcardsSelfTest.java index 0449070121674..31e1f0e78fd33 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryWildcardsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryWildcardsSelfTest.java @@ -54,6 +54,7 @@ public class GridBinaryWildcardsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClassNamesFullNameMapper() throws Exception { checkClassNames(new BinaryBasicNameMapper(false), new BinaryBasicIdMapper(false)); } @@ -61,6 +62,7 @@ public void testClassNamesFullNameMapper() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClassNamesSimpleNameMapper() throws Exception { checkClassNames(new BinaryBasicNameMapper(true), new BinaryBasicIdMapper(true)); } @@ -68,6 +70,7 @@ public void testClassNamesSimpleNameMapper() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClassNamesMixedMappers() throws Exception { checkClassNames(new BinaryBasicNameMapper(false), new BinaryBasicIdMapper(true)); } @@ -97,6 +100,7 @@ private void checkClassNames(BinaryNameMapper nameMapper, BinaryIdMapper mapper) /** * @throws Exception If failed. */ + @Test public void testClassNamesCustomMappers() throws Exception { BinaryMarshaller marsh = binaryMarshaller(null, new BinaryIdMapper() { @Override public int typeId(String clsName) { @@ -132,6 +136,7 @@ else if (clsName.endsWith("InnerClass")) /** * @throws Exception If failed. */ + @Test public void testTypeConfigurationsSimpleNameIdMapper() throws Exception { checkTypeConfigurations(new BinaryBasicNameMapper(true), new BinaryBasicIdMapper(true)); } @@ -139,6 +144,7 @@ public void testTypeConfigurationsSimpleNameIdMapper() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTypeConfigurationsFullNameIdMapper() throws Exception { checkTypeConfigurations(new BinaryBasicNameMapper(false), new BinaryBasicIdMapper(false)); } @@ -184,6 +190,7 @@ private int typeId(String typeName, BinaryNameMapper nameMapper, BinaryIdMapper /** * @throws Exception If failed. */ + @Test public void testTypeConfigurationsWithGlobalMapper() throws Exception { BinaryMarshaller marsh = binaryMarshaller(new BinaryBasicNameMapper(false), new BinaryIdMapper() { @Override public int typeId(String clsName) { @@ -219,6 +226,7 @@ else if (clsName.endsWith("InnerClass")) /** * @throws Exception If failed. */ + @Test public void testTypeConfigurationsWithNonGlobalMapper() throws Exception { BinaryMarshaller marsh = binaryMarshaller(new BinaryBasicNameMapper(true), new BinaryIdMapper() { @Override public int typeId(String clsName) { @@ -254,6 +262,7 @@ else if (clsName.endsWith("InnerClass")) /** * @throws Exception If failed. */ + @Test public void testOverrideIdMapperSimpleNameMapper() throws Exception { checkOverrideNameMapper(new BinaryBasicNameMapper(true), new BinaryBasicIdMapper(true)); } @@ -261,6 +270,7 @@ public void testOverrideIdMapperSimpleNameMapper() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOverrideIdMapperFullNameMapper() throws Exception { checkOverrideNameMapper(new BinaryBasicNameMapper(false), new BinaryBasicIdMapper(false)); } @@ -307,6 +317,7 @@ private void checkOverrideIdMapper(BinaryNameMapper nameMapper, BinaryIdMapper m /** * @throws Exception If failed. */ + @Test public void testOverrideNameMapperSimpleNameMapper() throws Exception { checkOverrideNameMapper(new BinaryBasicNameMapper(true), new BinaryBasicIdMapper(true)); } @@ -314,6 +325,7 @@ public void testOverrideNameMapperSimpleNameMapper() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOverrideNameMapperFullNameMapper() throws Exception { checkOverrideNameMapper(new BinaryBasicNameMapper(false), new BinaryBasicIdMapper(false)); } @@ -360,6 +372,7 @@ private void checkOverrideNameMapper(BinaryNameMapper nameMapper, BinaryIdMapper /** * @throws Exception If failed. */ + @Test public void testClassNamesJarFullNameMapper() throws Exception { checkClassNamesJar(new BinaryBasicNameMapper(false), new BinaryBasicIdMapper(false)); } @@ -367,6 +380,7 @@ public void testClassNamesJarFullNameMapper() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClassNamesJarSimpleNameMapper() throws Exception { checkClassNamesJar(new BinaryBasicNameMapper(true), new BinaryBasicIdMapper(true)); } @@ -396,6 +410,7 @@ private void checkClassNamesJar(BinaryNameMapper nameMapper, BinaryIdMapper idMa /** * @throws Exception If failed. */ + @Test public void testClassNamesWithCustomMapperJar() throws Exception { BinaryMarshaller marsh = binaryMarshaller(new BinaryBasicNameMapper(false), new BinaryIdMapper() { @Override public int typeId(String clsName) { @@ -431,6 +446,7 @@ else if (clsName.endsWith("2")) /** * @throws Exception If failed. */ + @Test public void testTypeConfigurationsJarSimpleNameMapper() throws Exception { checkTypeConfigurationJar(new BinaryBasicNameMapper(true), new BinaryBasicIdMapper(true)); } @@ -438,6 +454,7 @@ public void testTypeConfigurationsJarSimpleNameMapper() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTypeConfigurationsJarFullNameMapper() throws Exception { checkTypeConfigurationJar(new BinaryBasicNameMapper(false), new BinaryBasicIdMapper(false)); } @@ -468,6 +485,7 @@ private void checkTypeConfigurationJar(BinaryNameMapper nameMapper, BinaryIdMapp /** * @throws Exception If failed. */ + @Test public void testTypeConfigurationsWithGlobalMapperJar() throws Exception { BinaryMarshaller marsh = binaryMarshaller(new BinaryBasicNameMapper(false), new BinaryIdMapper() { @Override public int typeId(String clsName) { @@ -503,6 +521,7 @@ else if (clsName.endsWith("2")) /** * @throws Exception If failed. */ + @Test public void testTypeConfigurationsWithNonGlobalMapperJar() throws Exception { BinaryMarshaller marsh = binaryMarshaller(new BinaryBasicNameMapper(false), new BinaryIdMapper() { @Override public int typeId(String clsName) { @@ -538,6 +557,7 @@ else if (clsName.endsWith("2")) /** * @throws Exception If failed. */ + @Test public void testOverrideJarSimpleNameMapper() throws Exception { checkOverrideJar(new BinaryBasicNameMapper(true), new BinaryBasicIdMapper(true)); } @@ -545,6 +565,7 @@ public void testOverrideJarSimpleNameMapper() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOverrideJarFullNameMapper() throws Exception { checkOverrideJar(new BinaryBasicNameMapper(false), new BinaryBasicIdMapper(false)); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/GridDefaultBinaryMappersBinaryMetaDataSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/GridDefaultBinaryMappersBinaryMetaDataSelfTest.java index 39ffa2984eeec..6f316c1dccaa2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/GridDefaultBinaryMappersBinaryMetaDataSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/GridDefaultBinaryMappersBinaryMetaDataSelfTest.java @@ -94,6 +94,7 @@ protected IgniteBinary binaries() { /** * @throws Exception If failed. */ + @Test public void testGetAll() throws Exception { binaries().toBinary(new TestObject2()); @@ -154,6 +155,7 @@ else if (expectedTypeName(TestObject2.class.getName()).equals(meta.typeName())) /** * @throws Exception If failed. */ + @Test public void testNoConfiguration() throws Exception { binaries().toBinary(new TestObject3()); @@ -163,6 +165,7 @@ public void testNoConfiguration() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReflection() throws Exception { BinaryType meta = binaries().type(TestObject1.class); @@ -207,6 +210,7 @@ private String expectedTypeName(String clsName) { /** * @throws Exception If failed. */ + @Test public void testBinaryMarshalAware() throws Exception { binaries().toBinary(new TestObject2()); @@ -240,6 +244,7 @@ public void testBinaryMarshalAware() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMerge() throws Exception { binaries().toBinary(new TestObject2()); @@ -281,6 +286,7 @@ public void testMerge() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSerializedObject() throws Exception { TestObject1 obj = new TestObject1(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/streams/AbstractBinaryStreamByteOrderSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/streams/AbstractBinaryStreamByteOrderSelfTest.java index c68a8862aba4e..10f8a9ded2f35 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/streams/AbstractBinaryStreamByteOrderSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/streams/AbstractBinaryStreamByteOrderSelfTest.java @@ -64,6 +64,7 @@ public abstract class AbstractBinaryStreamByteOrderSelfTest extends GridCommonAb /** * @throws Exception If failed. */ + @Test public void testShort() throws Exception { short val = (short)RND.nextLong(); @@ -109,6 +110,7 @@ public void testShort() throws Exception { /** * @throws Exception If failed. */ + @Test public void testShortArray() throws Exception { short[] arr = new short[ARR_LEN]; @@ -128,6 +130,7 @@ public void testShortArray() throws Exception { /** * @throws Exception If failed. */ + @Test public void testChar() throws Exception { char val = (char)RND.nextLong(); @@ -157,6 +160,7 @@ public void testChar() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCharArray() throws Exception { char[] arr = new char[ARR_LEN]; @@ -176,6 +180,7 @@ public void testCharArray() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInt() throws Exception { int val = RND.nextInt(); @@ -228,6 +233,7 @@ public void testInt() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIntArray() throws Exception { int[] arr = new int[ARR_LEN]; @@ -247,6 +253,7 @@ public void testIntArray() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLong() throws Exception { long val = RND.nextLong(); @@ -283,6 +290,7 @@ public void testLong() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLongArray() throws Exception { long[] arr = new long[ARR_LEN]; @@ -302,6 +310,7 @@ public void testLongArray() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFloat() throws Exception { float val = RND.nextFloat(); @@ -330,6 +339,7 @@ public void testFloat() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFloatArray() throws Exception { float[] arr = new float[ARR_LEN]; @@ -349,6 +359,7 @@ public void testFloatArray() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDouble() throws Exception { double val = RND.nextDouble(); @@ -377,6 +388,7 @@ public void testDouble() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDoubleArray() throws Exception { double[] arr = new double[ARR_LEN]; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/streams/BinaryAbstractOutputStreamTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/streams/BinaryAbstractOutputStreamTest.java index ed1d3d65ad19d..ed70cb6606b58 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/streams/BinaryAbstractOutputStreamTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/streams/BinaryAbstractOutputStreamTest.java @@ -26,6 +26,7 @@ public class BinaryAbstractOutputStreamTest extends GridCommonAbstractTest { /** * */ + @Test public void testCapacity() { assertEquals(256, BinaryAbstractOutputStream.capacity(0, 1)); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/commandline/CommandHandlerParsingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/commandline/CommandHandlerParsingTest.java index e5ff639e894fd..473a222e49870 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/commandline/CommandHandlerParsingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/commandline/CommandHandlerParsingTest.java @@ -61,6 +61,7 @@ public class CommandHandlerParsingTest extends TestCase { /** * validate_indexes command arguments parsing and validation */ + @Test public void testValidateIndexArguments() { CommandHandler hnd = new CommandHandler(); @@ -143,6 +144,7 @@ public void testValidateIndexArguments() { /** * Test that experimental command (i.e. WAL command) is disabled by default. */ + @Test public void testExperimentalCommandIsDisabled() { System.clearProperty(IGNITE_ENABLE_EXPERIMENTAL_COMMAND); @@ -170,6 +172,7 @@ public void testExperimentalCommandIsDisabled() { /** * Tests parsing and validation for the SSL arguments. */ + @Test public void testParseAndValidateSSLArguments() { CommandHandler hnd = new CommandHandler(); @@ -208,6 +211,7 @@ public void testParseAndValidateSSLArguments() { /** * Tests parsing and validation for user and password arguments. */ + @Test public void testParseAndValidateUserAndPassword() { CommandHandler hnd = new CommandHandler(); @@ -244,6 +248,7 @@ public void testParseAndValidateUserAndPassword() { /** * Tests parsing and validation of WAL commands. */ + @Test public void testParseAndValidateWalActions() { CommandHandler hnd = new CommandHandler(); @@ -283,6 +288,7 @@ public void testParseAndValidateWalActions() { /** * Tests that the auto confirmation flag was correctly parsed. */ + @Test public void testParseAutoConfirmationFlag() { CommandHandler hnd = new CommandHandler(); @@ -344,6 +350,7 @@ public void testParseAutoConfirmationFlag() { * Tests host and port arguments. * Tests connection settings arguments. */ + @Test public void testConnectionSettings() { CommandHandler hnd = new CommandHandler(); @@ -398,6 +405,7 @@ public void testConnectionSettings() { /** * test parsing dump transaction arguments */ + @Test public void testTransactionArguments() { CommandHandler hnd = new CommandHandler(); Arguments args; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/direct/stream/v2/DirectByteBufferStreamImplV2ByteOrderSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/direct/stream/v2/DirectByteBufferStreamImplV2ByteOrderSelfTest.java index 710e4454562c9..4ad50d88cbfbb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/direct/stream/v2/DirectByteBufferStreamImplV2ByteOrderSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/direct/stream/v2/DirectByteBufferStreamImplV2ByteOrderSelfTest.java @@ -92,6 +92,7 @@ private static DirectByteBufferStreamImplV2 createStream(ByteBuffer buff) { /** * */ + @Test public void testShortArray() { short[] arr = new short[ARR_LEN]; @@ -111,6 +112,7 @@ public void testShortArray() { /** * */ + @Test public void testCharArray() { char[] arr = new char[ARR_LEN]; @@ -130,6 +132,7 @@ public void testCharArray() { /** * */ + @Test public void testIntArray() { int[] arr = new int[ARR_LEN]; @@ -149,6 +152,7 @@ public void testIntArray() { /** * */ + @Test public void testLongArray() { long[] arr = new long[ARR_LEN]; @@ -168,6 +172,7 @@ public void testLongArray() { /** * */ + @Test public void testFloatArray() { float[] arr = new float[ARR_LEN]; @@ -187,6 +192,7 @@ public void testFloatArray() { /** * */ + @Test public void testDoubleArray() { double[] arr = new double[ARR_LEN]; @@ -206,6 +212,7 @@ public void testDoubleArray() { /** * */ + @Test public void testCharArrayInternal() { char[] arr = new char[ARR_LEN]; @@ -226,6 +233,7 @@ public void testCharArrayInternal() { /** * */ + @Test public void testShortArrayInternal() { short[] arr = new short[ARR_LEN]; @@ -246,6 +254,7 @@ public void testShortArrayInternal() { /** * */ + @Test public void testIntArrayInternal() { int[] arr = new int[ARR_LEN]; @@ -266,6 +275,7 @@ public void testIntArrayInternal() { /** * */ + @Test public void testLongArrayInternal() { long[] arr = new long[ARR_LEN]; @@ -286,6 +296,7 @@ public void testLongArrayInternal() { /** * */ + @Test public void testFloatArrayInternal() { float[] arr = new float[ARR_LEN]; @@ -306,6 +317,7 @@ public void testFloatArrayInternal() { /** * */ + @Test public void testDoubleArrayInternal() { double[] arr = new double[ARR_LEN]; @@ -519,4 +531,4 @@ else if (arr.getClass().getComponentType() == double.class) else throw new IllegalArgumentException("Unsupported array type"); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheBigEntryTest.java b/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheBigEntryTest.java index deb72e474efe6..d370c46c7de5b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheBigEntryTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheBigEntryTest.java @@ -47,6 +47,7 @@ public class EncryptedCacheBigEntryTest extends AbstractEncryptionTest { } /** @throws Exception If failed. */ + @Test public void testCreateEncryptedCacheWithBigEntry() throws Exception { T2 grids = startTestGrids(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheCreateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheCreateTest.java index d9958e45c6b32..9d5fbcb9b0aad 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheCreateTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheCreateTest.java @@ -74,6 +74,7 @@ public class EncryptedCacheCreateTest extends AbstractEncryptionTest { } /** @throws Exception If failed. */ + @Test public void testCreateEncryptedCache() throws Exception { CacheConfiguration ccfg = new CacheConfiguration<>(ENCRYPTED_CACHE); @@ -95,6 +96,7 @@ public void testCreateEncryptedCache() throws Exception { } /** @throws Exception If failed. */ + @Test public void testCreateEncryptedNotPersistedCacheFail() throws Exception { GridTestUtils.assertThrowsWithCause(() -> { CacheConfiguration ccfg = new CacheConfiguration<>(NO_PERSISTENCE_REGION); @@ -107,6 +109,7 @@ public void testCreateEncryptedNotPersistedCacheFail() throws Exception { } /** @throws Exception If failed. */ + @Test public void testPersistedContentEncrypted() throws Exception { IgniteCache enc = grid(0).createCache( new CacheConfiguration(ENCRYPTED_CACHE) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheDestroyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheDestroyTest.java index 11855ecbdb602..bab4a3eae6973 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheDestroyTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheDestroyTest.java @@ -39,6 +39,7 @@ public class EncryptedCacheDestroyTest extends AbstractEncryptionTest { /** * @throws Exception If failed. */ + @Test public void testEncryptedCacheDestroy() throws Exception { T2 grids = startTestGrids(true); @@ -62,6 +63,7 @@ public void testEncryptedCacheDestroy() throws Exception { /** * @throws Exception If failed. */ + @Test public void testEncryptedCacheFromGroupDestroy() throws Exception { T2 grids = startTestGrids(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheGroupCreateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheGroupCreateTest.java index 56f578d21e1b2..aaaaa21cbf2bf 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheGroupCreateTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheGroupCreateTest.java @@ -53,6 +53,7 @@ public class EncryptedCacheGroupCreateTest extends AbstractEncryptionTest { } /** @throws Exception If failed. */ + @Test public void testCreateEncryptedCacheGroup() throws Exception { KeystoreEncryptionKey key = createEncryptedCache(ENCRYPTED_CACHE, ENCRYPTED_GROUP); @@ -78,6 +79,7 @@ public void testCreateEncryptedCacheGroup() throws Exception { } /** @throws Exception If failed. */ + @Test public void testCreateNotEncryptedCacheInEncryptedGroupFails() throws Exception { createEncryptedCache(ENCRYPTED_CACHE + "3", ENCRYPTED_GROUP + "3"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheNodeJoinTest.java b/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheNodeJoinTest.java index 41a250cb3d6fa..07fbd1c38892e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheNodeJoinTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheNodeJoinTest.java @@ -105,6 +105,7 @@ protected CacheConfiguration cacheConfiguration(String gridName) { } /** */ + @Test public void testNodeCantJoinWithoutEncryptionSpi() throws Exception { startGrid(GRID_0); @@ -119,6 +120,7 @@ public void testNodeCantJoinWithoutEncryptionSpi() throws Exception { } /** */ + @Test public void testNodeCantJoinWithDifferentKeyStore() throws Exception { startGrid(GRID_0); @@ -133,6 +135,7 @@ public void testNodeCantJoinWithDifferentKeyStore() throws Exception { } /** */ + @Test public void testNodeCanJoin() throws Exception { startGrid(GRID_0); @@ -140,6 +143,7 @@ public void testNodeCanJoin() throws Exception { } /** */ + @Test public void testNodeCantJoinWithDifferentCacheKeys() throws Exception { IgniteEx grid0 = startGrid(GRID_0); startGrid(GRID_3); @@ -168,6 +172,7 @@ public void testNodeCantJoinWithDifferentCacheKeys() throws Exception { } /** */ + @Test public void testThirdNodeCanJoin() throws Exception { IgniteEx grid0 = startGrid(GRID_0); @@ -187,6 +192,7 @@ public void testThirdNodeCanJoin() throws Exception { } /** */ + @Test public void testClientNodeJoin() throws Exception { IgniteEx grid0 = startGrid(GRID_0); @@ -200,6 +206,7 @@ public void testClientNodeJoin() throws Exception { } /** */ + @Test public void testNodeCantJoinWithSameNameButNotEncCache() throws Exception { configureCache = true; @@ -218,6 +225,7 @@ public void testNodeCantJoinWithSameNameButNotEncCache() throws Exception { } /** */ + @Test public void testNodeCantJoinWithSameNameButEncCache() throws Exception { configureCache = true; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCachePreconfiguredRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCachePreconfiguredRestartTest.java index 2e1334038ee1b..5b53f1bea6f15 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCachePreconfiguredRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCachePreconfiguredRestartTest.java @@ -41,6 +41,7 @@ public class EncryptedCachePreconfiguredRestartTest extends EncryptedCacheRestar } /** @throws Exception If failed. */ + @Test public void testDifferentPreconfiguredCachesOnNodes() throws Exception { differentCachesOnNodes = true; @@ -48,7 +49,8 @@ public void testDifferentPreconfiguredCachesOnNodes() throws Exception { } /** {@inheritDoc} */ - @Override public void testCreateEncryptedCache() throws Exception { + @Override @Test + public void testCreateEncryptedCache() throws Exception { differentCachesOnNodes = false; super.testCreateEncryptedCache(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheRestartTest.java index 2b010720aecf3..f5b7b10b223aa 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheRestartTest.java @@ -37,6 +37,7 @@ public class EncryptedCacheRestartTest extends AbstractEncryptionTest { } /** @throws Exception If failed. */ + @Test public void testCreateEncryptedCache() throws Exception { T2 grids = startTestGrids(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerLocalMessageListenerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerLocalMessageListenerSelfTest.java index b88eef9e417d1..92b66e7cf17ce 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerLocalMessageListenerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerLocalMessageListenerSelfTest.java @@ -85,6 +85,7 @@ public class GridManagerLocalMessageListenerSelfTest extends GridCommonAbstractT /** * @throws Exception If failed. */ + @Test public void testSendMessage() throws Exception { startGridsMultiThreaded(2); @@ -121,6 +122,7 @@ public void testSendMessage() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAddLocalMessageListener() throws Exception { startGrid(); @@ -136,6 +138,7 @@ public void testAddLocalMessageListener() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemoveLocalMessageListener() throws Exception { startGrid(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerMxBeanIllegalArgumentHandleTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerMxBeanIllegalArgumentHandleTest.java index 0276abdff2aa2..1ad8c253d0769 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerMxBeanIllegalArgumentHandleTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerMxBeanIllegalArgumentHandleTest.java @@ -102,6 +102,7 @@ public class GridManagerMxBeanIllegalArgumentHandleTest extends TestCase { } /** Creates minimal disco manager mock, checks illegal state is not propagated */ + @Test public void testIllegalStateIsCatch() { final IgniteConfiguration cfg = new IgniteConfiguration(); cfg.setDiscoverySpi(new TcpDiscoverySpi()); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerStopSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerStopSelfTest.java index a8f96ead04f1a..0feee2118bf4f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerStopSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerStopSelfTest.java @@ -87,6 +87,7 @@ private void injectLogger(IgniteSpi target) throws IgniteCheckedException { /** * @throws Exception If failed. */ + @Test public void testStopCheckpointManager() throws Exception { SharedFsCheckpointSpi spi = new SharedFsCheckpointSpi(); @@ -102,6 +103,7 @@ public void testStopCheckpointManager() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStopCollisionManager() throws Exception { CollisionSpi spi = new FifoQueueCollisionSpi(); @@ -117,6 +119,7 @@ public void testStopCollisionManager() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStopCommunicationManager() throws Exception { CommunicationSpi spi = new TcpCommunicationSpi(); @@ -135,6 +138,7 @@ public void testStopCommunicationManager() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStopDeploymentManager() throws Exception { DeploymentSpi spi = new LocalDeploymentSpi(); @@ -150,6 +154,7 @@ public void testStopDeploymentManager() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStopDiscoveryManager() throws Exception { DiscoverySpi spi = new TcpDiscoverySpi(); @@ -165,6 +170,7 @@ public void testStopDiscoveryManager() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStopEventStorageManager() throws Exception { EventStorageSpi spi = new MemoryEventStorageSpi(); @@ -180,6 +186,7 @@ public void testStopEventStorageManager() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStopFailoverManager() throws Exception { AlwaysFailoverSpi spi = new AlwaysFailoverSpi(); @@ -195,6 +202,7 @@ public void testStopFailoverManager() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStopLoadBalancingManager() throws Exception { RoundRobinLoadBalancingSpi spi = new RoundRobinLoadBalancingSpi(); @@ -206,4 +214,4 @@ public void testStopLoadBalancingManager() throws Exception { mgr.stop(true); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/GridNoopManagerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/GridNoopManagerSelfTest.java index 795bda41fe069..2670c68e9eb62 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/GridNoopManagerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/GridNoopManagerSelfTest.java @@ -35,6 +35,7 @@ public class GridNoopManagerSelfTest extends GridCommonAbstractTest { /** * */ + @Test public void testEnabledManager() throws IgniteCheckedException { GridTestKernalContext ctx = new GridTestKernalContext(new GridStringLogger()); @@ -96,4 +97,4 @@ private static class Spi extends IgniteSpiAdapter implements TestSpi { private static class NoopSpi extends Spi { // No-op. } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/IgniteDiagnosticMessagesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/IgniteDiagnosticMessagesTest.java index 69bc6e9e16531..be5b432f12610 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/IgniteDiagnosticMessagesTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/IgniteDiagnosticMessagesTest.java @@ -121,6 +121,7 @@ public class IgniteDiagnosticMessagesTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testDiagnosticMessages1() throws Exception { checkBasicDiagnosticInfo(); } @@ -128,6 +129,7 @@ public void testDiagnosticMessages1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDiagnosticMessages2() throws Exception { connectionsPerNode = 5; @@ -137,6 +139,7 @@ public void testDiagnosticMessages2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLongRunning() throws Exception { System.setProperty(IGNITE_LONG_OPERATIONS_DUMP_TIMEOUT, "3500"); @@ -198,6 +201,7 @@ public void testLongRunning() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSeveralLongRunningTxs() throws Exception { int timeout = 3500; @@ -306,6 +310,7 @@ private int countTxKeysInASingleBlock(String log) { /** * @throws Exception If failed. */ + @Test public void testLongRunningTx() throws Exception { final int longOpDumpTimeout = 1000; @@ -403,6 +408,7 @@ public void testLongRunningTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemoteTx() throws Exception { int timeout = 3500; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/checkpoint/GridCheckpointManagerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/checkpoint/GridCheckpointManagerSelfTest.java index 414d05c765877..ef7aaf9257097 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/checkpoint/GridCheckpointManagerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/checkpoint/GridCheckpointManagerSelfTest.java @@ -27,6 +27,7 @@ public class GridCheckpointManagerSelfTest extends GridCheckpointManagerAbstract /** * @throws Exception Thrown if any exception occurs. */ + @Test public void testCacheBased() throws Exception { doTest("cache"); } @@ -34,6 +35,7 @@ public void testCacheBased() throws Exception { /** * @throws Exception Thrown if any exception occurs. */ + @Test public void testSharedFsBased() throws Exception { doTest("sharedfs"); } @@ -41,6 +43,7 @@ public void testSharedFsBased() throws Exception { /** * @throws Exception Thrown if any exception occurs. */ + @Test public void testDatabaseBased() throws Exception { doTest("jdbc"); } @@ -48,6 +51,7 @@ public void testDatabaseBased() throws Exception { /** * @throws Exception Thrown if any exception occurs. */ + @Test public void testMultiNodeCacheBased() throws Exception { doMultiNodeTest("cache"); } @@ -55,6 +59,7 @@ public void testMultiNodeCacheBased() throws Exception { /** * @throws Exception Thrown if any exception occurs. */ + @Test public void testMultiNodeSharedFsBased() throws Exception { doMultiNodeTest("sharedfs"); } @@ -62,7 +67,8 @@ public void testMultiNodeSharedFsBased() throws Exception { /** * @throws Exception Thrown if any exception occurs. */ + @Test public void testMultiNodeDatabaseBased() throws Exception { doMultiNodeTest("jdbc"); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/checkpoint/GridCheckpointTaskSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/checkpoint/GridCheckpointTaskSelfTest.java index e36f54a77a9e7..1653fadc2b298 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/checkpoint/GridCheckpointTaskSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/checkpoint/GridCheckpointTaskSelfTest.java @@ -122,6 +122,7 @@ private DiscoverySpi discoverySpi() { /** * @throws Exception If failed. */ + @Test public void testFailover() throws Exception { grid(1).compute().execute(FailoverTestTask.class, null); } @@ -129,6 +130,7 @@ public void testFailover() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReduce() throws Exception { grid(1).compute().execute(ReduceTestTask.class, null); } @@ -238,4 +240,4 @@ private static class ReduceTestTask extends ComputeTaskAdapter { return null; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridCommunicationManagerListenersSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridCommunicationManagerListenersSelfTest.java index 8b69c199e5735..9412a653b4688 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridCommunicationManagerListenersSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridCommunicationManagerListenersSelfTest.java @@ -47,6 +47,7 @@ public GridCommunicationManagerListenersSelfTest() { /** * Works fine. */ + @Test public void testDifferentListeners() { Ignite ignite = G.ignite(getTestIgniteInstanceName()); @@ -67,6 +68,7 @@ public void testDifferentListeners() { /** * Fails on the 1001st time. */ + @Test public void testMultipleExecutionsWithoutListeners() { checkLoop(1001); } @@ -75,6 +77,7 @@ public void testMultipleExecutionsWithoutListeners() { * This is the workaround- as long as we keep a message listener in * the stack, our FIFO bug isn't exposed. Comment above out to see. */ + @Test public void testOneListener() { Ignite ignite = G.ignite(getTestIgniteInstanceName()); @@ -99,6 +102,7 @@ public void testOneListener() { * Now, our test will fail on the first message added after our safety * message listener has been removed. */ + @Test public void testSingleExecutionWithoutListeners() { checkLoop(1); } @@ -161,4 +165,4 @@ private static class MessageListeningTask extends ComputeTaskSplitAdapter() { @Override public Object call() throws Exception { @@ -101,6 +102,7 @@ public void testSendIfOneOfNodesIsLocalAndTopicIsEnum() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSendUserMessageThinVersionIfOneOfNodesIsLocal() throws Exception { Object msg = new Object(); @@ -125,6 +127,7 @@ public void testSendUserMessageThinVersionIfOneOfNodesIsLocal() throws Exception /** * @throws Exception If failed. */ + @Test public void testSendUserMessageUnorderedThickVersionIfOneOfNodesIsLocal() throws Exception { Object msg = new Object(); @@ -149,6 +152,7 @@ public void testSendUserMessageUnorderedThickVersionIfOneOfNodesIsLocal() throws /** * @throws Exception If failed. */ + @Test public void testSendUserMessageOrderedThickVersionIfOneOfNodesIsLocal() throws Exception { Object msg = new Object(); @@ -243,4 +247,4 @@ private static class TestMessage implements Message { return 0; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/IgniteCommunicationBalanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/IgniteCommunicationBalanceTest.java index 666bc1dfbf6c2..7aed3ef99ab9c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/IgniteCommunicationBalanceTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/IgniteCommunicationBalanceTest.java @@ -109,6 +109,7 @@ protected int connectionsPerNode() { /** * @throws Exception If failed. */ + @Test public void testBalance1() throws Exception { if (sslEnabled()) return; @@ -210,6 +211,7 @@ public void testBalance1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBalance2() throws Exception { System.setProperty(IgniteSystemProperties.IGNITE_IO_BALANCE_PERIOD, "1000"); @@ -317,6 +319,7 @@ private void waitNioBalanceStop(List nodes, long timeout) throws Excepti /** * @throws Exception If failed. */ + @Test public void testRandomBalance() throws Exception { System.setProperty(GridNioServer.IGNITE_IO_BALANCE_RANDOM_BALANCE, "true"); System.setProperty(IgniteSystemProperties.IGNITE_IO_BALANCE_PERIOD, "500"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/IgniteIoTestMessagesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/IgniteIoTestMessagesTest.java index 65231e7097222..b21865585b557 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/IgniteIoTestMessagesTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/IgniteIoTestMessagesTest.java @@ -66,6 +66,7 @@ public class IgniteIoTestMessagesTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testIoTestMessages() throws Exception { for (Ignite node : G.allGrids()) { IgniteKernal ignite = (IgniteKernal)node; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/IgniteVariousConnectionNumberTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/IgniteVariousConnectionNumberTest.java index 2ea1f90b854ff..e41e6a1514809 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/IgniteVariousConnectionNumberTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/IgniteVariousConnectionNumberTest.java @@ -86,6 +86,7 @@ public class IgniteVariousConnectionNumberTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testVariousConnectionNumber() throws Exception { startGridsMultiThreaded(3); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/GridDeploymentManagerStopSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/GridDeploymentManagerStopSelfTest.java index 1d1a20a20c5bd..1c4e893ba257c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/GridDeploymentManagerStopSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/GridDeploymentManagerStopSelfTest.java @@ -39,6 +39,7 @@ public class GridDeploymentManagerStopSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testOnKernalStop() throws Exception { DeploymentSpi spi = new GridTestDeploymentSpi(); @@ -106,4 +107,4 @@ private static class GridTestDeploymentSpi implements DeploymentSpi { /** {@inheritDoc} */ @Override public void onClientReconnected(boolean clusterRestarted) { /* No-op. */ } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/GridDeploymentMessageCountSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/GridDeploymentMessageCountSelfTest.java index e6905d89048ee..1f096ca5a6b00 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/GridDeploymentMessageCountSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/GridDeploymentMessageCountSelfTest.java @@ -85,6 +85,7 @@ public class GridDeploymentMessageCountSelfTest extends GridCommonAbstractTest { } /** {@inheritDoc} */ + @Test public void testTaskDeployment() throws Exception { ClassLoader ldr = getExternalClassLoader(); @@ -124,6 +125,7 @@ public void testTaskDeployment() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheValueDeploymentOnPut() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-4551"); @@ -211,4 +213,4 @@ private boolean isDeploymentMessage(GridIoMessage msg) { return dep; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManagerAliveCacheSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManagerAliveCacheSelfTest.java index 8fad6404f1936..857e4044ff43e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManagerAliveCacheSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManagerAliveCacheSelfTest.java @@ -159,6 +159,7 @@ private void doTestAlive() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAlives() throws Exception { clientMode = false; @@ -168,6 +169,7 @@ public void testAlives() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAlivesClient() throws Exception { clientMode = true; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManagerAttributesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManagerAttributesSelfTest.java index d19ae72c9764f..8d56bfd118cb2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManagerAttributesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManagerAttributesSelfTest.java @@ -94,6 +94,7 @@ public abstract class GridDiscoveryManagerAttributesSelfTest extends GridCommonA /** * @throws Exception If failed. */ + @Test public void testPreferIpV4StackTrue() throws Exception { testPreferIpV4Stack(true); } @@ -101,6 +102,7 @@ public void testPreferIpV4StackTrue() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPreferIpV4StackFalse() throws Exception { testPreferIpV4Stack(false); } @@ -115,6 +117,7 @@ public void testPreferIpV4StackFalse() throws Exception { * * @throws Exception If failed. */ + @Test public void testPreferIpV4StackDifferentValues() throws Exception { System.setProperty(PREFER_IPV4, "true"); @@ -136,6 +139,7 @@ public void testPreferIpV4StackDifferentValues() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUseDefaultSuid() throws Exception { try { doTestUseDefaultSuid(Boolean.TRUE.toString(), Boolean.FALSE.toString(), true); @@ -183,6 +187,7 @@ private void doTestUseDefaultSuid(String first, String second, boolean fail) thr } } + @Test public void testUseStringSerVer2() throws Exception { String old = System.getProperty(IGNITE_BINARY_MARSHALLER_USE_STRING_SERIALIZATION_VER_2); @@ -247,6 +252,7 @@ private void doTestUseStrSerVer2(String first, String second, boolean fail) thro /** * @throws Exception If failed. */ + @Test public void testSecurityCompatibilityEnabled() throws Exception { TestReconnectPluginProvider.enabled = true; TestReconnectProcessor.enabled = true; @@ -333,6 +339,7 @@ private void doTestCompatibilityEnabled(String prop, Object first, Object second /** * @throws Exception If failed. */ + @Test public void testDifferentDeploymentModes() throws Exception { IgniteEx g = startGrid(0); @@ -354,6 +361,7 @@ public void testDifferentDeploymentModes() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDifferentPeerClassLoadingEnabledFlag() throws Exception { IgniteEx g = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/IgniteTopologyPrintFormatSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/IgniteTopologyPrintFormatSelfTest.java index 4041d6e5b818a..cfa2ee6d4d2df 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/IgniteTopologyPrintFormatSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/IgniteTopologyPrintFormatSelfTest.java @@ -86,6 +86,7 @@ public class IgniteTopologyPrintFormatSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testServerLogs() throws Exception { MockLogger log = new MockLogger(); @@ -97,6 +98,7 @@ public void testServerLogs() throws Exception { /** * @throws Exception If failed. */ + @Test public void testServerDebugLogs() throws Exception { MockLogger log = new MockLogger(); @@ -138,6 +140,7 @@ private void doServerLogTest(MockLogger log) throws Exception { /** * @throws Exception If failed. */ + @Test public void testServerAndClientLogs() throws Exception { MockLogger log = new MockLogger(); @@ -149,6 +152,7 @@ public void testServerAndClientLogs() throws Exception { /** * @throws Exception If failed. */ + @Test public void testServerAndClientDebugLogs() throws Exception { MockLogger log = new MockLogger(); @@ -192,6 +196,7 @@ private void doServerAndClientTest(MockLogger log) throws Exception { /** * @throws Exception If failed. */ + @Test public void testForceServerAndClientLogs() throws Exception { MockLogger log = new MockLogger(); @@ -203,6 +208,7 @@ public void testForceServerAndClientLogs() throws Exception { /** * @throws Exception If failed. */ + @Test public void testForceServerAndClientDebugLogs() throws Exception { MockLogger log = new MockLogger(); @@ -299,4 +305,4 @@ public void clear() { logs.clear(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/events/GridEventStorageManagerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/events/GridEventStorageManagerSelfTest.java index 0479b81beb104..14c01de577cf2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/events/GridEventStorageManagerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/events/GridEventStorageManagerSelfTest.java @@ -60,6 +60,7 @@ public GridEventStorageManagerSelfTest() { /** * @throws Exception If failed. */ + @Test public void testWaitForEvent() throws Exception { Ignite ignite = grid(); @@ -92,6 +93,7 @@ public void testWaitForEvent() throws Exception { /** * @throws Exception If failed. */ + @Test public void testWaitForEventContinuationTimeout() throws Exception { Ignite ignite = grid(); @@ -111,6 +113,7 @@ public void testWaitForEventContinuationTimeout() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUserEvent() throws Exception { Ignite ignite = grid(); @@ -126,4 +129,4 @@ public void testUserEvent() throws Exception { info("Caught expected exception: " + e); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerEnumSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerEnumSelfTest.java index c7a58f74a2b6a..5325587a09391 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerEnumSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerEnumSelfTest.java @@ -37,6 +37,7 @@ public class OptimizedMarshallerEnumSelfTest extends TestCase { /** * @throws Exception If failed. */ + @Test public void testEnumSerialisation() throws Exception { OptimizedMarshaller marsh = new OptimizedMarshaller(); @@ -84,4 +85,4 @@ private enum TestEnum { public abstract String getTestString(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerNodeFailoverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerNodeFailoverTest.java index 7bd0a5d492b73..b2d1244ee8cd1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerNodeFailoverTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerNodeFailoverTest.java @@ -84,6 +84,7 @@ public class OptimizedMarshallerNodeFailoverTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testClassCacheUpdateFailover1() throws Exception { classCacheUpdateFailover(false); } @@ -91,6 +92,7 @@ public void testClassCacheUpdateFailover1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClassCacheUpdateFailover2() throws Exception { classCacheUpdateFailover(true); } @@ -141,6 +143,7 @@ private void classCacheUpdateFailover(boolean stopSrv) throws Exception { /** * @throws Exception If failed. */ + @Test public void testRestartAllNodes() throws Exception { cache = true; @@ -355,4 +358,4 @@ static class TestClass19 implements Serializable {} * */ static class TestClass20 implements Serializable {} -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerSelfTest.java index e9f4d953d5b2c..0f1bd0e8732c9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerSelfTest.java @@ -43,6 +43,7 @@ public class OptimizedMarshallerSelfTest extends GridMarshallerAbstractTest { /** * @throws Exception If failed. */ + @Test public void testTestMarshalling() throws Exception { final String msg = "PASSED"; @@ -70,6 +71,7 @@ public void testTestMarshalling() throws Exception { * * @throws IgniteCheckedException If marshalling failed. */ + @Test public void testMarshallingSelfLink() throws IgniteCheckedException { SelfLink sl = new SelfLink("a string 1"); @@ -83,6 +85,7 @@ public void testMarshallingSelfLink() throws IgniteCheckedException { /** * @throws Exception If failed. */ + @Test public void testInvalid() throws Exception { GridTestUtils.assertThrows( log, @@ -105,6 +108,7 @@ public void testInvalid() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNested() throws Exception { NestedTestObject obj = new NestedTestObject("String", 100); @@ -280,4 +284,4 @@ public void link(SelfLink link) { this.link = link; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerSerialPersistentFieldsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerSerialPersistentFieldsSelfTest.java index 5a9d10cd1fe61..defb804001a88 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerSerialPersistentFieldsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerSerialPersistentFieldsSelfTest.java @@ -38,6 +38,7 @@ public class OptimizedMarshallerSerialPersistentFieldsSelfTest extends GridMars /** * @throws Exception If failed. */ + @Test public void testOptimizedMarshaller() throws Exception { unmarshal(marshal(new TestClass())); @@ -113,4 +114,4 @@ private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundEx s.readObject(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerTest.java b/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerTest.java index c0997b1ff5040..dbbd82ebd1b01 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerTest.java @@ -68,6 +68,7 @@ private OptimizedMarshaller marshaller() { * * @throws IgniteCheckedException If marshalling failed. */ + @Test public void testNonSerializable() throws IgniteCheckedException { OptimizedMarshaller marsh = marshaller(); @@ -83,6 +84,7 @@ public void testNonSerializable() throws IgniteCheckedException { * * @throws IgniteCheckedException If marshalling failed. */ + @Test public void testNonSerializable1() throws IgniteCheckedException { OptimizedMarshaller marsh = marshaller(); @@ -104,6 +106,7 @@ public void testNonSerializable1() throws IgniteCheckedException { * * @throws IgniteCheckedException If marshalling failed. */ + @Test public void testNonSerializable2() throws IgniteCheckedException { OptimizedMarshaller marsh = marshaller(); @@ -137,6 +140,7 @@ public void testNonSerializable2() throws IgniteCheckedException { * * @throws IgniteCheckedException If marshalling failed. */ + @Test public void testNonSerializable3() throws IgniteCheckedException { OptimizedMarshaller marsh = marshaller(); @@ -154,6 +158,7 @@ public void testNonSerializable3() throws IgniteCheckedException { * * @throws IgniteCheckedException If marshalling failed. */ + @Test public void testNonSerializable4() throws IgniteCheckedException { OptimizedMarshaller marsh = marshaller(); @@ -173,6 +178,7 @@ public void testNonSerializable4() throws IgniteCheckedException { * * @throws IgniteCheckedException If marshalling failed. */ + @Test public void testNonSerializable5() throws IgniteCheckedException { Marshaller marsh = marshaller(); @@ -188,6 +194,7 @@ public void testNonSerializable5() throws IgniteCheckedException { * * @throws IgniteCheckedException If marshalling failed. */ + @Test public void testSerializable() throws IgniteCheckedException { Marshaller marsh = marshaller(); @@ -199,6 +206,7 @@ public void testSerializable() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testSerializableAfterChangingValue() throws IgniteCheckedException { Marshaller marsh = marshaller(); @@ -220,6 +228,7 @@ public void testSerializableAfterChangingValue() throws IgniteCheckedException { * * @throws IgniteCheckedException If marshalling failed. */ + @Test public void testExternalizable() throws IgniteCheckedException { Marshaller marsh = marshaller(); @@ -233,6 +242,7 @@ public void testExternalizable() throws IgniteCheckedException { /** * Tests {@link OptimizedMarshaller#setRequireSerializable(boolean)}. */ + @Test public void testRequireSerializable() { OptimizedMarshaller marsh = marshaller(); @@ -253,6 +263,7 @@ public void testRequireSerializable() { * * @throws IgniteCheckedException If marshalling failed. */ + @Test public void testProxy() throws IgniteCheckedException { OptimizedMarshaller marsh = marshaller(); @@ -286,6 +297,7 @@ public void testProxy() throws IgniteCheckedException { /** * @throws Exception If failed. */ + @Test public void testDescriptorCache() throws Exception { try { Ignite ignite = startGridsMultiThreaded(2); @@ -322,6 +334,7 @@ public void testDescriptorCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPerformance() throws Exception { System.gc(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedObjectStreamSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedObjectStreamSelfTest.java index 3c50c00428674..a88e11d0dac46 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedObjectStreamSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedObjectStreamSelfTest.java @@ -84,6 +84,7 @@ public class OptimizedObjectStreamSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testNull() throws Exception { assertNull(marshalUnmarshal(null)); } @@ -91,6 +92,7 @@ public void testNull() throws Exception { /** * @throws Exception If failed. */ + @Test public void testByte() throws Exception { byte val = 10; @@ -100,6 +102,7 @@ public void testByte() throws Exception { /** * @throws Exception If failed. */ + @Test public void testShort() throws Exception { short val = 100; @@ -109,6 +112,7 @@ public void testShort() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInteger() throws Exception { int val = 100; @@ -118,6 +122,7 @@ public void testInteger() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLong() throws Exception { long val = 1000L; @@ -127,6 +132,7 @@ public void testLong() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFloat() throws Exception { float val = 10.0f; @@ -136,6 +142,7 @@ public void testFloat() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDouble() throws Exception { double val = 100.0d; @@ -145,6 +152,7 @@ public void testDouble() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBoolean() throws Exception { assertEquals(Boolean.TRUE, marshalUnmarshal(Boolean.TRUE)); @@ -154,6 +162,7 @@ public void testBoolean() throws Exception { /** * @throws Exception If failed. */ + @Test public void testChar() throws Exception { char val = 10; @@ -163,6 +172,7 @@ public void testChar() throws Exception { /** * @throws Exception If failed. */ + @Test public void testByteArray() throws Exception { byte[] arr = marshalUnmarshal(new byte[] {1, 2}); @@ -172,6 +182,7 @@ public void testByteArray() throws Exception { /** * @throws Exception If failed. */ + @Test public void testShortArray() throws Exception { short[] arr = marshalUnmarshal(new short[] {1, 2}); @@ -181,6 +192,7 @@ public void testShortArray() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIntArray() throws Exception { int[] arr = marshalUnmarshal(new int[] {1, 2}); @@ -190,6 +202,7 @@ public void testIntArray() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLongArray() throws Exception { long[] arr = marshalUnmarshal(new long[] {1L, 2L}); @@ -199,6 +212,7 @@ public void testLongArray() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFloatArray() throws Exception { float[] arr = marshalUnmarshal(new float[] {1.0f, 2.0f}); @@ -208,6 +222,7 @@ public void testFloatArray() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDoubleArray() throws Exception { double[] arr = marshalUnmarshal(new double[] {1.0d, 2.0d}); @@ -217,6 +232,7 @@ public void testDoubleArray() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBooleanArray() throws Exception { boolean[] arr = marshalUnmarshal(new boolean[] {true, false, false}); @@ -229,6 +245,7 @@ public void testBooleanArray() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCharArray() throws Exception { char[] arr = marshalUnmarshal(new char[] {1, 2}); @@ -238,6 +255,7 @@ public void testCharArray() throws Exception { /** * @throws Exception If failed. */ + @Test public void testObject() throws Exception { TestObject obj = new TestObject(); @@ -252,6 +270,7 @@ public void testObject() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRequireSerializable() throws Exception { try { OptimizedMarshaller marsh = new OptimizedMarshaller(true); @@ -275,6 +294,7 @@ public void testRequireSerializable() throws Exception { * * @throws Exception If failed. */ + @Test public void testFailedUnmarshallingLogging() throws Exception { OptimizedMarshaller marsh = new OptimizedMarshaller(true); @@ -297,6 +317,7 @@ public void testFailedUnmarshallingLogging() throws Exception { * * @throws Exception If failed. */ + @Test public void testFailedMarshallingLogging() throws Exception { OptimizedMarshaller marsh = new OptimizedMarshaller(true); @@ -316,6 +337,7 @@ public void testFailedMarshallingLogging() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPool() throws Exception { final TestObject obj = new TestObject(); @@ -351,6 +373,7 @@ public void testPool() throws Exception { /** * @throws Exception If failed. */ + @Test public void testObjectWithNulls() throws Exception { TestObject obj = new TestObject(); @@ -363,6 +386,7 @@ public void testObjectWithNulls() throws Exception { /** * @throws Exception If failed. */ + @Test public void testObjectArray() throws Exception { TestObject obj1 = new TestObject(); @@ -390,6 +414,7 @@ public void testObjectArray() throws Exception { /** * @throws Exception If failed. */ + @Test public void testExternalizable() throws Exception { ExternalizableTestObject1 obj = new ExternalizableTestObject1(); @@ -404,6 +429,7 @@ public void testExternalizable() throws Exception { /** * @throws Exception If failed. */ + @Test public void testExternalizableWithNulls() throws Exception { ExternalizableTestObject2 obj = new ExternalizableTestObject2(); @@ -423,6 +449,7 @@ public void testExternalizableWithNulls() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLink() throws Exception { for (int i = 0; i < 20; i++) { LinkTestObject1 obj1 = new LinkTestObject1(); @@ -442,6 +469,7 @@ public void testLink() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCycleLink() throws Exception { for (int i = 0; i < 20; i++) { CycleLinkTestObject obj = new CycleLinkTestObject(); @@ -456,6 +484,7 @@ public void testCycleLink() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNoDefaultConstructor() throws Exception { NoDefaultConstructorTestObject obj = new NoDefaultConstructorTestObject(100); @@ -465,6 +494,7 @@ public void testNoDefaultConstructor() throws Exception { /** * @throws Exception If failed. */ + @Test public void testEnum() throws Exception { assertEquals(TestEnum.B, marshalUnmarshal(TestEnum.B)); @@ -476,6 +506,7 @@ public void testEnum() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCollection() throws Exception { TestObject obj1 = new TestObject(); @@ -499,6 +530,7 @@ public void testCollection() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMap() throws Exception { TestObject obj1 = new TestObject(); @@ -522,6 +554,7 @@ public void testMap() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUuid() throws Exception { UUID uuid = UUID.randomUUID(); @@ -531,6 +564,7 @@ public void testUuid() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDate() throws Exception { Date date = new Date(); @@ -540,6 +574,7 @@ public void testDate() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTransient() throws Exception { TransientTestObject obj = marshalUnmarshal(new TransientTestObject(100, 200, "str1", "str2")); @@ -552,6 +587,7 @@ public void testTransient() throws Exception { /** * @throws Exception If failed. */ + @Test public void testWriteReadObject() throws Exception { WriteReadTestObject obj = marshalUnmarshal(new WriteReadTestObject(100, "str")); @@ -562,6 +598,7 @@ public void testWriteReadObject() throws Exception { /** * @throws Exception If failed. */ + @Test public void testWriteReplace() throws Exception { ReplaceTestObject obj = marshalUnmarshal(new ReplaceTestObject(100)); @@ -571,6 +608,7 @@ public void testWriteReplace() throws Exception { /** * @throws Exception If failed. */ + @Test public void testWriteReplaceNull() throws Exception { ReplaceNullTestObject obj = marshalUnmarshal(new ReplaceNullTestObject()); @@ -580,6 +618,7 @@ public void testWriteReplaceNull() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReadResolve() throws Exception { ResolveTestObject obj = marshalUnmarshal(new ResolveTestObject(100)); @@ -589,6 +628,7 @@ public void testReadResolve() throws Exception { /** * @throws Exception If failed. */ + @Test public void testArrayDeque() throws Exception { Queue queue = new ArrayDeque<>(); @@ -608,6 +648,7 @@ public void testArrayDeque() throws Exception { /** * @throws Exception If failed. */ + @Test public void testArrayList() throws Exception { Collection list = new ArrayList<>(); @@ -620,6 +661,7 @@ public void testArrayList() throws Exception { /** * @throws Exception If failed. */ + @Test public void testHashMap() throws Exception { Map map = new HashMap<>(); @@ -632,6 +674,7 @@ public void testHashMap() throws Exception { /** * @throws Exception If failed. */ + @Test public void testHashSet() throws Exception { Collection set = new HashSet<>(); @@ -645,6 +688,7 @@ public void testHashSet() throws Exception { * @throws Exception If failed. */ @SuppressWarnings("UseOfObsoleteCollectionType") + @Test public void testHashtable() throws Exception { Map map = new Hashtable<>(); @@ -657,6 +701,7 @@ public void testHashtable() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIdentityHashMap() throws Exception { Map map = new IdentityHashMap<>(); @@ -669,6 +714,7 @@ public void testIdentityHashMap() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLinkedHashMap() throws Exception { Map map = new LinkedHashMap<>(); @@ -681,6 +727,7 @@ public void testLinkedHashMap() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLinkedHashSet() throws Exception { Collection set = new LinkedHashSet<>(); @@ -693,6 +740,7 @@ public void testLinkedHashSet() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLinkedList() throws Exception { Collection list = new LinkedList<>(); @@ -705,6 +753,7 @@ public void testLinkedList() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPriorityQueue() throws Exception { Queue queue = new PriorityQueue<>(); @@ -724,6 +773,7 @@ public void testPriorityQueue() throws Exception { /** * @throws Exception If failed. */ + @Test public void testProperties() throws Exception { Properties dflts = new Properties(); @@ -743,6 +793,7 @@ public void testProperties() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTreeMap() throws Exception { Map map = new TreeMap<>(); @@ -755,6 +806,7 @@ public void testTreeMap() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTreeSet() throws Exception { Collection set = new TreeSet<>(); @@ -768,6 +820,7 @@ public void testTreeSet() throws Exception { * @throws Exception If failed. */ @SuppressWarnings("UseOfObsoleteCollectionType") + @Test public void testVector() throws Exception { Collection vector = new Vector<>(); @@ -780,6 +833,7 @@ public void testVector() throws Exception { /** * @throws Exception If failed. */ + @Test public void testString() throws Exception { assertEquals("Latin", marshalUnmarshal("Latin")); assertEquals("Кириллица", marshalUnmarshal("Кириллица")); @@ -789,6 +843,7 @@ public void testString() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReadLine() throws Exception { OptimizedObjectInputStream in = new OptimizedObjectInputStream(new GridUnsafeDataInput()); @@ -805,6 +860,7 @@ public void testReadLine() throws Exception { /** * @throws Exception If failed. */ + @Test public void testHierarchy() throws Exception { C c = new C(100, "str", 200, "str", 300, "str"); @@ -821,6 +877,7 @@ public void testHierarchy() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInet4Address() throws Exception { Inet4Address addr = (Inet4Address)InetAddress.getByName("localhost"); @@ -830,6 +887,7 @@ public void testInet4Address() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClass() throws Exception { assertEquals(int.class, marshalUnmarshal(int.class)); assertEquals(Long.class, marshalUnmarshal(Long.class)); @@ -839,6 +897,7 @@ public void testClass() throws Exception { /** * @throws Exception If failed. */ + @Test public void testWriteReadFields() throws Exception { WriteReadFieldsTestObject obj = marshalUnmarshal(new WriteReadFieldsTestObject(100, "str")); @@ -849,6 +908,7 @@ public void testWriteReadFields() throws Exception { /** * @throws Exception If failed. */ + @Test public void testWriteFields() throws Exception { WriteFieldsTestObject obj = marshalUnmarshal(new WriteFieldsTestObject(100, "str")); @@ -859,6 +919,7 @@ public void testWriteFields() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBigInteger() throws Exception { BigInteger b = new BigInteger("54654865468745468465321414646834562346475457488"); @@ -868,6 +929,7 @@ public void testBigInteger() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBigDecimal() throws Exception { BigDecimal b = new BigDecimal("849572389457208934572093574.123512938654126458542145"); @@ -877,6 +939,7 @@ public void testBigDecimal() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSimpleDateFormat() throws Exception { SimpleDateFormat f = new SimpleDateFormat("MM/dd/yyyy"); @@ -886,6 +949,7 @@ public void testSimpleDateFormat() throws Exception { /** * @throws Exception If failed. */ + @Test public void testComplexObject() throws Exception { ComplexTestObject obj = new ComplexTestObject(); @@ -959,6 +1023,7 @@ public void testComplexObject() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReadToArray() throws Exception { OptimizedObjectInputStream in = OptimizedObjectStreamRegistry.in(); @@ -1006,6 +1071,7 @@ public void testReadToArray() throws Exception { /** * @throws Exception If failed. */ + @Test public void testHandleTableGrow() throws Exception { List c = new ArrayList<>(); @@ -1025,6 +1091,7 @@ public void testHandleTableGrow() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIncorrectExternalizable() throws Exception { GridTestUtils.assertThrows( log, @@ -1040,6 +1107,7 @@ public void testIncorrectExternalizable() throws Exception { /** * @throws Exception If failed. */ + @Test public void testExcludedClass() throws Exception { Class[] exclClasses = U.staticField(MarshallerExclusions.class, "EXCL_CLASSES"); @@ -1052,6 +1120,7 @@ public void testExcludedClass() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInet6Address() throws Exception { final InetAddress address = Inet6Address.getByAddress(new byte[16]); @@ -1061,6 +1130,7 @@ public void testInet6Address() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutFieldsWithDefaultWriteObject() throws Exception { try { marshalUnmarshal(new CustomWriteObjectMethodObject("test")); @@ -1073,6 +1143,7 @@ public void testPutFieldsWithDefaultWriteObject() throws Exception { /** * @throws Exception If failed. */ + @Test public void testThrowable() throws Exception { Throwable t = new Throwable("Throwable"); @@ -1082,6 +1153,7 @@ public void testThrowable() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNestedReadWriteObject() throws Exception { NestedReadWriteObject[] arr = new NestedReadWriteObject[5]; @@ -2321,4 +2393,4 @@ private void readObject(ObjectInputStream os){ } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/pagemem/impl/PageIdUtilsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/pagemem/impl/PageIdUtilsSelfTest.java index 8b419444815cd..215459235523e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/pagemem/impl/PageIdUtilsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/pagemem/impl/PageIdUtilsSelfTest.java @@ -30,6 +30,7 @@ public class PageIdUtilsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRotatePageId() throws Exception { assertEquals(0x0102FFFFFFFFFFFFL, PageIdUtils.rotatePageId(0x0002FFFFFFFFFFFFL)); assertEquals(0x0B02FFFFFFFFFFFFL, PageIdUtils.rotatePageId(0x0A02FFFFFFFFFFFFL)); @@ -41,6 +42,7 @@ public void testRotatePageId() throws Exception { /** * @throws Exception If failed. */ + @Test public void testEffectivePageId() throws Exception { assertEquals(0x0000FFFFFFFFFFFFL, PageIdUtils.effectivePageId(0x0002FFFFFFFFFFFFL)); assertEquals(0x0000FFFFFFFFFFFFL, PageIdUtils.effectivePageId(0x0A02FFFFFFFFFFFFL)); @@ -51,6 +53,7 @@ public void testEffectivePageId() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLinkConstruction() throws Exception { assertEquals(0x00FFFFFFFFFFFFFFL, PageIdUtils.link(0xFFFFFFFFFFFFFFL, 0)); assertEquals(0x01FFFFFFFFFFFFFFL, PageIdUtils.link(0xFFFFFFFFFFFFFFL, 1)); @@ -71,6 +74,7 @@ public void testLinkConstruction() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOffsetExtraction() throws Exception { assertEquals(0, PageIdUtils.itemId(0x00FFFFFFFFFFFFFFL)); assertEquals(1, PageIdUtils.itemId(0x01FFFFFFFFFFFFFFL)); @@ -91,6 +95,7 @@ public void testOffsetExtraction() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPageIdFromLink() throws Exception { assertEquals(0x00FFFFFFFFFFFFFFL, PageIdUtils.pageId(0x00FFFFFFFFFFFFFFL)); assertEquals(0x00FFFFFFFFFFFFFFL, PageIdUtils.pageId(0x10FFFFFFFFFFFFFFL)); @@ -121,6 +126,7 @@ public void testPageIdFromLink() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRandomIds() throws Exception { Random rnd = new Random(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/pagemem/impl/PageMemoryNoLoadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/pagemem/impl/PageMemoryNoLoadSelfTest.java index b3936341c4c00..05b037146cb88 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/pagemem/impl/PageMemoryNoLoadSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/pagemem/impl/PageMemoryNoLoadSelfTest.java @@ -59,6 +59,7 @@ public class PageMemoryNoLoadSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPageTearingInner() throws Exception { PageMemory mem = memory(); @@ -103,6 +104,7 @@ public void testPageTearingInner() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLoadedPagesCount() throws Exception { PageMemory mem = memory(); @@ -128,6 +130,7 @@ public void testLoadedPagesCount() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPageTearingSequential() throws Exception { PageMemory mem = memory(); @@ -180,6 +183,7 @@ public void testPageTearingSequential() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPageHandleDeallocation() throws Exception { PageMemory mem = memory(); @@ -207,6 +211,7 @@ public void testPageHandleDeallocation() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPageIdRotation() throws Exception { PageMemory mem = memory(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/GridCacheTxLoadFromStoreOnLockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/GridCacheTxLoadFromStoreOnLockSelfTest.java index 6293723f18ae6..6e356111c50d5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/GridCacheTxLoadFromStoreOnLockSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/GridCacheTxLoadFromStoreOnLockSelfTest.java @@ -68,6 +68,7 @@ public class GridCacheTxLoadFromStoreOnLockSelfTest extends GridCommonAbstractTe /** * @throws Exception If failed. */ + @Test public void testLoadedValueOneBackup() throws Exception { checkLoadedValue(1); } @@ -75,6 +76,7 @@ public void testLoadedValueOneBackup() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLoadedValueNoBackups() throws Exception { checkLoadedValue(0); } @@ -152,4 +154,4 @@ private static class Store extends CacheStoreAdapter implement // No-op. } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessorAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessorAbstractSelfTest.java index bde5808d1fe67..38adf21be075b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessorAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessorAbstractSelfTest.java @@ -107,6 +107,7 @@ public abstract class GridAffinityProcessorAbstractSelfTest extends GridCommonAb * * @throws Exception In case of any exception. */ + @Test public void testAffinityProcessor() throws Exception { Random rnd = new Random(); @@ -158,6 +159,7 @@ public void testAffinityProcessor() throws Exception { * * @throws Exception In case of any exception. */ + @Test public void testPerformance() throws Exception { IgniteKernal grid = (IgniteKernal)grid(0); GridAffinityProcessor aff = grid.context().affinity(); @@ -183,4 +185,4 @@ public void testPerformance() throws Exception { assertTrue(diff < 25000); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessorMemoryLeakTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessorMemoryLeakTest.java index d6c5727bc21f2..a83d5a9d5151f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessorMemoryLeakTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessorMemoryLeakTest.java @@ -84,6 +84,7 @@ public class GridAffinityProcessorMemoryLeakTest extends GridCommonAbstractTest * * @throws Exception In case of any exception. */ + @Test public void testAffinityProcessor() throws Exception { Ignite ignite = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/Authentication1kUsersNodeRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/Authentication1kUsersNodeRestartTest.java index 1f515d539820c..27deed4fc0afa 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/Authentication1kUsersNodeRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/Authentication1kUsersNodeRestartTest.java @@ -93,6 +93,7 @@ public class Authentication1kUsersNodeRestartTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void test1kUsersNodeRestartServer() throws Exception { startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/AuthenticationConfigurationClusterTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/AuthenticationConfigurationClusterTest.java index 11aa754f53678..14bc63288b332 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/AuthenticationConfigurationClusterTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/AuthenticationConfigurationClusterTest.java @@ -96,6 +96,7 @@ private IgniteConfiguration configuration(int idx, boolean authEnabled, boolean /** * @throws Exception If failed. */ + @Test public void testServerNodeJoinDisabled() throws Exception { checkNodeJoinDisabled(false); } @@ -103,6 +104,7 @@ public void testServerNodeJoinDisabled() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientNodeJoinDisabled() throws Exception { checkNodeJoinDisabled(true); } @@ -110,6 +112,7 @@ public void testClientNodeJoinDisabled() throws Exception { /** * @throws Exception If failed. */ + @Test public void testServerNodeJoinEnabled() throws Exception { checkNodeJoinEnabled(false); } @@ -117,6 +120,7 @@ public void testServerNodeJoinEnabled() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientNodeJoinEnabled() throws Exception { checkNodeJoinEnabled(true); } @@ -160,6 +164,7 @@ private void checkNodeJoinEnabled(boolean client) throws Exception { /** * @throws Exception If failed. */ + @Test public void testDisabledAuthentication() throws Exception { startGrid(configuration(0, false, false)); @@ -205,6 +210,7 @@ public void testDisabledAuthentication() throws Exception { /** * @throws Exception If failed. */ + @Test public void testEnableAuthenticationWithoutPersistence() throws Exception { GridTestUtils.assertThrowsAnyCause(log, new Callable() { @Override public Object call() throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/AuthenticationOnNotActiveClusterTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/AuthenticationOnNotActiveClusterTest.java index 18d2032e4a370..c0c39c3436acd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/AuthenticationOnNotActiveClusterTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/AuthenticationOnNotActiveClusterTest.java @@ -94,6 +94,7 @@ public class AuthenticationOnNotActiveClusterTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testDefaultUser() throws Exception { startGrids(NODES_COUNT); @@ -108,6 +109,7 @@ public void testDefaultUser() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNotDefaultUser() throws Exception { startGrids(NODES_COUNT + 1); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/AuthenticationProcessorNPEOnStartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/AuthenticationProcessorNPEOnStartTest.java index 661c875e61916..45986f4b35479 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/AuthenticationProcessorNPEOnStartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/AuthenticationProcessorNPEOnStartTest.java @@ -72,6 +72,7 @@ public class AuthenticationProcessorNPEOnStartTest extends GridCommonAbstractTes /** * @throws Exception If failed. */ + @Test public void test() throws Exception { final AtomicInteger nodeIdx = new AtomicInteger(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/AuthenticationProcessorNodeRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/AuthenticationProcessorNodeRestartTest.java index 248d6855fae95..73aab6353c011 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/AuthenticationProcessorNodeRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/AuthenticationProcessorNodeRestartTest.java @@ -115,6 +115,7 @@ public class AuthenticationProcessorNodeRestartTest extends GridCommonAbstractTe /** * @throws Exception If failed. */ + @Test public void testConcurrentAddUpdateRemoveNodeRestartCoordinator() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-7472"); @@ -177,6 +178,7 @@ public void testConcurrentAddUpdateRemoveNodeRestartCoordinator() throws Excepti /** * @throws Exception If failed. */ + @Test public void testConcurrentAuthorize() throws Exception { final int testUsersCnt = 10; @@ -276,6 +278,7 @@ private IgniteInternalFuture restartCoordinator() { /** * @throws Exception If failed. */ + @Test public void test1kUsersNodeRestartServer() throws Exception { final AtomicInteger usrCnt = new AtomicInteger(); @@ -330,6 +333,7 @@ public void test1kUsersNodeRestartServer() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConcurrentAddUpdateRemoveNodeRestartServer() throws Exception { IgniteInternalFuture restartFut = loopServerRestarts(); @@ -363,6 +367,7 @@ public void testConcurrentAddUpdateRemoveNodeRestartServer() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConcurrentFailedOperationNodeRestartServer() throws Exception { IgniteInternalFuture restartFut = loopServerRestarts(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/AuthenticationProcessorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/AuthenticationProcessorSelfTest.java index 3d579ab9ce7df..bc1fafaa34a99 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/AuthenticationProcessorSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/AuthenticationProcessorSelfTest.java @@ -130,6 +130,7 @@ private static String randomString(int len) { /** * @throws Exception If failed. */ + @Test public void testDefaultUser() throws Exception { for (int i = 0; i < NODES_COUNT; ++i) { AuthorizationContext actx = grid(i).context().authentication().authenticate("ignite", "ignite"); @@ -142,6 +143,7 @@ public void testDefaultUser() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDefaultUserUpdate() throws Exception { AuthorizationContext.context(actxDflt); @@ -167,6 +169,7 @@ public void testDefaultUserUpdate() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemoveDefault() throws Exception { AuthorizationContext.context(actxDflt); @@ -193,6 +196,7 @@ public void testRemoveDefault() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUserManagementPermission() throws Exception { AuthorizationContext.context(actxDflt); @@ -246,6 +250,7 @@ public void testUserManagementPermission() throws Exception { /** * @throws Exception If failed. */ + @Test public void testProceedUsersOnJoinNode() throws Exception { AuthorizationContext.context(actxDflt); @@ -273,6 +278,7 @@ public void testProceedUsersOnJoinNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAuthenticationInvalidUser() throws Exception { AuthorizationContext.context(actxDflt); @@ -305,6 +311,7 @@ public void testAuthenticationInvalidUser() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAddUpdateRemoveUser() throws Exception { AuthorizationContext.context(actxDflt); @@ -322,6 +329,7 @@ public void testAddUpdateRemoveUser() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUpdateUser() throws Exception { AuthorizationContext.context(actxDflt); @@ -343,6 +351,7 @@ public void testUpdateUser() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUpdateRemoveDoesNotExistsUser() throws Exception { AuthorizationContext.context(actxDflt); @@ -375,6 +384,7 @@ public void testUpdateRemoveDoesNotExistsUser() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAddAlreadyExistsUser() throws Exception { AuthorizationContext.context(actxDflt); @@ -401,6 +411,7 @@ public void testAddAlreadyExistsUser() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAuthorizeOnClientDisconnect() throws Exception { AuthorizationContext.context(actxDflt); @@ -445,6 +456,7 @@ public void testAuthorizeOnClientDisconnect() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConcurrentAddRemove() throws Exception { final AtomicInteger usrCnt = new AtomicInteger(); @@ -471,6 +483,7 @@ public void testConcurrentAddRemove() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUserPersistence() throws Exception { AuthorizationContext.context(actxDflt); @@ -508,6 +521,7 @@ public void testUserPersistence() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDefaultUserPersistence() throws Exception { AuthorizationContext.context(actxDflt); @@ -543,6 +557,7 @@ public void testDefaultUserPersistence() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvalidUserNamePassword() throws Exception { AuthorizationContext.context(actxDflt); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/AtomicCacheAffinityConfigurationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/AtomicCacheAffinityConfigurationTest.java index e90a703f661e4..296ed65ef13d3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/AtomicCacheAffinityConfigurationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/AtomicCacheAffinityConfigurationTest.java @@ -47,6 +47,7 @@ public class AtomicCacheAffinityConfigurationTest extends GridCommonAbstractTest * @throws Exception If failed. * */ + @Test public void testRendezvousAffinity() throws Exception { try { affinityFunction = new RendezvousAffinityFunction(false, 10); @@ -79,6 +80,7 @@ public void testRendezvousAffinity() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTestAffinity() throws Exception { try { affinityFunction = new TestAffinityFunction("Some value"); @@ -111,6 +113,7 @@ public void testTestAffinity() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDefaultAffinity() throws Exception { try { affinityFunction = null; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/BinaryMetadataRegistrationInsideEntryProcessorTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/BinaryMetadataRegistrationInsideEntryProcessorTest.java index c7c3757b9a701..76d000b95b79b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/BinaryMetadataRegistrationInsideEntryProcessorTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/BinaryMetadataRegistrationInsideEntryProcessorTest.java @@ -50,6 +50,7 @@ public class BinaryMetadataRegistrationInsideEntryProcessorTest extends GridComm /** * @throws Exception If failed; */ + @Test public void test() throws Exception { Ignite ignite = startGrids(2); @@ -145,4 +146,4 @@ private static class CustomInnerObject { this.data = data; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheAffinityCallSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheAffinityCallSelfTest.java index 503da88c94683..84be2f5854473 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheAffinityCallSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheAffinityCallSelfTest.java @@ -89,6 +89,7 @@ public class CacheAffinityCallSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testAffinityCallRestartNode() throws Exception { startGridsMultiThreaded(SRVS); @@ -98,6 +99,7 @@ public void testAffinityCallRestartNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAffinityCallFromClientRestartNode() throws Exception { startGridsMultiThreaded(SRVS + 1); @@ -146,6 +148,7 @@ private void affinityCallRestartNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAffinityCallNoServerNode() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-1741"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheAtomicSingleMessageCountSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheAtomicSingleMessageCountSelfTest.java index fdc98ff675e8e..9caa39674ce5f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheAtomicSingleMessageCountSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheAtomicSingleMessageCountSelfTest.java @@ -85,6 +85,7 @@ public class CacheAtomicSingleMessageCountSelfTest extends GridCommonAbstractTes /** * @throws Exception If failed. */ + @Test public void testSingleMessage() throws Exception { startGrids(2); @@ -117,6 +118,7 @@ public void testSingleMessage() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSingleTransformMessage() throws Exception { startGrids(2); @@ -159,6 +161,7 @@ public void testSingleTransformMessage() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSingleFilterMessage() throws Exception { startGrids(2); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheClientStoreSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheClientStoreSelfTest.java index 87037918306e0..c52a9f34b7002 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheClientStoreSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheClientStoreSelfTest.java @@ -114,6 +114,7 @@ public class CacheClientStoreSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCorrectStore() throws Exception { nearEnabled = false; cacheMode = CacheMode.PARTITIONED; @@ -145,6 +146,7 @@ public void testCorrectStore() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvalidStore() throws Exception { nearEnabled = false; cacheMode = CacheMode.PARTITIONED; @@ -160,6 +162,7 @@ public void testInvalidStore() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDisabledConsistencyCheck() throws Exception { nearEnabled = false; cacheMode = CacheMode.PARTITIONED; @@ -183,6 +186,7 @@ public void testDisabledConsistencyCheck() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNoStoreNearDisabled() throws Exception { nearEnabled = false; cacheMode = CacheMode.PARTITIONED; @@ -196,6 +200,7 @@ public void testNoStoreNearDisabled() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNoStoreNearEnabled() throws Exception { nearEnabled = true; cacheMode = CacheMode.PARTITIONED; @@ -238,6 +243,7 @@ private void doTestNoStore() throws Exception { * * @throws Exception If failed. */ + @Test public void testLocalLoadClient() throws Exception { cacheMode = CacheMode.LOCAL; factory = new Factory3(); @@ -263,6 +269,7 @@ public void testLocalLoadClient() throws Exception { * * @throws Exception If failed. */ + @Test public void testLocalLoadServer() throws Exception { cacheMode = CacheMode.LOCAL; factory = new Factory3(); @@ -285,6 +292,7 @@ public void testLocalLoadServer() throws Exception { /** * Load cache created on client as REPLICATED and see if it only loaded on servers */ + @Test public void testReplicatedLoadFromClient() throws Exception { cacheMode = CacheMode.REPLICATED; factory = new Factory3(); @@ -308,6 +316,7 @@ public void testReplicatedLoadFromClient() throws Exception { /** * Load cache created on client as REPLICATED and see if it only loaded on servers */ + @Test public void testPartitionedLoadFromClient() throws Exception { cacheMode = CacheMode.PARTITIONED; factory = new Factory3(); @@ -396,4 +405,4 @@ public static class TestStore extends CacheStoreAdapter { clo.apply(i, i); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheComparatorTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheComparatorTest.java index 0bd587de85d40..46d182b24aa6a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheComparatorTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheComparatorTest.java @@ -28,6 +28,7 @@ public class CacheComparatorTest extends TestCase { /** * Test if comparator not violates its general contract */ + @Test public void testDirect() { DynamicCacheDescriptor desc1 = new DynamicCacheDescriptor(null, new CacheConfiguration().setName("1111"), CacheType.DATA_STRUCTURES, diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheConcurrentReadThroughTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheConcurrentReadThroughTest.java index 1e8ed4ddf2be4..a05a213920881 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheConcurrentReadThroughTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheConcurrentReadThroughTest.java @@ -84,6 +84,7 @@ public class CacheConcurrentReadThroughTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testConcurrentReadThrough() throws Exception { startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheConfigurationLeakTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheConfigurationLeakTest.java index 6b0386729e738..5952905b4f5fc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheConfigurationLeakTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheConfigurationLeakTest.java @@ -60,6 +60,7 @@ public CacheConfigurationLeakTest() { /** * @throws Exception If failed. */ + @Test public void testCacheCreateLeak() throws Exception { final Ignite ignite = grid(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheConnectionLeakStoreTxTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheConnectionLeakStoreTxTest.java index 27dbe62577a61..cf9afd25b3ec5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheConnectionLeakStoreTxTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheConnectionLeakStoreTxTest.java @@ -101,6 +101,7 @@ public class CacheConnectionLeakStoreTxTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testConnectionLeakOneBackupAtomic() throws Exception { checkConnectionLeak(CacheAtomicityMode.ATOMIC, null, null); } @@ -108,6 +109,7 @@ public void testConnectionLeakOneBackupAtomic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConnectionLeakOneBackupAtomicLoadFromStore() throws Exception { isLoadFromStore = true; @@ -117,6 +119,7 @@ public void testConnectionLeakOneBackupAtomicLoadFromStore() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConnectionLeakOneBackupOptimisticRepeatableRead() throws Exception { checkConnectionLeak(CacheAtomicityMode.TRANSACTIONAL, OPTIMISTIC, REPEATABLE_READ); } @@ -124,6 +127,7 @@ public void testConnectionLeakOneBackupOptimisticRepeatableRead() throws Excepti /** * @throws Exception If failed. */ + @Test public void testConnectionLeakOneBackupOptimisticRepeatableReadLoadFromStore() throws Exception { isLoadFromStore = true; @@ -133,6 +137,7 @@ public void testConnectionLeakOneBackupOptimisticRepeatableReadLoadFromStore() t /** * @throws Exception If failed. */ + @Test public void testConnectionLeakOneBackupOptimisticReadCommitted() throws Exception { checkConnectionLeak(CacheAtomicityMode.TRANSACTIONAL, OPTIMISTIC, READ_COMMITTED); } @@ -140,6 +145,7 @@ public void testConnectionLeakOneBackupOptimisticReadCommitted() throws Exceptio /** * @throws Exception If failed. */ + @Test public void testConnectionLeakOneBackupOptimisticReadCommittedLoadFromStore() throws Exception { isLoadFromStore = true; @@ -149,6 +155,7 @@ public void testConnectionLeakOneBackupOptimisticReadCommittedLoadFromStore() th /** * @throws Exception If failed. */ + @Test public void testConnectionLeakOneBackupPessimisticRepeatableRead() throws Exception { checkConnectionLeak(CacheAtomicityMode.TRANSACTIONAL, PESSIMISTIC, REPEATABLE_READ); } @@ -156,6 +163,7 @@ public void testConnectionLeakOneBackupPessimisticRepeatableRead() throws Except /** * @throws Exception If failed. */ + @Test public void testConnectionLeakOneBackupPessimisticReadCommitted() throws Exception { checkConnectionLeak(CacheAtomicityMode.TRANSACTIONAL, PESSIMISTIC, READ_COMMITTED); } @@ -163,6 +171,7 @@ public void testConnectionLeakOneBackupPessimisticReadCommitted() throws Excepti /** * @throws Exception If failed. */ + @Test public void testConnectionLeakOneBackupPessimisticReadCommittedLoadFromStore() throws Exception { isLoadFromStore = true; @@ -283,4 +292,4 @@ private void addSession() { sessions.remove(ses == null ? NULL : ses); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDataRegionConfigurationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDataRegionConfigurationTest.java index 614c90051ca55..ad843b76bcb14 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDataRegionConfigurationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDataRegionConfigurationTest.java @@ -77,6 +77,7 @@ private void checkStartGridException(Class ex, String messa /** * Verifies that proper exception is thrown when DataRegion is misconfigured for cache. */ + @Test public void testMissingDataRegion() { ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME); @@ -88,6 +89,7 @@ public void testMissingDataRegion() { /** * Verifies that {@link IgniteOutOfMemoryException} is thrown when cache is configured with too small DataRegion. */ + @Test public void testTooSmallDataRegion() throws Exception { memCfg = new DataStorageConfiguration(); @@ -142,6 +144,7 @@ public void testTooSmallDataRegion() throws Exception { /** * Verifies that with enough memory allocated adding values to cache doesn't cause any exceptions. */ + @Test public void testProperlySizedMemoryPolicy() throws Exception { memCfg = new DataStorageConfiguration(); @@ -177,6 +180,7 @@ public void testProperlySizedMemoryPolicy() throws Exception { * Verifies that {@link IgniteCheckedException} is thrown when swap and persistence are enabled at the same time * for a data region. */ + @Test public void testSetPersistenceAndSwap() { DataRegionConfiguration invCfg = new DataRegionConfiguration(); @@ -200,6 +204,7 @@ public void testSetPersistenceAndSwap() { /** * Verifies that {@link IgniteCheckedException} is thrown when page eviction threshold is less than 0.5. */ + @Test public void testSetSmallInvalidEviction() { final double SMALL_EVICTION_THRESHOLD = 0.1D; DataRegionConfiguration invCfg = new DataRegionConfiguration(); @@ -222,6 +227,7 @@ public void testSetSmallInvalidEviction() { /** * Verifies that {@link IgniteCheckedException} is thrown when page eviction threshold is greater than 0.999. */ + @Test public void testSetBigInvalidEviction() { final double BIG_EVICTION_THRESHOLD = 1.0D; DataRegionConfiguration invCfg = new DataRegionConfiguration(); @@ -244,6 +250,7 @@ public void testSetBigInvalidEviction() { /** * Verifies that {@link IgniteCheckedException} is thrown when empty pages pool size is less than 10 */ + @Test public void testInvalidSmallEmptyPagesPoolSize() { final int SMALL_PAGES_POOL_SIZE = 5; DataRegionConfiguration invCfg = new DataRegionConfiguration(); @@ -267,6 +274,7 @@ public void testInvalidSmallEmptyPagesPoolSize() { * Verifies that {@link IgniteCheckedException} is thrown when empty pages pool size is greater than * DataRegionConfiguration.getMaxSize() / DataStorageConfiguration.getPageSize() / 10. */ + @Test public void testInvalidBigEmptyPagesPoolSize() { final int DFLT_PAGE_SIZE = 1024; long expectedMaxPoolSize; @@ -298,6 +306,7 @@ public void testInvalidBigEmptyPagesPoolSize() { * Verifies that {@link IgniteCheckedException} is thrown when IgniteCheckedException if validation of * memory metrics properties fails. Metrics rate time interval must not be less than 1000ms. */ + @Test public void testInvalidMetricsProperties() { final long SMALL_RATE_TIME_INTERVAL_MS = 999; DataRegionConfiguration invCfg = new DataRegionConfiguration(); @@ -321,6 +330,7 @@ public void testInvalidMetricsProperties() { * Verifies that {@link IgniteCheckedException} is thrown when IgniteCheckedException if validation of * memory metrics properties fails. Metrics sub interval count must be positive. */ + @Test public void testInvalidSubIntervalCount() { final int NEG_SUB_INTERVAL_COUNT = -1000; DataRegionConfiguration invCfg = new DataRegionConfiguration(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDeferredDeleteQueueTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDeferredDeleteQueueTest.java index 871bc338e9698..9d2c974234889 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDeferredDeleteQueueTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDeferredDeleteQueueTest.java @@ -65,6 +65,7 @@ public class CacheDeferredDeleteQueueTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testDeferredDeleteQueue() throws Exception { testQueue(ATOMIC, false); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDeferredDeleteSanitySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDeferredDeleteSanitySelfTest.java index dd7579905b29d..a284cd90d9d91 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDeferredDeleteSanitySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDeferredDeleteSanitySelfTest.java @@ -42,6 +42,7 @@ public class CacheDeferredDeleteSanitySelfTest extends GridCommonAbstractTest { /** * @throws Exception If fails. */ + @Test public void testDeferredDelete() throws Exception { testDeferredDelete(LOCAL, ATOMIC, false, false); testDeferredDelete(LOCAL, TRANSACTIONAL, false, false); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDhtLocalPartitionAfterRemoveSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDhtLocalPartitionAfterRemoveSelfTest.java index 09f2a6a8b7d67..61f54c2e54fc0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDhtLocalPartitionAfterRemoveSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDhtLocalPartitionAfterRemoveSelfTest.java @@ -54,6 +54,7 @@ public class CacheDhtLocalPartitionAfterRemoveSelfTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + @Test public void testMemoryUsage() throws Exception { assertEquals(10_000, GridDhtLocalPartition.MAX_DELETE_QUEUE_SIZE); @@ -105,4 +106,4 @@ public TestKey(String key) { return key.equals(((TestKey)obj).key); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheEntryProcessorCopySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheEntryProcessorCopySelfTest.java index aabd3b6445826..6caa7b456876c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheEntryProcessorCopySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheEntryProcessorCopySelfTest.java @@ -69,6 +69,7 @@ public class CacheEntryProcessorCopySelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testMutableEntryWithP2PEnabled() throws Exception { doTestMutableEntry(true); } @@ -76,6 +77,7 @@ public void testMutableEntryWithP2PEnabled() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMutableEntryWithP2PDisabled() throws Exception { doTestMutableEntry(false); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheEnumOperationsAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheEnumOperationsAbstractTest.java index 0cffeb610c0dd..2b0726eb09176 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheEnumOperationsAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheEnumOperationsAbstractTest.java @@ -84,6 +84,7 @@ public abstract class CacheEnumOperationsAbstractTest extends GridCommonAbstract /** * @throws Exception If failed. */ + @Test public void testAtomic() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 1, ATOMIC); @@ -93,6 +94,7 @@ public void testAtomic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTx() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 1, TRANSACTIONAL); @@ -102,6 +104,7 @@ public void testTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccTx() throws Exception { if (!singleNode()) fail("https://issues.apache.org/jira/browse/IGNITE-7187"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheExchangeMessageDuplicatedStateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheExchangeMessageDuplicatedStateTest.java index cdd0002d573ac..4b65bb36d95b8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheExchangeMessageDuplicatedStateTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheExchangeMessageDuplicatedStateTest.java @@ -146,6 +146,7 @@ public class CacheExchangeMessageDuplicatedStateTest extends GridCommonAbstractT /** * @throws Exception If failed. */ + @Test public void testExchangeMessages() throws Exception { ignite(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheFutureExceptionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheFutureExceptionSelfTest.java index a51765c652d4c..cbb832c040683 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheFutureExceptionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheFutureExceptionSelfTest.java @@ -73,6 +73,7 @@ public class CacheFutureExceptionSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testAsyncCacheFuture() throws Exception { startGrid(0); @@ -157,4 +158,4 @@ private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundE in.readObject(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryAbstractTest.java index f347525e2f457..2090e83feb15f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryAbstractTest.java @@ -97,6 +97,7 @@ public abstract class CacheGetEntryAbstractTest extends GridCacheAbstractSelfTes /** * @throws Exception If failed. */ + @Test public void testNear() throws Exception { CacheConfiguration cfg = new CacheConfiguration(DEFAULT_CACHE_NAME); @@ -112,6 +113,7 @@ public void testNear() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNearTransactional() throws Exception { CacheConfiguration cfg = new CacheConfiguration(DEFAULT_CACHE_NAME); @@ -127,6 +129,7 @@ public void testNearTransactional() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPartitioned() throws Exception { CacheConfiguration cfg = new CacheConfiguration(DEFAULT_CACHE_NAME); @@ -141,6 +144,7 @@ public void testPartitioned() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPartitionedTransactional() throws Exception { CacheConfiguration cfg = new CacheConfiguration(DEFAULT_CACHE_NAME); @@ -155,6 +159,7 @@ public void testPartitionedTransactional() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLocal() throws Exception { CacheConfiguration cfg = new CacheConfiguration(DEFAULT_CACHE_NAME); @@ -169,6 +174,7 @@ public void testLocal() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLocalTransactional() throws Exception { // TODO: fails since d13520e9a05bd9e9b987529472d6317951b72f96, need to review changes. @@ -185,6 +191,7 @@ public void testLocalTransactional() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReplicated() throws Exception { CacheConfiguration cfg = new CacheConfiguration(DEFAULT_CACHE_NAME); @@ -199,6 +206,7 @@ public void testReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReplicatedTransactional() throws Exception { CacheConfiguration cfg = new CacheConfiguration(DEFAULT_CACHE_NAME); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryPessimisticRepeatableReadSeltTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryPessimisticRepeatableReadSeltTest.java index 4aa693c29c1b3..a3732bb753eb5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryPessimisticRepeatableReadSeltTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryPessimisticRepeatableReadSeltTest.java @@ -34,7 +34,8 @@ public class CacheGetEntryPessimisticRepeatableReadSeltTest extends CacheGetEntr return TransactionIsolation.REPEATABLE_READ; } - @Override public void testReplicatedTransactional() throws Exception { + @Override @Test + public void testReplicatedTransactional() throws Exception { super.testReplicatedTransactional(); } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetFromJobTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetFromJobTest.java index 7c9eeec7f9278..032a4e26d556b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetFromJobTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetFromJobTest.java @@ -49,6 +49,7 @@ public class CacheGetFromJobTest extends GridCacheAbstractSelfTest { /** * @throws Exception If failed. */ + @Test public void testTopologyChange() throws Exception { final AtomicReference err = new AtomicReference<>(); @@ -113,4 +114,4 @@ public TestJob() { return null; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetsDistributionAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetsDistributionAbstractTest.java index 559a719c55080..9032ae95dc9ba 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetsDistributionAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetsDistributionAbstractTest.java @@ -176,6 +176,7 @@ protected int backupsCount() { * @throws Exception In case of an error. * @see #runTestBalancingDistribution(boolean) */ + @Test public void testGetRequestsGeneratorDistribution() throws Exception { runTestBalancingDistribution(false); } @@ -186,6 +187,7 @@ public void testGetRequestsGeneratorDistribution() throws Exception { * @throws Exception In case of an error. * @see #runTestBalancingDistribution(boolean) */ + @Test public void testGetAllRequestsGeneratorDistribution() throws Exception { runTestBalancingDistribution(true); } @@ -263,6 +265,7 @@ protected void runTestBalancingDistribution(boolean batchMode) throws Exception * @throws Exception In case of an error. * @see #runTestSameHostDistribution(UUID, boolean) */ + @Test public void testGetRequestsDistribution() throws Exception { UUID destId = grid(0).localNode().id(); @@ -275,6 +278,7 @@ public void testGetRequestsDistribution() throws Exception { * @throws Exception In case of an error. * @see #runTestSameHostDistribution(UUID, boolean) */ + @Test public void testGetAllRequestsDistribution() throws Exception { UUID destId = grid(gridCount() - 1).localNode().id(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGroupLocalConfigurationSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGroupLocalConfigurationSelfTest.java index 51f900165dbed..59f3fbb9692b4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGroupLocalConfigurationSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGroupLocalConfigurationSelfTest.java @@ -84,6 +84,7 @@ public class CacheGroupLocalConfigurationSelfTest extends GridCommonAbstractTest * * @throws Exception If failed. */ + @Test public void testDefaultGroupLocalAttributesPreserved() throws Exception { useNonDfltCacheGrp = false; @@ -96,6 +97,7 @@ public void testDefaultGroupLocalAttributesPreserved() throws Exception { * * @throws Exception If failed. */ + @Test public void testNonDefaultGroupLocalAttributesPreserved() throws Exception { useNonDfltCacheGrp = true; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGroupMetricsMBeanTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGroupMetricsMBeanTest.java index f8108eb7123a2..e87539eefb591 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGroupMetricsMBeanTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGroupMetricsMBeanTest.java @@ -234,6 +234,7 @@ private Map> arrayToAssignmentMap(int[][] arr) { /** * @throws Exception If failed. */ + @Test public void testCacheGroupMetrics() throws Exception { pds = false; @@ -336,6 +337,7 @@ public void testCacheGroupMetrics() throws Exception { /** * Test allocated pages counts for cache groups. */ + @Test public void testAllocatedPages() throws Exception { pds = true; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGroupsMetricsRebalanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGroupsMetricsRebalanceTest.java index af2dc633d825e..16704ae66bc30 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGroupsMetricsRebalanceTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGroupsMetricsRebalanceTest.java @@ -114,6 +114,7 @@ public class CacheGroupsMetricsRebalanceTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRebalance() throws Exception { Ignite ignite = startGrids(4); @@ -171,6 +172,7 @@ public void testRebalance() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRebalanceEstimateFinishTime() throws Exception { System.setProperty(IGNITE_REBALANCE_STATISTICS_TIME_INTERVAL, String.valueOf(1000)); @@ -298,6 +300,7 @@ public void testRebalanceEstimateFinishTime() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRebalanceDelay() throws Exception { Ignite ig1 = startGrid(1); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheInterceptorPartitionCounterLocalSanityTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheInterceptorPartitionCounterLocalSanityTest.java index 3be51e93da7e0..07f2e1b700504 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheInterceptorPartitionCounterLocalSanityTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheInterceptorPartitionCounterLocalSanityTest.java @@ -105,6 +105,7 @@ public class CacheInterceptorPartitionCounterLocalSanityTest extends GridCommonA /** * @throws Exception If failed. */ + @Test public void testLocal() throws Exception { CacheConfiguration ccfg = cacheConfiguration(ATOMIC,false); @@ -114,6 +115,7 @@ public void testLocal() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLocalWithStore() throws Exception { CacheConfiguration ccfg = cacheConfiguration(ATOMIC,true); @@ -123,6 +125,7 @@ public void testLocalWithStore() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLocalTx() throws Exception { CacheConfiguration ccfg = cacheConfiguration(TRANSACTIONAL,false); @@ -132,6 +135,7 @@ public void testLocalTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLocalTxWithStore() throws Exception { CacheConfiguration ccfg = cacheConfiguration(TRANSACTIONAL,true); @@ -141,6 +145,7 @@ public void testLocalTxWithStore() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLocalMvccTx() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-9530"); @@ -152,6 +157,7 @@ public void testLocalMvccTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLocalMvccTxWithStore() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-9530"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheInterceptorPartitionCounterRandomOperationsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheInterceptorPartitionCounterRandomOperationsTest.java index 385091a91473d..f5652f6a871aa 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheInterceptorPartitionCounterRandomOperationsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheInterceptorPartitionCounterRandomOperationsTest.java @@ -138,6 +138,7 @@ public class CacheInterceptorPartitionCounterRandomOperationsTest extends GridCo /** * @throws Exception If failed. */ + @Test public void testAtomic() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 1, @@ -150,6 +151,7 @@ public void testAtomic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAtomicWithStore() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 1, @@ -162,6 +164,7 @@ public void testAtomicWithStore() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAtomicReplicated() throws Exception { CacheConfiguration ccfg = cacheConfiguration(REPLICATED, 0, @@ -174,6 +177,7 @@ public void testAtomicReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAtomicReplicatedWithStore() throws Exception { CacheConfiguration ccfg = cacheConfiguration(REPLICATED, 0, @@ -186,6 +190,7 @@ public void testAtomicReplicatedWithStore() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAtomicNoBackups() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 0, @@ -198,6 +203,7 @@ public void testAtomicNoBackups() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTx() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 1, @@ -210,6 +216,7 @@ public void testTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxWithStore() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 1, @@ -222,6 +229,7 @@ public void testTxWithStore() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxExplicit() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 1, @@ -234,6 +242,7 @@ public void testTxExplicit() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxReplicated() throws Exception { CacheConfiguration ccfg = cacheConfiguration(REPLICATED, 0, @@ -246,6 +255,7 @@ public void testTxReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxReplicatedWithStore() throws Exception { CacheConfiguration ccfg = cacheConfiguration(REPLICATED, 0, @@ -258,6 +268,7 @@ public void testTxReplicatedWithStore() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxNoBackups() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 0, @@ -270,6 +281,7 @@ public void testTxNoBackups() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxNoBackupsWithStore() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 0, @@ -282,6 +294,7 @@ public void testTxNoBackupsWithStore() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxNoBackupsExplicit() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 0, @@ -294,6 +307,7 @@ public void testTxNoBackupsExplicit() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccTx() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 1, @@ -306,6 +320,7 @@ public void testMvccTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccTxWithStore() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 1, @@ -318,6 +333,7 @@ public void testMvccTxWithStore() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccTxExplicit() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 1, @@ -330,6 +346,7 @@ public void testMvccTxExplicit() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccTxReplicated() throws Exception { CacheConfiguration ccfg = cacheConfiguration(REPLICATED, 0, @@ -342,6 +359,7 @@ public void testMvccTxReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccTxReplicatedWithStore() throws Exception { CacheConfiguration ccfg = cacheConfiguration(REPLICATED, 0, @@ -354,6 +372,7 @@ public void testMvccTxReplicatedWithStore() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccTxNoBackups() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 0, @@ -366,6 +385,7 @@ public void testMvccTxNoBackups() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccTxNoBackupsWithStore() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 0, @@ -378,6 +398,7 @@ public void testMvccTxNoBackupsWithStore() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccTxNoBackupsExplicit() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 0, diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheKeepBinaryTransactionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheKeepBinaryTransactionTest.java index 43e0578158719..a910dae4e4f6e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheKeepBinaryTransactionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheKeepBinaryTransactionTest.java @@ -69,6 +69,7 @@ public class CacheKeepBinaryTransactionTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testBinaryGet() throws Exception { IgniteEx ignite = grid(0); IgniteCache cache = ignite.cache("tx-cache").withKeepBinary(); @@ -84,6 +85,7 @@ public void testBinaryGet() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBinaryContains() throws Exception { IgniteEx ignite = grid(0); IgniteCache cache = ignite.cache("tx-cache").withKeepBinary(); @@ -99,6 +101,7 @@ public void testBinaryContains() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBinaryPutGetContains() throws Exception { IgniteEx ignite = grid(0); IgniteCache cache = ignite.cache("tx-cache").withKeepBinary(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMetricsEntitiesCountTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMetricsEntitiesCountTest.java index 1ab7c40ced6a0..0b64348c591a3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMetricsEntitiesCountTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMetricsEntitiesCountTest.java @@ -89,6 +89,7 @@ public class CacheMetricsEntitiesCountTest extends GridCommonAbstractTest { /** * Test entities count, calculated by different implementations. */ + @Test public void testEnitiesCount() throws Exception { awaitPartitionMapExchange(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMetricsForClusterGroupSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMetricsForClusterGroupSelfTest.java index df60c42e8d4c6..6a4806d4871e5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMetricsForClusterGroupSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMetricsForClusterGroupSelfTest.java @@ -75,6 +75,7 @@ public class CacheMetricsForClusterGroupSelfTest extends GridCommonAbstractTest /** * Test cluster group metrics in case of statistics enabled. */ + @Test public void testMetricsStatisticsEnabled() throws Exception { startGrids(); @@ -110,6 +111,7 @@ public void testMetricsStatisticsEnabled() throws Exception { * * @throws Exception If failed. */ + @Test public void testMetricsStatisticsDisabled() throws Exception { startGrids(); @@ -143,6 +145,7 @@ public void testMetricsStatisticsDisabled() throws Exception { /** * Tests that only local metrics are updating if discovery updates disabled. */ + @Test public void testMetricsDiscoveryUpdatesDisabled() throws Exception { System.setProperty(IgniteSystemProperties.IGNITE_DISCOVERY_DISABLE_CACHE_METRICS_UPDATE, "true"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMetricsManageTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMetricsManageTest.java index ae00ac9659225..badc95a5f0d50 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMetricsManageTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMetricsManageTest.java @@ -79,6 +79,7 @@ public class CacheMetricsManageTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testJmxNoPdsStatisticsEnable() throws Exception { testJmxStatisticsEnable(false); } @@ -86,6 +87,7 @@ public void testJmxNoPdsStatisticsEnable() throws Exception { /** * @throws Exception If failed. */ + @Test public void testJmxPdsStatisticsEnable() throws Exception { testJmxStatisticsEnable(true); } @@ -93,6 +95,7 @@ public void testJmxPdsStatisticsEnable() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheManagerStatisticsEnable() throws Exception { final CacheManager mgr1 = Caching.getCachingProvider().getCacheManager(); final CacheManager mgr2 = Caching.getCachingProvider().getCacheManager(); @@ -132,6 +135,7 @@ public void testCacheManagerStatisticsEnable() throws Exception { /** * */ + @Test public void testPublicApiStatisticsEnable() throws Exception { Ignite ig1 = startGrid(1); startGrid(2); @@ -159,6 +163,7 @@ public void testPublicApiStatisticsEnable() throws Exception { /** * */ + @Test public void testMultiThreadStatisticsEnable() throws Exception { startGrids(5); @@ -215,6 +220,7 @@ public void testMultiThreadStatisticsEnable() throws Exception { /** * */ + @Test public void testCacheApiClearStatistics() throws Exception { startGrids(3); @@ -232,6 +238,7 @@ public void testCacheApiClearStatistics() throws Exception { /** * */ + @Test public void testClearStatisticsAfterDisableStatistics() throws Exception { startGrids(3); @@ -253,6 +260,7 @@ public void testClearStatisticsAfterDisableStatistics() throws Exception { /** * */ + @Test public void testClusterApiClearStatistics() throws Exception { startGrids(3); @@ -277,6 +285,7 @@ public void testClusterApiClearStatistics() throws Exception { /** * */ + @Test public void testJmxApiClearStatistics() throws Exception { startGrids(3); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNamesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNamesSelfTest.java index d7d06a1c090a6..726d6021d41c8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNamesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNamesSelfTest.java @@ -57,6 +57,7 @@ public class CacheNamesSelfTest extends GridCommonAbstractTest { /** * @throws Exception In case of failure. */ + @Test public void testCacheNames() throws Exception { try { startGridsMultiThreaded(2); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNamesWithSpecialCharactersTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNamesWithSpecialCharactersTest.java index ecb8227e58f53..cea5cc284bb7d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNamesWithSpecialCharactersTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNamesWithSpecialCharactersTest.java @@ -53,6 +53,7 @@ public class CacheNamesWithSpecialCharactersTest extends GridCommonAbstractTest /** * @throws Exception In case of failure. */ + @Test public void testCacheNames() throws Exception { try { startGridsMultiThreaded(2); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNearReaderUpdateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNearReaderUpdateTest.java index e47ebb312ecad..f163f348df01f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNearReaderUpdateTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNearReaderUpdateTest.java @@ -113,6 +113,7 @@ public class CacheNearReaderUpdateTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testNoBackups() throws Exception { runTestGetUpdateMultithreaded(cacheConfiguration(PARTITIONED, FULL_SYNC, 0, false, false)); } @@ -120,6 +121,7 @@ public void testNoBackups() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOneBackup() throws Exception { runTestGetUpdateMultithreaded(cacheConfiguration(PARTITIONED, FULL_SYNC, 1, false, false)); } @@ -127,6 +129,7 @@ public void testOneBackup() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOneBackupNearEnabled() throws Exception { runTestGetUpdateMultithreaded(cacheConfiguration(PARTITIONED, FULL_SYNC, 1, false, true)); } @@ -134,6 +137,7 @@ public void testOneBackupNearEnabled() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOneBackupStoreEnabled() throws Exception { runTestGetUpdateMultithreaded(cacheConfiguration(PARTITIONED, FULL_SYNC, 1, true, false)); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNearUpdateTopologyChangeAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNearUpdateTopologyChangeAbstractTest.java index 21b3c727dcd4c..3861128cd120a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNearUpdateTopologyChangeAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNearUpdateTopologyChangeAbstractTest.java @@ -53,6 +53,7 @@ public abstract class CacheNearUpdateTopologyChangeAbstractTest extends IgniteCa /** * @throws Exception If failed. */ + @Test public void testNearUpdateTopologyChange() throws Exception { awaitPartitionMapExchange(); @@ -140,4 +141,4 @@ public void testNearUpdateTopologyChange() throws Exception { assertEquals((Object)2, nearCache.localPeek(key, ONHEAP)); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNoAffinityExchangeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNoAffinityExchangeTest.java index 15cd5eeb0a14d..eb60c2fc3a3fb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNoAffinityExchangeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNoAffinityExchangeTest.java @@ -85,6 +85,7 @@ public class CacheNoAffinityExchangeTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testNoAffinityChangeOnClientJoin() throws Exception { Ignite ig = startGrids(4); @@ -142,6 +143,7 @@ public void testNoAffinityChangeOnClientJoin() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNoAffinityChangeOnClientLeft() throws Exception { Ignite ig = startGrids(4); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapMapEntrySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapMapEntrySelfTest.java index e520d455c1aaa..599db12972933 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapMapEntrySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapMapEntrySelfTest.java @@ -82,6 +82,7 @@ private CacheConfiguration cacheConfiguration(String gridName, /** * @throws Exception If failed. */ + @Test public void testCacheMapEntry() throws Exception { checkCacheMapEntry(ATOMIC, LOCAL, GridLocalCacheEntry.class); @@ -135,4 +136,4 @@ private void checkCacheMapEntry(CacheAtomicityMode atomicityMode, jcache.destroy(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheOptimisticTransactionsWithFilterTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheOptimisticTransactionsWithFilterTest.java index d953e04355faa..0aaebb18f49b7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheOptimisticTransactionsWithFilterTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheOptimisticTransactionsWithFilterTest.java @@ -92,6 +92,7 @@ protected int serversNumber() { /** * @throws Exception If failed. */ + @Test public void testCasReplace() throws Exception { executeTestForAllCaches(new TestClosure() { @Override public void apply(Ignite ignite, String cacheName) throws Exception { @@ -179,6 +180,7 @@ public void testCasReplace() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutIfAbsent() throws Exception { executeTestForAllCaches(new TestClosure() { @Override public void apply(Ignite ignite, String cacheName) throws Exception { @@ -238,6 +240,7 @@ public void testPutIfAbsent() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReplace() throws Exception { executeTestForAllCaches(new TestClosure() { @Override public void apply(Ignite ignite, String cacheName) throws Exception { @@ -297,6 +300,7 @@ public void testReplace() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemoveWithOldValue() throws Exception { executeTestForAllCaches(new TestClosure() { @Override public void apply(Ignite ignite, String cacheName) throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CachePutEventListenerErrorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CachePutEventListenerErrorSelfTest.java index 8891f64233476..c7823b49e52a4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CachePutEventListenerErrorSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CachePutEventListenerErrorSelfTest.java @@ -89,6 +89,7 @@ public class CachePutEventListenerErrorSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPartitionedAtomicOnHeap() throws Exception { doTest(CacheMode.PARTITIONED, CacheAtomicityMode.ATOMIC); } @@ -96,6 +97,7 @@ public void testPartitionedAtomicOnHeap() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPartitionedTransactionalOnHeap() throws Exception { doTest(CacheMode.PARTITIONED, CacheAtomicityMode.TRANSACTIONAL); } @@ -103,6 +105,7 @@ public void testPartitionedTransactionalOnHeap() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReplicatedAtomicOnHeap() throws Exception { doTest(CacheMode.REPLICATED, CacheAtomicityMode.ATOMIC); } @@ -110,6 +113,7 @@ public void testReplicatedAtomicOnHeap() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReplicatedTransactionalOnHeap() throws Exception { doTest(CacheMode.REPLICATED, CacheAtomicityMode.TRANSACTIONAL); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CachePutIfAbsentTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CachePutIfAbsentTest.java index 00ba25fb7651c..8f689a801f8eb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CachePutIfAbsentTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CachePutIfAbsentTest.java @@ -111,6 +111,7 @@ private CacheConfiguration cacheConfiguration( /** * @throws Exception If failed. */ + @Test public void testTxConflictGetAndPutIfAbsent() throws Exception { Ignite ignite0 = ignite(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadThroughRestartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadThroughRestartSelfTest.java index 422ed586be455..9273b856ad7db 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadThroughRestartSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadThroughRestartSelfTest.java @@ -84,6 +84,7 @@ public class CacheReadThroughRestartSelfTest extends GridCacheAbstractSelfTest { /** * @throws Exception If failed. */ + @Test public void testReadThroughInTx() throws Exception { testReadThroughInTx(false); } @@ -91,6 +92,7 @@ public void testReadThroughInTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReadEntryThroughInTx() throws Exception { testReadThroughInTx(true); } @@ -139,6 +141,7 @@ private void testReadThroughInTx(boolean needVer) throws Exception { /** * @throws Exception If failed. */ + @Test public void testReadThrough() throws Exception { testReadThrough(false); } @@ -146,6 +149,7 @@ public void testReadThrough() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReadEntryThrough() throws Exception { testReadThrough(true); } @@ -175,4 +179,4 @@ private void testReadThrough(boolean needVer) throws Exception { assertNotNull("Null value for key: " + key, cache.get(key)); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheRebalanceConfigValidationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheRebalanceConfigValidationTest.java index 2f31b31372396..d0086d2a65503 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheRebalanceConfigValidationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheRebalanceConfigValidationTest.java @@ -43,6 +43,7 @@ public class CacheRebalanceConfigValidationTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testParameterConsistency() throws Exception { rebalancePoolSize = 2; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheRebalancingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheRebalancingSelfTest.java index 469a676f4a03d..5ac6460c645d0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheRebalancingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheRebalancingSelfTest.java @@ -69,6 +69,7 @@ public class CacheRebalancingSelfTest extends GridCommonAbstractTest { /** * @throws Exception If fails. */ + @Test public void testRebalanceLocalCacheFuture() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); @@ -89,6 +90,7 @@ public void testRebalanceLocalCacheFuture() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRebalanceFuture() throws Exception { IgniteEx ig0 = startGrid(0); @@ -124,6 +126,7 @@ private static IgniteInternalFuture internalFuture(IgniteFuture fut) { * * @throws Exception If failed. */ + @Test public void testDisableRebalancing() throws Exception { IgniteEx ig0 = startGrid(0); IgniteEx ig1 = startGrid(1); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheRemoveAllSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheRemoveAllSelfTest.java index a27bdda62a177..1cc886f47507a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheRemoveAllSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheRemoveAllSelfTest.java @@ -42,6 +42,7 @@ public class CacheRemoveAllSelfTest extends GridCacheAbstractSelfTest { /** * @throws Exception If failed. */ + @Test public void testRemoveAll() throws Exception { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -76,4 +77,4 @@ public void testRemoveAll() throws Exception { 0, locCache.localSize()); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheSerializableTransactionsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheSerializableTransactionsTest.java index 0afd4ba1bd951..5034e9e031020 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheSerializableTransactionsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheSerializableTransactionsTest.java @@ -148,6 +148,7 @@ public class CacheSerializableTransactionsTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testTxStreamerLoad() throws Exception { txStreamerLoad(false); } @@ -155,6 +156,7 @@ public void testTxStreamerLoad() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxStreamerLoadAllowOverwrite() throws Exception { txStreamerLoad(true); } @@ -241,6 +243,7 @@ private void txStreamerLoad(Ignite ignite, /** * @throws Exception If failed. */ + @Test public void testTxLoadFromStore() throws Exception { Ignite ignite0 = ignite(0); @@ -296,6 +299,7 @@ public void testTxLoadFromStore() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxCommitReadOnly1() throws Exception { Ignite ignite0 = ignite(0); @@ -354,6 +358,7 @@ public void testTxCommitReadOnly1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxCommitReadOnly2() throws Exception { Ignite ignite0 = ignite(0); @@ -420,6 +425,7 @@ public void testTxCommitReadOnly2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxCommit() throws Exception { Ignite ignite0 = ignite(0); Ignite ignite1 = ignite(1); @@ -501,6 +507,7 @@ public void testTxCommit() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxRollback() throws Exception { Ignite ignite0 = ignite(0); Ignite ignite1 = ignite(1); @@ -568,6 +575,7 @@ public void testTxRollback() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxCommitReadOnlyGetAll() throws Exception { testTxCommitReadOnlyGetAll(false); } @@ -575,6 +583,7 @@ public void testTxCommitReadOnlyGetAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxCommitReadOnlyGetEntries() throws Exception { testTxCommitReadOnlyGetAll(true); } @@ -643,6 +652,7 @@ private void testTxCommitReadOnlyGetAll(boolean needVer) throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxCommitReadWriteTwoNodes() throws Exception { Ignite ignite0 = ignite(0); @@ -674,6 +684,7 @@ public void testTxCommitReadWriteTwoNodes() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxConflictRead1() throws Exception { txConflictRead(true, false); } @@ -681,6 +692,7 @@ public void testTxConflictRead1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxConflictRead2() throws Exception { txConflictRead(false, false); } @@ -688,6 +700,7 @@ public void testTxConflictRead2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxConflictReadEntry1() throws Exception { txConflictRead(true, true); } @@ -695,6 +708,7 @@ public void testTxConflictReadEntry1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxConflictReadEntry2() throws Exception { txConflictRead(false, true); } @@ -779,6 +793,7 @@ private void txConflictRead(boolean noVal, boolean needVer) throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxConflictReadWrite1() throws Exception { txConflictReadWrite(true, false, false); } @@ -786,6 +801,7 @@ public void testTxConflictReadWrite1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxConflictReadWrite2() throws Exception { txConflictReadWrite(false, false, false); } @@ -793,6 +809,7 @@ public void testTxConflictReadWrite2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxConflictReadRemove1() throws Exception { txConflictReadWrite(true, true, false); } @@ -800,6 +817,7 @@ public void testTxConflictReadRemove1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxConflictReadRemove2() throws Exception { txConflictReadWrite(false, true, false); } @@ -807,6 +825,7 @@ public void testTxConflictReadRemove2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxConflictReadEntryWrite1() throws Exception { txConflictReadWrite(true, false, true); } @@ -814,6 +833,7 @@ public void testTxConflictReadEntryWrite1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxConflictReadEntryWrite2() throws Exception { txConflictReadWrite(false, false, true); } @@ -821,6 +841,7 @@ public void testTxConflictReadEntryWrite2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxConflictReadEntryRemove1() throws Exception { txConflictReadWrite(true, true, true); } @@ -828,6 +849,7 @@ public void testTxConflictReadEntryRemove1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxConflictReadEntryRemove2() throws Exception { txConflictReadWrite(false, true, true); } @@ -924,6 +946,7 @@ private void txConflictReadWrite(boolean noVal, boolean rmv, boolean needVer) th /** * @throws Exception If failed. */ + @Test public void testTxConflictReadWrite3() throws Exception { Ignite ignite0 = ignite(0); @@ -989,6 +1012,7 @@ public void testTxConflictReadWrite3() throws Exception { /** * @throws Exception If failed */ + @Test public void testTxConflictGetAndPut1() throws Exception { txConflictGetAndPut(true, false); } @@ -996,6 +1020,7 @@ public void testTxConflictGetAndPut1() throws Exception { /** * @throws Exception If failed */ + @Test public void testTxConflictGetAndPut2() throws Exception { txConflictGetAndPut(false, false); } @@ -1003,6 +1028,7 @@ public void testTxConflictGetAndPut2() throws Exception { /** * @throws Exception If failed */ + @Test public void testTxConflictGetAndRemove1() throws Exception { txConflictGetAndPut(true, true); } @@ -1010,6 +1036,7 @@ public void testTxConflictGetAndRemove1() throws Exception { /** * @throws Exception If failed */ + @Test public void testTxConflictGetAndRemove2() throws Exception { txConflictGetAndPut(false, true); } @@ -1082,6 +1109,7 @@ private void txConflictGetAndPut(boolean noVal, boolean rmv) throws Exception { /** * @throws Exception If failed */ + @Test public void testTxConflictInvoke1() throws Exception { txConflictInvoke(true, false); } @@ -1089,6 +1117,7 @@ public void testTxConflictInvoke1() throws Exception { /** * @throws Exception If failed */ + @Test public void testTxConflictInvoke2() throws Exception { txConflictInvoke(false, false); } @@ -1096,6 +1125,7 @@ public void testTxConflictInvoke2() throws Exception { /** * @throws Exception If failed */ + @Test public void testTxConflictInvoke3() throws Exception { txConflictInvoke(true, true); } @@ -1103,6 +1133,7 @@ public void testTxConflictInvoke3() throws Exception { /** * @throws Exception If failed */ + @Test public void testTxConflictInvoke4() throws Exception { txConflictInvoke(false, true); } @@ -1175,6 +1206,7 @@ private void txConflictInvoke(boolean noVal, boolean rmv) throws Exception { /** * @throws Exception If failed */ + @Test public void testTxConflictInvokeAll() throws Exception { Ignite ignite0 = ignite(0); @@ -1269,6 +1301,7 @@ public void testTxConflictInvokeAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxConflictPutIfAbsent() throws Exception { Ignite ignite0 = ignite(0); @@ -1355,6 +1388,7 @@ public void testTxConflictPutIfAbsent() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxConflictGetAndPutIfAbsent() throws Exception { Ignite ignite0 = ignite(0); @@ -1441,6 +1475,7 @@ public void testTxConflictGetAndPutIfAbsent() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxConflictReplace() throws Exception { Ignite ignite0 = ignite(0); @@ -1566,6 +1601,7 @@ public void testTxConflictReplace() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxConflictGetAndReplace() throws Exception { Ignite ignite0 = ignite(0); @@ -1691,6 +1727,7 @@ public void testTxConflictGetAndReplace() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxConflictRemoveWithOldValue() throws Exception { Ignite ignite0 = ignite(0); @@ -1828,6 +1865,7 @@ public void testTxConflictRemoveWithOldValue() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxConflictCasReplace() throws Exception { Ignite ignite0 = ignite(0); @@ -1965,6 +2003,7 @@ public void testTxConflictCasReplace() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxConflictRemoveReturnBoolean1() throws Exception { txConflictRemoveReturnBoolean(false); } @@ -1972,6 +2011,7 @@ public void testTxConflictRemoveReturnBoolean1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxConflictRemoveReturnBoolean2() throws Exception { txConflictRemoveReturnBoolean(true); } @@ -2136,6 +2176,7 @@ private void txConflictRemoveReturnBoolean(boolean noVal) throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxNoConflictPut1() throws Exception { txNoConflictUpdate(true, false, false); } @@ -2143,6 +2184,7 @@ public void testTxNoConflictPut1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxNoConflictPut2() throws Exception { txNoConflictUpdate(false, false, false); } @@ -2150,6 +2192,7 @@ public void testTxNoConflictPut2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxNoConflictPut3() throws Exception { txNoConflictUpdate(false, false, true); } @@ -2157,6 +2200,7 @@ public void testTxNoConflictPut3() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxNoConflictRemove1() throws Exception { txNoConflictUpdate(true, true, false); } @@ -2164,6 +2208,7 @@ public void testTxNoConflictRemove1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxNoConflictRemove2() throws Exception { txNoConflictUpdate(false, true, false); } @@ -2171,6 +2216,7 @@ public void testTxNoConflictRemove2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxNoConflictRemove3() throws Exception { txNoConflictUpdate(false, true, true); } @@ -2286,6 +2332,7 @@ private void txNoConflictUpdate(boolean noVal, boolean rmv, boolean getAfterUpda /** * @throws Exception If failed. */ + @Test public void testTxNoConflictContainsKey1() throws Exception { txNoConflictContainsKey(false); } @@ -2293,6 +2340,7 @@ public void testTxNoConflictContainsKey1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxNoConflictContainsKey2() throws Exception { txNoConflictContainsKey(true); } @@ -2376,6 +2424,7 @@ private void txNoConflictContainsKey(boolean noVal) throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxRollbackIfLocked1() throws Exception { Ignite ignite0 = ignite(0); @@ -2435,6 +2484,7 @@ public void testTxRollbackIfLocked1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxRollbackIfLocked2() throws Exception { rollbackIfLockedPartialLock(false); } @@ -2442,6 +2492,7 @@ public void testTxRollbackIfLocked2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxRollbackIfLocked3() throws Exception { rollbackIfLockedPartialLock(true); } @@ -2508,6 +2559,7 @@ private void rollbackIfLockedPartialLock(boolean locKey) throws Exception { /** * @throws Exception If failed. */ + @Test public void testNoReadLockConflict() throws Exception { checkNoReadLockConflict(false); } @@ -2515,6 +2567,7 @@ public void testNoReadLockConflict() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNoReadLockConflictGetEntry() throws Exception { checkNoReadLockConflict(true); } @@ -2615,6 +2668,7 @@ private void checkNoReadLockConflict(final Ignite ignite, /** * @throws Exception If failed. */ + @Test public void testNoReadLockConflictMultiNode() throws Exception { Ignite ignite0 = ignite(0); @@ -2676,6 +2730,7 @@ public void testNoReadLockConflictMultiNode() throws Exception { * @throws Exception If failed. */ @SuppressWarnings("UnnecessaryLocalVariable") + @Test public void testReadLockPessimisticTxConflict() throws Exception { Ignite ignite0 = ignite(0); @@ -2730,6 +2785,7 @@ public void testReadLockPessimisticTxConflict() throws Exception { * @throws Exception If failed. */ @SuppressWarnings("UnnecessaryLocalVariable") + @Test public void testReadWriteTxConflict() throws Exception { Ignite ignite0 = ignite(0); @@ -2783,6 +2839,7 @@ public void testReadWriteTxConflict() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReadWriteTransactionsNoDeadlock() throws Exception { checkReadWriteTransactionsNoDeadlock(false); } @@ -2790,6 +2847,7 @@ public void testReadWriteTransactionsNoDeadlock() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReadWriteTransactionsNoDeadlockMultinode() throws Exception { checkReadWriteTransactionsNoDeadlock(true); } @@ -2854,6 +2912,7 @@ private void checkReadWriteTransactionsNoDeadlock(final boolean multiNode) throw /** * @throws Exception If failed. */ + @Test public void testReadWriteAccountTx() throws Exception { final CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, FULL_SYNC, @@ -3033,6 +3092,7 @@ public void testReadWriteAccountTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNearCacheReaderUpdate() throws Exception { Ignite ignite0 = ignite(0); @@ -3081,6 +3141,7 @@ public void testNearCacheReaderUpdate() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRollbackNearCache1() throws Exception { rollbackNearCacheWrite(true); } @@ -3088,6 +3149,7 @@ public void testRollbackNearCache1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRollbackNearCache2() throws Exception { rollbackNearCacheWrite(false); } @@ -3167,6 +3229,7 @@ private void rollbackNearCacheWrite(boolean near) throws Exception { /** * @throws Exception If failed. */ + @Test public void testRollbackNearCache3() throws Exception { rollbackNearCacheRead(true); } @@ -3174,6 +3237,7 @@ public void testRollbackNearCache3() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRollbackNearCache4() throws Exception { rollbackNearCacheRead(false); } @@ -3247,6 +3311,7 @@ private void rollbackNearCacheRead(boolean near) throws Exception { /** * @throws Exception If failed. */ + @Test public void testCrossCacheTx() throws Exception { Ignite ignite0 = ignite(0); @@ -3510,6 +3575,7 @@ public void testCrossCacheTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRandomOperations() throws Exception { Ignite ignite0 = ignite(0); @@ -3609,6 +3675,7 @@ private void randomOperation(ThreadLocalRandom rnd, IgniteCache destroy -> start -> close using CacheManager. */ + @Test public void testTckStyleCreateDestroyClose() throws Exception { startGridsMultiThreaded(gridCount()); @@ -788,6 +801,7 @@ public void testTckStyleCreateDestroyClose() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConcurrentUseAndCloseFromClient() throws Exception { testConcurrentUseAndClose(true); } @@ -795,6 +809,7 @@ public void testConcurrentUseAndCloseFromClient() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConcurrentUseAndCloseFromServer() throws Exception { testConcurrentUseAndClose(false); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStoreUsageMultinodeDynamicStartAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStoreUsageMultinodeDynamicStartAbstractTest.java index 745e97b81324b..649553199a3f6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStoreUsageMultinodeDynamicStartAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStoreUsageMultinodeDynamicStartAbstractTest.java @@ -40,6 +40,7 @@ public abstract class CacheStoreUsageMultinodeDynamicStartAbstractTest extends C /** * @throws Exception If failed. */ + @Test public void testDynamicStart() throws Exception { checkStoreWithDynamicStart(false); } @@ -47,6 +48,7 @@ public void testDynamicStart() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDynamicStartNearEnabled() throws Exception { nearCache = true; @@ -56,6 +58,7 @@ public void testDynamicStartNearEnabled() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDynamicFromClientStart() throws Exception { checkStoreWithDynamicStart(true); } @@ -63,6 +66,7 @@ public void testDynamicFromClientStart() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDynamicStartFromClientNearEnabled() throws Exception { nearCache = true; @@ -72,6 +76,7 @@ public void testDynamicStartFromClientNearEnabled() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDynamicStartLocalStore() throws Exception { locStore = true; @@ -81,6 +86,7 @@ public void testDynamicStartLocalStore() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDynamicStartFromClientLocalStore() throws Exception { locStore = true; @@ -90,6 +96,7 @@ public void testDynamicStartFromClientLocalStore() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDynamicStartLocalStoreNearEnabled() throws Exception { locStore = true; @@ -101,6 +108,7 @@ public void testDynamicStartLocalStoreNearEnabled() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDynamicStartWriteBehindStore() throws Exception { writeBehind = true; @@ -110,6 +118,7 @@ public void testDynamicStartWriteBehindStore() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDynamicStartFromClientWriteBehindStore() throws Exception { writeBehind = true; @@ -119,6 +128,7 @@ public void testDynamicStartFromClientWriteBehindStore() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDynamicStartWriteBehindStoreNearEnabled() throws Exception { writeBehind = true; @@ -161,4 +171,4 @@ private void checkStoreWithDynamicStart(boolean clientStart) throws Exception { cache.destroy(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStoreUsageMultinodeStaticStartAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStoreUsageMultinodeStaticStartAbstractTest.java index e16f16ed937dc..4f3f4a908bd52 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStoreUsageMultinodeStaticStartAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStoreUsageMultinodeStaticStartAbstractTest.java @@ -31,6 +31,7 @@ public abstract class CacheStoreUsageMultinodeStaticStartAbstractTest extends Ca /** * @throws Exception If failed. */ + @Test public void testStaticConfiguration() throws Exception { checkStoreUpdateStaticConfig(true); } @@ -38,6 +39,7 @@ public void testStaticConfiguration() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStaticConfigurationNearEnabled() throws Exception { nearCache = true; @@ -47,6 +49,7 @@ public void testStaticConfigurationNearEnabled() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStaticConfigurationLocalStore() throws Exception { locStore = true; @@ -56,6 +59,7 @@ public void testStaticConfigurationLocalStore() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStaticConfigurationLocalStoreNearEnabled() throws Exception { locStore = true; @@ -67,6 +71,7 @@ public void testStaticConfigurationLocalStoreNearEnabled() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStaticConfigurationTxLocalStoreNoClientStore() throws Exception { locStore = true; @@ -76,6 +81,7 @@ public void testStaticConfigurationTxLocalStoreNoClientStore() throws Exception /** * @throws Exception If failed. */ + @Test public void testStaticConfigurationTxLocalStoreNoClientStoreNearEnabled() throws Exception { locStore = true; @@ -87,6 +93,7 @@ public void testStaticConfigurationTxLocalStoreNoClientStoreNearEnabled() throws /** * @throws Exception If failed. */ + @Test public void testStaticConfigurationTxWriteBehindStore() throws Exception { writeBehind = true; @@ -96,6 +103,7 @@ public void testStaticConfigurationTxWriteBehindStore() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStaticConfigurationTxWriteBehindStoreNearEnabled() throws Exception { writeBehind = true; @@ -107,6 +115,7 @@ public void testStaticConfigurationTxWriteBehindStoreNearEnabled() throws Except /** * @throws Exception If failed. */ + @Test public void testStaticConfigurationTxWriteBehindStoreNoClientStore() throws Exception { writeBehind = true; @@ -116,6 +125,7 @@ public void testStaticConfigurationTxWriteBehindStoreNoClientStore() throws Exce /** * @throws Exception If failed. */ + @Test public void testStaticConfigurationTxWriteBehindStoreNoClientStoreNearEnabled() throws Exception { writeBehind = true; @@ -148,4 +158,4 @@ private void checkStoreUpdateStaticConfig(boolean clientStore) throws Exception stopAllGrids(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheTxFastFinishTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheTxFastFinishTest.java index 79316bfa457b4..242e647821682 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheTxFastFinishTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheTxFastFinishTest.java @@ -91,6 +91,7 @@ public class CacheTxFastFinishTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testFastFinishTxNearCache() throws Exception { nearCache = true; @@ -100,6 +101,7 @@ public void testFastFinishTxNearCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFastFinishTx() throws Exception { fastFinishTx(); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheTxNotAllowReadFromBackupTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheTxNotAllowReadFromBackupTest.java index f0ec084a55764..7408c29333afd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheTxNotAllowReadFromBackupTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheTxNotAllowReadFromBackupTest.java @@ -77,6 +77,7 @@ public class CacheTxNotAllowReadFromBackupTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testBackupConsistencyReplicated() throws Exception { CacheConfiguration cfg = new CacheConfiguration<>("test-cache"); @@ -105,6 +106,7 @@ public void testBackupConsistencyReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBackupConsistencyReplicatedFullSync() throws Exception { CacheConfiguration cfg = new CacheConfiguration<>("test-cache"); @@ -133,6 +135,7 @@ public void testBackupConsistencyReplicatedFullSync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBackupConsistencyPartitioned() throws Exception { CacheConfiguration cfg = new CacheConfiguration<>("test-cache"); @@ -162,6 +165,7 @@ public void testBackupConsistencyPartitioned() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBackupConsistencyPartitionedFullSync() throws Exception { CacheConfiguration cfg = new CacheConfiguration<>("test-cache"); @@ -287,4 +291,4 @@ private void checkBackupConsistencyGetAll(CacheConfiguration c } return batches; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheValidatorMetricsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheValidatorMetricsTest.java index 4a950dda8f1a1..e504171e26360 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheValidatorMetricsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheValidatorMetricsTest.java @@ -90,6 +90,7 @@ void assertCacheStatus(String cacheName, boolean validForReading, boolean validF * * @throws Exception If failed. */ + @Test public void testCacheValidatorMetrics() throws Exception { startGrid(1); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CashEventWithTxLabelTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CashEventWithTxLabelTest.java index da2528850a57b..b990887a2fdf7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CashEventWithTxLabelTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CashEventWithTxLabelTest.java @@ -134,6 +134,7 @@ public class CashEventWithTxLabelTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testPassTxLabelInCashEventForAllCases() throws Exception { Ignite[] nodes = {client(), primary(), backup1(), backup2()}; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/ClusterReadOnlyModeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/ClusterReadOnlyModeTest.java index ab57614a9e86d..b519cf858c4fb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/ClusterReadOnlyModeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/ClusterReadOnlyModeTest.java @@ -32,6 +32,7 @@ public class ClusterReadOnlyModeTest extends ClusterReadOnlyModeAbstractTest { /** * Tests cache get/put/remove. */ + @Test public void testCacheGetPutRemove() { assertCachesReadOnlyMode(false); @@ -47,6 +48,7 @@ public void testCacheGetPutRemove() { /** * Tests data streamer. */ + @Test public void testDataStreamerReadOnly() { assertDataStreamerReadOnlyMode(false); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/ClusterStateAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/ClusterStateAbstractTest.java index 2ffd726020fa4..9ffac019e088b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/ClusterStateAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/ClusterStateAbstractTest.java @@ -105,6 +105,7 @@ public abstract class ClusterStateAbstractTest extends GridCommonAbstractTest { /** * @throws Exception if failed. */ + @Test public void testDynamicCacheStart() throws Exception { activeOnStart = false; @@ -134,6 +135,7 @@ public void testDynamicCacheStart() throws Exception { /** * @throws Exception if failed. */ + @Test public void testNoRebalancing() throws Exception { activeOnStart = false; @@ -215,6 +217,7 @@ public void testNoRebalancing() throws Exception { /** * @throws Exception if failed. */ + @Test public void testActivationFromClient() throws Exception { forbidden.add(GridDhtPartitionSupplyMessage.class); forbidden.add(GridDhtPartitionDemandMessage.class); @@ -273,6 +276,7 @@ public void testActivationFromClient() throws Exception { * * @throws Exception If fails. */ + @Test public void testDeactivationWithPendingLock() throws Exception { startGrids(GRID_CNT); @@ -297,6 +301,7 @@ public void testDeactivationWithPendingLock() throws Exception { * * @throws Exception If failed. */ + @Test public void testDeactivationWithPendingTransaction() throws Exception { startGrids(GRID_CNT); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/ConcurrentCacheStartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/ConcurrentCacheStartTest.java index 28a6683e19aed..05cedba093f1e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/ConcurrentCacheStartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/ConcurrentCacheStartTest.java @@ -32,6 +32,7 @@ public class ConcurrentCacheStartTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void test() throws Exception { try { final IgniteEx ignite = (IgniteEx) startGrids(4); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CrossCacheLockTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CrossCacheLockTest.java index 8f0e20f604ece..528e10b1b1ed1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CrossCacheLockTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CrossCacheLockTest.java @@ -80,6 +80,7 @@ public class CrossCacheLockTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testLockUnlock() throws Exception { for (int i = 0; i < GRID_CNT; i++) { Ignite ignite = ignite(i); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CrossCacheTxRandomOperationsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CrossCacheTxRandomOperationsTest.java index cba3771665ff5..5ee931b9b0dd9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CrossCacheTxRandomOperationsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CrossCacheTxRandomOperationsTest.java @@ -113,6 +113,7 @@ protected boolean nearCacheEnabled() { /** * @throws Exception If failed. */ + @Test public void testTxOperations() throws Exception { txOperations(PARTITIONED, FULL_SYNC, false); } @@ -120,6 +121,7 @@ public void testTxOperations() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCrossCacheTxOperations() throws Exception { txOperations(PARTITIONED, FULL_SYNC, true); } @@ -127,6 +129,7 @@ public void testCrossCacheTxOperations() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCrossCacheTxOperationsPrimarySync() throws Exception { txOperations(PARTITIONED, PRIMARY_SYNC, true); } @@ -134,6 +137,7 @@ public void testCrossCacheTxOperationsPrimarySync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCrossCacheTxOperationsReplicated() throws Exception { txOperations(REPLICATED, FULL_SYNC, true); } @@ -141,6 +145,7 @@ public void testCrossCacheTxOperationsReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCrossCacheTxOperationsReplicatedPrimarySync() throws Exception { txOperations(REPLICATED, PRIMARY_SYNC, true); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/DataStorageConfigurationValidationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/DataStorageConfigurationValidationTest.java index 9471a826fa426..aa792a1aeb154 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/DataStorageConfigurationValidationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/DataStorageConfigurationValidationTest.java @@ -31,6 +31,7 @@ public class DataStorageConfigurationValidationTest extends TestCase { * * @throws Exception If failed. */ + @Test public void testWalSegmentSizeOverflow() throws Exception { final DataStorageConfiguration cfg = new DataStorageConfiguration(); @@ -46,6 +47,7 @@ public void testWalSegmentSizeOverflow() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSetWalSegmentSizeShouldThrowExceptionWhenSizeLessThen512Kb() throws Exception { final DataStorageConfiguration cfg = new DataStorageConfiguration(); @@ -61,6 +63,7 @@ public void testSetWalSegmentSizeShouldThrowExceptionWhenSizeLessThen512Kb() thr /** * @throws Exception If failed. */ + @Test public void testSetWalSegmentSizeShouldBeOkWhenSizeBetween512KbAnd2Gb() throws Exception { final DataStorageConfiguration cfg = new DataStorageConfiguration(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/EntryVersionConsistencyReadThroughTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/EntryVersionConsistencyReadThroughTest.java index 9e6f627e68424..3daf9386a7207 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/EntryVersionConsistencyReadThroughTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/EntryVersionConsistencyReadThroughTest.java @@ -104,6 +104,7 @@ private CacheConfiguration> createCacheConfiguration(CacheA /** * @throws Exception If failed. */ + @Test public void testInvokeAllTransactionalCache() throws Exception { check(false, createCacheConfiguration(TRANSACTIONAL)); } @@ -111,6 +112,7 @@ public void testInvokeAllTransactionalCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeAllMvccTxCache() throws Exception { if (!MvccFeatureChecker.isSupported(MvccFeatureChecker.Feature.CACHE_STORE)) fail("https://issues.apache.org/jira/browse/IGNITE-8582"); @@ -121,6 +123,7 @@ public void testInvokeAllMvccTxCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeAllAtomicCache() throws Exception { check(false, createCacheConfiguration(ATOMIC)); } @@ -128,6 +131,7 @@ public void testInvokeAllAtomicCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeAtomicCache() throws Exception { check(true, createCacheConfiguration(ATOMIC)); } @@ -135,6 +139,7 @@ public void testInvokeAtomicCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeTransactionalCache() throws Exception { check(true, createCacheConfiguration(TRANSACTIONAL)); } @@ -142,6 +147,7 @@ public void testInvokeTransactionalCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeMvccTxCache() throws Exception { if (!MvccFeatureChecker.isSupported(MvccFeatureChecker.Feature.CACHE_STORE)) fail("https://issues.apache.org/jira/browse/IGNITE-8582"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridAbstractCacheInterceptorRebalanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridAbstractCacheInterceptorRebalanceTest.java index 80b65308fd244..2666fbfb5598f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridAbstractCacheInterceptorRebalanceTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridAbstractCacheInterceptorRebalanceTest.java @@ -110,6 +110,7 @@ public abstract class GridAbstractCacheInterceptorRebalanceTest extends GridComm /** * @throws Exception If fail. */ + @Test public void testRebalanceUpdate() throws Exception { interceptor = new RebalanceUpdateInterceptor(); @@ -123,6 +124,7 @@ public void testRebalanceUpdate() throws Exception { /** * @throws Exception If fail. */ + @Test public void testRebalanceUpdateInvoke() throws Exception { interceptor = new RebalanceUpdateInterceptor(); @@ -138,6 +140,7 @@ public void testRebalanceUpdateInvoke() throws Exception { /** * @throws Exception If fail. */ + @Test public void testRebalanceRemoveInvoke() throws Exception { interceptor = new RebalanceUpdateInterceptor(); @@ -153,6 +156,7 @@ public void testRebalanceRemoveInvoke() throws Exception { /** * @throws Exception If fail. */ + @Test public void testRebalanceRemove() throws Exception { interceptor = new RebalanceRemoveInterceptor(); @@ -166,6 +170,7 @@ public void testRebalanceRemove() throws Exception { /** * @throws Exception If fail. */ + @Test public void testPutIfAbsent() throws Exception { interceptor = new RebalanceUpdateInterceptor(); @@ -179,6 +184,7 @@ public void testPutIfAbsent() throws Exception { /** * @throws Exception If fail. */ + @Test public void testGetAndPut() throws Exception { interceptor = new RebalanceUpdateInterceptor(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFailoverSelfTest.java index 5c204c75d51d0..637a1abe893a4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFailoverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFailoverSelfTest.java @@ -129,6 +129,7 @@ public abstract class GridCacheAbstractFailoverSelfTest extends GridCacheAbstrac /** * @throws Exception If failed. */ + @Test public void testTopologyChange() throws Exception { testTopologyChange(null, null); } @@ -136,6 +137,7 @@ public void testTopologyChange() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConstantTopologyChange() throws Exception { testConstantTopologyChange(null, null); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFailoverTxSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFailoverTxSelfTest.java index 353386b921db0..9a3d1eca1f296 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFailoverTxSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFailoverTxSelfTest.java @@ -30,6 +30,7 @@ public abstract class GridCacheAbstractFailoverTxSelfTest extends GridCacheAbstr /** * @throws Exception If failed. */ + @Test public void testOptimisticReadCommittedTxConstantTopologyChange() throws Exception { testConstantTopologyChange(OPTIMISTIC, READ_COMMITTED); } @@ -37,6 +38,7 @@ public void testOptimisticReadCommittedTxConstantTopologyChange() throws Excepti /** * @throws Exception If failed. */ + @Test public void testOptimisticRepeatableReadTxConstantTopologyChange() throws Exception { testConstantTopologyChange(OPTIMISTIC, REPEATABLE_READ); } @@ -44,6 +46,7 @@ public void testOptimisticRepeatableReadTxConstantTopologyChange() throws Except /** * @throws Exception If failed. */ + @Test public void testOptimisticSerializableTxConstantTopologyChange() throws Exception { testConstantTopologyChange(OPTIMISTIC, SERIALIZABLE); } @@ -51,6 +54,7 @@ public void testOptimisticSerializableTxConstantTopologyChange() throws Exceptio /** * @throws Exception If failed. */ + @Test public void testPessimisticReadCommittedTxConstantTopologyChange() throws Exception { testConstantTopologyChange(PESSIMISTIC, READ_COMMITTED); } @@ -58,6 +62,7 @@ public void testPessimisticReadCommittedTxConstantTopologyChange() throws Except /** * @throws Exception If failed. */ + @Test public void testPessimisticRepeatableReadTxConstantTopologyChange() throws Exception { testConstantTopologyChange(PESSIMISTIC, REPEATABLE_READ); } @@ -65,6 +70,7 @@ public void testPessimisticRepeatableReadTxConstantTopologyChange() throws Excep /** * @throws Exception If failed. */ + @Test public void testPessimisticSerializableTxConstantTopologyChange() throws Exception { testConstantTopologyChange(PESSIMISTIC, SERIALIZABLE); } @@ -72,6 +78,7 @@ public void testPessimisticSerializableTxConstantTopologyChange() throws Excepti /** * @throws Exception If failed. */ + @Test public void testOptimisticReadCommittedTxTopologyChange() throws Exception { testTopologyChange(OPTIMISTIC, READ_COMMITTED); } @@ -79,6 +86,7 @@ public void testOptimisticReadCommittedTxTopologyChange() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOptimisticRepeatableReadTxTopologyChange() throws Exception { testTopologyChange(OPTIMISTIC, REPEATABLE_READ); } @@ -86,6 +94,7 @@ public void testOptimisticRepeatableReadTxTopologyChange() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOptimisticSerializableTxTopologyChange() throws Exception { testTopologyChange(OPTIMISTIC, SERIALIZABLE); } @@ -93,6 +102,7 @@ public void testOptimisticSerializableTxTopologyChange() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticReadCommittedTxTopologyChange() throws Exception { testTopologyChange(PESSIMISTIC, READ_COMMITTED); } @@ -100,6 +110,7 @@ public void testPessimisticReadCommittedTxTopologyChange() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticRepeatableReadTxTopologyChange() throws Exception { testTopologyChange(PESSIMISTIC, REPEATABLE_READ); } @@ -107,7 +118,8 @@ public void testPessimisticRepeatableReadTxTopologyChange() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticSerializableTxTopologyChange() throws Exception { testTopologyChange(PESSIMISTIC, SERIALIZABLE); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java index 140efb0fd8be6..b379f4f7c429e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java @@ -163,6 +163,7 @@ private Set rangeKeys(int fromIncl, int toExcl) { /** * @throws Exception In case of error. */ + @Test public void testContainsKey() throws Exception { runTest(new CI1>() { @Override public void apply(IgniteCache cache) { @@ -175,6 +176,7 @@ public void testContainsKey() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testGet() throws Exception { runTest(new CIX1>() { @Override public void applyx(IgniteCache cache) { @@ -189,6 +191,7 @@ public void testGet() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testGetAsyncOld() throws Exception { runTest(new CIX1>() { @Override public void applyx(IgniteCache cache) { @@ -210,6 +213,7 @@ public void testGetAsyncOld() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testGetAsync() throws Exception { runTest(new CIX1>() { @Override public void applyx(IgniteCache cache) { @@ -225,6 +229,7 @@ public void testGetAsync() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testGetAll() throws Exception { runTest(new CIX1>() { @Override public void applyx(IgniteCache cache) { @@ -243,6 +248,7 @@ public void testGetAll() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testGetAllAsyncOld() throws Exception { runTest(new CIX1>() { @Override public void applyx(IgniteCache cache) { @@ -265,6 +271,7 @@ public void testGetAllAsyncOld() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testGetAllAsync() throws Exception { runTest(new CIX1>() { @Override public void applyx(IgniteCache cache) { @@ -283,6 +290,7 @@ public void testGetAllAsync() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testRemove() throws Exception { runTest(new CIX1>() { @Override public void applyx(IgniteCache cache) { @@ -314,6 +322,7 @@ public void testRemove() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testRemoveAsyncOld() throws Exception { runTest(new CIX1>() { @Override public void applyx(IgniteCache cache) { @@ -352,6 +361,7 @@ public void testRemoveAsyncOld() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testRemoveAsync() throws Exception { runTest(new CIX1>() { @Override public void applyx(IgniteCache cache) { @@ -384,6 +394,7 @@ public void testRemoveAsync() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testRemoveAll() throws Exception { runTest(new CIX1>() { @Override public void applyx(IgniteCache cache) { @@ -404,6 +415,7 @@ public void testRemoveAll() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testRemoveAllAsyncOld() throws Exception { runTest(new CIX1>() { @Override public void applyx(IgniteCache cache) { @@ -428,6 +440,7 @@ public void testRemoveAllAsyncOld() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testRemoveAllAsync() throws Exception { runTest(new CIX1>() { @Override public void applyx(IgniteCache cache) { @@ -463,4 +476,4 @@ private V removeAsync(IgniteCache cache, K key) { private boolean removeAsync(IgniteCache cache, K key, V val) { return cache.removeAsync(key, val).get(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java index 5f4f349051954..01de7000b80e5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java @@ -274,6 +274,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract * * @throws Exception if something goes bad. */ + @Test public void testInvokeAllMultithreaded() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-4380"); @@ -299,6 +300,7 @@ public void testInvokeAllMultithreaded() throws Exception { /** * Checks that skipStore flag gets overridden inside a transaction. */ + @Test public void testWriteThroughTx() { String key = "writeThroughKey"; @@ -325,6 +327,7 @@ public void testWriteThroughTx() { /** * Checks that skipStore flag gets overridden inside a transaction. */ + @Test public void testNoReadThroughTx() { String key = "writeThroughKey"; @@ -406,6 +409,7 @@ protected IgniteCache fullCache() { /** * @throws Exception In case of error. */ + @Test public void testSize() throws Exception { assert jcache().localSize() == 0; @@ -471,6 +475,7 @@ public void testSize() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testContainsKey() throws Exception { jcache().put("testContainsKey", 1); @@ -481,6 +486,7 @@ public void testContainsKey() throws Exception { /** * @throws Exception If failed. */ + @Test public void testContainsKeyTx() throws Exception { if (!txEnabled()) return; @@ -515,6 +521,7 @@ public void testContainsKeyTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testContainsKeysTx() throws Exception { if (!txEnabled()) return; @@ -556,6 +563,7 @@ public void testContainsKeysTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemoveInExplicitLocks() throws Exception { if (lockingEnabled()) { IgniteCache cache = jcache(); @@ -581,6 +589,7 @@ public void testRemoveInExplicitLocks() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemoveAllSkipStore() throws Exception { IgniteCache jcache = jcache(); @@ -596,6 +605,7 @@ public void testRemoveAllSkipStore() throws Exception { /** * @throws IgniteCheckedException If failed. */ + @Test public void testAtomicOps() throws IgniteCheckedException { IgniteCache c = jcache(); @@ -628,6 +638,7 @@ public void testAtomicOps() throws IgniteCheckedException { /** * @throws Exception In case of error. */ + @Test public void testGet() throws Exception { IgniteCache cache = jcache(); @@ -642,6 +653,7 @@ public void testGet() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testGetEntry() throws Exception { IgniteCache cache = jcache(); @@ -666,6 +678,7 @@ public void testGetEntry() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testGetAsync() throws Exception { IgniteCache cache = jcache(); @@ -686,6 +699,7 @@ public void testGetAsync() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testGetAsyncOld() throws Exception { IgniteCache cache = jcache(); @@ -715,6 +729,7 @@ public void testGetAsyncOld() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testGetAll() throws Exception { Transaction tx = txShouldBeUsed() ? transactions().txStart() : null; @@ -795,6 +810,7 @@ public void testGetAll() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testGetEntries() throws Exception { Transaction tx = txShouldBeUsed() ? transactions().txStart() : null; @@ -911,6 +927,7 @@ public void testGetEntries() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testGetAllWithLastNull() throws Exception { final IgniteCache cache = jcache(); @@ -931,6 +948,7 @@ public void testGetAllWithLastNull() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testGetAllWithFirstNull() throws Exception { final IgniteCache cache = jcache(); @@ -951,6 +969,7 @@ public void testGetAllWithFirstNull() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testGetAllWithInTheMiddle() throws Exception { final IgniteCache cache = jcache(); @@ -972,6 +991,7 @@ public void testGetAllWithInTheMiddle() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetTxNonExistingKey() throws Exception { if (txShouldBeUsed()) { try (Transaction ignored = transactions().txStart()) { @@ -983,6 +1003,7 @@ public void testGetTxNonExistingKey() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testGetAllAsync() throws Exception { final IgniteCache cache = jcache(); @@ -1010,6 +1031,7 @@ public void testGetAllAsync() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testGetAllAsyncOld() throws Exception { final IgniteCache cache = jcache(); @@ -1041,6 +1063,7 @@ public void testGetAllAsyncOld() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testPut() throws Exception { IgniteCache cache = jcache(); @@ -1077,6 +1100,7 @@ public void testPut() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testPutTx() throws Exception { if (txShouldBeUsed()) { IgniteCache cache = jcache(); @@ -1116,6 +1140,7 @@ public void testPutTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTransformOptimisticReadCommitted() throws Exception { checkTransform(OPTIMISTIC, READ_COMMITTED); } @@ -1123,6 +1148,7 @@ public void testTransformOptimisticReadCommitted() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTransformOptimisticRepeatableRead() throws Exception { checkTransform(OPTIMISTIC, REPEATABLE_READ); } @@ -1130,6 +1156,7 @@ public void testTransformOptimisticRepeatableRead() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTransformPessimisticReadCommitted() throws Exception { checkTransform(PESSIMISTIC, READ_COMMITTED); } @@ -1137,6 +1164,7 @@ public void testTransformPessimisticReadCommitted() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTransformPessimisticRepeatableRead() throws Exception { checkTransform(PESSIMISTIC, REPEATABLE_READ); } @@ -1144,6 +1172,7 @@ public void testTransformPessimisticRepeatableRead() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIgniteTransformOptimisticReadCommitted() throws Exception { checkIgniteTransform(OPTIMISTIC, READ_COMMITTED); } @@ -1151,6 +1180,7 @@ public void testIgniteTransformOptimisticReadCommitted() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIgniteTransformOptimisticRepeatableRead() throws Exception { checkIgniteTransform(OPTIMISTIC, REPEATABLE_READ); } @@ -1158,6 +1188,7 @@ public void testIgniteTransformOptimisticRepeatableRead() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIgniteTransformPessimisticReadCommitted() throws Exception { checkIgniteTransform(PESSIMISTIC, READ_COMMITTED); } @@ -1165,6 +1196,7 @@ public void testIgniteTransformPessimisticReadCommitted() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIgniteTransformPessimisticRepeatableRead() throws Exception { checkIgniteTransform(PESSIMISTIC, REPEATABLE_READ); } @@ -1281,6 +1313,7 @@ private void checkTransform(TransactionConcurrency concurrency, TransactionIsola /** * @throws Exception If failed. */ + @Test public void testTransformAllOptimisticReadCommitted() throws Exception { checkTransformAll(OPTIMISTIC, READ_COMMITTED); } @@ -1288,6 +1321,7 @@ public void testTransformAllOptimisticReadCommitted() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTransformAllOptimisticRepeatableRead() throws Exception { checkTransformAll(OPTIMISTIC, REPEATABLE_READ); } @@ -1295,6 +1329,7 @@ public void testTransformAllOptimisticRepeatableRead() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTransformAllPessimisticReadCommitted() throws Exception { checkTransformAll(PESSIMISTIC, READ_COMMITTED); } @@ -1302,6 +1337,7 @@ public void testTransformAllPessimisticReadCommitted() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTransformAllPessimisticRepeatableRead() throws Exception { checkTransformAll(PESSIMISTIC, REPEATABLE_READ); } @@ -1392,6 +1428,7 @@ private void checkTransformAll(TransactionConcurrency concurrency, TransactionIs /** * @throws Exception If failed. */ + @Test public void testTransformAllWithNulls() throws Exception { final IgniteCache cache = jcache(); @@ -1438,6 +1475,7 @@ public void testTransformAllWithNulls() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTransformSequentialOptimisticNoStart() throws Exception { checkTransformSequential0(false, OPTIMISTIC); } @@ -1445,6 +1483,7 @@ public void testTransformSequentialOptimisticNoStart() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTransformSequentialPessimisticNoStart() throws Exception { checkTransformSequential0(false, PESSIMISTIC); } @@ -1452,6 +1491,7 @@ public void testTransformSequentialPessimisticNoStart() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTransformSequentialOptimisticWithStart() throws Exception { checkTransformSequential0(true, OPTIMISTIC); } @@ -1459,6 +1499,7 @@ public void testTransformSequentialOptimisticWithStart() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTransformSequentialPessimisticWithStart() throws Exception { checkTransformSequential0(true, PESSIMISTIC); } @@ -1515,6 +1556,7 @@ private void checkTransformSequential0(boolean startVal, TransactionConcurrency /** * @throws Exception If failed. */ + @Test public void testTransformAfterRemoveOptimistic() throws Exception { checkTransformAfterRemove(OPTIMISTIC); } @@ -1522,6 +1564,7 @@ public void testTransformAfterRemoveOptimistic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTransformAfterRemovePessimistic() throws Exception { checkTransformAfterRemove(PESSIMISTIC); } @@ -1558,6 +1601,7 @@ private void checkTransformAfterRemove(TransactionConcurrency concurrency) throw /** * @throws Exception If failed. */ + @Test public void testTransformReturnValueGetOptimisticReadCommitted() throws Exception { checkTransformReturnValue(false, OPTIMISTIC, READ_COMMITTED); } @@ -1565,6 +1609,7 @@ public void testTransformReturnValueGetOptimisticReadCommitted() throws Exceptio /** * @throws Exception If failed. */ + @Test public void testTransformReturnValueGetOptimisticRepeatableRead() throws Exception { checkTransformReturnValue(false, OPTIMISTIC, REPEATABLE_READ); } @@ -1572,6 +1617,7 @@ public void testTransformReturnValueGetOptimisticRepeatableRead() throws Excepti /** * @throws Exception If failed. */ + @Test public void testTransformReturnValueGetPessimisticReadCommitted() throws Exception { checkTransformReturnValue(false, PESSIMISTIC, READ_COMMITTED); } @@ -1579,6 +1625,7 @@ public void testTransformReturnValueGetPessimisticReadCommitted() throws Excepti /** * @throws Exception If failed. */ + @Test public void testTransformReturnValueGetPessimisticRepeatableRead() throws Exception { checkTransformReturnValue(false, PESSIMISTIC, REPEATABLE_READ); } @@ -1586,6 +1633,7 @@ public void testTransformReturnValueGetPessimisticRepeatableRead() throws Except /** * @throws Exception If failed. */ + @Test public void testTransformReturnValuePutInTx() throws Exception { checkTransformReturnValue(true, OPTIMISTIC, READ_COMMITTED); } @@ -1631,6 +1679,7 @@ private void checkTransformReturnValue(boolean put, /** * @throws Exception In case of error. */ + @Test public void testGetAndPutAsyncOld() throws Exception { IgniteCache cache = jcache(); @@ -1657,6 +1706,7 @@ public void testGetAndPutAsyncOld() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testGetAndPutAsync() throws Exception { IgniteCache cache = jcache(); @@ -1677,6 +1727,7 @@ public void testGetAndPutAsync() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testPutAsyncOld0() throws Exception { IgniteCache cacheAsync = jcache().withAsync(); @@ -1695,6 +1746,7 @@ public void testPutAsyncOld0() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testPutAsync0() throws Exception { IgniteCache cache = jcache(); @@ -1709,6 +1761,7 @@ public void testPutAsync0() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeAsyncOld() throws Exception { IgniteCache cache = jcache(); @@ -1744,6 +1797,7 @@ public void testInvokeAsyncOld() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeAsync() throws Exception { IgniteCache cache = jcache(); @@ -1771,6 +1825,7 @@ public void testInvokeAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvoke() throws Exception { final IgniteCache cache = jcache(); @@ -1814,6 +1869,7 @@ public void testInvoke() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testPutx() throws Exception { if (txShouldBeUsed()) checkPut(true); @@ -1822,6 +1878,7 @@ public void testPutx() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testPutxNoTx() throws Exception { checkPut(false); } @@ -1866,6 +1923,7 @@ private void checkPut(boolean inTx) throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAsyncOld() throws Exception { Transaction tx = txShouldBeUsed() ? transactions().txStart() : null; @@ -1911,6 +1969,7 @@ public void testPutAsyncOld() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAsync() throws Exception { Transaction tx = txShouldBeUsed() ? transactions().txStart() : null; @@ -1950,6 +2009,7 @@ public void testPutAsync() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testPutAll() throws Exception { Map map = F.asMap("key1", 1, "key2", 2); @@ -1976,6 +2036,7 @@ public void testPutAll() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testNullInTx() throws Exception { if (!txShouldBeUsed()) return; @@ -2067,6 +2128,7 @@ public void testNullInTx() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testPutAllWithNulls() throws Exception { final IgniteCache cache = jcache(); @@ -2195,6 +2257,7 @@ public void testPutAllWithNulls() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testPutAllAsyncOld() throws Exception { Map map = F.asMap("key1", 1, "key2", 2); @@ -2225,6 +2288,7 @@ public void testPutAllAsyncOld() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testPutAllAsync() throws Exception { Map map = F.asMap("key1", 1, "key2", 2); @@ -2249,6 +2313,7 @@ public void testPutAllAsync() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testGetAndPutIfAbsent() throws Exception { Transaction tx = txShouldBeUsed() ? transactions().txStart() : null; @@ -2326,6 +2391,7 @@ public void testGetAndPutIfAbsent() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetAndPutIfAbsentAsyncOld() throws Exception { Transaction tx = txShouldBeUsed() ? transactions().txStart() : null; @@ -2398,6 +2464,7 @@ public void testGetAndPutIfAbsentAsyncOld() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetAndPutIfAbsentAsync() throws Exception { Transaction tx = txShouldBeUsed() ? transactions().txStart() : null; @@ -2459,6 +2526,7 @@ public void testGetAndPutIfAbsentAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutIfAbsent() throws Exception { IgniteCache cache = jcache(); @@ -2504,6 +2572,7 @@ public void testPutIfAbsent() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testPutxIfAbsentAsync() throws Exception { if (txShouldBeUsed()) checkPutxIfAbsentAsync(true); @@ -2512,6 +2581,7 @@ public void testPutxIfAbsentAsync() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testPutxIfAbsentAsyncNoTx() throws Exception { checkPutxIfAbsentAsync(false); } @@ -2646,6 +2716,7 @@ private void checkPutxIfAbsentAsync(boolean inTx) throws Exception { /** * @throws Exception In case of error. */ + @Test public void testPutIfAbsentAsyncConcurrentOld() throws Exception { IgniteCache cacheAsync = jcache().withAsync(); @@ -2664,6 +2735,7 @@ public void testPutIfAbsentAsyncConcurrentOld() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testPutIfAbsentAsyncConcurrent() throws Exception { IgniteCache cache = jcache(); @@ -2678,6 +2750,7 @@ public void testPutIfAbsentAsyncConcurrent() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetAndReplace() throws Exception { IgniteCache cache = jcache(); @@ -2763,6 +2836,7 @@ public void testGetAndReplace() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReplace() throws Exception { IgniteCache cache = jcache(); @@ -2811,6 +2885,7 @@ public void testReplace() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetAndReplaceAsyncOld() throws Exception { IgniteCache cache = jcache(); @@ -2891,6 +2966,7 @@ public void testGetAndReplaceAsyncOld() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetAndReplaceAsync() throws Exception { IgniteCache cache = jcache(); @@ -2953,6 +3029,7 @@ public void testGetAndReplaceAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReplacexAsyncOld() throws Exception { IgniteCache cache = jcache(); @@ -3015,6 +3092,7 @@ public void testReplacexAsyncOld() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReplacexAsync() throws Exception { IgniteCache cache = jcache(); @@ -3065,6 +3143,7 @@ public void testReplacexAsync() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testGetAndRemove() throws Exception { IgniteCache cache = jcache(); @@ -3083,6 +3162,7 @@ public void testGetAndRemove() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetAndRemoveObject() throws Exception { IgniteCache cache = ignite(0).cache(DEFAULT_CACHE_NAME); @@ -3113,6 +3193,7 @@ public void testGetAndRemoveObject() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetAndPutObject() throws Exception { IgniteCache cache = ignite(0).cache(DEFAULT_CACHE_NAME); @@ -3139,6 +3220,7 @@ public void testGetAndPutObject() throws Exception { * * @throws Exception If failed. */ + @Test public void testDeletedEntriesFlag() throws Exception { if (cacheMode() != LOCAL && cacheMode() != REPLICATED) { final int cnt = 3; @@ -3159,6 +3241,7 @@ public void testDeletedEntriesFlag() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemoveLoad() throws Exception { int cnt = 10; @@ -3190,6 +3273,7 @@ public void testRemoveLoad() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemoveLoadAsync() throws Exception { if (isMultiJvm()) return; @@ -3224,6 +3308,7 @@ public void testRemoveLoadAsync() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testRemoveAsyncOld() throws Exception { IgniteCache cache = jcache(); @@ -3258,6 +3343,7 @@ public void testRemoveAsyncOld() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testRemoveAsync() throws Exception { IgniteCache cache = jcache(); @@ -3282,6 +3368,7 @@ public void testRemoveAsync() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testRemove() throws Exception { IgniteCache cache = jcache(); @@ -3295,6 +3382,7 @@ public void testRemove() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testRemovexAsyncOld() throws Exception { IgniteCache cache = jcache(); @@ -3316,6 +3404,7 @@ public void testRemovexAsyncOld() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testRemovexAsync() throws Exception { IgniteCache cache = jcache(); @@ -3331,6 +3420,7 @@ public void testRemovexAsync() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testGlobalRemoveAll() throws Exception { globalRemoveAll(false); } @@ -3338,6 +3428,7 @@ public void testGlobalRemoveAll() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testGlobalRemoveAllAsync() throws Exception { globalRemoveAll(true); } @@ -3469,6 +3560,7 @@ protected long hugeRemoveAllEntryCount() { /** * @throws Exception In case of error. */ + @Test public void testRemoveAllWithNulls() throws Exception { final IgniteCache cache = jcache(); @@ -3523,6 +3615,7 @@ public void testRemoveAllWithNulls() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testRemoveAllDuplicates() throws Exception { jcache().removeAll(ImmutableSet.of("key1", "key1", "key1")); } @@ -3530,6 +3623,7 @@ public void testRemoveAllDuplicates() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testRemoveAllDuplicatesTx() throws Exception { if (txShouldBeUsed()) { try (Transaction tx = transactions().txStart()) { @@ -3543,6 +3637,7 @@ public void testRemoveAllDuplicatesTx() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testRemoveAllEmpty() throws Exception { jcache().removeAll(); } @@ -3550,6 +3645,7 @@ public void testRemoveAllEmpty() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testRemoveAllAsyncOld() throws Exception { IgniteCache cache = jcache(); @@ -3575,6 +3671,7 @@ public void testRemoveAllAsyncOld() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testRemoveAllAsync() throws Exception { IgniteCache cache = jcache(); @@ -3596,6 +3693,7 @@ public void testRemoveAllAsync() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testLoadAll() throws Exception { IgniteCache cache = jcache(); @@ -3633,6 +3731,7 @@ public void testLoadAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemoveAfterClear() throws Exception { IgniteEx ignite = grid(0); @@ -3679,6 +3778,7 @@ public void testRemoveAfterClear() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testClear() throws Exception { IgniteCache cache = jcache(); @@ -3823,6 +3923,7 @@ protected void checkUnlocked(final Collection keys0) throws IgniteChecke /** * @throws Exception If failed. */ + @Test public void testGlobalClearAll() throws Exception { globalClearAll(false, false); } @@ -3830,6 +3931,7 @@ public void testGlobalClearAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGlobalClearAllAsyncOld() throws Exception { globalClearAll(true, true); } @@ -3837,6 +3939,7 @@ public void testGlobalClearAllAsyncOld() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGlobalClearAllAsync() throws Exception { globalClearAll(true, false); } @@ -3875,6 +3978,7 @@ protected void globalClearAll(boolean async, boolean oldAsync) throws Exception * @throws Exception In case of error. */ @SuppressWarnings("BusyWait") + @Test public void testLockUnlock() throws Exception { if (lockingEnabled()) { final CountDownLatch lockCnt = new CountDownLatch(1); @@ -3934,6 +4038,7 @@ public void testLockUnlock() throws Exception { * @throws Exception In case of error. */ @SuppressWarnings("BusyWait") + @Test public void testLockUnlockAll() throws Exception { if (lockingEnabled()) { IgniteCache cache = jcache(); @@ -3989,6 +4094,7 @@ public void testLockUnlockAll() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testPeek() throws Exception { Ignite ignite = primaryIgnite("key"); IgniteCache cache = ignite.cache(DEFAULT_CACHE_NAME); @@ -4005,6 +4111,7 @@ public void testPeek() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPeekTxRemoveOptimistic() throws Exception { checkPeekTxRemove(OPTIMISTIC); } @@ -4012,6 +4119,7 @@ public void testPeekTxRemoveOptimistic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPeekTxRemovePessimistic() throws Exception { checkPeekTxRemove(PESSIMISTIC); } @@ -4041,6 +4149,7 @@ private void checkPeekTxRemove(TransactionConcurrency concurrency) throws Except /** * @throws Exception If failed. */ + @Test public void testPeekRemove() throws Exception { IgniteCache cache = primaryCache("key"); @@ -4053,6 +4162,7 @@ public void testPeekRemove() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testEvictExpired() throws Exception { final IgniteCache cache = jcache(); @@ -4106,6 +4216,7 @@ public void testEvictExpired() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPeekExpired() throws Exception { final IgniteCache c = jcache(); @@ -4139,6 +4250,7 @@ public void testPeekExpired() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPeekExpiredTx() throws Exception { if (txShouldBeUsed()) { final IgniteCache c = jcache(); @@ -4169,6 +4281,7 @@ public void testPeekExpiredTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTtlTx() throws Exception { if (txShouldBeUsed()) checkTtl(true, false); @@ -4177,6 +4290,7 @@ public void testTtlTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTtlNoTx() throws Exception { checkTtl(false, false); } @@ -4184,6 +4298,7 @@ public void testTtlNoTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTtlNoTxOldEntry() throws Exception { checkTtl(false, true); } @@ -4431,6 +4546,7 @@ private void checkTtl(boolean inTx, boolean oldEntry) throws Exception { /** * @throws Exception In case of error. */ + @Test public void testLocalEvict() throws Exception { IgniteCache cache = jcache(); @@ -4473,6 +4589,7 @@ public void testLocalEvict() throws Exception { /** * JUnit. */ + @Test public void testCacheProxy() { IgniteCache cache = jcache(); @@ -4482,6 +4599,7 @@ public void testCacheProxy() { /** * @throws Exception If failed. */ + @Test public void testCompactExpired() throws Exception { final IgniteCache cache = jcache(); @@ -4515,6 +4633,7 @@ public void testCompactExpired() throws Exception { * * @throws Exception If failed. */ + @Test public void testOptimisticTxMissingKey() throws Exception { if (txShouldBeUsed()) { try (Transaction tx = transactions().txStart(OPTIMISTIC, READ_COMMITTED)) { @@ -4531,6 +4650,7 @@ public void testOptimisticTxMissingKey() throws Exception { * * @throws Exception If failed. */ + @Test public void testOptimisticTxMissingKeyNoCommit() throws Exception { if (txShouldBeUsed()) { try (Transaction tx = transactions().txStart(OPTIMISTIC, READ_COMMITTED)) { @@ -4545,6 +4665,7 @@ public void testOptimisticTxMissingKeyNoCommit() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOptimisticTxReadCommittedInTx() throws Exception { checkRemovexInTx(OPTIMISTIC, READ_COMMITTED); } @@ -4552,6 +4673,7 @@ public void testOptimisticTxReadCommittedInTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOptimisticTxRepeatableReadInTx() throws Exception { checkRemovexInTx(OPTIMISTIC, REPEATABLE_READ); } @@ -4559,6 +4681,7 @@ public void testOptimisticTxRepeatableReadInTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticTxReadCommittedInTx() throws Exception { checkRemovexInTx(PESSIMISTIC, READ_COMMITTED); } @@ -4566,6 +4689,7 @@ public void testPessimisticTxReadCommittedInTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticTxRepeatableReadInTx() throws Exception { checkRemovexInTx(PESSIMISTIC, REPEATABLE_READ); } @@ -4614,6 +4738,7 @@ private void checkRemovexInTx(TransactionConcurrency concurrency, TransactionIso * * @throws Exception If failed. */ + @Test public void testPessimisticTxMissingKey() throws Exception { if (txShouldBeUsed()) { try (Transaction tx = transactions().txStart(PESSIMISTIC, READ_COMMITTED)) { @@ -4630,6 +4755,7 @@ public void testPessimisticTxMissingKey() throws Exception { * * @throws Exception If failed. */ + @Test public void testPessimisticTxMissingKeyNoCommit() throws Exception { if (txShouldBeUsed()) { try (Transaction tx = transactions().txStart(PESSIMISTIC, READ_COMMITTED)) { @@ -4644,6 +4770,7 @@ public void testPessimisticTxMissingKeyNoCommit() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticTxRepeatableRead() throws Exception { if (txShouldBeUsed()) { try (Transaction ignored = transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) { @@ -4657,6 +4784,7 @@ public void testPessimisticTxRepeatableRead() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticTxRepeatableReadOnUpdate() throws Exception { if (txShouldBeUsed()) { try (Transaction ignored = transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) { @@ -4670,6 +4798,7 @@ public void testPessimisticTxRepeatableReadOnUpdate() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testToMap() throws Exception { IgniteCache cache = jcache(); @@ -4798,6 +4927,7 @@ protected IgnitePair entryTtl(IgniteCache cache, String key) { /** * @throws Exception If failed. */ + @Test public void testIterator() throws Exception { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -4825,6 +4955,7 @@ public void testIterator() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIgniteCacheIterator() throws Exception { IgniteCache cache = jcache(0); @@ -4871,6 +5002,7 @@ public void testIgniteCacheIterator() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIteratorLeakOnCancelCursor() throws Exception { IgniteCache cache = jcache(0); @@ -5065,6 +5197,7 @@ private void checkIteratorEmpty(IgniteCache cache) throws Excep /** * @throws Exception If failed. */ + @Test public void testLocalClearKey() throws Exception { addKeys(); @@ -5116,6 +5249,7 @@ protected void checkLocalRemovedKey(String keyToRmv) { /** * @throws Exception If failed. */ + @Test public void testLocalClearKeys() throws Exception { Map> keys = addKeys(); @@ -5187,6 +5321,7 @@ protected Map> addKeys() { /** * @throws Exception If failed. */ + @Test public void testGlobalClearKey() throws Exception { testGlobalClearKey(false, Arrays.asList("key25"), false); } @@ -5194,6 +5329,7 @@ public void testGlobalClearKey() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGlobalClearKeyAsyncOld() throws Exception { testGlobalClearKey(true, Arrays.asList("key25"), true); } @@ -5201,6 +5337,7 @@ public void testGlobalClearKeyAsyncOld() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGlobalClearKeyAsync() throws Exception { testGlobalClearKey(true, Arrays.asList("key25"), false); } @@ -5208,6 +5345,7 @@ public void testGlobalClearKeyAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGlobalClearKeys() throws Exception { testGlobalClearKey(false, Arrays.asList("key25", "key100", "key150"), false); } @@ -5215,6 +5353,7 @@ public void testGlobalClearKeys() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGlobalClearKeysAsyncOld() throws Exception { testGlobalClearKey(true, Arrays.asList("key25", "key100", "key150"), true); } @@ -5222,6 +5361,7 @@ public void testGlobalClearKeysAsyncOld() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGlobalClearKeysAsync() throws Exception { testGlobalClearKey(true, Arrays.asList("key25", "key100", "key150"), false); } @@ -5288,6 +5428,7 @@ protected void testGlobalClearKey(boolean async, Collection keysToRmv, b /** * @throws Exception If failed. */ + @Test public void testWithSkipStore() throws Exception { IgniteCache cache = jcache(0); @@ -5497,6 +5638,7 @@ public void testWithSkipStore() throws Exception { /** * @throws Exception If failed. */ + @Test public void testWithSkipStoreRemoveAll() throws Exception { if (atomicityMode() == TRANSACTIONAL || (atomicityMode() == ATOMIC && nearEnabled())) // TODO IGNITE-373. return; @@ -5538,6 +5680,7 @@ public void testWithSkipStoreRemoveAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testWithSkipStoreTx() throws Exception { if (txShouldBeUsed()) { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -5840,6 +5983,7 @@ protected CacheStartMode cacheStartType() { /** * @throws Exception If failed. */ + @Test public void testGetOutTx() throws Exception { checkGetOutTx(false); } @@ -5847,6 +5991,7 @@ public void testGetOutTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetOutTxAsync() throws Exception { checkGetOutTx(true); } @@ -5924,6 +6069,7 @@ private void checkGetOutTx(boolean async) throws Exception { /** * @throws Exception If failed. */ + @Test public void testTransformException() throws Exception { final IgniteCache cache = jcache(); @@ -5945,6 +6091,7 @@ public void testTransformException() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLockInsideTransaction() throws Exception { if (txEnabled()) { GridTestUtils.assertThrows( @@ -5986,6 +6133,7 @@ public void testLockInsideTransaction() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTransformResourceInjection() throws Exception { ClusterGroup servers = grid(0).cluster().forServers(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractIteratorsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractIteratorsSelfTest.java index 85e3d6544298c..312ff2dba499a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractIteratorsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractIteratorsSelfTest.java @@ -47,6 +47,7 @@ public abstract class GridCacheAbstractIteratorsSelfTest extends GridCacheAbstra /** * @throws Exception If failed. */ + @Test public void testCacheIterator() throws Exception { int cnt = 0; @@ -68,6 +69,7 @@ public void testCacheIterator() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheIteratorMultithreaded() throws Exception { for (int i = 0; i < gridCount(); i++) jcache(i).removeAll(); @@ -95,6 +97,7 @@ public void testCacheIteratorMultithreaded() throws Exception { /** * @throws Exception If failed. */ + @Test public void testEntrySetIterator() throws Exception { assert jcache().localSize(CachePeekMode.ALL) == entryCount(); @@ -118,6 +121,7 @@ public void testEntrySetIterator() throws Exception { /** * @throws Exception If failed. */ + @Test public void testEntrySetIteratorMultithreaded() throws Exception { for (int i = 0; i < gridCount(); i++) jcache(i).removeAll(); @@ -142,4 +146,4 @@ public void testEntrySetIteratorMultithreaded() throws Exception { }, 3, "iterator-thread"); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractLocalStoreSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractLocalStoreSelfTest.java index 28a4b5174e3b1..6e6b9bf1d98b6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractLocalStoreSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractLocalStoreSelfTest.java @@ -203,6 +203,7 @@ protected NearCacheConfiguration nearConfiguration() { /** * @throws Exception If failed. */ + @Test public void testEvict() throws Exception { Ignite ignite1 = startGrid(1); @@ -231,6 +232,7 @@ public void testEvict() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPrimaryNode() throws Exception { Ignite ignite1 = startGrid(1); @@ -279,6 +281,7 @@ public void testPrimaryNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBackupRestorePrimary() throws Exception { testBackupRestore(); } @@ -286,6 +289,7 @@ public void testBackupRestorePrimary() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBackupRestore() throws Exception { final IgniteEx ignite1 = startGrid(1); Ignite ignite2 = startGrid(2); @@ -405,6 +409,7 @@ public void testBackupRestore() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLocalStoreCorrespondsAffinityWithBackups() throws Exception { testLocalStoreCorrespondsAffinity(BACKUP_CACHE_2); } @@ -412,6 +417,7 @@ public void testLocalStoreCorrespondsAffinityWithBackups() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLocalStoreCorrespondsAffinityWithBackup() throws Exception { testLocalStoreCorrespondsAffinity(BACKUP_CACHE_1); } @@ -419,6 +425,7 @@ public void testLocalStoreCorrespondsAffinityWithBackup() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLocalStoreCorrespondsAffinityNoBackups() throws Exception { testLocalStoreCorrespondsAffinity(DEFAULT_CACHE_NAME); } @@ -505,6 +512,7 @@ private void testLocalStoreCorrespondsAffinity(String name) throws Exception { /** * @throws Exception If failed. */ + @Test public void testLocalStoreWithNearKeysPrimary() throws Exception { try { System.setProperty(IGNITE_LOCAL_STORE_KEEPS_PRIMARY_ONLY, "true"); @@ -519,6 +527,7 @@ public void testLocalStoreWithNearKeysPrimary() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLocalStoreWithNearKeysPrimaryAndBackups() throws Exception { testLocalStoreWithNearKeys(); } @@ -526,6 +535,7 @@ public void testLocalStoreWithNearKeysPrimaryAndBackups() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLocalStoreWithNearKeys() throws Exception { if (getCacheMode() == REPLICATED) return; @@ -618,6 +628,7 @@ public void testLocalStoreWithNearKeys() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBackupNode() throws Exception { Ignite ignite1 = startGrid(1); @@ -683,6 +694,7 @@ public void testBackupNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSwap() throws Exception { Ignite ignite1 = startGrid(1); @@ -882,4 +894,4 @@ else if (igniteInstanceName.endsWith("5")) return LOCAL_STORE_6; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java index 3c0f0017cf5ca..817a067556d0d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java @@ -169,6 +169,7 @@ protected int expectedMissesPerPut(boolean isPrimary) { /** * @throws Exception If failed. */ + @Test public void testGetMetricsDisable() throws Exception { // Disable statistics. for (int i = 0; i < gridCount(); i++) { @@ -262,6 +263,7 @@ public Object process(MutableEntry entry, /** * @throws Exception If failed. */ + @Test public void testGetMetricsSnapshot() throws Exception { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -271,6 +273,7 @@ public void testGetMetricsSnapshot() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetAndRemoveAsyncAvgTime() throws Exception { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -288,6 +291,7 @@ public void testGetAndRemoveAsyncAvgTime() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemoveAsyncValAvgTime() throws Exception { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -315,6 +319,7 @@ public void testRemoveAsyncValAvgTime() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemoveAvgTime() throws Exception { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -332,6 +337,7 @@ public void testRemoveAvgTime() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemoveAllAvgTime() throws Exception { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -356,6 +362,7 @@ public void testRemoveAllAvgTime() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemoveAllAsyncAvgTime() throws Exception { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -385,6 +392,7 @@ public void testRemoveAllAsyncAvgTime() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetAvgTime() throws Exception { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -406,6 +414,7 @@ public void testGetAvgTime() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetAllAvgTime() throws Exception { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -430,6 +439,7 @@ public void testGetAllAvgTime() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetAllAsyncAvgTime() throws Exception { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -458,6 +468,7 @@ public void testGetAllAsyncAvgTime() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAvgTime() throws Exception { final IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -475,6 +486,7 @@ public void testPutAvgTime() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAsyncAvgTime() throws Exception { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -491,6 +503,7 @@ public void testPutAsyncAvgTime() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetAndPutAsyncAvgTime() throws Exception { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -518,6 +531,7 @@ public void testGetAndPutAsyncAvgTime() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutIfAbsentAsyncAvgTime() throws Exception { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -543,6 +557,7 @@ public void testPutIfAbsentAsyncAvgTime() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetAndPutIfAbsentAsyncAvgTime() throws Exception { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -568,6 +583,7 @@ public void testGetAndPutIfAbsentAsyncAvgTime() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAllAvgTime() throws Exception { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -591,6 +607,7 @@ public void testPutAllAvgTime() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutsReads() throws Exception { IgniteCache cache0 = grid(0).cache(DEFAULT_CACHE_NAME); @@ -649,6 +666,7 @@ public void testPutsReads() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMissHitPercentage() throws Exception { IgniteCache cache0 = grid(0).cache(DEFAULT_CACHE_NAME); @@ -683,6 +701,7 @@ public void testMissHitPercentage() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMisses() throws Exception { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -725,6 +744,7 @@ public void testMisses() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMissesOnEmptyCache() throws Exception { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -763,6 +783,7 @@ public void testMissesOnEmptyCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemoves() throws Exception { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -779,6 +800,7 @@ public void testRemoves() throws Exception { * * @throws Exception If failed. */ + @Test public void testCacheSizeWorksAsSize() throws Exception { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -816,6 +838,7 @@ public void testCacheSizeWorksAsSize() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxEvictions() throws Exception { if (grid(0).cache(DEFAULT_CACHE_NAME).getConfiguration(CacheConfiguration.class).getAtomicityMode() != CacheAtomicityMode.ATOMIC) checkTtl(true); @@ -824,6 +847,7 @@ public void testTxEvictions() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNonTxEvictions() throws Exception { if (grid(0).cache(DEFAULT_CACHE_NAME).getConfiguration(CacheConfiguration.class).getAtomicityMode() == CacheAtomicityMode.ATOMIC) checkTtl(false); @@ -1038,6 +1062,7 @@ private void checkTtl(boolean inTx) throws Exception { /** * @throws IgniteCheckedException If failed. */ + @Test public void testInvocationRemovesOnEmptyCache() throws IgniteCheckedException { testInvocationRemoves(true); } @@ -1045,6 +1070,7 @@ public void testInvocationRemovesOnEmptyCache() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testInvocationRemoves() throws IgniteCheckedException { testInvocationRemoves(false); } @@ -1094,6 +1120,7 @@ private void testInvocationRemoves(boolean emptyCache) throws IgniteCheckedExcep /** * @throws IgniteCheckedException If failed. */ + @Test public void testUpdateInvocationsOnEmptyCache() throws IgniteCheckedException { testUpdateInvocations(true); } @@ -1101,6 +1128,7 @@ public void testUpdateInvocationsOnEmptyCache() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testUpdateInvocations() throws IgniteCheckedException { testUpdateInvocations(false); } @@ -1150,6 +1178,7 @@ private void testUpdateInvocations(final boolean emptyCache) throws IgniteChecke /** * @throws IgniteCheckedException If failed. */ + @Test public void testReadOnlyInvocationsOnEmptyCache() throws IgniteCheckedException { testReadOnlyInvocations(true); } @@ -1157,6 +1186,7 @@ public void testReadOnlyInvocationsOnEmptyCache() throws IgniteCheckedException /** * @throws IgniteCheckedException If failed. */ + @Test public void testReadOnlyInvocations() throws IgniteCheckedException { testReadOnlyInvocations(false); } @@ -1201,6 +1231,7 @@ private void testReadOnlyInvocations(final boolean emptyCache) throws IgniteChec /** * @throws IgniteCheckedException If failed. */ + @Test public void testInvokeAvgTime() throws IgniteCheckedException { IgniteCache cache0 = grid(0).cache(DEFAULT_CACHE_NAME); @@ -1265,6 +1296,7 @@ public Object process(MutableEntry entry, /** * @throws IgniteCheckedException If failed. */ + @Test public void testInvokeAsyncAvgTime() throws IgniteCheckedException { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -1282,6 +1314,7 @@ public void testInvokeAsyncAvgTime() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testInvokeAllAvgTime() throws IgniteCheckedException { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -1299,6 +1332,7 @@ public void testInvokeAllAvgTime() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testInvokeAllAsyncAvgTime() throws IgniteCheckedException { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -1317,6 +1351,7 @@ public void testInvokeAllAsyncAvgTime() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testInvokeAllMultipleKeysAvgTime() throws IgniteCheckedException { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -1336,6 +1371,7 @@ public void testInvokeAllMultipleKeysAvgTime() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testInvokeAllAsyncMultipleKeysAvgTime() throws IgniteCheckedException { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractRemoveFailureTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractRemoveFailureTest.java index d7406c0aad6fa..695284846ae7c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractRemoveFailureTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractRemoveFailureTest.java @@ -151,6 +151,7 @@ protected boolean testClientNode() { /** * @throws Exception If failed. */ + @Test public void testPutAndRemove() throws Exception { putAndRemove(duration(), null, null); } @@ -158,6 +159,7 @@ public void testPutAndRemove() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAndRemovePessimisticTx() throws Exception { if (atomicityMode() != CacheAtomicityMode.TRANSACTIONAL) return; @@ -168,6 +170,7 @@ public void testPutAndRemovePessimisticTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAndRemoveOptimisticSerializableTx() throws Exception { if (atomicityMode() != CacheAtomicityMode.TRANSACTIONAL) return; @@ -484,4 +487,4 @@ protected static int random(int min, int max) { return ThreadLocalRandom.current().nextInt(min, max); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractTxReadTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractTxReadTest.java index 8af3feb24adff..8b943d6ee7db5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractTxReadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractTxReadTest.java @@ -52,6 +52,7 @@ public abstract class GridCacheAbstractTxReadTest extends GridCacheAbstractSelfT /** * @throws IgniteCheckedException If failed */ + @Test public void testTxReadOptimisticReadCommitted() throws IgniteCheckedException { checkTransactionalRead(TransactionConcurrency.OPTIMISTIC, TransactionIsolation.READ_COMMITTED); } @@ -59,6 +60,7 @@ public void testTxReadOptimisticReadCommitted() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed */ + @Test public void testTxReadOptimisticRepeatableRead() throws IgniteCheckedException { checkTransactionalRead(TransactionConcurrency.OPTIMISTIC, TransactionIsolation.REPEATABLE_READ); } @@ -66,6 +68,7 @@ public void testTxReadOptimisticRepeatableRead() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed */ + @Test public void testTxReadOptimisticSerializable() throws IgniteCheckedException { checkTransactionalRead(TransactionConcurrency.OPTIMISTIC, TransactionIsolation.SERIALIZABLE); } @@ -73,6 +76,7 @@ public void testTxReadOptimisticSerializable() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed */ + @Test public void testTxReadPessimisticReadCommitted() throws IgniteCheckedException { checkTransactionalRead(TransactionConcurrency.PESSIMISTIC, TransactionIsolation.READ_COMMITTED); } @@ -80,6 +84,7 @@ public void testTxReadPessimisticReadCommitted() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed */ + @Test public void testTxReadPessimisticRepeatableRead() throws IgniteCheckedException { checkTransactionalRead(TransactionConcurrency.PESSIMISTIC, TransactionIsolation.REPEATABLE_READ); } @@ -87,6 +92,7 @@ public void testTxReadPessimisticRepeatableRead() throws IgniteCheckedException /** * @throws IgniteCheckedException If failed */ + @Test public void testTxReadPessimisticSerializable() throws IgniteCheckedException { checkTransactionalRead(TransactionConcurrency.PESSIMISTIC, TransactionIsolation.SERIALIZABLE); } @@ -134,4 +140,4 @@ protected void checkTransactionalRead(TransactionConcurrency concurrency, Transa @Override protected int gridCount() { return 1; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractUsersAffinityMapperSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractUsersAffinityMapperSelfTest.java index 37355f77ef688..5d11a0c4369bf 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractUsersAffinityMapperSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractUsersAffinityMapperSelfTest.java @@ -106,6 +106,7 @@ protected GridCacheAbstractUsersAffinityMapperSelfTest() { /** * @throws Exception If failed. */ + @Test public void testAffinityMapper() throws Exception { IgniteCache cache = startGrid(0).cache(DEFAULT_CACHE_NAME); @@ -212,4 +213,4 @@ private static class NoopClosure implements IgniteRunnable { // No-op. } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityApiSelfTest.java index c1465250d7397..00753c79fb987 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityApiSelfTest.java @@ -85,6 +85,7 @@ private AffinityKeyMapper affinityMapper() { * * @throws Exception If failed. */ + @Test public void testPartitions() throws Exception { assertEquals(affinity().partitions(), grid(0).affinity(DEFAULT_CACHE_NAME).partitions()); } @@ -94,6 +95,7 @@ public void testPartitions() throws Exception { * * @throws Exception If failed. */ + @Test public void testPartition() throws Exception { String key = "key"; @@ -105,6 +107,7 @@ public void testPartition() throws Exception { * * @throws Exception If failed. */ + @Test public void testPrimaryPartitionsOneNode() throws Exception { AffinityFunctionContext ctx = new GridAffinityFunctionContextImpl(new ArrayList<>(grid(0).cluster().nodes()), null, null, @@ -134,6 +137,7 @@ public void testPrimaryPartitionsOneNode() throws Exception { * * @throws Exception If failed. */ + @Test public void testPrimaryPartitions() throws Exception { // Pick 2 nodes and create a projection over them. ClusterNode n0 = grid(0).localNode(); @@ -171,6 +175,7 @@ public void testPrimaryPartitions() throws Exception { * * @throws Exception If failed. */ + @Test public void testBackupPartitions() throws Exception { // Pick 2 nodes and create a projection over them. ClusterNode n0 = grid(0).localNode(); @@ -206,6 +211,7 @@ public void testBackupPartitions() throws Exception { * * @throws Exception If failed. */ + @Test public void testAllPartitions() throws Exception { // Pick 2 nodes and create a projection over them. ClusterNode n0 = grid(0).localNode(); @@ -234,6 +240,7 @@ public void testAllPartitions() throws Exception { * * @throws Exception If failed. */ + @Test public void testMapPartitionToNode() throws Exception { int part = RND.nextInt(affinity().partitions()); @@ -253,6 +260,7 @@ public void testMapPartitionToNode() throws Exception { * * @throws Exception If failed. */ + @Test public void testMapPartitionsToNode() throws Exception { Map map = grid(0).affinity(DEFAULT_CACHE_NAME).mapPartitionsToNodes(F.asList(0, 1, 5, 19, 12)); @@ -273,6 +281,7 @@ public void testMapPartitionsToNode() throws Exception { * * @throws Exception If failed. */ + @Test public void testMapPartitionsToNodeArray() throws Exception { Map map = grid(0).affinity(DEFAULT_CACHE_NAME).mapPartitionsToNodes(F.asList(0, 1, 5, 19, 12)); @@ -293,6 +302,7 @@ public void testMapPartitionsToNodeArray() throws Exception { * * @throws Exception If failed. */ + @Test public void testMapPartitionsToNodeCollection() throws Exception { Collection parts = new LinkedList<>(); @@ -337,6 +347,7 @@ private Iterable nodes(List> assignment, Affinity /** * @throws Exception If failed. */ + @Test public void testPartitionWithAffinityMapper() throws Exception { AffinityKey key = new AffinityKey<>(1, 2); @@ -345,4 +356,4 @@ public void testPartitionWithAffinityMapper() throws Exception { for (int i = 0; i < gridCount(); i++) assertEquals(expPart, grid(i).affinity(DEFAULT_CACHE_NAME).partition(key)); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityMapperSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityMapperSelfTest.java index 09fc296344331..7779e4035a36b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityMapperSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityMapperSelfTest.java @@ -37,6 +37,7 @@ public class GridCacheAffinityMapperSelfTest extends GridCommonAbstractTest { /** * */ + @Test public void testMethodAffinityMapper() { AffinityKeyMapper mapper = new GridCacheDefaultAffinityKeyMapper(); @@ -63,6 +64,7 @@ public void testMethodAffinityMapper() { /** * */ + @Test public void testFieldAffinityMapper() { AffinityKeyMapper mapper = new GridCacheDefaultAffinityKeyMapper(); @@ -89,6 +91,7 @@ public void testFieldAffinityMapper() { /** * */ + @Test public void testFieldAffinityMapperWithWrongClass() { AffinityKeyMapper mapper = new GridCacheDefaultAffinityKeyMapper(); @@ -143,4 +146,4 @@ public Object affinityKey() { return affKey; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityRoutingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityRoutingSelfTest.java index ddb38e0520c8b..27cb788b8329b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityRoutingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityRoutingSelfTest.java @@ -129,6 +129,7 @@ public GridCacheAffinityRoutingSelfTest() { * * @throws Exception If failed. */ + @Test public void testAffinityRun() throws Exception { for (int i = 0; i < KEY_CNT; i++) grid(0).compute().affinityRun(NON_DFLT_CACHE_NAME, i, new CheckRunnable(i, i)); @@ -137,6 +138,7 @@ public void testAffinityRun() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAffinityCallRestartFails() throws Exception { GridTestUtils.assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -150,6 +152,7 @@ public void testAffinityCallRestartFails() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAffinityCallRestart() throws Exception { assertEquals(MAX_FAILOVER_ATTEMPTS, grid(0).compute().affinityCall(NON_DFLT_CACHE_NAME, "key", @@ -159,6 +162,7 @@ public void testAffinityCallRestart() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAffinityRunRestartFails() throws Exception { GridTestUtils.assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -172,6 +176,7 @@ public void testAffinityRunRestartFails() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAffinityRunRestart() throws Exception { grid(0).compute().affinityRun(NON_DFLT_CACHE_NAME, "key", new FailedRunnable("key", MAX_FAILOVER_ATTEMPTS)); } @@ -181,6 +186,7 @@ public void testAffinityRunRestart() throws Exception { * * @throws Exception If failed. */ + @Test public void testAffinityRunComplexKey() throws Exception { for (int i = 0; i < KEY_CNT; i++) { AffinityTestKey key = new AffinityTestKey(i); @@ -195,6 +201,7 @@ public void testAffinityRunComplexKey() throws Exception { * * @throws Exception If failed. */ + @Test public void testAffinityCall() throws Exception { for (int i = 0; i < KEY_CNT; i++) grid(0).compute().affinityCall(NON_DFLT_CACHE_NAME, i, new CheckCallable(i, i)); @@ -205,6 +212,7 @@ public void testAffinityCall() throws Exception { * * @throws Exception If failed. */ + @Test public void testAffinityCallComplexKey() throws Exception { for (int i = 0; i < KEY_CNT; i++) { final AffinityTestKey key = new AffinityTestKey(i); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAsyncOperationsLimitSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAsyncOperationsLimitSelfTest.java index cebab2f45a99e..9b35facb8be24 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAsyncOperationsLimitSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAsyncOperationsLimitSelfTest.java @@ -47,6 +47,7 @@ public class GridCacheAsyncOperationsLimitSelfTest extends GridCacheAbstractSelf /** * @throws Exception If failed. */ + @Test public void testAsyncOps() throws Exception { final AtomicInteger cnt = new AtomicInteger(); final GridAtomicInteger max = new GridAtomicInteger(); @@ -70,4 +71,4 @@ public void testAsyncOps() throws Exception { assertTrue("Maximum number of permits exceeded: " + max.get(), max.get() <= 51); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicEntryProcessorDeploymentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicEntryProcessorDeploymentSelfTest.java index f616b6e1605ed..e66353d8a1ae2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicEntryProcessorDeploymentSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicEntryProcessorDeploymentSelfTest.java @@ -130,6 +130,7 @@ protected CacheAtomicityMode atomicityMode() { /** * @throws Exception In case of error. */ + @Test public void testInvokeDeployment() throws Exception { depMode = DeploymentMode.CONTINUOUS; @@ -139,6 +140,7 @@ public void testInvokeDeployment() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testInvokeDeployment2() throws Exception { depMode = DeploymentMode.SHARED; @@ -148,6 +150,7 @@ public void testInvokeDeployment2() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testInvokeAllDeployment() throws Exception { depMode = DeploymentMode.CONTINUOUS; @@ -157,6 +160,7 @@ public void testInvokeAllDeployment() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testInvokeAllDeployment2() throws Exception { depMode = DeploymentMode.SHARED; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicMessageCountSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicMessageCountSelfTest.java index ca94c7f60137d..28bcb85491f45 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicMessageCountSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicMessageCountSelfTest.java @@ -87,6 +87,7 @@ public class GridCacheAtomicMessageCountSelfTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testPartitioned() throws Exception { checkMessages(false); } @@ -94,6 +95,7 @@ public void testPartitioned() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClient() throws Exception { checkMessages(true); } @@ -203,4 +205,4 @@ public void resetCount() { cntMap.clear(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicApiAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicApiAbstractTest.java index 0b7de6e501704..56b91e15f324d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicApiAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicApiAbstractTest.java @@ -89,6 +89,7 @@ protected GridCacheBasicApiAbstractTest() { * * @throws Exception If test failed. */ + @Test public void testBasicLock() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.ENTRY_LOCK); @@ -108,6 +109,7 @@ public void testBasicLock() throws Exception { /** * @throws IgniteCheckedException If test failed. */ + @Test public void testSingleLockReentry() throws IgniteCheckedException { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.ENTRY_LOCK); @@ -138,6 +140,7 @@ public void testSingleLockReentry() throws IgniteCheckedException { * * @throws Exception If test failed. */ + @Test public void testReentry() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.ENTRY_LOCK); @@ -179,6 +182,7 @@ public void testReentry() throws Exception { /** * */ + @Test public void testInterruptLock() throws InterruptedException { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.ENTRY_LOCK); @@ -225,6 +229,7 @@ public void testInterruptLock() throws InterruptedException { /** * */ + @Test public void testInterruptLockWithTimeout() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.ENTRY_LOCK); @@ -286,6 +291,7 @@ public void testInterruptLockWithTimeout() throws Exception { /** * @throws IgniteCheckedException If test failed. */ + @Test public void testManyLockReentries() throws IgniteCheckedException { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.ENTRY_LOCK); @@ -331,6 +337,7 @@ public void testManyLockReentries() throws IgniteCheckedException { /** * @throws Exception If test failed. */ + @Test public void testLockMultithreaded() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.ENTRY_LOCK); @@ -451,6 +458,7 @@ public void testLockMultithreaded() throws Exception { * * @throws Exception If error occur. */ + @Test public void testBasicOps() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.ENTRY_LOCK); MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_EVENTS); @@ -515,6 +523,7 @@ public void testBasicOps() throws Exception { /** * @throws Exception If error occur. */ + @Test public void testBasicOpsWithReentry() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.ENTRY_LOCK); MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_EVENTS); @@ -590,6 +599,7 @@ public void testBasicOpsWithReentry() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testMultiLocks() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.ENTRY_LOCK); @@ -623,6 +633,7 @@ public void testMultiLocks() throws Exception { /** * @throws IgniteCheckedException If test failed. */ + @Test public void testGetPutRemove() throws IgniteCheckedException { IgniteCache cache = ignite.cache(DEFAULT_CACHE_NAME); @@ -647,6 +658,7 @@ public void testGetPutRemove() throws IgniteCheckedException { * * @throws Exception In case of error. */ + @Test public void testPutWithExpiration() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.ENTRY_LOCK); MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.EXPIRATION); @@ -726,4 +738,4 @@ void await() throws InterruptedException { return true; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicStoreAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicStoreAbstractTest.java index 3ebb3984ffdd6..a9ac9282616ed 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicStoreAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicStoreAbstractTest.java @@ -121,6 +121,7 @@ protected CacheAtomicityMode atomicityMode() { /** * @throws IgniteCheckedException If failed. */ + @Test public void testNotExistingKeys() throws IgniteCheckedException { IgniteCache cache = jcache(); Map map = store.getMap(); @@ -145,6 +146,7 @@ public void testNotExistingKeys() throws IgniteCheckedException { } /** @throws Exception If test fails. */ + @Test public void testWriteThrough() throws Exception { IgniteCache cache = jcache(); @@ -216,6 +218,7 @@ public void testWriteThrough() throws Exception { } /** @throws Exception If test failed. */ + @Test public void testReadThrough() throws Exception { IgniteCache cache = jcache(); @@ -309,6 +312,7 @@ public void testReadThrough() throws Exception { } /** @throws Exception If test failed. */ + @Test public void testLoadCache() throws Exception { IgniteCache cache = jcache(); @@ -339,6 +343,7 @@ public void testLoadCache() throws Exception { } /** @throws Exception If test failed. */ + @Test public void testLoadCacheWithPredicate() throws Exception { IgniteCache cache = jcache(); @@ -376,6 +381,7 @@ public void testLoadCacheWithPredicate() throws Exception { } /** @throws Exception If test failed. */ + @Test public void testReloadCache() throws Exception { IgniteCache cache = jcache(); @@ -446,6 +452,7 @@ public void testReloadCache() throws Exception { } /** @throws Exception If test failed. */ + @Test public void testReloadAll() throws Exception { IgniteCache cache = jcache(); @@ -509,6 +516,7 @@ public void testReloadAll() throws Exception { } /** @throws Exception If test failed. */ + @Test public void testReload() throws Exception { IgniteCache cache = jcache(); @@ -594,4 +602,4 @@ private void checkLastMethod(@Nullable String mtd) { assert lastMtd.equals(mtd) : "Last method does not match [expected=" + mtd + ", lastMtd=" + lastMtd + ']'; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicStoreMultithreadedAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicStoreMultithreadedAbstractTest.java index 22b02dc51ad97..3546634811231 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicStoreMultithreadedAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicStoreMultithreadedAbstractTest.java @@ -90,6 +90,7 @@ protected GridCacheBasicStoreMultithreadedAbstractTest() { /** * @throws Exception If failed. */ + @Test public void testConcurrentGet() throws Exception { final AtomicInteger cntr = new AtomicInteger(); @@ -129,4 +130,4 @@ public void testConcurrentGet() throws Exception { assertEquals(1, cntr.get()); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearAllSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearAllSelfTest.java index cae58e1816e4d..9613c8bc98aa0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearAllSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearAllSelfTest.java @@ -122,6 +122,7 @@ private void startNodes() throws Exception { * * @throws Exception In case of exception. */ + @Test public void testGlobalClearAllPartitioned() throws Exception { cacheMode = PARTITIONED; @@ -135,6 +136,7 @@ public void testGlobalClearAllPartitioned() throws Exception { * * @throws Exception In case of exception. */ + @Test public void testGlobalClearAllReplicated() throws Exception { cacheMode = REPLICATED; @@ -195,4 +197,4 @@ private AttributeFilter(String attrValue) { return F.eq(attrValue, clusterNode.attribute(TEST_ATTRIBUTE)); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearLocallySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearLocallySelfTest.java index 82c4659a74aa4..636294519ec52 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearLocallySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearLocallySelfTest.java @@ -170,6 +170,7 @@ private void startUp() throws Exception { * * @throws Exception If failed. */ + @Test public void testLocalNoSplit() throws Exception { test(Mode.TEST_LOCAL, CLEAR_ALL_SPLIT_THRESHOLD / 2); } @@ -179,6 +180,7 @@ public void testLocalNoSplit() throws Exception { * * @throws Exception If failed. */ + @Test public void testLocalSplit() throws Exception { test(Mode.TEST_LOCAL, CLEAR_ALL_SPLIT_THRESHOLD + 1); } @@ -188,6 +190,7 @@ public void testLocalSplit() throws Exception { * * @throws Exception If failed. */ + @Test public void testPartitionedNoSplit() throws Exception { test(Mode.TEST_PARTITIONED, CLEAR_ALL_SPLIT_THRESHOLD / 2); } @@ -197,6 +200,7 @@ public void testPartitionedNoSplit() throws Exception { * * @throws Exception If failed. */ + @Test public void testPartitionedSplit() throws Exception { test(Mode.TEST_PARTITIONED, CLEAR_ALL_SPLIT_THRESHOLD + 1); } @@ -206,6 +210,7 @@ public void testPartitionedSplit() throws Exception { * * @throws Exception If failed. */ + @Test public void testColocatedNoSplit() throws Exception { test(Mode.TEST_COLOCATED, CLEAR_ALL_SPLIT_THRESHOLD / 2); } @@ -215,6 +220,7 @@ public void testColocatedNoSplit() throws Exception { * * @throws Exception If failed. */ + @Test public void testColocatedSplit() throws Exception { test(Mode.TEST_COLOCATED, CLEAR_ALL_SPLIT_THRESHOLD + 1); } @@ -224,6 +230,7 @@ public void testColocatedSplit() throws Exception { * * @throws Exception If failed. */ + @Test public void testReplicatedNoSplit() throws Exception { test(Mode.TEST_REPLICATED, CLEAR_ALL_SPLIT_THRESHOLD / 2); } @@ -233,6 +240,7 @@ public void testReplicatedNoSplit() throws Exception { * * @throws Exception If failed. */ + @Test public void testReplicatedSplit() throws Exception { test(Mode.TEST_REPLICATED, CLEAR_ALL_SPLIT_THRESHOLD + 1); } @@ -378,4 +386,4 @@ private AttributeFilter(String... attrs) { return false; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearSelfTest.java index 81c44134b6d90..da34853dc1e36 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearSelfTest.java @@ -74,6 +74,7 @@ public class GridCacheClearSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClearPartitioned() throws Exception { testClear(CacheMode.PARTITIONED, false, null); } @@ -81,6 +82,7 @@ public void testClearPartitioned() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClearPartitionedNear() throws Exception { testClear(CacheMode.PARTITIONED, true, null); } @@ -88,6 +90,7 @@ public void testClearPartitionedNear() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClearReplicated() throws Exception { testClear(CacheMode.REPLICATED, false, null); } @@ -95,6 +98,7 @@ public void testClearReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClearReplicatedNear() throws Exception { testClear(CacheMode.REPLICATED, true, null); } @@ -102,6 +106,7 @@ public void testClearReplicatedNear() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClearKeyPartitioned() throws Exception { testClear(CacheMode.PARTITIONED, false, Collections.singleton(3)); } @@ -109,6 +114,7 @@ public void testClearKeyPartitioned() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClearKeyPartitionedNear() throws Exception { testClear(CacheMode.PARTITIONED, true, Collections.singleton(3)); } @@ -116,6 +122,7 @@ public void testClearKeyPartitionedNear() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClearKeyReplicated() throws Exception { testClear(CacheMode.REPLICATED, false, Collections.singleton(3)); } @@ -123,6 +130,7 @@ public void testClearKeyReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClearKeyReplicatedNear() throws Exception { testClear(CacheMode.REPLICATED, true, Collections.singleton(3)); } @@ -130,6 +138,7 @@ public void testClearKeyReplicatedNear() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClearKeysPartitioned() throws Exception { testClear(CacheMode.PARTITIONED, false, F.asSet(2, 6, 9)); } @@ -137,6 +146,7 @@ public void testClearKeysPartitioned() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClearKeysPartitionedNear() throws Exception { testClear(CacheMode.PARTITIONED, true, F.asSet(2, 6, 9)); } @@ -144,6 +154,7 @@ public void testClearKeysPartitionedNear() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClearKeysReplicated() throws Exception { testClear(CacheMode.REPLICATED, false, F.asSet(2, 6, 9)); } @@ -151,6 +162,7 @@ public void testClearKeysReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClearKeysReplicatedNear() throws Exception { testClear(CacheMode.REPLICATED, true, F.asSet(2, 6, 9)); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentGetCacheOnClientTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentGetCacheOnClientTest.java index 87c74bc7ceda7..78e70e0e554e0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentGetCacheOnClientTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentGetCacheOnClientTest.java @@ -50,6 +50,7 @@ public class GridCacheConcurrentGetCacheOnClientTest extends GridCommonAbstractT /** * */ + @Test public void test() throws Exception { IgniteConfiguration node1cfg = getConfiguration("node1"); IgniteConfiguration node2cfg = getConfiguration("node2"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMapSelfTest.java index 4baa1c7faed6a..f56d46bf906e6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMapSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMapSelfTest.java @@ -75,6 +75,7 @@ public class GridCacheConcurrentMapSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRehash() throws Exception { IgniteCache c = grid().cache(DEFAULT_CACHE_NAME); @@ -106,6 +107,7 @@ public void testRehash() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRehashRandom() throws Exception { IgniteCache c = grid().cache(DEFAULT_CACHE_NAME); @@ -145,6 +147,7 @@ public void testRehashRandom() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRehashMultithreaded1() throws Exception { final AtomicInteger tidGen = new AtomicInteger(); @@ -217,6 +220,7 @@ public void testRehashMultithreaded1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRehashMultithreaded2() throws Exception { final AtomicInteger tidGen = new AtomicInteger(0); @@ -310,6 +314,7 @@ public void testRehashMultithreaded2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testEmptyWeakIterator() throws Exception { final IgniteCache c = grid().cache(DEFAULT_CACHE_NAME); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeLoadTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeLoadTest.java index 7fd608e9c15c6..409cd216d8dc1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeLoadTest.java @@ -172,6 +172,7 @@ public class GridCacheConcurrentTxMultiNodeLoadTest extends GridCommonAbstractTe /** * @throws Exception If failed. */ + @Test public void testEvictions() throws Exception { try { cacheOn = true; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConditionalDeploymentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConditionalDeploymentSelfTest.java index 99d46d33e72bd..a47fdc07dfe25 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConditionalDeploymentSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConditionalDeploymentSelfTest.java @@ -104,6 +104,7 @@ protected CacheConfiguration cacheConfiguration() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testNoDeploymentInfo() throws Exception { GridCacheIoManager ioMgr = cacheIoManager(); @@ -121,6 +122,7 @@ public void testNoDeploymentInfo() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testAddedDeploymentInfo() throws Exception { GridCacheContext ctx = cacheContext(); @@ -144,6 +146,7 @@ public void testAddedDeploymentInfo() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testAddedDeploymentInfo2() throws Exception { GridCacheContext ctx = cacheContext(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationConsistencySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationConsistencySelfTest.java index 3f4efc293e045..5ca82bbbaddd9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationConsistencySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationConsistencySelfTest.java @@ -141,6 +141,7 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + @Test public void testCacheUtilsCheckAttributeMismatch() throws Exception { Ignite ignite = startGrid(1); @@ -188,6 +189,7 @@ public void testCacheUtilsCheckAttributeMismatch() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNullCacheMode() throws Exception { // Grid with null cache mode. // This is a legal case. The default cache mode should be used. @@ -202,6 +204,7 @@ public void testNullCacheMode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testWithCacheAndWithoutCache() throws Exception { // 1st grid without cache. cacheEnabled = false; @@ -221,6 +224,7 @@ public void testWithCacheAndWithoutCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSameCacheDifferentModes() throws Exception { // 1st grid with replicated cache. cacheEnabled = true; @@ -249,6 +253,7 @@ public void testSameCacheDifferentModes() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDifferentCacheDifferentModes() throws Exception { // 1st grid with local cache. cacheEnabled = true; @@ -286,6 +291,7 @@ public void testDifferentCacheDifferentModes() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDifferentDeploymentModes() throws Exception { // 1st grid with SHARED mode. cacheEnabled = true; @@ -311,6 +317,7 @@ public void testDifferentDeploymentModes() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDifferentAffinities() throws Exception { cacheMode = PARTITIONED; @@ -335,6 +342,7 @@ public void testDifferentAffinities() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDifferentPreloadModes() throws Exception { checkSecondGridStartFails( new C1() { @@ -357,6 +365,7 @@ public void testDifferentPreloadModes() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDifferentEvictionEnabled() throws Exception { checkSecondGridStartFails( new C1() { @@ -379,6 +388,7 @@ public void testDifferentEvictionEnabled() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDifferentEvictionPolicyEnabled() throws Exception { checkSecondGridStartFails( new C1() { @@ -401,6 +411,7 @@ public void testDifferentEvictionPolicyEnabled() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDifferentEvictionPolicies() throws Exception { checkSecondGridStartFails( new C1() { @@ -425,6 +436,7 @@ public void testDifferentEvictionPolicies() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDifferentEvictionPolicyFactories() throws Exception { checkSecondGridStartFails( new C1() { @@ -449,6 +461,7 @@ public void testDifferentEvictionPolicyFactories() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDifferentEvictionFilters() throws Exception { checkSecondGridStartFails( new C1() { @@ -471,6 +484,7 @@ public void testDifferentEvictionFilters() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDifferentAffinityMappers() throws Exception { checkSecondGridStartFails( new C1() { @@ -493,6 +507,7 @@ public void testDifferentAffinityMappers() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDifferentAtomicity() throws Exception { cacheMode = PARTITIONED; @@ -519,6 +534,7 @@ public void testDifferentAtomicity() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDifferentSynchronization() throws Exception { cacheMode = PARTITIONED; @@ -543,6 +559,7 @@ public void testDifferentSynchronization() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAffinityFunctionConsistency() throws Exception { cacheEnabled = true; cacheMode = PARTITIONED; @@ -589,6 +606,7 @@ public void testAffinityFunctionConsistency() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAttributesWarnings() throws Exception { cacheEnabled = true; @@ -624,6 +642,7 @@ public void testAttributesWarnings() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPartitionedOnlyAttributesIgnoredForReplicated() throws Exception { cacheEnabled = true; @@ -663,6 +682,7 @@ public void testPartitionedOnlyAttributesIgnoredForReplicated() throws Exception /** * @throws Exception If failed. */ + @Test public void testIgnoreMismatchForLocalCaches() throws Exception { cacheEnabled = true; @@ -710,6 +730,7 @@ public void testIgnoreMismatchForLocalCaches() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStoreCheckAtomic() throws Exception { cacheEnabled = true; @@ -755,6 +776,7 @@ public void testStoreCheckAtomic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStoreCheckTransactional() throws Exception { cacheEnabled = true; @@ -802,6 +824,7 @@ public void testStoreCheckTransactional() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAffinityForReplicatedCache() throws Exception { cacheEnabled = true; @@ -822,6 +845,7 @@ public void testAffinityForReplicatedCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDifferentInterceptors() throws Exception { cacheMode = PARTITIONED; @@ -906,4 +930,4 @@ private static class TestCacheInterceptor extends CacheInterceptorAdapter implem private static class TestCacheDefaultAffinityKeyMapper extends GridCacheDefaultAffinityKeyMapper { // No-op, just different class. } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationValidationSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationValidationSelfTest.java index 7b793b78d8138..ded19e019ffe8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationValidationSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationValidationSelfTest.java @@ -138,6 +138,7 @@ else if (igniteInstanceName.contains(DUP_DFLT_CACHES_IGNITE_INSTANCE_NAME)) * * @throws Exception If failed. */ + @Test public void testDuplicateCacheConfigurations() throws Exception { // This grid should not start. startInvalidGrid(DUP_CACHES_IGNITE_INSTANCE_NAME); @@ -149,6 +150,7 @@ public void testDuplicateCacheConfigurations() throws Exception { /** * @throws Exception If fails. */ + @Test public void testCacheAttributesValidation() throws Exception { try { startGrid(0); @@ -215,4 +217,4 @@ public TestRendezvousAffinityFunction() { private static class TestCacheDefaultAffinityKeyMapper extends GridCacheDefaultAffinityKeyMapper { // No-op. Just to have another class name. } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDaemonNodeAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDaemonNodeAbstractSelfTest.java index 807725159eebf..774e1859e9138 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDaemonNodeAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDaemonNodeAbstractSelfTest.java @@ -90,6 +90,7 @@ public abstract class GridCacheDaemonNodeAbstractSelfTest extends GridCommonAbst /** * @throws Exception If failed. */ + @Test public void testImplicit() throws Exception { try { startGridsMultiThreaded(3); @@ -121,6 +122,7 @@ public void testImplicit() throws Exception { /** * @throws Exception If failed. */ + @Test public void testExplicit() throws Exception { try { startGridsMultiThreaded(3); @@ -162,6 +164,7 @@ public void testExplicit() throws Exception { * * @throws Exception If failed. */ + @Test public void testMapKeyToNode() throws Exception { try { // Start normal nodes. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentSelfTest.java index ff3ab362fe726..e29b43bac52a8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentSelfTest.java @@ -124,6 +124,7 @@ protected boolean isCacheUndeployed(Ignite g) { /** @throws Exception If failed. */ @SuppressWarnings("unchecked") + @Test public void testDeployment() throws Exception { try { depMode = CONTINUOUS; @@ -150,6 +151,7 @@ public void testDeployment() throws Exception { /** @throws Exception If failed. */ @SuppressWarnings("unchecked") + @Test public void testDeployment2() throws Exception { try { depMode = CONTINUOUS; @@ -185,6 +187,7 @@ public void testDeployment2() throws Exception { /** @throws Exception If failed. */ @SuppressWarnings("unchecked") + @Test public void testDeployment3() throws Exception { try { depMode = SHARED; @@ -231,12 +234,14 @@ public void testDeployment3() throws Exception { /** @throws Exception If failed. */ @SuppressWarnings("unchecked") + @Test public void testDeployment4() throws Exception { doDeployment4(false); } /** @throws Exception If failed. */ @SuppressWarnings("unchecked") + @Test public void testDeployment4BackupLeavesGrid() throws Exception { doDeployment4(true); } @@ -288,6 +293,7 @@ private void doDeployment4(boolean backupLeavesGrid) throws Exception { /** @throws Exception If failed. */ @SuppressWarnings("unchecked") + @Test public void testDeployment5() throws Exception { ClassLoader ldr = getExternalClassLoader(); @@ -345,6 +351,7 @@ public void testDeployment5() throws Exception { /** @throws Exception If failed. */ @SuppressWarnings("unchecked") + @Test public void testDeployment6() throws Exception { try { depMode = SHARED; @@ -378,6 +385,7 @@ public void testDeployment6() throws Exception { /** @throws Exception If failed. */ @SuppressWarnings("unchecked") + @Test public void testDeployment7() throws Exception { try { depMode = SHARED; @@ -410,6 +418,7 @@ public void testDeployment7() throws Exception { } /** @throws Exception If failed. */ + @Test public void testPartitionedDeploymentPreloading() throws Exception { ClassLoader ldr = getExternalClassLoader(); @@ -434,6 +443,7 @@ public void testPartitionedDeploymentPreloading() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheUndeploymentSharedMode() throws Exception { testCacheUndeployment(SHARED); } @@ -441,6 +451,7 @@ public void testCacheUndeploymentSharedMode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheUndeploymentContMode() throws Exception { testCacheUndeployment(CONTINUOUS); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryMemorySizeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryMemorySizeSelfTest.java index c45fa8902c983..70913a05b0f32 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryMemorySizeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryMemorySizeSelfTest.java @@ -176,6 +176,7 @@ protected Marshaller createMarshaller() throws IgniteCheckedException { } /** @throws Exception If failed. */ + @Test public void testLocal() throws Exception { IgniteCache cache = testCache(false, LOCAL); @@ -199,6 +200,7 @@ public void testLocal() throws Exception { } /** @throws Exception If failed. */ + @Test public void testReplicated() throws Exception { IgniteCache cache = testCache(false, REPLICATED); @@ -222,6 +224,7 @@ public void testReplicated() throws Exception { } /** @throws Exception If failed. */ + @Test public void testPartitionedNearEnabled() throws Exception { IgniteCache cache = testCache(true, PARTITIONED); @@ -274,6 +277,7 @@ public void testPartitionedNearEnabled() throws Exception { } /** @throws Exception If failed. */ + @Test public void testPartitionedNearDisabled() throws Exception { IgniteCache cache = testCache(false, PARTITIONED); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryVersionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryVersionSelfTest.java index 8a4196b84837e..93ce8cac2ed59 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryVersionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryVersionSelfTest.java @@ -71,6 +71,7 @@ public class GridCacheEntryVersionSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testVersionAtomic() throws Exception { atomicityMode = ATOMIC; @@ -80,6 +81,7 @@ public void testVersionAtomic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testVersionTransactional() throws Exception { atomicityMode = TRANSACTIONAL; @@ -89,6 +91,7 @@ public void testVersionTransactional() throws Exception { /** * @throws Exception If failed. */ + @Test public void testVersionMvccTx() throws Exception { atomicityMode = TRANSACTIONAL_SNAPSHOT; @@ -165,4 +168,4 @@ private void checkVersion() throws Exception { stopAllGrids(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionEventAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionEventAbstractTest.java index b2c87a9912606..7f2067609ca57 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionEventAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionEventAbstractTest.java @@ -102,6 +102,7 @@ protected GridCacheEvictionEventAbstractTest() { /** * @throws Exception If failed. */ + @Test public void testEvictionEvent() throws Exception { Ignite g = grid(); @@ -129,4 +130,4 @@ public void testEvictionEvent() throws Exception { assertTrue("Failed to wait for eviction event", latch.await(10, TimeUnit.SECONDS)); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFinishPartitionsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFinishPartitionsSelfTest.java index d60e4c665a3a2..857af440d7dec 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFinishPartitionsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFinishPartitionsSelfTest.java @@ -93,6 +93,7 @@ public class GridCacheFinishPartitionsSelfTest extends GridCacheAbstractSelfTest /** * @throws Exception If failed. */ + @Test public void testTxFinishPartitions() throws Exception { String key = "key"; String val = "value"; @@ -175,6 +176,7 @@ private long runTransactions(final String key, final int keyPart, final Collecti * * @throws Exception If failed. */ + @Test public void testMvccFinishPartitions() throws Exception { String key = "key"; @@ -201,6 +203,7 @@ public void testMvccFinishPartitions() throws Exception { * * @throws Exception If failed. */ + @Test public void testMvccFinishKeys() throws Exception { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -234,6 +237,7 @@ public void testMvccFinishKeys() throws Exception { * * @throws Exception If failed. */ + @Test public void testMvccFinishPartitionsContinuousLockAcquireRelease() throws Exception { int key = 1; @@ -338,4 +342,4 @@ private long runLock(String key, int keyPart, Collection waitParts) thr return end.get() - start; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFullTextQueryMultithreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFullTextQueryMultithreadedSelfTest.java index 90f8d60915cd5..2fddf3635b30d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFullTextQueryMultithreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFullTextQueryMultithreadedSelfTest.java @@ -69,6 +69,7 @@ public class GridCacheFullTextQueryMultithreadedSelfTest extends GridCacheAbstra * @throws Exception In case of error. */ @SuppressWarnings({"TooBroadScope"}) + @Test public void testH2Text() throws Exception { int duration = 20 * 1000; final int keyCnt = 5000; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGetAndTransformStoreAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGetAndTransformStoreAbstractTest.java index af9751f7b9a52..5b0050597376a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGetAndTransformStoreAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGetAndTransformStoreAbstractTest.java @@ -116,6 +116,7 @@ protected CacheAtomicityMode atomicityMode() { /** * @throws Exception If failed. */ + @Test public void testGetAndTransform() throws Exception { final AtomicBoolean finish = new AtomicBoolean(); @@ -173,4 +174,4 @@ private static class Processor implements EntryProcessor, return null; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheIncrementTransformTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheIncrementTransformTest.java index 33b094f1f2f52..e4fe7ee92c8eb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheIncrementTransformTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheIncrementTransformTest.java @@ -102,6 +102,7 @@ public class GridCacheIncrementTransformTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testIncrement() throws Exception { testIncrement(false); } @@ -109,6 +110,7 @@ public void testIncrement() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIncrementRestart() throws Exception { final AtomicBoolean stop = new AtomicBoolean(); final AtomicReference error = new AtomicReference<>(); @@ -230,4 +232,4 @@ private static class Processor implements EntryProcessor> emptyFilter() { /** * @throws Exception If failed. */ + @Test public void testSmall() throws Exception { IgniteCache cache = grid().cache(DEFAULT_CACHE_NAME); @@ -135,6 +136,7 @@ public void testSmall() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLarge() throws Exception { IgniteCache cache = grid().cache(DEFAULT_CACHE_NAME); @@ -164,6 +166,7 @@ public void testLarge() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFiltered() throws Exception { IgniteCache cache = grid().cache(DEFAULT_CACHE_NAME); @@ -243,4 +246,4 @@ void reset() { i = 0; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheKeyCheckSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheKeyCheckSelfTest.java index ebb88a3a821ca..39509fa95fa0e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheKeyCheckSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheKeyCheckSelfTest.java @@ -84,6 +84,7 @@ protected CacheConfiguration cacheConfiguration() { /** * @throws Exception If failed. */ + @Test public void testGetTransactional() throws Exception { checkGet(TRANSACTIONAL); } @@ -91,6 +92,7 @@ public void testGetTransactional() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetAtomic() throws Exception { checkGet(ATOMIC); } @@ -98,6 +100,7 @@ public void testGetAtomic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutTransactional() throws Exception { checkPut(TRANSACTIONAL); } @@ -105,6 +108,7 @@ public void testPutTransactional() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAtomic() throws Exception { checkPut(ATOMIC); } @@ -112,6 +116,7 @@ public void testPutAtomic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemoveTransactional() throws Exception { checkRemove(TRANSACTIONAL); } @@ -119,6 +124,7 @@ public void testRemoveTransactional() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemoveAtomic() throws Exception { checkRemove(ATOMIC); } @@ -204,4 +210,4 @@ public int getSomeVal() { return someVal; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLeakTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLeakTest.java index 1fed55fafdbdd..d6aa445889fd7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLeakTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLeakTest.java @@ -87,6 +87,7 @@ protected CacheConfiguration cacheConfiguration() { /** * @throws Exception If failed. */ + @Test public void testLeakTransactional() throws Exception { checkLeak(TRANSACTIONAL); } @@ -94,6 +95,7 @@ public void testLeakTransactional() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLeakAtomic() throws Exception { checkLeak(ATOMIC); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLifecycleAwareSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLifecycleAwareSelfTest.java index 22d94fbbc27b9..51289f8ed5c9b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLifecycleAwareSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLifecycleAwareSelfTest.java @@ -365,7 +365,8 @@ public TestTopologyValidator() { /** {@inheritDoc} */ @SuppressWarnings("ErrorNotRethrown") - @Override public void testLifecycleAware() throws Exception { + @Override @Test + public void testLifecycleAware() throws Exception { for (boolean nearEnabled : new boolean[] {true, false}) { near = nearEnabled; @@ -390,4 +391,4 @@ public TestTopologyValidator() { } } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMarshallerTxAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMarshallerTxAbstractTest.java index 0d616d4a1f141..a8cce7db787c0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMarshallerTxAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMarshallerTxAbstractTest.java @@ -85,6 +85,7 @@ protected GridCacheMarshallerTxAbstractTest() { * * @throws Exception If failed. */ + @Test public void testValueMarshallerFail() throws Exception { String key = UUID.randomUUID().toString(); String value = UUID.randomUUID().toString(); @@ -131,4 +132,4 @@ public void testValueMarshallerFail() throws Exception { tx.close(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMarshallingNodeJoinSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMarshallingNodeJoinSelfTest.java index df3430f2bbfc2..ac7591267a048 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMarshallingNodeJoinSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMarshallingNodeJoinSelfTest.java @@ -83,6 +83,7 @@ public class GridCacheMarshallingNodeJoinSelfTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testNodeJoin() throws Exception { final CountDownLatch allowJoin = new CountDownLatch(1); final CountDownLatch joined = new CountDownLatch(2); @@ -168,4 +169,4 @@ public TestObject() { // No-op. } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMissingCommitVersionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMissingCommitVersionSelfTest.java index a6f202218d28c..949384cc80146 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMissingCommitVersionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMissingCommitVersionSelfTest.java @@ -86,6 +86,7 @@ public GridCacheMissingCommitVersionSelfTest() { /** * @throws Exception If failed. */ + @Test public void testMissingCommitVersion() throws Exception { final IgniteCache cache = jcache(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMixedPartitionExchangeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMixedPartitionExchangeSelfTest.java index f6f47517e4de2..119e9ea75f56e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMixedPartitionExchangeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMixedPartitionExchangeSelfTest.java @@ -84,6 +84,7 @@ private CacheConfiguration cacheConfiguration() { /** * @throws Exception If failed. */ + @Test public void testNodeJoinLeave() throws Exception { try { cache = true; @@ -169,4 +170,4 @@ public void testNodeJoinLeave() throws Exception { stopAllGrids(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultiUpdateLockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultiUpdateLockSelfTest.java index 367d8ac833d66..b73c35f19b7b4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultiUpdateLockSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultiUpdateLockSelfTest.java @@ -89,6 +89,7 @@ protected CacheConfiguration cacheConfiguration() { /** * @throws Exception If failed. */ + @Test public void testMultiUpdateLocksNear() throws Exception { checkMultiUpdateLocks(true); } @@ -96,6 +97,7 @@ public void testMultiUpdateLocksNear() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultiUpdateLocksColocated() throws Exception { checkMultiUpdateLocks(false); } @@ -202,4 +204,4 @@ private void checkMultiUpdateLocks(boolean nearEnabled) throws Exception { stopAllGrids(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateAbstractSelfTest.java index 800f4bac7b67c..ca9b5ccf29b76 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateAbstractSelfTest.java @@ -74,6 +74,7 @@ public abstract class GridCacheMultinodeUpdateAbstractSelfTest extends GridCache /** * @throws Exception If failed. */ + @Test public void testInvoke() throws Exception { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -144,4 +145,4 @@ protected static class IncProcessor implements EntryProcessor cache = grid.internalCache(DEFAULT_CACHE_NAME); @@ -107,6 +108,7 @@ public void testAllTrueFlags() { /** * */ + @Test public void testAllFalseFlags() { GridCacheAdapter cache = grid.internalCache(DEFAULT_CACHE_NAME); @@ -140,4 +142,4 @@ public void testAllFalseFlags() { for (GridCacheMvccCandidate.Mask mask : GridCacheMvccCandidate.Mask.values()) assertFalse("Mask check failed [mask=" + mask + ", c=" + c + ']', mask.get(flags)); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManagerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManagerSelfTest.java index 0a284e989c1ee..b26acaaa54430 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManagerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManagerSelfTest.java @@ -72,6 +72,7 @@ protected CacheConfiguration cacheConfiguration() { } /** @throws Exception If failed. */ + @Test public void testLocalCache() throws Exception { mode = LOCAL; @@ -79,6 +80,7 @@ public void testLocalCache() throws Exception { } /** @throws Exception If failed. */ + @Test public void testReplicatedCache() throws Exception { mode = REPLICATED; @@ -86,6 +88,7 @@ public void testReplicatedCache() throws Exception { } /** @throws Exception If failed. */ + @Test public void testPartitionedCache() throws Exception { mode = PARTITIONED; @@ -117,4 +120,4 @@ private void testCandidates(int gridCnt) throws Exception { stopAllGrids(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccPartitionedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccPartitionedSelfTest.java index 119002ca75717..38a44c46d7e3e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccPartitionedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccPartitionedSelfTest.java @@ -88,6 +88,7 @@ public GridCacheMvccPartitionedSelfTest() { /** * Tests remote candidates. */ + @Test public void testNearLocalsWithPending() { GridCacheAdapter cache = grid.internalCache(DEFAULT_CACHE_NAME); @@ -122,6 +123,7 @@ public void testNearLocalsWithPending() { /** * Tests remote candidates. */ + @Test public void testNearLocalsWithCommitted() { GridCacheAdapter cache = grid.internalCache(DEFAULT_CACHE_NAME); @@ -155,6 +157,7 @@ public void testNearLocalsWithCommitted() { /** * Tests remote candidates. */ + @Test public void testNearLocalsWithRolledback() { GridCacheAdapter cache = grid.internalCache(DEFAULT_CACHE_NAME); @@ -188,6 +191,7 @@ public void testNearLocalsWithRolledback() { /** * Tests remote candidates. */ + @Test public void testNearLocals() { GridCacheAdapter cache = grid.internalCache(DEFAULT_CACHE_NAME); @@ -218,6 +222,7 @@ public void testNearLocals() { /** * Tests remote candidates. */ + @Test public void testNearLocalsWithOwned() { GridCacheAdapter cache = grid.internalCache(DEFAULT_CACHE_NAME); @@ -257,6 +262,7 @@ public void testNearLocalsWithOwned() { /** * @throws Exception If failed. */ + @Test public void testAddPendingRemote0() throws Exception { GridCacheAdapter cache = grid.internalCache(DEFAULT_CACHE_NAME); @@ -289,6 +295,7 @@ public void testAddPendingRemote0() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAddPendingRemote1() throws Exception { GridCacheAdapter cache = grid.internalCache(DEFAULT_CACHE_NAME); @@ -332,6 +339,7 @@ public void testAddPendingRemote1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAddPendingRemote2() throws Exception { GridCacheAdapter cache = grid.internalCache(DEFAULT_CACHE_NAME); @@ -376,6 +384,7 @@ public void testAddPendingRemote2() throws Exception { /** * Tests salvageRemote method */ + @Test public void testSalvageRemote() { GridCacheAdapter cache = grid.internalCache(DEFAULT_CACHE_NAME); @@ -434,6 +443,7 @@ public void testSalvageRemote() { /** * @throws Exception If failed. */ + @Test public void testNearRemoteConsistentOrdering0() throws Exception { GridCacheAdapter cache = grid.internalCache(DEFAULT_CACHE_NAME); @@ -472,6 +482,7 @@ public void testNearRemoteConsistentOrdering0() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNearRemoteConsistentOrdering1() throws Exception { GridCacheAdapter cache = grid.internalCache(DEFAULT_CACHE_NAME); @@ -517,6 +528,7 @@ public void testNearRemoteConsistentOrdering1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNearRemoteConsistentOrdering2() throws Exception { GridCacheAdapter cache = grid.internalCache(DEFAULT_CACHE_NAME); @@ -562,6 +574,7 @@ public void testNearRemoteConsistentOrdering2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNearRemoteConsistentOrdering3() throws Exception { GridCacheAdapter cache = grid.internalCache(DEFAULT_CACHE_NAME); @@ -601,6 +614,7 @@ public void testNearRemoteConsistentOrdering3() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSerializableReadLocksAdd() throws Exception { GridCacheAdapter cache = grid.internalCache(DEFAULT_CACHE_NAME); @@ -678,6 +692,7 @@ public void testSerializableReadLocksAdd() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSerializableReadLocksAssign() throws Exception { GridCacheAdapter cache = grid.internalCache(DEFAULT_CACHE_NAME); @@ -817,6 +832,7 @@ private void checkCandidates(CacheLockCandidates all, GridCacheVersion...vers) { /** * @throws Exception If failed. */ + @Test public void testSerializableLocks() throws Exception { checkSerializableAdd(false); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccSelfTest.java index 6f52cce302d09..0b2e1376eb0f0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccSelfTest.java @@ -83,6 +83,7 @@ public GridCacheMvccSelfTest() { /** * @throws Exception If failed. */ + @Test public void testMarshalUnmarshalCandidate() throws Exception { GridCacheAdapter cache = grid.internalCache(DEFAULT_CACHE_NAME); @@ -115,6 +116,7 @@ public void testMarshalUnmarshalCandidate() throws Exception { /** * Tests remote candidates. */ + @Test public void testRemotes() { GridCacheAdapter cache = grid.internalCache(DEFAULT_CACHE_NAME); @@ -266,6 +268,7 @@ public void testRemotes() { /** * Tests that orderOwned does not reorder owned locks. */ + @Test public void testNearRemoteWithOwned() { GridCacheAdapter cache = grid.internalCache(DEFAULT_CACHE_NAME); @@ -308,6 +311,7 @@ public void testNearRemoteWithOwned() { /** * Tests that orderOwned does not reorder owned locks. */ + @Test public void testNearRemoteWithOwned1() { GridCacheAdapter cache = grid.internalCache(DEFAULT_CACHE_NAME); @@ -354,6 +358,7 @@ public void testNearRemoteWithOwned1() { /** * Tests that orderOwned does not reorder owned locks. */ + @Test public void testNearRemoteWithOwned2() { GridCacheAdapter cache = grid.internalCache(DEFAULT_CACHE_NAME); @@ -402,6 +407,7 @@ public void testNearRemoteWithOwned2() { /** * Tests remote candidates. */ + @Test public void testLocal() { GridCacheAdapter cache = grid.internalCache(DEFAULT_CACHE_NAME); @@ -476,6 +482,7 @@ public void testLocal() { /** * Tests assignment of local candidates when remote exist. */ + @Test public void testLocalWithRemote() { GridCacheAdapter cache = grid.internalCache(DEFAULT_CACHE_NAME); @@ -512,6 +519,7 @@ public void testLocalWithRemote() { /** * */ + @Test public void testCompletedWithBaseInTheMiddle() { GridCacheAdapter cache = grid.internalCache(DEFAULT_CACHE_NAME); @@ -565,6 +573,7 @@ public void testCompletedWithBaseInTheMiddle() { /** * */ + @Test public void testCompletedWithCompletedBaseInTheMiddle() { GridCacheAdapter cache = grid.internalCache(DEFAULT_CACHE_NAME); @@ -607,6 +616,7 @@ public void testCompletedWithCompletedBaseInTheMiddle() { /** * */ + @Test public void testCompletedTwiceWithBaseInTheMiddle() { GridCacheAdapter cache = grid.internalCache(DEFAULT_CACHE_NAME); @@ -653,6 +663,7 @@ public void testCompletedTwiceWithBaseInTheMiddle() { /** * */ + @Test public void testCompletedWithBaseInTheMiddleNoChange() { GridCacheAdapter cache = grid.internalCache(DEFAULT_CACHE_NAME); @@ -692,6 +703,7 @@ public void testCompletedWithBaseInTheMiddleNoChange() { /** * */ + @Test public void testCompletedWithBaseInTheBeginning() { GridCacheAdapter cache = grid.internalCache(DEFAULT_CACHE_NAME); @@ -734,6 +746,7 @@ public void testCompletedWithBaseInTheBeginning() { /** * This case should never happen, nevertheless we need to test for it. */ + @Test public void testCompletedWithBaseInTheBeginningNoChange() { GridCacheAdapter cache = grid.internalCache(DEFAULT_CACHE_NAME); @@ -773,6 +786,7 @@ public void testCompletedWithBaseInTheBeginningNoChange() { /** * This case should never happen, nevertheless we need to test for it. */ + @Test public void testCompletedWithBaseInTheEndNoChange() { GridCacheAdapter cache = grid.internalCache(DEFAULT_CACHE_NAME); @@ -812,6 +826,7 @@ public void testCompletedWithBaseInTheEndNoChange() { /** * */ + @Test public void testCompletedWithBaseNotPresentInTheMiddle() { GridCacheAdapter cache = grid.internalCache(DEFAULT_CACHE_NAME); @@ -853,6 +868,7 @@ public void testCompletedWithBaseNotPresentInTheMiddle() { /** * */ + @Test public void testCompletedWithBaseNotPresentInTheMiddleNoChange() { GridCacheAdapter cache = grid.internalCache(DEFAULT_CACHE_NAME); @@ -888,6 +904,7 @@ public void testCompletedWithBaseNotPresentInTheMiddleNoChange() { /** * */ + @Test public void testCompletedWithBaseNotPresentInTheBeginning() { GridCacheAdapter cache = grid.internalCache(DEFAULT_CACHE_NAME); @@ -929,6 +946,7 @@ public void testCompletedWithBaseNotPresentInTheBeginning() { /** * */ + @Test public void testCompletedWithBaseNotPresentInTheBeginningNoChange() { GridCacheAdapter cache = grid.internalCache(DEFAULT_CACHE_NAME); @@ -970,6 +988,7 @@ public void testCompletedWithBaseNotPresentInTheBeginningNoChange() { /** * */ + @Test public void testCompletedWithBaseNotPresentInTheEndNoChange() { GridCacheAdapter cache = grid.internalCache(DEFAULT_CACHE_NAME); @@ -1007,6 +1026,7 @@ public void testCompletedWithBaseNotPresentInTheEndNoChange() { /** * Test local and remote candidates together. */ + @Test public void testLocalAndRemote() { GridCacheAdapter cache = grid.internalCache(DEFAULT_CACHE_NAME); @@ -1133,6 +1153,7 @@ public void testLocalAndRemote() { /** * @throws Exception If test failed. */ + @Test public void testMultipleLocalAndRemoteLocks1() throws Exception { UUID nodeId = UUID.randomUUID(); @@ -1206,6 +1227,7 @@ public void testMultipleLocalAndRemoteLocks1() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testMultipleLocalAndRemoteLocks2() throws Exception { GridCacheAdapter cache = grid.internalCache(DEFAULT_CACHE_NAME); @@ -1293,6 +1315,7 @@ public void testMultipleLocalAndRemoteLocks2() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testMultipleLocalLocks() throws Exception { GridCacheAdapter cache = grid.internalCache(DEFAULT_CACHE_NAME); @@ -1334,6 +1357,7 @@ public void testMultipleLocalLocks() throws Exception { * @throws Exception If failed. */ @SuppressWarnings({"ObjectEquality"}) + @Test public void testUsedCandidates() throws Exception { GridCacheAdapter cache = grid.internalCache(DEFAULT_CACHE_NAME); @@ -1399,6 +1423,7 @@ public void testUsedCandidates() throws Exception { /** * Test 2 keys with candidates in reverse order. */ + @Test public void testReverseOrder1() { UUID id = UUID.randomUUID(); @@ -1452,6 +1477,7 @@ public void testReverseOrder1() { * * @throws Exception If failed. */ + @Test public void testReverseOrder2() throws Exception { UUID id = UUID.randomUUID(); @@ -1514,6 +1540,7 @@ public void testReverseOrder2() throws Exception { * * @throws Exception If failed. */ + @Test public void testReverseOrder3() throws Exception { GridCacheAdapter cache = grid.internalCache(DEFAULT_CACHE_NAME); @@ -1562,6 +1589,7 @@ public void testReverseOrder3() throws Exception { * * @throws Exception If failed. */ + @Test public void testReverseOrder4() throws Exception { UUID id = UUID.randomUUID(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheNestedTxAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheNestedTxAbstractTest.java index 762cc4d9d1484..0770206b303f8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheNestedTxAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheNestedTxAbstractTest.java @@ -105,6 +105,7 @@ protected GridCacheNestedTxAbstractTest() { * * @throws Exception If failed. */ + @Test public void testTwoTx() throws Exception { final IgniteCache c = grid(0).cache(DEFAULT_CACHE_NAME); @@ -136,6 +137,7 @@ public void testTwoTx() throws Exception { * * @throws Exception If failed. */ + @Test public void testLockAndTx() throws Exception { final IgniteCache c = grid(0).cache(DEFAULT_CACHE_NAME); @@ -212,6 +214,7 @@ public void testLockAndTx() throws Exception { * * @throws Exception If failed. */ + @Test public void testLockAndTx1() throws Exception { final IgniteCache c = grid(0).cache(DEFAULT_CACHE_NAME); @@ -281,4 +284,4 @@ public void testLockAndTx1() throws Exception { for (int i = 0; i < globalCntr.get(); i++) assertNotNull(c1.get(i)); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheObjectToStringSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheObjectToStringSelfTest.java index 33b7033df911e..3b07f1287aa1c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheObjectToStringSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheObjectToStringSelfTest.java @@ -85,6 +85,7 @@ public class GridCacheObjectToStringSelfTest extends GridCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testLocalCacheFifoEvictionPolicy() throws Exception { cacheMode = LOCAL; evictionPlc = new FifoEvictionPolicy(); @@ -93,6 +94,7 @@ public void testLocalCacheFifoEvictionPolicy() throws Exception { } /** @throws Exception If failed. */ + @Test public void testLocalCacheLruEvictionPolicy() throws Exception { cacheMode = LOCAL; evictionPlc = new LruEvictionPolicy(); @@ -101,6 +103,7 @@ public void testLocalCacheLruEvictionPolicy() throws Exception { } /** @throws Exception If failed. */ + @Test public void testReplicatedCacheFifoEvictionPolicy() throws Exception { cacheMode = REPLICATED; evictionPlc = new FifoEvictionPolicy(); @@ -109,6 +112,7 @@ public void testReplicatedCacheFifoEvictionPolicy() throws Exception { } /** @throws Exception If failed. */ + @Test public void testReplicatedCacheLruEvictionPolicy() throws Exception { cacheMode = REPLICATED; evictionPlc = new LruEvictionPolicy(); @@ -117,6 +121,7 @@ public void testReplicatedCacheLruEvictionPolicy() throws Exception { } /** @throws Exception If failed. */ + @Test public void testPartitionedCacheFifoEvictionPolicy() throws Exception { cacheMode = PARTITIONED; nearEnabled = true; @@ -126,6 +131,7 @@ public void testPartitionedCacheFifoEvictionPolicy() throws Exception { } /** @throws Exception If failed. */ + @Test public void testPartitionedCacheLruEvictionPolicy() throws Exception { cacheMode = PARTITIONED; nearEnabled = true; @@ -135,6 +141,7 @@ public void testPartitionedCacheLruEvictionPolicy() throws Exception { } /** @throws Exception If failed. */ + @Test public void testColocatedCacheFifoEvictionPolicy() throws Exception { cacheMode = PARTITIONED; nearEnabled = false; @@ -144,6 +151,7 @@ public void testColocatedCacheFifoEvictionPolicy() throws Exception { } /** @throws Exception If failed. */ + @Test public void testColocatedCacheLruEvictionPolicy() throws Exception { cacheMode = PARTITIONED; nearEnabled = false; @@ -188,4 +196,4 @@ private void checkToString() throws Exception { stopAllGrids(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapMultiThreadedUpdateAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapMultiThreadedUpdateAbstractSelfTest.java index afc41ffcd34ab..fa1f9d7af2d19 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapMultiThreadedUpdateAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapMultiThreadedUpdateAbstractSelfTest.java @@ -71,6 +71,7 @@ public abstract class GridCacheOffHeapMultiThreadedUpdateAbstractSelfTest extend /** * @throws Exception If failed. */ + @Test public void testTransform() throws Exception { testTransform(keyForNode(0)); @@ -115,6 +116,7 @@ private void testTransform(final Integer key) throws Exception { /** * @throws Exception If failed. */ + @Test public void testPut() throws Exception { testPut(keyForNode(0)); @@ -161,6 +163,7 @@ private void testPut(final Integer key) throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutxIfAbsent() throws Exception { testPutxIfAbsent(keyForNode(0)); @@ -205,6 +208,7 @@ private void testPutxIfAbsent(final Integer key) throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutGet() throws Exception { testPutGet(keyForNode(0)); @@ -345,4 +349,4 @@ else if (e.getValue() == null) { return true; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapMultiThreadedUpdateSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapMultiThreadedUpdateSelfTest.java index 40e2e23322f9e..c1f8261d6e44c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapMultiThreadedUpdateSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapMultiThreadedUpdateSelfTest.java @@ -40,6 +40,7 @@ public class GridCacheOffHeapMultiThreadedUpdateSelfTest extends GridCacheOffHea /** * @throws Exception If failed. */ + @Test public void testTransformTx() throws Exception { info(">>> PESSIMISTIC node 0"); @@ -109,6 +110,7 @@ private void testTransformTx(final Integer key, final TransactionConcurrency txC /** * @throws Exception If failed. */ + @Test public void testPutTxPessimistic() throws Exception { testPutTx(keyForNode(0), PESSIMISTIC); @@ -121,6 +123,7 @@ public void testPutTxPessimistic() throws Exception { * * @throws Exception If failed. */ + @Test public void testPutTxOptimistic() throws Exception { testPutTx(keyForNode(0), OPTIMISTIC); @@ -170,6 +173,7 @@ private void testPutTx(final Integer key, final TransactionConcurrency txConcurr /** * @throws Exception If failed. */ + @Test public void testPutxIfAbsentTxPessimistic() throws Exception { testPutxIfAbsentTx(keyForNode(0), PESSIMISTIC); @@ -182,6 +186,7 @@ public void testPutxIfAbsentTxPessimistic() throws Exception { * * @throws Exception If failed. */ + @Test public void testPutxIfAbsentTxOptimistic() throws Exception { testPutxIfAbsentTx(keyForNode(0), OPTIMISTIC); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapUpdateSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapUpdateSelfTest.java index cf1641764adb1..dfacb44f53f4c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapUpdateSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapUpdateSelfTest.java @@ -56,6 +56,7 @@ public class GridCacheOffheapUpdateSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testUpdateInPessimisticTxOnRemoteNode() throws Exception { try { Ignite ignite = startGrids(2); @@ -99,6 +100,7 @@ public void testUpdateInPessimisticTxOnRemoteNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReadEvictedPartition() throws Exception { try { Ignite grid = startGrid(0); @@ -146,4 +148,4 @@ public void testReadEvictedPartition() throws Exception { stopAllGrids(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOnCopyFlagAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOnCopyFlagAbstractSelfTest.java index 2a90bf608b3f1..a687c6d9116b7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOnCopyFlagAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOnCopyFlagAbstractSelfTest.java @@ -117,6 +117,7 @@ protected CacheConfiguration cacheConfiguration() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCopyOnReadFlagP2PEnabled() throws Exception { doTest(true); } @@ -124,6 +125,7 @@ public void testCopyOnReadFlagP2PEnabled() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCopyOnReadFlagP2PDisbaled() throws Exception { doTest(false); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOrderedPreloadingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOrderedPreloadingSelfTest.java index 34b5876f3e0fd..207a1add895bc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOrderedPreloadingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOrderedPreloadingSelfTest.java @@ -125,6 +125,7 @@ private CacheConfiguration cacheConfig(CacheMode cacheMode, int preloadOrder, St /** * @throws Exception If failed. */ + @Test public void testPreloadOrderPartitionedPartitioned() throws Exception { checkPreloadOrder(PARTITIONED, PARTITIONED); } @@ -132,6 +133,7 @@ public void testPreloadOrderPartitionedPartitioned() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPreloadOrderReplicatedReplicated() throws Exception { checkPreloadOrder(REPLICATED, REPLICATED); } @@ -139,6 +141,7 @@ public void testPreloadOrderReplicatedReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPreloadOrderPartitionedReplicated() throws Exception { checkPreloadOrder(PARTITIONED, REPLICATED); } @@ -146,6 +149,7 @@ public void testPreloadOrderPartitionedReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPreloadOrderReplicatedPartitioned() throws Exception { checkPreloadOrder(REPLICATED, PARTITIONED); } @@ -203,4 +207,4 @@ private void checkPreloadOrder(CacheMode first, CacheMode second) throws Excepti private int gridIdx(Event evt) { return getTestIgniteInstanceIndex((String)evt.node().attributes().get(GRID_NAME_ATTR)); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheP2PUndeploySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheP2PUndeploySelfTest.java index 8de8e04d0b61c..418e058e1ecad 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheP2PUndeploySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheP2PUndeploySelfTest.java @@ -121,6 +121,7 @@ public class GridCacheP2PUndeploySelfTest extends GridCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testSwapP2PReplicated() throws Exception { offheap = false; @@ -128,6 +129,7 @@ public void testSwapP2PReplicated() throws Exception { } /** @throws Exception If failed. */ + @Test public void testOffHeapP2PReplicated() throws Exception { offheap = true; @@ -135,6 +137,7 @@ public void testOffHeapP2PReplicated() throws Exception { } /** @throws Exception If failed. */ + @Test public void testSwapP2PPartitioned() throws Exception { offheap = false; @@ -142,6 +145,7 @@ public void testSwapP2PPartitioned() throws Exception { } /** @throws Exception If failed. */ + @Test public void testOffheapP2PPartitioned() throws Exception { offheap = true; @@ -149,6 +153,7 @@ public void testOffheapP2PPartitioned() throws Exception { } /** @throws Exception If failed. */ + @Test public void testSwapP2PReplicatedNoPreloading() throws Exception { mode = NONE; offheap = false; @@ -157,6 +162,7 @@ public void testSwapP2PReplicatedNoPreloading() throws Exception { } /** @throws Exception If failed. */ + @Test public void testOffHeapP2PReplicatedNoPreloading() throws Exception { mode = NONE; offheap = true; @@ -165,6 +171,7 @@ public void testOffHeapP2PReplicatedNoPreloading() throws Exception { } /** @throws Exception If failed. */ + @Test public void testSwapP2PPartitionedNoPreloading() throws Exception { mode = NONE; offheap = false; @@ -173,6 +180,7 @@ public void testSwapP2PPartitionedNoPreloading() throws Exception { } /** @throws Exception If failed. */ + @Test public void testOffHeapP2PPartitionedNoPreloading() throws Exception { mode = NONE; offheap = true; @@ -299,4 +307,4 @@ private boolean waitCacheEmpty(IgniteCache cache, long timeout) return cache.localSize() == 0; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedGetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedGetSelfTest.java index f4c32eecf9617..d0fa1568fb3e9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedGetSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedGetSelfTest.java @@ -110,6 +110,7 @@ private CacheConfiguration cacheConfiguration() { /** * @throws Exception If failed. */ + @Test public void testGetFromPrimaryNode() throws Exception { for (int i = 0; i < GRID_CNT; i++) { IgniteCache c = grid(i).cache(DEFAULT_CACHE_NAME); @@ -129,6 +130,7 @@ public void testGetFromPrimaryNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetFromBackupNode() throws Exception { if (MvccFeatureChecker.forcedMvcc()) fail("https://issues.apache.org/jira/browse/IGNITE-10274"); @@ -165,6 +167,7 @@ public void testGetFromBackupNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetFromNearNode() throws Exception { for (int i = 0; i < GRID_CNT; i++) { IgniteCache c = grid(i).cache(DEFAULT_CACHE_NAME); @@ -240,4 +243,4 @@ private void prepare() throws Exception { } } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedProjectionAffinitySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedProjectionAffinitySelfTest.java index a41f999e410d3..3a19d8cd92ec4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedProjectionAffinitySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedProjectionAffinitySelfTest.java @@ -80,6 +80,7 @@ public class GridCachePartitionedProjectionAffinitySelfTest extends GridCommonAb } /** @throws Exception If failed. */ + @Test public void testAffinity() throws Exception { waitTopologyUpdate(); @@ -91,6 +92,7 @@ public void testAffinity() throws Exception { } /** @throws Exception If failed. */ + @Test public void testProjectionAffinity() throws Exception { waitTopologyUpdate(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedWritesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedWritesTest.java index a0c16699ffdda..b5c13f32ef4a0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedWritesTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedWritesTest.java @@ -86,6 +86,7 @@ public class GridCachePartitionedWritesTest extends GridCommonAbstractTest { } /** @throws Exception If test fails. */ + @Test public void testWrite() throws Exception { final AtomicInteger putCnt = new AtomicInteger(); final AtomicInteger rmvCnt = new AtomicInteger(); @@ -151,4 +152,4 @@ public void testWrite() throws Exception { stopGrid(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java index f9042ef39e3b2..6b0558708c425 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java @@ -100,6 +100,7 @@ public class GridCachePreloadingEvictionsSelfTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testEvictions() throws Exception { try { final Ignite ignite1 = startGrid(1); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePutAllFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePutAllFailoverSelfTest.java index c15a0f80edb50..ea88f79848551 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePutAllFailoverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePutAllFailoverSelfTest.java @@ -134,6 +134,7 @@ public class GridCachePutAllFailoverSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPutAllFailoverColocatedNearEnabledThreeBackups() throws Exception { checkPutAllFailoverColocated(true, 7, 3); } @@ -141,6 +142,7 @@ public void testPutAllFailoverColocatedNearEnabledThreeBackups() throws Exceptio /** * @throws Exception If failed. */ + @Test public void testPutAllFailoverColocatedNearDisabledThreeBackups() throws Exception { checkPutAllFailoverColocated(false, 7, 3); } @@ -148,6 +150,7 @@ public void testPutAllFailoverColocatedNearDisabledThreeBackups() throws Excepti /** * @throws Exception If failed. */ + @Test public void testPutAllFailoverNearEnabledOneBackup() throws Exception { checkPutAllFailover(true, 3, 1); } @@ -155,6 +158,7 @@ public void testPutAllFailoverNearEnabledOneBackup() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAllFailoverNearDisabledOneBackup() throws Exception { checkPutAllFailover(false, 3, 1); } @@ -162,6 +166,7 @@ public void testPutAllFailoverNearDisabledOneBackup() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAllFailoverNearEnabledTwoBackups() throws Exception { checkPutAllFailover(true, 5, 2); } @@ -169,6 +174,7 @@ public void testPutAllFailoverNearEnabledTwoBackups() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAllFailoverNearDisabledTwoBackups() throws Exception { checkPutAllFailover(false, 5, 2); } @@ -176,6 +182,7 @@ public void testPutAllFailoverNearDisabledTwoBackups() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAllFailoverNearEnabledThreeBackups() throws Exception { checkPutAllFailover(true, 7, 3); } @@ -183,6 +190,7 @@ public void testPutAllFailoverNearEnabledThreeBackups() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAllFailoverNearDisabledThreeBackups() throws Exception { checkPutAllFailover(false, 7, 3); } @@ -190,6 +198,7 @@ public void testPutAllFailoverNearDisabledThreeBackups() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAllFailoverColocatedNearEnabledOneBackup() throws Exception { checkPutAllFailoverColocated(true, 3, 1); } @@ -197,6 +206,7 @@ public void testPutAllFailoverColocatedNearEnabledOneBackup() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAllFailoverColocatedNearDisabledOneBackup() throws Exception { checkPutAllFailoverColocated(false, 3, 1); } @@ -204,6 +214,7 @@ public void testPutAllFailoverColocatedNearDisabledOneBackup() throws Exception /** * @throws Exception If failed. */ + @Test public void testPutAllFailoverColocatedNearEnabledTwoBackups() throws Exception { checkPutAllFailoverColocated(true, 5, 2); } @@ -211,6 +222,7 @@ public void testPutAllFailoverColocatedNearEnabledTwoBackups() throws Exception /** * @throws Exception If failed. */ + @Test public void testPutAllFailoverColocatedNearDisabledTwoBackups() throws Exception { checkPutAllFailoverColocated(false, 5, 2); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryIndexingDisabledSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryIndexingDisabledSelfTest.java index 92a70847fbc95..b8caa079a1de5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryIndexingDisabledSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryIndexingDisabledSelfTest.java @@ -56,6 +56,7 @@ private void doTest(Callable c, String expectedMsg) { /** * @throws IgniteCheckedException If failed. */ + @Test public void testSqlFieldsQuery() throws IgniteCheckedException { // Should not throw despite the cache not having QueryEntities. jcache().query(new SqlFieldsQuery("select * from dual")).getAll(); @@ -64,6 +65,7 @@ public void testSqlFieldsQuery() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testTextQuery() throws IgniteCheckedException { doTest(new Callable() { @Override public Object call() throws IgniteCheckedException { @@ -75,6 +77,7 @@ public void testTextQuery() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testSqlQuery() throws IgniteCheckedException { // Failure occurs not on validation stage, hence specific error message. doTest(new Callable() { @@ -87,7 +90,8 @@ public void testSqlQuery() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testScanQuery() throws IgniteCheckedException { jcache().query(new ScanQuery<>(null)).getAll(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryInternalKeysSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryInternalKeysSelfTest.java index 288e5721dc091..ab17559b5a8d0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryInternalKeysSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryInternalKeysSelfTest.java @@ -68,6 +68,7 @@ public class GridCacheQueryInternalKeysSelfTest extends GridCacheAbstractSelfTes * @throws Exception If failed. */ @SuppressWarnings("unchecked") + @Test public void testInternalKeysPreloading() throws Exception { try { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -112,4 +113,4 @@ public void testInternalKeysPreloading() throws Exception { } }); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQuerySqlFieldInlineSizeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQuerySqlFieldInlineSizeSelfTest.java index f03e0c508d191..b7d30b2424f58 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQuerySqlFieldInlineSizeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQuerySqlFieldInlineSizeSelfTest.java @@ -35,6 +35,7 @@ public class GridCacheQuerySqlFieldInlineSizeSelfTest extends GridCommonAbstract /** * @throws Exception If failed. */ + @Test public void testSingleFieldIndexes() throws Exception { CacheConfiguration ccfg = defaultCacheConfiguration(); @@ -57,6 +58,7 @@ else if(idx.getFields().containsKey("val1")) /** * @throws Exception If failed. */ + @Test public void testGroupIndex() throws Exception { CacheConfiguration ccfg = defaultCacheConfiguration(); @@ -76,6 +78,7 @@ public void testGroupIndex() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGroupIndexInvalidAnnotaion() throws Exception { final CacheConfiguration ccfg = defaultCacheConfiguration(); @@ -91,6 +94,7 @@ public void testGroupIndexInvalidAnnotaion() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNegativeInlineSize() throws Exception { final CacheConfiguration ccfg = defaultCacheConfiguration(); @@ -157,4 +161,4 @@ static class TestValueNegativeInlineSize { @QuerySqlField(index = true, inlineSize = -10) String val; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReferenceCleanupSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReferenceCleanupSelfTest.java index 36dc3acdc0f59..6ac9fdb87ee8f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReferenceCleanupSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReferenceCleanupSelfTest.java @@ -80,6 +80,7 @@ public class GridCacheReferenceCleanupSelfTest extends GridCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testAtomicLongPartitioned() throws Exception { if (MvccFeatureChecker.forcedMvcc()) fail("https://issues.apache.org/jira/browse/IGNITE-10391"); @@ -97,6 +98,7 @@ public void testAtomicLongPartitioned() throws Exception { } /** @throws Exception If failed. */ + @Test public void testAtomicLongReplicated() throws Exception { if (MvccFeatureChecker.forcedMvcc()) fail("https://issues.apache.org/jira/browse/IGNITE-10391"); @@ -114,6 +116,7 @@ public void testAtomicLongReplicated() throws Exception { } /** @throws Exception If failed. */ + @Test public void testAtomicLongLocal() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); @@ -128,6 +131,7 @@ public void testAtomicLongLocal() throws Exception { } /** @throws Exception If failed. */ + @Test public void testOneAsyncOpPartitioned() throws Exception { mode = CacheMode.PARTITIONED; @@ -142,6 +146,7 @@ public void testOneAsyncOpPartitioned() throws Exception { } /** @throws Exception If failed. */ + @Test public void testOneAsyncOpReplicated() throws Exception { mode = CacheMode.REPLICATED; @@ -156,6 +161,7 @@ public void testOneAsyncOpReplicated() throws Exception { } /** @throws Exception If failed. */ + @Test public void testOneAsyncOpLocal() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); @@ -170,6 +176,7 @@ public void testOneAsyncOpLocal() throws Exception { } /** @throws Exception If failed. */ + @Test public void testSeveralAsyncOpsPartitioned() throws Exception { mode = CacheMode.PARTITIONED; @@ -184,6 +191,7 @@ public void testSeveralAsyncOpsPartitioned() throws Exception { } /** @throws Exception If failed. */ + @Test public void testSeveralAsyncOpsReplicated() throws Exception { mode = CacheMode.REPLICATED; @@ -198,6 +206,7 @@ public void testSeveralAsyncOpsReplicated() throws Exception { } /** @throws Exception If failed. */ + @Test public void testSeveralAsyncOpsLocal() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); @@ -212,6 +221,7 @@ public void testSeveralAsyncOpsLocal() throws Exception { } /** @throws Exception If failed. */ + @Test public void testSyncOpAsyncCommitPartitioned() throws Exception { mode = CacheMode.PARTITIONED; @@ -226,6 +236,7 @@ public void testSyncOpAsyncCommitPartitioned() throws Exception { } /** @throws Exception If failed. */ + @Test public void testSyncOpAsyncCommitReplicated() throws Exception { mode = CacheMode.REPLICATED; @@ -240,6 +251,7 @@ public void testSyncOpAsyncCommitReplicated() throws Exception { } /** @throws Exception If failed. */ + @Test public void testSyncOpAsyncCommitLocal() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); @@ -254,6 +266,7 @@ public void testSyncOpAsyncCommitLocal() throws Exception { } /** @throws Exception If failed. */ + @Test public void testAsyncOpsAsyncCommitPartitioned() throws Exception { mode = CacheMode.PARTITIONED; @@ -268,6 +281,7 @@ public void testAsyncOpsAsyncCommitPartitioned() throws Exception { } /** @throws Exception If failed. */ + @Test public void testAsyncOpsAsyncCommitReplicated() throws Exception { mode = CacheMode.REPLICATED; @@ -282,6 +296,7 @@ public void testAsyncOpsAsyncCommitReplicated() throws Exception { } /** @throws Exception If failed. */ + @Test public void testAsyncOpsAsyncCommitLocal() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); @@ -518,4 +533,4 @@ private TestValue(int i) { this.i = i; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReloadSelfTest.java index b9603837f02b5..f6850bc557d6a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReloadSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReloadSelfTest.java @@ -130,6 +130,7 @@ public class GridCacheReloadSelfTest extends GridCommonAbstractTest { * * @throws Exception If error occurs. */ + @Test public void testReloadEvictionLocalCache() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); @@ -144,6 +145,7 @@ public void testReloadEvictionLocalCache() throws Exception { * * @throws Exception If error occurs. */ + @Test public void testReloadEvictionPartitionedCacheNearEnabled() throws Exception { cacheMode = PARTITIONED; @@ -156,6 +158,7 @@ public void testReloadEvictionPartitionedCacheNearEnabled() throws Exception { * * @throws Exception If error occurs. */ + @Test public void testReloadEvictionPartitionedCacheNearDisabled() throws Exception { cacheMode = PARTITIONED; nearEnabled = false; @@ -168,6 +171,7 @@ public void testReloadEvictionPartitionedCacheNearDisabled() throws Exception { * * @throws Exception If error occurs. */ + @Test public void testReloadEvictionReplicatedCache() throws Exception { cacheMode = CacheMode.REPLICATED; @@ -194,4 +198,4 @@ private void doTest() throws Exception { stopGrid(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReplicatedSynchronousCommitTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReplicatedSynchronousCommitTest.java index deca296f59033..863ea010c4c7a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReplicatedSynchronousCommitTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReplicatedSynchronousCommitTest.java @@ -103,6 +103,7 @@ public GridCacheReplicatedSynchronousCommitTest() { /** * @throws Exception If test failed. */ + @Test public void testSynchronousCommit() throws Exception { try { Ignite firstIgnite = startGrid("1"); @@ -129,6 +130,7 @@ public void testSynchronousCommit() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testSynchronousCommitNodeLeave() throws Exception { try { Ignite ignite1 = startGrid("1"); @@ -202,4 +204,4 @@ public int messagesCount() { super.sendMessage(node, msg, ackClosure); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReturnValueTransferSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReturnValueTransferSelfTest.java index 1b06e00cf5095..6095e9972d7ef 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReturnValueTransferSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReturnValueTransferSelfTest.java @@ -76,6 +76,7 @@ public class GridCacheReturnValueTransferSelfTest extends GridCommonAbstractTest * @throws Exception If failed. * TODO IGNITE-581 enable when fixed. */ + @Test public void testTransformTransactionalNoBackups() throws Exception { // Test works too long and fails. fail("https://issues.apache.org/jira/browse/IGNITE-581"); @@ -87,6 +88,7 @@ public void testTransformTransactionalNoBackups() throws Exception { * @throws Exception If failed. * TODO IGNITE-581 enable when fixed. */ + @Test public void testTransformTransactionalOneBackup() throws Exception { // Test works too long and fails. fail("https://issues.apache.org/jira/browse/IGNITE-581"); @@ -179,4 +181,4 @@ public TestObject() { assert !failDeserialization; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSlowTxWarnTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSlowTxWarnTest.java index a37bbf36da7d5..55988cf8bd443 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSlowTxWarnTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSlowTxWarnTest.java @@ -75,6 +75,7 @@ public class GridCacheSlowTxWarnTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testWarningOutput() throws Exception { try { IgniteKernal g = (IgniteKernal)startGrid(1); @@ -147,4 +148,4 @@ private void checkCache(Ignite g, String cacheName, boolean simulateTimeout, tx.close(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStopSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStopSelfTest.java index 7f82d75d02ca1..22acac0af1d62 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStopSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStopSelfTest.java @@ -96,6 +96,7 @@ public class GridCacheStopSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testStopExplicitTransactions() throws Exception { testStop(true); } @@ -103,6 +104,7 @@ public void testStopExplicitTransactions() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStopImplicitTransactions() throws Exception { testStop(false); } @@ -110,6 +112,7 @@ public void testStopImplicitTransactions() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStopExplicitTransactionsReplicated() throws Exception { replicated = true; @@ -119,6 +122,7 @@ public void testStopExplicitTransactionsReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStopImplicitTransactionsReplicated() throws Exception { replicated = true; @@ -128,6 +132,7 @@ public void testStopImplicitTransactionsReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStopAtomic() throws Exception { atomic = true; @@ -137,6 +142,7 @@ public void testStopAtomic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStopMultithreaded() throws Exception { try { startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManagerDeserializationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManagerDeserializationTest.java index c63f2425a70d2..c49f9c8bb1fd1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManagerDeserializationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManagerDeserializationTest.java @@ -143,6 +143,7 @@ protected CacheConfiguration cacheConfiguration() { * * @throws Exception If failed. */ + @Test public void testStream() throws Exception { final Ignite grid = startGrid(); @@ -168,6 +169,7 @@ public void testStream() throws Exception { * * @throws Exception If failed. */ + @Test public void testPartitionMove() throws Exception { final Ignite grid = startGrid("binaryGrid1"); @@ -206,6 +208,7 @@ public void testPartitionMove() throws Exception { * * @throws Exception If failed. */ + @Test public void testBinaryStream() throws Exception { final Ignite grid = startGrid("binaryGrid"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStorePutxSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStorePutxSelfTest.java index 2175abb43d39e..d82a427d938ab 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStorePutxSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStorePutxSelfTest.java @@ -89,6 +89,7 @@ public class GridCacheStorePutxSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPutShouldNotTriggerLoad() throws Exception { jcache().put(1, 1); jcache().put(2, 2); @@ -99,6 +100,7 @@ public void testPutShouldNotTriggerLoad() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutShouldNotTriggerLoadWithTx() throws Exception { IgniteCache cache = jcache(); @@ -156,4 +158,4 @@ private static class TestStore implements CacheStore { // No-op. } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStoreValueBytesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStoreValueBytesSelfTest.java index 237ae72544ee0..96e6ec17c618a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStoreValueBytesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStoreValueBytesSelfTest.java @@ -74,6 +74,7 @@ public class GridCacheStoreValueBytesSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testEnabled() throws Exception { storeValBytes = true; @@ -92,4 +93,4 @@ public void testEnabled() throws Exception { assert entry.valueBytes() != null; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java index 261411fa52217..f48059380d538 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java @@ -84,6 +84,7 @@ public class GridCacheSwapPreloadSelfTest extends GridCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testSwapReplicated() throws Exception { cacheMode = REPLICATED; @@ -91,6 +92,7 @@ public void testSwapReplicated() throws Exception { } /** @throws Exception If failed. */ + @Test public void testSwapPartitioned() throws Exception { cacheMode = PARTITIONED; @@ -142,6 +144,7 @@ private void checkSwap() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSwapReplicatedMultithreaded() throws Exception { cacheMode = REPLICATED; @@ -149,6 +152,7 @@ public void testSwapReplicatedMultithreaded() throws Exception { } /** @throws Exception If failed. */ + @Test public void testSwapPartitionedMultithreaded() throws Exception { cacheMode = PARTITIONED; @@ -242,4 +246,4 @@ private void checkSwapMultithreaded() throws Exception { } } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTcpClientDiscoveryMultiThreadedTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTcpClientDiscoveryMultiThreadedTest.java index 8a2f5d5bc8521..984d90cccd4a4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTcpClientDiscoveryMultiThreadedTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTcpClientDiscoveryMultiThreadedTest.java @@ -104,6 +104,7 @@ public class GridCacheTcpClientDiscoveryMultiThreadedTest extends GridCacheAbstr /** * @throws Exception If failed. */ + @Test public void testCacheConcurrentlyWithMultipleClientNodes() throws Exception { srvNodesCnt = 2; clientNodesCnt = 3; @@ -190,4 +191,4 @@ private void performSimpleOperationsOnCache(IgniteCache cache) for (int i = 100; i < 200; i++) assertEquals(i, (int) cache.get(i)); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTransactionalAbstractMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTransactionalAbstractMetricsSelfTest.java index c4458797dde9f..0bd6faeadaf91 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTransactionalAbstractMetricsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTransactionalAbstractMetricsSelfTest.java @@ -47,6 +47,7 @@ public abstract class GridCacheTransactionalAbstractMetricsSelfTest extends Grid /** * @throws Exception If failed. */ + @Test public void testOptimisticReadCommittedCommits() throws Exception { testCommits(OPTIMISTIC, READ_COMMITTED, true); } @@ -54,6 +55,7 @@ public void testOptimisticReadCommittedCommits() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOptimisticReadCommittedCommitsNoData() throws Exception { testCommits(OPTIMISTIC, READ_COMMITTED, false); } @@ -61,6 +63,7 @@ public void testOptimisticReadCommittedCommitsNoData() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOptimisticRepeatableReadCommits() throws Exception { testCommits(OPTIMISTIC, REPEATABLE_READ, true); } @@ -68,6 +71,7 @@ public void testOptimisticRepeatableReadCommits() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOptimisticRepeatableReadCommitsNoData() throws Exception { testCommits(OPTIMISTIC, REPEATABLE_READ, false); } @@ -75,6 +79,7 @@ public void testOptimisticRepeatableReadCommitsNoData() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOptimisticSerializableCommits() throws Exception { testCommits(OPTIMISTIC, SERIALIZABLE, true); } @@ -82,6 +87,7 @@ public void testOptimisticSerializableCommits() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOptimisticSerializableCommitsNoData() throws Exception { testCommits(OPTIMISTIC, SERIALIZABLE, false); } @@ -89,6 +95,7 @@ public void testOptimisticSerializableCommitsNoData() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticReadCommittedCommits() throws Exception { testCommits(PESSIMISTIC, READ_COMMITTED, true); } @@ -96,6 +103,7 @@ public void testPessimisticReadCommittedCommits() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticReadCommittedCommitsNoData() throws Exception { testCommits(PESSIMISTIC, READ_COMMITTED, false); } @@ -103,6 +111,7 @@ public void testPessimisticReadCommittedCommitsNoData() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticRepeatableReadCommits() throws Exception { testCommits(PESSIMISTIC, REPEATABLE_READ, true); } @@ -110,6 +119,7 @@ public void testPessimisticRepeatableReadCommits() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticRepeatableReadCommitsNoData() throws Exception { testCommits(PESSIMISTIC, REPEATABLE_READ, false); } @@ -117,6 +127,7 @@ public void testPessimisticRepeatableReadCommitsNoData() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticSerializableCommits() throws Exception { testCommits(PESSIMISTIC, SERIALIZABLE, true); } @@ -124,6 +135,7 @@ public void testPessimisticSerializableCommits() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticSerializableCommitsNoData() throws Exception { testCommits(PESSIMISTIC, SERIALIZABLE, false); } @@ -131,6 +143,7 @@ public void testPessimisticSerializableCommitsNoData() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOptimisticReadCommittedRollbacks() throws Exception { testRollbacks(OPTIMISTIC, READ_COMMITTED, true); } @@ -138,6 +151,7 @@ public void testOptimisticReadCommittedRollbacks() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOptimisticReadCommittedRollbacksNoData() throws Exception { testRollbacks(OPTIMISTIC, READ_COMMITTED, false); } @@ -145,6 +159,7 @@ public void testOptimisticReadCommittedRollbacksNoData() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOptimisticRepeatableReadRollbacks() throws Exception { testRollbacks(OPTIMISTIC, REPEATABLE_READ, true); } @@ -152,6 +167,7 @@ public void testOptimisticRepeatableReadRollbacks() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOptimisticRepeatableReadRollbacksNoData() throws Exception { testRollbacks(OPTIMISTIC, REPEATABLE_READ, false); } @@ -159,6 +175,7 @@ public void testOptimisticRepeatableReadRollbacksNoData() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOptimisticSerializableRollbacks() throws Exception { testRollbacks(OPTIMISTIC, SERIALIZABLE, true); } @@ -166,6 +183,7 @@ public void testOptimisticSerializableRollbacks() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOptimisticSerializableRollbacksNoData() throws Exception { testRollbacks(OPTIMISTIC, SERIALIZABLE, false); } @@ -173,6 +191,7 @@ public void testOptimisticSerializableRollbacksNoData() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticReadCommittedRollbacks() throws Exception { testRollbacks(PESSIMISTIC, READ_COMMITTED, true); } @@ -180,6 +199,7 @@ public void testPessimisticReadCommittedRollbacks() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticReadCommittedRollbacksNoData() throws Exception { testRollbacks(PESSIMISTIC, READ_COMMITTED, false); } @@ -187,6 +207,7 @@ public void testPessimisticReadCommittedRollbacksNoData() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticRepeatableReadRollbacks() throws Exception { testRollbacks(PESSIMISTIC, REPEATABLE_READ, true); } @@ -194,6 +215,7 @@ public void testPessimisticRepeatableReadRollbacks() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticRepeatableReadRollbacksNoData() throws Exception { testRollbacks(PESSIMISTIC, REPEATABLE_READ, false); } @@ -201,6 +223,7 @@ public void testPessimisticRepeatableReadRollbacksNoData() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticSerializableRollbacks() throws Exception { testRollbacks(PESSIMISTIC, SERIALIZABLE, true); } @@ -208,6 +231,7 @@ public void testPessimisticSerializableRollbacks() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticSerializableRollbacksNoData() throws Exception { testRollbacks(PESSIMISTIC, SERIALIZABLE, false); } @@ -215,6 +239,7 @@ public void testPessimisticSerializableRollbacksNoData() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOptimisticSuspendedReadCommittedTxTimeoutRollbacks() throws Exception { doTestSuspendedTxTimeoutRollbacks(OPTIMISTIC, READ_COMMITTED); } @@ -222,6 +247,7 @@ public void testOptimisticSuspendedReadCommittedTxTimeoutRollbacks() throws Exce /** * @throws Exception If failed. */ + @Test public void testOptimisticSuspendedRepeatableReadTxTimeoutRollbacks() throws Exception { doTestSuspendedTxTimeoutRollbacks(OPTIMISTIC, REPEATABLE_READ); } @@ -229,6 +255,7 @@ public void testOptimisticSuspendedRepeatableReadTxTimeoutRollbacks() throws Exc /** * @throws Exception If failed. */ + @Test public void testOptimisticSuspendedSerializableTxTimeoutRollbacks() throws Exception { doTestSuspendedTxTimeoutRollbacks(OPTIMISTIC, SERIALIZABLE); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerEvictionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerEvictionSelfTest.java index 66ef47c8be5d2..6fc6cef66d8de 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerEvictionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerEvictionSelfTest.java @@ -75,6 +75,7 @@ public class GridCacheTtlManagerEvictionSelfTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testLocalEviction() throws Exception { checkEviction(CacheMode.LOCAL); } @@ -82,6 +83,7 @@ public void testLocalEviction() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPartitionedEviction() throws Exception { checkEviction(CacheMode.PARTITIONED); } @@ -89,6 +91,7 @@ public void testPartitionedEviction() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReplicatedEviction() throws Exception { checkEviction(CacheMode.REPLICATED); } @@ -131,4 +134,4 @@ private void checkEviction(CacheMode mode) throws Exception { Ignition.stopAll(true); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerLoadTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerLoadTest.java index b117c86c806c9..997f822d4b6bf 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerLoadTest.java @@ -36,6 +36,7 @@ public class GridCacheTtlManagerLoadTest extends GridCacheTtlManagerSelfTest { /** * @throws Exception If failed. */ + @Test public void testLoad() throws Exception { cacheMode = REPLICATED; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerNotificationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerNotificationTest.java index d25b2af645ce6..2e7de1bbd2c97 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerNotificationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerNotificationTest.java @@ -98,6 +98,7 @@ private CacheConfiguration createCacheConfiguration(String name) { /** * @throws Exception If failed. */ + @Test public void testThatNotificationWorkAsExpected() throws Exception { try (final Ignite g = startGrid(0)) { final BlockingArrayQueue queue = new BlockingArrayQueue<>(); @@ -134,6 +135,7 @@ public void testThatNotificationWorkAsExpected() throws Exception { * * @throws Exception If failed. */ + @Test public void testThatNotificationWorkAsExpectedInMultithreadedMode() throws Exception { final CyclicBarrier barrier = new CyclicBarrier(21); final AtomicInteger keysRangeGen = new AtomicInteger(); @@ -185,6 +187,7 @@ public void testThatNotificationWorkAsExpectedInMultithreadedMode() throws Excep * * @throws Exception If failed. */ + @Test public void testThatNotificationWorkAsExpectedManyCaches() throws Exception { final int smallDuration = 4_000; @@ -294,4 +297,4 @@ private static class CacheFiller implements Runnable { } } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerSelfTest.java index 52f19b78ca65a..accc7dbb990da 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerSelfTest.java @@ -69,6 +69,7 @@ public class GridCacheTtlManagerSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testLocalTtl() throws Exception { checkTtl(LOCAL); } @@ -76,6 +77,7 @@ public void testLocalTtl() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPartitionedTtl() throws Exception { checkTtl(PARTITIONED); } @@ -83,6 +85,7 @@ public void testPartitionedTtl() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReplicatedTtl() throws Exception { checkTtl(REPLICATED); } @@ -121,4 +124,4 @@ private void checkTtl(CacheMode mode) throws Exception { stopAllGrids(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheUtilsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheUtilsSelfTest.java index 0e751d1d1524e..92f8b756d2556 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheUtilsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheUtilsSelfTest.java @@ -117,6 +117,7 @@ private static class ExtendsClassWithEqualsAndHashCode2 extends EqualsAndHashCod /** */ + @Test public void testCacheKeyValidation() throws IgniteCheckedException { CU.validateCacheKey("key"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytesPreloadingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytesPreloadingSelfTest.java index e32d8aaa63bef..eb71be53ae5cb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytesPreloadingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytesPreloadingSelfTest.java @@ -61,6 +61,7 @@ protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throw /** * @throws Exception If failed. */ + @Test public void testOnHeapTiered() throws Exception { startGrids(1); @@ -108,4 +109,4 @@ private void checkByteArrays() throws Exception { } } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueConsistencyAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueConsistencyAbstractSelfTest.java index 6ef6ed4a8b957..f45eeddf26d83 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueConsistencyAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueConsistencyAbstractSelfTest.java @@ -105,6 +105,7 @@ public abstract class GridCacheValueConsistencyAbstractSelfTest extends GridCach /** * @throws Exception If failed. */ + @Test public void testPutRemove() throws Exception { awaitPartitionMapExchange(); @@ -163,6 +164,7 @@ public void testPutRemove() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutRemoveAll() throws Exception { awaitPartitionMapExchange(); @@ -226,6 +228,7 @@ public void testPutRemoveAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutConsistencyMultithreaded() throws Exception { if (nearEnabled()) fail("https://issues.apache.org/jira/browse/IGNITE-627"); @@ -279,6 +282,7 @@ public void testPutConsistencyMultithreaded() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutRemoveConsistencyMultithreaded() throws Exception { if (nearEnabled()) fail("https://issues.apache.org/jira/browse/IGNITE-627"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVariableTopologySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVariableTopologySelfTest.java index b9f7a3577fdb6..2c6ad91d268cf 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVariableTopologySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVariableTopologySelfTest.java @@ -117,6 +117,7 @@ private void startGrids(int cnt, int startIdx) throws Exception { * @throws Exception If failed. */ @SuppressWarnings({"TooBroadScope"}) + @Test public void testNodeStop() throws Exception { // -- Test parameters. -- // int nodeCnt = 3; @@ -210,4 +211,4 @@ public void testNodeStop() throws Exception { //debugFut.get(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionMultinodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionMultinodeTest.java index 0fd3fb9ca5ca3..ffc7c85ab2e03 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionMultinodeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionMultinodeTest.java @@ -89,6 +89,7 @@ public class GridCacheVersionMultinodeTest extends GridCacheAbstractSelfTest { /** * @throws Exception If failed. */ + @Test public void testVersionTx() throws Exception { atomicityMode = TRANSACTIONAL; @@ -98,6 +99,7 @@ public void testVersionTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testVersionTxNearEnabled() throws Exception { atomicityMode = TRANSACTIONAL; @@ -109,6 +111,7 @@ public void testVersionTxNearEnabled() throws Exception { /** * @throws Exception If failed. */ + @Test public void testVersionAtomicPrimary() throws Exception { atomicityMode = ATOMIC; @@ -118,6 +121,7 @@ public void testVersionAtomicPrimary() throws Exception { /** * @throws Exception If failed. */ + @Test public void testVersionAtomicPrimaryNearEnabled() throws Exception { atomicityMode = ATOMIC; @@ -224,4 +228,4 @@ private void checkEntryVersion(String key) throws Exception { assertTrue(verified); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionSelfTest.java index 9cec7ecf7b270..a7f605fe115e9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionSelfTest.java @@ -31,6 +31,7 @@ public class GridCacheVersionSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testTopologyVersionDrId() throws Exception { GridCacheVersion ver = version(10, 0); @@ -76,6 +77,7 @@ public void testTopologyVersionDrId() throws Exception { * * @throws Exception If failed. */ + @Test public void testMarshalling() throws Exception { GridCacheVersion ver = version(1, 1); GridCacheVersionEx verEx = new GridCacheVersionEx(2, 2, 0, ver); @@ -100,4 +102,4 @@ public void testMarshalling() throws Exception { private GridCacheVersion version(int nodeOrder, int drId) { return new GridCacheVersion(0, 0, nodeOrder, drId); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionTopologyChangeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionTopologyChangeTest.java index ad781e851cd38..7425ec01d0b67 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionTopologyChangeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionTopologyChangeTest.java @@ -69,6 +69,7 @@ public class GridCacheVersionTopologyChangeTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testVersionIncreaseAtomic() throws Exception { checkVersionIncrease(cacheConfigurations(ATOMIC)); } @@ -76,6 +77,7 @@ public void testVersionIncreaseAtomic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testVersionIncreaseTx() throws Exception { checkVersionIncrease(cacheConfigurations(TRANSACTIONAL)); } @@ -83,6 +85,7 @@ public void testVersionIncreaseTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testVersionIncreaseMvccTx() throws Exception { checkVersionIncrease(cacheConfigurations(TRANSACTIONAL_SNAPSHOT)); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridDataStorageConfigurationConsistencySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridDataStorageConfigurationConsistencySelfTest.java index 3c728f7898045..38a095737d86d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridDataStorageConfigurationConsistencySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridDataStorageConfigurationConsistencySelfTest.java @@ -56,6 +56,7 @@ public class GridDataStorageConfigurationConsistencySelfTest extends GridCommonA /** * @throws Exception If failed. */ + @Test public void testMemoryConfigurationConsistency() throws Exception { GridTestUtils.assertThrows(log, new Callable() { /** {@inheritDoc} */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridEvictionPolicyMBeansTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridEvictionPolicyMBeansTest.java index b093bb2f33307..d8a5ce746aea4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridEvictionPolicyMBeansTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridEvictionPolicyMBeansTest.java @@ -89,6 +89,7 @@ public GridEvictionPolicyMBeansTest() { } /** Check that eviction bean is available */ + @Test public void testEvictionPolicyBeans() throws Exception{ checkBean("cache1", "org.apache.ignite.cache.eviction.fifo.FifoEvictionPolicy", "MaxSize", 100); checkBean("cache1", "org.apache.ignite.cache.eviction.fifo.FifoEvictionPolicy", "BatchSize", 10); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridLocalCacheStoreManagerDeserializationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridLocalCacheStoreManagerDeserializationTest.java index 827b3cf3a1e54..97ab677d469b4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridLocalCacheStoreManagerDeserializationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridLocalCacheStoreManagerDeserializationTest.java @@ -50,6 +50,7 @@ public class GridLocalCacheStoreManagerDeserializationTest extends GridCacheStor * * @throws Exception */ + @Test public void testUpdate() throws Exception { // Goal is to check correct saving to store (no exception must be thrown) @@ -78,6 +79,7 @@ public void testUpdate() throws Exception { * * @throws Exception */ + @Test public void testBinaryUpdate() throws Exception { // Goal is to check correct saving to store (no exception must be thrown) final Ignite grid = startGrid("binaryGrid"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridLocalIgniteSerializationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridLocalIgniteSerializationTest.java index 00b3137149742..57dcf49dcbe26 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridLocalIgniteSerializationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridLocalIgniteSerializationTest.java @@ -63,6 +63,7 @@ public class GridLocalIgniteSerializationTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testPutGetSimple() throws Exception { checkPutGet(new SimpleTestObject("one"), null); } @@ -70,6 +71,7 @@ public void testPutGetSimple() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutGetSerializable() throws Exception { checkPutGet(new SerializableTestObject("test"), null); } @@ -77,6 +79,7 @@ public void testPutGetSerializable() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutGetExternalizable() throws Exception { checkPutGet(new ExternalizableTestObject("test"), null); } @@ -84,6 +87,7 @@ public void testPutGetExternalizable() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutGetBinarylizable() throws Exception { checkPutGet(new BinarylizableTestObject("test"), "binaryIgnite"); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridProjectionForCachesOnDaemonNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridProjectionForCachesOnDaemonNodeSelfTest.java index 85b237323191f..d9faa7e6d74b5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridProjectionForCachesOnDaemonNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridProjectionForCachesOnDaemonNodeSelfTest.java @@ -89,6 +89,7 @@ private DiscoverySpi discoverySpi() { /** * @throws Exception If failed. */ + @Test public void testForDataNodes() throws Exception { ClusterGroup grp = ignite.cluster().forDataNodes(DEFAULT_CACHE_NAME); @@ -107,6 +108,7 @@ public void testForDataNodes() throws Exception { /** * @throws Exception If failed. */ + @Test public void testForClientNodes() throws Exception { ClusterGroup grp = ignite.cluster().forClientNodes(DEFAULT_CACHE_NAME); @@ -125,6 +127,7 @@ public void testForClientNodes() throws Exception { /** * @throws Exception If failed. */ + @Test public void testForCacheNodes() throws Exception { ClusterGroup grp = ignite.cluster().forCacheNodes(DEFAULT_CACHE_NAME); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteAbstractDynamicCacheStartFailTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteAbstractDynamicCacheStartFailTest.java index d506224dc1901..c0abe95dd9fd3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteAbstractDynamicCacheStartFailTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteAbstractDynamicCacheStartFailTest.java @@ -107,6 +107,7 @@ protected boolean persistenceEnabled() { /** * @throws Exception If failed. */ + @Test public void testBrokenAffinityFunStartOnServerFailedOnClient() throws Exception { final String clientName = CLIENT_GRID_NAME + "testBrokenAffinityFunStartOnServerFailedOnClient"; @@ -135,6 +136,7 @@ public void testBrokenAffinityFunStartOnServerFailedOnClient() throws Exception /** * @throws Exception If failed. */ + @Test public void testBrokenAffinityFunStartOnServerFailedOnServer() throws Exception { final String clientName = CLIENT_GRID_NAME + "testBrokenAffinityFunStartOnServerFailedOnServer"; @@ -164,6 +166,7 @@ public void testBrokenAffinityFunStartOnServerFailedOnServer() throws Exception /** * @throws Exception If failed. */ + @Test public void testBrokenAffinityFunStartOnClientFailOnServer() throws Exception { final String clientName = CLIENT_GRID_NAME + "testBrokenAffinityFunStartOnClientFailOnServer"; @@ -193,6 +196,7 @@ public void testBrokenAffinityFunStartOnClientFailOnServer() throws Exception { /** * Test cache start with broken affinity function that throws an exception on all nodes. */ + @Test public void testBrokenAffinityFunOnAllNodes() { final boolean failOnAllNodes = true; final int unluckyNode = 0; @@ -209,6 +213,7 @@ public void testBrokenAffinityFunOnAllNodes() { /** * Test cache start with broken affinity function that throws an exception on initiator node. */ + @Test public void testBrokenAffinityFunOnInitiator() { final boolean failOnAllNodes = false; final int unluckyNode = 1; @@ -225,6 +230,7 @@ public void testBrokenAffinityFunOnInitiator() { /** * Test cache start with broken affinity function that throws an exception on non-initiator node. */ + @Test public void testBrokenAffinityFunOnNonInitiator() { final boolean failOnAllNodes = false; final int unluckyNode = 1; @@ -241,6 +247,7 @@ public void testBrokenAffinityFunOnNonInitiator() { /** * Test cache start with broken affinity function that throws an exception on coordinator node. */ + @Test public void testBrokenAffinityFunOnCoordinatorDiffInitiator() { final boolean failOnAllNodes = false; final int unluckyNode = crdIdx; @@ -257,6 +264,7 @@ public void testBrokenAffinityFunOnCoordinatorDiffInitiator() { /** * Test cache start with broken affinity function that throws an exception on initiator node. */ + @Test public void testBrokenAffinityFunOnCoordinator() { final boolean failOnAllNodes = false; final int unluckyNode = crdIdx; @@ -273,6 +281,7 @@ public void testBrokenAffinityFunOnCoordinator() { /** * Tests cache start with node filter and broken affinity function that throws an exception on initiator node. */ + @Test public void testBrokenAffinityFunWithNodeFilter() { final boolean failOnAllNodes = false; final int unluckyNode = 0; @@ -289,6 +298,7 @@ public void testBrokenAffinityFunWithNodeFilter() { /** * Tests cache start with broken cache store that throws an exception on all nodes. */ + @Test public void testBrokenCacheStoreOnAllNodes() { final boolean failOnAllNodes = true; final int unluckyNode = 0; @@ -305,6 +315,7 @@ public void testBrokenCacheStoreOnAllNodes() { /** * Tests cache start with broken cache store that throws an exception on initiator node. */ + @Test public void testBrokenCacheStoreOnInitiator() { final boolean failOnAllNodes = false; final int unluckyNode = 1; @@ -321,6 +332,7 @@ public void testBrokenCacheStoreOnInitiator() { /** * Tests cache start that throws an Ignite checked exception on initiator node. */ + @Test public void testThrowsIgniteCheckedExceptionOnInitiator() { final int unluckyNode = 1; final int unluckyCfg = 1; @@ -335,6 +347,7 @@ public void testThrowsIgniteCheckedExceptionOnInitiator() { /** * Tests cache start with broken cache store that throws an exception on non-initiator node. */ + @Test public void testBrokenCacheStoreOnNonInitiator() { final boolean failOnAllNodes = false; final int unluckyNode = 1; @@ -351,6 +364,7 @@ public void testBrokenCacheStoreOnNonInitiator() { /** * Tests cache start that throws an Ignite checked exception on non-initiator node. */ + @Test public void testThrowsIgniteCheckedExceptionOnNonInitiator() { final int unluckyNode = 1; final int unluckyCfg = 1; @@ -365,6 +379,7 @@ public void testThrowsIgniteCheckedExceptionOnNonInitiator() { /** * Tests cache start with broken cache store that throws an exception on initiator node. */ + @Test public void testBrokenCacheStoreOnCoordinatorDiffInitiator() { final boolean failOnAllNodes = false; final int unluckyNode = crdIdx; @@ -382,6 +397,7 @@ public void testBrokenCacheStoreOnCoordinatorDiffInitiator() { * Tests cache start that throws an Ignite checked exception on coordinator node * that doesn't initiator node. */ + @Test public void testThrowsIgniteCheckedExceptionOnCoordinatorDiffInitiator() { final int unluckyNode = crdIdx; final int unluckyCfg = 1; @@ -396,6 +412,7 @@ public void testThrowsIgniteCheckedExceptionOnCoordinatorDiffInitiator() { /** * Tests cache start with broken cache store that throws an exception on coordinator node. */ + @Test public void testBrokenCacheStoreFunOnCoordinator() { final boolean failOnAllNodes = false; final int unluckyNode = crdIdx; @@ -412,6 +429,7 @@ public void testBrokenCacheStoreFunOnCoordinator() { /** * Tests cache start that throws an Ignite checked exception on coordinator node. */ + @Test public void testThrowsIgniteCheckedExceptionOnCoordinator() { final int unluckyNode = crdIdx; final int unluckyCfg = 1; @@ -426,6 +444,7 @@ public void testThrowsIgniteCheckedExceptionOnCoordinator() { /** * Tests multiple creation of cache with broken affinity function. */ + @Test public void testCreateCacheMultipleTimes() { final boolean failOnAllNodes = false; final int unluckyNode = 1; @@ -451,6 +470,7 @@ public void testCreateCacheMultipleTimes() { * * @throws Exception If test failed. */ + @Test public void testCacheStartAfterFailure() throws Exception { CacheConfiguration cfg = createCacheConfigsWithBrokenAffinityFun( false, 1, 0, 1, false).get(0); @@ -473,6 +493,7 @@ public void testCacheStartAfterFailure() throws Exception { * * @throws Exception If test failed. */ + @Test public void testExistingCacheAfterFailure() throws Exception { IgniteCache cache = grid(0).getOrCreateCache(createCacheConfiguration(EXISTING_CACHE_NAME)); @@ -494,6 +515,7 @@ public void testExistingCacheAfterFailure() throws Exception { * * @throws Exception If test failed. */ + @Test public void testTopologyChangesAfterFailure() throws Exception { final String clientName = "testTopologyChangesAfterFailure"; @@ -551,6 +573,7 @@ public void testTopologyChangesAfterFailure() throws Exception { checkCacheOperations(clientNode.cache(EXISTING_CACHE_NAME)); } + @Test public void testConcurrentClientNodeJoins() throws Exception { final int clientCnt = 3; final int numberOfAttempts = 5; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractStopBusySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractStopBusySelfTest.java index 8774932f29405..d3a02f8a7c880 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractStopBusySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractStopBusySelfTest.java @@ -165,6 +165,7 @@ protected CacheAtomicityMode atomicityMode(){ /** * @throws Exception If failed. */ + @Test public void testPut() throws Exception { executeTest(new Callable() { /** {@inheritDoc} */ @@ -183,6 +184,7 @@ public void testPut() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemove() throws Exception { executeTest(new Callable() { /** {@inheritDoc} */ @@ -201,6 +203,7 @@ public void testRemove() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAsync() throws Exception { executeTest(new Callable() { /** {@inheritDoc} */ @@ -219,6 +222,7 @@ public void testPutAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGet() throws Exception { bannedMsg.set(GridNearSingleGetRequest.class); @@ -239,6 +243,7 @@ public void testGet() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetAll() throws Exception { bannedMsg.set(GridNearGetRequest.class); @@ -302,6 +307,7 @@ private void executeTest(Callable call) throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutBatch() throws Exception { assert !suspended.get(); @@ -406,4 +412,4 @@ private class StopRunnable implements Runnable { info("Grid stopped."); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicStopBusySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicStopBusySelfTest.java index 281397a7c98c8..8eac6910fcf2c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicStopBusySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicStopBusySelfTest.java @@ -30,30 +30,34 @@ public class IgniteCacheAtomicStopBusySelfTest extends IgniteCacheAbstractStopBu } /** {@inheritDoc} */ - @Override public void testPut() throws Exception { + @Override @Test + public void testPut() throws Exception { bannedMsg.set(GridNearAtomicSingleUpdateRequest.class); super.testPut(); } /** {@inheritDoc} */ - @Override public void testPutBatch() throws Exception { + @Override @Test + public void testPutBatch() throws Exception { bannedMsg.set(GridNearAtomicSingleUpdateRequest.class); super.testPut(); } /** {@inheritDoc} */ - @Override public void testPutAsync() throws Exception { + @Override @Test + public void testPutAsync() throws Exception { bannedMsg.set(GridNearAtomicSingleUpdateRequest.class); super.testPut(); } /** {@inheritDoc} */ - @Override public void testRemove() throws Exception { + @Override @Test + public void testRemove() throws Exception { bannedMsg.set(GridNearAtomicSingleUpdateRequest.class); super.testPut(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheBinaryEntryProcessorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheBinaryEntryProcessorSelfTest.java index 963fe88b899e5..c741758d5b618 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheBinaryEntryProcessorSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheBinaryEntryProcessorSelfTest.java @@ -88,6 +88,7 @@ private CacheConfiguration cacheConfiguration(CacheMode cach /** * @throws Exception If failed. */ + @Test public void testPartitionedTransactional() throws Exception { checkInvokeBinaryObject(CacheMode.PARTITIONED, CacheAtomicityMode.TRANSACTIONAL); } @@ -95,6 +96,7 @@ public void testPartitionedTransactional() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReplicatedTransactional() throws Exception { checkInvokeBinaryObject(CacheMode.REPLICATED, CacheAtomicityMode.TRANSACTIONAL); } @@ -102,6 +104,7 @@ public void testReplicatedTransactional() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPartitionedAtomic() throws Exception { checkInvokeBinaryObject(CacheMode.PARTITIONED, CacheAtomicityMode.TRANSACTIONAL); } @@ -109,6 +112,7 @@ public void testPartitionedAtomic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReplicatedAtomic() throws Exception { checkInvokeBinaryObject(CacheMode.REPLICATED, CacheAtomicityMode.TRANSACTIONAL); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheBinaryObjectsScanSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheBinaryObjectsScanSelfTest.java index 34402907b46fa..c88e611e149d7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheBinaryObjectsScanSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheBinaryObjectsScanSelfTest.java @@ -119,6 +119,7 @@ private void populateCache(ClassLoader ldr) throws Exception { /** * @throws Exception If failed. */ + @Test public void testScanNoClasses() throws Exception { Ignite client = grid("client"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java index d723b7d7826d9..dd32fda31ea34 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java @@ -168,6 +168,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar /** * @throws Exception In case of error. */ + @Test public void testSize() throws Exception { assert jcache().localSize() == 0; @@ -271,6 +272,7 @@ else if (cacheMode() == PARTITIONED) /** * @throws Exception In case of error. */ + @Test public void testContainsKey() throws Exception { Map vals = new HashMap<>(); @@ -292,6 +294,7 @@ public void testContainsKey() throws Exception { /** * @throws Exception If failed. */ + @Test public void testContainsKeyTx() throws Exception { if (!txEnabled()) return; @@ -326,6 +329,7 @@ public void testContainsKeyTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testContainsKeysTx() throws Exception { if (!txEnabled()) return; @@ -367,6 +371,7 @@ public void testContainsKeysTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemoveInExplicitLocks() throws Exception { if (lockingEnabled()) { IgniteCache cache = jcache(); @@ -392,6 +397,7 @@ public void testRemoveInExplicitLocks() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemoveAllSkipStore() throws Exception { if (!storeEnabled()) return; @@ -410,6 +416,7 @@ public void testRemoveAllSkipStore() throws Exception { /** * @throws IgniteCheckedException If failed. */ + @Test public void testAtomicOps() throws IgniteCheckedException { IgniteCache c = jcache(); @@ -442,6 +449,7 @@ public void testAtomicOps() throws IgniteCheckedException { /** * @throws Exception In case of error. */ + @Test public void testGet() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() { @@ -461,6 +469,7 @@ public void testGet() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testGetAsyncOld() throws Exception { IgniteCache cache = jcache(); @@ -489,6 +498,7 @@ public void testGetAsyncOld() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testGetAsync() throws Exception { IgniteCache cache = jcache(); @@ -509,6 +519,7 @@ public void testGetAsync() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testGetAll() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() { @@ -600,6 +611,7 @@ public void testGetAll() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testGetAllWithNulls() throws Exception { final IgniteCache cache = jcache(); @@ -620,6 +632,7 @@ public void testGetAllWithNulls() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetTxNonExistingKey() throws Exception { if (txShouldBeUsed()) { try (Transaction ignored = transactions().txStart()) { @@ -631,6 +644,7 @@ public void testGetTxNonExistingKey() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testGetAllAsyncOld() throws Exception { final IgniteCache cache = jcache(); @@ -662,6 +676,7 @@ public void testGetAllAsyncOld() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testGetAllAsync() throws Exception { final IgniteCache cache = jcache(); @@ -689,6 +704,7 @@ public void testGetAllAsync() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testPut() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -734,6 +750,7 @@ public void testPut() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testPutTx() throws Exception { if (txShouldBeUsed()) { IgniteCache cache = jcache(); @@ -773,6 +790,7 @@ public void testPutTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeOptimisticReadCommitted() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -784,6 +802,7 @@ public void testInvokeOptimisticReadCommitted() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeOptimisticRepeatableRead() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -795,6 +814,7 @@ public void testInvokeOptimisticRepeatableRead() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokePessimisticReadCommitted() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -806,6 +826,7 @@ public void testInvokePessimisticReadCommitted() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokePessimisticRepeatableRead() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -817,6 +838,7 @@ public void testInvokePessimisticRepeatableRead() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIgniteInvokeOptimisticReadCommitted1() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -828,6 +850,7 @@ public void testIgniteInvokeOptimisticReadCommitted1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIgniteInvokeOptimisticRepeatableRead() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -839,6 +862,7 @@ public void testIgniteInvokeOptimisticRepeatableRead() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIgniteInvokePessimisticReadCommitted() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -850,6 +874,7 @@ public void testIgniteInvokePessimisticReadCommitted() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIgniteInvokePessimisticRepeatableRead() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -945,6 +970,7 @@ private void checkInvoke(TransactionConcurrency concurrency, TransactionIsolatio /** * @throws Exception If failed. */ + @Test public void testInvokeAllOptimisticReadCommitted() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -956,6 +982,7 @@ public void testInvokeAllOptimisticReadCommitted() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeAllOptimisticRepeatableRead() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -967,6 +994,7 @@ public void testInvokeAllOptimisticRepeatableRead() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeAllPessimisticReadCommitted() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -978,6 +1006,7 @@ public void testInvokeAllPessimisticReadCommitted() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeAllPessimisticRepeatableRead() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -989,6 +1018,7 @@ public void testInvokeAllPessimisticRepeatableRead() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeAllAsyncOptimisticReadCommitted() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -1000,6 +1030,7 @@ public void testInvokeAllAsyncOptimisticReadCommitted() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeAllAsyncOptimisticRepeatableRead() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -1011,6 +1042,7 @@ public void testInvokeAllAsyncOptimisticRepeatableRead() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeAllAsyncPessimisticReadCommitted() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -1022,6 +1054,7 @@ public void testInvokeAllAsyncPessimisticReadCommitted() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeAllAsyncPessimisticRepeatableRead() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -1225,6 +1258,7 @@ private void checkInvokeAllAsync(TransactionConcurrency concurrency, Transaction /** * @throws Exception If failed. */ + @Test public void testInvokeAllWithNulls() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -1277,6 +1311,7 @@ public void testInvokeAllWithNulls() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeSequentialOptimisticNoStart() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -1288,6 +1323,7 @@ public void testInvokeSequentialOptimisticNoStart() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeSequentialPessimisticNoStart() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -1299,6 +1335,7 @@ public void testInvokeSequentialPessimisticNoStart() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeSequentialOptimisticWithStart() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -1310,6 +1347,7 @@ public void testInvokeSequentialOptimisticWithStart() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeSequentialPessimisticWithStart() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -1374,6 +1412,7 @@ private void checkInvokeSequential0(boolean startVal, TransactionConcurrency con /** * @throws Exception If failed. */ + @Test public void testInvokeAfterRemoveOptimistic() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -1385,6 +1424,7 @@ public void testInvokeAfterRemoveOptimistic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeAfterRemovePessimistic() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -1427,6 +1467,7 @@ private void checkInvokeAfterRemove(TransactionConcurrency concurrency) throws E /** * @throws Exception If failed. */ + @Test public void testInvokeReturnValueGetOptimisticReadCommitted() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -1438,6 +1479,7 @@ public void testInvokeReturnValueGetOptimisticReadCommitted() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeReturnValueGetOptimisticRepeatableRead() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -1449,6 +1491,7 @@ public void testInvokeReturnValueGetOptimisticRepeatableRead() throws Exception /** * @throws Exception If failed. */ + @Test public void testInvokeReturnValueGetPessimisticReadCommitted() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -1460,6 +1503,7 @@ public void testInvokeReturnValueGetPessimisticReadCommitted() throws Exception /** * @throws Exception If failed. */ + @Test public void testInvokeReturnValueGetPessimisticRepeatableRead() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -1471,6 +1515,7 @@ public void testInvokeReturnValueGetPessimisticRepeatableRead() throws Exception /** * @throws Exception If failed. */ + @Test public void testInvokeReturnValuePutInTx() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -1524,6 +1569,7 @@ private void checkInvokeReturnValue(boolean put, /** * @throws Exception In case of error. */ + @Test public void testGetAndPutAsyncOld() throws Exception { IgniteCache cache = jcache(); @@ -1550,6 +1596,7 @@ public void testGetAndPutAsyncOld() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testGetAndPutAsync() throws Exception { IgniteCache cache = jcache(); @@ -1570,6 +1617,7 @@ public void testGetAndPutAsync() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testPutAsyncOld0() throws Exception { IgniteCache cacheAsync = jcache().withAsync(); @@ -1588,6 +1636,7 @@ public void testPutAsyncOld0() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testPutAsync0() throws Exception { IgniteFuture fut1 = jcache().getAndPutAsync("key1", 0); @@ -1600,6 +1649,7 @@ public void testPutAsync0() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeAsyncOld() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -1647,6 +1697,7 @@ public void testInvokeAsyncOld() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeAsync() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -1687,6 +1738,7 @@ public void testInvokeAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvoke() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -1741,6 +1793,7 @@ public void testInvoke() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testPutx() throws Exception { if (txShouldBeUsed()) checkPut(true); @@ -1749,6 +1802,7 @@ public void testPutx() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testPutxNoTx() throws Exception { checkPut(false); } @@ -1793,6 +1847,7 @@ private void checkPut(boolean inTx) throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAsyncOld() throws Exception { Transaction tx = txShouldBeUsed() ? transactions().txStart() : null; @@ -1838,6 +1893,7 @@ public void testPutAsyncOld() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAsync() throws Exception { Transaction tx = txShouldBeUsed() ? transactions().txStart() : null; @@ -1877,6 +1933,7 @@ public void testPutAsync() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testPutAll() throws Exception { Map map = F.asMap("key1", 1, "key2", 2); @@ -1903,6 +1960,7 @@ public void testPutAll() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testNullInTx() throws Exception { if (!txShouldBeUsed()) return; @@ -1994,6 +2052,7 @@ public void testNullInTx() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testPutAllWithNulls() throws Exception { final IgniteCache cache = jcache(); @@ -2122,6 +2181,7 @@ public void testPutAllWithNulls() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testPutAllAsyncOld() throws Exception { Map map = F.asMap("key1", 1, "key2", 2); @@ -2152,6 +2212,7 @@ public void testPutAllAsyncOld() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testPutAllAsync() throws Exception { Map map = F.asMap("key1", 1, "key2", 2); @@ -2176,6 +2237,7 @@ public void testPutAllAsync() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testGetAndPutIfAbsent() throws Exception { Transaction tx = txShouldBeUsed() ? transactions().txStart() : null; @@ -2262,6 +2324,7 @@ public void testGetAndPutIfAbsent() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetAndPutIfAbsentAsyncOld() throws Exception { Transaction tx = txShouldBeUsed() ? transactions().txStart() : null; @@ -2343,6 +2406,7 @@ public void testGetAndPutIfAbsentAsyncOld() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetAndPutIfAbsentAsync() throws Exception { Transaction tx = txShouldBeUsed() ? transactions().txStart() : null; @@ -2412,6 +2476,7 @@ public void testGetAndPutIfAbsentAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutIfAbsent() throws Exception { IgniteCache cache = jcache(); @@ -2466,6 +2531,7 @@ public void testPutIfAbsent() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testPutxIfAbsentAsyncOld() throws Exception { if (txShouldBeUsed()) checkPutxIfAbsentAsyncOld(true); @@ -2474,6 +2540,7 @@ public void testPutxIfAbsentAsyncOld() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testPutxIfAbsentAsyncOldNoTx() throws Exception { checkPutxIfAbsentAsyncOld(false); } @@ -2481,6 +2548,7 @@ public void testPutxIfAbsentAsyncOldNoTx() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testPutxIfAbsentAsync() throws Exception { if (txShouldBeUsed()) checkPutxIfAbsentAsync(true); @@ -2489,6 +2557,7 @@ public void testPutxIfAbsentAsync() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testPutxIfAbsentAsyncNoTx() throws Exception { checkPutxIfAbsentAsync(false); } @@ -2641,6 +2710,7 @@ private void checkPutxIfAbsentAsync(boolean inTx) throws Exception { /** * @throws Exception In case of error. */ + @Test public void testPutIfAbsentAsyncOldConcurrent() throws Exception { IgniteCache cacheAsync = jcache().withAsync(); @@ -2659,6 +2729,7 @@ public void testPutIfAbsentAsyncOldConcurrent() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testPutIfAbsentAsyncConcurrent() throws Exception { IgniteCache cache = jcache(); @@ -2673,6 +2744,7 @@ public void testPutIfAbsentAsyncConcurrent() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetAndReplace() throws Exception { IgniteCache cache = jcache(); @@ -2767,6 +2839,7 @@ public void testGetAndReplace() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReplace() throws Exception { IgniteCache cache = jcache(); @@ -2824,6 +2897,7 @@ public void testReplace() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetAndReplaceAsyncOld() throws Exception { IgniteCache cache = jcache(); @@ -2913,6 +2987,7 @@ public void testGetAndReplaceAsyncOld() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetAndReplaceAsync() throws Exception { IgniteCache cache = jcache(); @@ -2984,6 +3059,7 @@ public void testGetAndReplaceAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReplacexAsyncOld() throws Exception { IgniteCache cache = jcache(); @@ -3055,6 +3131,7 @@ public void testReplacexAsyncOld() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReplacexAsync() throws Exception { IgniteCache cache = jcache(); @@ -3114,6 +3191,7 @@ public void testReplacexAsync() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testGetAndRemove() throws Exception { IgniteCache cache = jcache(); @@ -3133,6 +3211,7 @@ public void testGetAndRemove() throws Exception { * @throws Exception If failed. */ @SuppressWarnings("serial") + @Test public void testGetAndRemoveObject() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -3181,6 +3260,7 @@ public void testGetAndRemoveObject() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetAndPutSerializableObject() throws Exception { IgniteCache cache = ignite(0).cache(cacheName()); @@ -3205,6 +3285,7 @@ public void testGetAndPutSerializableObject() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeletedEntriesFlag() throws Exception { if (cacheMode() != LOCAL && cacheMode() != REPLICATED) { final int cnt = 3; @@ -3225,6 +3306,7 @@ public void testDeletedEntriesFlag() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemoveLoad() throws Exception { if (!storeEnabled()) return; @@ -3259,6 +3341,7 @@ public void testRemoveLoad() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testRemoveAsyncOld() throws Exception { IgniteCache cache = jcache(); @@ -3293,6 +3376,7 @@ public void testRemoveAsyncOld() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testRemoveAsync() throws Exception { IgniteCache cache = jcache(); @@ -3317,6 +3401,7 @@ public void testRemoveAsync() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testRemove() throws Exception { IgniteCache cache = jcache(); @@ -3330,6 +3415,7 @@ public void testRemove() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testRemovexAsyncOld() throws Exception { IgniteCache cache = jcache(); @@ -3351,6 +3437,7 @@ public void testRemovexAsyncOld() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testRemovexAsync() throws Exception { IgniteCache cache = jcache(); @@ -3366,6 +3453,7 @@ public void testRemovexAsync() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testGlobalRemoveAll() throws Exception { globalRemoveAll(false, false); } @@ -3373,6 +3461,7 @@ public void testGlobalRemoveAll() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testGlobalRemoveAllAsyncOld() throws Exception { globalRemoveAll(true, true); } @@ -3380,6 +3469,7 @@ public void testGlobalRemoveAllAsyncOld() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testGlobalRemoveAllAsync() throws Exception { globalRemoveAll(true, false); } @@ -3472,6 +3562,7 @@ protected long hugeRemoveAllEntryCount() { /** * @throws Exception In case of error. */ + @Test public void testRemoveAllWithNulls() throws Exception { final IgniteCache cache = jcache(); @@ -3526,6 +3617,7 @@ public void testRemoveAllWithNulls() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testRemoveAllDuplicates() throws Exception { jcache().removeAll(ImmutableSet.of("key1", "key1", "key1")); } @@ -3533,6 +3625,7 @@ public void testRemoveAllDuplicates() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testRemoveAllDuplicatesTx() throws Exception { if (txShouldBeUsed()) { try (Transaction tx = transactions().txStart()) { @@ -3546,6 +3639,7 @@ public void testRemoveAllDuplicatesTx() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testRemoveAllEmpty() throws Exception { jcache().removeAll(); } @@ -3553,6 +3647,7 @@ public void testRemoveAllEmpty() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testRemoveAllAsyncOld() throws Exception { IgniteCache cache = jcache(); @@ -3578,6 +3673,7 @@ public void testRemoveAllAsyncOld() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testRemoveAllAsync() throws Exception { IgniteCache cache = jcache(); @@ -3599,6 +3695,7 @@ public void testRemoveAllAsync() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testLoadAll() throws Exception { if (!storeEnabled()) return; @@ -3639,6 +3736,7 @@ public void testLoadAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemoveAfterClear() throws Exception { IgniteEx ignite = grid(0); @@ -3685,6 +3783,7 @@ public void testRemoveAfterClear() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testClear() throws Exception { IgniteCache cache = jcache(); @@ -3832,6 +3931,7 @@ protected void checkUnlocked(final Collection keys0) throws IgniteChecke /** * @throws Exception If failed. */ + @Test public void testGlobalClearAll() throws Exception { globalClearAll(false, false); } @@ -3839,6 +3939,7 @@ public void testGlobalClearAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGlobalClearAllAsyncOld() throws Exception { globalClearAll(true, true); } @@ -3846,6 +3947,7 @@ public void testGlobalClearAllAsyncOld() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGlobalClearAllAsync() throws Exception { globalClearAll(true, false); } @@ -3885,6 +3987,7 @@ protected void globalClearAll(boolean async, boolean oldAsync) throws Exception * @throws Exception In case of error. */ @SuppressWarnings("BusyWait") + @Test public void testLockUnlock() throws Exception { if (lockingEnabled()) { final CountDownLatch lockCnt = new CountDownLatch(1); @@ -3944,6 +4047,7 @@ public void testLockUnlock() throws Exception { * @throws Exception In case of error. */ @SuppressWarnings("BusyWait") + @Test public void testLockUnlockAll() throws Exception { if (lockingEnabled()) { IgniteCache cache = jcache(); @@ -3999,6 +4103,7 @@ public void testLockUnlockAll() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testPeek() throws Exception { Ignite ignite = primaryIgnite("key"); IgniteCache cache = ignite.cache(cacheName()); @@ -4015,6 +4120,7 @@ public void testPeek() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPeekTxRemoveOptimistic() throws Exception { checkPeekTxRemove(OPTIMISTIC); } @@ -4022,6 +4128,7 @@ public void testPeekTxRemoveOptimistic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPeekTxRemovePessimistic() throws Exception { checkPeekTxRemove(PESSIMISTIC); } @@ -4051,6 +4158,7 @@ private void checkPeekTxRemove(TransactionConcurrency concurrency) throws Except /** * @throws Exception If failed. */ + @Test public void testPeekRemove() throws Exception { IgniteCache cache = primaryCache("key"); @@ -4063,6 +4171,7 @@ public void testPeekRemove() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testEvictExpired() throws Exception { final IgniteCache cache = jcache(); @@ -4120,6 +4229,7 @@ public void testEvictExpired() throws Exception { * * @throws Exception If failed. */ + @Test public void testPeekExpired() throws Exception { final IgniteCache c = jcache(); @@ -4155,6 +4265,7 @@ public void testPeekExpired() throws Exception { * * @throws Exception If failed. */ + @Test public void testPeekExpiredTx() throws Exception { if (txShouldBeUsed()) { final IgniteCache c = jcache(); @@ -4185,6 +4296,7 @@ public void testPeekExpiredTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTtlTx() throws Exception { if (txShouldBeUsed()) checkTtl(true, false); @@ -4193,6 +4305,7 @@ public void testTtlTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTtlNoTx() throws Exception { checkTtl(false, false); } @@ -4200,6 +4313,7 @@ public void testTtlNoTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTtlNoTxOldEntry() throws Exception { checkTtl(false, true); } @@ -4461,6 +4575,7 @@ private void checkTtl0(boolean inTx, boolean oldEntry, int ttl) throws Exception /** * @throws Exception In case of error. */ + @Test public void testLocalEvict() throws Exception { IgniteCache cache = jcache(); @@ -4514,6 +4629,7 @@ private void checkKeyAfterLocalEvict(IgniteCache cache, String /** * JUnit. */ + @Test public void testCacheProxy() { IgniteCache cache = jcache(); @@ -4525,6 +4641,7 @@ public void testCacheProxy() { * * @throws Exception If failed. */ + @Test public void testCompactExpired() throws Exception { final IgniteCache cache = jcache(); @@ -4558,6 +4675,7 @@ public void testCompactExpired() throws Exception { * * @throws Exception If failed. */ + @Test public void testOptimisticTxMissingKey() throws Exception { if (txShouldBeUsed()) { try (Transaction tx = transactions().txStart(OPTIMISTIC, READ_COMMITTED)) { @@ -4574,6 +4692,7 @@ public void testOptimisticTxMissingKey() throws Exception { * * @throws Exception If failed. */ + @Test public void testOptimisticTxMissingKeyNoCommit() throws Exception { if (txShouldBeUsed()) { try (Transaction tx = transactions().txStart(OPTIMISTIC, READ_COMMITTED)) { @@ -4588,6 +4707,7 @@ public void testOptimisticTxMissingKeyNoCommit() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOptimisticTxReadCommittedInTx() throws Exception { checkRemovexInTx(OPTIMISTIC, READ_COMMITTED); } @@ -4595,6 +4715,7 @@ public void testOptimisticTxReadCommittedInTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOptimisticTxRepeatableReadInTx() throws Exception { checkRemovexInTx(OPTIMISTIC, REPEATABLE_READ); } @@ -4602,6 +4723,7 @@ public void testOptimisticTxRepeatableReadInTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticTxReadCommittedInTx() throws Exception { checkRemovexInTx(PESSIMISTIC, READ_COMMITTED); } @@ -4609,6 +4731,7 @@ public void testPessimisticTxReadCommittedInTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticTxRepeatableReadInTx() throws Exception { checkRemovexInTx(PESSIMISTIC, REPEATABLE_READ); } @@ -4661,6 +4784,7 @@ private void checkRemovexInTx(final TransactionConcurrency concurrency, * * @throws Exception If failed. */ + @Test public void testPessimisticTxMissingKey() throws Exception { if (txShouldBeUsed()) { try (Transaction tx = transactions().txStart(PESSIMISTIC, READ_COMMITTED)) { @@ -4677,6 +4801,7 @@ public void testPessimisticTxMissingKey() throws Exception { * * @throws Exception If failed. */ + @Test public void testPessimisticTxMissingKeyNoCommit() throws Exception { if (txShouldBeUsed()) { try (Transaction tx = transactions().txStart(PESSIMISTIC, READ_COMMITTED)) { @@ -4691,6 +4816,7 @@ public void testPessimisticTxMissingKeyNoCommit() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticTxRepeatableRead() throws Exception { if (txShouldBeUsed()) { try (Transaction ignored = transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) { @@ -4704,6 +4830,7 @@ public void testPessimisticTxRepeatableRead() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticTxRepeatableReadOnUpdate() throws Exception { if (txShouldBeUsed()) { try (Transaction ignored = transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) { @@ -4717,6 +4844,7 @@ public void testPessimisticTxRepeatableReadOnUpdate() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testToMap() throws Exception { IgniteCache cache = jcache(); @@ -4874,6 +5002,7 @@ protected IgnitePair entryTtl(IgniteCache cache, String key) { /** * @throws Exception If failed. */ + @Test public void testIterator() throws Exception { IgniteCache cache = grid(0).cache(cacheName()); @@ -4901,6 +5030,7 @@ public void testIterator() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIgniteCacheIterator() throws Exception { IgniteCache cache = jcache(0); @@ -5091,6 +5221,7 @@ private void checkIteratorEmpty(IgniteCache cache) throws Excep /** * @throws Exception If failed. */ + @Test public void testLocalClearKey() throws Exception { addKeys(); @@ -5142,6 +5273,7 @@ protected void checkLocalRemovedKey(String keyToRmv) { /** * @throws Exception If failed. */ + @Test public void testLocalClearKeys() throws Exception { Map> keys = addKeys(); @@ -5213,6 +5345,7 @@ protected Map> addKeys() { /** * @throws Exception If failed. */ + @Test public void testGlobalClearKey() throws Exception { testGlobalClearKey(false, false, Arrays.asList("key25")); } @@ -5220,6 +5353,7 @@ public void testGlobalClearKey() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGlobalClearKeyAsyncOld() throws Exception { testGlobalClearKey(true, true, Arrays.asList("key25")); } @@ -5227,6 +5361,7 @@ public void testGlobalClearKeyAsyncOld() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGlobalClearKeyAsync() throws Exception { testGlobalClearKey(true, false, Arrays.asList("key25")); } @@ -5234,6 +5369,7 @@ public void testGlobalClearKeyAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGlobalClearKeys() throws Exception { testGlobalClearKey(false, false, Arrays.asList("key25", "key100", "key150")); } @@ -5241,6 +5377,7 @@ public void testGlobalClearKeys() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGlobalClearKeysAsyncOld() throws Exception { testGlobalClearKey(true, true, Arrays.asList("key25", "key100", "key150")); } @@ -5248,6 +5385,7 @@ public void testGlobalClearKeysAsyncOld() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGlobalClearKeysAsync() throws Exception { testGlobalClearKey(true, false, Arrays.asList("key25", "key100", "key150")); } @@ -5314,6 +5452,7 @@ protected void testGlobalClearKey(boolean async, boolean oldAsync, Collection cache = grid(0).cache(cacheName()); @@ -5857,6 +5998,7 @@ private void checkEmpty(IgniteCache cache, IgniteCache cache = ignite(0).cache(DEFAULT_CACHE_NAME); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheCreateRestartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheCreateRestartSelfTest.java index e8544517bcda5..e7aa090140c87 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheCreateRestartSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheCreateRestartSelfTest.java @@ -70,6 +70,7 @@ public class IgniteCacheCreateRestartSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testStopOriginatingNode() throws Exception { startGrids(NODES); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDynamicStopSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDynamicStopSelfTest.java index b1047ba829d35..8816641c42bff 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDynamicStopSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDynamicStopSelfTest.java @@ -44,6 +44,7 @@ public class IgniteCacheDynamicStopSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testStopStartCacheWithDataLoaderNoOverwrite() throws Exception { checkStopStartCacheWithDataLoader(false); } @@ -51,6 +52,7 @@ public void testStopStartCacheWithDataLoaderNoOverwrite() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStopStartCacheWithDataLoaderOverwrite() throws Exception { checkStopStartCacheWithDataLoader(true); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java index b4e564faa8ebd..0abd49b47b363 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java @@ -152,6 +152,7 @@ public abstract class IgniteCacheEntryListenerAbstractTest extends IgniteCacheAb /** * @throws Exception If failed. */ + @Test public void testExceptionIgnored() throws Exception { CacheEntryListenerConfiguration lsnrCfg = new MutableCacheEntryListenerConfiguration<>( new Factory>() { @@ -211,6 +212,7 @@ public void testExceptionIgnored() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNoOldValue() throws Exception { CacheEntryListenerConfiguration lsnrCfg = new MutableCacheEntryListenerConfiguration<>( new Factory>() { @@ -242,6 +244,7 @@ public void testNoOldValue() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSynchronousEventsObjectKeyValue() throws Exception { useObjects = true; @@ -251,6 +254,7 @@ public void testSynchronousEventsObjectKeyValue() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSynchronousEvents() throws Exception { final CacheEntryCreatedListener lsnr = new CreateUpdateRemoveExpireListener() { @Override public void onRemoved(Iterable> evts) { @@ -348,6 +352,7 @@ private void awaitLatch() { /** * @throws Exception If failed. */ + @Test public void testSynchronousEventsListenerNodeFailed() throws Exception { if (cacheMode() != PARTITIONED) return; @@ -402,6 +407,7 @@ public void testSynchronousEventsListenerNodeFailed() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConcurrentRegisterDeregister() throws Exception { final int THREADS = 10; @@ -438,6 +444,7 @@ public void testConcurrentRegisterDeregister() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSerialization() throws Exception { if (cacheMode() == LOCAL) return; @@ -541,6 +548,7 @@ private Object value(Integer val) { /** * @throws Exception If failed. */ + @Test public void testEventsObjectKeyValue() throws Exception { useObjects = true; @@ -550,6 +558,7 @@ public void testEventsObjectKeyValue() throws Exception { /** * @throws Exception If failed. */ + @Test public void testEvents() throws Exception { IgniteCache cache = jcache(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerExpiredEventsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerExpiredEventsTest.java index 524d0fb34bec2..96e8b5bf7da76 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerExpiredEventsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerExpiredEventsTest.java @@ -74,6 +74,7 @@ public class IgniteCacheEntryListenerExpiredEventsTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + @Test public void testExpiredEventAtomic() throws Exception { checkExpiredEvents(cacheConfiguration(PARTITIONED, ATOMIC)); } @@ -81,6 +82,7 @@ public void testExpiredEventAtomic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testExpiredEventTx() throws Exception { checkExpiredEvents(cacheConfiguration(PARTITIONED, TRANSACTIONAL)); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryProcessorCallTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryProcessorCallTest.java index 4efe51303cbca..2447ca292215d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryProcessorCallTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryProcessorCallTest.java @@ -99,6 +99,7 @@ public class IgniteCacheEntryProcessorCallTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testEntryProcessorCall() throws Exception { { CacheConfiguration ccfg = new CacheConfiguration<>(DEFAULT_CACHE_NAME); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryProcessorNodeJoinTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryProcessorNodeJoinTest.java index 5f99b556a955a..26be4cd9b8fc4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryProcessorNodeJoinTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryProcessorNodeJoinTest.java @@ -128,6 +128,7 @@ protected CacheAtomicityMode atomicityMode() { /** * @throws Exception If failed. */ + @Test public void testSingleEntryProcessorNodeJoin() throws Exception { checkEntryProcessorNodeJoin(false); } @@ -135,6 +136,7 @@ public void testSingleEntryProcessorNodeJoin() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAllEntryProcessorNodeJoin() throws Exception { checkEntryProcessorNodeJoin(true); } @@ -142,6 +144,7 @@ public void testAllEntryProcessorNodeJoin() throws Exception { /** * @throws Exception If failed. */ + @Test public void testEntryProcessorNodeLeave() throws Exception { if (MvccFeatureChecker.forcedMvcc()) fail("https://issues.apache.org/jira/browse/IGNITE-10254"); @@ -336,6 +339,7 @@ private int checkIncrement( /** * @throws Exception If failed. */ + @Test public void testReplaceNodeJoin() throws Exception { final AtomicReference error = new AtomicReference<>(); final int started = 6; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheExpireAndUpdateConsistencyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheExpireAndUpdateConsistencyTest.java index 5257a4a9f7d4e..7258eb97ce791 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheExpireAndUpdateConsistencyTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheExpireAndUpdateConsistencyTest.java @@ -97,6 +97,7 @@ public class IgniteCacheExpireAndUpdateConsistencyTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + @Test public void testAtomic1() throws Exception { updateAndEventConsistencyTest(cacheConfiguration(ATOMIC, 0)); } @@ -104,6 +105,7 @@ public void testAtomic1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAtomic2() throws Exception { updateAndEventConsistencyTest(cacheConfiguration(ATOMIC, 1)); } @@ -111,6 +113,7 @@ public void testAtomic2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAtomic3() throws Exception { updateAndEventConsistencyTest(cacheConfiguration(ATOMIC, 2)); } @@ -118,6 +121,7 @@ public void testAtomic3() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTx1() throws Exception { updateAndEventConsistencyTest(cacheConfiguration(TRANSACTIONAL, 0)); } @@ -125,6 +129,7 @@ public void testTx1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTx2() throws Exception { updateAndEventConsistencyTest(cacheConfiguration(TRANSACTIONAL, 1)); } @@ -132,6 +137,7 @@ public void testTx2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTx3() throws Exception { updateAndEventConsistencyTest(cacheConfiguration(TRANSACTIONAL, 2)); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheGetCustomCollectionsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheGetCustomCollectionsSelfTest.java index 9e6fd5a57fc7a..5491247d4c13f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheGetCustomCollectionsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheGetCustomCollectionsSelfTest.java @@ -67,6 +67,7 @@ public class IgniteCacheGetCustomCollectionsSelfTest extends GridCommonAbstractT /** * @throws Exception If failed. */ + @Test public void testPutGet() throws Exception { startGrids(3); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheGroupsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheGroupsTest.java index e9999d7338e3f..4cfc579c3c826 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheGroupsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheGroupsTest.java @@ -179,6 +179,7 @@ public class IgniteCacheGroupsTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCloseCache1() throws Exception { startGrid(0); @@ -213,6 +214,7 @@ public void testCloseCache1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCreateDestroyCaches1() throws Exception { createDestroyCaches(1); } @@ -220,6 +222,7 @@ public void testCreateDestroyCaches1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCreateDestroyCaches2() throws Exception { createDestroyCaches(5); } @@ -227,6 +230,7 @@ public void testCreateDestroyCaches2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCreateCacheWithSameNameInAnotherGroup() throws Exception { startGridsMultiThreaded(2); @@ -245,6 +249,7 @@ public void testCreateCacheWithSameNameInAnotherGroup() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCreateDestroyCachesAtomicPartitioned() throws Exception { createDestroyCaches(PARTITIONED, ATOMIC); } @@ -252,6 +257,7 @@ public void testCreateDestroyCachesAtomicPartitioned() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCreateDestroyCachesTxPartitioned() throws Exception { createDestroyCaches(PARTITIONED, TRANSACTIONAL); } @@ -259,6 +265,7 @@ public void testCreateDestroyCachesTxPartitioned() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCreateDestroyCachesMvccTxPartitioned() throws Exception { createDestroyCaches(PARTITIONED, TRANSACTIONAL_SNAPSHOT); } @@ -266,6 +273,7 @@ public void testCreateDestroyCachesMvccTxPartitioned() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCreateDestroyCachesAtomicReplicated() throws Exception { createDestroyCaches(REPLICATED, ATOMIC); } @@ -273,6 +281,7 @@ public void testCreateDestroyCachesAtomicReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCreateDestroyCachesTxReplicated() throws Exception { createDestroyCaches(REPLICATED, TRANSACTIONAL); } @@ -280,6 +289,7 @@ public void testCreateDestroyCachesTxReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCreateDestroyCachesMvccTxReplicated() throws Exception { createDestroyCaches(REPLICATED, TRANSACTIONAL_SNAPSHOT); } @@ -287,6 +297,7 @@ public void testCreateDestroyCachesMvccTxReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testScanQueryAtomicPartitioned() throws Exception { scanQuery(PARTITIONED, ATOMIC); } @@ -294,6 +305,7 @@ public void testScanQueryAtomicPartitioned() throws Exception { /** * @throws Exception If failed. */ + @Test public void testScanQueryTxPartitioned() throws Exception { scanQuery(PARTITIONED, TRANSACTIONAL); } @@ -301,6 +313,7 @@ public void testScanQueryTxPartitioned() throws Exception { /** * @throws Exception If failed. */ + @Test public void testScanQueryMvccTxPartitioned() throws Exception { scanQuery(PARTITIONED, TRANSACTIONAL_SNAPSHOT); } @@ -308,6 +321,7 @@ public void testScanQueryMvccTxPartitioned() throws Exception { /** * @throws Exception If failed. */ + @Test public void testScanQueryAtomicReplicated() throws Exception { scanQuery(REPLICATED, ATOMIC); } @@ -315,6 +329,7 @@ public void testScanQueryAtomicReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testScanQueryTxReplicated() throws Exception { scanQuery(REPLICATED, TRANSACTIONAL); } @@ -322,6 +337,7 @@ public void testScanQueryTxReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testScanQueryMvccTxReplicated() throws Exception { scanQuery(REPLICATED, TRANSACTIONAL_SNAPSHOT); } @@ -330,6 +346,7 @@ public void testScanQueryMvccTxReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testScanQueryAtomicLocal() throws Exception { scanQuery(LOCAL, ATOMIC); } @@ -337,6 +354,7 @@ public void testScanQueryAtomicLocal() throws Exception { /** * @throws Exception If failed. */ + @Test public void testScanQueryTxLocal() throws Exception { scanQuery(LOCAL, TRANSACTIONAL); } @@ -344,6 +362,7 @@ public void testScanQueryTxLocal() throws Exception { /** * @throws Exception If failed. */ + @Test public void testScanQueryMvccTxLocal() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-9530"); @@ -353,6 +372,7 @@ public void testScanQueryMvccTxLocal() throws Exception { /** * @throws Exception If failed. */ + @Test public void testEntriesTtlAtomicPartitioned() throws Exception { entriesTtl(PARTITIONED, ATOMIC); } @@ -360,6 +380,7 @@ public void testEntriesTtlAtomicPartitioned() throws Exception { /** * @throws Exception If failed. */ + @Test public void testEntriesTtlTxPartitioned() throws Exception { entriesTtl(PARTITIONED, TRANSACTIONAL); } @@ -367,6 +388,7 @@ public void testEntriesTtlTxPartitioned() throws Exception { /** * @throws Exception If failed. */ + @Test public void testEntriesTtlMvccTxPartitioned() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-7311"); @@ -376,6 +398,7 @@ public void testEntriesTtlMvccTxPartitioned() throws Exception { /** * @throws Exception If failed. */ + @Test public void testEntriesTtlAtomicReplicated() throws Exception { entriesTtl(REPLICATED, ATOMIC); } @@ -383,6 +406,7 @@ public void testEntriesTtlAtomicReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testEntriesTtlTxReplicated() throws Exception { entriesTtl(REPLICATED, TRANSACTIONAL); } @@ -390,6 +414,7 @@ public void testEntriesTtlTxReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testEntriesTtlMvccTxReplicated() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-7311"); @@ -399,6 +424,7 @@ public void testEntriesTtlMvccTxReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testEntriesTtlAtomicLocal() throws Exception { entriesTtl(LOCAL, ATOMIC); } @@ -406,6 +432,7 @@ public void testEntriesTtlAtomicLocal() throws Exception { /** * @throws Exception If failed. */ + @Test public void testEntriesTtlTxLocal() throws Exception { entriesTtl(LOCAL, TRANSACTIONAL); } @@ -413,6 +440,7 @@ public void testEntriesTtlTxLocal() throws Exception { /** * @throws Exception If failed. */ + @Test public void testEntriesTtlMvccTxLocal() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-9530"); fail("https://issues.apache.org/jira/browse/IGNITE-7311"); @@ -423,6 +451,7 @@ public void testEntriesTtlMvccTxLocal() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheIteratorAtomicPartitioned() throws Exception { cacheIterator(PARTITIONED, ATOMIC); } @@ -430,6 +459,7 @@ public void testCacheIteratorAtomicPartitioned() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheIteratorTxPartitioned() throws Exception { cacheIterator(PARTITIONED, TRANSACTIONAL); } @@ -437,6 +467,7 @@ public void testCacheIteratorTxPartitioned() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheIteratorMvccTxPartitioned() throws Exception { cacheIterator(PARTITIONED, TRANSACTIONAL_SNAPSHOT); } @@ -444,6 +475,7 @@ public void testCacheIteratorMvccTxPartitioned() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheIteratorAtomicReplicated() throws Exception { cacheIterator(REPLICATED, ATOMIC); } @@ -451,6 +483,7 @@ public void testCacheIteratorAtomicReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheIteratorTxReplicated() throws Exception { cacheIterator(REPLICATED, TRANSACTIONAL); } @@ -458,6 +491,7 @@ public void testCacheIteratorTxReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheIteratorMvccTxReplicated() throws Exception { cacheIterator(REPLICATED, TRANSACTIONAL_SNAPSHOT); } @@ -465,6 +499,7 @@ public void testCacheIteratorMvccTxReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheIteratorAtomicLocal() throws Exception { cacheIterator(LOCAL, ATOMIC); } @@ -472,6 +507,7 @@ public void testCacheIteratorAtomicLocal() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheIteratorTxLocal() throws Exception { cacheIterator(LOCAL, TRANSACTIONAL); } @@ -479,6 +515,7 @@ public void testCacheIteratorTxLocal() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheIteratorMvccTxLocal() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-9530"); @@ -488,6 +525,7 @@ public void testCacheIteratorMvccTxLocal() throws Exception { /** * @throws Exception If failed. */ + @Test public void testScanQueryMultiplePartitionsAtomicPartitioned() throws Exception { scanQueryMultiplePartitions(PARTITIONED, ATOMIC); } @@ -495,6 +533,7 @@ public void testScanQueryMultiplePartitionsAtomicPartitioned() throws Exception /** * @throws Exception If failed. */ + @Test public void testScanQueryMultiplePartitionsTxPartitioned() throws Exception { scanQueryMultiplePartitions(PARTITIONED, TRANSACTIONAL); } @@ -502,6 +541,7 @@ public void testScanQueryMultiplePartitionsTxPartitioned() throws Exception { /** * @throws Exception If failed. */ + @Test public void testScanQueryMultiplePartitionsMvccTxPartitioned() throws Exception { scanQueryMultiplePartitions(PARTITIONED, TRANSACTIONAL_SNAPSHOT); } @@ -509,6 +549,7 @@ public void testScanQueryMultiplePartitionsMvccTxPartitioned() throws Exception /** * @throws Exception If failed. */ + @Test public void testScanQueryMultiplePartitionsAtomicReplicated() throws Exception { scanQueryMultiplePartitions(REPLICATED, ATOMIC); } @@ -516,6 +557,7 @@ public void testScanQueryMultiplePartitionsAtomicReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testScanQueryMultiplePartitionsTxReplicated() throws Exception { scanQueryMultiplePartitions(REPLICATED, TRANSACTIONAL); } @@ -523,6 +565,7 @@ public void testScanQueryMultiplePartitionsTxReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testScanQueryMultiplePartitionsMvccTxReplicated() throws Exception { scanQueryMultiplePartitions(REPLICATED, TRANSACTIONAL_SNAPSHOT); } @@ -530,6 +573,7 @@ public void testScanQueryMultiplePartitionsMvccTxReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testContinuousQueryTxReplicated() throws Exception { continuousQuery(REPLICATED, TRANSACTIONAL); } @@ -537,6 +581,7 @@ public void testContinuousQueryTxReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testContinuousQueryMvccTxReplicated() throws Exception { continuousQuery(REPLICATED, TRANSACTIONAL_SNAPSHOT); } @@ -544,6 +589,7 @@ public void testContinuousQueryMvccTxReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testContinuousQueryTxPartitioned() throws Exception { continuousQuery(PARTITIONED, TRANSACTIONAL); } @@ -551,6 +597,7 @@ public void testContinuousQueryTxPartitioned() throws Exception { /** * @throws Exception If failed. */ + @Test public void testContinuousQueryMvccTxPartitioned() throws Exception { continuousQuery(PARTITIONED, TRANSACTIONAL_SNAPSHOT); } @@ -558,6 +605,7 @@ public void testContinuousQueryMvccTxPartitioned() throws Exception { /** * @throws Exception If failed. */ + @Test public void testContinuousQueryTxLocal() throws Exception { continuousQuery(LOCAL, TRANSACTIONAL); } @@ -565,6 +613,7 @@ public void testContinuousQueryTxLocal() throws Exception { /** * @throws Exception If failed. */ + @Test public void testContinuousQueryMvccTxLocal() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-9530"); @@ -574,6 +623,7 @@ public void testContinuousQueryMvccTxLocal() throws Exception { /** * @throws Exception If failed. */ + @Test public void testContinuousQueryAtomicReplicated() throws Exception { continuousQuery(REPLICATED, ATOMIC); } @@ -581,6 +631,7 @@ public void testContinuousQueryAtomicReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testContinuousQueryAtomicPartitioned() throws Exception { continuousQuery(PARTITIONED, ATOMIC); } @@ -588,6 +639,7 @@ public void testContinuousQueryAtomicPartitioned() throws Exception { /** * @throws Exception If failed. */ + @Test public void testContinuousQueryAtomicLocal() throws Exception { continuousQuery(LOCAL, ATOMIC); } @@ -1325,6 +1377,7 @@ private CacheConfiguration[] staticConfigurations1(boolean cache3) { /** * @throws Exception If failed. */ + @Test public void testDiscoveryDataConsistency1() throws Exception { ccfgs = staticConfigurations1(true); Ignite srv0 = startGrid(0); @@ -1419,6 +1472,7 @@ private CacheConfiguration[] cacheConfigurations(int cnt, String grp, String bas /** * @throws Exception If failed. */ + @Test public void testStartManyCaches() throws Exception { final int CACHES = SF.apply(5_000); @@ -1461,6 +1515,7 @@ public void testStartManyCaches() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRebalance1() throws Exception { Ignite srv0 = startGrid(0); @@ -1579,6 +1634,7 @@ public void testRebalance1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRebalance2() throws Exception { Ignite srv0 = startGrid(0); @@ -1662,6 +1718,7 @@ public void testRebalance2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNoKeyIntersectTx() throws Exception { testNoKeyIntersect(TRANSACTIONAL); } @@ -1669,6 +1726,7 @@ public void testNoKeyIntersectTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNoKeyIntersectMvccTx() throws Exception { testNoKeyIntersect(TRANSACTIONAL_SNAPSHOT); } @@ -1676,6 +1734,7 @@ public void testNoKeyIntersectMvccTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNoKeyIntersectAtomic() throws Exception { testNoKeyIntersect(ATOMIC); } @@ -1987,6 +2046,7 @@ private void testNoKeyIntersectTxLocks(final IgniteCache cache1, final IgniteCac /** * @throws Exception If failed. */ + @Test public void testCacheApiTxPartitioned() throws Exception { cacheApiTest(PARTITIONED, TRANSACTIONAL); } @@ -1994,6 +2054,7 @@ public void testCacheApiTxPartitioned() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheApiMvccTxPartitioned() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-7952"); @@ -2003,6 +2064,7 @@ public void testCacheApiMvccTxPartitioned() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheApiTxReplicated() throws Exception { cacheApiTest(REPLICATED, TRANSACTIONAL); } @@ -2010,6 +2072,7 @@ public void testCacheApiTxReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheApiMvccTxReplicated() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-7952"); @@ -2019,6 +2082,7 @@ public void testCacheApiMvccTxReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheApiAtomicPartitioned() throws Exception { cacheApiTest(PARTITIONED, ATOMIC); } @@ -2026,6 +2090,7 @@ public void testCacheApiAtomicPartitioned() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheApiAtomicReplicated() throws Exception { cacheApiTest(REPLICATED, ATOMIC); } @@ -2818,6 +2883,7 @@ private void cacheInvokeAsync(IgniteCache cache) { /** * @throws Exception If failed. */ + @Test public void testLoadCacheAtomicPartitioned() throws Exception { loadCache(PARTITIONED, ATOMIC); } @@ -2825,6 +2891,7 @@ public void testLoadCacheAtomicPartitioned() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLoadCacheAtomicReplicated() throws Exception { loadCache(REPLICATED, ATOMIC); } @@ -2832,6 +2899,7 @@ public void testLoadCacheAtomicReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLoadCacheTxPartitioned() throws Exception { loadCache(PARTITIONED, TRANSACTIONAL); } @@ -2839,6 +2907,7 @@ public void testLoadCacheTxPartitioned() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLoadCacheMvccTxPartitioned() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-7954"); @@ -2848,6 +2917,7 @@ public void testLoadCacheMvccTxPartitioned() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLoadCacheTxReplicated() throws Exception { loadCache(REPLICATED, TRANSACTIONAL); } @@ -2855,6 +2925,7 @@ public void testLoadCacheTxReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLoadCacheMvccTxReplicated() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-7954"); @@ -2864,6 +2935,7 @@ public void testLoadCacheMvccTxReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLoadCacheAtomicLocal() throws Exception { loadCache(LOCAL, ATOMIC); } @@ -2871,6 +2943,7 @@ public void testLoadCacheAtomicLocal() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLoadCacheTxLocal() throws Exception { loadCache(LOCAL, TRANSACTIONAL); } @@ -2878,6 +2951,7 @@ public void testLoadCacheTxLocal() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLoadCacheMvccTxLocal() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-9530"); @@ -2931,6 +3005,7 @@ private void loadCache(CacheMode cacheMode, CacheAtomicityMode atomicityMode) th /** * @throws Exception If failed. */ + @Test public void testConcurrentOperationsSameKeys() throws Exception { final int SRVS = 4; final int CLIENTS = 4; @@ -3035,6 +3110,7 @@ private IgniteInternalFuture updateFuture(final int nodes, /** * @throws Exception If failed. */ + @Test public void testConcurrentOperationsAndCacheDestroy() throws Exception { final int SRVS = 4; final int CLIENTS = 4; @@ -3184,6 +3260,7 @@ public void testConcurrentOperationsAndCacheDestroy() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStaticConfigurationsValidation() throws Exception { ccfgs = new CacheConfiguration[2]; @@ -3224,6 +3301,7 @@ public void testStaticConfigurationsValidation() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheIdConflict() throws Exception { ccfgs = new CacheConfiguration[]{new CacheConfiguration("AaAaAa"), new CacheConfiguration("AaAaBB")}; @@ -3267,6 +3345,7 @@ public void testCacheIdConflict() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheGroupIdConflict1() throws Exception { ccfgs = new CacheConfiguration[]{new CacheConfiguration(CACHE1).setGroupName("AaAaAa"), new CacheConfiguration(CACHE2).setGroupName("AaAaBB")}; @@ -3311,6 +3390,7 @@ public void testCacheGroupIdConflict1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheGroupIdConflict2() throws Exception { ccfgs = new CacheConfiguration[]{new CacheConfiguration("AaAaAa"), new CacheConfiguration(CACHE2).setGroupName("AaAaBB")}; @@ -3355,6 +3435,7 @@ public void testCacheGroupIdConflict2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheGroupIdConflict3() throws Exception { ccfgs = new CacheConfiguration[]{new CacheConfiguration(CACHE2).setGroupName("AaAaBB"), new CacheConfiguration("AaAaAa")}; @@ -3399,6 +3480,7 @@ public void testCacheGroupIdConflict3() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheGroupNameConflict1() throws Exception { ccfgs = new CacheConfiguration[]{new CacheConfiguration("cache1"), new CacheConfiguration("cache2").setGroupName("cache1")}; @@ -3442,6 +3524,7 @@ public void testCacheGroupNameConflict1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheGroupNameConflict2() throws Exception { ccfgs = new CacheConfiguration[]{new CacheConfiguration("cache2").setGroupName("cache1"), new CacheConfiguration("cache1")}; @@ -3485,6 +3568,7 @@ public void testCacheGroupNameConflict2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConfigurationConsistencyValidation() throws Exception { startGrids(2); @@ -3550,6 +3634,7 @@ private CacheConfiguration[] interceptorConfigurations() { * * @throws Exception If failed. */ + @Test public void testInterceptors() throws Exception { for (int i = 0; i < 4; i++) { ccfgs = interceptorConfigurations(); @@ -3615,6 +3700,7 @@ private CacheConfiguration[] cacheStoreConfigurations() { * * @throws Exception If failed. */ + @Test public void testCacheStores() throws Exception { for (int i = 0; i < 4; i++) { ccfgs = cacheStoreConfigurations(); @@ -3687,6 +3773,7 @@ private CacheConfiguration[] mapperConfigurations() { /** * @throws Exception If failed. */ + @Test public void testAffinityMappers() throws Exception { for (int i = 0; i < 4; i++) { ccfgs = mapperConfigurations(); @@ -3749,6 +3836,7 @@ private void checkAffinityMappers(Ignite node) { /** * @throws Exception If failed. */ + @Test public void testContinuousQueriesMultipleGroups1() throws Exception { continuousQueriesMultipleGroups(1); } @@ -3756,6 +3844,7 @@ public void testContinuousQueriesMultipleGroups1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testContinuousQueriesMultipleGroups2() throws Exception { continuousQueriesMultipleGroups(4); } @@ -3802,6 +3891,7 @@ private void continuousQueriesMultipleGroups(int srvs) throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheIdSort() throws Exception { Ignite node = startGrid(0); @@ -3876,6 +3966,7 @@ public void testCacheIdSort() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDataCleanup() throws Exception { Ignite node = startGrid(0); @@ -3936,6 +4027,7 @@ public void testDataCleanup() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRestartsAndCacheCreateDestroy() throws Exception { final int SRVS = 5; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheIncrementTxTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheIncrementTxTest.java index 918d655e013ac..0b538f00df51b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheIncrementTxTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheIncrementTxTest.java @@ -81,6 +81,7 @@ public class IgniteCacheIncrementTxTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testIncrementTxTopologyChange0() throws Exception { nodeJoin(cacheConfiguration(0)); } @@ -88,6 +89,7 @@ public void testIncrementTxTopologyChange0() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIncrementTxTopologyChange1() throws Exception { if (MvccFeatureChecker.forcedMvcc()) fail("https://issues.apache.org/jira/browse/IGNITE-10264"); @@ -98,6 +100,7 @@ public void testIncrementTxTopologyChange1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIncrementTxTopologyChange2() throws Exception { if (MvccFeatureChecker.forcedMvcc()) fail("https://issues.apache.org/jira/browse/IGNITE-10264"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeAbstractTest.java index d9a04280eff3b..abbe3324ba364 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeAbstractTest.java @@ -65,6 +65,7 @@ public abstract class IgniteCacheInvokeAbstractTest extends IgniteCacheAbstractT /** * @throws Exception If failed. */ + @Test public void testInvoke() throws Exception { IgniteCache cache = jcache(); @@ -80,6 +81,7 @@ public void testInvoke() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInternalInvokeNullable() throws Exception { IgniteInternalCache cache = grid(0).cachex(DEFAULT_CACHE_NAME); @@ -230,6 +232,7 @@ private void invoke(final IgniteCache cache, @Nullable Transac /** * @throws Exception If failed. */ + @Test public void testInvokeAll() throws Exception { IgniteCache cache = jcache(); @@ -305,6 +308,7 @@ static class MyClass3{} /** * @throws Exception If failed. */ + @Test public void testInvokeAllAppliedOnceOnBinaryTypeRegistration() { IgniteCache cache = jcache(); @@ -996,4 +1000,4 @@ public String value() { return S.toString(TestValue.class, this); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughSingleNodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughSingleNodeTest.java index 406e5afe9ff7d..242630bd78f90 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughSingleNodeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughSingleNodeTest.java @@ -35,6 +35,7 @@ public class IgniteCacheInvokeReadThroughSingleNodeTest extends IgniteCacheInvok /** * @throws Exception If failed. */ + @Test public void testInvokeReadThroughAtomic() throws Exception { invokeReadThrough(cacheConfiguration(PARTITIONED, ATOMIC, 1, false)); } @@ -42,6 +43,7 @@ public void testInvokeReadThroughAtomic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeReadThroughAtomicNearCache() throws Exception { invokeReadThrough(cacheConfiguration(PARTITIONED, ATOMIC, 1, true)); } @@ -49,6 +51,7 @@ public void testInvokeReadThroughAtomicNearCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeReadThroughAtomicReplicated() throws Exception { invokeReadThrough(cacheConfiguration(REPLICATED, ATOMIC, 0, false)); } @@ -56,6 +59,7 @@ public void testInvokeReadThroughAtomicReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeReadThroughAtomicLocal() throws Exception { invokeReadThrough(cacheConfiguration(LOCAL, ATOMIC, 0, false)); } @@ -63,6 +67,7 @@ public void testInvokeReadThroughAtomicLocal() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeReadThroughTx() throws Exception { invokeReadThrough(cacheConfiguration(PARTITIONED, TRANSACTIONAL, 1, false)); } @@ -70,6 +75,7 @@ public void testInvokeReadThroughTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeReadThroughTxNearCache() throws Exception { invokeReadThrough(cacheConfiguration(PARTITIONED, TRANSACTIONAL, 1, true)); } @@ -77,6 +83,7 @@ public void testInvokeReadThroughTxNearCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeReadThroughTxReplicated() throws Exception { invokeReadThrough(cacheConfiguration(REPLICATED, TRANSACTIONAL, 0, false)); } @@ -84,6 +91,7 @@ public void testInvokeReadThroughTxReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeReadThroughTxLocal() throws Exception { invokeReadThrough(cacheConfiguration(LOCAL, TRANSACTIONAL, 0, false)); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughTest.java index 8fd37588a43eb..bba2319ab9e88 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughTest.java @@ -38,6 +38,7 @@ public class IgniteCacheInvokeReadThroughTest extends IgniteCacheInvokeReadThrou /** * @throws Exception If failed. */ + @Test public void testInvokeReadThroughAtomic0() throws Exception { invokeReadThrough(cacheConfiguration(PARTITIONED, ATOMIC, 0, false)); } @@ -45,6 +46,7 @@ public void testInvokeReadThroughAtomic0() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeReadThroughAtomic1() throws Exception { invokeReadThrough(cacheConfiguration(PARTITIONED, ATOMIC, 1, false)); } @@ -52,6 +54,7 @@ public void testInvokeReadThroughAtomic1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeReadThroughAtomic2() throws Exception { invokeReadThrough(cacheConfiguration(PARTITIONED, ATOMIC, 2, false)); } @@ -59,6 +62,7 @@ public void testInvokeReadThroughAtomic2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeReadThroughAtomicNearCache() throws Exception { invokeReadThrough(cacheConfiguration(PARTITIONED, ATOMIC, 1, true)); } @@ -66,6 +70,7 @@ public void testInvokeReadThroughAtomicNearCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeReadThroughAtomicReplicated() throws Exception { invokeReadThrough(cacheConfiguration(REPLICATED, ATOMIC, 0, false)); } @@ -73,6 +78,7 @@ public void testInvokeReadThroughAtomicReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeReadThroughTx0() throws Exception { invokeReadThrough(cacheConfiguration(PARTITIONED, TRANSACTIONAL, 0, false)); } @@ -80,6 +86,7 @@ public void testInvokeReadThroughTx0() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeReadThroughTx1() throws Exception { invokeReadThrough(cacheConfiguration(PARTITIONED, TRANSACTIONAL, 1, false)); } @@ -87,6 +94,7 @@ public void testInvokeReadThroughTx1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeReadThroughTx2() throws Exception { invokeReadThrough(cacheConfiguration(PARTITIONED, TRANSACTIONAL, 2, false)); } @@ -94,6 +102,7 @@ public void testInvokeReadThroughTx2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeReadThroughTxNearCache() throws Exception { invokeReadThrough(cacheConfiguration(PARTITIONED, TRANSACTIONAL, 1, true)); } @@ -101,6 +110,7 @@ public void testInvokeReadThroughTxNearCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeReadThroughTxReplicated() throws Exception { invokeReadThrough(cacheConfiguration(REPLICATED, TRANSACTIONAL, 0, false)); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLoadRebalanceEvictionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLoadRebalanceEvictionSelfTest.java index d545d09747682..3723815f11e6b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLoadRebalanceEvictionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLoadRebalanceEvictionSelfTest.java @@ -95,6 +95,7 @@ public class IgniteCacheLoadRebalanceEvictionSelfTest extends GridCommonAbstract /** * @throws Exception If failed. */ + @Test public void testStartRebalancing() throws Exception { List> futs = new ArrayList<>(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheManyAsyncOperationsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheManyAsyncOperationsTest.java index ca9d15b311e85..7104329dd7362 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheManyAsyncOperationsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheManyAsyncOperationsTest.java @@ -70,6 +70,7 @@ public class IgniteCacheManyAsyncOperationsTest extends IgniteCacheAbstractTest /** * @throws Exception If failed. */ + @Test public void testManyAsyncOperations() throws Exception { try (Ignite client = startGrid(gridCount())) { assertTrue(client.configuration().isClientMode()); @@ -108,4 +109,4 @@ public void testManyAsyncOperations() throws Exception { } } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheNearLockValueSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheNearLockValueSelfTest.java index 37fe5fa830ad5..58a4233c60f3d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheNearLockValueSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheNearLockValueSelfTest.java @@ -71,6 +71,7 @@ public class IgniteCacheNearLockValueSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testDhtVersion() throws Exception { CacheConfiguration pCfg = new CacheConfiguration<>("partitioned"); @@ -114,4 +115,4 @@ public void testDhtVersion() throws Exception { } } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheNoSyncForGetTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheNoSyncForGetTest.java index 6324df4930d46..1aa3046df0df6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheNoSyncForGetTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheNoSyncForGetTest.java @@ -92,6 +92,7 @@ public class IgniteCacheNoSyncForGetTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testAtomicGet() throws Exception { getTest(ATOMIC); } @@ -99,6 +100,7 @@ public void testAtomicGet() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxGet() throws Exception { getTest(TRANSACTIONAL); } @@ -106,6 +108,7 @@ public void testTxGet() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccTxGet() throws Exception { getTest(TRANSACTIONAL_SNAPSHOT); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheObjectPutSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheObjectPutSelfTest.java index f924e83b92ce0..6ed02101bf902 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheObjectPutSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheObjectPutSelfTest.java @@ -58,6 +58,7 @@ public class IgniteCacheObjectPutSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPrimitiveValues() throws Exception { IgniteEx ignite = grid(0); @@ -100,6 +101,7 @@ public void testPrimitiveValues() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClassValues() throws Exception { IgniteEx ignite = grid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingErrorTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingErrorTest.java index 55ff31a62ed17..e0e7b6ffae4d3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingErrorTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingErrorTest.java @@ -152,6 +152,7 @@ protected void failGet(int k) { * * @throws Exception If failed. */ + @Test public void testResponseMessageOnUnmarshallingFailed() throws Exception { // GridNearAtomicFullUpdateRequest unmarshalling failed test. readCnt.set(1); @@ -281,4 +282,4 @@ public TestValue() { throw new IOException("Class can not be unmarshalled."); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingNearErrorTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingNearErrorTest.java index 546ec06f5cf24..89ca8085402a4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingNearErrorTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingNearErrorTest.java @@ -43,7 +43,8 @@ public class IgniteCacheP2pUnmarshallingNearErrorTest extends IgniteCacheP2pUnma } /** {@inheritDoc} */ - @Override public void testResponseMessageOnUnmarshallingFailed() throws InterruptedException { + @Override @Test + public void testResponseMessageOnUnmarshallingFailed() throws InterruptedException { //GridCacheEvictionRequest unmarshalling failed test. readCnt.set(5); //2 for each put. @@ -55,4 +56,4 @@ public class IgniteCacheP2pUnmarshallingNearErrorTest extends IgniteCacheP2pUnma // Wait for eviction complete. Thread.sleep(1000); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingRebalanceErrorTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingRebalanceErrorTest.java index 28fc31c003af7..46d79b26fd16f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingRebalanceErrorTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingRebalanceErrorTest.java @@ -35,7 +35,8 @@ public class IgniteCacheP2pUnmarshallingRebalanceErrorTest extends IgniteCacheP2 } /** {@inheritDoc} */ - @Override public void testResponseMessageOnUnmarshallingFailed() throws Exception { + @Override @Test + public void testResponseMessageOnUnmarshallingFailed() throws Exception { //GridDhtPartitionSupplyMessage unmarshalling failed test. readCnt.set(Integer.MAX_VALUE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingTxErrorTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingTxErrorTest.java index ba77c701dd54e..5364e0aea1844 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingTxErrorTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingTxErrorTest.java @@ -77,7 +77,8 @@ private void failPessimictic() { } /** {@inheritDoc} */ - @Override public void testResponseMessageOnUnmarshallingFailed() { + @Override @Test + public void testResponseMessageOnUnmarshallingFailed() { //GridNearTxPrepareRequest unmarshalling failed test readCnt.set(2); @@ -100,4 +101,4 @@ private void failPessimictic() { jcache(0).put(new TestKey(String.valueOf(++key)), ""); //No failure at client side. } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePartitionMapUpdateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePartitionMapUpdateTest.java index 87549cf4d4865..7bdd81adb9620 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePartitionMapUpdateTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePartitionMapUpdateTest.java @@ -115,6 +115,7 @@ public class IgniteCachePartitionMapUpdateTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPartitionMapUpdate1() throws Exception { cache1 = false; cache2 = false; @@ -156,6 +157,7 @@ public void testPartitionMapUpdate1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPartitionMapUpdate2() throws Exception { startClientCache = true; @@ -165,6 +167,7 @@ public void testPartitionMapUpdate2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRandom() throws Exception { ThreadLocalRandom rnd = ThreadLocalRandom.current(); @@ -202,6 +205,7 @@ public void testRandom() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRandom2() throws Exception { startClientCache = true; @@ -227,4 +231,4 @@ public AttributeFilter(String attrName) { return F.eq(node.attribute(attrName), "true"); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePeekModesAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePeekModesAbstractTest.java index ae1cf8851b34f..8edbde43a482b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePeekModesAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePeekModesAbstractTest.java @@ -106,6 +106,7 @@ protected boolean hasNearCache() { /** * @throws Exception If failed. */ + @Test public void testLocalPeek() throws Exception { if (cacheMode() == LOCAL) { checkAffinityLocalCache(); @@ -371,6 +372,7 @@ private void checkStorage(int nodeIdx) throws Exception { /** * @throws Exception If failed. */ + @Test public void testSize() throws Exception { checkEmpty(); @@ -479,6 +481,7 @@ public void testSize() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLocalPartitionSize() throws Exception { if (cacheMode() != LOCAL) return; @@ -534,6 +537,7 @@ public void testLocalPartitionSize() throws Exception { /** * @throws InterruptedException If failed. */ + @Test public void testLocalPartitionSizeFlags() throws InterruptedException { if (true) // TODO GG-11148. return; @@ -595,6 +599,7 @@ public void testLocalPartitionSizeFlags() throws InterruptedException { /** * @throws Exception If failed. */ + @Test public void testNonLocalPartitionSize() throws Exception { if (true) // TODO GG-11148. return; @@ -1280,6 +1285,7 @@ private void checkPrimarySize(int exp) { /** * @throws Exception If failed. */ + @Test public void testLocalEntries() throws Exception { if (cacheMode() == LOCAL) { IgniteCache cache0 = jcache(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePutAllRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePutAllRestartTest.java index c90030e87f2cf..0f01a64020412 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePutAllRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePutAllRestartTest.java @@ -104,6 +104,7 @@ public class IgniteCachePutAllRestartTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testStopNode() throws Exception { startGrids(NODES); @@ -165,6 +166,7 @@ public void testStopNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStopOriginatingNode() throws Exception { startGrids(NODES); @@ -222,4 +224,4 @@ public void testStopOriginatingNode() throws Exception { startGrid(node); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePutStackOverflowSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePutStackOverflowSelfTest.java index 86f34feb5e3da..7c09ee5e59949 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePutStackOverflowSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePutStackOverflowSelfTest.java @@ -61,6 +61,7 @@ public class IgniteCachePutStackOverflowSelfTest extends GridCommonAbstractTest /** * @throws Exception if failed. */ + @Test public void testStackLocal() throws Exception { checkCache(CacheMode.LOCAL); } @@ -68,6 +69,7 @@ public void testStackLocal() throws Exception { /** * @throws Exception if failed. */ + @Test public void testStackPartitioned() throws Exception { checkCache(CacheMode.PARTITIONED); } @@ -75,6 +77,7 @@ public void testStackPartitioned() throws Exception { /** * @throws Exception if failed. */ + @Test public void testStackReplicated() throws Exception { checkCache(CacheMode.REPLICATED); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughEvictionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughEvictionSelfTest.java index fe186b7908423..d508f7ed64dfb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughEvictionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughEvictionSelfTest.java @@ -64,6 +64,7 @@ public class IgniteCacheReadThroughEvictionSelfTest extends IgniteCacheConfigVar /** * @throws Exception if failed. */ + @Test public void testReadThroughWithExpirePolicy() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.EXPIRATION); @@ -106,6 +107,7 @@ public void testReadThroughWithExpirePolicy() throws Exception { /** * @throws Exception if failed. */ + @Test public void testReadThroughExpirePolicyConfigured() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.EXPIRATION); @@ -161,6 +163,7 @@ public void testReadThroughExpirePolicyConfigured() throws Exception { /** * @throws Exception if failed. */ + @Test public void testReadThroughEvictionPolicy() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.EVICTION); @@ -199,6 +202,7 @@ public void testReadThroughEvictionPolicy() throws Exception { /** * @throws Exception if failed. */ + @Test public void testReadThroughSkipStore() throws Exception { Ignite ig = testedGrid(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughStoreCallTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughStoreCallTest.java index 423c4a156575e..fa73e6aa74252 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughStoreCallTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughStoreCallTest.java @@ -87,6 +87,7 @@ public class IgniteCacheReadThroughStoreCallTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testMultiNode() throws Exception { startGridsMultiThreaded(4); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheScanPredicateDeploymentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheScanPredicateDeploymentSelfTest.java index 37f08797ed8f8..e6b26c1d435da 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheScanPredicateDeploymentSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheScanPredicateDeploymentSelfTest.java @@ -87,6 +87,7 @@ protected CacheAtomicityMode atomicityMode() { /** * @throws Exception In case of error. */ + @Test public void testDeployScanPredicate() throws Exception { startGrids(4); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheSerializationSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheSerializationSelfTest.java index 436c1982ff43d..2eec9d65bd49b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheSerializationSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheSerializationSelfTest.java @@ -83,6 +83,7 @@ private CacheConfiguration cacheConfiguration(CacheMode cacheM /** * @throws Exception If failed. */ + @Test public void testSerializeClosure() throws Exception { Ignite client = ignite(CLIENT); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStartStopLoadTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStartStopLoadTest.java index daa5d8337b842..0d6ec7d42d67a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStartStopLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStartStopLoadTest.java @@ -76,6 +76,7 @@ public int nodeCount() { /** * @throws Exception If failed. */ + @Test public void testMemoryLeaks() throws Exception { final Ignite ignite = ignite(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStartTest.java index c889c31ac7b4a..6396f86a78c0f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStartTest.java @@ -71,6 +71,7 @@ public class IgniteCacheStartTest extends GridCommonAbstractTest { * @throws Exception If failed. */ @SuppressWarnings("unchecked") + @Test public void testStartAndNodeJoin() throws Exception { Ignite node0 = startGrid(0); @@ -103,6 +104,7 @@ public void testStartAndNodeJoin() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStartFromJoiningNode1() throws Exception { checkStartFromJoiningNode(false); } @@ -110,6 +112,7 @@ public void testStartFromJoiningNode1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStartFromJoiningNode2() throws Exception { checkStartFromJoiningNode(true); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStoreCollectionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStoreCollectionTest.java index 4210822c408db..7707cefea8a77 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStoreCollectionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStoreCollectionTest.java @@ -84,6 +84,7 @@ public class IgniteCacheStoreCollectionTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testStoreMap() throws Exception { IgniteCache cache1 = ignite(0).cache(CACHE1); IgniteCache cache2 = ignite(0).cache(CACHE2); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStoreValueAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStoreValueAbstractTest.java index bd259a5aa88ea..45848f2636b11 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStoreValueAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStoreValueAbstractTest.java @@ -125,6 +125,7 @@ public abstract class IgniteCacheStoreValueAbstractTest extends IgniteCacheAbstr /** * @throws Exception If failed. */ + @Test public void testValueNotStored() throws Exception { cpyOnRead = true; @@ -296,6 +297,7 @@ private void checkNoValue(Affinity aff, Object key) { /** * @throws Exception If failed. */ + @Test public void testValueStored() throws Exception { cpyOnRead = false; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTransactionalStopBusySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTransactionalStopBusySelfTest.java index 06e60454dc837..9d9aaf43b9dcc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTransactionalStopBusySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTransactionalStopBusySelfTest.java @@ -24,30 +24,34 @@ */ public class IgniteCacheTransactionalStopBusySelfTest extends IgniteCacheAbstractStopBusySelfTest { /** {@inheritDoc} */ - @Override public void testPut() throws Exception { + @Override @Test + public void testPut() throws Exception { bannedMsg.set(GridNearTxPrepareRequest.class); super.testPut(); } /** {@inheritDoc} */ - @Override public void testPutBatch() throws Exception { + @Override @Test + public void testPutBatch() throws Exception { bannedMsg.set(GridNearTxPrepareRequest.class); super.testPut(); } /** {@inheritDoc} */ - @Override public void testPutAsync() throws Exception { + @Override @Test + public void testPutAsync() throws Exception { bannedMsg.set(GridNearTxPrepareRequest.class); super.testPut(); } /** {@inheritDoc} */ - @Override public void testRemove() throws Exception { + @Override @Test + public void testRemove() throws Exception { bannedMsg.set(GridNearTxPrepareRequest.class); super.testPut(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxNearPeekModesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxNearPeekModesTest.java index aa4faaf6049ea..9af02a6376fd8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxNearPeekModesTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxNearPeekModesTest.java @@ -27,7 +27,8 @@ public class IgniteCacheTxNearPeekModesTest extends IgniteCacheTxPeekModesTest { } /** {@inheritDoc} */ - @Override public void testLocalPeek() throws Exception { + @Override @Test + public void testLocalPeek() throws Exception { // TODO: uncomment and re-open ticket if fails. // fail("https://issues.apache.org/jira/browse/IGNITE-1824"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxPeekModesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxPeekModesTest.java index ea22f53b0b5bc..ccf3ce0b46cd6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxPeekModesTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxPeekModesTest.java @@ -43,10 +43,11 @@ public class IgniteCacheTxPeekModesTest extends IgniteCachePeekModesAbstractTest } /** {@inheritDoc} */ - @Override public void testLocalPeek() throws Exception { + @Override @Test + public void testLocalPeek() throws Exception { // TODO: uncomment and re-open ticket if fails. // fail("https://issues.apache.org/jira/browse/IGNITE-1824"); super.testLocalPeek(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxPreloadNoWriteTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxPreloadNoWriteTest.java index ebd0a96c8980e..b73ed7cf1a866 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxPreloadNoWriteTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxPreloadNoWriteTest.java @@ -80,6 +80,7 @@ public class IgniteCacheTxPreloadNoWriteTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testTxNoWrite() throws Exception { txNoWrite(true); } @@ -87,6 +88,7 @@ public void testTxNoWrite() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxNoWriteRollback() throws Exception { txNoWrite(false); } @@ -129,4 +131,4 @@ private void txNoWrite(boolean commit) throws Exception { // Try to start one more node. startGrid(2); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachingProviderSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachingProviderSelfTest.java index 37dda12853077..564ac296f0db5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachingProviderSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachingProviderSelfTest.java @@ -90,6 +90,7 @@ public class IgniteCachingProviderSelfTest extends IgniteCacheAbstractTest { /** * */ + @Test public void testStartIgnite() { javax.cache.spi.CachingProvider cachingProvider = Caching.getCachingProvider(); @@ -118,6 +119,7 @@ public void testStartIgnite() { /** * @throws Exception If failed. */ + @Test public void testCloseManager() throws Exception { startGridsMultiThreaded(1); @@ -131,4 +133,4 @@ public void testCloseManager() throws Exception { assertNotSame(cacheMgr, cachingProvider.getCacheManager()); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientAffinityAssignmentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientAffinityAssignmentSelfTest.java index 0a7a680f81d21..12c80e3fa34ca 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientAffinityAssignmentSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientAffinityAssignmentSelfTest.java @@ -75,6 +75,7 @@ public class IgniteClientAffinityAssignmentSelfTest extends GridCommonAbstractTe /** * @throws Exception If failed. */ + @Test public void testRendezvousAssignment() throws Exception { checkAffinityFunction(); } @@ -200,4 +201,4 @@ private void awaitTopology(final long topVer) throws Exception { assertEquals(topVer, cache.context().affinity().affinityTopologyVersion().topologyVersion()); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientCacheInitializationFailTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientCacheInitializationFailTest.java index 5432257c6d444..b18c283328b4a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientCacheInitializationFailTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientCacheInitializationFailTest.java @@ -135,6 +135,7 @@ public class IgniteClientCacheInitializationFailTest extends GridCommonAbstractT /** * @throws Exception If failed. */ + @Test public void testAtomicCacheInitialization() throws Exception { checkCacheInitialization(ATOMIC_CACHE_NAME); } @@ -142,6 +143,7 @@ public void testAtomicCacheInitialization() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTransactionalCacheInitialization() throws Exception { checkCacheInitialization(TX_CACHE_NAME); } @@ -149,6 +151,7 @@ public void testTransactionalCacheInitialization() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAtomicNearCacheInitialization() throws Exception { checkCacheInitialization(NEAR_ATOMIC_CACHE_NAME); } @@ -156,6 +159,7 @@ public void testAtomicNearCacheInitialization() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTransactionalNearCacheInitialization() throws Exception { checkCacheInitialization(NEAR_TX_CACHE_NAME); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientCacheStartFailoverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientCacheStartFailoverTest.java index fa7d0a879ec73..ea7d6f32ea76f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientCacheStartFailoverTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientCacheStartFailoverTest.java @@ -99,6 +99,7 @@ public class IgniteClientCacheStartFailoverTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClientStartCoordinatorFailsAtomic() throws Exception { clientStartCoordinatorFails(ATOMIC); } @@ -106,6 +107,7 @@ public void testClientStartCoordinatorFailsAtomic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientStartCoordinatorFailsTx() throws Exception { clientStartCoordinatorFails(TRANSACTIONAL); } @@ -113,6 +115,7 @@ public void testClientStartCoordinatorFailsTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientStartCoordinatorFailsMvccTx() throws Exception { clientStartCoordinatorFails(TRANSACTIONAL_SNAPSHOT); } @@ -167,6 +170,7 @@ private void clientStartCoordinatorFails(CacheAtomicityMode atomicityMode) throw /** * @throws Exception If failed. */ + @Test public void testClientStartLastServerFailsAtomic() throws Exception { clientStartLastServerFails(ATOMIC); } @@ -174,6 +178,7 @@ public void testClientStartLastServerFailsAtomic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientStartLastServerFailsTx() throws Exception { clientStartLastServerFails(TRANSACTIONAL); } @@ -181,6 +186,7 @@ public void testClientStartLastServerFailsTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientStartLastServerFailsMvccTx() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10262"); @@ -273,6 +279,7 @@ private void clientStartLastServerFails(CacheAtomicityMode atomicityMode) throws /** * @throws Exception If failed. */ + @Test public void testRebalanceState() throws Exception { final int SRVS = 3; @@ -344,6 +351,7 @@ public void testRebalanceState() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRebalanceStateConcurrentStart() throws Exception { final int SRVS1 = 3; final int CLIENTS = 5; @@ -438,6 +446,7 @@ public void testRebalanceStateConcurrentStart() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientStartCloseServersRestart() throws Exception { final int SRVS = 4; final int CLIENTS = 4; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClusterActivateDeactivateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClusterActivateDeactivateTest.java index ed6eb8675e534..8f1df3d295e64 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClusterActivateDeactivateTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClusterActivateDeactivateTest.java @@ -166,6 +166,7 @@ protected boolean persistenceEnabled() { /** * @throws Exception If failed. */ + @Test public void testActivateSimple_SingleNode() throws Exception { activateSimple(1, 0, 0); } @@ -173,6 +174,7 @@ public void testActivateSimple_SingleNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testActivateSimple_5_Servers() throws Exception { activateSimple(5, 0, 0); } @@ -180,6 +182,7 @@ public void testActivateSimple_5_Servers() throws Exception { /** * @throws Exception If failed. */ + @Test public void testActivateSimple_5_Servers2() throws Exception { activateSimple(5, 0, 4); } @@ -187,6 +190,7 @@ public void testActivateSimple_5_Servers2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testActivateSimple_5_Servers_5_Clients() throws Exception { activateSimple(5, 4, 0); } @@ -194,6 +198,7 @@ public void testActivateSimple_5_Servers_5_Clients() throws Exception { /** * @throws Exception If failed. */ + @Test public void testActivateSimple_5_Servers_5_Clients_FromClient() throws Exception { activateSimple(5, 4, 6); } @@ -260,6 +265,7 @@ private void activateSimple(int srvs, int clients, int activateFrom) throws Exce /** * @throws Exception If failed. */ + @Test public void testReActivateSimple_5_Servers_4_Clients_FromClient() throws Exception { reactivateSimple(5, 4, 6); } @@ -267,6 +273,7 @@ public void testReActivateSimple_5_Servers_4_Clients_FromClient() throws Excepti /** * @throws Exception If failed. */ + @Test public void testReActivateSimple_5_Servers_4_Clients_FromServer() throws Exception { reactivateSimple(5, 4, 0); } @@ -340,6 +347,7 @@ final void checkCaches(int nodes, int caches) { /** * @throws Exception If failed. */ + @Test public void testJoinWhileActivate1_Server() throws Exception { joinWhileActivate1(false, false); } @@ -347,6 +355,7 @@ public void testJoinWhileActivate1_Server() throws Exception { /** * @throws Exception If failed. */ + @Test public void testJoinWhileActivate1_WithCache_Server() throws Exception { joinWhileActivate1(false, true); } @@ -354,6 +363,7 @@ public void testJoinWhileActivate1_WithCache_Server() throws Exception { /** * @throws Exception If failed. */ + @Test public void testJoinWhileActivate1_Client() throws Exception { joinWhileActivate1(true, false); } @@ -488,6 +498,7 @@ private void blockExchangeSingleMessage(TestRecordingCommunicationSpi spi, final /** * @throws Exception If failed. */ + @Test public void testJoinWhileDeactivate1_Server() throws Exception { joinWhileDeactivate1(false, false); } @@ -495,6 +506,7 @@ public void testJoinWhileDeactivate1_Server() throws Exception { /** * @throws Exception If failed. */ + @Test public void testJoinWhileDeactivate1_WithCache_Server() throws Exception { joinWhileDeactivate1(false, true); } @@ -502,6 +514,7 @@ public void testJoinWhileDeactivate1_WithCache_Server() throws Exception { /** * @throws Exception If failed. */ + @Test public void testJoinWhileDeactivate1_Client() throws Exception { joinWhileDeactivate1(true, false); } @@ -565,6 +578,7 @@ private void joinWhileDeactivate1(final boolean startClient, final boolean withN /** * @throws Exception If failed. */ + @Test public void testConcurrentJoinAndActivate() throws Exception { for (int iter = 0; iter < 3; iter++) { log.info("Iteration: " + iter); @@ -615,6 +629,7 @@ public void testConcurrentJoinAndActivate() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeactivateSimple_SingleNode() throws Exception { deactivateSimple(1, 0, 0); } @@ -622,6 +637,7 @@ public void testDeactivateSimple_SingleNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeactivateSimple_5_Servers() throws Exception { deactivateSimple(5, 0, 0); } @@ -629,6 +645,7 @@ public void testDeactivateSimple_5_Servers() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeactivateSimple_5_Servers2() throws Exception { deactivateSimple(5, 0, 4); } @@ -636,6 +653,7 @@ public void testDeactivateSimple_5_Servers2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeactivateSimple_5_Servers_5_Clients() throws Exception { deactivateSimple(5, 4, 0); } @@ -643,6 +661,7 @@ public void testDeactivateSimple_5_Servers_5_Clients() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeactivateSimple_5_Servers_5_Clients_FromClient() throws Exception { deactivateSimple(5, 4, 6); } @@ -732,6 +751,7 @@ private void startWithCaches1(int srvs, int clients) throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientReconnectClusterActive() throws Exception { testReconnectSpi = true; @@ -770,6 +790,7 @@ public void testClientReconnectClusterActive() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientReconnectClusterInactive() throws Exception { testReconnectSpi = true; @@ -809,6 +830,7 @@ public void testClientReconnectClusterInactive() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientReconnectClusterDeactivated() throws Exception { clientReconnectClusterDeactivated(false); } @@ -816,6 +838,7 @@ public void testClientReconnectClusterDeactivated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientReconnectClusterDeactivateInProgress() throws Exception { clientReconnectClusterDeactivated(true); } @@ -909,6 +932,7 @@ private void clientReconnectClusterDeactivated(final boolean transition) throws /** * @throws Exception If failed. */ + @Test public void testClientReconnectClusterActivated() throws Exception { clientReconnectClusterActivated(false); } @@ -916,6 +940,7 @@ public void testClientReconnectClusterActivated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientReconnectClusterActivateInProgress() throws Exception { clientReconnectClusterActivated(true); } @@ -996,6 +1021,7 @@ private void clientReconnectClusterActivated(final boolean transition) throws Ex /** * @throws Exception If failed. */ + @Test public void testInactiveTopologyChanges() throws Exception { testSpi = true; @@ -1052,6 +1078,7 @@ public void testInactiveTopologyChanges() throws Exception { /** * @throws Exception If failed. */ + @Test public void testActivateFailover1() throws Exception { stateChangeFailover1(true); } @@ -1059,6 +1086,7 @@ public void testActivateFailover1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeactivateFailover1() throws Exception { stateChangeFailover1(false); } @@ -1109,6 +1137,7 @@ private void stateChangeFailover1(boolean activate) throws Exception { /** * @throws Exception If failed. */ + @Test public void testActivateFailover2() throws Exception { stateChangeFailover2(true); } @@ -1116,6 +1145,7 @@ public void testActivateFailover2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeactivateFailover2() throws Exception { stateChangeFailover2(false); } @@ -1177,6 +1207,7 @@ private void stateChangeFailover2(boolean activate) throws Exception { /** * @throws Exception If failed. */ + @Test public void testActivateFailover3() throws Exception { stateChangeFailover3(true); } @@ -1184,6 +1215,7 @@ public void testActivateFailover3() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeactivateFailover3() throws Exception { stateChangeFailover3(false); } @@ -1239,6 +1271,7 @@ private void stateChangeFailover3(boolean activate) throws Exception { /** * @throws Exception If failed. */ + @Test public void testClusterStateNotWaitForDeactivation() throws Exception { testSpi = true; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClusterActivateDeactivateTestWithPersistence.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClusterActivateDeactivateTestWithPersistence.java index 4dc4f2743371b..723658ef0536f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClusterActivateDeactivateTestWithPersistence.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClusterActivateDeactivateTestWithPersistence.java @@ -73,6 +73,7 @@ public class IgniteClusterActivateDeactivateTestWithPersistence extends IgniteCl /** * @throws Exception If failed. */ + @Test public void testActivateCachesRestore_SingleNode() throws Exception { activateCachesRestore(1, false); } @@ -80,6 +81,7 @@ public void testActivateCachesRestore_SingleNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testActivateCachesRestore_SingleNode_WithNewCaches() throws Exception { activateCachesRestore(1, true); } @@ -87,6 +89,7 @@ public void testActivateCachesRestore_SingleNode_WithNewCaches() throws Exceptio /** * @throws Exception If failed. */ + @Test public void testActivateCachesRestore_5_Servers() throws Exception { activateCachesRestore(5, false); } @@ -94,6 +97,7 @@ public void testActivateCachesRestore_5_Servers() throws Exception { /** * @throws Exception If failed. */ + @Test public void testActivateCachesRestore_5_Servers_WithNewCaches() throws Exception { activateCachesRestore(5, true); } @@ -103,6 +107,7 @@ public void testActivateCachesRestore_5_Servers_WithNewCaches() throws Exception * * @throws Exception If failed. */ + @Test public void testDeactivateInactiveCluster() throws Exception { ccfgs = new CacheConfiguration[] { new CacheConfiguration<>("test_cache_1") @@ -225,6 +230,7 @@ private void activateCachesRestore(int srvs, boolean withNewCaches) throws Excep /** * @see IGNITE-7330 for more information about context of the test */ + @Test public void testClientJoinsWhenActivationIsInProgress() throws Exception { startGridsAndLoadData(5); @@ -283,6 +289,7 @@ private void checkCachesData(Map cacheData, DataStorageConfigu /** * @throws Exception If failed. */ + @Test public void testActivateCacheRestoreConfigurationConflict() throws Exception { final int SRVS = 3; @@ -319,6 +326,7 @@ public void testActivateCacheRestoreConfigurationConflict() throws Exception { * * @throws Exception If failed. */ + @Test public void testDeactivateDuringEvictionAndRebalance() throws Exception { IgniteEx srv = (IgniteEx) startGrids(3); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDaemonNodeMarshallerCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDaemonNodeMarshallerCacheTest.java index 2f9bd533ae916..a8679801bb8ad 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDaemonNodeMarshallerCacheTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDaemonNodeMarshallerCacheTest.java @@ -64,6 +64,7 @@ public class IgniteDaemonNodeMarshallerCacheTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testMarshalOnDaemonNode1() throws Exception { marshalOnDaemonNode(true); } @@ -71,6 +72,7 @@ public void testMarshalOnDaemonNode1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMarshalOnDaemonNode2() throws Exception { marshalOnDaemonNode(false); } @@ -191,4 +193,4 @@ public TestClass2(int val) { this.val = val; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheAndNodeStop.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheAndNodeStop.java index 50f45a7ed3f36..0ad765daa36b4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheAndNodeStop.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheAndNodeStop.java @@ -54,6 +54,7 @@ public class IgniteDynamicCacheAndNodeStop extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCacheAndNodeStop() throws Exception { final Ignite ignite = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheFilterTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheFilterTest.java index 53c1cb29fe452..db75f2cfe7bed 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheFilterTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheFilterTest.java @@ -84,6 +84,7 @@ public class IgniteDynamicCacheFilterTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCofiguredCacheFilter() throws Exception { attrVal = "A"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheMultinodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheMultinodeTest.java index fb1643efeb526..bde0838d4a880 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheMultinodeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheMultinodeTest.java @@ -73,6 +73,7 @@ public class IgniteDynamicCacheMultinodeTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testGetOrCreateCache() throws Exception { createCacheMultinode(TestOp.GET_OR_CREATE_CACHE); } @@ -80,6 +81,7 @@ public void testGetOrCreateCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetOrCreateCaches() throws Exception { createCacheMultinode(TestOp.GET_OR_CREATE_CACHES); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartCoordinatorFailoverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartCoordinatorFailoverTest.java index 0b7158db449c7..50cb03926f247 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartCoordinatorFailoverTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartCoordinatorFailoverTest.java @@ -1,258 +1,259 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You 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.apache.ignite.internal.processors.cache; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.Callable; -import java.util.concurrent.CountDownLatch; -import javax.cache.CacheException; -import org.apache.ignite.Ignite; -import org.apache.ignite.IgniteCache; -import org.apache.ignite.IgniteDataStreamer; -import org.apache.ignite.IgniteException; -import org.apache.ignite.cache.affinity.AffinityFunctionContext; -import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction; -import org.apache.ignite.cluster.ClusterNode; -import org.apache.ignite.configuration.CacheConfiguration; -import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.internal.GridJobExecuteResponse; -import org.apache.ignite.internal.managers.communication.GridIoMessage; -import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsSingleMessage; -import org.apache.ignite.lang.IgniteInClosure; -import org.apache.ignite.plugin.extensions.communication.Message; -import org.apache.ignite.resources.IgniteInstanceResource; -import org.apache.ignite.spi.IgniteSpiException; -import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi; -import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; -import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; -import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; -import org.apache.ignite.testframework.GridTestUtils; -import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; - -public class IgniteDynamicCacheStartCoordinatorFailoverTest extends GridCommonAbstractTest { - /** Default IP finder for single-JVM cloud grid. */ - private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); - - /** Latch which blocks DynamicCacheChangeFailureMessage until main thread has sent node fail signal. */ - private static volatile CountDownLatch latch; - - /** */ - private static final String COORDINATOR_ATTRIBUTE = "coordinator"; - - /** Client mode flag. */ - private Boolean appendCustomAttribute; - - /** {@inheritDoc} */ - @Override protected void afterTest() throws Exception { - stopAllGrids(); - } - - /** {@inheritDoc} */ - @Override protected void beforeTest() throws Exception { - latch = new CountDownLatch(1); - } - - /** {@inheritDoc} */ - @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { - IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - - TcpDiscoverySpi discoSpi = new TcpDiscoverySpi(); - discoSpi.setIpFinder(ipFinder); - - cfg.setDiscoverySpi(discoSpi); - - TcpCommunicationSpi commSpi = new CustomCommunicationSpi(); - commSpi.setLocalPort(GridTestUtils.getNextCommPort(getClass())); - - cfg.setCommunicationSpi(commSpi); - - cfg.setFailureDetectionTimeout(15_000); - - if (appendCustomAttribute) { - Map attrs = new HashMap<>(); - - attrs.put(COORDINATOR_ATTRIBUTE, Boolean.TRUE); - - cfg.setUserAttributes(attrs); - } - - return cfg; - } - - /** - * Tests coordinator failover during cache start failure. - * - * @throws Exception If test failed. - */ - public void testCoordinatorFailure() throws Exception { - // Start coordinator node. - appendCustomAttribute = true; - - Ignite g = startGrid(0); - - appendCustomAttribute = false; - - Ignite g1 = startGrid(1); - Ignite g2 = startGrid(2); - - awaitPartitionMapExchange(); - - CacheConfiguration cfg = new CacheConfiguration(); - - cfg.setName("test-coordinator-failover"); - - cfg.setAffinity(new BrokenAffinityFunction(false, getTestIgniteInstanceName(2))); - - GridTestUtils.runAsync(new Callable() { - @Override public Object call() throws Exception { - GridTestUtils.assertThrows(log, new Callable() { - @Override public Object call() throws Exception { - g1.getOrCreateCache(cfg); - return null; - } - }, CacheException.class, null); - - return null; - } - }, "cache-starter-thread"); - - latch.await(); - - stopGrid(0, true); - - awaitPartitionMapExchange(); - - // Correct the cache configuration. - cfg.setAffinity(new RendezvousAffinityFunction()); - - IgniteCache cache = g1.getOrCreateCache(cfg); - - checkCacheOperations(g1, cache); - } - - /** - * Test the basic cache operations. - * - * @param cache Cache. - * @throws Exception If test failed. - */ - protected void checkCacheOperations(Ignite ignite, IgniteCache cache) throws Exception { - int cnt = 1000; - - // Check base cache operations. - for (int i = 0; i < cnt; ++i) - cache.put(i, i); - - for (int i = 0; i < cnt; ++i) { - Integer v = (Integer) cache.get(i); - - assertNotNull(v); - assertEquals(i, v.intValue()); - } - - // Check Data Streamer capabilities. - try (IgniteDataStreamer streamer = ignite.dataStreamer(cache.getName())) { - for (int i = 0; i < 10_000; ++i) - streamer.addData(i, i); - } - } - - /** - * Communication SPI which could optionally block outgoing messages. - */ - private static class CustomCommunicationSpi extends TcpCommunicationSpi { - /** - * Send message optionally either blocking it or throwing an exception if it is of - * {@link GridJobExecuteResponse} type. - * - * @param node Destination node. - * @param msg Message to be sent. - * @param ackClosure Ack closure. - * @throws org.apache.ignite.spi.IgniteSpiException If failed. - */ - @Override public void sendMessage(ClusterNode node, Message msg, IgniteInClosure ackClosure) - throws IgniteSpiException { - - if (msg instanceof GridIoMessage) { - GridIoMessage msg0 = (GridIoMessage)msg; - - if (msg0.message() instanceof GridDhtPartitionsSingleMessage) { - Boolean attr = (Boolean) node.attributes().get(COORDINATOR_ATTRIBUTE); - - GridDhtPartitionsSingleMessage singleMsg = (GridDhtPartitionsSingleMessage) msg0.message(); - - Exception err = singleMsg.getError(); - - if (Boolean.TRUE.equals(attr) && err != null) { - // skip message - latch.countDown(); - - return; - } - } - } - - super.sendMessage(node, msg, ackClosure); - } - } - - /** - * Affinity function that throws an exception when affinity nodes are calculated on the given node. - */ - public static class BrokenAffinityFunction extends RendezvousAffinityFunction { - /** */ - private static final long serialVersionUID = 0L; - - /** */ - @IgniteInstanceResource - private Ignite ignite; - - /** Exception should arise on all nodes. */ - private boolean eOnAllNodes = false; - - /** Exception should arise on node with certain name. */ - private String gridName; - - /** - * Default constructor. - */ - public BrokenAffinityFunction() { - // No-op. - } - - /** - * @param eOnAllNodes {@code True} if exception should be thrown on all nodes. - * @param gridName Exception should arise on node with certain name. - */ - public BrokenAffinityFunction(boolean eOnAllNodes, String gridName) { - this.eOnAllNodes = eOnAllNodes; - this.gridName = gridName; - } - - /** {@inheritDoc} */ - @Override public List> assignPartitions(AffinityFunctionContext affCtx) { - if (eOnAllNodes || ignite.name().equals(gridName)) - throw new IllegalStateException("Simulated exception [locNodeId=" - + ignite.cluster().localNode().id() + "]"); - else - return super.assignPartitions(affCtx); - } - } -} +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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.apache.ignite.internal.processors.cache; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.Callable; +import java.util.concurrent.CountDownLatch; +import javax.cache.CacheException; +import org.apache.ignite.Ignite; +import org.apache.ignite.IgniteCache; +import org.apache.ignite.IgniteDataStreamer; +import org.apache.ignite.IgniteException; +import org.apache.ignite.cache.affinity.AffinityFunctionContext; +import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction; +import org.apache.ignite.cluster.ClusterNode; +import org.apache.ignite.configuration.CacheConfiguration; +import org.apache.ignite.configuration.IgniteConfiguration; +import org.apache.ignite.internal.GridJobExecuteResponse; +import org.apache.ignite.internal.managers.communication.GridIoMessage; +import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsSingleMessage; +import org.apache.ignite.lang.IgniteInClosure; +import org.apache.ignite.plugin.extensions.communication.Message; +import org.apache.ignite.resources.IgniteInstanceResource; +import org.apache.ignite.spi.IgniteSpiException; +import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi; +import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; +import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; +import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; +import org.apache.ignite.testframework.GridTestUtils; +import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; + +public class IgniteDynamicCacheStartCoordinatorFailoverTest extends GridCommonAbstractTest { + /** Default IP finder for single-JVM cloud grid. */ + private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); + + /** Latch which blocks DynamicCacheChangeFailureMessage until main thread has sent node fail signal. */ + private static volatile CountDownLatch latch; + + /** */ + private static final String COORDINATOR_ATTRIBUTE = "coordinator"; + + /** Client mode flag. */ + private Boolean appendCustomAttribute; + + /** {@inheritDoc} */ + @Override protected void afterTest() throws Exception { + stopAllGrids(); + } + + /** {@inheritDoc} */ + @Override protected void beforeTest() throws Exception { + latch = new CountDownLatch(1); + } + + /** {@inheritDoc} */ + @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { + IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); + + TcpDiscoverySpi discoSpi = new TcpDiscoverySpi(); + discoSpi.setIpFinder(ipFinder); + + cfg.setDiscoverySpi(discoSpi); + + TcpCommunicationSpi commSpi = new CustomCommunicationSpi(); + commSpi.setLocalPort(GridTestUtils.getNextCommPort(getClass())); + + cfg.setCommunicationSpi(commSpi); + + cfg.setFailureDetectionTimeout(15_000); + + if (appendCustomAttribute) { + Map attrs = new HashMap<>(); + + attrs.put(COORDINATOR_ATTRIBUTE, Boolean.TRUE); + + cfg.setUserAttributes(attrs); + } + + return cfg; + } + + /** + * Tests coordinator failover during cache start failure. + * + * @throws Exception If test failed. + */ + @Test + public void testCoordinatorFailure() throws Exception { + // Start coordinator node. + appendCustomAttribute = true; + + Ignite g = startGrid(0); + + appendCustomAttribute = false; + + Ignite g1 = startGrid(1); + Ignite g2 = startGrid(2); + + awaitPartitionMapExchange(); + + CacheConfiguration cfg = new CacheConfiguration(); + + cfg.setName("test-coordinator-failover"); + + cfg.setAffinity(new BrokenAffinityFunction(false, getTestIgniteInstanceName(2))); + + GridTestUtils.runAsync(new Callable() { + @Override public Object call() throws Exception { + GridTestUtils.assertThrows(log, new Callable() { + @Override public Object call() throws Exception { + g1.getOrCreateCache(cfg); + return null; + } + }, CacheException.class, null); + + return null; + } + }, "cache-starter-thread"); + + latch.await(); + + stopGrid(0, true); + + awaitPartitionMapExchange(); + + // Correct the cache configuration. + cfg.setAffinity(new RendezvousAffinityFunction()); + + IgniteCache cache = g1.getOrCreateCache(cfg); + + checkCacheOperations(g1, cache); + } + + /** + * Test the basic cache operations. + * + * @param cache Cache. + * @throws Exception If test failed. + */ + protected void checkCacheOperations(Ignite ignite, IgniteCache cache) throws Exception { + int cnt = 1000; + + // Check base cache operations. + for (int i = 0; i < cnt; ++i) + cache.put(i, i); + + for (int i = 0; i < cnt; ++i) { + Integer v = (Integer) cache.get(i); + + assertNotNull(v); + assertEquals(i, v.intValue()); + } + + // Check Data Streamer capabilities. + try (IgniteDataStreamer streamer = ignite.dataStreamer(cache.getName())) { + for (int i = 0; i < 10_000; ++i) + streamer.addData(i, i); + } + } + + /** + * Communication SPI which could optionally block outgoing messages. + */ + private static class CustomCommunicationSpi extends TcpCommunicationSpi { + /** + * Send message optionally either blocking it or throwing an exception if it is of + * {@link GridJobExecuteResponse} type. + * + * @param node Destination node. + * @param msg Message to be sent. + * @param ackClosure Ack closure. + * @throws org.apache.ignite.spi.IgniteSpiException If failed. + */ + @Override public void sendMessage(ClusterNode node, Message msg, IgniteInClosure ackClosure) + throws IgniteSpiException { + + if (msg instanceof GridIoMessage) { + GridIoMessage msg0 = (GridIoMessage)msg; + + if (msg0.message() instanceof GridDhtPartitionsSingleMessage) { + Boolean attr = (Boolean) node.attributes().get(COORDINATOR_ATTRIBUTE); + + GridDhtPartitionsSingleMessage singleMsg = (GridDhtPartitionsSingleMessage) msg0.message(); + + Exception err = singleMsg.getError(); + + if (Boolean.TRUE.equals(attr) && err != null) { + // skip message + latch.countDown(); + + return; + } + } + } + + super.sendMessage(node, msg, ackClosure); + } + } + + /** + * Affinity function that throws an exception when affinity nodes are calculated on the given node. + */ + public static class BrokenAffinityFunction extends RendezvousAffinityFunction { + /** */ + private static final long serialVersionUID = 0L; + + /** */ + @IgniteInstanceResource + private Ignite ignite; + + /** Exception should arise on all nodes. */ + private boolean eOnAllNodes = false; + + /** Exception should arise on node with certain name. */ + private String gridName; + + /** + * Default constructor. + */ + public BrokenAffinityFunction() { + // No-op. + } + + /** + * @param eOnAllNodes {@code True} if exception should be thrown on all nodes. + * @param gridName Exception should arise on node with certain name. + */ + public BrokenAffinityFunction(boolean eOnAllNodes, String gridName) { + this.eOnAllNodes = eOnAllNodes; + this.gridName = gridName; + } + + /** {@inheritDoc} */ + @Override public List> assignPartitions(AffinityFunctionContext affCtx) { + if (eOnAllNodes || ignite.name().equals(gridName)) + throw new IllegalStateException("Simulated exception [locNodeId=" + + ignite.cluster().localNode().id() + "]"); + else + return super.assignPartitions(affCtx); + } + } +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartNoExchangeTimeoutTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartNoExchangeTimeoutTest.java index c3e3e884cbc5d..8f28a3364ba88 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartNoExchangeTimeoutTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartNoExchangeTimeoutTest.java @@ -90,6 +90,7 @@ public class IgniteDynamicCacheStartNoExchangeTimeoutTest extends GridCommonAbst /** * @throws Exception If failed. */ + @Test public void testMultinodeCacheStart() throws Exception { for (int i = 0; i < 10; i++) { log.info("Iteration: " + i); @@ -121,6 +122,7 @@ public void testMultinodeCacheStart() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOldestNotAffinityNode1() throws Exception { for (CacheConfiguration ccfg : cacheConfigurations()) oldestNotAffinityNode1(ccfg); @@ -149,6 +151,7 @@ private void oldestNotAffinityNode1(final CacheConfiguration ccfg) throws Except /** * @throws Exception If failed. */ + @Test public void testOldestNotAffinityNode2() throws Exception { for (CacheConfiguration ccfg : cacheConfigurations()) oldestNotAffinityNode2(ccfg); @@ -180,6 +183,7 @@ private void oldestNotAffinityNode2(final CacheConfiguration ccfg) throws Except /** * @throws Exception If failed. */ + @Test public void testNotAffinityNode1() throws Exception { for (CacheConfiguration ccfg : cacheConfigurations()) notAffinityNode1(ccfg); @@ -208,6 +212,7 @@ private void notAffinityNode1(final CacheConfiguration ccfg) throws Exception { /** * @throws Exception If failed. */ + @Test public void testNotAffinityNode2() throws Exception { for (CacheConfiguration ccfg : cacheConfigurations()) notAffinityNode2(ccfg); @@ -239,6 +244,7 @@ private void notAffinityNode2(final CacheConfiguration ccfg) throws Exception { /** * @throws Exception If failed. */ + @Test public void testOldestChanged1() throws Exception { IgniteEx ignite0 = grid(0); @@ -266,6 +272,7 @@ public void testOldestChanged1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOldestChanged2() throws Exception { IgniteEx ignite0 = grid(0); @@ -291,6 +298,7 @@ public void testOldestChanged2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOldestChanged3() throws Exception { IgniteEx ignite0 = grid(0); @@ -476,4 +484,4 @@ private static class TestCommunicationSpi extends TcpCommunicationSpi { super.sendMessage(node, msg, ackClosure); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java index 53de23f90a602..281c986078bef 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java @@ -140,6 +140,7 @@ public int nodeCount() { /** * @throws Exception If failed. */ + @Test public void testStartStopCacheMultithreadedSameNode() throws Exception { final IgniteEx kernal = grid(0); @@ -206,6 +207,7 @@ public void testStartStopCacheMultithreadedSameNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStartCacheMultithreadedDifferentNodes() throws Exception { final Collection> futs = new ConcurrentLinkedDeque<>(); @@ -274,6 +276,7 @@ public void testStartCacheMultithreadedDifferentNodes() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStartStopCacheSimpleTransactional() throws Exception { checkStartStopCacheSimple(CacheAtomicityMode.TRANSACTIONAL); } @@ -281,6 +284,7 @@ public void testStartStopCacheSimpleTransactional() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStartStopCacheSimpleAtomic() throws Exception { checkStartStopCacheSimple(CacheAtomicityMode.ATOMIC); } @@ -288,6 +292,7 @@ public void testStartStopCacheSimpleAtomic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStartStopCachesSimpleTransactional() throws Exception { checkStartStopCachesSimple(CacheAtomicityMode.TRANSACTIONAL); } @@ -295,6 +300,7 @@ public void testStartStopCachesSimpleTransactional() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStartStopCachesSimpleAtomic() throws Exception { checkStartStopCachesSimple(CacheAtomicityMode.ATOMIC); } @@ -432,6 +438,7 @@ private void checkStartStopCachesSimple(CacheAtomicityMode mode) throws Exceptio /** * @throws Exception If failed. */ + @Test public void testStartStopCacheAddNode() throws Exception { final IgniteEx kernal = grid(0); @@ -484,6 +491,7 @@ public void testStartStopCacheAddNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeployFilter() throws Exception { try { testAttribute = false; @@ -550,6 +558,7 @@ public void testDeployFilter() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFailWhenConfiguredCacheExists() throws Exception { GridTestUtils.assertThrowsInherited(log, new Callable() { @Override public Object call() throws Exception { @@ -571,6 +580,7 @@ public void testFailWhenConfiguredCacheExists() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFailWhenOneOfConfiguredCacheExists() throws Exception { GridTestUtils.assertThrowsInherited(log, new Callable() { @Override public Object call() throws Exception { @@ -601,6 +611,7 @@ public void testFailWhenOneOfConfiguredCacheExists() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientCache() throws Exception { try { testAttribute = false; @@ -644,6 +655,7 @@ public void testClientCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStartFromClientNode() throws Exception { try { testAttribute = false; @@ -686,6 +698,7 @@ public void testStartFromClientNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStartNearCacheFromClientNode() throws Exception { try { testAttribute = false; @@ -731,6 +744,7 @@ public void testStartNearCacheFromClientNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testEvents() throws Exception { CacheConfiguration cfg = new CacheConfiguration(DEFAULT_CACHE_NAME); @@ -802,6 +816,7 @@ public void testEvents() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNearNodesCache() throws Exception { try { testAttribute = false; @@ -845,6 +860,7 @@ public void testNearNodesCache() throws Exception { } /** {@inheritDoc} */ + @Test public void testGetOrCreate() throws Exception { try { final CacheConfiguration cfg = new CacheConfiguration(DEFAULT_CACHE_NAME); @@ -906,6 +922,7 @@ public void testGetOrCreate() throws Exception { } /** {@inheritDoc} */ + @Test public void testGetOrCreateCollection() throws Exception { final int cacheCnt = 3; @@ -942,6 +959,7 @@ public void testGetOrCreateCollection() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetOrCreateMultiNode() throws Exception { try { final AtomicInteger cnt = new AtomicInteger(); @@ -984,6 +1002,7 @@ public void testGetOrCreateMultiNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetOrCreateMultiNodeTemplate() throws Exception { final AtomicInteger idx = new AtomicInteger(); @@ -1003,6 +1022,7 @@ public void testGetOrCreateMultiNodeTemplate() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetOrCreateNearOnlyMultiNode() throws Exception { checkGetOrCreateNear(true); } @@ -1010,6 +1030,7 @@ public void testGetOrCreateNearOnlyMultiNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetOrCreateNearMultiNode() throws Exception { checkGetOrCreateNear(false); } @@ -1131,6 +1152,7 @@ private void lightCheckDynamicCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testServerNodesLeftEvent() throws Exception { testAttribute = false; @@ -1185,6 +1207,7 @@ public void testServerNodesLeftEvent() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDaemonNode() throws Exception { daemon = true; @@ -1217,6 +1240,7 @@ public void testDaemonNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAwaitPartitionMapExchange() throws Exception { IgniteCache cache = grid(0).getOrCreateCache(new CacheConfiguration(DYNAMIC_CACHE_NAME)); @@ -1242,6 +1266,7 @@ public void testAwaitPartitionMapExchange() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStartStopWithClientJoin() throws Exception { Ignite ignite1 = ignite(1); @@ -1296,6 +1321,7 @@ public void testStartStopWithClientJoin() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStartStopSameCacheMultinode() throws Exception { final AtomicInteger idx = new AtomicInteger(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartStopConcurrentTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartStopConcurrentTest.java index 15d10fc5b60e6..60322d009f594 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartStopConcurrentTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartStopConcurrentTest.java @@ -59,6 +59,7 @@ public class IgniteDynamicCacheStartStopConcurrentTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + @Test public void testConcurrentStartStop() throws Exception { awaitPartitionMapExchange(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheWithConfigStartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheWithConfigStartSelfTest.java index ec6b82de7c6d0..ce6a72127ae61 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheWithConfigStartSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheWithConfigStartSelfTest.java @@ -70,6 +70,7 @@ private CacheConfiguration cacheConfiguration() { /** * @throws Exception If failed. */ + @Test public void testStartCacheOnClient() throws Exception { int srvCnt = 3; @@ -95,4 +96,4 @@ public void testStartCacheOnClient() throws Exception { stopAllGrids(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicClientCacheStartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicClientCacheStartSelfTest.java index 0cb08561521b0..b7b12ca8ee68c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicClientCacheStartSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicClientCacheStartSelfTest.java @@ -88,6 +88,7 @@ public class IgniteDynamicClientCacheStartSelfTest extends GridCommonAbstractTes /** * @throws Exception If failed. */ + @Test public void testConfiguredCacheOnClientNode() throws Exception { ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME); @@ -133,6 +134,7 @@ public void testConfiguredCacheOnClientNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNearCacheStartError() throws Exception { ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME); @@ -172,6 +174,7 @@ public void testNearCacheStartError() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReplicatedCacheClient() throws Exception { ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME); @@ -205,6 +208,7 @@ public void testReplicatedCacheClient() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReplicatedWithNearCacheClient() throws Exception { ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME); @@ -240,6 +244,7 @@ public void testReplicatedWithNearCacheClient() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCreateCloseClientCache1() throws Exception { Ignite ignite0 = startGrid(0); @@ -265,6 +270,7 @@ public void testCreateCloseClientCache1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCreateCloseClientCache2_1() throws Exception { createCloseClientCache2(false); } @@ -272,6 +278,7 @@ public void testCreateCloseClientCache2_1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCreateCloseClientCache2_2() throws Exception { createCloseClientCache2(true); } @@ -279,6 +286,7 @@ public void testCreateCloseClientCache2_2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStartMultipleClientCaches() throws Exception { startMultipleClientCaches(null); } @@ -286,6 +294,7 @@ public void testStartMultipleClientCaches() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStartMultipleClientCachesForGroup() throws Exception { startMultipleClientCaches("testGrp"); } @@ -377,6 +386,7 @@ private void startCachesForGroup(Ignite srv, * @throws Exception If failed. */ @SuppressWarnings("unchecked") + @Test public void testStartNewAndClientCaches() throws Exception { final int SRVS = 4; @@ -551,6 +561,7 @@ private void checkNoCache(Ignite ignite, final String cacheName) throws Exceptio /** * @throws Exception If failed. */ + @Test public void testStartClientCachesOnCoordinatorWithGroup() throws Exception { startGrids(3); @@ -598,4 +609,4 @@ public CachePredicate(List excludeNodes) { return !excludeNodes.contains(name); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteExchangeFutureHistoryTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteExchangeFutureHistoryTest.java index a5930c992935e..e4dbc4a823bb2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteExchangeFutureHistoryTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteExchangeFutureHistoryTest.java @@ -55,6 +55,7 @@ public class IgniteExchangeFutureHistoryTest extends IgniteCacheAbstractTest { * * @throws Exception If failed. */ + @Test public void testExchangeFutures() throws Exception { GridCachePartitionExchangeManager mgr = ((IgniteKernal)grid(0)).internalCache(DEFAULT_CACHE_NAME).context().shared().exchange(); @@ -71,4 +72,4 @@ public void testExchangeFutures() throws Exception { assertEquals(futs.get(j), sortedFuts.get(j)); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteGetNonPlainKeyReadThroughSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteGetNonPlainKeyReadThroughSelfTest.java index 21b09fca243cd..b05aed48f6239 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteGetNonPlainKeyReadThroughSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteGetNonPlainKeyReadThroughSelfTest.java @@ -113,6 +113,7 @@ public Store(boolean nullVal) { /** * @throws Exception If failed. */ + @Test public void testGetNullRead() throws Exception { storeFactory = new StoreFactory(true); @@ -122,6 +123,7 @@ public void testGetNullRead() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetValueRead() throws Exception { storeFactory = new StoreFactory(false); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteIncompleteCacheObjectSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteIncompleteCacheObjectSelfTest.java index 5b6d7f3b95c29..442ca48fd7a95 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteIncompleteCacheObjectSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteIncompleteCacheObjectSelfTest.java @@ -36,6 +36,7 @@ public class IgniteIncompleteCacheObjectSelfTest extends GridCommonAbstractTest * * @throws Exception If failed. */ + @Test public void testIncompleteObject() throws Exception { final byte[] data = new byte[1024]; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteInternalCacheTypesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteInternalCacheTypesTest.java index 7f3807e63bd69..eb917886457d7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteInternalCacheTypesTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteInternalCacheTypesTest.java @@ -65,6 +65,7 @@ public class IgniteInternalCacheTypesTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCacheTypes() throws Exception { Ignite ignite0 = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheClassNameConflictTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheClassNameConflictTest.java index b3e0e454eb321..97689d3d08b5b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheClassNameConflictTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheClassNameConflictTest.java @@ -104,6 +104,7 @@ public class IgniteMarshallerCacheClassNameConflictTest extends GridCommonAbstra /** * @throws Exception If failed. */ + @Test public void testCachePutGetClassesWithNameConflict() throws Exception { Ignite srv1 = startGrid(0); Ignite srv2 = startGrid(1); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheClientRequestsMappingOnMissTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheClientRequestsMappingOnMissTest.java index 057b97005b081..8bf129146a0af 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheClientRequestsMappingOnMissTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheClientRequestsMappingOnMissTest.java @@ -114,6 +114,7 @@ private void cleanupMarshallerFileStore() throws IOException { /** * @throws Exception If failed. */ + @Test public void testRequestedMappingIsStoredInFS() throws Exception { Ignite srv1 = startGrid(0); @@ -151,6 +152,7 @@ public void testRequestedMappingIsStoredInFS() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNoNodesDieOnRequest() throws Exception { Ignite srv1 = startGrid(0); @@ -181,6 +183,7 @@ public void testNoNodesDieOnRequest() throws Exception { /** * */ + @Test public void testOneNodeDiesOnRequest() throws Exception { CountDownLatch nodeStopLatch = new CountDownLatch(1); @@ -216,6 +219,7 @@ public void testOneNodeDiesOnRequest() throws Exception { /** * */ + @Test public void testTwoNodesDieOnRequest() throws Exception { CountDownLatch nodeStopLatch = new CountDownLatch(2); @@ -252,6 +256,7 @@ public void testTwoNodesDieOnRequest() throws Exception { /** * */ + @Test public void testAllNodesDieOnRequest() throws Exception { CountDownLatch nodeStopLatch = new CountDownLatch(3); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheConcurrentReadWriteTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheConcurrentReadWriteTest.java index 4e477f2c96b1b..8afaa0377b2bc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheConcurrentReadWriteTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheConcurrentReadWriteTest.java @@ -75,6 +75,7 @@ public class IgniteMarshallerCacheConcurrentReadWriteTest extends GridCommonAbst /** * @throws Exception If failed. */ + @Test public void testConcurrentReadWrite() throws Exception { Ignite ignite = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheFSRestoreTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheFSRestoreTest.java index 47c01dc47f212..cd407694e4036 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheFSRestoreTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheFSRestoreTest.java @@ -128,6 +128,7 @@ private void cleanUpWorkDir() throws Exception { * * This test must never hang on proposing of MarshallerMapping. */ + @Test public void testFileMappingReadAndPropose() throws Exception { isPersistenceEnabled = false; @@ -185,6 +186,7 @@ private void prepareMarshallerFileStore() throws Exception { * @see IGNITE-6536 JIRA provides more information * about this case. */ + @Test public void testNodeStartFailsOnCorruptedStorage() throws Exception { isPersistenceEnabled = true; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMvccTxMultiThreadedAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMvccTxMultiThreadedAbstractTest.java index 9e4609b081084..13c6c5e0ad2d0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMvccTxMultiThreadedAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMvccTxMultiThreadedAbstractTest.java @@ -49,6 +49,7 @@ public abstract class IgniteMvccTxMultiThreadedAbstractTest extends IgniteTxAbst /** * @throws IgniteCheckedException If test failed. */ + @Test public void testPessimisticRepeatableReadCommitMultithreaded() throws Exception { checkCommitMultithreaded(PESSIMISTIC, REPEATABLE_READ); @@ -58,6 +59,7 @@ public void testPessimisticRepeatableReadCommitMultithreaded() throws Exception /** * @throws IgniteCheckedException If test failed. */ + @Test public void testPessimisticRepeatableReadRollbackMultithreaded() throws Exception { checkRollbackMultithreaded(PESSIMISTIC, REPEATABLE_READ); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMvccTxSingleThreadedAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMvccTxSingleThreadedAbstractTest.java index b9e7cee2547e0..eef8d6aeafe0b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMvccTxSingleThreadedAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMvccTxSingleThreadedAbstractTest.java @@ -29,6 +29,7 @@ public abstract class IgniteMvccTxSingleThreadedAbstractTest extends IgniteTxAbs /** * @throws IgniteCheckedException If test failed. */ + @Test public void testPessimisticRepeatableReadCommit() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10261"); @@ -40,6 +41,7 @@ public void testPessimisticRepeatableReadCommit() throws Exception { /** * @throws IgniteCheckedException If test failed. */ + @Test public void testPessimisticRepeatableReadRollback() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10261"); @@ -47,4 +49,4 @@ public void testPessimisticRepeatableReadRollback() throws Exception { finalChecks(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteNearClientCacheCloseTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteNearClientCacheCloseTest.java index 0ca0f3ed8db48..beac7de0183ed 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteNearClientCacheCloseTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteNearClientCacheCloseTest.java @@ -76,6 +76,7 @@ public class IgniteNearClientCacheCloseTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testNearCacheCloseAtomic1() throws Exception { nearCacheClose(1, false, ATOMIC); @@ -85,6 +86,7 @@ public void testNearCacheCloseAtomic1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNearCacheCloseAtomic2() throws Exception { nearCacheClose(4, false, ATOMIC); @@ -94,6 +96,7 @@ public void testNearCacheCloseAtomic2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNearCacheCloseTx1() throws Exception { nearCacheClose(1, false, TRANSACTIONAL); @@ -103,6 +106,7 @@ public void testNearCacheCloseTx1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNearCacheCloseTx2() throws Exception { nearCacheClose(4, false, TRANSACTIONAL); @@ -112,6 +116,7 @@ public void testNearCacheCloseTx2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNearCacheCloseMvccTx1() throws Exception { nearCacheClose(1, false, TRANSACTIONAL_SNAPSHOT); @@ -122,6 +127,7 @@ public void testNearCacheCloseMvccTx1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNearCacheCloseMvccTx2() throws Exception { nearCacheClose(4, false, TRANSACTIONAL_SNAPSHOT); @@ -184,6 +190,7 @@ private void nearCacheClose(int srvs, boolean srvNearCache, CacheAtomicityMode a /** * @throws Exception If failed. */ + @Test public void testConcurrentUpdateAndNearCacheClose() throws Exception { final int SRVS = 4; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteOnePhaseCommitInvokeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteOnePhaseCommitInvokeTest.java index 423d257a3748d..ddd1d83c249ff 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteOnePhaseCommitInvokeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteOnePhaseCommitInvokeTest.java @@ -90,6 +90,7 @@ public class IgniteOnePhaseCommitInvokeTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testOnePhaseInvoke() throws Exception { boolean flags[] = {true, false}; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteOnePhaseCommitNearReadersTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteOnePhaseCommitNearReadersTest.java index f796ceace8a3e..26d07076ca56d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteOnePhaseCommitNearReadersTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteOnePhaseCommitNearReadersTest.java @@ -80,6 +80,7 @@ public class IgniteOnePhaseCommitNearReadersTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testPutReadersUpdate1() throws Exception { putReadersUpdate(1); } @@ -87,6 +88,7 @@ public void testPutReadersUpdate1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutReadersUpdate2() throws Exception { putReadersUpdate(0); } @@ -145,6 +147,7 @@ private void putReadersUpdate(int backups) throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutReaderUpdatePrimaryFails1() throws Exception { putReaderUpdatePrimaryFails(1); } @@ -152,6 +155,7 @@ public void testPutReaderUpdatePrimaryFails1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutReaderUpdatePrimaryFails2() throws Exception { putReaderUpdatePrimaryFails(0); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteOnePhaseCommitNearSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteOnePhaseCommitNearSelfTest.java index 55323bb64501d..f29c27907af25 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteOnePhaseCommitNearSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteOnePhaseCommitNearSelfTest.java @@ -88,6 +88,7 @@ protected CacheConfiguration cacheConfiguration(String igniteInstanceName) { /** * @throws Exception If failed. */ + @Test public void testOnePhaseCommitFromNearNode() throws Exception { backups = 1; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteOutOfMemoryPropagationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteOutOfMemoryPropagationTest.java index e1f94204b4b57..f844170b169d0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteOutOfMemoryPropagationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteOutOfMemoryPropagationTest.java @@ -66,11 +66,13 @@ public class IgniteOutOfMemoryPropagationTest extends GridCommonAbstractTest { } /** */ + @Test public void testPutOOMPropagation() throws Exception { testOOMPropagation(false); } /** */ + @Test public void testStreamerOOMPropagation() throws Exception { testOOMPropagation(true); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgnitePutAllLargeBatchSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgnitePutAllLargeBatchSelfTest.java index 56a438107c40f..e1297371c6dc5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgnitePutAllLargeBatchSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgnitePutAllLargeBatchSelfTest.java @@ -79,6 +79,7 @@ public CacheConfiguration cacheConfiguration(String igniteInstanceName) { /** * @throws Exception If failed. */ + @Test public void testPutAllPessimisticOneBackupPartitioned() throws Exception { backups = 1; @@ -88,6 +89,7 @@ public void testPutAllPessimisticOneBackupPartitioned() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAllPessimisticOneBackupNear() throws Exception { backups = 1; @@ -97,6 +99,7 @@ public void testPutAllPessimisticOneBackupNear() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAllOptimisticOneBackupPartitioned() throws Exception { backups = 1; @@ -106,6 +109,7 @@ public void testPutAllOptimisticOneBackupPartitioned() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAllOptimisticOneBackupNear() throws Exception { backups = 1; @@ -115,6 +119,7 @@ public void testPutAllOptimisticOneBackupNear() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAllPessimisticTwoBackupsPartitioned() throws Exception { backups = 2; @@ -124,6 +129,7 @@ public void testPutAllPessimisticTwoBackupsPartitioned() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAllPessimisticTwoBackupsNear() throws Exception { backups = 2; @@ -133,6 +139,7 @@ public void testPutAllPessimisticTwoBackupsNear() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAllOptimisticTwoBackupsPartitioned() throws Exception { backups = 2; @@ -142,6 +149,7 @@ public void testPutAllOptimisticTwoBackupsPartitioned() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAllOptimisticTwoBackupsNear() throws Exception { backups = 2; @@ -236,6 +244,7 @@ private void checkPutAll(TransactionConcurrency concurrency, boolean nearEnabled /** * @throws Exception If failed. */ + @Test public void testPreviousValuePartitionedOneBackup() throws Exception { backups = 1; nearEnabled = false; @@ -246,6 +255,7 @@ public void testPreviousValuePartitionedOneBackup() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPreviousValuePartitionedTwoBackups() throws Exception { backups = 2; nearEnabled = false; @@ -256,6 +266,7 @@ public void testPreviousValuePartitionedTwoBackups() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPreviousValueNearOneBackup() throws Exception { backups = 1; nearEnabled = true; @@ -266,6 +277,7 @@ public void testPreviousValueNearOneBackup() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPreviousValueNearTwoBackups() throws Exception { backups = 2; nearEnabled = true; @@ -304,4 +316,4 @@ private void checkPreviousValue() throws Exception { stopAllGrids(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgnitePutAllUpdateNonPreloadedPartitionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgnitePutAllUpdateNonPreloadedPartitionSelfTest.java index 2503e219455e7..aff53effb8013 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgnitePutAllUpdateNonPreloadedPartitionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgnitePutAllUpdateNonPreloadedPartitionSelfTest.java @@ -70,6 +70,7 @@ public CacheConfiguration cacheConfiguration(String igniteInstanceName) { /** * @throws Exception If failed. */ + @Test public void testPessimistic() throws Exception { backups = 2; @@ -129,4 +130,4 @@ public void testPessimistic() throws Exception { stopAllGrids(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteStartCacheInTransactionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteStartCacheInTransactionSelfTest.java index b037a7b8ef6a8..cfa3de74e8786 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteStartCacheInTransactionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteStartCacheInTransactionSelfTest.java @@ -90,6 +90,7 @@ public CacheConfiguration cacheConfiguration(String cacheName) { /** * @throws Exception If failed. */ + @Test public void testStartCache() throws Exception { final Ignite ignite = grid(0); @@ -116,6 +117,7 @@ public void testStartCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStartConfigurationCache() throws Exception { final Ignite ignite = grid(0); @@ -142,6 +144,7 @@ public void testStartConfigurationCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStartConfigurationCacheWithNear() throws Exception { final Ignite ignite = grid(0); @@ -168,6 +171,7 @@ public void testStartConfigurationCacheWithNear() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetOrCreateCache() throws Exception { final Ignite ignite = grid(0); @@ -194,6 +198,7 @@ public void testGetOrCreateCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetOrCreateCacheConfiguration() throws Exception { final Ignite ignite = grid(0); @@ -220,6 +225,7 @@ public void testGetOrCreateCacheConfiguration() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStopCache() throws Exception { final Ignite ignite = grid(0); @@ -246,6 +252,7 @@ public void testStopCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLockCache() throws Exception { if (atomicityMode() != TRANSACTIONAL) return; @@ -268,4 +275,4 @@ public void testLockCache() throws Exception { lock.unlock(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteStaticCacheStartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteStaticCacheStartSelfTest.java index 0c64a79a81c2a..b2e8df80ee7fd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteStaticCacheStartSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteStaticCacheStartSelfTest.java @@ -58,6 +58,7 @@ public class IgniteStaticCacheStartSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testDeployCacheOnNodeStart() throws Exception { startGrids(3); @@ -99,4 +100,4 @@ public void testDeployCacheOnNodeStart() throws Exception { stopAllGrids(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteSystemCacheOnClientTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteSystemCacheOnClientTest.java index 9c864e6d66100..70c866a6bdf8f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteSystemCacheOnClientTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteSystemCacheOnClientTest.java @@ -49,6 +49,7 @@ public class IgniteSystemCacheOnClientTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testSystemCacheOnClientNode() throws Exception { startGrids(2); @@ -63,4 +64,4 @@ public void testSystemCacheOnClientNode() throws Exception { assertEquals(1, affNodes.size()); assertTrue(affNodes.contains(ignite(0).cluster().localNode())); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorAbstractCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorAbstractCacheTest.java index bb61632f1c54e..e8bd55770c422 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorAbstractCacheTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorAbstractCacheTest.java @@ -240,6 +240,7 @@ void assertEmpty(String cacheName) { /** * @throws Exception If failed. */ + @Test public void testTopologyValidator() throws Exception { putValid(DEFAULT_CACHE_NAME); remove(DEFAULT_CACHE_NAME); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorAbstractTxCacheGroupsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorAbstractTxCacheGroupsTest.java index 07875350886e8..73e297660ac3f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorAbstractTxCacheGroupsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorAbstractTxCacheGroupsTest.java @@ -42,7 +42,8 @@ public abstract class IgniteTopologyValidatorAbstractTxCacheGroupsTest } /** {@inheritDoc} */ - @Override public void testTopologyValidator() throws Exception { + @Override @Test + public void testTopologyValidator() throws Exception { try (Transaction tx = grid(0).transactions().txStart(OPTIMISTIC, REPEATABLE_READ)) { putValid(CACHE_NAME_1); putValid(CACHE_NAME_3); @@ -123,4 +124,4 @@ public abstract class IgniteTopologyValidatorAbstractTxCacheGroupsTest remove(DEFAULT_CACHE_NAME); remove(CACHE_NAME_3); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorAbstractTxCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorAbstractTxCacheTest.java index 781d88de40134..adaa64b1c607f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorAbstractTxCacheTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorAbstractTxCacheTest.java @@ -41,7 +41,8 @@ public abstract class IgniteTopologyValidatorAbstractTxCacheTest extends IgniteT } /** {@inheritDoc} */ - @Override public void testTopologyValidator() throws Exception { + @Override @Test + public void testTopologyValidator() throws Exception { try (Transaction tx = grid(0).transactions().txStart(OPTIMISTIC, REPEATABLE_READ)) { putValid(CACHE_NAME_1); commitFailed(tx); @@ -123,4 +124,4 @@ public abstract class IgniteTopologyValidatorAbstractTxCacheTest extends IgniteT remove(DEFAULT_CACHE_NAME); remove(CACHE_NAME_2); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorCacheGroupsAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorCacheGroupsAbstractTest.java index 8613225d5fc42..7879f912fc4a3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorCacheGroupsAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorCacheGroupsAbstractTest.java @@ -79,7 +79,8 @@ public abstract class IgniteTopologyValidatorCacheGroupsAbstractTest extends Ign /** * @throws Exception If failed. */ - @Override public void testTopologyValidator() throws Exception { + @Override @Test + public void testTopologyValidator() throws Exception { putValid(DEFAULT_CACHE_NAME); remove(DEFAULT_CACHE_NAME); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorGridSplitCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorGridSplitCacheTest.java index c315ba50f4707..7eef27642c9ef 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorGridSplitCacheTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorGridSplitCacheTest.java @@ -220,6 +220,7 @@ protected void stopGrids(int... grids) { * * @throws Exception If failed. */ + @Test public void testTopologyValidator() throws Exception { testTopologyValidator0(false); } @@ -229,6 +230,7 @@ public void testTopologyValidator() throws Exception { * * @throws Exception If failed. */ + @Test public void testTopologyValidatorWithCacheGroup() throws Exception { testTopologyValidator0(true); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxConcurrentGetAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxConcurrentGetAbstractTest.java index 5fb076633da19..6b1e623637cee 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxConcurrentGetAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxConcurrentGetAbstractTest.java @@ -88,6 +88,7 @@ GridDhtCacheAdapter dht(Ignite g) { * * @throws Exception If failed. */ + @Test public void testPutGet() throws Exception { // Random key. final String key = UUID.randomUUID().toString(); @@ -138,4 +139,4 @@ private String txGet(Ignite ignite, String key) throws Exception { return val; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxConfigCacheSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxConfigCacheSelfTest.java index 680381a21d799..2582edcb74c48 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxConfigCacheSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxConfigCacheSelfTest.java @@ -108,6 +108,7 @@ public CacheAtomicityMode atomicityMode() { * * @throws Exception If failed. */ + @Test public void testUserTxTimeout() throws Exception { final Ignite ignite = grid(0); @@ -122,6 +123,7 @@ public void testUserTxTimeout() throws Exception { * * @throws Exception If failed. */ + @Test public void testSystemCacheTx() throws Exception { final Ignite ignite = grid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxExceptionAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxExceptionAbstractSelfTest.java index ac294b05067fb..ad28b7d08eb31 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxExceptionAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxExceptionAbstractSelfTest.java @@ -131,6 +131,7 @@ public abstract class IgniteTxExceptionAbstractSelfTest extends GridCacheAbstrac /** * @throws Exception If failed. */ + @Test public void testPutNear() throws Exception { checkPut(true, keyForNode(grid(0).localNode(), NOT_PRIMARY_AND_BACKUP)); @@ -140,6 +141,7 @@ public void testPutNear() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutPrimary() throws Exception { checkPut(true, keyForNode(grid(0).localNode(), PRIMARY)); @@ -149,6 +151,7 @@ public void testPutPrimary() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutBackup() throws Exception { checkPut(true, keyForNode(grid(0).localNode(), BACKUP)); @@ -158,6 +161,7 @@ public void testPutBackup() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAll() throws Exception { checkPutAll(true, keyForNode(grid(0).localNode(), PRIMARY), keyForNode(grid(0).localNode(), PRIMARY), @@ -181,6 +185,7 @@ public void testPutAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemoveNear() throws Exception { checkRemove(false, keyForNode(grid(0).localNode(), NOT_PRIMARY_AND_BACKUP)); @@ -190,6 +195,7 @@ public void testRemoveNear() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemovePrimary() throws Exception { checkRemove(false, keyForNode(grid(0).localNode(), PRIMARY)); @@ -199,6 +205,7 @@ public void testRemovePrimary() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemoveBackup() throws Exception { checkRemove(false, keyForNode(grid(0).localNode(), BACKUP)); @@ -208,6 +215,7 @@ public void testRemoveBackup() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTransformNear() throws Exception { checkTransform(false, keyForNode(grid(0).localNode(), NOT_PRIMARY_AND_BACKUP)); @@ -217,6 +225,7 @@ public void testTransformNear() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTransformPrimary() throws Exception { checkTransform(false, keyForNode(grid(0).localNode(), PRIMARY)); @@ -226,6 +235,7 @@ public void testTransformPrimary() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTransformBackup() throws Exception { checkTransform(false, keyForNode(grid(0).localNode(), BACKUP)); @@ -235,6 +245,7 @@ public void testTransformBackup() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutNearTx() throws Exception { for (TransactionConcurrency concurrency : TransactionConcurrency.values()) { for (TransactionIsolation isolation : TransactionIsolation.values()) { @@ -248,6 +259,7 @@ public void testPutNearTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutPrimaryTx() throws Exception { for (TransactionConcurrency concurrency : TransactionConcurrency.values()) { for (TransactionIsolation isolation : TransactionIsolation.values()) { @@ -261,6 +273,7 @@ public void testPutPrimaryTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutBackupTx() throws Exception { for (TransactionConcurrency concurrency : TransactionConcurrency.values()) { for (TransactionIsolation isolation : TransactionIsolation.values()) { @@ -274,6 +287,7 @@ public void testPutBackupTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutMultipleKeysTx() throws Exception { for (TransactionConcurrency concurrency : TransactionConcurrency.values()) { for (TransactionIsolation isolation : TransactionIsolation.values()) { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiNodeAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiNodeAbstractTest.java index 7c921547af85c..1e81e4e16c742 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiNodeAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiNodeAbstractTest.java @@ -489,6 +489,7 @@ private void removeRetriesSimple(Ignite ignite, boolean putCntr) { * * @throws Exception If failed. */ + @Test public void testPutOneEntryInTx() throws Exception { // resetLog4j(Level.INFO, true, GridCacheTxManager.class.getName()); @@ -509,6 +510,7 @@ public void testPutOneEntryInTx() throws Exception { * * @throws Exception If failed. */ + @Test public void testPutTwoEntriesInTx() throws Exception { // resetLog4j(Level.INFO, true, GridCacheTxManager.class.getName()); @@ -533,6 +535,7 @@ public void testPutTwoEntriesInTx() throws Exception { * * @throws Exception If failed. */ + @Test public void testPutOneEntryInTxMultiThreaded() throws Exception { // resetLog4j(Level.INFO, true, GridCacheTxManager.class.getName()); @@ -572,6 +575,7 @@ public void testPutOneEntryInTxMultiThreaded() throws Exception { * * @throws Exception If failed. */ + @Test public void testPutTwoEntryInTxMultiThreaded() throws Exception { // resetLog4j(Level.INFO, true, GridCacheTxManager.class.getName()); @@ -612,6 +616,7 @@ public void testPutTwoEntryInTxMultiThreaded() throws Exception { * * @throws Exception If failed. */ + @Test public void testRemoveInTxQueried() throws Exception { //resetLog4j(Level.INFO, true, GridCacheTxManager.class.getPackage().getName()); @@ -654,6 +659,7 @@ public void testRemoveInTxQueried() throws Exception { * * @throws Exception If failed. */ + @Test public void testRemoveInTxSimple() throws Exception { startGrids(GRID_CNT); @@ -700,6 +706,7 @@ public void testRemoveInTxSimple() throws Exception { * * @throws Exception If failed. */ + @Test public void testRemoveInTxQueriedMultiThreaded() throws Exception { //resetLog4j(Level.INFO, true, GridCacheTxManager.class.getPackage().getName()); @@ -896,4 +903,4 @@ protected class RemoveInTxJobSimple implements IgniteCallable { return S.toString(RemoveInTxJobSimple.class, this); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiThreadedAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiThreadedAbstractTest.java index 65dc2e7a56ca5..482cb8ba80d93 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiThreadedAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiThreadedAbstractTest.java @@ -108,6 +108,7 @@ protected void checkRollbackMultithreaded(final TransactionConcurrency concurren /** * @throws IgniteCheckedException If test failed. */ + @Test public void testPessimisticReadCommittedCommitMultithreaded() throws Exception { checkCommitMultithreaded(PESSIMISTIC, READ_COMMITTED); @@ -117,6 +118,7 @@ public void testPessimisticReadCommittedCommitMultithreaded() throws Exception { /** * @throws IgniteCheckedException If test failed. */ + @Test public void testPessimisticRepeatableReadCommitMultithreaded() throws Exception { checkCommitMultithreaded(PESSIMISTIC, REPEATABLE_READ); @@ -126,6 +128,7 @@ public void testPessimisticRepeatableReadCommitMultithreaded() throws Exception /** * @throws IgniteCheckedException If test failed. */ + @Test public void testPessimisticSerializableCommitMultithreaded() throws Exception { checkCommitMultithreaded(PESSIMISTIC, SERIALIZABLE); @@ -135,6 +138,7 @@ public void testPessimisticSerializableCommitMultithreaded() throws Exception { /** * @throws IgniteCheckedException If test failed. */ + @Test public void testOptimisticReadCommittedCommitMultithreaded() throws Exception { checkCommitMultithreaded(OPTIMISTIC, READ_COMMITTED); @@ -144,6 +148,7 @@ public void testOptimisticReadCommittedCommitMultithreaded() throws Exception { /** * @throws IgniteCheckedException If test failed. */ + @Test public void testOptimisticRepeatableReadCommitMultithreaded() throws Exception { checkCommitMultithreaded(OPTIMISTIC, REPEATABLE_READ); @@ -153,6 +158,7 @@ public void testOptimisticRepeatableReadCommitMultithreaded() throws Exception { /** * @throws IgniteCheckedException If test failed. */ + @Test public void testOptimisticSerializableCommitMultithreaded() throws Exception { checkCommitMultithreaded(OPTIMISTIC, SERIALIZABLE); @@ -162,6 +168,7 @@ public void testOptimisticSerializableCommitMultithreaded() throws Exception { /** * @throws IgniteCheckedException If test failed. */ + @Test public void testPessimisticReadCommittedRollbackMultithreaded() throws Exception { checkRollbackMultithreaded(PESSIMISTIC, READ_COMMITTED); @@ -171,6 +178,7 @@ public void testPessimisticReadCommittedRollbackMultithreaded() throws Exception /** * @throws IgniteCheckedException If test failed. */ + @Test public void testPessimisticRepeatableReadRollbackMultithreaded() throws Exception { checkRollbackMultithreaded(PESSIMISTIC, REPEATABLE_READ); @@ -180,6 +188,7 @@ public void testPessimisticRepeatableReadRollbackMultithreaded() throws Exceptio /** * @throws IgniteCheckedException If test failed. */ + @Test public void testPessimisticSerializableRollbackMultithreaded() throws Exception { checkRollbackMultithreaded(PESSIMISTIC, SERIALIZABLE); @@ -189,6 +198,7 @@ public void testPessimisticSerializableRollbackMultithreaded() throws Exception /** * @throws IgniteCheckedException If test failed. */ + @Test public void testOptimisticReadCommittedRollbackMultithreaded() throws Exception { checkRollbackMultithreaded(OPTIMISTIC, READ_COMMITTED); @@ -198,6 +208,7 @@ public void testOptimisticReadCommittedRollbackMultithreaded() throws Exception /** * @throws IgniteCheckedException If test failed. */ + @Test public void testOptimisticRepeatableReadRollbackMultithreaded() throws Exception { checkRollbackMultithreaded(OPTIMISTIC, REPEATABLE_READ); @@ -207,6 +218,7 @@ public void testOptimisticRepeatableReadRollbackMultithreaded() throws Exception /** * @throws IgniteCheckedException If test failed. */ + @Test public void testOptimisticSerializableRollbackMultithreaded() throws Exception { checkRollbackMultithreaded(OPTIMISTIC, SERIALIZABLE); @@ -216,6 +228,7 @@ public void testOptimisticSerializableRollbackMultithreaded() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOptimisticSerializableConsistency() throws Exception { final IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxReentryAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxReentryAbstractSelfTest.java index 39066a24a24b2..32e721aa68d41 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxReentryAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxReentryAbstractSelfTest.java @@ -98,6 +98,7 @@ public abstract class IgniteTxReentryAbstractSelfTest extends GridCommonAbstract } /** @throws Exception If failed. */ + @Test public void testLockReentry() throws Exception { startGridsMultiThreaded(gridCount(), true); @@ -180,4 +181,4 @@ public int dhtLocks() { return dhtLocks.get(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxSingleThreadedAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxSingleThreadedAbstractTest.java index f2cdecef4283c..c49be2bafbb71 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxSingleThreadedAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxSingleThreadedAbstractTest.java @@ -32,6 +32,7 @@ public abstract class IgniteTxSingleThreadedAbstractTest extends IgniteTxAbstrac /** * @throws IgniteCheckedException If test failed. */ + @Test public void testPessimisticReadCommittedCommit() throws Exception { checkCommit(PESSIMISTIC, READ_COMMITTED); @@ -41,6 +42,7 @@ public void testPessimisticReadCommittedCommit() throws Exception { /** * @throws IgniteCheckedException If test failed. */ + @Test public void testPessimisticRepeatableReadCommit() throws Exception { checkCommit(PESSIMISTIC, REPEATABLE_READ); @@ -50,6 +52,7 @@ public void testPessimisticRepeatableReadCommit() throws Exception { /** * @throws IgniteCheckedException If test failed. */ + @Test public void testPessimisticSerializableCommit() throws Exception { checkCommit(PESSIMISTIC, SERIALIZABLE); @@ -59,6 +62,7 @@ public void testPessimisticSerializableCommit() throws Exception { /** * @throws IgniteCheckedException If test failed. */ + @Test public void testOptimisticReadCommittedCommit() throws Exception { checkCommit(OPTIMISTIC, READ_COMMITTED); @@ -68,6 +72,7 @@ public void testOptimisticReadCommittedCommit() throws Exception { /** * @throws IgniteCheckedException If test failed. */ + @Test public void testOptimisticRepeatableReadCommit() throws Exception { checkCommit(OPTIMISTIC, REPEATABLE_READ); @@ -77,6 +82,7 @@ public void testOptimisticRepeatableReadCommit() throws Exception { /** * @throws IgniteCheckedException If test failed. */ + @Test public void testOptimisticSerializableCommit() throws Exception { checkCommit(OPTIMISTIC, SERIALIZABLE); @@ -86,6 +92,7 @@ public void testOptimisticSerializableCommit() throws Exception { /** * @throws IgniteCheckedException If test failed. */ + @Test public void testPessimisticReadCommittedRollback() throws Exception { checkRollback(PESSIMISTIC, READ_COMMITTED); @@ -95,6 +102,7 @@ public void testPessimisticReadCommittedRollback() throws Exception { /** * @throws IgniteCheckedException If test failed. */ + @Test public void testPessimisticRepeatableReadRollback() throws Exception { checkRollback(PESSIMISTIC, REPEATABLE_READ); @@ -104,6 +112,7 @@ public void testPessimisticRepeatableReadRollback() throws Exception { /** * @throws IgniteCheckedException If test failed. */ + @Test public void testPessimisticSerializableRollback() throws Exception { checkRollback(PESSIMISTIC, SERIALIZABLE); @@ -113,6 +122,7 @@ public void testPessimisticSerializableRollback() throws Exception { /** * @throws IgniteCheckedException If test failed. */ + @Test public void testOptimisticReadCommittedRollback() throws Exception { checkRollback(OPTIMISTIC, READ_COMMITTED); @@ -122,6 +132,7 @@ public void testOptimisticReadCommittedRollback() throws Exception { /** * @throws IgniteCheckedException If test failed. */ + @Test public void testOptimisticRepeatableReadRollback() throws Exception { checkRollback(OPTIMISTIC, REPEATABLE_READ); @@ -131,9 +142,10 @@ public void testOptimisticRepeatableReadRollback() throws Exception { /** * @throws IgniteCheckedException If test failed. */ + @Test public void testOptimisticSerializableRollback() throws Exception { checkRollback(OPTIMISTIC, SERIALIZABLE); finalChecks(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxStoreExceptionAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxStoreExceptionAbstractSelfTest.java index 863ab38ad74ea..ca00907f3ee45 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxStoreExceptionAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxStoreExceptionAbstractSelfTest.java @@ -118,6 +118,7 @@ public abstract class IgniteTxStoreExceptionAbstractSelfTest extends GridCacheAb /** * @throws Exception If failed. */ + @Test public void testPutNear() throws Exception { checkPut(true, keyForNode(grid(0).localNode(), NOT_PRIMARY_AND_BACKUP)); @@ -127,6 +128,7 @@ public void testPutNear() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutPrimary() throws Exception { checkPut(true, keyForNode(grid(0).localNode(), PRIMARY)); @@ -136,6 +138,7 @@ public void testPutPrimary() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutBackup() throws Exception { checkPut(true, keyForNode(grid(0).localNode(), BACKUP)); @@ -145,6 +148,7 @@ public void testPutBackup() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAll() throws Exception { checkPutAll(true, keyForNode(grid(0).localNode(), PRIMARY), keyForNode(grid(0).localNode(), PRIMARY), @@ -168,6 +172,7 @@ public void testPutAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemoveNear() throws Exception { checkRemove(false, keyForNode(grid(0).localNode(), NOT_PRIMARY_AND_BACKUP)); @@ -177,6 +182,7 @@ public void testRemoveNear() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemovePrimary() throws Exception { checkRemove(false, keyForNode(grid(0).localNode(), PRIMARY)); @@ -186,6 +192,7 @@ public void testRemovePrimary() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemoveBackup() throws Exception { checkRemove(false, keyForNode(grid(0).localNode(), BACKUP)); @@ -195,6 +202,7 @@ public void testRemoveBackup() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTransformNear() throws Exception { checkTransform(false, keyForNode(grid(0).localNode(), NOT_PRIMARY_AND_BACKUP)); @@ -204,6 +212,7 @@ public void testTransformNear() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTransformPrimary() throws Exception { checkTransform(false, keyForNode(grid(0).localNode(), PRIMARY)); @@ -213,6 +222,7 @@ public void testTransformPrimary() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTransformBackup() throws Exception { checkTransform(false, keyForNode(grid(0).localNode(), BACKUP)); @@ -222,6 +232,7 @@ public void testTransformBackup() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutNearTx() throws Exception { for (TransactionConcurrency concurrency : TransactionConcurrency.values()) { for (TransactionIsolation isolation : TransactionIsolation.values()) { @@ -235,6 +246,7 @@ public void testPutNearTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutPrimaryTx() throws Exception { for (TransactionConcurrency concurrency : TransactionConcurrency.values()) { for (TransactionIsolation isolation : TransactionIsolation.values()) { @@ -248,6 +260,7 @@ public void testPutPrimaryTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutBackupTx() throws Exception { for (TransactionConcurrency concurrency : TransactionConcurrency.values()) { for (TransactionIsolation isolation : TransactionIsolation.values()) { @@ -261,6 +274,7 @@ public void testPutBackupTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutMultipleKeysTx() throws Exception { for (TransactionConcurrency concurrency : TransactionConcurrency.values()) { for (TransactionIsolation isolation : TransactionIsolation.values()) { @@ -672,4 +686,4 @@ public void forceFail(boolean fail) { throw new CacheWriterException("Store exception"); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/InterceptorCacheConfigVariationsFullApiTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/InterceptorCacheConfigVariationsFullApiTest.java index 8834c05405a4a..2eab9cda3a020 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/InterceptorCacheConfigVariationsFullApiTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/InterceptorCacheConfigVariationsFullApiTest.java @@ -42,17 +42,20 @@ public class InterceptorCacheConfigVariationsFullApiTest extends IgniteCacheConf } /** {@inheritDoc} */ - @Override public void testTtlNoTx() throws Exception { + @Override @Test + public void testTtlNoTx() throws Exception { // No-op. } /** {@inheritDoc} */ - @Override public void testTtlNoTxOldEntry() throws Exception { + @Override @Test + public void testTtlNoTxOldEntry() throws Exception { // No-op. } /** {@inheritDoc} */ - @Override public void testTtlTx() throws Exception { + @Override @Test + public void testTtlTx() throws Exception { // No-op. } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/MarshallerCacheJobRunNodeRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/MarshallerCacheJobRunNodeRestartTest.java index 2ebc232c922df..8b2ee9ae823e9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/MarshallerCacheJobRunNodeRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/MarshallerCacheJobRunNodeRestartTest.java @@ -55,6 +55,7 @@ public class MarshallerCacheJobRunNodeRestartTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testJobRun() throws Exception { for (int i = 0; i < 5; i++) { U.resolveWorkDirectory(U.defaultWorkDirectory(), "marshaller", true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/MemoryPolicyConfigValidationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/MemoryPolicyConfigValidationTest.java index 6dec847954f82..1077e88730898 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/MemoryPolicyConfigValidationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/MemoryPolicyConfigValidationTest.java @@ -240,6 +240,7 @@ private MemoryPolicyConfiguration createMemoryPolicy(String name, long initialSi /** * 'sysMemPlc' name is reserved for MemoryPolicyConfiguration for system caches. */ + @Test public void testReservedMemoryPolicyMisuse() throws Exception { violationType = ValidationViolationType.SYSTEM_MEMORY_POLICY_NAME_MISUSE; @@ -249,6 +250,7 @@ public void testReservedMemoryPolicyMisuse() throws Exception { /** * If user defines default is must be presented among configured memory policies. */ + @Test public void testMissingUserDefinedDefault() throws Exception { violationType = ValidationViolationType.MISSING_USER_DEFINED_DEFAULT; @@ -258,6 +260,7 @@ public void testMissingUserDefinedDefault() throws Exception { /** * Names of all MemoryPolicies must be distinct. */ + @Test public void testNamesConflict() throws Exception { violationType = ValidationViolationType.NAMES_CONFLICT; @@ -267,6 +270,7 @@ public void testNamesConflict() throws Exception { /** * User-defined policy must have a non-null non-empty name. */ + @Test public void testNullNameOnUserDefinedPolicy() throws Exception { violationType = ValidationViolationType.NULL_NAME_ON_USER_DEFINED_POLICY; @@ -276,6 +280,7 @@ public void testNullNameOnUserDefinedPolicy() throws Exception { /** * MemoryPolicy must be configured with size of at least 1MB. */ + @Test public void testMemoryTooSmall() throws Exception { violationType = ValidationViolationType.TOO_SMALL_MEMORY_SIZE; @@ -285,6 +290,7 @@ public void testMemoryTooSmall() throws Exception { /** * MemoryPolicy must be configured with size of at least 1MB. */ + @Test public void testMaxSizeSmallerThanInitialSize() throws Exception { violationType = ValidationViolationType.MAX_SIZE_IS_SMALLER_THAN_INITIAL_SIZE; @@ -294,6 +300,7 @@ public void testMaxSizeSmallerThanInitialSize() throws Exception { /** * User-defined size of default MemoryPolicy must be at least 1MB. */ + @Test public void testUserDefinedDefaultMemoryTooSmall() throws Exception { violationType = ValidationViolationType.TOO_SMALL_USER_DEFINED_DFLT_MEM_PLC_SIZE; @@ -304,6 +311,7 @@ public void testUserDefinedDefaultMemoryTooSmall() throws Exception { * Defining size of default MemoryPolicy twice with and through defaultMemoryPolicySize property * and using MemoryPolicyConfiguration description is prohibited. */ + @Test public void testDefaultMemoryPolicySizeDefinedTwice() throws Exception { violationType = ValidationViolationType.DEFAULT_SIZE_IS_DEFINED_TWICE; @@ -313,6 +321,7 @@ public void testDefaultMemoryPolicySizeDefinedTwice() throws Exception { /** * */ + @Test public void testRateTimeIntervalPropertyIsNegative() throws Exception { violationType = ValidationViolationType.LTE_ZERO_RATE_TIME_INTERVAL; @@ -322,6 +331,7 @@ public void testRateTimeIntervalPropertyIsNegative() throws Exception { /** * */ + @Test public void testSubIntervalsPropertyIsNegative() throws Exception { violationType = ValidationViolationType.LTE_ZERO_SUB_INTERVALS; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/NonAffinityCoordinatorDynamicStartStopTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/NonAffinityCoordinatorDynamicStartStopTest.java index f88f5b95d600c..175193ff1ac9d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/NonAffinityCoordinatorDynamicStartStopTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/NonAffinityCoordinatorDynamicStartStopTest.java @@ -98,6 +98,7 @@ public class NonAffinityCoordinatorDynamicStartStopTest extends GridCommonAbstra /** * @throws Exception If failed. */ + @Test public void testStartStop() throws Exception { startGrids(2); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/OffheapCacheMetricsForClusterGroupSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/OffheapCacheMetricsForClusterGroupSelfTest.java index 9ff6db7c2a5ee..398cf7908714e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/OffheapCacheMetricsForClusterGroupSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/OffheapCacheMetricsForClusterGroupSelfTest.java @@ -63,6 +63,7 @@ public class OffheapCacheMetricsForClusterGroupSelfTest extends GridCommonAbstra startGrid("client-" + i); } + @Test public void testGetOffHeapPrimaryEntriesCount() throws Exception { String cacheName = "testGetOffHeapPrimaryEntriesCount"; IgniteCache cache = grid("client-0").createCache(cacheConfiguration(cacheName)); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/PartitionsExchangeCoordinatorFailoverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/PartitionsExchangeCoordinatorFailoverTest.java index 1c847f9fea843..4ab6d93dff949 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/PartitionsExchangeCoordinatorFailoverTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/PartitionsExchangeCoordinatorFailoverTest.java @@ -75,6 +75,7 @@ public class PartitionsExchangeCoordinatorFailoverTest extends GridCommonAbstrac /** * Tests that new coordinator is able to finish old exchanges in case of in-complete coordinator initialization. */ + @Test public void testNewCoordinatorCompletedExchange() throws Exception { IgniteEx crd = (IgniteEx) startGrid("crd"); @@ -158,6 +159,7 @@ public void testNewCoordinatorCompletedExchange() throws Exception { * * @throws Exception If failed. */ + @Test public void testDelayedFullMessageReplacedIfCoordinatorChanged() throws Exception { IgniteEx crd = startGrid("crd"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/PartitionsExchangeOnDiscoveryHistoryOverflowTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/PartitionsExchangeOnDiscoveryHistoryOverflowTest.java index c0896c87a0c4f..b328672384e76 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/PartitionsExchangeOnDiscoveryHistoryOverflowTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/PartitionsExchangeOnDiscoveryHistoryOverflowTest.java @@ -121,6 +121,7 @@ public class PartitionsExchangeOnDiscoveryHistoryOverflowTest extends IgniteCach /** * @throws Exception In case of error. */ + @Test public void testDynamicCacheCreation() throws Exception { for (int iter = 0; iter < 5; iter++) { log.info("Iteration: " + iter); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/SetTxTimeoutOnPartitionMapExchangeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/SetTxTimeoutOnPartitionMapExchangeTest.java index 490b6402a7485..3cbdad4e6f1bd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/SetTxTimeoutOnPartitionMapExchangeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/SetTxTimeoutOnPartitionMapExchangeTest.java @@ -83,6 +83,7 @@ public class SetTxTimeoutOnPartitionMapExchangeTest extends GridCommonAbstractTe /** * */ + @Test public void testDefaultTxTimeoutOnPartitionMapExchange() throws Exception { IgniteEx ig1 = startGrid(1); IgniteEx ig2 = startGrid(2); @@ -99,6 +100,7 @@ public void testDefaultTxTimeoutOnPartitionMapExchange() throws Exception { /** * */ + @Test public void testJmxSetTxTimeoutOnPartitionMapExchange() throws Exception { startGrid(1); startGrid(2); @@ -121,6 +123,7 @@ public void testJmxSetTxTimeoutOnPartitionMapExchange() throws Exception { /** * */ + @Test public void testClusterSetTxTimeoutOnPartitionMapExchange() throws Exception { Ignite ig1 = startGrid(1); Ignite ig2 = startGrid(2); @@ -140,6 +143,7 @@ public void testClusterSetTxTimeoutOnPartitionMapExchange() throws Exception { * * @throws Exception If fails. */ + @Test public void testSetTxTimeoutDuringPartitionMapExchange() throws Exception { IgniteEx ig = (IgniteEx) startGrids(2); @@ -151,6 +155,7 @@ public void testSetTxTimeoutDuringPartitionMapExchange() throws Exception { * * @throws Exception If fails. */ + @Test public void testSetTxTimeoutOnClientDuringPartitionMapExchange() throws Exception { IgniteEx ig = (IgniteEx) startGrids(2); IgniteEx client = startGrid(getConfiguration("client").setClientMode(true)); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WalModeChangeAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WalModeChangeAbstractSelfTest.java index 8c8ce535e2239..d82c99cdb6c70 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WalModeChangeAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WalModeChangeAbstractSelfTest.java @@ -72,6 +72,7 @@ protected WalModeChangeAbstractSelfTest(boolean filterOnCrd, boolean jdbc) { * * @throws Exception If failed. */ + @Test public void testNullCacheName() throws Exception { forAllNodes(new IgniteInClosureX() { @Override public void applyx(Ignite ignite) throws IgniteCheckedException { @@ -91,6 +92,7 @@ public void testNullCacheName() throws Exception { * * @throws Exception If failed. */ + @Test public void testNoCache() throws Exception { forAllNodes(new IgniteInClosureX() { @Override public void applyx(Ignite ignite) throws IgniteCheckedException { @@ -111,6 +113,7 @@ public void testNoCache() throws Exception { * * @throws Exception If failed. */ + @Test public void testSharedCacheGroup() throws Exception { forAllNodes(new IgniteInClosureX() { @Override public void applyx(Ignite ignite) throws IgniteCheckedException { @@ -146,6 +149,7 @@ public void testSharedCacheGroup() throws Exception { * * @throws Exception If failed. */ + @Test public void testPersistenceDisabled() throws Exception { forAllNodes(new IgniteInClosureX() { @Override public void applyx(Ignite ignite) throws IgniteCheckedException { @@ -182,6 +186,7 @@ public void testPersistenceDisabled() throws Exception { * * @throws Exception If failed. */ + @Test public void testLocalCache() throws Exception { if (jdbc) // Doesn't make sense for JDBC. @@ -217,6 +222,7 @@ public void testLocalCache() throws Exception { * * @throws Exception If failed. */ + @Test public void testEnableDisablePartitionedAtomic() throws Exception { checkEnableDisable(PARTITIONED, ATOMIC); } @@ -226,6 +232,7 @@ public void testEnableDisablePartitionedAtomic() throws Exception { * * @throws Exception If failed. */ + @Test public void testEnableDisablePartitionedTransactional() throws Exception { checkEnableDisable(PARTITIONED, TRANSACTIONAL); } @@ -235,6 +242,7 @@ public void testEnableDisablePartitionedTransactional() throws Exception { * * @throws Exception If failed. */ + @Test public void testEnableDisableReplicatedAtomic() throws Exception { checkEnableDisable(REPLICATED, ATOMIC); } @@ -244,6 +252,7 @@ public void testEnableDisableReplicatedAtomic() throws Exception { * * @throws Exception If failed. */ + @Test public void testEnableDisableReplicatedTransactional() throws Exception { checkEnableDisable(REPLICATED, TRANSACTIONAL); } @@ -278,6 +287,7 @@ private void checkEnableDisable(CacheMode mode, CacheAtomicityMode atomicityMode * * @throws Exception If failed. */ + @Test public void testDisablingProhibition() throws Exception { forAllNodes(new IgniteInClosureX() { @Override public void applyx(Ignite ig) throws IgniteCheckedException { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WalModeChangeAdvancedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WalModeChangeAdvancedSelfTest.java index d95b715009cbf..1eb1baff14da1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WalModeChangeAdvancedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WalModeChangeAdvancedSelfTest.java @@ -65,6 +65,7 @@ public WalModeChangeAdvancedSelfTest() { * * @throws Exception If failed. */ + @Test public void testCacheCleanup() throws Exception { Ignite srv = startGrid(config(SRV_1, false, false)); @@ -133,6 +134,7 @@ public void testCacheCleanup() throws Exception { * * @throws Exception If failed. */ + @Test public void testJoin() throws Exception { checkJoin(false); } @@ -142,6 +144,7 @@ public void testJoin() throws Exception { * * @throws Exception If failed. */ + @Test public void testJoinCoordinator() throws Exception { checkJoin(true); } @@ -210,6 +213,7 @@ private void checkJoin(boolean crdFiltered) throws Exception { * * @throws Exception If failed. */ + @Test public void testServerRestartNonCoordinator() throws Exception { checkNodeRestart(false); } @@ -219,6 +223,7 @@ public void testServerRestartNonCoordinator() throws Exception { * * @throws Exception If failed. */ + @Test public void testServerRestartCoordinator() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-7472"); @@ -301,6 +306,7 @@ public void checkNodeRestart(boolean failCrd) throws Exception { * * @throws Exception If failed. */ + @Test public void testClientReconnect() throws Exception { final Ignite srv = startGrid(config(SRV_1, false, false)); Ignite cli = startGrid(config(CLI, true, false)); @@ -359,6 +365,7 @@ public void testClientReconnect() throws Exception { * * @throws Exception If failed. */ + @Test public void testCacheDestroy() throws Exception { final Ignite srv = startGrid(config(SRV_1, false, false)); Ignite cli = startGrid(config(CLI, true, false)); @@ -419,6 +426,7 @@ public void testCacheDestroy() throws Exception { * * @throws Exception If failed. */ + @Test public void testConcurrentOperations() throws Exception { final Ignite srv1 = startGrid(config(SRV_1, false, false)); final Ignite srv2 = startGrid(config(SRV_2, false, false)); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WithKeepBinaryCacheFullApiTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WithKeepBinaryCacheFullApiTest.java index 8f5a0966bdfff..7c03b2d4145f3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WithKeepBinaryCacheFullApiTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WithKeepBinaryCacheFullApiTest.java @@ -122,6 +122,7 @@ public class WithKeepBinaryCacheFullApiTest extends IgniteCacheConfigVariationsA * @throws Exception If failed. */ @SuppressWarnings("serial") + @Test public void testRemovePutGet() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -177,6 +178,7 @@ public void testRemovePutGet() throws Exception { * @throws Exception If failed. */ @SuppressWarnings("serial") + @Test public void testRemovePutGetAsync() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -233,6 +235,7 @@ public void testRemovePutGetAsync() throws Exception { * @throws Exception If failed. */ @SuppressWarnings("serial") + @Test public void testPutAllGetAll() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -300,6 +303,7 @@ public void testPutAllGetAll() throws Exception { * @throws Exception If failed. */ @SuppressWarnings("serial") + @Test public void testPutAllGetAllAsync() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -373,6 +377,7 @@ public void testPutAllGetAllAsync() throws Exception { * @throws Exception If failed. */ @SuppressWarnings("serial") + @Test public void testInvoke() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -438,6 +443,7 @@ public void testInvoke() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeTx() throws Exception { if (!txShouldBeUsed()) return; @@ -557,6 +563,7 @@ public void checkInvokeTx(final TransactionConcurrency conc, final TransactionIs * @throws Exception If failed. */ @SuppressWarnings("serial") + @Test public void testInvokeAsync() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -622,6 +629,7 @@ public void testInvokeAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeAsyncTx() throws Exception { if (!txShouldBeUsed()) return; @@ -743,6 +751,7 @@ public void checkInvokeAsyncTx(final TransactionConcurrency conc, final Transact * @throws Exception If failed. */ @SuppressWarnings("serial") + @Test public void testInvokeAll() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -794,6 +803,7 @@ public void testInvokeAll() throws Exception { * @throws Exception If failed. */ @SuppressWarnings("serial") + @Test public void testInvokeAllTx() throws Exception { if (!txShouldBeUsed()) return; @@ -926,6 +936,7 @@ private void checkInvokeAllResult(IgniteCache cache, Map cache = grid(0).cache(DEFAULT_CACHE_NAME).withKeepBinary(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/CacheKeepBinaryWithInterceptorTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/CacheKeepBinaryWithInterceptorTest.java index 6cef6d20c2790..912385701081b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/CacheKeepBinaryWithInterceptorTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/CacheKeepBinaryWithInterceptorTest.java @@ -64,6 +64,7 @@ public class CacheKeepBinaryWithInterceptorTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testKeepBinaryWithInterceptor() throws Exception { keepBinaryWithInterceptor(cacheConfiguration(ATOMIC, false)); keepBinaryWithInterceptor(cacheConfiguration(TRANSACTIONAL, false)); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryAtomicEntryProcessorDeploymentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryAtomicEntryProcessorDeploymentSelfTest.java index c65f41c45cb85..5f574707c9f27 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryAtomicEntryProcessorDeploymentSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryAtomicEntryProcessorDeploymentSelfTest.java @@ -41,6 +41,7 @@ public class GridCacheBinaryAtomicEntryProcessorDeploymentSelfTest /** * @throws Exception In case of error. */ + @Test public void testGetDeployment() throws Exception { depMode = DeploymentMode.CONTINUOUS; @@ -50,6 +51,7 @@ public void testGetDeployment() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testGetDeployment2() throws Exception { depMode = DeploymentMode.SHARED; @@ -59,6 +61,7 @@ public void testGetDeployment2() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testGetDeploymentWithKeepBinary() throws Exception { depMode = DeploymentMode.CONTINUOUS; @@ -68,6 +71,7 @@ public void testGetDeploymentWithKeepBinary() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testGetDeployment2WithKeepBinary() throws Exception { depMode = DeploymentMode.SHARED; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectMetadataExchangeMultinodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectMetadataExchangeMultinodeTest.java index 03f0628ad1437..e767200febfa6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectMetadataExchangeMultinodeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectMetadataExchangeMultinodeTest.java @@ -123,6 +123,7 @@ public class GridCacheBinaryObjectMetadataExchangeMultinodeTest extends GridComm * Verifies that if thread tries to read metadata with ongoing update it gets blocked * until acknowledge message arrives. */ + @Test public void testReadRequestBlockedOnUpdatingMetadata() throws Exception { final CyclicBarrier barrier = new CyclicBarrier(2); @@ -222,6 +223,7 @@ public void testReadRequestBlockedOnUpdatingMetadata() throws Exception { /** * Verifies that all sequential updates that don't introduce any conflicts are accepted and observed by all nodes. */ + @Test public void testSequentialUpdatesNoConflicts() throws Exception { IgniteEx ignite0 = startGrid(0); @@ -255,6 +257,7 @@ public void testSequentialUpdatesNoConflicts() throws Exception { /** * Verifies that client is able to detect obsolete metadata situation and request up-to-date from the cluster. */ + @Test public void testClientRequestsUpToDateMetadata() throws Exception { final IgniteEx ignite0 = startGrid(0); @@ -290,6 +293,7 @@ public void testClientRequestsUpToDateMetadata() throws Exception { /** * Verifies that client resends request for up-to-date metadata in case of failure on server received first request. */ + @Test public void testClientRequestsUpToDateMetadataOneNodeDies() throws Exception { final Ignite srv0 = startGrid(0); replaceWithStoppingMappingRequestListener(((GridKernalContext)U.field(srv0, "ctx")).io(), 0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectUserClassloaderSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectUserClassloaderSelfTest.java index 40d8d041bcca6..2866fac38505f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectUserClassloaderSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectUserClassloaderSelfTest.java @@ -140,6 +140,7 @@ CacheConfiguration cacheConfiguration(String igniteInstanceName) { /** * @throws Exception If test failed. */ + @Test public void testConfigurationRegistration() throws Exception { useWrappingLoader = false; @@ -149,6 +150,7 @@ public void testConfigurationRegistration() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testConfigurationRegistrationWithWrappingLoader() throws Exception { useWrappingLoader = true; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractDataStreamerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractDataStreamerSelfTest.java index 472a7a03b8f7b..0539a7e775ec3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractDataStreamerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractDataStreamerSelfTest.java @@ -111,6 +111,7 @@ protected int gridCount() { * @throws Exception If failed. */ @SuppressWarnings("BusyWait") + @Test public void testGetPut() throws Exception { final AtomicBoolean flag = new AtomicBoolean(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractMultiThreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractMultiThreadedSelfTest.java index e2a1a8b041ae2..45f3130819489 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractMultiThreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractMultiThreadedSelfTest.java @@ -124,7 +124,8 @@ protected int gridCount() { /** * @throws Exception If failed. */ - @SuppressWarnings("BusyWait") public void testGetPut() throws Exception { + @SuppressWarnings("BusyWait") @Test + public void testGetPut() throws Exception { final AtomicBoolean flag = new AtomicBoolean(); final LongAdder cnt = new LongAdder(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractSelfTest.java index 98e906f07b1c8..157ec97e24b47 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractSelfTest.java @@ -222,6 +222,7 @@ protected boolean onheapCacheEnabled() { * @throws Exception If failed. */ @SuppressWarnings("unchecked") + @Test public void testCircularReference() throws Exception { IgniteCache c = keepBinaryCache(); @@ -266,6 +267,7 @@ public void testCircularReference() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGet() throws Exception { IgniteCache c = jcache(0); @@ -290,6 +292,7 @@ public void testGet() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReplace() throws Exception { IgniteCache c = jcache(0); @@ -322,6 +325,7 @@ public void testReplace() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemove() throws Exception { IgniteCache c = jcache(0); @@ -348,6 +352,7 @@ public void testRemove() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIterator() throws Exception { IgniteCache c = jcache(0); @@ -387,6 +392,7 @@ public void testIterator() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCollection() throws Exception { IgniteCache> c = jcache(0); @@ -433,6 +439,7 @@ public void testCollection() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMap() throws Exception { IgniteCache> c = jcache(0); @@ -478,6 +485,7 @@ public void testMap() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSingletonList() throws Exception { IgniteCache> c = jcache(0); @@ -505,6 +513,7 @@ public void testSingletonList() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetAsync() throws Exception { IgniteCache c = jcache(0); @@ -531,6 +540,7 @@ public void testGetAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBasicArrays() throws Exception { IgniteCache cache = jcache(0); @@ -564,6 +574,7 @@ public void testBasicArrays() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCustomArrays() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-3244"); @@ -600,6 +611,7 @@ private void checkArrayClass(IgniteCache cache, Object arr) { /** * @throws Exception If failed. */ + @Test public void testGetTx1() throws Exception { checkGetTx(PESSIMISTIC, REPEATABLE_READ); } @@ -607,6 +619,7 @@ public void testGetTx1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetTx2() throws Exception { checkGetTx(PESSIMISTIC, READ_COMMITTED); } @@ -653,6 +666,7 @@ private void checkGetTx(TransactionConcurrency concurrency, TransactionIsolation /** * @throws Exception If failed. */ + @Test public void testGetTxAsync1() throws Exception { checkGetAsyncTx(PESSIMISTIC, REPEATABLE_READ); } @@ -660,6 +674,7 @@ public void testGetTxAsync1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetTxAsync2() throws Exception { checkGetAsyncTx(PESSIMISTIC, READ_COMMITTED); } @@ -707,6 +722,7 @@ private void checkGetAsyncTx(TransactionConcurrency concurrency, TransactionIsol /** * @throws Exception If failed. */ + @Test public void testGetAsyncTx() throws Exception { if (atomicityMode() != TRANSACTIONAL) return; @@ -742,6 +758,7 @@ public void testGetAsyncTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetAll() throws Exception { IgniteCache c = jcache(0); @@ -782,6 +799,7 @@ public void testGetAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetAllAsync() throws Exception { IgniteCache c = jcache(0); @@ -822,6 +840,7 @@ public void testGetAllAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetAllTx1() throws Exception { checkGetAllTx(PESSIMISTIC, REPEATABLE_READ); } @@ -829,6 +848,7 @@ public void testGetAllTx1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetAllTx2() throws Exception { checkGetAllTx(PESSIMISTIC, READ_COMMITTED); } @@ -894,6 +914,7 @@ private void checkGetAllTx(TransactionConcurrency concurrency, TransactionIsolat /** * @throws Exception If failed. */ + @Test public void testGetAllAsyncTx1() throws Exception { checkGetAllAsyncTx(PESSIMISTIC, REPEATABLE_READ); } @@ -901,6 +922,7 @@ public void testGetAllAsyncTx1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetAllAsyncTx2() throws Exception { checkGetAllAsyncTx(PESSIMISTIC, READ_COMMITTED); } @@ -966,6 +988,7 @@ private void checkGetAllAsyncTx(TransactionConcurrency concurrency, TransactionI * */ @SuppressWarnings("unchecked") + @Test public void testCrossFormatObjectsIdentity() { IgniteCache c = binKeysCache(); @@ -987,6 +1010,7 @@ public void testCrossFormatObjectsIdentity() { * */ @SuppressWarnings("unchecked") + @Test public void testPutWithArrayHashing() { IgniteCache c = binKeysCache(); @@ -1021,6 +1045,7 @@ public void testPutWithArrayHashing() { * */ @SuppressWarnings("unchecked") + @Test public void testPutWithFieldsHashing() { IgniteCache c = binKeysCache(); @@ -1054,6 +1079,7 @@ public void testPutWithFieldsHashing() { * */ @SuppressWarnings("unchecked") + @Test public void testPutWithCustomHashing() { IgniteCache c = binKeysCache(); @@ -1084,6 +1110,7 @@ public void testPutWithCustomHashing() { /** * @throws Exception if failed. */ + @Test public void testKeepBinaryTxOverwrite() throws Exception { if (atomicityMode() != TRANSACTIONAL) return; @@ -1108,6 +1135,7 @@ public void testKeepBinaryTxOverwrite() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLoadCache() throws Exception { for (int i = 0; i < gridCount(); i++) jcache(i).localLoadCache(null); @@ -1124,6 +1152,7 @@ public void testLoadCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLoadCacheAsync() throws Exception { for (int i = 0; i < gridCount(); i++) jcache(i).loadCacheAsync(null).get(); @@ -1140,6 +1169,7 @@ public void testLoadCacheAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLoadCacheFilteredAsync() throws Exception { for (int i = 0; i < gridCount(); i++) { IgniteCache c = jcache(i); @@ -1164,6 +1194,7 @@ public void testLoadCacheFilteredAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTransform() throws Exception { IgniteCache c = keepBinaryCache(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryStoreAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryStoreAbstractSelfTest.java index 1b7cb298bc620..fe918e5b8dbe3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryStoreAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryStoreAbstractSelfTest.java @@ -110,6 +110,7 @@ public abstract class GridCacheBinaryStoreAbstractSelfTest extends GridCommonAbs /** * @throws Exception If failed. */ + @Test public void testPut() throws Exception { jcache().put(new Key(1), new Value(1)); @@ -119,6 +120,7 @@ public void testPut() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAll() throws Exception { Map map = new HashMap<>(); @@ -133,6 +135,7 @@ public void testPutAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLoad() throws Exception { populateMap(STORE.map(), 1); @@ -146,6 +149,7 @@ public void testLoad() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLoadAll() throws Exception { populateMap(STORE.map(), 1, 2, 3); @@ -170,6 +174,7 @@ public void testLoadAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemove() throws Exception { for (int i = 1; i <= 3; i++) jcache().put(new Key(i), new Value(i)); @@ -182,6 +187,7 @@ public void testRemove() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemoveAll() throws Exception { for (int i = 1; i <= 3; i++) jcache().put(new Key(i), new Value(i)); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheClientNodeBinaryObjectMetadataMultinodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheClientNodeBinaryObjectMetadataMultinodeTest.java index 3da8605ef594b..86b662316dbe0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheClientNodeBinaryObjectMetadataMultinodeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheClientNodeBinaryObjectMetadataMultinodeTest.java @@ -86,6 +86,7 @@ public class GridCacheClientNodeBinaryObjectMetadataMultinodeTest extends GridCo /** * @throws Exception If failed. */ + @Test public void testClientMetadataInitialization() throws Exception { startGrids(2); @@ -181,6 +182,7 @@ public void testClientMetadataInitialization() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFailoverOnStart() throws Exception { startGrids(4); @@ -267,6 +269,7 @@ public void testFailoverOnStart() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientStartsFirst() throws Exception { client = true; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheClientNodeBinaryObjectMetadataTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheClientNodeBinaryObjectMetadataTest.java index 0316edc54307a..f8baf00a55c4c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheClientNodeBinaryObjectMetadataTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheClientNodeBinaryObjectMetadataTest.java @@ -94,6 +94,7 @@ public class GridCacheClientNodeBinaryObjectMetadataTest extends GridCacheAbstra /** * @throws Exception If failed. */ + @Test public void testBinaryMetadataOnClient() throws Exception { Ignite ignite0 = ignite(gridCount() - 1); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/datastreaming/GridDataStreamerImplSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/datastreaming/GridDataStreamerImplSelfTest.java index c629871333952..e4956066a652b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/datastreaming/GridDataStreamerImplSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/datastreaming/GridDataStreamerImplSelfTest.java @@ -100,6 +100,7 @@ private CacheConfiguration cacheConfiguration() { * * @throws Exception If failed. */ + @Test public void testAddDataFromMap() throws Exception { try { binaries = false; @@ -148,6 +149,7 @@ public void testAddDataFromMap() throws Exception { * * @throws Exception If failed. */ + @Test public void testAddMissingBinary() throws Exception { try { binaries = true; @@ -183,6 +185,7 @@ public void testAddMissingBinary() throws Exception { * * @throws Exception If failed. */ + @Test public void testAddBinaryDataFromMap() throws Exception { try { binaries = true; @@ -242,6 +245,7 @@ public void testAddBinaryDataFromMap() throws Exception { * * @throws Exception If failed. */ + @Test public void testAddBinaryCreatedWithBuilder() throws Exception { try { binaries = true; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCacheAbstractExecutionContextTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCacheAbstractExecutionContextTest.java index 10a5912fc91c7..5e4415bfe07f7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCacheAbstractExecutionContextTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCacheAbstractExecutionContextTest.java @@ -62,6 +62,7 @@ public abstract class IgniteCacheAbstractExecutionContextTest extends IgniteCach /** * @throws Exception If failed. */ + @Test public void testUsersClassLoader() throws Exception { UsersClassLoader testClassLdr = (UsersClassLoader)grid(0).configuration().getClassLoader(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java index 6e3a7bb467a82..78a8e696a0f4c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java @@ -171,6 +171,7 @@ protected IgniteEx startClient() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAtomicLongFailsWhenServersLeft() throws Exception { client = true; @@ -201,6 +202,7 @@ public void testAtomicLongFailsWhenServersLeft() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAtomicLongTopologyChange() throws Exception { try (IgniteAtomicLong atomic = grid(0).atomicLong(STRUCTURE_NAME, 10, true)) { Ignite g = startGrid(NEW_IGNITE_INSTANCE_NAME); @@ -218,6 +220,7 @@ public void testAtomicLongTopologyChange() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAtomicLongConstantTopologyChange() throws Exception { doTestAtomicLong(new ConstantTopologyChangeWorker(TOP_CHANGE_THREAD_CNT)); } @@ -225,6 +228,7 @@ public void testAtomicLongConstantTopologyChange() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAtomicLongConstantMultipleTopologyChange() throws Exception { doTestAtomicLong(multipleTopologyChangeWorker(TOP_CHANGE_THREAD_CNT)); } @@ -263,6 +267,7 @@ private void doTestAtomicLong(ConstantTopologyChangeWorker topWorker) throws Exc /** * @throws Exception If failed. */ + @Test public void testAtomicReferenceTopologyChange() throws Exception { try (IgniteAtomicReference atomic = grid(0).atomicReference(STRUCTURE_NAME, 10, true)) { Ignite g = startGrid(NEW_IGNITE_INSTANCE_NAME); @@ -280,6 +285,7 @@ public void testAtomicReferenceTopologyChange() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAtomicReferenceConstantTopologyChange() throws Exception { doTestAtomicReference(new ConstantTopologyChangeWorker(TOP_CHANGE_THREAD_CNT)); } @@ -287,6 +293,7 @@ public void testAtomicReferenceConstantTopologyChange() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAtomicReferenceConstantMultipleTopologyChange() throws Exception { doTestAtomicReference(multipleTopologyChangeWorker(TOP_CHANGE_THREAD_CNT)); } @@ -325,6 +332,7 @@ private void doTestAtomicReference(ConstantTopologyChangeWorker topWorker) throw /** * @throws Exception If failed. */ + @Test public void testAtomicStampedTopologyChange() throws Exception { try (IgniteAtomicStamped atomic = grid(0).atomicStamped(STRUCTURE_NAME, 10, 10, true)) { Ignite g = startGrid(NEW_IGNITE_INSTANCE_NAME); @@ -348,6 +356,7 @@ public void testAtomicStampedTopologyChange() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAtomicStampedConstantTopologyChange() throws Exception { doTestAtomicStamped(new ConstantTopologyChangeWorker(TOP_CHANGE_THREAD_CNT)); } @@ -355,6 +364,7 @@ public void testAtomicStampedConstantTopologyChange() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAtomicStampedConstantMultipleTopologyChange() throws Exception { doTestAtomicStamped(multipleTopologyChangeWorker(TOP_CHANGE_THREAD_CNT)); } @@ -405,6 +415,7 @@ private void doTestAtomicStamped(ConstantTopologyChangeWorker topWorker) throws /** * @throws Exception If failed. */ + @Test public void testCountDownLatchTopologyChange() throws Exception { try (IgniteCountDownLatch latch = grid(0).countDownLatch(STRUCTURE_NAME, 20, true, true)) { try { @@ -427,6 +438,7 @@ public void testCountDownLatchTopologyChange() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSemaphoreFailoverSafe() throws Exception { try (final IgniteSemaphore semaphore = grid(0).semaphore(STRUCTURE_NAME, 20, true, true)) { Ignite g = startGrid(NEW_IGNITE_INSTANCE_NAME); @@ -450,6 +462,7 @@ public void testSemaphoreFailoverSafe() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSemaphoreNonFailoverSafe() throws Exception { try (IgniteSemaphore sem = grid(0).semaphore(STRUCTURE_NAME, 20, false, true)) { Ignite g = startGrid(NEW_IGNITE_INSTANCE_NAME); @@ -481,6 +494,7 @@ public void testSemaphoreNonFailoverSafe() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCanCloseSetInInterruptedThread() throws Exception { doCloseByInterruptedThread(grid(0).set(STRUCTURE_NAME, new CollectionConfiguration())); } @@ -488,6 +502,7 @@ public void testCanCloseSetInInterruptedThread() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCanCloseQueueInInterruptedThread() throws Exception { doCloseByInterruptedThread(grid(0).queue(STRUCTURE_NAME, 0, new CollectionConfiguration())); } @@ -495,6 +510,7 @@ public void testCanCloseQueueInInterruptedThread() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCanCloseAtomicLongInInterruptedThread() throws Exception { doCloseByInterruptedThread(grid(0).atomicLong(STRUCTURE_NAME, 10, true)); } @@ -502,6 +518,7 @@ public void testCanCloseAtomicLongInInterruptedThread() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCanCloseAtomicReferenceInInterruptedThread() throws Exception { doCloseByInterruptedThread(grid(0).atomicReference(STRUCTURE_NAME, 10, true)); } @@ -509,6 +526,7 @@ public void testCanCloseAtomicReferenceInInterruptedThread() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCanCloseCountDownLatchInInterruptedThread() throws Exception { IgniteCountDownLatch latch = grid(0).countDownLatch(STRUCTURE_NAME, 1, true, true); latch.countDown(); @@ -519,6 +537,7 @@ public void testCanCloseCountDownLatchInInterruptedThread() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCanCloseAtomicStampedInInterruptedThread() throws Exception { doCloseByInterruptedThread(grid(0).atomicStamped(STRUCTURE_NAME, 10, 10,true)); } @@ -526,6 +545,7 @@ public void testCanCloseAtomicStampedInInterruptedThread() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCanCloseSemaphoreInInterruptedThread() throws Exception { doCloseByInterruptedThread(grid(0).semaphore(STRUCTURE_NAME, 1, true, true)); } @@ -553,6 +573,7 @@ private void doCloseByInterruptedThread(final Closeable closeableDs) throws Exce /** * @throws Exception If failed. */ + @Test public void testSemaphoreSingleNodeFailure() throws Exception { final Ignite i1 = grid(0); @@ -606,6 +627,7 @@ public void testSemaphoreSingleNodeFailure() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSemaphoreConstantTopologyChangeFailoverSafe() throws Exception { doTestSemaphore(new ConstantTopologyChangeWorker(TOP_CHANGE_THREAD_CNT), true); } @@ -613,6 +635,7 @@ public void testSemaphoreConstantTopologyChangeFailoverSafe() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSemaphoreConstantTopologyChangeNonFailoverSafe() throws Exception { doTestSemaphore(new ConstantTopologyChangeWorker(TOP_CHANGE_THREAD_CNT), false); } @@ -620,6 +643,7 @@ public void testSemaphoreConstantTopologyChangeNonFailoverSafe() throws Exceptio /** * @throws Exception If failed. */ + @Test public void testSemaphoreMultipleTopologyChangeFailoverSafe() throws Exception { doTestSemaphore(multipleTopologyChangeWorker(TOP_CHANGE_THREAD_CNT), true); } @@ -627,6 +651,7 @@ public void testSemaphoreMultipleTopologyChangeFailoverSafe() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSemaphoreMultipleTopologyChangeNonFailoverSafe() throws Exception { doTestSemaphore(multipleTopologyChangeWorker(TOP_CHANGE_THREAD_CNT), false); } @@ -705,6 +730,7 @@ private void doTestSemaphore(ConstantTopologyChangeWorker topWorker, final boole /** * @throws Exception If failed. */ + @Test public void testReentrantLockFailsWhenServersLeft() throws Exception { testReentrantLockFailsWhenServersLeft(false); } @@ -712,6 +738,7 @@ public void testReentrantLockFailsWhenServersLeft() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFairReentrantLockFailsWhenServersLeft() throws Exception { testReentrantLockFailsWhenServersLeft(true); } @@ -719,6 +746,7 @@ public void testFairReentrantLockFailsWhenServersLeft() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReentrantLockFailsWhenServersLeft(final boolean fair) throws Exception { client = true; @@ -785,6 +813,7 @@ public void testReentrantLockFailsWhenServersLeft(final boolean fair) throws Exc /** * @throws Exception If failed. */ + @Test public void testReentrantLockConstantTopologyChangeFailoverSafe() throws Exception { doTestReentrantLock(new ConstantTopologyChangeWorker(TOP_CHANGE_THREAD_CNT), true, false); } @@ -792,6 +821,7 @@ public void testReentrantLockConstantTopologyChangeFailoverSafe() throws Excepti /** * @throws Exception If failed. */ + @Test public void testReentrantLockConstantMultipleTopologyChangeFailoverSafe() throws Exception { doTestReentrantLock(multipleTopologyChangeWorker(TOP_CHANGE_THREAD_CNT), true, false); } @@ -799,6 +829,7 @@ public void testReentrantLockConstantMultipleTopologyChangeFailoverSafe() throws /** * @throws Exception If failed. */ + @Test public void testReentrantLockConstantTopologyChangeNonFailoverSafe() throws Exception { doTestReentrantLock(new ConstantTopologyChangeWorker(TOP_CHANGE_THREAD_CNT), false, false); } @@ -806,6 +837,7 @@ public void testReentrantLockConstantTopologyChangeNonFailoverSafe() throws Exce /** * @throws Exception If failed. */ + @Test public void testReentrantLockConstantMultipleTopologyChangeNonFailoverSafe() throws Exception { doTestReentrantLock(multipleTopologyChangeWorker(TOP_CHANGE_THREAD_CNT), false, false); } @@ -813,6 +845,7 @@ public void testReentrantLockConstantMultipleTopologyChangeNonFailoverSafe() thr /** * @throws Exception If failed. */ + @Test public void testFairReentrantLockConstantTopologyChangeFailoverSafe() throws Exception { doTestReentrantLock(new ConstantTopologyChangeWorker(TOP_CHANGE_THREAD_CNT), true, true); } @@ -820,6 +853,7 @@ public void testFairReentrantLockConstantTopologyChangeFailoverSafe() throws Exc /** * @throws Exception If failed. */ + @Test public void testFairReentrantLockConstantMultipleTopologyChangeFailoverSafe() throws Exception { doTestReentrantLock(multipleTopologyChangeWorker(TOP_CHANGE_THREAD_CNT), true, true); } @@ -827,6 +861,7 @@ public void testFairReentrantLockConstantMultipleTopologyChangeFailoverSafe() th /** * @throws Exception If failed. */ + @Test public void testFairReentrantLockConstantTopologyChangeNonFailoverSafe() throws Exception { doTestReentrantLock(new ConstantTopologyChangeWorker(TOP_CHANGE_THREAD_CNT), false, true); } @@ -834,6 +869,7 @@ public void testFairReentrantLockConstantTopologyChangeNonFailoverSafe() throws /** * @throws Exception If failed. */ + @Test public void testFairReentrantLockConstantMultipleTopologyChangeNonFailoverSafe() throws Exception { doTestReentrantLock(multipleTopologyChangeWorker(TOP_CHANGE_THREAD_CNT), false, true); } @@ -916,6 +952,7 @@ private void doTestReentrantLock( /** * @throws Exception If failed. */ + @Test public void testCountDownLatchConstantTopologyChange() throws Exception { doTestCountDownLatch(new ConstantTopologyChangeWorker(TOP_CHANGE_THREAD_CNT)); } @@ -923,6 +960,7 @@ public void testCountDownLatchConstantTopologyChange() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCountDownLatchConstantMultipleTopologyChange() throws Exception { doTestCountDownLatch(multipleTopologyChangeWorker(TOP_CHANGE_THREAD_CNT)); } @@ -966,6 +1004,7 @@ private void doTestCountDownLatch(ConstantTopologyChangeWorker topWorker) throws /** * @throws Exception If failed. */ + @Test public void testFifoQueueTopologyChange() throws Exception { try { grid(0).queue(STRUCTURE_NAME, 0, config(false)).put(10); @@ -988,6 +1027,7 @@ public void testFifoQueueTopologyChange() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueueTopologyChange() throws Exception { ConstantTopologyChangeWorker topWorker = new ConstantTopologyChangeWorker(TOP_CHANGE_THREAD_CNT); @@ -1042,6 +1082,7 @@ public void testQueueTopologyChange() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueueConstantTopologyChange() throws Exception { int topChangeThreads = collectionCacheMode() == CacheMode.PARTITIONED ? 1 : TOP_CHANGE_THREAD_CNT; @@ -1051,6 +1092,7 @@ public void testQueueConstantTopologyChange() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueueConstantMultipleTopologyChange() throws Exception { int topChangeThreads = collectionCacheMode() == CacheMode.PARTITIONED ? 1 : TOP_CHANGE_THREAD_CNT; @@ -1121,6 +1163,7 @@ private void doTestQueue(ConstantTopologyChangeWorker topWorker) throws Exceptio /** * @throws Exception If failed. */ + @Test public void testAtomicSequenceInitialization() throws Exception { checkAtomicSequenceInitialization(false); } @@ -1128,6 +1171,7 @@ public void testAtomicSequenceInitialization() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAtomicSequenceInitializationOnStableNodes() throws Exception { checkAtomicSequenceInitialization(true); } @@ -1211,6 +1255,7 @@ private void checkAtomicSequenceInitialization(boolean limitProjection) throws E /** * @throws Exception If failed. */ + @Test public void testAtomicSequenceTopologyChange() throws Exception { try (IgniteAtomicSequence s = grid(0).atomicSequence(STRUCTURE_NAME, 10, true)) { Ignite g = startGrid(NEW_IGNITE_INSTANCE_NAME); @@ -1226,6 +1271,7 @@ public void testAtomicSequenceTopologyChange() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAtomicSequenceConstantTopologyChange() throws Exception { doTestAtomicSequence(new ConstantTopologyChangeWorker(TOP_CHANGE_THREAD_CNT, true)); } @@ -1233,6 +1279,7 @@ public void testAtomicSequenceConstantTopologyChange() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAtomicSequenceConstantMultipleTopologyChange() throws Exception { doTestAtomicSequence(multipleTopologyChangeWorker(TOP_CHANGE_THREAD_CNT)); } @@ -1272,6 +1319,7 @@ private void doTestAtomicSequence(ConstantTopologyChangeWorker topWorker) throws /** * @throws Exception If failed. */ + @Test public void testUncommitedTxLeave() throws Exception { final int val = 10; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractQueueFailoverDataConsistencySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractQueueFailoverDataConsistencySelfTest.java index 5b3d201917d44..f1dfe9e1b1511 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractQueueFailoverDataConsistencySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractQueueFailoverDataConsistencySelfTest.java @@ -104,6 +104,7 @@ public abstract class GridCacheAbstractQueueFailoverDataConsistencySelfTest exte /** * @throws Exception If failed. */ + @Test public void testAddFailover() throws Exception { testAddFailover(false); } @@ -111,6 +112,7 @@ public void testAddFailover() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAddFailoverCollocated() throws Exception { testAddFailover(true); } @@ -199,6 +201,7 @@ private void testAddFailover(IgniteQueue queue, final List kil /** * @throws Exception If failed. */ + @Test public void testPollFailover() throws Exception { testPollFailover(false); } @@ -206,6 +209,7 @@ public void testPollFailover() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPollFailoverCollocated() throws Exception { testPollFailover(true); } @@ -380,4 +384,4 @@ private int primaryQueueNode(IgniteQueue queue) throws Exception { return -1; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicReferenceApiSelfAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicReferenceApiSelfAbstractTest.java index 015d154ed0e37..b80d1f959bd05 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicReferenceApiSelfAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicReferenceApiSelfAbstractTest.java @@ -43,6 +43,7 @@ public abstract class GridCacheAtomicReferenceApiSelfAbstractTest extends Ignite * * @throws Exception If failed. */ + @Test public void testPrepareAtomicReference() throws Exception { /* Name of first atomic. */ String atomicName1 = UUID.randomUUID().toString(); @@ -81,6 +82,7 @@ public void testPrepareAtomicReference() throws Exception { * * @throws Exception If failed. */ + @Test public void testSetAndGet() throws Exception { String atomicName = UUID.randomUUID().toString(); @@ -100,6 +102,7 @@ public void testSetAndGet() throws Exception { * * @throws Exception If failed. */ + @Test public void testCompareAndSetSimpleValue() throws Exception { String atomicName = UUID.randomUUID().toString(); @@ -123,6 +126,7 @@ public void testCompareAndSetSimpleValue() throws Exception { * * @throws Exception If failed. */ + @Test public void testCompareAndSetNullValue() throws Exception { String atomicName = UUID.randomUUID().toString(); @@ -142,6 +146,7 @@ public void testCompareAndSetNullValue() throws Exception { * * @throws Exception If failed. */ + @Test public void testIsolation() throws Exception { Ignite ignite = grid(0); @@ -192,6 +197,7 @@ public void testIsolation() throws Exception { * * @throws Exception If failed. */ + @Test public void testMultipleStructuresInDifferentGroups() throws Exception { Ignite ignite = grid(0); @@ -253,4 +259,4 @@ public void testMultipleStructuresInDifferentGroups() throws Exception { assertNotNull(ignite.atomicReference("ref4", cfg, "d", false)); assertNotNull(ignite.atomicReference("ref6", cfg, "f", false)); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicReferenceMultiNodeAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicReferenceMultiNodeAbstractTest.java index 8331454583934..a38e03270bef0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicReferenceMultiNodeAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicReferenceMultiNodeAbstractTest.java @@ -40,6 +40,7 @@ public abstract class GridCacheAtomicReferenceMultiNodeAbstractTest extends Igni * * @throws Exception If failed. */ + @Test public void testAtomicReference() throws Exception { // Get random name of reference. final String refName = UUID.randomUUID().toString(); @@ -96,6 +97,7 @@ public void testAtomicReference() throws Exception { * * @throws Exception If failed. */ + @Test public void testAtomicStamped() throws Exception { // Get random name of stamped. final String stampedName = UUID.randomUUID().toString(); @@ -153,4 +155,4 @@ public void testAtomicStamped() throws Exception { } }); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicStampedApiSelfAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicStampedApiSelfAbstractTest.java index 9629e8b715b1f..f73b136ea05e9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicStampedApiSelfAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicStampedApiSelfAbstractTest.java @@ -43,6 +43,7 @@ public abstract class GridCacheAtomicStampedApiSelfAbstractTest extends IgniteAt * * @throws Exception If failed. */ + @Test public void testPrepareAtomicStamped() throws Exception { /** Name of first atomic. */ String atomicName1 = UUID.randomUUID().toString(); @@ -81,6 +82,7 @@ public void testPrepareAtomicStamped() throws Exception { * * @throws Exception If failed. */ + @Test public void testSetAndGet() throws Exception { String atomicName = UUID.randomUUID().toString(); @@ -105,6 +107,7 @@ public void testSetAndGet() throws Exception { * * @throws Exception If failed. */ + @Test public void testCompareAndSetSimpleValue() throws Exception { String atomicName = UUID.randomUUID().toString(); @@ -132,6 +135,7 @@ public void testCompareAndSetSimpleValue() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIsolation() throws Exception { Ignite ignite = grid(0); @@ -186,6 +190,7 @@ public void testIsolation() throws Exception { * * @throws Exception If failed. */ + @Test public void testMultipleStructuresInDifferentGroups() throws Exception { Ignite ignite = grid(0); @@ -226,4 +231,4 @@ public void testMultipleStructuresInDifferentGroups() throws Exception { assertNotNull(ignite.atomicStamped("atomic1", "a", 1, false)); assertNotNull(ignite.atomicStamped("atomic3", cfg, "c", 3, false)); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueApiSelfAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueApiSelfAbstractTest.java index ef97c91f03230..6bdf754615680 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueApiSelfAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueApiSelfAbstractTest.java @@ -68,6 +68,7 @@ public abstract class GridCacheQueueApiSelfAbstractTest extends IgniteCollection * * @throws Exception If failed. */ + @Test public void testPrepareQueue() throws Exception { // Random sequence names. String queueName1 = UUID.randomUUID().toString(); @@ -99,6 +100,7 @@ public void testPrepareQueue() throws Exception { * * @throws Exception If failed. */ + @Test public void testAddUnbounded() throws Exception { // Random queue name. String queueName = UUID.randomUUID().toString(); @@ -117,6 +119,7 @@ public void testAddUnbounded() throws Exception { * * @throws Exception If failed. */ + @Test public void testAddDeleteUnbounded() throws Exception { // Random queue name. String queueName = UUID.randomUUID().toString(); @@ -137,6 +140,7 @@ public void testAddDeleteUnbounded() throws Exception { * * @throws Exception If failed. */ + @Test public void testCollectionMethods() throws Exception { // Random queue name. String queueName = UUID.randomUUID().toString(); @@ -213,6 +217,7 @@ public void testCollectionMethods() throws Exception { * * @throws Exception If failed. */ + @Test public void testAddPollUnbounded() throws Exception { // Random queue name. String queueName = UUID.randomUUID().toString(); @@ -235,6 +240,7 @@ public void testAddPollUnbounded() throws Exception { * * @throws Exception If failed. */ + @Test public void testAddPeekUnbounded() throws Exception { // Random queue name. String queueName = UUID.randomUUID().toString(); @@ -258,6 +264,7 @@ public void testAddPeekUnbounded() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIterator() throws Exception { checkIterator(false); } @@ -265,6 +272,7 @@ public void testIterator() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIteratorCollocated() throws Exception { checkIterator(true); } @@ -328,6 +336,7 @@ private void checkIterator(boolean collocated) { * * @throws Exception If failed. */ + @Test public void testPutGetUnbounded() throws Exception { // Random queue name. String queueName = UUID.randomUUID().toString(); @@ -350,6 +359,7 @@ public void testPutGetUnbounded() throws Exception { * * @throws Exception If failed. */ + @Test public void testPutGetMultithreadUnbounded() throws Exception { // Random queue name. String queueName = UUID.randomUUID().toString(); @@ -378,6 +388,7 @@ public void testPutGetMultithreadUnbounded() throws Exception { * * @throws Exception If failed. */ + @Test public void testPutGetMultithreadBounded() throws Exception { // Random queue name. String queueName = UUID.randomUUID().toString(); @@ -405,6 +416,7 @@ public void testPutGetMultithreadBounded() throws Exception { * * @throws Exception If failed. */ + @Test public void testQueueRemoveMultithreadBounded() throws Exception { // Random queue name. final String queueName = UUID.randomUUID().toString(); @@ -485,6 +497,7 @@ public void testQueueRemoveMultithreadBounded() throws Exception { * * @throws Exception If failed. */ + @Test public void testPutRemoveUnbounded() throws Exception { // Random queue name. String queueName = UUID.randomUUID().toString(); @@ -510,6 +523,7 @@ public void testPutRemoveUnbounded() throws Exception { * * @throws Exception If failed. */ + @Test public void testPutRemoveMultiThreadedUnbounded() throws Exception { // Random queue name. String queueName = UUID.randomUUID().toString(); @@ -544,6 +558,7 @@ public void testPutRemoveMultiThreadedUnbounded() throws Exception { * * @throws Exception If failed. */ + @Test public void testPutRemovePeekPollUnbounded() throws Exception { // Random queue name. String queueName = UUID.randomUUID().toString(); @@ -575,6 +590,7 @@ public void testPutRemovePeekPollUnbounded() throws Exception { * * @throws Exception If failed. */ + @Test public void testRemovePeek() throws Exception { // Random queue name. String queueName = UUID.randomUUID().toString(); @@ -608,6 +624,7 @@ public void testRemovePeek() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReuseCache() throws Exception { CollectionConfiguration colCfg = collectionConfiguration(); @@ -621,6 +638,7 @@ public void testReuseCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNotReuseCache() throws Exception { CollectionConfiguration colCfg1 = collectionConfiguration(); @@ -641,6 +659,7 @@ public void testNotReuseCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFilterNode() throws Exception { CollectionConfiguration colCfg1 = collectionConfiguration(); @@ -667,6 +686,7 @@ public void testFilterNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSystemCache() throws Exception { CollectionConfiguration colCfg = collectionConfiguration(); @@ -687,6 +707,7 @@ public void testSystemCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAffinityRun() throws Exception { final CollectionConfiguration colCfg = collectionConfiguration(); @@ -735,6 +756,7 @@ public void testAffinityRun() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAffinityCall() throws Exception { final CollectionConfiguration colCfg = collectionConfiguration(); @@ -788,6 +810,7 @@ public void testAffinityCall() throws Exception { * * @throws Exception If failed. */ + @Test public void testIsolation() throws Exception { Ignite ignite = grid(0); @@ -841,6 +864,7 @@ public void testIsolation() throws Exception { * * @throws Exception If failed. */ + @Test public void testCacheReuse() throws Exception { Ignite ignite = grid(0); @@ -877,6 +901,7 @@ public void testCacheReuse() throws Exception { * * @throws Exception If failed. */ + @Test public void testMultipleStructuresInDifferentGroups() throws Exception { Ignite ignite = grid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueCleanupSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueCleanupSelfTest.java index d33a3792d9113..2e498ec4a708f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueCleanupSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueCleanupSelfTest.java @@ -74,6 +74,7 @@ public class GridCacheQueueCleanupSelfTest extends IgniteCollectionAbstractTest /** * @throws Exception If failed. */ + @Test public void testCleanup() throws Exception { IgniteQueue queue = grid(0).queue(QUEUE_NAME1, 0, config(false)); @@ -230,4 +231,4 @@ private IgniteInternalFuture startAddPollThread(final Ignite ignite, final At } }); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueClientDisconnectTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueClientDisconnectTest.java index dac3ff6730e41..314ea5fafe062 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueClientDisconnectTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueClientDisconnectTest.java @@ -1,127 +1,128 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You 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.apache.ignite.internal.processors.cache.datastructures; - -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import org.apache.ignite.Ignite; -import org.apache.ignite.IgniteClientDisconnectedException; -import org.apache.ignite.IgniteQueue; -import org.apache.ignite.cache.CacheAtomicityMode; -import org.apache.ignite.configuration.CollectionConfiguration; -import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.internal.util.typedef.internal.U; -import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; -import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; -import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; -import org.apache.ignite.testframework.GridTestUtils; -import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; - -/** - * - */ -public class GridCacheQueueClientDisconnectTest extends GridCommonAbstractTest { - /** */ - private static final String IGNITE_QUEUE_NAME = "ignite-queue-client-reconnect-test"; - - /** */ - private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); - - /** */ - private static final int FAILURE_DETECTION_TIMEOUT = 10_000; - - /** */ - private boolean clientMode; - - /** {@inheritDoc} */ - @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { - IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - - TcpDiscoverySpi spi = new TcpDiscoverySpi(); - - spi.setIpFinder(ipFinder); - - spi.setClientReconnectDisabled(false); - - cfg.setDiscoverySpi(spi); - - cfg.setFailureDetectionTimeout(FAILURE_DETECTION_TIMEOUT); - cfg.setClientFailureDetectionTimeout(FAILURE_DETECTION_TIMEOUT); - - if (clientMode) - cfg.setClientMode(true); - - return cfg; - } - - /** - * @param cacheAtomicityMode Atomicity mode. - * @return Configuration. - */ - private static CollectionConfiguration collectionConfiguration(CacheAtomicityMode cacheAtomicityMode) { - CollectionConfiguration colCfg = new CollectionConfiguration(); - - colCfg.setAtomicityMode(cacheAtomicityMode); - - return colCfg; - } - - /** - * @throws Exception If failed. - */ - public void testClientDisconnect() throws Exception { - try { - Ignite server = startGrid(0); - - clientMode = true; - - Ignite client = startGrid(1); - - awaitPartitionMapExchange(); - - final IgniteQueue queue = client.queue( - IGNITE_QUEUE_NAME, 0, collectionConfiguration(CacheAtomicityMode.ATOMIC)); - - final CountDownLatch latch = new CountDownLatch(1); - - GridTestUtils.runAsync(new Runnable() { - @Override public void run() { - try { - Object value = queue.take(); - } - catch (IgniteClientDisconnectedException icd) { - latch.countDown(); - } - catch (Exception e) { - } - } - }); - - U.sleep(5000); - - server.close(); - - boolean countReachedZero = latch.await(FAILURE_DETECTION_TIMEOUT * 2, TimeUnit.MILLISECONDS); - - assertTrue("IgniteClientDisconnectedException was not thrown", countReachedZero); - } - finally { - stopAllGrids(); - } - } -} +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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.apache.ignite.internal.processors.cache.datastructures; + +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; +import org.apache.ignite.Ignite; +import org.apache.ignite.IgniteClientDisconnectedException; +import org.apache.ignite.IgniteQueue; +import org.apache.ignite.cache.CacheAtomicityMode; +import org.apache.ignite.configuration.CollectionConfiguration; +import org.apache.ignite.configuration.IgniteConfiguration; +import org.apache.ignite.internal.util.typedef.internal.U; +import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; +import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; +import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; +import org.apache.ignite.testframework.GridTestUtils; +import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; + +/** + * + */ +public class GridCacheQueueClientDisconnectTest extends GridCommonAbstractTest { + /** */ + private static final String IGNITE_QUEUE_NAME = "ignite-queue-client-reconnect-test"; + + /** */ + private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); + + /** */ + private static final int FAILURE_DETECTION_TIMEOUT = 10_000; + + /** */ + private boolean clientMode; + + /** {@inheritDoc} */ + @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { + IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); + + TcpDiscoverySpi spi = new TcpDiscoverySpi(); + + spi.setIpFinder(ipFinder); + + spi.setClientReconnectDisabled(false); + + cfg.setDiscoverySpi(spi); + + cfg.setFailureDetectionTimeout(FAILURE_DETECTION_TIMEOUT); + cfg.setClientFailureDetectionTimeout(FAILURE_DETECTION_TIMEOUT); + + if (clientMode) + cfg.setClientMode(true); + + return cfg; + } + + /** + * @param cacheAtomicityMode Atomicity mode. + * @return Configuration. + */ + private static CollectionConfiguration collectionConfiguration(CacheAtomicityMode cacheAtomicityMode) { + CollectionConfiguration colCfg = new CollectionConfiguration(); + + colCfg.setAtomicityMode(cacheAtomicityMode); + + return colCfg; + } + + /** + * @throws Exception If failed. + */ + @Test + public void testClientDisconnect() throws Exception { + try { + Ignite server = startGrid(0); + + clientMode = true; + + Ignite client = startGrid(1); + + awaitPartitionMapExchange(); + + final IgniteQueue queue = client.queue( + IGNITE_QUEUE_NAME, 0, collectionConfiguration(CacheAtomicityMode.ATOMIC)); + + final CountDownLatch latch = new CountDownLatch(1); + + GridTestUtils.runAsync(new Runnable() { + @Override public void run() { + try { + Object value = queue.take(); + } + catch (IgniteClientDisconnectedException icd) { + latch.countDown(); + } + catch (Exception e) { + } + } + }); + + U.sleep(5000); + + server.close(); + + boolean countReachedZero = latch.await(FAILURE_DETECTION_TIMEOUT * 2, TimeUnit.MILLISECONDS); + + assertTrue("IgniteClientDisconnectedException was not thrown", countReachedZero); + } + finally { + stopAllGrids(); + } + } +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueJoinedNodeSelfAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueJoinedNodeSelfAbstractTest.java index eb8c3c08eef78..7fe7d8ca589e1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueJoinedNodeSelfAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueJoinedNodeSelfAbstractTest.java @@ -59,6 +59,7 @@ public abstract class GridCacheQueueJoinedNodeSelfAbstractTest extends IgniteCol /** * @throws Exception If failed. */ + @Test public void testTakeFromJoined() throws Exception { String queueName = UUID.randomUUID().toString(); @@ -283,4 +284,4 @@ private void awaitDone() throws IgniteInterruptedCheckedException { return S.toString(TakeJob.class, this); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeAbstractSelfTest.java index 8f13cef96914e..9883a608b89ad 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeAbstractSelfTest.java @@ -110,6 +110,7 @@ public abstract class GridCacheQueueMultiNodeAbstractSelfTest extends IgniteColl /** * @throws Exception If failed. */ + @Test public void testPut() throws Exception { String queueName = UUID.randomUUID().toString(); @@ -125,6 +126,7 @@ public void testPut() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutPollCollocated() throws Exception { try { final String queueName = UUID.randomUUID().toString(); @@ -227,6 +229,7 @@ public void testPutPollCollocated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAddAll() throws Exception { try { String queueName = UUID.randomUUID().toString(); @@ -255,6 +258,7 @@ public void testAddAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGet() throws Exception { String queueName = UUID.randomUUID().toString(); @@ -278,6 +282,7 @@ public void testGet() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutTake() throws Exception { String queueName = UUID.randomUUID().toString(); @@ -297,6 +302,7 @@ public void testPutTake() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAddMultinode() throws Exception { testAddMultinode(true); @@ -360,6 +366,7 @@ private void testAddMultinode(final boolean collocated) throws Exception { /** * @throws Exception If failed. */ + @Test public void testAddPollMultinode() throws Exception { testAddPollMultinode(true); @@ -464,6 +471,7 @@ private void testAddPollMultinode(final boolean collocated) throws Exception { /** * @throws Exception If failed. */ + @Test public void testIterator() throws Exception { final String queueName = UUID.randomUUID().toString(); @@ -512,6 +520,7 @@ public void testIterator() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSerialization() throws Exception { // Random queue name. String queueName = UUID.randomUUID().toString(); @@ -775,4 +784,4 @@ protected static class PutTakeJob implements IgniteCallable { return S.toString(PutTakeJob.class, this); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeConsistencySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeConsistencySelfTest.java index a48c3e29982ec..80c67acd7af63 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeConsistencySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeConsistencySelfTest.java @@ -93,6 +93,7 @@ public class GridCacheQueueMultiNodeConsistencySelfTest extends IgniteCollection /** * @throws Exception If failed. */ + @Test public void testIteratorIfBackupDisabled() throws Exception { backups = 0; @@ -102,6 +103,7 @@ public void testIteratorIfBackupDisabled() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIteratorIfNoPreloadingAndBackupDisabledAndRepartitionForced() throws Exception { backups = 0; @@ -113,6 +115,7 @@ public void testIteratorIfNoPreloadingAndBackupDisabledAndRepartitionForced() th /** * @throws Exception If failed. */ + @Test public void testIteratorIfBackupEnabled() throws Exception { backups = 1; @@ -122,6 +125,7 @@ public void testIteratorIfBackupEnabled() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIteratorIfBackupEnabledAndOneNodeIsKilled() throws Exception { backups = 1; @@ -203,4 +207,4 @@ private void checkCacheQueue() throws Exception { queue0.close(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueRotativeMultiNodeAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueRotativeMultiNodeAbstractTest.java index d10a020a4a459..1793f3b054182 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueRotativeMultiNodeAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueRotativeMultiNodeAbstractTest.java @@ -79,6 +79,7 @@ public abstract class GridCacheQueueRotativeMultiNodeAbstractTest extends Ignite * * @throws Exception If failed. */ + @Test public void testPutRotativeNodes() throws Exception { String queueName = UUID.randomUUID().toString(); @@ -108,6 +109,7 @@ public void testPutRotativeNodes() throws Exception { * * @throws Exception If failed. */ + @Test public void testPutTakeRotativeNodes() throws Exception { String queueName = UUID.randomUUID().toString(); @@ -137,6 +139,7 @@ public void testPutTakeRotativeNodes() throws Exception { * * @throws Exception If failed. */ + @Test public void testTakeRemoveRotativeNodes() throws Exception { lthTake = new CountDownLatch(1); @@ -378,4 +381,4 @@ protected static class RemoveQueueJob implements IgniteCallable { return S.toString(RemoveQueueJob.class, this); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSequenceApiSelfAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSequenceApiSelfAbstractTest.java index 81292c7cbefcf..7715f5f74ed1a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSequenceApiSelfAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSequenceApiSelfAbstractTest.java @@ -145,6 +145,7 @@ public abstract class GridCacheSequenceApiSelfAbstractTest extends IgniteAtomics /** * @throws Exception If failed. */ + @Test public void testPrepareSequence() throws Exception { // Random sequence names. String locSeqName1 = UUID.randomUUID().toString(); @@ -169,6 +170,7 @@ public void testPrepareSequence() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAddWrongValue() throws Exception { for (IgniteAtomicSequence seq : seqArr) { try { @@ -194,6 +196,7 @@ public void testAddWrongValue() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetAndIncrement() throws Exception { for (int i = 0; i < MAX_LOOPS_NUM; i++) { for (IgniteAtomicSequence seq : seqArr) @@ -207,6 +210,7 @@ public void testGetAndIncrement() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIncrementAndGet() throws Exception { for (int i = 0; i < MAX_LOOPS_NUM; i++) { for (IgniteAtomicSequence seq : seqArr) @@ -220,6 +224,7 @@ public void testIncrementAndGet() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAddAndGet() throws Exception { for (int i = 1; i < MAX_LOOPS_NUM; i++) { for (IgniteAtomicSequence seq : seqArr) @@ -233,6 +238,7 @@ public void testAddAndGet() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetAndAdd() throws Exception { for (int i = 1; i < MAX_LOOPS_NUM; i++) { for (IgniteAtomicSequence seq : seqArr) @@ -246,6 +252,7 @@ public void testGetAndAdd() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetAndAddInTx() throws Exception { try (Transaction tx = grid().transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) { for (int i = 1; i < MAX_LOOPS_NUM; i++) { @@ -261,6 +268,7 @@ public void testGetAndAddInTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSequenceIntegrity0() throws Exception { // Random sequence names. String locSeqName1 = UUID.randomUUID().toString(); @@ -294,6 +302,7 @@ public void testSequenceIntegrity0() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSequenceIntegrity1() throws Exception { sequenceIntegrity(1, 0); sequenceIntegrity(7, -1500); @@ -303,6 +312,7 @@ public void testSequenceIntegrity1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultiThreadedSequenceIntegrity() throws Exception { multiThreadedSequenceIntegrity(1, 0); multiThreadedSequenceIntegrity(7, -1500); @@ -312,6 +322,7 @@ public void testMultiThreadedSequenceIntegrity() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemove() throws Exception { String locSeqName = UUID.randomUUID().toString(); @@ -334,6 +345,7 @@ public void testRemove() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheSets() throws Exception { // Make new atomic sequence in cache. IgniteAtomicSequence seq = grid().atomicSequence(UUID.randomUUID().toString(), 0, true); @@ -363,6 +375,7 @@ public void testCacheSets() throws Exception { * * @throws Exception If failed. */ + @Test public void testMultipleStructuresInDifferentGroups() throws Exception { Ignite ignite = grid(0); @@ -404,6 +417,7 @@ public void testMultipleStructuresInDifferentGroups() throws Exception { * * @throws Exception If failed. */ + @Test public void testSequenceReserveSizeFromExplicitConfiguration() throws Exception { Ignite ignite = grid(0); @@ -631,4 +645,4 @@ private void removeSequence(String name) throws Exception { assertNull(grid().atomicSequence(name, 0, false)); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSequenceMultiNodeAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSequenceMultiNodeAbstractSelfTest.java index 7747d1bd2a80b..5c385b230753d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSequenceMultiNodeAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSequenceMultiNodeAbstractSelfTest.java @@ -59,6 +59,7 @@ public abstract class GridCacheSequenceMultiNodeAbstractSelfTest extends IgniteA * * @throws Exception If failed. */ + @Test public void testIncrementAndGet() throws Exception { Collection res = new HashSet<>(); @@ -94,6 +95,7 @@ public void testIncrementAndGet() throws Exception { * * @throws Exception If failed. */ + @Test public void testGetAndIncrement() throws Exception { Collection res = new HashSet<>(); @@ -129,6 +131,7 @@ public void testGetAndIncrement() throws Exception { * * @throws Exception If failed. */ + @Test public void testMarshalling() throws Exception { String seqName = UUID.randomUUID().toString(); @@ -266,4 +269,4 @@ private static class GetAndIncrementJob implements IgniteCallable> { return S.toString(GetAndIncrementJob.class, this); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetAbstractSelfTest.java index bb850080e3b4f..8d62396f40e96 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetAbstractSelfTest.java @@ -167,6 +167,7 @@ private void assertSetIteratorsCleared() { /** * @throws Exception If failed. */ + @Test public void testCreateRemove() throws Exception { testCreateRemove(false); } @@ -174,6 +175,7 @@ public void testCreateRemove() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCreateRemoveCollocated() throws Exception { testCreateRemove(true); } @@ -243,6 +245,7 @@ protected void testCreateRemove(boolean collocated, int nodeIdx) throws Exceptio /** * @throws Exception If failed. */ + @Test public void testApi() throws Exception { testApi(false); } @@ -250,6 +253,7 @@ public void testApi() throws Exception { /** * @throws Exception If failed. */ + @Test public void testApiCollocated() throws Exception { testApi(true); } @@ -406,6 +410,7 @@ private void testApi(boolean collocated) throws Exception { /** * @throws Exception If failed. */ + @Test public void testIterator() throws Exception { testIterator(false); } @@ -413,6 +418,7 @@ public void testIterator() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIteratorCollocated() throws Exception { testIterator(true); } @@ -506,6 +512,7 @@ protected void testIterator(boolean collocated, int nodeIdx) throws Exception { /** * @throws Exception If failed. */ + @Test public void testIteratorClose() throws Exception { testIteratorClose(false); } @@ -513,6 +520,7 @@ public void testIteratorClose() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIteratorCloseCollocated() throws Exception { testIteratorClose(true); } @@ -591,6 +599,7 @@ private void createIterators(IgniteSet set) { /** * @throws Exception If failed. */ + @Test public void testNodeJoinsAndLeaves() throws Exception { if (collectionCacheMode() == LOCAL) return; @@ -601,6 +610,7 @@ public void testNodeJoinsAndLeaves() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNodeJoinsAndLeavesCollocated() throws Exception { if (collectionCacheMode() == LOCAL) return; @@ -651,6 +661,7 @@ private void testNodeJoinsAndLeaves(boolean collocated) throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultithreaded() throws Exception { testMultithreaded(false); } @@ -658,6 +669,7 @@ public void testMultithreaded() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultithreadedCollocated() throws Exception { if (collectionCacheMode() != PARTITIONED) return; @@ -737,6 +749,7 @@ private void testMultithreaded(final boolean collocated) throws Exception { /** * @throws Exception If failed. */ + @Test public void testCleanup() throws Exception { testCleanup(false); } @@ -744,6 +757,7 @@ public void testCleanup() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCleanupCollocated() throws Exception { testCleanup(true); } @@ -850,6 +864,7 @@ private void testCleanup(boolean collocated) throws Exception { /** * @throws Exception If failed. */ + @Test public void testSerialization() throws Exception { final IgniteSet set = grid(0).set(SET_NAME, config(false)); @@ -877,6 +892,7 @@ public void testSerialization() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAffinityRun() throws Exception { final CollectionConfiguration colCfg = collectionConfiguration(); @@ -927,6 +943,7 @@ public void testAffinityRun() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAffinityCall() throws Exception { final CollectionConfiguration colCfg = collectionConfiguration(); @@ -982,6 +999,7 @@ public void testAffinityCall() throws Exception { * * @throws Exception If failed. */ + @Test public void testIsolation() throws Exception { CollectionConfiguration colCfg = collectionConfiguration(); @@ -1027,6 +1045,7 @@ public void testIsolation() throws Exception { /** * Test that non collocated sets are stored in a separated cache. */ + @Test public void testCacheReuse() { testCacheReuse(false); } @@ -1034,6 +1053,7 @@ public void testCacheReuse() { /** * Test that collocated sets within the same group and compatible configurations are stored in the same cache. */ + @Test public void testCacheReuseCollocated() { testCacheReuse(true); } @@ -1081,6 +1101,7 @@ private void testCacheReuse(boolean collocated) { * * @throws Exception If failed. */ + @Test public void testMultipleStructuresInDifferentGroups() throws Exception { Ignite ignite = grid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetFailoverAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetFailoverAbstractSelfTest.java index ce320bd4a5ec6..1de3ff763a1dc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetFailoverAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetFailoverAbstractSelfTest.java @@ -88,6 +88,7 @@ public abstract class GridCacheSetFailoverAbstractSelfTest extends IgniteCollect * @throws Exception If failed. */ @SuppressWarnings("WhileLoopReplaceableByForEach") + @Test public void testNodeRestart() throws Exception { IgniteSet set = grid(0).set(SET_NAME, config(false)); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteAtomicLongApiAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteAtomicLongApiAbstractSelfTest.java index b7bfb027d68e7..61aa13edf1301 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteAtomicLongApiAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteAtomicLongApiAbstractSelfTest.java @@ -61,6 +61,7 @@ public abstract class IgniteAtomicLongApiAbstractSelfTest extends IgniteAtomicsA /** * @throws Exception If failed. */ + @Test public void testCreateRemove() throws Exception { info("Running test [name=" + getName() + ", cacheMode=" + atomicsCacheMode() + ']'); @@ -102,6 +103,7 @@ public void testCreateRemove() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIncrementAndGet() throws Exception { info("Running test [name=" + getName() + ", cacheMode=" + atomicsCacheMode() + ']'); @@ -118,6 +120,7 @@ public void testIncrementAndGet() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetAndIncrement() throws Exception { info("Running test [name=" + getName() + ", cacheMode=" + atomicsCacheMode() + ']'); @@ -134,6 +137,7 @@ public void testGetAndIncrement() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDecrementAndGet() throws Exception { info("Running test [name=" + getName() + ", cacheMode=" + atomicsCacheMode() + ']'); @@ -150,6 +154,7 @@ public void testDecrementAndGet() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetAndDecrement() throws Exception { info("Running test [name=" + getName() + ", cacheMode=" + atomicsCacheMode() + ']'); @@ -166,6 +171,7 @@ public void testGetAndDecrement() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetAndAdd() throws Exception { info("Running test [name=" + getName() + ", cacheMode=" + atomicsCacheMode() + ']'); @@ -184,6 +190,7 @@ public void testGetAndAdd() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAddAndGet() throws Exception { info("Running test [name=" + getName() + ", cacheMode=" + atomicsCacheMode() + ']'); @@ -202,6 +209,7 @@ public void testAddAndGet() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetAndSet() throws Exception { info("Running test [name=" + getName() + ", cacheMode=" + atomicsCacheMode() + ']'); @@ -220,6 +228,7 @@ public void testGetAndSet() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCompareAndSet() throws Exception { info("Running test [name=" + getName() + ", cacheMode=" + atomicsCacheMode() + ']'); @@ -245,6 +254,7 @@ public void testCompareAndSet() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetAndSetInTx() throws Exception { info("Running test [name=" + getName() + ", cacheMode=" + atomicsCacheMode() + ']'); @@ -272,6 +282,7 @@ public void testGetAndSetInTx() throws Exception { * * @throws Exception If failed. */ + @Test public void testIsolation() throws Exception { Ignite ignite = grid(0); @@ -298,6 +309,7 @@ public void testIsolation() throws Exception { * * @throws Exception If failed. */ + @Test public void testMultipleStructuresInDifferentGroups() throws Exception { Ignite ignite = grid(0); @@ -338,4 +350,4 @@ public void testMultipleStructuresInDifferentGroups() throws Exception { assertNotNull(ignite.atomicLong("atomic1", 1, false)); assertNotNull(ignite.atomicLong("atomic3", cfg, 3, false)); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteClientDataStructuresAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteClientDataStructuresAbstractTest.java index 118ea52c0ab1c..b87c586a1ce72 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteClientDataStructuresAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteClientDataStructuresAbstractTest.java @@ -87,6 +87,7 @@ public abstract class IgniteClientDataStructuresAbstractTest extends GridCommonA /** * @throws Exception If failed. */ + @Test public void testSequence() throws Exception { Ignite clientNode = clientIgnite(); Ignite srvNode = serverNode(); @@ -147,6 +148,7 @@ private void testSequence(Ignite creator, Ignite other) throws Exception { /** * @throws Exception If failed. */ + @Test public void testAtomicLong() throws Exception { Ignite clientNode = clientIgnite(); Ignite srvNode = serverNode(); @@ -226,6 +228,7 @@ private void assertAtomicLongClosedCorrect(IgniteAtomicLong atomicLong) { /** * @throws Exception If failed. */ + @Test public void testSet() throws Exception { Ignite clientNode = clientIgnite(); Ignite srvNode = serverNode(); @@ -274,6 +277,7 @@ private void testSet(Ignite creator, Ignite other) throws Exception { /** * @throws Exception If failed. */ + @Test public void testLatch() throws Exception { Ignite clientNode = clientIgnite(); Ignite srvNode = serverNode(); @@ -352,6 +356,7 @@ private void testLatch(Ignite creator, final Ignite other) throws Exception { /** * @throws Exception If failed. */ + @Test public void testSemaphore() throws Exception { Ignite clientNode = clientIgnite(); Ignite srvNode = serverNode(); @@ -430,6 +435,7 @@ private void testSemaphore(Ignite creator, final Ignite other) throws Exception /** * @throws Exception If failed. */ + @Test public void testReentrantLock() throws Exception { Ignite clientNode = clientIgnite(); Ignite srvNode = serverNode(); @@ -520,6 +526,7 @@ private void testReentrantLock(Ignite creator, final Ignite other) throws Except /** * @throws Exception If failed. */ + @Test public void testQueue() throws Exception { Ignite clientNode = clientIgnite(); Ignite srvNode = serverNode(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCountDownLatchAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCountDownLatchAbstractSelfTest.java index 4dcdbb7a6cf4b..bd3f0a8e130ea 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCountDownLatchAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCountDownLatchAbstractSelfTest.java @@ -77,6 +77,7 @@ public abstract class IgniteCountDownLatchAbstractSelfTest extends IgniteAtomics /** * @throws Exception If failed. */ + @Test public void testLatch() throws Exception { checkLatch(); } @@ -87,6 +88,7 @@ public void testLatch() throws Exception { * * @throws Exception If failed. */ + @Test public void testIsolation() throws Exception { Ignite ignite = grid(0); @@ -325,6 +327,7 @@ private void removeLatch(String latchName) /** * @throws Exception If failed. */ + @Test public void testLatchMultinode1() throws Exception { if (gridCount() == 1) return; @@ -382,6 +385,7 @@ public void testLatchMultinode1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLatchBroadcast() throws Exception { Ignite ignite = grid(0); ClusterGroup srvsGrp = ignite.cluster().forServers(); @@ -434,6 +438,7 @@ private IgniteCountDownLatch createLatch2(Ignite client, int numOfSrvs) { /** * @throws Exception If failed. */ + @Test public void testLatchMultinode2() throws Exception { if (gridCount() == 1) return; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteDataStructureUniqueNameTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteDataStructureUniqueNameTest.java index db4754c0a7f54..310ca3f1d9545 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteDataStructureUniqueNameTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteDataStructureUniqueNameTest.java @@ -81,6 +81,7 @@ public class IgniteDataStructureUniqueNameTest extends IgniteCollectionAbstractT /** * @throws Exception If failed. */ + @Test public void testUniqueNameMultithreaded() throws Exception { testUniqueName(true); } @@ -88,6 +89,7 @@ public void testUniqueNameMultithreaded() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUniqueNameMultinode() throws Exception { testUniqueName(false); } @@ -95,6 +97,7 @@ public void testUniqueNameMultinode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCreateRemove() throws Exception { final String name = IgniteUuid.randomUuid().toString(); @@ -232,6 +235,7 @@ public void testCreateRemove() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUniqueNamePerGroup() throws Exception { Ignite ignite = ignite(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteDataStructureWithJobTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteDataStructureWithJobTest.java index 2b99a911e02bb..da5018e13e0ec 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteDataStructureWithJobTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteDataStructureWithJobTest.java @@ -57,6 +57,7 @@ public class IgniteDataStructureWithJobTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testJobWithRestart() throws Exception { Ignite ignite = startGrid(0); @@ -103,4 +104,4 @@ public void testJobWithRestart() throws Exception { fut.get(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteExchangeLatchManagerCoordinatorFailTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteExchangeLatchManagerCoordinatorFailTest.java index d8f23acdfc1da..f47c040e37433 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteExchangeLatchManagerCoordinatorFailTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteExchangeLatchManagerCoordinatorFailTest.java @@ -145,6 +145,7 @@ public class IgniteExchangeLatchManagerCoordinatorFailTest extends GridCommonAbs * Node 3 state -> {@link #all} * Node 4 state -> {@link #beforeCreate} */ + @Test public void testCoordinatorFail1() throws Exception { List> nodeStates = Lists.newArrayList( beforeCreate, @@ -164,6 +165,7 @@ public void testCoordinatorFail1() throws Exception { * Node 3 state -> {@link #all} * Node 4 state -> {@link #beforeCreate} */ + @Test public void testCoordinatorFail2() throws Exception { List> nodeStates = Lists.newArrayList( beforeCountDown, @@ -183,6 +185,7 @@ public void testCoordinatorFail2() throws Exception { * Node 3 state -> {@link #all} * Node 4 state -> {@link #beforeCreate} */ + @Test public void testCoordinatorFail3() throws Exception { List> nodeStates = Lists.newArrayList( all, diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteLockAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteLockAbstractSelfTest.java index 812ff23ffd789..2562c3efd6a96 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteLockAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteLockAbstractSelfTest.java @@ -93,6 +93,7 @@ public abstract class IgniteLockAbstractSelfTest extends IgniteAtomicsAbstractTe /** * @throws Exception If failed. */ + @Test public void testReentrantLock() throws Exception { checkReentrantLock(false); @@ -102,6 +103,7 @@ public void testReentrantLock() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFailover() throws Exception { if (atomicsCacheMode() == LOCAL) return; @@ -121,6 +123,7 @@ public void testFailover() throws Exception { * * @throws Exception If failed. */ + @Test public void testIsolation() throws Exception { Ignite ignite = grid(0); @@ -414,6 +417,7 @@ private void removeReentrantLock(String lockName, final boolean fair) /** * @throws Exception If failed. */ + @Test public void testLockSerialization() throws Exception { final IgniteLock lock = grid(0).reentrantLock("lock", true, true, true); @@ -443,6 +447,7 @@ public void testLockSerialization() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInitialization() throws Exception { // Test #name() method. { @@ -682,6 +687,7 @@ public void testInitialization() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReentrantLockMultinode1() throws Exception { testReentrantLockMultinode1(false); @@ -759,6 +765,7 @@ private void testReentrantLockMultinode1(final boolean fair) throws Exception { /** * @throws Exception If failed. */ + @Test public void testLockInterruptibly() throws Exception { testLockInterruptibly(false); @@ -836,6 +843,7 @@ private void testLockInterruptibly(final boolean fair) throws Exception { /** * @throws Exception If failed. */ + @Test public void testLockInterruptiblyMultinode() throws Exception { testLockInterruptiblyMultinode(false); @@ -959,6 +967,7 @@ private void testLockInterruptiblyMultinode(final boolean fair) throws Exception /** * @throws Exception If failed. */ + @Test public void testLock() throws Exception { testLock(false); @@ -1042,6 +1051,7 @@ private void testLock(final boolean fair) throws Exception { /** * @throws Exception If failed. */ + @Test public void testTryLock() throws Exception { testTryLock(false); @@ -1125,6 +1135,7 @@ private void testTryLock(final boolean fair) throws Exception { /** * @throws Exception If failed. */ + @Test public void testTryLockTimed() throws Exception { testTryLockTimed(false); @@ -1201,6 +1212,7 @@ private void testTryLockTimed(final boolean fair) throws Exception { /** * @throws Exception If failed. */ + @Test public void testConditionAwaitUninterruptibly() throws Exception { testConditionAwaitUninterruptibly(false); @@ -1290,6 +1302,7 @@ private void testConditionAwaitUninterruptibly(final boolean fair) throws Except /** * @throws Exception If failed. */ + @Test public void testConditionInterruptAwait() throws Exception { testConditionInterruptAwait(false); @@ -1369,6 +1382,7 @@ private void testConditionInterruptAwait(final boolean fair) throws Exception { /** * @throws Exception If failed. */ + @Test public void testHasQueuedThreads() throws Exception { testHasQueuedThreads(false); @@ -1446,6 +1460,7 @@ private void testHasQueuedThreads(final boolean fair) throws Exception { /** * @throws Exception If failed. */ + @Test public void testHasConditionQueuedThreads() throws Exception { testHasConditionQueuedThreads(false); @@ -1557,6 +1572,7 @@ private void testHasConditionQueuedThreads(final boolean fair) throws Exception * on the OS thread scheduling, certain deviation from uniform distribution is tolerated. * @throws Exception If failed. */ + @Test public void testFairness() throws Exception { if (gridCount() == 1) return; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteSemaphoreAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteSemaphoreAbstractSelfTest.java index 445d469952409..77c99c1f5f262 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteSemaphoreAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteSemaphoreAbstractSelfTest.java @@ -82,6 +82,7 @@ public abstract class IgniteSemaphoreAbstractSelfTest extends IgniteAtomicsAbstr /** * @throws Exception If failed. */ + @Test public void testSemaphore() throws Exception { checkSemaphore(); checkSemaphoreSerialization(); @@ -90,6 +91,7 @@ public void testSemaphore() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFailover() throws Exception { if (atomicsCacheMode() == LOCAL) return; @@ -104,6 +106,7 @@ public void testFailover() throws Exception { * * @throws Exception If failed. */ + @Test public void testIsolation() throws Exception { Ignite ignite = grid(0); @@ -282,6 +285,7 @@ private void checkSemaphore() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSemaphoreClosing() throws Exception { IgniteConfiguration cfg; GridStringLogger stringLogger; @@ -472,6 +476,7 @@ private void removeSemaphore(final String semaphoreName) throws Exception { /** * @throws Exception If failed. */ + @Test public void testSemaphoreMultinode1() throws Exception { if (gridCount() == 1) return; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteSequenceInternalCleanupTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteSequenceInternalCleanupTest.java index d5a76f859266b..94481b9387a0a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteSequenceInternalCleanupTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteSequenceInternalCleanupTest.java @@ -98,6 +98,7 @@ protected AtomicConfiguration atomicConfiguration() { } /** */ + @Test public void testDeactivate() throws Exception { try { Ignite ignite = startGridsMultiThreaded(GRIDS_CNT); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/SemaphoreFailoverNoWaitingAcquirerTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/SemaphoreFailoverNoWaitingAcquirerTest.java index 862d240339ca1..884efaece3ea0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/SemaphoreFailoverNoWaitingAcquirerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/SemaphoreFailoverNoWaitingAcquirerTest.java @@ -33,7 +33,7 @@ /** * - * Class to test the retrieval of a permit on a semaphore after initial semaphore owner has been closed. + * Class to test the retrieval of a permit on a semaphore after initial semaphore owner has been closed. * * IGNITE-7090 * @@ -74,6 +74,7 @@ public class SemaphoreFailoverNoWaitingAcquirerTest extends GridCommonAbstractTe /** * @throws Exception If failed. */ + @Test public void testReleasePermitsPartitioned() throws Exception { atomicsCacheMode = PARTITIONED; @@ -83,6 +84,7 @@ public void testReleasePermitsPartitioned() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReleasePermitsReplicated() throws Exception { atomicsCacheMode = REPLICATED; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/SemaphoreFailoverSafeReleasePermitsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/SemaphoreFailoverSafeReleasePermitsTest.java index 210b234e600b5..7e63867356acc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/SemaphoreFailoverSafeReleasePermitsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/SemaphoreFailoverSafeReleasePermitsTest.java @@ -66,6 +66,7 @@ public class SemaphoreFailoverSafeReleasePermitsTest extends GridCommonAbstractT /** * @throws Exception If failed. */ + @Test public void testReleasePermitsPartitioned() throws Exception { atomicsCacheMode = PARTITIONED; @@ -75,6 +76,7 @@ public void testReleasePermitsPartitioned() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReleasePermitsReplicated() throws Exception { atomicsCacheMode = REPLICATED; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/IgniteLocalCountDownLatchSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/IgniteLocalCountDownLatchSelfTest.java index 9182c398971c3..6f1d255833db6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/IgniteLocalCountDownLatchSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/IgniteLocalCountDownLatchSelfTest.java @@ -44,7 +44,8 @@ public class IgniteLocalCountDownLatchSelfTest extends IgniteCountDownLatchAbstr } /** {@inheritDoc} */ - @Override public void testLatch() throws Exception { + @Override @Test + public void testLatch() throws Exception { // Test main functionality. IgniteCountDownLatch latch = grid(0).countDownLatch("latch", 2, false, true); @@ -92,4 +93,4 @@ public class IgniteLocalCountDownLatchSelfTest extends IgniteCountDownLatchAbstr checkRemovedLatch(latch); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/IgniteLocalLockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/IgniteLocalLockSelfTest.java index 7e1a11c17678a..550dab659cd78 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/IgniteLocalLockSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/IgniteLocalLockSelfTest.java @@ -43,7 +43,8 @@ public class IgniteLocalLockSelfTest extends IgniteLockAbstractSelfTest { } /** {@inheritDoc} */ - @Override public void testReentrantLock() throws Exception { + @Override @Test + public void testReentrantLock() throws Exception { // Test main functionality. IgniteLock lock = grid(0).reentrantLock("lock", true, false, true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/IgniteLocalSemaphoreSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/IgniteLocalSemaphoreSelfTest.java index a516fc11e2d57..31900b7ae51e9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/IgniteLocalSemaphoreSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/IgniteLocalSemaphoreSelfTest.java @@ -43,7 +43,8 @@ public class IgniteLocalSemaphoreSelfTest extends IgniteSemaphoreAbstractSelfTes } /** {@inheritDoc} */ - @Override public void testSemaphore() throws Exception { + @Override @Test + public void testSemaphore() throws Exception { // Test main functionality. IgniteSemaphore semaphore = grid(0).semaphore("semaphore", -2, false, true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSequenceMultiThreadedTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSequenceMultiThreadedTest.java index 84b55c5b3bf27..20687ded0577e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSequenceMultiThreadedTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSequenceMultiThreadedTest.java @@ -62,6 +62,7 @@ public class GridCachePartitionedAtomicSequenceMultiThreadedTest extends IgniteA } /** @throws Exception If failed. */ + @Test public void testValues() throws Exception { String seqName = UUID.randomUUID().toString(); @@ -137,16 +138,19 @@ public void testValues() throws Exception { } /** @throws Exception If failed. */ + @Test public void testUpdatedSync() throws Exception { checkUpdate(true); } /** @throws Exception If failed. */ + @Test public void testPreviousSync() throws Exception { checkUpdate(false); } /** @throws Exception If failed. */ + @Test public void testIncrementAndGet() throws Exception { // Random sequence names. String seqName = UUID.randomUUID().toString(); @@ -163,6 +167,7 @@ public void testIncrementAndGet() throws Exception { } /** @throws Exception If failed. */ + @Test public void testIncrementAndGetAsync() throws Exception { // Random sequence names. String seqName = UUID.randomUUID().toString(); @@ -179,6 +184,7 @@ public void testIncrementAndGetAsync() throws Exception { } /** @throws Exception If failed. */ + @Test public void testGetAndIncrement() throws Exception { // Random sequence names. String seqName = UUID.randomUUID().toString(); @@ -195,6 +201,7 @@ public void testGetAndIncrement() throws Exception { } /** @throws Exception If failed. */ + @Test public void testGetAndIncrementAsync() throws Exception { // Random sequence names. String seqName = UUID.randomUUID().toString(); @@ -211,6 +218,7 @@ public void testGetAndIncrementAsync() throws Exception { } /** @throws Exception If failed. */ + @Test public void testAddAndGet() throws Exception { // Random sequence names. String seqName = UUID.randomUUID().toString(); @@ -227,6 +235,7 @@ public void testAddAndGet() throws Exception { } /** @throws Exception If failed. */ + @Test public void testGetAndAdd() throws Exception { // Random sequence names. String seqName = UUID.randomUUID().toString(); @@ -243,6 +252,7 @@ public void testGetAndAdd() throws Exception { } /** @throws Exception If failed. */ + @Test public void testMixed1() throws Exception { // Random sequence names. String seqName = UUID.randomUUID().toString(); @@ -264,6 +274,7 @@ public void testMixed1() throws Exception { } /** @throws Exception If failed. */ + @Test public void testMixed2() throws Exception { // Random sequence names. String seqName = UUID.randomUUID().toString(); @@ -285,6 +296,7 @@ public void testMixed2() throws Exception { /** * @throws Exception if failed. */ + @Test public void testMultipleSequences() throws Exception { final int seqCnt = 5; final int threadCnt = 5; @@ -368,4 +380,4 @@ private void checkUpdate(boolean updated) throws Exception { private abstract static class GridInUnsafeClosure { public abstract void apply(E p) throws IgniteCheckedException; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSequenceTxSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSequenceTxSelfTest.java index 19f97bd75ebf6..b4b6b8b23d3c6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSequenceTxSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSequenceTxSelfTest.java @@ -107,6 +107,7 @@ protected AtomicConfiguration atomicConfiguration() { * * @throws Exception If failed. */ + @Test public void testTransactionIncrement() throws Exception { ignite(0).atomicSequence(SEQ_NAME, 0, true); @@ -123,6 +124,7 @@ public void testTransactionIncrement() throws Exception { /** * Tests isolation of system and user transactions. */ + @Test public void testIsolation() { IgniteAtomicSequence seq = ignite(0).atomicSequence(SEQ_NAME, 0, true); @@ -166,4 +168,4 @@ private static class IncrementClosure implements IgniteRunnable { } } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSetFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSetFailoverSelfTest.java index 4673549ca88aa..fa7e264f63a1f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSetFailoverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSetFailoverSelfTest.java @@ -32,7 +32,8 @@ public class GridCachePartitionedAtomicSetFailoverSelfTest extends GridCacheSetF } /** {@inheritDoc} */ - @Override public void testNodeRestart() throws Exception { + @Override @Test + public void testNodeRestart() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-170"); } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedNodeRestartTxSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedNodeRestartTxSelfTest.java index 00217184d5252..fd1ce7cdbb784 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedNodeRestartTxSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedNodeRestartTxSelfTest.java @@ -94,6 +94,7 @@ public GridCachePartitionedNodeRestartTxSelfTest() { * * @throws Exception If failed. */ + @Test public void testSimple() throws Exception { String key = UUID.randomUUID().toString(); @@ -115,6 +116,7 @@ public void testSimple() throws Exception { * * @throws Exception If failed. */ + @Test public void testCustom() throws Exception { String key = UUID.randomUUID().toString(); @@ -136,6 +138,7 @@ public void testCustom() throws Exception { * * @throws Exception If failed. */ + @Test public void testAtomic() throws Exception { String key = UUID.randomUUID().toString(); @@ -299,4 +302,4 @@ private void prepareAtomic(String key) throws Exception { stopGrid(0); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueCreateMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueCreateMultiNodeSelfTest.java index 4412c57b938b6..744e4dd81c9f6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueCreateMultiNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueCreateMultiNodeSelfTest.java @@ -107,6 +107,7 @@ protected CacheConfiguration cacheConfiguration() { /** * @throws Exception If failed. */ + @Test public void testQueueCreation() throws Exception { final AtomicInteger idx = new AtomicInteger(); @@ -161,6 +162,7 @@ public void testQueueCreation() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTx() throws Exception { if (cacheConfiguration().getAtomicityMode() != TRANSACTIONAL) return; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueEntryMoveSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueEntryMoveSelfTest.java index cd66f4dbc10ad..cb99212289f5f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueEntryMoveSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueEntryMoveSelfTest.java @@ -82,6 +82,7 @@ public class GridCachePartitionedQueueEntryMoveSelfTest extends IgniteCollection /** * @throws Exception If failed. */ + @Test public void testQueue() throws Exception { final String queueName = "qq"; @@ -212,4 +213,4 @@ private Collection nodes(AffinityFunction aff, int part, Collection return assignment.get(part); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedSetFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedSetFailoverSelfTest.java index ec57deab71c5f..e0b2bc3044bd6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedSetFailoverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedSetFailoverSelfTest.java @@ -31,7 +31,8 @@ public class GridCachePartitionedSetFailoverSelfTest extends GridCacheSetFailove return TRANSACTIONAL; } - @Override public void testNodeRestart(){ + @Override @Test + public void testNodeRestart(){ fail("https://issues.apache.org/jira/browse/IGNITE-1593"); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/IgnitePartitionedQueueNoBackupsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/IgnitePartitionedQueueNoBackupsTest.java index aa075c0a9eb16..682c16f14eb31 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/IgnitePartitionedQueueNoBackupsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/IgnitePartitionedQueueNoBackupsTest.java @@ -58,6 +58,7 @@ public class IgnitePartitionedQueueNoBackupsTest extends GridCachePartitionedQue /** * @throws Exception If failed. */ + @Test public void testCollocation() throws Exception { IgniteQueue queue = grid(0).queue("queue", 0, config(true)); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/IgnitePartitionedSetNoBackupsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/IgnitePartitionedSetNoBackupsSelfTest.java index 5f09dfa84a54b..27ff0858b0451 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/IgnitePartitionedSetNoBackupsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/IgnitePartitionedSetNoBackupsSelfTest.java @@ -43,6 +43,7 @@ public class IgnitePartitionedSetNoBackupsSelfTest extends GridCachePartitionedS /** * @throws Exception If failed. */ + @Test public void testCollocation() throws Exception { Set set0 = grid(0).set(SET_NAME, config(true)); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/Cache64kPartitionsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/Cache64kPartitionsTest.java index e54251e2b836c..fafcee9c37249 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/Cache64kPartitionsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/Cache64kPartitionsTest.java @@ -62,6 +62,7 @@ public class Cache64kPartitionsTest extends GridCommonAbstractTest { /** * @throws Exception if failed. */ + @Test public void testManyPartitionsNoPersistence() throws Exception { checkManyPartitions(); } @@ -69,6 +70,7 @@ public void testManyPartitionsNoPersistence() throws Exception { /** * @throws Exception if failed. */ + @Test public void testManyPartitionsWithPersistence() throws Exception { persistenceEnabled = true; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAbstractRestartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAbstractRestartSelfTest.java index dd9362671c504..56cc7936b3ea8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAbstractRestartSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAbstractRestartSelfTest.java @@ -72,6 +72,7 @@ protected int updatersNumber() { /** * @throws Exception If failed. */ + @Test public void testRestart() throws Exception { final int clientGrid = gridCount() - 1; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAffinityEarlyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAffinityEarlyTest.java index 46669acc56807..3b917231ee4ae 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAffinityEarlyTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAffinityEarlyTest.java @@ -79,6 +79,7 @@ public class CacheAffinityEarlyTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testStartNodes() throws Exception { for (int i = 0; i < iters; i++) { try { @@ -162,4 +163,4 @@ private IgniteCache getCache(Ignite grid) { return grid.getOrCreateCache(ccfg); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAsyncOperationsFailoverAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAsyncOperationsFailoverAbstractTest.java index 211320f0cfcb9..1f028fb89807f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAsyncOperationsFailoverAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAsyncOperationsFailoverAbstractTest.java @@ -96,6 +96,7 @@ public abstract class CacheAsyncOperationsFailoverAbstractTest extends GridCache /** * @throws Exception If failed. */ + @Test public void testPutAllAsyncFailover() throws Exception { putAllAsyncFailover(5, 10); } @@ -103,6 +104,7 @@ public void testPutAllAsyncFailover() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAllAsyncFailoverManyThreads() throws Exception { putAllAsyncFailover(ignite(0).configuration().getSystemThreadPoolSize() * 2, 3); } @@ -110,6 +112,7 @@ public void testPutAllAsyncFailoverManyThreads() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAsyncFailover() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-9759"); @@ -374,4 +377,4 @@ public long value() { return S.toString(TestValue.class, this); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAsyncOperationsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAsyncOperationsTest.java index 0416d17c44250..18c4b85ecacf9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAsyncOperationsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAsyncOperationsTest.java @@ -73,6 +73,7 @@ public class CacheAsyncOperationsTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testAsyncOperationsTx() throws Exception { asyncOperations(TRANSACTIONAL); } @@ -80,6 +81,7 @@ public void testAsyncOperationsTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAsyncOperationsMvccTx() throws Exception { asyncOperations(TRANSACTIONAL_SNAPSHOT); } @@ -87,6 +89,7 @@ public void testAsyncOperationsMvccTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAsyncOperationsAtomic() throws Exception { asyncOperations(ATOMIC); } @@ -263,4 +266,4 @@ private static class TestStore extends CacheStoreAdapter { // No-op. } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAtomicPrimarySyncBackPressureTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAtomicPrimarySyncBackPressureTest.java index 62707c7a48166..d9676ae67c249 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAtomicPrimarySyncBackPressureTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAtomicPrimarySyncBackPressureTest.java @@ -73,6 +73,7 @@ public class CacheAtomicPrimarySyncBackPressureTest extends GridCommonAbstractTe /** * @throws Exception If failed. */ + @Test public void testClientPut() throws Exception { Ignite srv1 = startGrid("server1"); Ignite srv2 = startGrid("server2"); @@ -85,6 +86,7 @@ public void testClientPut() throws Exception { /** * @throws Exception If failed. */ + @Test public void testServerPut() throws Exception { Ignite srv1 = startGrid("server1"); Ignite srv2 = startGrid("server2"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBaselineTopologyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBaselineTopologyTest.java index 053ed82c569d4..f77490e94413d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBaselineTopologyTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBaselineTopologyTest.java @@ -151,6 +151,7 @@ public class CacheBaselineTopologyTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testRebalanceForCacheWithNodeFilter() throws Exception { try { final int EMPTY_NODE_IDX = 2; @@ -232,6 +233,7 @@ private static class DataNodeFilter implements IgnitePredicate { /** * @throws Exception If failed. */ + @Test public void testTopologyChangesWithFixedBaseline() throws Exception { startGrids(NODE_COUNT); @@ -367,6 +369,7 @@ public void testTopologyChangesWithFixedBaseline() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBaselineTopologyChangesFromServer() throws Exception { testBaselineTopologyChanges(false); } @@ -374,6 +377,7 @@ public void testBaselineTopologyChangesFromServer() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBaselineTopologyChangesFromClient() throws Exception { testBaselineTopologyChanges(true); } @@ -381,6 +385,7 @@ public void testBaselineTopologyChangesFromClient() throws Exception { /** * @throws Exception if failed. */ + @Test public void testClusterActiveWhileBaselineChanging() throws Exception { startGrids(NODE_COUNT); @@ -542,6 +547,7 @@ private void testBaselineTopologyChanges(boolean fromClient) throws Exception { /** * @throws Exception If failed. */ + @Test public void testPrimaryLeft() throws Exception { startGrids(NODE_COUNT); @@ -629,6 +635,7 @@ else if (grid(i).localNode().equals(affNodes.get(1))) /** * @throws Exception If failed. */ + @Test public void testPrimaryLeftAndClusterRestart() throws Exception { startGrids(NODE_COUNT); @@ -740,6 +747,7 @@ else if (grid(i).localNode().equals(affNodes.get(1))) { /** * @throws Exception if failed. */ + @Test public void testMetadataUpdate() throws Exception { startGrids(5); @@ -776,6 +784,7 @@ public void testMetadataUpdate() throws Exception { /** * @throws Exception if failed. */ + @Test public void testClusterRestoredOnRestart() throws Exception { startGrids(5); @@ -811,6 +820,7 @@ public void testClusterRestoredOnRestart() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNonPersistentCachesIgnoreBaselineTopology() throws Exception { Ignite ig = startGrids(4); @@ -832,6 +842,7 @@ public void testNonPersistentCachesIgnoreBaselineTopology() throws Exception { /** * @throws Exception if failed. */ + @Test public void testAffinityAssignmentChangedAfterRestart() throws Exception { int parts = 32; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnGetAllTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnGetAllTest.java index b970787a2a432..26a7e1afb76c1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnGetAllTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnGetAllTest.java @@ -52,193 +52,225 @@ public class CacheBlockOnGetAllTest extends CacheBlockOnReadAbstractTest { /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = PARTITIONED) - @Override public void testStopBaselineAtomicPartitioned() { + @Override @Test + public void testStopBaselineAtomicPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9915"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = REPLICATED) - @Override public void testStopBaselineAtomicReplicated() { + @Override @Test + public void testStopBaselineAtomicReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9915"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) - @Override public void testStopBaselineTransactionalPartitioned() { + @Override @Test + public void testStopBaselineTransactionalPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9915"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) - @Override public void testStopBaselineTransactionalReplicated() { + @Override @Test + public void testStopBaselineTransactionalReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9915"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = PARTITIONED) - @Override public void testCreateCacheAtomicPartitioned() { + @Override @Test + public void testCreateCacheAtomicPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = REPLICATED) - @Override public void testCreateCacheAtomicReplicated() { + @Override @Test + public void testCreateCacheAtomicReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) - @Override public void testCreateCacheTransactionalPartitioned() { + @Override @Test + public void testCreateCacheTransactionalPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) - @Override public void testCreateCacheTransactionalReplicated() { + @Override @Test + public void testCreateCacheTransactionalReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = PARTITIONED) - @Override public void testDestroyCacheAtomicPartitioned() { + @Override @Test + public void testDestroyCacheAtomicPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = REPLICATED) - @Override public void testDestroyCacheAtomicReplicated() { + @Override @Test + public void testDestroyCacheAtomicReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) - @Override public void testDestroyCacheTransactionalPartitioned() { + @Override @Test + public void testDestroyCacheTransactionalPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) - @Override public void testDestroyCacheTransactionalReplicated() { + @Override @Test + public void testDestroyCacheTransactionalReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = PARTITIONED) - @Override public void testStartServerAtomicPartitioned() { + @Override @Test + public void testStartServerAtomicPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = REPLICATED) - @Override public void testStartServerAtomicReplicated() { + @Override @Test + public void testStartServerAtomicReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) - @Override public void testStartServerTransactionalPartitioned() { + @Override @Test + public void testStartServerTransactionalPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) - @Override public void testStartServerTransactionalReplicated() { + @Override @Test + public void testStartServerTransactionalReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = PARTITIONED) - @Override public void testStopServerAtomicPartitioned() { + @Override @Test + public void testStopServerAtomicPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = REPLICATED) - @Override public void testStopServerAtomicReplicated() { + @Override @Test + public void testStopServerAtomicReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) - @Override public void testStopServerTransactionalPartitioned() { + @Override @Test + public void testStopServerTransactionalPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) - @Override public void testStopServerTransactionalReplicated() { + @Override @Test + public void testStopServerTransactionalReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = PARTITIONED) - @Override public void testUpdateBaselineTopologyAtomicPartitioned() { + @Override @Test + public void testUpdateBaselineTopologyAtomicPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = REPLICATED) - @Override public void testUpdateBaselineTopologyAtomicReplicated() { + @Override @Test + public void testUpdateBaselineTopologyAtomicReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) - @Override public void testUpdateBaselineTopologyTransactionalPartitioned() { + @Override @Test + public void testUpdateBaselineTopologyTransactionalPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) - @Override public void testUpdateBaselineTopologyTransactionalReplicated() { + @Override @Test + public void testUpdateBaselineTopologyTransactionalReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = PARTITIONED) - @Override public void testStartClientAtomicPartitioned() { + @Override @Test + public void testStartClientAtomicPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9987"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = REPLICATED) - @Override public void testStartClientAtomicReplicated() { + @Override @Test + public void testStartClientAtomicReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9987"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) - @Override public void testStartClientTransactionalPartitioned() { + @Override @Test + public void testStartClientTransactionalPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9987"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) - @Override public void testStartClientTransactionalReplicated() { + @Override @Test + public void testStartClientTransactionalReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9987"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = PARTITIONED) - @Override public void testStopClientAtomicPartitioned() { + @Override @Test + public void testStopClientAtomicPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9987"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = REPLICATED) - @Override public void testStopClientAtomicReplicated() { + @Override @Test + public void testStopClientAtomicReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9987"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) - @Override public void testStopClientTransactionalPartitioned() { + @Override @Test + public void testStopClientTransactionalPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9987"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) - @Override public void testStopClientTransactionalReplicated() { + @Override @Test + public void testStopClientTransactionalReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9987"); } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnReadAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnReadAbstractTest.java index 211e9bc86c3fd..d8ba26c565dd2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnReadAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnReadAbstractTest.java @@ -353,6 +353,7 @@ public List clients() { * @throws Exception If failed. */ @Params(atomicityMode = ATOMIC, cacheMode = PARTITIONED) + @Test public void testCreateCacheAtomicPartitioned() throws Exception { testCreateCacheTransactionalReplicated(); } @@ -361,6 +362,7 @@ public void testCreateCacheAtomicPartitioned() throws Exception { * @throws Exception If failed. */ @Params(atomicityMode = ATOMIC, cacheMode = REPLICATED) + @Test public void testCreateCacheAtomicReplicated() throws Exception { testCreateCacheTransactionalReplicated(); } @@ -369,6 +371,7 @@ public void testCreateCacheAtomicReplicated() throws Exception { * @throws Exception If failed. */ @Params(atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) + @Test public void testCreateCacheTransactionalPartitioned() throws Exception { testCreateCacheTransactionalReplicated(); } @@ -377,6 +380,7 @@ public void testCreateCacheTransactionalPartitioned() throws Exception { * @throws Exception If failed. */ @Params(atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) + @Test public void testCreateCacheTransactionalReplicated() throws Exception { doTest( asMessagePredicate(CacheBlockOnReadAbstractTest::createCachePredicate), @@ -388,6 +392,7 @@ public void testCreateCacheTransactionalReplicated() throws Exception { * @throws Exception If failed. */ @Params(timeout = 5000L, atomicityMode = ATOMIC, cacheMode = PARTITIONED) + @Test public void testDestroyCacheAtomicPartitioned() throws Exception { testDestroyCacheTransactionalReplicated(); } @@ -396,6 +401,7 @@ public void testDestroyCacheAtomicPartitioned() throws Exception { * @throws Exception If failed. */ @Params(timeout = 5000L, atomicityMode = ATOMIC, cacheMode = REPLICATED) + @Test public void testDestroyCacheAtomicReplicated() throws Exception { testDestroyCacheTransactionalReplicated(); } @@ -404,6 +410,7 @@ public void testDestroyCacheAtomicReplicated() throws Exception { * @throws Exception If failed. */ @Params(timeout = 5000L, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) + @Test public void testDestroyCacheTransactionalPartitioned() throws Exception { testDestroyCacheTransactionalReplicated(); } @@ -412,6 +419,7 @@ public void testDestroyCacheTransactionalPartitioned() throws Exception { * @throws Exception If failed. */ @Params(timeout = 5000L, atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) + @Test public void testDestroyCacheTransactionalReplicated() throws Exception { List cacheNames = new ArrayList<>(Arrays.asList( UUID.randomUUID().toString(), @@ -432,6 +440,7 @@ public void testDestroyCacheTransactionalReplicated() throws Exception { * @throws Exception If failed. */ @Params(atomicityMode = ATOMIC, cacheMode = PARTITIONED) + @Test public void testStartServerAtomicPartitioned() throws Exception { testStartServerTransactionalReplicated(); } @@ -440,6 +449,7 @@ public void testStartServerAtomicPartitioned() throws Exception { * @throws Exception If failed. */ @Params(atomicityMode = ATOMIC, cacheMode = REPLICATED) + @Test public void testStartServerAtomicReplicated() throws Exception { testStartServerTransactionalReplicated(); } @@ -448,6 +458,7 @@ public void testStartServerAtomicReplicated() throws Exception { * @throws Exception If failed. */ @Params(atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) + @Test public void testStartServerTransactionalPartitioned() throws Exception { testStartServerTransactionalReplicated(); } @@ -456,6 +467,7 @@ public void testStartServerTransactionalPartitioned() throws Exception { * @throws Exception If failed. */ @Params(atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) + @Test public void testStartServerTransactionalReplicated() throws Exception { startNodesInClientMode(false); @@ -469,6 +481,7 @@ public void testStartServerTransactionalReplicated() throws Exception { * @throws Exception If failed. */ @Params(servers = 4, atomicityMode = ATOMIC, cacheMode = PARTITIONED) + @Test public void testStopServerAtomicPartitioned() throws Exception { testStopServerTransactionalReplicated(); } @@ -477,6 +490,7 @@ public void testStopServerAtomicPartitioned() throws Exception { * @throws Exception If failed. */ @Params(servers = 4, atomicityMode = ATOMIC, cacheMode = REPLICATED) + @Test public void testStopServerAtomicReplicated() throws Exception { testStopServerTransactionalReplicated(); } @@ -485,6 +499,7 @@ public void testStopServerAtomicReplicated() throws Exception { * @throws Exception If failed. */ @Params(servers = 4, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) + @Test public void testStopServerTransactionalPartitioned() throws Exception { testStopServerTransactionalReplicated(); } @@ -493,6 +508,7 @@ public void testStopServerTransactionalPartitioned() throws Exception { * @throws Exception If failed. */ @Params(servers = 4, atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) + @Test public void testStopServerTransactionalReplicated() throws Exception { doTest( asMessagePredicate(discoEvt -> discoEvt.type() == EventType.EVT_NODE_LEFT), @@ -504,6 +520,7 @@ public void testStopServerTransactionalReplicated() throws Exception { * @throws Exception If failed. */ @Params(baseline = 4, atomicityMode = ATOMIC, cacheMode = PARTITIONED) + @Test public void testRestartBaselineAtomicPartitioned() throws Exception { testRestartBaselineTransactionalReplicated(); } @@ -512,6 +529,7 @@ public void testRestartBaselineAtomicPartitioned() throws Exception { * @throws Exception If failed. */ @Params(baseline = 4, atomicityMode = ATOMIC, cacheMode = REPLICATED) + @Test public void testRestartBaselineAtomicReplicated() throws Exception { testRestartBaselineTransactionalReplicated(); } @@ -520,6 +538,7 @@ public void testRestartBaselineAtomicReplicated() throws Exception { * @throws Exception If failed. */ @Params(baseline = 4, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) + @Test public void testRestartBaselineTransactionalPartitioned() throws Exception { testRestartBaselineTransactionalReplicated(); } @@ -528,6 +547,7 @@ public void testRestartBaselineTransactionalPartitioned() throws Exception { * @throws Exception If failed. */ @Params(baseline = 4, atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) + @Test public void testRestartBaselineTransactionalReplicated() throws Exception { doTest( asMessagePredicate(discoEvt -> discoEvt.type() == EventType.EVT_NODE_JOINED), @@ -550,6 +570,7 @@ public void testRestartBaselineTransactionalReplicated() throws Exception { * @throws Exception If failed. */ @Params(timeout = 5000L, atomicityMode = ATOMIC, cacheMode = PARTITIONED) + @Test public void testUpdateBaselineTopologyAtomicPartitioned() throws Exception { testUpdateBaselineTopologyTransactionalReplicated(); } @@ -558,6 +579,7 @@ public void testUpdateBaselineTopologyAtomicPartitioned() throws Exception { * @throws Exception If failed. */ @Params(timeout = 5000L, atomicityMode = ATOMIC, cacheMode = REPLICATED) + @Test public void testUpdateBaselineTopologyAtomicReplicated() throws Exception { testUpdateBaselineTopologyTransactionalReplicated(); } @@ -566,6 +588,7 @@ public void testUpdateBaselineTopologyAtomicReplicated() throws Exception { * @throws Exception If failed. */ @Params(timeout = 5000L, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) + @Test public void testUpdateBaselineTopologyTransactionalPartitioned() throws Exception { testUpdateBaselineTopologyTransactionalReplicated(); } @@ -574,6 +597,7 @@ public void testUpdateBaselineTopologyTransactionalPartitioned() throws Exceptio * @throws Exception If failed. */ @Params(timeout = 5000L, atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) + @Test public void testUpdateBaselineTopologyTransactionalReplicated() throws Exception { doTest( asMessagePredicate(discoEvt -> { @@ -603,6 +627,7 @@ public void testUpdateBaselineTopologyTransactionalReplicated() throws Exception * @throws Exception If failed. */ @Params(baseline = 9, atomicityMode = ATOMIC, cacheMode = PARTITIONED) + @Test public void testStopBaselineAtomicPartitioned() throws Exception { testStopBaselineTransactionalReplicated(); } @@ -611,6 +636,7 @@ public void testStopBaselineAtomicPartitioned() throws Exception { * @throws Exception If failed. */ @Params(baseline = 9, atomicityMode = ATOMIC, cacheMode = REPLICATED) + @Test public void testStopBaselineAtomicReplicated() throws Exception { testStopBaselineTransactionalReplicated(); } @@ -619,6 +645,7 @@ public void testStopBaselineAtomicReplicated() throws Exception { * @throws Exception If failed. */ @Params(baseline = 9, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) + @Test public void testStopBaselineTransactionalPartitioned() throws Exception { testStopBaselineTransactionalReplicated(); } @@ -627,6 +654,7 @@ public void testStopBaselineTransactionalPartitioned() throws Exception { * @throws Exception If failed. */ @Params(baseline = 9, atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) + @Test public void testStopBaselineTransactionalReplicated() throws Exception { AtomicInteger cntDownCntr = new AtomicInteger(0); @@ -651,6 +679,7 @@ public void testStopBaselineTransactionalReplicated() throws Exception { * @throws Exception If failed. */ @Params(atomicityMode = ATOMIC, cacheMode = PARTITIONED) + @Test public void testStartClientAtomicPartitioned() throws Exception { testStartClientTransactionalReplicated(); } @@ -659,6 +688,7 @@ public void testStartClientAtomicPartitioned() throws Exception { * @throws Exception If failed. */ @Params(atomicityMode = ATOMIC, cacheMode = REPLICATED) + @Test public void testStartClientAtomicReplicated() throws Exception { testStartClientTransactionalReplicated(); } @@ -667,6 +697,7 @@ public void testStartClientAtomicReplicated() throws Exception { * @throws Exception If failed. */ @Params(atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) + @Test public void testStartClientTransactionalPartitioned() throws Exception { testStartClientTransactionalReplicated(); } @@ -675,6 +706,7 @@ public void testStartClientTransactionalPartitioned() throws Exception { * @throws Exception If failed. */ @Params(atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) + @Test public void testStartClientTransactionalReplicated() throws Exception { doTest( TcpDiscoveryNodeAddFinishedMessage.class, @@ -700,6 +732,7 @@ public void testStartClientTransactionalReplicated() throws Exception { * @throws Exception If failed. */ @Params(atomicityMode = ATOMIC, cacheMode = PARTITIONED) + @Test public void testStopClientAtomicPartitioned() throws Exception { testStopClientTransactionalReplicated(); } @@ -708,6 +741,7 @@ public void testStopClientAtomicPartitioned() throws Exception { * @throws Exception If failed. */ @Params(atomicityMode = ATOMIC, cacheMode = REPLICATED) + @Test public void testStopClientAtomicReplicated() throws Exception { testStopClientTransactionalReplicated(); } @@ -716,6 +750,7 @@ public void testStopClientAtomicReplicated() throws Exception { * @throws Exception If failed. */ @Params(atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) + @Test public void testStopClientTransactionalPartitioned() throws Exception { testStopClientTransactionalReplicated(); } @@ -724,6 +759,7 @@ public void testStopClientTransactionalPartitioned() throws Exception { * @throws Exception If failed. */ @Params(atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED, timeout = 5_000L) + @Test public void testStopClientTransactionalReplicated() throws Exception { startNodesInClientMode(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnScanTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnScanTest.java index dfe68082b8738..9cc21262b459e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnScanTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnScanTest.java @@ -49,73 +49,85 @@ public class CacheBlockOnScanTest extends CacheBlockOnReadAbstractTest { /** {@inheritDoc} */ @Params(baseline = 9, atomicityMode = ATOMIC, cacheMode = PARTITIONED, allowException = true) - @Override public void testStopBaselineAtomicPartitioned() throws Exception { + @Override @Test + public void testStopBaselineAtomicPartitioned() throws Exception { super.testStopBaselineAtomicPartitioned(); } /** {@inheritDoc} */ @Params(baseline = 9, atomicityMode = ATOMIC, cacheMode = REPLICATED, allowException = true) - @Override public void testStopBaselineAtomicReplicated() throws Exception { + @Override @Test + public void testStopBaselineAtomicReplicated() throws Exception { super.testStopBaselineAtomicReplicated(); } /** {@inheritDoc} */ @Params(baseline = 9, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED, allowException = true) - @Override public void testStopBaselineTransactionalPartitioned() throws Exception { + @Override @Test + public void testStopBaselineTransactionalPartitioned() throws Exception { super.testStopBaselineTransactionalPartitioned(); } /** {@inheritDoc} */ @Params(baseline = 9, atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED, allowException = true) - @Override public void testStopBaselineTransactionalReplicated() throws Exception { + @Override @Test + public void testStopBaselineTransactionalReplicated() throws Exception { super.testStopBaselineTransactionalReplicated(); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = REPLICATED) - @Override public void testStartClientAtomicReplicated() { + @Override @Test + public void testStartClientAtomicReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9987"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) - @Override public void testStartClientTransactionalReplicated() { + @Override @Test + public void testStartClientTransactionalReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9987"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = REPLICATED) - @Override public void testStopClientAtomicReplicated() { + @Override @Test + public void testStopClientAtomicReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9987"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) - @Override public void testStopClientTransactionalReplicated() { + @Override @Test + public void testStopClientTransactionalReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9987"); } /** {@inheritDoc} */ @Params(atomicityMode = ATOMIC, cacheMode = PARTITIONED) - @Override public void testStartClientAtomicPartitioned() throws Exception { + @Override @Test + public void testStartClientAtomicPartitioned() throws Exception { super.testStartClientTransactionalReplicated(); } /** {@inheritDoc} */ @Params(atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) - @Override public void testStartClientTransactionalPartitioned() throws Exception { + @Override @Test + public void testStartClientTransactionalPartitioned() throws Exception { super.testStartClientTransactionalReplicated(); } /** {@inheritDoc} */ @Params(atomicityMode = ATOMIC, cacheMode = PARTITIONED) - @Override public void testStopClientAtomicPartitioned() throws Exception { + @Override @Test + public void testStopClientAtomicPartitioned() throws Exception { super.testStopClientTransactionalReplicated(); } /** {@inheritDoc} */ @Params(atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) - @Override public void testStopClientTransactionalPartitioned() throws Exception { + @Override @Test + public void testStopClientTransactionalPartitioned() throws Exception { super.testStopClientTransactionalReplicated(); } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnSingleGetTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnSingleGetTest.java index e5d1fe19d3267..2e0f6fe79aa25 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnSingleGetTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnSingleGetTest.java @@ -46,193 +46,225 @@ public class CacheBlockOnSingleGetTest extends CacheBlockOnReadAbstractTest { /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = PARTITIONED) - @Override public void testStopBaselineAtomicPartitioned() { + @Override @Test + public void testStopBaselineAtomicPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9915"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = REPLICATED) - @Override public void testStopBaselineAtomicReplicated() { + @Override @Test + public void testStopBaselineAtomicReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9915"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) - @Override public void testStopBaselineTransactionalPartitioned() { + @Override @Test + public void testStopBaselineTransactionalPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9915"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) - @Override public void testStopBaselineTransactionalReplicated() { + @Override @Test + public void testStopBaselineTransactionalReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9915"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = PARTITIONED) - @Override public void testCreateCacheAtomicPartitioned() { + @Override @Test + public void testCreateCacheAtomicPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = REPLICATED) - @Override public void testCreateCacheAtomicReplicated() { + @Override @Test + public void testCreateCacheAtomicReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) - @Override public void testCreateCacheTransactionalPartitioned() { + @Override @Test + public void testCreateCacheTransactionalPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) - @Override public void testCreateCacheTransactionalReplicated() { + @Override @Test + public void testCreateCacheTransactionalReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = PARTITIONED) - @Override public void testDestroyCacheAtomicPartitioned() { + @Override @Test + public void testDestroyCacheAtomicPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = REPLICATED) - @Override public void testDestroyCacheAtomicReplicated() { + @Override @Test + public void testDestroyCacheAtomicReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) - @Override public void testDestroyCacheTransactionalPartitioned() { + @Override @Test + public void testDestroyCacheTransactionalPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) - @Override public void testDestroyCacheTransactionalReplicated() { + @Override @Test + public void testDestroyCacheTransactionalReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = PARTITIONED) - @Override public void testStartServerAtomicPartitioned() { + @Override @Test + public void testStartServerAtomicPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = REPLICATED) - @Override public void testStartServerAtomicReplicated() { + @Override @Test + public void testStartServerAtomicReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) - @Override public void testStartServerTransactionalPartitioned() { + @Override @Test + public void testStartServerTransactionalPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) - @Override public void testStartServerTransactionalReplicated() { + @Override @Test + public void testStartServerTransactionalReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = PARTITIONED) - @Override public void testStopServerAtomicPartitioned() { + @Override @Test + public void testStopServerAtomicPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = REPLICATED) - @Override public void testStopServerAtomicReplicated() { + @Override @Test + public void testStopServerAtomicReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) - @Override public void testStopServerTransactionalPartitioned() { + @Override @Test + public void testStopServerTransactionalPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) - @Override public void testStopServerTransactionalReplicated() { + @Override @Test + public void testStopServerTransactionalReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = PARTITIONED) - @Override public void testUpdateBaselineTopologyAtomicPartitioned() { + @Override @Test + public void testUpdateBaselineTopologyAtomicPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = REPLICATED) - @Override public void testUpdateBaselineTopologyAtomicReplicated() { + @Override @Test + public void testUpdateBaselineTopologyAtomicReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) - @Override public void testUpdateBaselineTopologyTransactionalPartitioned() { + @Override @Test + public void testUpdateBaselineTopologyTransactionalPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) - @Override public void testUpdateBaselineTopologyTransactionalReplicated() { + @Override @Test + public void testUpdateBaselineTopologyTransactionalReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = PARTITIONED) - @Override public void testStartClientAtomicPartitioned() { + @Override @Test + public void testStartClientAtomicPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9987"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = REPLICATED) - @Override public void testStartClientAtomicReplicated() { + @Override @Test + public void testStartClientAtomicReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9987"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) - @Override public void testStartClientTransactionalPartitioned() { + @Override @Test + public void testStartClientTransactionalPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9987"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) - @Override public void testStartClientTransactionalReplicated() { + @Override @Test + public void testStartClientTransactionalReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9987"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = PARTITIONED) - @Override public void testStopClientAtomicPartitioned() { + @Override @Test + public void testStopClientAtomicPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9987"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = REPLICATED) - @Override public void testStopClientAtomicReplicated() { + @Override @Test + public void testStopClientAtomicReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9987"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) - @Override public void testStopClientTransactionalPartitioned() { + @Override @Test + public void testStopClientTransactionalPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9987"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) - @Override public void testStopClientTransactionalReplicated() { + @Override @Test + public void testStopClientTransactionalReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9987"); } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheClientsConcurrentStartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheClientsConcurrentStartTest.java index 3f84cd63eb6f8..abed63286049e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheClientsConcurrentStartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheClientsConcurrentStartTest.java @@ -122,6 +122,7 @@ public class CacheClientsConcurrentStartTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testStartNodes() throws Exception { for (int i = 0; i < ITERATIONS; i++) { try { @@ -242,4 +243,4 @@ private CacheConfiguration cacheConfiguration(String cacheName) { return ccfg; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheDataLossOnPartitionMoveTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheDataLossOnPartitionMoveTest.java index 9ff072500b6fc..a55e62f2a8c15 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheDataLossOnPartitionMoveTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheDataLossOnPartitionMoveTest.java @@ -118,6 +118,7 @@ private String grp(int idx) { /** * @throws Exception if failed. */ + @Test public void testDataLossOnPartitionMove() throws Exception { try { Ignite ignite = startGridsMultiThreaded(GRIDS_CNT / 2, false); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheDiscoveryDataConcurrentJoinTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheDiscoveryDataConcurrentJoinTest.java index 44e04ebdf48d6..b952f26512ad3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheDiscoveryDataConcurrentJoinTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheDiscoveryDataConcurrentJoinTest.java @@ -119,6 +119,7 @@ public class CacheDiscoveryDataConcurrentJoinTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testConcurrentJoin() throws Exception { for (int iter = 0; iter < ITERATIONS; iter++) { log.info("Iteration: " + iter); @@ -169,6 +170,7 @@ public void testConcurrentJoin() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConcurrentJoinCacheWithGroup() throws Exception { withCacheGrp = true; @@ -211,4 +213,4 @@ private CacheConfiguration cacheConfiguration(String cacheName) { private void checkCache(Ignite node, final String cacheName) { assertNotNull(((IgniteKernal)node).context().cache().cache(cacheName)); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java index 9cd24895088c7..d7b94cee2b52b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java @@ -209,6 +209,7 @@ private CacheConfiguration cacheConfiguration(String name, /** * @throws Exception If failed. */ + @Test public void testDelayExchangeMessages() throws Exception { testDelaySpi = true; @@ -281,6 +282,7 @@ public void testDelayExchangeMessages() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMergeStartRandomClientsServers() throws Exception { for (int iter = 0; iter < 3; iter++) { ThreadLocalRandom rnd = ThreadLocalRandom.current(); @@ -337,6 +339,7 @@ public void testMergeStartRandomClientsServers() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMergeStartStopRandomClientsServers() throws Exception { for (int iter = 0; iter < 3; iter++) { log.info("Iteration: " + iter); @@ -409,6 +412,7 @@ public void testMergeStartStopRandomClientsServers() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConcurrentStartServers() throws Exception { concurrentStart(false); } @@ -416,6 +420,7 @@ public void testConcurrentStartServers() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConcurrentStartServersAndClients() throws Exception { concurrentStart(true); } @@ -464,6 +469,7 @@ private void concurrentStart(final boolean withClients) throws Exception { /** * @throws Exception If failed. */ + @Test public void testMergeServerAndClientJoin1() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10186"); @@ -504,6 +510,7 @@ public void testMergeServerAndClientJoin1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStartCacheOnJoinAndJoinMerge_2_nodes() throws Exception { startCacheOnJoinAndJoinMerge1(2, false); } @@ -511,6 +518,7 @@ public void testStartCacheOnJoinAndJoinMerge_2_nodes() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStartCacheOnJoinAndJoinMerge_4_nodes() throws Exception { startCacheOnJoinAndJoinMerge1(4, false); } @@ -518,6 +526,7 @@ public void testStartCacheOnJoinAndJoinMerge_4_nodes() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStartCacheOnJoinAndJoinMerge_WithClients() throws Exception { startCacheOnJoinAndJoinMerge1(5, true); } @@ -554,6 +563,7 @@ private void startCacheOnJoinAndJoinMerge1(int nodes, boolean withClients) throw /** * @throws Exception If failed. */ + @Test public void testMergeAndHistoryCleanup() throws Exception { final int histSize = 5; @@ -618,6 +628,7 @@ private void checkHistorySize(int histSize) { /** * @throws Exception If failed. */ + @Test public void testStartCacheOnJoinAndMergeWithFail() throws Exception { cfgCache = false; @@ -643,6 +654,7 @@ public void testStartCacheOnJoinAndMergeWithFail() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStartCacheOnJoinAndCoordinatorFailed1() throws Exception { cfgCache = false; @@ -664,6 +676,7 @@ public void testStartCacheOnJoinAndCoordinatorFailed1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStartCacheOnJoinAndCoordinatorFailed2() throws Exception { cfgCache = false; @@ -685,6 +698,7 @@ public void testStartCacheOnJoinAndCoordinatorFailed2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMergeServersJoin1() throws Exception { IgniteEx srv0 = startGrid(0); @@ -712,6 +726,7 @@ public void testMergeServersJoin1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMergeServerJoin1ClientsInTopology() throws Exception { IgniteEx srv0 = startGrid(0); @@ -749,6 +764,7 @@ public void testMergeServerJoin1ClientsInTopology() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMergeAndNewCoordinator() throws Exception { final Ignite srv0 = startGrids(3); @@ -768,6 +784,7 @@ public void testMergeAndNewCoordinator() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMergeServersFail1_1() throws Exception { mergeServersFail1(false); } @@ -775,6 +792,7 @@ public void testMergeServersFail1_1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMergeServersFail1_2() throws Exception { mergeServersFail1(true); } @@ -820,6 +838,7 @@ private void mergeServersFail1(boolean waitRebalance) throws Exception { /** * @throws Exception If failed. */ + @Test public void testMergeServersAndClientsFail1() throws Exception { mergeServersAndClientsFail(false); } @@ -827,6 +846,7 @@ public void testMergeServersAndClientsFail1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMergeServersAndClientsFail2() throws Exception { mergeServersAndClientsFail(true); } @@ -868,6 +888,7 @@ private void mergeServersAndClientsFail(boolean waitRebalance) throws Exception /** * @throws Exception If failed. */ + @Test public void testJoinExchangeCoordinatorChange_NoMerge_1() throws Exception { for (CoordinatorChangeMode mode : CoordinatorChangeMode.values()) { exchangeCoordinatorChangeNoMerge(4, true, mode); @@ -879,6 +900,7 @@ public void testJoinExchangeCoordinatorChange_NoMerge_1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testJoinExchangeCoordinatorChange_NoMerge_2() throws Exception { for (CoordinatorChangeMode mode : CoordinatorChangeMode.values()) { exchangeCoordinatorChangeNoMerge(8, true, mode); @@ -890,6 +912,7 @@ public void testJoinExchangeCoordinatorChange_NoMerge_2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFailExchangeCoordinatorChange_NoMerge_1() throws Exception { for (CoordinatorChangeMode mode : CoordinatorChangeMode.values()) { exchangeCoordinatorChangeNoMerge(5, false, mode); @@ -901,6 +924,7 @@ public void testFailExchangeCoordinatorChange_NoMerge_1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFailExchangeCoordinatorChange_NoMerge_2() throws Exception { for (CoordinatorChangeMode mode : CoordinatorChangeMode.values()) { exchangeCoordinatorChangeNoMerge(8, false, mode); @@ -912,6 +936,7 @@ public void testFailExchangeCoordinatorChange_NoMerge_2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMergeJoinExchangesCoordinatorChange1_4_servers() throws Exception { for (CoordinatorChangeMode mode : CoordinatorChangeMode.values()) { mergeJoinExchangesCoordinatorChange1(4, mode); @@ -923,6 +948,7 @@ public void testMergeJoinExchangesCoordinatorChange1_4_servers() throws Exceptio /** * @throws Exception If failed. */ + @Test public void testMergeJoinExchangesCoordinatorChange1_8_servers() throws Exception { for (CoordinatorChangeMode mode : CoordinatorChangeMode.values()) { mergeJoinExchangesCoordinatorChange1(8, mode); @@ -962,6 +988,7 @@ private void mergeJoinExchangesCoordinatorChange1(final int srvs, CoordinatorCha /** * @throws Exception If failed. */ + @Test public void testMergeJoinExchangesCoordinatorChange2_4_servers() throws Exception { mergeJoinExchangeCoordinatorChange2(4, 2, F.asList(1, 2, 3, 4), F.asList(5)); @@ -1005,6 +1032,7 @@ private void mergeJoinExchangeCoordinatorChange2(final int srvs, /** * @throws Exception If failed. */ + @Test public void testMergeExchangeCoordinatorChange4() throws Exception { testSpi = true; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGetFutureHangsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGetFutureHangsSelfTest.java index 34c3eb9968c53..5df4952808592 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGetFutureHangsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGetFutureHangsSelfTest.java @@ -89,6 +89,7 @@ public class CacheGetFutureHangsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testContainsKeyFailover() throws Exception { int cnt = 3; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGetInsideLockChangingTopologyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGetInsideLockChangingTopologyTest.java index 80aa9eee5d006..ebfd7bb9f5e68 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGetInsideLockChangingTopologyTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGetInsideLockChangingTopologyTest.java @@ -155,6 +155,7 @@ private CacheConfiguration cacheConfiguration(String name, CacheAtomicityMode at /** * @throws Exception If failed. */ + @Test public void testTxGetInsideLockStopPrimary() throws Exception { getInsideLockStopPrimary(ignite(SRVS), TX_CACHE1); getInsideLockStopPrimary(ignite(SRVS + 1), TX_CACHE1); @@ -166,6 +167,7 @@ public void testTxGetInsideLockStopPrimary() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAtomicGetInsideLockStopPrimary() throws Exception { getInsideLockStopPrimary(ignite(SRVS), ATOMIC_CACHE); @@ -175,6 +177,7 @@ public void testAtomicGetInsideLockStopPrimary() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAtomicGetInsideTxStopPrimary() throws Exception { getInsideTxStopPrimary(ignite(SRVS), ATOMIC_CACHE); @@ -184,6 +187,7 @@ public void testAtomicGetInsideTxStopPrimary() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReadCommittedPessimisticStopPrimary() throws Exception { getReadCommittedStopPrimary(ignite(SRVS), TX_CACHE1, PESSIMISTIC); getReadCommittedStopPrimary(ignite(SRVS + 1), TX_CACHE1, PESSIMISTIC); @@ -195,6 +199,7 @@ public void testReadCommittedPessimisticStopPrimary() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReadCommittedOptimisticStopPrimary() throws Exception { getReadCommittedStopPrimary(ignite(SRVS), TX_CACHE1, OPTIMISTIC); getReadCommittedStopPrimary(ignite(SRVS + 1), TX_CACHE1, OPTIMISTIC); @@ -363,6 +368,7 @@ private void getInsideTxStopPrimary(Ignite ignite, String cacheName) throws Exce /** * @throws Exception If failed. */ + @Test public void testMultithreaded() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-2204"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGroupsPreloadTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGroupsPreloadTest.java index 88596380c2aca..cd1bdc57ceb1e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGroupsPreloadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGroupsPreloadTest.java @@ -90,6 +90,7 @@ public class CacheGroupsPreloadTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCachePreload1() throws Exception { cachePreloadTest(); } @@ -97,6 +98,7 @@ public void testCachePreload1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCachePreload2() throws Exception { atomicityMode = CacheAtomicityMode.TRANSACTIONAL; @@ -106,6 +108,7 @@ public void testCachePreload2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCachePreload3() throws Exception { cacheMode = CacheMode.REPLICATED; @@ -115,6 +118,7 @@ public void testCachePreload3() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCachePreload4() throws Exception { cacheMode = CacheMode.REPLICATED; atomicityMode = CacheAtomicityMode.TRANSACTIONAL; @@ -125,6 +129,7 @@ public void testCachePreload4() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCachePreload5() throws Exception { sameGrp = false; @@ -134,6 +139,7 @@ public void testCachePreload5() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCachePreload6() throws Exception { sameGrp = false; atomicityMode = CacheAtomicityMode.TRANSACTIONAL; @@ -144,6 +150,7 @@ public void testCachePreload6() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCachePreload7() throws Exception { sameGrp = false; cacheMode = CacheMode.REPLICATED; @@ -154,6 +161,7 @@ public void testCachePreload7() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCachePreload8() throws Exception { sameGrp = false; cacheMode = CacheMode.REPLICATED; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLateAffinityAssignmentNodeJoinValidationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLateAffinityAssignmentNodeJoinValidationTest.java index 48b33b6c20b7e..b72700641de25 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLateAffinityAssignmentNodeJoinValidationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLateAffinityAssignmentNodeJoinValidationTest.java @@ -60,6 +60,7 @@ public class CacheLateAffinityAssignmentNodeJoinValidationTest extends GridCommo /** * @throws Exception If failed. */ + @Test public void testJoinValidation1() throws Exception { checkNodeJoinValidation(false); } @@ -67,6 +68,7 @@ public void testJoinValidation1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testJoinValidation2() throws Exception { checkNodeJoinValidation(true); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLateAffinityAssignmentTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLateAffinityAssignmentTest.java index 2766aba34789a..671a3d6d66d74 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLateAffinityAssignmentTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLateAffinityAssignmentTest.java @@ -234,6 +234,7 @@ protected AffinityFunction affinityFunction(@Nullable Integer parts) { * * @throws Exception If failed. */ + @Test public void testDelayedAffinityCalculation() throws Exception { Ignite ignite0 = startServer(0, 1); @@ -293,6 +294,7 @@ public void testDelayedAffinityCalculation() throws Exception { * * @throws Exception If failed. */ + @Test public void testAffinitySimpleSequentialStart() throws Exception { startServer(0, 1); @@ -314,6 +316,7 @@ public void testAffinitySimpleSequentialStart() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAffinitySimpleSequentialStartNoCacheOnCoordinator() throws Exception { cacheC = new IgniteClosure() { @Override public CacheConfiguration[] apply(String igniteInstanceName) { @@ -334,6 +337,7 @@ public void testAffinitySimpleSequentialStartNoCacheOnCoordinator() throws Excep /** * @throws Exception If failed. */ + @Test public void testAffinitySimpleNoCacheOnCoordinator1() throws Exception { cacheC = new IgniteClosure() { @Override public CacheConfiguration[] apply(String igniteInstanceName) { @@ -373,6 +377,7 @@ public void testAffinitySimpleNoCacheOnCoordinator1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAffinitySimpleNoCacheOnCoordinator2() throws Exception { System.setProperty(IGNITE_EXCHANGE_COMPATIBILITY_VER_1, "true"); @@ -432,6 +437,7 @@ public void testAffinitySimpleNoCacheOnCoordinator2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCreateCloseClientCacheOnCoordinator1() throws Exception { cacheC = new IgniteClosure() { @Override public CacheConfiguration[] apply(String igniteInstanceName) { @@ -457,6 +463,7 @@ public void testCreateCloseClientCacheOnCoordinator1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCreateCloseClientCacheOnCoordinator2() throws Exception { cacheC = new IgniteClosure() { @Override public CacheConfiguration[] apply(String igniteInstanceName) { @@ -503,6 +510,7 @@ public void testCreateCloseClientCacheOnCoordinator2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheDestroyAndCreate1() throws Exception { cacheDestroyAndCreate(true); } @@ -510,6 +518,7 @@ public void testCacheDestroyAndCreate1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheDestroyAndCreate2() throws Exception { cacheDestroyAndCreate(false); } @@ -579,6 +588,7 @@ private void cacheDestroyAndCreate(boolean cacheOnCrd) throws Exception { * * @throws Exception If failed. */ + @Test public void testAffinitySimpleNodeLeave1() throws Exception { affinitySimpleNodeLeave(2); } @@ -588,6 +598,7 @@ public void testAffinitySimpleNodeLeave1() throws Exception { * * @throws Exception If failed. */ + @Test public void testAffinitySimpleNodeLeave2() throws Exception { affinitySimpleNodeLeave(4); } @@ -623,6 +634,7 @@ private void affinitySimpleNodeLeave(int cnt) throws Exception { * * @throws Exception If failed. */ + @Test public void testAffinitySimpleNodeLeaveClientAffinity() throws Exception { startServer(0, 1); @@ -644,6 +656,7 @@ public void testAffinitySimpleNodeLeaveClientAffinity() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNodeLeaveExchangeWaitAffinityMessage() throws Exception { System.setProperty(IGNITE_EXCHANGE_COMPATIBILITY_VER_1, "true"); @@ -693,6 +706,7 @@ public void testNodeLeaveExchangeWaitAffinityMessage() throws Exception { * * @throws Exception If failed. */ + @Test public void testAffinitySimpleClientNodeEvents1() throws Exception { affinitySimpleClientNodeEvents(1); } @@ -702,6 +716,7 @@ public void testAffinitySimpleClientNodeEvents1() throws Exception { * * @throws Exception If failed. */ + @Test public void testAffinitySimpleClientNodeEvents2() throws Exception { affinitySimpleClientNodeEvents(3); } @@ -737,6 +752,7 @@ private void affinitySimpleClientNodeEvents(int srvs) throws Exception { * * @throws Exception If failed. */ + @Test public void testDelayAssignmentMultipleJoin1() throws Exception { delayAssignmentMultipleJoin(2); } @@ -746,6 +762,7 @@ public void testDelayAssignmentMultipleJoin1() throws Exception { * * @throws Exception If failed. */ + @Test public void testDelayAssignmentMultipleJoin2() throws Exception { delayAssignmentMultipleJoin(4); } @@ -794,6 +811,7 @@ private void delayAssignmentMultipleJoin(int joinCnt) throws Exception { * * @throws Exception If failed. */ + @Test public void testDelayAssignmentClientJoin() throws Exception { Ignite ignite0 = startServer(0, 1); @@ -818,6 +836,7 @@ public void testDelayAssignmentClientJoin() throws Exception { * * @throws Exception If failed. */ + @Test public void testDelayAssignmentClientLeave() throws Exception { Ignite ignite0 = startServer(0, 1); @@ -848,6 +867,7 @@ public void testDelayAssignmentClientLeave() throws Exception { * * @throws Exception If failed. */ + @Test public void testDelayAssignmentClientCacheStart() throws Exception { Ignite ignite0 = startServer(0, 1); @@ -884,6 +904,7 @@ public void testDelayAssignmentClientCacheStart() throws Exception { * * @throws Exception If failed. */ + @Test public void testDelayAssignmentCacheStart() throws Exception { Ignite ignite0 = startServer(0, 1); @@ -918,6 +939,7 @@ public void testDelayAssignmentCacheStart() throws Exception { * * @throws Exception If failed. */ + @Test public void testDelayAssignmentCacheDestroy() throws Exception { Ignite ignite0 = startServer(0, 1); @@ -952,6 +974,7 @@ public void testDelayAssignmentCacheDestroy() throws Exception { * * @throws Exception If failed. */ + @Test public void testAffinitySimpleStopRandomNode() throws Exception { //fail("IGNITE-GG-12292"); @@ -1001,6 +1024,7 @@ public void testAffinitySimpleStopRandomNode() throws Exception { * * @throws Exception If failed. */ + @Test public void testDelayAssignmentCoordinatorLeave1() throws Exception { Ignite ignite0 = startServer(0, 1); @@ -1025,6 +1049,7 @@ public void testDelayAssignmentCoordinatorLeave1() throws Exception { * * @throws Exception If failed. */ + @Test public void testDelayAssignmentCoordinatorLeave2() throws Exception { Ignite ignite0 = startServer(0, 1); @@ -1054,6 +1079,7 @@ public void testDelayAssignmentCoordinatorLeave2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBlockedFinishMsg1() throws Exception { doTestCoordLeaveBlockedFinishExchangeMessage(4, 3, false, 2); } @@ -1062,6 +1088,7 @@ public void testBlockedFinishMsg1() throws Exception { * * @throws Exception If failed. */ + @Test public void testBlockedFinishMsg2() throws Exception { doTestCoordLeaveBlockedFinishExchangeMessage(4, 3, false); } @@ -1070,6 +1097,7 @@ public void testBlockedFinishMsg2() throws Exception { * * @throws Exception If failed. */ + @Test public void testBlockedFinishMsg3() throws Exception { doTestCoordLeaveBlockedFinishExchangeMessage(4, 3, false, 1); } @@ -1078,6 +1106,7 @@ public void testBlockedFinishMsg3() throws Exception { * * @throws Exception If failed. */ + @Test public void testBlockedFinishMsg4() throws Exception { doTestCoordLeaveBlockedFinishExchangeMessage(5, 3, false); } @@ -1086,6 +1115,7 @@ public void testBlockedFinishMsg4() throws Exception { * * @throws Exception If failed. */ + @Test public void testBlockedFinishMsg5() throws Exception { doTestCoordLeaveBlockedFinishExchangeMessage(5, 3, false, 1); } @@ -1094,6 +1124,7 @@ public void testBlockedFinishMsg5() throws Exception { * * @throws Exception If failed. */ + @Test public void testBlockedFinishMsg6() throws Exception { doTestCoordLeaveBlockedFinishExchangeMessage(5, 3, false, 2); } @@ -1102,6 +1133,7 @@ public void testBlockedFinishMsg6() throws Exception { * * @throws Exception If failed. */ + @Test public void testBlockedFinishMsg7() throws Exception { doTestCoordLeaveBlockedFinishExchangeMessage(5, 3, false, 2, 4); } @@ -1110,6 +1142,7 @@ public void testBlockedFinishMsg7() throws Exception { * * @throws Exception If failed. */ + @Test public void testBlockedFinishMsg8() throws Exception { doTestCoordLeaveBlockedFinishExchangeMessage(6, 3, false, 2, 4); } @@ -1118,6 +1151,7 @@ public void testBlockedFinishMsg8() throws Exception { * * @throws Exception If failed. */ + @Test public void testBlockedFinishMsg9() throws Exception { doTestCoordLeaveBlockedFinishExchangeMessage(5, 1, false, 4); } @@ -1126,6 +1160,7 @@ public void testBlockedFinishMsg9() throws Exception { * * @throws Exception If failed. */ + @Test public void testBlockedFinishMsgForClient() throws Exception { doTestCoordLeaveBlockedFinishExchangeMessage(5, 1, true, 4); } @@ -1223,6 +1258,7 @@ private void doTestCoordLeaveBlockedFinishExchangeMessage(int cnt, * * @throws Exception If failed. */ + @Test public void testCoordinatorLeaveAfterNodeLeavesDelayAssignment() throws Exception { Ignite ignite0 = startServer(0, 1); @@ -1272,6 +1308,7 @@ public void testCoordinatorLeaveAfterNodeLeavesDelayAssignment() throws Exceptio * * @throws Exception If failed. */ + @Test public void testNodeLeftExchangeCoordinatorLeave1() throws Exception { nodeLeftExchangeCoordinatorLeave(3); } @@ -1281,6 +1318,7 @@ public void testNodeLeftExchangeCoordinatorLeave1() throws Exception { * * @throws Exception If failed. */ + @Test public void testNodeLeftExchangeCoordinatorLeave2() throws Exception { nodeLeftExchangeCoordinatorLeave(5); } @@ -1335,6 +1373,7 @@ private void nodeLeftExchangeCoordinatorLeave(int nodes) throws Exception { /** * @throws Exception If failed. */ + @Test public void testJoinExchangeBecomeCoordinator() throws Exception { long topVer = 0; @@ -1396,6 +1435,7 @@ public void testJoinExchangeBecomeCoordinator() throws Exception { * * @throws Exception If failed. */ + @Test public void testDelayAssignmentAffinityChanged() throws Exception { Ignite ignite0 = startServer(0, 1); @@ -1438,6 +1478,7 @@ public void testDelayAssignmentAffinityChanged() throws Exception { * * @throws Exception If failed. */ + @Test public void testDelayAssignmentAffinityChanged2() throws Exception { System.setProperty(IGNITE_EXCHANGE_COMPATIBILITY_VER_1, "true"); @@ -1519,6 +1560,7 @@ public void testDelayAssignmentAffinityChanged2() throws Exception { * * @throws Exception If failed. */ + @Test public void testDelayAssignmentCacheDestroyCreate() throws Exception { Ignite ignite0 = startServer(0, 1); @@ -1572,6 +1614,7 @@ public void testDelayAssignmentCacheDestroyCreate() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientCacheStartClose() throws Exception { cacheC = new IgniteClosure() { @Override public CacheConfiguration[] apply(String igniteInstanceName) { @@ -1600,6 +1643,7 @@ public void testClientCacheStartClose() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheStartDestroy() throws Exception { startGridsMultiThreaded(3, false); @@ -1634,6 +1678,7 @@ public void testCacheStartDestroy() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInitCacheReceivedOnJoin() throws Exception { cacheC = new IgniteClosure() { @Override public CacheConfiguration[] apply(String s) { @@ -1677,6 +1722,7 @@ public void testInitCacheReceivedOnJoin() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientStartFirst1() throws Exception { clientStartFirst(1); } @@ -1684,6 +1730,7 @@ public void testClientStartFirst1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientStartFirst2() throws Exception { clientStartFirst(3); } @@ -1724,6 +1771,7 @@ private void clientStartFirst(int clients) throws Exception { /** * @throws Exception If failed. */ + @Test public void testRandomOperations() throws Exception { forceSrvMode = true; @@ -1935,6 +1983,7 @@ public void testRandomOperations() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConcurrentStartStaticCaches() throws Exception { concurrentStartStaticCaches(false); } @@ -1942,6 +1991,7 @@ public void testConcurrentStartStaticCaches() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConcurrentStartStaticCachesWithClientNodes() throws Exception { concurrentStartStaticCaches(true); } @@ -2014,6 +2064,7 @@ private void concurrentStartStaticCaches(boolean withClients) throws Exception { /** * @throws Exception If failed. */ + @Test public void testServiceReassign() throws Exception { skipCheckOrder = true; @@ -2047,6 +2098,7 @@ public void testServiceReassign() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNoForceKeysRequests() throws Exception { if (MvccFeatureChecker.forcedMvcc()) fail("https://issues.apache.org/jira/browse/IGNITE-10391"); @@ -2160,6 +2212,7 @@ public void testNoForceKeysRequests() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStreamer1() throws Exception { cacheC = new IgniteClosure() { @Override public CacheConfiguration[] apply(String s) { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLoadingConcurrentGridStartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLoadingConcurrentGridStartSelfTest.java index 10d04bd88d76b..d8704013c8ad3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLoadingConcurrentGridStartSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLoadingConcurrentGridStartSelfTest.java @@ -144,6 +144,7 @@ protected CacheAtomicityMode atomicityMode() { /** * @throws Exception if failed */ + @Test public void testLoadCacheWithDataStreamer() throws Exception { configured = true; @@ -171,6 +172,7 @@ public void testLoadCacheWithDataStreamer() throws Exception { /** * @throws Exception if failed */ + @Test public void testLoadCacheFromStore() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-4210"); @@ -184,6 +186,7 @@ public void testLoadCacheFromStore() throws Exception { /** * @throws Exception if failed */ + @Test public void testLoadCacheWithDataStreamerSequentialClient() throws Exception { client = true; @@ -198,6 +201,7 @@ public void testLoadCacheWithDataStreamerSequentialClient() throws Exception { /** * @throws Exception if failed */ + @Test public void testLoadCacheWithDataStreamerSequentialClientWithConfig() throws Exception { client = true; configured = true; @@ -214,6 +218,7 @@ public void testLoadCacheWithDataStreamerSequentialClientWithConfig() throws Exc /** * @throws Exception if failed */ + @Test public void testLoadCacheWithDataStreamerSequential() throws Exception { loadCacheWithDataStreamerSequential(); } @@ -221,6 +226,7 @@ public void testLoadCacheWithDataStreamerSequential() throws Exception { /** * @throws Exception if failed */ + @Test public void testLoadCacheWithDataStreamerSequentialWithConfigAndRestarts() throws Exception { restarts = true; configured = true; @@ -237,6 +243,7 @@ public void testLoadCacheWithDataStreamerSequentialWithConfigAndRestarts() throw /** * @throws Exception if failed */ + @Test public void testLoadCacheWithDataStreamerSequentialWithConfig() throws Exception { configured = true; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLockReleaseNodeLeaveTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLockReleaseNodeLeaveTest.java index 844a4300dadab..03a088fd16692 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLockReleaseNodeLeaveTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLockReleaseNodeLeaveTest.java @@ -93,6 +93,7 @@ public class CacheLockReleaseNodeLeaveTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testLockRelease() throws Exception { startGrids(2); @@ -139,6 +140,7 @@ public void testLockRelease() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLockTopologyChange() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-9213"); @@ -191,6 +193,7 @@ public void testLockTopologyChange() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxLockRelease() throws Exception { startGrids(2); @@ -239,6 +242,7 @@ public void testTxLockRelease() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLockRelease2() throws Exception { final Ignite ignite0 = startGrid(0); @@ -285,6 +289,7 @@ public void testLockRelease2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLockRelease3() throws Exception { startGrid(0); @@ -319,6 +324,7 @@ public void testLockRelease3() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxLockRelease2() throws Exception { final Ignite ignite0 = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheOperationsInterruptTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheOperationsInterruptTest.java index 971dbd1666ff3..f4290e70f2eef 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheOperationsInterruptTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheOperationsInterruptTest.java @@ -74,6 +74,7 @@ public class CacheOperationsInterruptTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testInterruptPessimisticTx() throws Exception { final int NODES = 3; @@ -167,4 +168,4 @@ public void testInterruptPessimisticTx() throws Exception { } } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePageWriteLockUnlockTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePageWriteLockUnlockTest.java index 41c588268a8f2..1e060a46054c3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePageWriteLockUnlockTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePageWriteLockUnlockTest.java @@ -72,6 +72,7 @@ public class CachePageWriteLockUnlockTest extends GridCommonAbstractTest { /** * */ + @Test public void testPreloadPartition() throws Exception { try { IgniteEx grid0 = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheParallelStartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheParallelStartTest.java index 2a644856ca09c..d53e3e62a24f0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheParallelStartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheParallelStartTest.java @@ -128,6 +128,7 @@ private void cleanupTestData() throws Exception { /** * @throws Exception If failed. */ + @Test public void testParallelStartAndStop() throws Exception { testParallelStartAndStop(true); } @@ -135,6 +136,7 @@ public void testParallelStartAndStop() throws Exception { /** * @throws Exception if failed. */ + @Test public void testSequentialStartAndStop() throws Exception { testParallelStartAndStop(false); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePartitionStateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePartitionStateTest.java index 95059187cfdcf..fd95556331989 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePartitionStateTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePartitionStateTest.java @@ -89,6 +89,7 @@ public class CachePartitionStateTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPartitionState1_1() throws Exception { partitionState1(0, true); } @@ -96,6 +97,7 @@ public void testPartitionState1_1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPartitionState1_2() throws Exception { partitionState1(1, true); } @@ -103,6 +105,7 @@ public void testPartitionState1_2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPartitionState1_2_NoCacheOnCoordinator() throws Exception { partitionState1(1, false); } @@ -110,6 +113,7 @@ public void testPartitionState1_2_NoCacheOnCoordinator() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPartitionState1_3() throws Exception { partitionState1(100, true); } @@ -117,6 +121,7 @@ public void testPartitionState1_3() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPartitionState2_1() throws Exception { partitionState2(0, true); } @@ -124,6 +129,7 @@ public void testPartitionState2_1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPartitionState2_2() throws Exception { partitionState2(1, true); } @@ -131,6 +137,7 @@ public void testPartitionState2_2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPartitionState2_2_NoCacheOnCoordinator() throws Exception { partitionState2(1, false); } @@ -138,6 +145,7 @@ public void testPartitionState2_2_NoCacheOnCoordinator() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPartitionState2_3() throws Exception { partitionState2(100, true); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePutAllFailoverAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePutAllFailoverAbstractTest.java index 57a150fbfd2b1..a7476eb8ecb7a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePutAllFailoverAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePutAllFailoverAbstractTest.java @@ -95,6 +95,7 @@ public abstract class CachePutAllFailoverAbstractTest extends GridCacheAbstractS /** * @throws Exception If failed. */ + @Test public void testPutAllFailover() throws Exception { testPutAllFailover(Test.PUT_ALL); } @@ -102,6 +103,7 @@ public void testPutAllFailover() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAllFailoverPessimisticTx() throws Exception { if (atomicityMode() == CacheAtomicityMode.ATOMIC) return; @@ -112,6 +114,7 @@ public void testPutAllFailoverPessimisticTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAllFailoverAsync() throws Exception { testPutAllFailover(Test.PUT_ALL_ASYNC); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheRentingStateRepairTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheRentingStateRepairTest.java index b21c95ea88a9f..49a6d7e2de704 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheRentingStateRepairTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheRentingStateRepairTest.java @@ -95,6 +95,7 @@ public class CacheRentingStateRepairTest extends GridCommonAbstractTest { /** * */ + @Test public void testRentingStateRepairAfterRestart() throws Exception { try { IgniteEx g0 = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheResultIsNotNullOnPartitionLossTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheResultIsNotNullOnPartitionLossTest.java index 0958f839a03cf..5907171f8ba03 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheResultIsNotNullOnPartitionLossTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheResultIsNotNullOnPartitionLossTest.java @@ -126,6 +126,7 @@ public class CacheResultIsNotNullOnPartitionLossTest extends GridCommonAbstractT /** * @throws Exception If failed. */ + @Test public void testCacheResultIsNotNullOnClient() throws Exception { testCacheResultIsNotNull0(client); } @@ -133,6 +134,7 @@ public void testCacheResultIsNotNullOnClient() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheResultIsNotNullOnLastServer() throws Exception { testCacheResultIsNotNull0(grid(SERVERS - 1)); } @@ -140,6 +142,7 @@ public void testCacheResultIsNotNullOnLastServer() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheResultIsNotNullOnServer() throws Exception { testCacheResultIsNotNull0(grid(SERVERS - 2)); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheStartOnJoinTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheStartOnJoinTest.java index d59f4709506d1..34c69c78f9ec8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheStartOnJoinTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheStartOnJoinTest.java @@ -128,6 +128,7 @@ public class CacheStartOnJoinTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testConcurrentClientsStart1() throws Exception { concurrentClientsStart(false); } @@ -135,6 +136,7 @@ public void testConcurrentClientsStart1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConcurrentClientsStart2() throws Exception { concurrentClientsStart(true); } @@ -256,4 +258,4 @@ private CacheConfiguration cacheConfiguration(String cacheName) { private void checkCache(Ignite node, final String cacheName) { assertNotNull(((IgniteKernal)node).context().cache().cache(cacheName)); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheTryLockMultithreadedTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheTryLockMultithreadedTest.java index bccc703174e0d..eea174bdf6f70 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheTryLockMultithreadedTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheTryLockMultithreadedTest.java @@ -83,6 +83,7 @@ public class CacheTryLockMultithreadedTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testTryLock() throws Exception { Ignite client = grid(SRVS); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractDistributedByteArrayValuesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractDistributedByteArrayValuesSelfTest.java index c4aed34a964d2..7a39e880f373a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractDistributedByteArrayValuesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractDistributedByteArrayValuesSelfTest.java @@ -112,6 +112,7 @@ protected CacheConfiguration cacheConfiguration() { * * @throws Exception If failed. */ + @Test public void testPessimistic() throws Exception { testTransaction0(caches, PESSIMISTIC, KEY_1, wrap(1)); } @@ -121,6 +122,7 @@ public void testPessimistic() throws Exception { * * @throws Exception If failed. */ + @Test public void testPessimisticMixed() throws Exception { testTransactionMixed0(caches, PESSIMISTIC, KEY_1, wrap(1), KEY_2, 1); } @@ -130,6 +132,7 @@ public void testPessimisticMixed() throws Exception { * * @throws Exception If failed. */ + @Test public void testOptimistic() throws Exception { testTransaction0(caches, OPTIMISTIC, KEY_1, wrap(1)); } @@ -139,6 +142,7 @@ public void testOptimistic() throws Exception { * * @throws Exception If failed. */ + @Test public void testOptimisticMixed() throws Exception { testTransactionMixed0(caches, OPTIMISTIC, KEY_1, wrap(1), KEY_2, 1); } @@ -228,4 +232,4 @@ private void testTransactionMixed0(IgniteCache[] caches, Transa assertNull(cache.get(key1)); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractJobExecutionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractJobExecutionTest.java index 589435951d247..4c0507d17f390 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractJobExecutionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractJobExecutionTest.java @@ -97,6 +97,7 @@ public abstract class GridCacheAbstractJobExecutionTest extends GridCommonAbstra /** * @throws Exception If failed. */ + @Test public void testPessimisticRepeatableRead() throws Exception { checkTransactions(PESSIMISTIC, REPEATABLE_READ, 1000); } @@ -104,6 +105,7 @@ public void testPessimisticRepeatableRead() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticSerializable() throws Exception { checkTransactions(PESSIMISTIC, SERIALIZABLE, 1000); } @@ -192,4 +194,4 @@ private void checkTransactions( } } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractNodeRestartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractNodeRestartSelfTest.java index 2116ecb9dc300..77583c0ab0981 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractNodeRestartSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractNodeRestartSelfTest.java @@ -215,6 +215,7 @@ private void startGrids() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRestart() throws Exception { rebalancMode = SYNC; partitions = 3; @@ -291,6 +292,7 @@ protected TransactionConcurrency txConcurrency() { /** * @throws Exception If failed. */ + @Test public void testRestartWithPutTwoNodesNoBackups() throws Throwable { backups = 0; nodeCnt = 2; @@ -307,6 +309,7 @@ public void testRestartWithPutTwoNodesNoBackups() throws Throwable { /** * @throws Exception If failed. */ + @Test public void testRestartWithTxTwoNodesNoBackups() throws Throwable { backups = 0; nodeCnt = 2; @@ -323,6 +326,7 @@ public void testRestartWithTxTwoNodesNoBackups() throws Throwable { /** * @throws Exception If failed. */ + @Test public void testRestartWithPutTwoNodesOneBackup() throws Throwable { backups = 1; nodeCnt = 2; @@ -339,6 +343,7 @@ public void testRestartWithPutTwoNodesOneBackup() throws Throwable { /** * @throws Exception If failed. */ + @Test public void testRestartWithTxTwoNodesOneBackup() throws Throwable { backups = 1; nodeCnt = 2; @@ -355,6 +360,7 @@ public void testRestartWithTxTwoNodesOneBackup() throws Throwable { /** * @throws Exception If failed. */ + @Test public void testRestartWithPutFourNodesNoBackups() throws Throwable { backups = 0; nodeCnt = 4; @@ -371,6 +377,7 @@ public void testRestartWithPutFourNodesNoBackups() throws Throwable { /** * @throws Exception If failed. */ + @Test public void testRestartWithTxFourNodesNoBackups() throws Throwable { backups = 0; nodeCnt = 4; @@ -387,6 +394,7 @@ public void testRestartWithTxFourNodesNoBackups() throws Throwable { /** * @throws Exception If failed. */ + @Test public void testRestartWithPutFourNodesOneBackups() throws Throwable { backups = 1; nodeCnt = 4; @@ -403,6 +411,7 @@ public void testRestartWithPutFourNodesOneBackups() throws Throwable { /** * @throws Exception If failed. */ + @Test public void testRestartWithPutFourNodesOneBackupsOffheapEvict() throws Throwable { backups = 1; nodeCnt = 4; @@ -419,6 +428,7 @@ public void testRestartWithPutFourNodesOneBackupsOffheapEvict() throws Throwable /** * @throws Exception If failed. */ + @Test public void testRestartWithTxFourNodesOneBackups() throws Throwable { backups = 1; nodeCnt = 4; @@ -435,6 +445,7 @@ public void testRestartWithTxFourNodesOneBackups() throws Throwable { /** * @throws Exception If failed. */ + @Test public void testRestartWithTxFourNodesOneBackupsOffheapEvict() throws Throwable { backups = 1; nodeCnt = 4; @@ -451,6 +462,7 @@ public void testRestartWithTxFourNodesOneBackupsOffheapEvict() throws Throwable /** * @throws Exception If failed. */ + @Test public void testRestartWithPutSixNodesTwoBackups() throws Throwable { backups = 2; nodeCnt = 6; @@ -467,6 +479,7 @@ public void testRestartWithPutSixNodesTwoBackups() throws Throwable { /** * @throws Exception If failed. */ + @Test public void testRestartWithTxSixNodesTwoBackups() throws Throwable { backups = 2; nodeCnt = 6; @@ -483,6 +496,7 @@ public void testRestartWithTxSixNodesTwoBackups() throws Throwable { /** * @throws Exception If failed. */ + @Test public void testRestartWithPutEightNodesTwoBackups() throws Throwable { backups = 2; nodeCnt = 8; @@ -499,6 +513,7 @@ public void testRestartWithPutEightNodesTwoBackups() throws Throwable { /** * @throws Exception If failed. */ + @Test public void testRestartWithTxEightNodesTwoBackups() throws Throwable { backups = 2; nodeCnt = 8; @@ -515,6 +530,7 @@ public void testRestartWithTxEightNodesTwoBackups() throws Throwable { /** * @throws Exception If failed. */ + @Test public void testRestartWithPutTenNodesTwoBackups() throws Throwable { backups = 2; nodeCnt = 10; @@ -531,6 +547,7 @@ public void testRestartWithPutTenNodesTwoBackups() throws Throwable { /** * @throws Exception If failed. */ + @Test public void testRestartWithTxTenNodesTwoBackups() throws Throwable { backups = 2; nodeCnt = 10; @@ -547,6 +564,7 @@ public void testRestartWithTxTenNodesTwoBackups() throws Throwable { /** * @throws Exception If failed. */ + @Test public void testRestartWithTxPutAllTenNodesTwoBackups() throws Throwable { backups = 2; nodeCnt = 10; @@ -563,6 +581,7 @@ public void testRestartWithTxPutAllTenNodesTwoBackups() throws Throwable { /** * @throws Exception If failed. */ + @Test public void testRestartWithTxPutAllFourNodesTwoBackups() throws Throwable { backups = 2; nodeCnt = 4; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPrimarySyncSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPrimarySyncSelfTest.java index f6b9302896b13..ad44894e63609 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPrimarySyncSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPrimarySyncSelfTest.java @@ -87,6 +87,7 @@ public abstract class GridCacheAbstractPrimarySyncSelfTest extends GridCommonAbs /** * @throws Exception If failed. */ + @Test public void testPrimarySync() throws Exception { for (int i = 0; i < GRID_CNT; i++) { for (int j = 0; j < GRID_CNT; j++) { @@ -106,4 +107,4 @@ public void testPrimarySync() throws Exception { } } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheBasicOpAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheBasicOpAbstractTest.java index 039881315ce22..a825e1b516628 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheBasicOpAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheBasicOpAbstractTest.java @@ -103,6 +103,7 @@ public abstract class GridCacheBasicOpAbstractTest extends GridCommonAbstractTes * * @throws Exception If error occur. */ + @Test public void testBasicOps() throws Exception { CountDownLatch latch = new CountDownLatch(3); @@ -178,6 +179,7 @@ public void testBasicOps() throws Exception { /** * @throws Exception If test fails. */ + @Test public void testBasicOpsAsync() throws Exception { CountDownLatch latch = new CountDownLatch(3); @@ -258,6 +260,7 @@ public void testBasicOpsAsync() throws Exception { * * @throws IgniteCheckedException If test fails. */ + @Test public void testOptimisticTransaction() throws Exception { CountDownLatch latch = new CountDownLatch(9); @@ -332,6 +335,7 @@ public void testOptimisticTransaction() throws Exception { * * @throws Exception In case of error. */ + @Test public void testPutWithExpiration() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.EXPIRATION); @@ -398,4 +402,4 @@ void setLatch(CountDownLatch latch) { return true; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientModesAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientModesAbstractSelfTest.java index 9316c2dc09149..82da6a9233b6d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientModesAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientModesAbstractSelfTest.java @@ -113,6 +113,7 @@ protected boolean isClientStartedLast() { /** * @throws Exception If failed. */ + @Test public void testPutFromClientNode() throws Exception { IgniteCache nearOnly = nearOnlyCache(); @@ -155,6 +156,7 @@ public void testPutFromClientNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetFromClientNode() throws Exception { IgniteCache dht = dhtCache(); @@ -194,6 +196,7 @@ public void testGetFromClientNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNearOnlyAffinity() throws Exception { for (int i = 0; i < gridCount(); i++) { Ignite g = grid(i); @@ -282,4 +285,4 @@ public TestClass2(int val) { this.val = val; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEntrySetAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEntrySetAbstractSelfTest.java index aea6ce6f3c409..25305ab4c24c7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEntrySetAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEntrySetAbstractSelfTest.java @@ -61,6 +61,7 @@ public abstract class GridCacheEntrySetAbstractSelfTest extends GridCacheAbstrac /** * @throws Exception If failed. */ + @Test public void testEntrySet() throws Exception { for (int i = 0; i < 10; i++) { log.info("Iteration: " + i); @@ -114,4 +115,4 @@ private void putAndCheckEntrySet(IgniteCache cache) throws Excep tx.commit(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEntrySetIterationPreloadingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEntrySetIterationPreloadingSelfTest.java index 53d3a7aede3d0..b8d41e885c693 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEntrySetIterationPreloadingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEntrySetIterationPreloadingSelfTest.java @@ -63,6 +63,7 @@ public class GridCacheEntrySetIterationPreloadingSelfTest extends GridCacheAbstr /** * @throws Exception If failed. */ + @Test public void testIteration() throws Exception { try { final IgniteCache cache = jcache(); @@ -93,4 +94,4 @@ public void testIteration() throws Exception { stopGrid(1); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEventAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEventAbstractTest.java index 9183476aff820..d18edbdc213c1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEventAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEventAbstractTest.java @@ -225,6 +225,7 @@ private Map pairs(int size) { * Note: test was disabled for REPPLICATED cache case because IGNITE-607. * This comment should be removed if test passed stably. */ + @Test public void testGetPutRemove() throws Exception { runTest( new TestCacheRunnable() { @@ -252,6 +253,7 @@ public void testGetPutRemove() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testGetPutRemoveTx1() throws Exception { runTest(new TestCacheRunnable() { @Override public void run(IgniteCache cache) throws IgniteCheckedException { @@ -285,6 +287,7 @@ public void testGetPutRemoveTx1() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testGetPutRemoveTx2() throws Exception { runTest(new TestCacheRunnable() { @Override public void run(IgniteCache cache) throws IgniteCheckedException { @@ -325,6 +328,7 @@ public void testGetPutRemoveTx2() throws Exception { * Note: test was disabled for REPPLICATED cache case because IGNITE-607. * This comment should be removed if test passed stably. */ + @Test public void testGetPutRemoveAsync() throws Exception { runTest(new TestCacheRunnable() { @Override public void run(IgniteCache cache) throws IgniteCheckedException { @@ -351,6 +355,7 @@ public void testGetPutRemoveAsync() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testGetPutRemoveAsyncTx1() throws Exception { runTest(new TestCacheRunnable() { @Override public void run(IgniteCache cache) throws IgniteCheckedException { @@ -384,6 +389,7 @@ public void testGetPutRemoveAsyncTx1() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testGetPutRemoveAsyncTx2() throws Exception { runTest(new TestCacheRunnable() { @Override public void run(IgniteCache cache) throws IgniteCheckedException { @@ -421,6 +427,7 @@ public void testGetPutRemoveAsyncTx2() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testPutRemovex() throws Exception { runTest(new TestCacheRunnable() { @Override public void run(IgniteCache cache) throws IgniteCheckedException { @@ -445,6 +452,7 @@ public void testPutRemovex() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testPutRemovexTx1() throws Exception { runTest(new TestCacheRunnable() { @Override public void run(IgniteCache cache) throws IgniteCheckedException { @@ -475,6 +483,7 @@ public void testPutRemovexTx1() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testPutRemovexTx2() throws Exception { runTest(new TestCacheRunnable() { @Override public void run(IgniteCache cache) throws IgniteCheckedException { @@ -510,6 +519,7 @@ public void testPutRemovexTx2() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testPutIfAbsent() throws Exception { runTest(new TestCacheRunnable() { @Override public void run(IgniteCache cache) throws IgniteCheckedException { @@ -541,6 +551,7 @@ public void testPutIfAbsent() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testPutIfAbsentTx() throws Exception { runTest(new TestCacheRunnable() { @Override public void run(IgniteCache cache) throws IgniteCheckedException { @@ -579,6 +590,7 @@ public void testPutIfAbsentTx() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testPutIfAbsentAsync() throws Exception { runTest(new TestCacheRunnable() { @Override public void run(IgniteCache cache) throws IgniteCheckedException { @@ -613,6 +625,7 @@ public void testPutIfAbsentAsync() throws Exception { * @throws Exception If test failed. */ @SuppressWarnings("unchecked") + @Test public void testPutIfAbsentAsyncTx() throws Exception { IgniteBiTuple[] evts = new IgniteBiTuple[] {F.t(EVT_CACHE_OBJECT_PUT, 2 * gridCnt)}; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheLockAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheLockAbstractTest.java index 5909213c9282c..c7eb26b0222da 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheLockAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheLockAbstractTest.java @@ -203,6 +203,7 @@ private boolean locked(Iterable keys, int idx) { * @throws Exception If test failed. */ @SuppressWarnings({"TooBroadScope"}) + @Test public void testLockSingleThread() throws Exception { int k = 1; String v = String.valueOf(k); @@ -237,6 +238,7 @@ public void testLockSingleThread() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testLock() throws Exception { final int kv = 1; @@ -327,6 +329,7 @@ public void testLock() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testLockAndPut() throws Exception { final CountDownLatch l1 = new CountDownLatch(1); final CountDownLatch l2 = new CountDownLatch(1); @@ -412,6 +415,7 @@ public void testLockAndPut() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testLockTimeoutTwoThreads() throws Exception { int keyCnt = 1; @@ -507,6 +511,7 @@ public void testLockTimeoutTwoThreads() throws Exception { /** * @throws Throwable If failed. */ + @Test public void testLockReentrancy() throws Throwable { Affinity aff = ignite1.affinity(DEFAULT_CACHE_NAME); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMixedModeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMixedModeSelfTest.java index bd309fa7d4ea5..688662d557c11 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMixedModeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMixedModeSelfTest.java @@ -65,6 +65,7 @@ private CacheConfiguration cacheConfiguration(String igniteInstanceName) { /** * @throws Exception If failed. */ + @Test public void testBasicOps() throws Exception { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -80,4 +81,4 @@ public void testBasicOps() throws Exception { for (int i = 0; i < 1000; i++) assertNull(cache.get(i)); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeAbstractTest.java index 0d1aff9216648..ea234fa4261ec 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeAbstractTest.java @@ -147,6 +147,7 @@ private void addListener(Ignite ignite, CacheEventListener lsnr, int... type) { /** * @throws Exception If test failed. */ + @Test public void testBasicPut() throws Exception { checkPuts(3, ignite1); } @@ -154,6 +155,7 @@ public void testBasicPut() throws Exception { /** * @throws Exception If test fails. */ + @Test public void testMultiNodePut() throws Exception { checkPuts(1, ignite1, ignite2, ignite3); checkPuts(1, ignite2, ignite1, ignite3); @@ -163,6 +165,7 @@ public void testMultiNodePut() throws Exception { /** * @throws Exception If test fails. */ + @Test public void testMultiValuePut() throws Exception { checkPuts(1, ignite1); } @@ -170,6 +173,7 @@ public void testMultiValuePut() throws Exception { /** * @throws Exception If test fails. */ + @Test public void testMultiValueMultiNodePut() throws Exception { checkPuts(3, ignite1, ignite2, ignite3); checkPuts(3, ignite2, ignite1, ignite3); @@ -232,6 +236,7 @@ private void checkPuts(int cnt, Ignite... ignites) throws Exception { /** * @throws Exception If test failed. */ + @Test public void testLockUnlock() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.ENTRY_LOCK); @@ -280,6 +285,7 @@ public void testLockUnlock() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testConcurrentPutAsync() throws Exception { CountDownLatch latch = new CountDownLatch(9); @@ -330,6 +336,7 @@ public void testConcurrentPutAsync() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testGlobalClearAll() throws Exception { cache1.put(1, "val1"); cache2.put(2, "val2"); @@ -417,4 +424,4 @@ void setLatch(CountDownLatch latch) { "grid", ignite != null ? ignite.name() : "N/A", "evts", evts); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java index 6636196233e7f..c884a307d1b7b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java @@ -234,6 +234,7 @@ private void checkUnlocked(IgniteCache cache, Iterable * * @throws Exception If test failed. */ + @Test public void testBasicLock() throws Exception { IgniteCache cache = ignite1.cache(DEFAULT_CACHE_NAME); @@ -275,6 +276,7 @@ private String entries(int key) throws IgniteCheckedException { /** * @throws Exception If test fails. */ + @Test public void testMultiNodeLock() throws Exception { IgniteCache cache1 = ignite1.cache(DEFAULT_CACHE_NAME); IgniteCache cache2 = ignite2.cache(DEFAULT_CACHE_NAME); @@ -333,6 +335,7 @@ public void testMultiNodeLock() throws Exception { /** * @throws Exception If test fails. */ + @Test public void testMultiNodeLockWithKeyLists() throws Exception { IgniteCache cache1 = ignite1.cache(DEFAULT_CACHE_NAME); IgniteCache cache2 = ignite2.cache(DEFAULT_CACHE_NAME); @@ -410,6 +413,7 @@ public void testMultiNodeLockWithKeyLists() throws Exception { /** * @throws IgniteCheckedException If test failed. */ + @Test public void testLockReentry() throws IgniteCheckedException { IgniteCache cache = ignite1.cache(DEFAULT_CACHE_NAME); @@ -438,6 +442,7 @@ public void testLockReentry() throws IgniteCheckedException { /** * @throws Exception If test failed. */ + @Test public void testLockMultithreaded() throws Exception { final IgniteCache cache = ignite1.cache(DEFAULT_CACHE_NAME); @@ -556,6 +561,7 @@ public void testLockMultithreaded() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTwoCaches() throws Exception { IgniteCache cache1 = ignite1.cache(DEFAULT_CACHE_NAME); IgniteCache cache2 = ignite1.cache(CACHE2); @@ -625,4 +631,4 @@ private class UnlockListener implements IgnitePredicate { return true; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultithreadedFailoverAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultithreadedFailoverAbstractTest.java index 5379593e23a3d..8b177bd10d200 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultithreadedFailoverAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultithreadedFailoverAbstractTest.java @@ -240,6 +240,7 @@ private IgniteConfiguration configuration(int idx) throws Exception { * * @throws Exception If failed. */ + @Test public void test() throws Exception { startUp(); @@ -599,4 +600,4 @@ private boolean compareCaches(Map expVals) throws Exception { return !failed; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheNodeFailureAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheNodeFailureAbstractTest.java index 6375e3efd254b..aff2f9d682a9b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheNodeFailureAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheNodeFailureAbstractTest.java @@ -145,10 +145,11 @@ protected GridCacheNodeFailureAbstractTest() { /** * @throws IgniteCheckedException If test failed. - * + * * Note: test was disabled for REPPLICATED cache case because IGNITE-601. * This comment should be removed if test passed stably. */ + @Test public void testPessimisticReadCommitted() throws Throwable { checkTransaction(PESSIMISTIC, READ_COMMITTED); } @@ -156,6 +157,7 @@ public void testPessimisticReadCommitted() throws Throwable { /** * @throws IgniteCheckedException If test failed. */ + @Test public void testPessimisticRepeatableRead() throws Throwable { checkTransaction(PESSIMISTIC, REPEATABLE_READ); } @@ -163,6 +165,7 @@ public void testPessimisticRepeatableRead() throws Throwable { /** * @throws IgniteCheckedException If test failed. */ + @Test public void testPessimisticSerializable() throws Throwable { checkTransaction(PESSIMISTIC, SERIALIZABLE); } @@ -240,10 +243,11 @@ private void checkTransaction(TransactionConcurrency concurrency, TransactionIso /** * @throws Exception If check failed. - * + * * Note: test was disabled for REPPLICATED cache case because IGNITE-601. * This comment should be removed if test passed stably. */ + @Test public void testLock() throws Exception { int idx = 0; @@ -301,4 +305,4 @@ public void testLock() throws Exception { assert !checkCache.isLocalLocked(KEY, false); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionEvictionDuringReadThroughSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionEvictionDuringReadThroughSelfTest.java index 01316f64284c9..e812ca1648fe9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionEvictionDuringReadThroughSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionEvictionDuringReadThroughSelfTest.java @@ -83,6 +83,7 @@ public class GridCachePartitionEvictionDuringReadThroughSelfTest extends GridCom /** * @throws Exception if failed. */ + @Test public void testPartitionRent() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-5759"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionNotLoadedEventSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionNotLoadedEventSelfTest.java index f5695ca6b0854..caafc182bf6b0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionNotLoadedEventSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionNotLoadedEventSelfTest.java @@ -106,6 +106,7 @@ public class GridCachePartitionNotLoadedEventSelfTest extends GridCommonAbstract /** * @throws Exception If failed. */ + @Test public void testPrimaryAndBackupDead() throws Exception { backupCnt = 1; @@ -164,6 +165,7 @@ public void testPrimaryAndBackupDead() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPrimaryDead() throws Exception { startGrid(0); startGrid(1); @@ -198,6 +200,7 @@ public void testPrimaryDead() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStableTopology() throws Exception { backupCnt = 1; @@ -234,6 +237,7 @@ public void testStableTopology() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMapPartitioned() throws Exception { backupCnt = 0; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionedReloadAllAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionedReloadAllAbstractSelfTest.java index d7186443ca39d..a000f7ff6982e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionedReloadAllAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionedReloadAllAbstractSelfTest.java @@ -175,6 +175,7 @@ protected CacheAtomicityMode atomicityMode() { /** * @throws Exception If test failed. */ + @Test public void testReloadAll() throws Exception { // Fill caches with values. for (IgniteCache cache : caches) { @@ -203,4 +204,4 @@ public void testReloadAll() throws Exception { } } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadEventsAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadEventsAbstractSelfTest.java index 01488048898a8..c8b5b953af9ae 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadEventsAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadEventsAbstractSelfTest.java @@ -103,6 +103,7 @@ protected CacheConfiguration cacheConfiguration() { /** * @throws Exception if failed. */ + @Test public void testPreloadEvents() throws Exception { Ignite g1 = startGrid("g1"); @@ -138,4 +139,4 @@ protected void checkPreloadEvents(Collection evts, Ignite g, Collection c, int key, int at error("Attempt: " + attempt); error("Node: " + c.unwrap(Ignite.class).cluster().localNode().id()); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTransformEventSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTransformEventSelfTest.java index 8cb0885478ede..654dabe94c07d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTransformEventSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTransformEventSelfTest.java @@ -279,6 +279,7 @@ private boolean backup(int gridIdx, Object key) { * * @throws Exception If failed. */ + @Test public void testTxLocalOptimisticRepeatableRead() throws Exception { checkTx(LOCAL, OPTIMISTIC, REPEATABLE_READ); } @@ -288,6 +289,7 @@ public void testTxLocalOptimisticRepeatableRead() throws Exception { * * @throws Exception If failed. */ + @Test public void testTxLocalOptimisticReadCommitted() throws Exception { checkTx(LOCAL, OPTIMISTIC, READ_COMMITTED); } @@ -297,6 +299,7 @@ public void testTxLocalOptimisticReadCommitted() throws Exception { * * @throws Exception If failed. */ + @Test public void testTxLocalOptimisticSerializable() throws Exception { checkTx(LOCAL, OPTIMISTIC, SERIALIZABLE); } @@ -306,6 +309,7 @@ public void testTxLocalOptimisticSerializable() throws Exception { * * @throws Exception If failed. */ + @Test public void testTxLocalPessimisticRepeatableRead() throws Exception { checkTx(LOCAL, PESSIMISTIC, REPEATABLE_READ); } @@ -315,6 +319,7 @@ public void testTxLocalPessimisticRepeatableRead() throws Exception { * * @throws Exception If failed. */ + @Test public void testTxLocalPessimisticReadCommitted() throws Exception { checkTx(LOCAL, PESSIMISTIC, READ_COMMITTED); } @@ -324,6 +329,7 @@ public void testTxLocalPessimisticReadCommitted() throws Exception { * * @throws Exception If failed. */ + @Test public void testTxLocalPessimisticSerializable() throws Exception { checkTx(LOCAL, PESSIMISTIC, SERIALIZABLE); } @@ -333,6 +339,7 @@ public void testTxLocalPessimisticSerializable() throws Exception { * * @throws Exception If failed. */ + @Test public void testMvccTxLocalPessimisticRepeatableRead() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-9530"); @@ -344,6 +351,7 @@ public void testMvccTxLocalPessimisticRepeatableRead() throws Exception { * * @throws Exception If failed. */ + @Test public void testTxPartitionedOptimisticRepeatableRead() throws Exception { checkTx(PARTITIONED, OPTIMISTIC, REPEATABLE_READ); } @@ -353,6 +361,7 @@ public void testTxPartitionedOptimisticRepeatableRead() throws Exception { * * @throws Exception If failed. */ + @Test public void testTxPartitionedOptimisticReadCommitted() throws Exception { checkTx(PARTITIONED, OPTIMISTIC, READ_COMMITTED); } @@ -362,6 +371,7 @@ public void testTxPartitionedOptimisticReadCommitted() throws Exception { * * @throws Exception If failed. */ + @Test public void testTxPartitionedOptimisticSerializable() throws Exception { checkTx(PARTITIONED, OPTIMISTIC, SERIALIZABLE); } @@ -371,6 +381,7 @@ public void testTxPartitionedOptimisticSerializable() throws Exception { * * @throws Exception If failed. */ + @Test public void testTxPartitionedPessimisticRepeatableRead() throws Exception { checkTx(PARTITIONED, PESSIMISTIC, REPEATABLE_READ); } @@ -380,6 +391,7 @@ public void testTxPartitionedPessimisticRepeatableRead() throws Exception { * * @throws Exception If failed. */ + @Test public void testTxPartitionedPessimisticReadCommitted() throws Exception { checkTx(PARTITIONED, PESSIMISTIC, READ_COMMITTED); } @@ -389,6 +401,7 @@ public void testTxPartitionedPessimisticReadCommitted() throws Exception { * * @throws Exception If failed. */ + @Test public void testTxPartitionedPessimisticSerializable() throws Exception { checkTx(PARTITIONED, PESSIMISTIC, SERIALIZABLE); } @@ -398,6 +411,7 @@ public void testTxPartitionedPessimisticSerializable() throws Exception { * * @throws Exception If failed. */ + @Test public void testMvccTxPartitionedPessimisticRepeatableRead() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-9321"); @@ -410,6 +424,7 @@ public void testMvccTxPartitionedPessimisticRepeatableRead() throws Exception { * * @throws Exception If failed. */ + @Test public void testTxReplicatedOptimisticRepeatableRead() throws Exception { checkTx(REPLICATED, OPTIMISTIC, REPEATABLE_READ); } @@ -419,6 +434,7 @@ public void testTxReplicatedOptimisticRepeatableRead() throws Exception { * * @throws Exception If failed. */ + @Test public void testTxReplicatedOptimisticReadCommitted() throws Exception { checkTx(REPLICATED, OPTIMISTIC, READ_COMMITTED); } @@ -428,6 +444,7 @@ public void testTxReplicatedOptimisticReadCommitted() throws Exception { * * @throws Exception If failed. */ + @Test public void testTxReplicatedOptimisticSerializable() throws Exception { checkTx(REPLICATED, OPTIMISTIC, SERIALIZABLE); } @@ -437,6 +454,7 @@ public void testTxReplicatedOptimisticSerializable() throws Exception { * * @throws Exception If failed. */ + @Test public void testTxReplicatedPessimisticRepeatableRead() throws Exception { checkTx(REPLICATED, PESSIMISTIC, REPEATABLE_READ); } @@ -446,6 +464,7 @@ public void testTxReplicatedPessimisticRepeatableRead() throws Exception { * * @throws Exception If failed. */ + @Test public void testTxReplicatedPessimisticReadCommitted() throws Exception { checkTx(REPLICATED, PESSIMISTIC, READ_COMMITTED); } @@ -455,6 +474,7 @@ public void testTxReplicatedPessimisticReadCommitted() throws Exception { * * @throws Exception If failed. */ + @Test public void testTxReplicatedPessimisticSerializable() throws Exception { checkTx(REPLICATED, PESSIMISTIC, SERIALIZABLE); } @@ -464,6 +484,7 @@ public void testTxReplicatedPessimisticSerializable() throws Exception { * * @throws Exception If failed. */ + @Test public void testMvccTxReplicatedPessimisticRepeatableRead() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-9321"); @@ -475,6 +496,7 @@ public void testMvccTxReplicatedPessimisticRepeatableRead() throws Exception { * * @throws Exception If failed. */ + @Test public void testAtomicLocal() throws Exception { checkAtomic(LOCAL); } @@ -484,6 +506,7 @@ public void testAtomicLocal() throws Exception { * * @throws Exception If failed. */ + @Test public void testAtomicPartitioned() throws Exception { checkAtomic(PARTITIONED); } @@ -493,6 +516,7 @@ public void testAtomicPartitioned() throws Exception { * * @throws Exception If failed. */ + @Test public void testAtomicReplicated() throws Exception { checkAtomic(REPLICATED); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteBinaryMetadataUpdateChangingTopologySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteBinaryMetadataUpdateChangingTopologySelfTest.java index edfeb967d70e1..073c1bb14fe1f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteBinaryMetadataUpdateChangingTopologySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteBinaryMetadataUpdateChangingTopologySelfTest.java @@ -92,6 +92,7 @@ public class IgniteBinaryMetadataUpdateChangingTopologySelfTest extends GridComm /** * @throws Exception If failed. */ + @Test public void testNoDeadlockOptimistic() throws Exception { int key1 = primaryKey(ignite(1).cache("cache")); int key2 = primaryKey(ignite(2).cache("cache")); @@ -131,6 +132,7 @@ public void testNoDeadlockOptimistic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNoDeadlockInvoke() throws Exception { int key1 = primaryKey(ignite(1).cache("cache")); int key2 = primaryKey(ignite(2).cache("cache")); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteBinaryMetadataUpdateNodeRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteBinaryMetadataUpdateNodeRestartTest.java index b95ad4ad5b8ba..8822e3cd6d926 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteBinaryMetadataUpdateNodeRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteBinaryMetadataUpdateNodeRestartTest.java @@ -81,7 +81,7 @@ public class IgniteBinaryMetadataUpdateNodeRestartTest extends GridCommonAbstrac CacheConfiguration ccfg1 = cacheConfiguration(TX_CACHE, TRANSACTIONAL); CacheConfiguration ccfg2 = cacheConfiguration(ATOMIC_CACHE, ATOMIC); - + cfg.setCacheConfiguration(ccfg1, ccfg2); cfg.setClientMode(client); @@ -121,6 +121,7 @@ private CacheConfiguration cacheConfiguration(String name, CacheAtomicityMode at /** * @throws Exception If failed. */ + @Test public void testNodeRestart() throws Exception { for (int i = 0; i < 10; i++) { log.info("Iteration: " + i); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCache150ClientsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCache150ClientsTest.java index 62305014ddaf6..5e27ee08f7128 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCache150ClientsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCache150ClientsTest.java @@ -111,6 +111,7 @@ public class IgniteCache150ClientsTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void test150Clients() throws Exception { Ignite srv = startGrid(0); @@ -196,4 +197,4 @@ private void checkNodes(int expCnt) { ignite.cluster().nodes().size()); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java index 6b62912e22eb9..8625a0119de6e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java @@ -32,7 +32,8 @@ public class IgniteCacheAtomicNodeRestartTest extends GridCachePartitionedNodeRe } /** {@inheritDoc} */ - @Override public void testRestartWithPutFourNodesNoBackups() { + @Override @Test + public void testRestartWithPutFourNodesNoBackups() { fail("https://issues.apache.org/jira/browse/IGNITE-1587"); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientMultiNodeUpdateTopologyLockTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientMultiNodeUpdateTopologyLockTest.java index 7711bbbaa927e..4875911c3ace0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientMultiNodeUpdateTopologyLockTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientMultiNodeUpdateTopologyLockTest.java @@ -78,6 +78,7 @@ public class IgniteCacheClientMultiNodeUpdateTopologyLockTest extends GridCommon /** * @throws Exception If failed. */ + @Test public void testPessimisticTx() throws Exception { startGrids(3); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeChangingTopologyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeChangingTopologyTest.java index dd6e36e717555..b6b5b25e0d5cb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeChangingTopologyTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeChangingTopologyTest.java @@ -157,6 +157,7 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + @Test public void testAtomicPutAllPrimaryMode() throws Exception { atomicPut(true, null); } @@ -164,6 +165,7 @@ public void testAtomicPutAllPrimaryMode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAtomicPutAllNearEnabledPrimaryMode() throws Exception { atomicPut(true, new NearCacheConfiguration()); } @@ -171,6 +173,7 @@ public void testAtomicPutAllNearEnabledPrimaryMode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAtomicPutPrimaryMode() throws Exception { atomicPut(false, null); } @@ -296,6 +299,7 @@ private void atomicPut(final boolean putAll, /** * @throws Exception If failed. */ + @Test public void testAtomicNoRemapPrimaryMode() throws Exception { atomicNoRemap(); } @@ -383,6 +387,7 @@ private void atomicNoRemap() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAtomicGetAndPutPrimaryMode() throws Exception { atomicGetAndPut(); } @@ -450,6 +455,7 @@ private void atomicGetAndPut() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxPutAll() throws Exception { ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME); @@ -517,6 +523,7 @@ public void testTxPutAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticTx() throws Exception { pessimisticTx(null); } @@ -524,6 +531,7 @@ public void testPessimisticTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticTxNearEnabled() throws Exception { pessimisticTx(new NearCacheConfiguration()); } @@ -742,6 +750,7 @@ private Integer findKey(Affinity aff, int part) { * * @throws Exception If failed. */ + @Test public void testPessimisticTx2() throws Exception { ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME); @@ -835,6 +844,7 @@ public void testPessimisticTx2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticTxNearEnabledNoRemap() throws Exception { pessimisticTxNoRemap(new NearCacheConfiguration()); } @@ -842,6 +852,7 @@ public void testPessimisticTxNearEnabledNoRemap() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticTxNoRemap() throws Exception { pessimisticTxNoRemap(null); } @@ -956,6 +967,7 @@ private CacheConfiguration testPessimisticTx3Cfg() { /** * @throws Exception If failed. */ + @Test public void testPessimisticTx3() throws Exception { for (int iter = 0; iter < 5; iter++) { info("Iteration: " + iter); @@ -1021,6 +1033,7 @@ public void testPessimisticTx3() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOptimisticSerializableTx() throws Exception { optimisticSerializableTx(null); } @@ -1028,6 +1041,7 @@ public void testOptimisticSerializableTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOptimisticSerializableTxNearEnabled() throws Exception { optimisticSerializableTx(new NearCacheConfiguration()); } @@ -1173,6 +1187,7 @@ private void optimisticSerializableTx(NearCacheConfiguration nearCfg) throws Exc /** * @throws Exception If failed. */ + @Test public void testLock() throws Exception { lock(null); } @@ -1180,6 +1195,7 @@ public void testLock() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLockNearEnabled() throws Exception { lock(new NearCacheConfiguration()); } @@ -1310,6 +1326,7 @@ private boolean unlocked(Ignite ignite) { /** * @throws Exception If failed. */ + @Test public void testPessimisticTxMessageClientFirstFlag() throws Exception { ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME); @@ -1410,6 +1427,7 @@ private void checkClientLockMessages(List msgs, int expCnt) { /** * @throws Exception If failed. */ + @Test public void testOptimisticTxMessageClientFirstFlag() throws Exception { ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME); @@ -1505,6 +1523,7 @@ private void checkClientPrepareMessages(List msgs, int expCnt) { /** * @throws Exception If failed. */ + @Test public void testLockRemoveAfterClientFailed() throws Exception { ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME); @@ -1563,6 +1582,7 @@ public void testLockRemoveAfterClientFailed() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLockFromClientBlocksExchange() throws Exception { ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME); @@ -1738,6 +1758,7 @@ private void checkData(final Map map, /** * @throws Exception If failed. */ + @Test public void testAtomicPrimaryPutAllMultinode() throws Exception { multinode(ATOMIC, TestType.PUT_ALL); } @@ -1745,6 +1766,7 @@ public void testAtomicPrimaryPutAllMultinode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOptimisticTxPutAllMultinode() throws Exception { multinode(TRANSACTIONAL, TestType.OPTIMISTIC_TX); } @@ -1752,6 +1774,7 @@ public void testOptimisticTxPutAllMultinode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOptimisticSerializableTxPutAllMultinode() throws Exception { multinode(TRANSACTIONAL, TestType.OPTIMISTIC_SERIALIZABLE_TX); } @@ -1759,6 +1782,7 @@ public void testOptimisticSerializableTxPutAllMultinode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticTxPutAllMultinode() throws Exception { multinode(TRANSACTIONAL, TestType.PESSIMISTIC_TX); } @@ -1766,6 +1790,7 @@ public void testPessimisticTxPutAllMultinode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLockAllMultinode() throws Exception { multinode(TRANSACTIONAL, TestType.LOCK); } @@ -2001,6 +2026,7 @@ private void multinode(CacheAtomicityMode atomicityMode, final TestType testType /** * @throws Exception If failed. */ + @Test public void testServersLeaveOnStart() throws Exception { ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeConcurrentStart.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeConcurrentStart.java index cdb69133ed262..f447d1278c898 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeConcurrentStart.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeConcurrentStart.java @@ -76,6 +76,7 @@ public class IgniteCacheClientNodeConcurrentStart extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testConcurrentStart() throws Exception { ThreadLocalRandom rnd = ThreadLocalRandom.current(); @@ -111,4 +112,4 @@ public void testConcurrentStart() throws Exception { } } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodePartitionsExchangeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodePartitionsExchangeTest.java index 510140299931c..ca4370c97b0b4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodePartitionsExchangeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodePartitionsExchangeTest.java @@ -97,6 +97,7 @@ public class IgniteCacheClientNodePartitionsExchangeTest extends GridCommonAbstr /** * @throws Exception If failed. */ + @Test public void testServerNodeLeave() throws Exception { Ignite ignite0 = startGrid(0); @@ -146,6 +147,7 @@ public void testServerNodeLeave() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSkipPreload() throws Exception { Ignite ignite0 = startGrid(0); @@ -198,6 +200,7 @@ public void testSkipPreload() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPartitionsExchange() throws Exception { partitionsExchange(false); } @@ -205,6 +208,7 @@ public void testPartitionsExchange() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPartitionsExchangeCompatibilityMode() throws Exception { System.setProperty(IGNITE_EXCHANGE_COMPATIBILITY_VER_1, "true"); @@ -474,6 +478,7 @@ private void waitForTopologyUpdate(int expNodes, final AffinityTopologyVersion t /** * @throws Exception If failed. */ + @Test public void testClientOnlyCacheStart() throws Exception { clientOnlyCacheStart(false, false); } @@ -481,6 +486,7 @@ public void testClientOnlyCacheStart() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNearOnlyCacheStart() throws Exception { clientOnlyCacheStart(true, false); } @@ -488,6 +494,7 @@ public void testNearOnlyCacheStart() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientOnlyCacheStartFromServerNode() throws Exception { clientOnlyCacheStart(false, true); } @@ -495,6 +502,7 @@ public void testClientOnlyCacheStartFromServerNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNearOnlyCacheStartFromServerNode() throws Exception { clientOnlyCacheStart(true, true); } @@ -691,4 +699,4 @@ int partitionsFullMessages() { } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientReconnectTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientReconnectTest.java index a0796a3e22ec7..ed4f13beb27f6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientReconnectTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientReconnectTest.java @@ -129,6 +129,7 @@ public class IgniteCacheClientReconnectTest extends GridCommonAbstractTest { * * @throws Exception If failed */ + @Test public void testClientReconnectOnExchangeHistoryExhaustion() throws Exception { System.setProperty(IgniteSystemProperties.IGNITE_EXCHANGE_HISTORY_SIZE, "1"); @@ -161,6 +162,7 @@ public void testClientReconnectOnExchangeHistoryExhaustion() throws Exception { * * @throws Exception If failed */ + @Test public void testClientInForceServerModeStopsOnExchangeHistoryExhaustion() throws Exception { System.setProperty(IgniteSystemProperties.IGNITE_EXCHANGE_HISTORY_SIZE, "1"); @@ -268,6 +270,7 @@ private void verifyAffinityTopologyVersions() { /** * @throws Exception If failed. */ + @Test public void testClientReconnect() throws Exception { startGrids(SRV_CNT); @@ -342,4 +345,4 @@ private void putGet(Ignite ignite) { assertEquals(key, cache.get(key)); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheConnectionRecoveryTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheConnectionRecoveryTest.java index 5241c37f680c8..11d3c31a4fd0f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheConnectionRecoveryTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheConnectionRecoveryTest.java @@ -94,6 +94,7 @@ public class IgniteCacheConnectionRecoveryTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testConnectionRecovery() throws Exception { final Map data = new TreeMap<>(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheCreatePutMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheCreatePutMultiNodeSelfTest.java index 23fc941472bc1..ee131a585c228 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheCreatePutMultiNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheCreatePutMultiNodeSelfTest.java @@ -68,6 +68,7 @@ public class IgniteCacheCreatePutMultiNodeSelfTest extends GridCommonAbstractTes /** * @throws Exception If failed. */ + @Test public void testStartNodes() throws Exception { try { Collection> futs = new ArrayList<>(GRID_CNT); @@ -145,4 +146,4 @@ private IgniteCache getCache(Ignite grid, String cacheName) { return grid.getOrCreateCache(ccfg); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheCreatePutTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheCreatePutTest.java index 646084c869a32..5708ebc131659 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheCreatePutTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheCreatePutTest.java @@ -98,6 +98,7 @@ public class IgniteCacheCreatePutTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testStartNodes() throws Exception { long stopTime = System.currentTimeMillis() + 2 * 60_000; @@ -140,6 +141,7 @@ public void testStartNodes() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUpdatesAndCacheStart() throws Exception { final int NODES = 4; @@ -246,4 +248,4 @@ private CacheConfiguration cacheConfiguration(String name, CacheAtomicityMode at return ccfg; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheFailedUpdateResponseTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheFailedUpdateResponseTest.java index ebcff7c43898e..65e39209decc8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheFailedUpdateResponseTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheFailedUpdateResponseTest.java @@ -103,6 +103,7 @@ public class IgniteCacheFailedUpdateResponseTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testInvokeAtomic() throws Exception { testInvoke(atomicCache); testInvokeAll(atomicCache); @@ -111,6 +112,7 @@ public void testInvokeAtomic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeTx() throws Exception { testInvoke(txCache); testInvokeAll(txCache); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheGetRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheGetRestartTest.java index ba220486125e1..ab9b74c420d9e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheGetRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheGetRestartTest.java @@ -119,6 +119,7 @@ public class IgniteCacheGetRestartTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testGetRestartReplicated() throws Exception { CacheConfiguration cache = cacheConfiguration(REPLICATED, 0, false); @@ -128,6 +129,7 @@ public void testGetRestartReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetRestartPartitioned1() throws Exception { CacheConfiguration cache = cacheConfiguration(PARTITIONED, 1, false); @@ -137,6 +139,7 @@ public void testGetRestartPartitioned1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetRestartPartitioned2() throws Exception { CacheConfiguration cache = cacheConfiguration(PARTITIONED, 2, false); @@ -146,6 +149,7 @@ public void testGetRestartPartitioned2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetRestartPartitionedNearEnabled() throws Exception { CacheConfiguration cache = cacheConfiguration(PARTITIONED, 1, true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheGroupsPartitionLossPolicySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheGroupsPartitionLossPolicySelfTest.java index 186255318dc49..52142367dd8d3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheGroupsPartitionLossPolicySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheGroupsPartitionLossPolicySelfTest.java @@ -100,6 +100,7 @@ public class IgniteCacheGroupsPartitionLossPolicySelfTest extends GridCommonAbst /** * @throws Exception if failed. */ + @Test public void testReadOnlySafe() throws Exception { partLossPlc = PartitionLossPolicy.READ_ONLY_SAFE; @@ -109,6 +110,7 @@ public void testReadOnlySafe() throws Exception { /** * @throws Exception if failed. */ + @Test public void testReadOnlyAll() throws Exception { partLossPlc = PartitionLossPolicy.READ_ONLY_ALL; @@ -118,6 +120,7 @@ public void testReadOnlyAll() throws Exception { /** * @throws Exception if failed. */ + @Test public void testReadWriteSafe() throws Exception { partLossPlc = PartitionLossPolicy.READ_WRITE_SAFE; @@ -127,6 +130,7 @@ public void testReadWriteSafe() throws Exception { /** * @throws Exception if failed. */ + @Test public void testReadWriteAll() throws Exception { partLossPlc = PartitionLossPolicy.READ_WRITE_ALL; @@ -136,6 +140,7 @@ public void testReadWriteAll() throws Exception { /** * @throws Exception if failed. */ + @Test public void testIgnore() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-5078"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheManyClientsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheManyClientsTest.java index 1e7b32a4232cc..358f555a67a26 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheManyClientsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheManyClientsTest.java @@ -114,6 +114,7 @@ public class IgniteCacheManyClientsTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testManyClientsClientDiscovery() throws Throwable { clientDiscovery = true; @@ -123,6 +124,7 @@ public void testManyClientsClientDiscovery() throws Throwable { /** * @throws Exception If failed. */ + @Test public void testManyClientsSequentiallyClientDiscovery() throws Exception { clientDiscovery = true; @@ -132,6 +134,7 @@ public void testManyClientsSequentiallyClientDiscovery() throws Exception { /** * @throws Exception If failed. */ + @Test public void testManyClientsForceServerMode() throws Throwable { manyClientsPutGet(); } @@ -331,4 +334,4 @@ private void manyClientsPutGet() throws Throwable { stop.set(true); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheMessageRecoveryAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheMessageRecoveryAbstractTest.java index 8b75695736e6f..8134e1e98cc6c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheMessageRecoveryAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheMessageRecoveryAbstractTest.java @@ -107,6 +107,7 @@ protected int connectionsPerNode() { /** * @throws Exception If failed. */ + @Test public void testMessageRecovery() throws Exception { final Ignite ignite = grid(0); @@ -195,4 +196,4 @@ static boolean closeSessions(Ignite ignite) throws Exception { return closed; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheMessageRecoveryIdleConnectionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheMessageRecoveryIdleConnectionTest.java index 0f4aaa7a85c17..0999d3f7fc115 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheMessageRecoveryIdleConnectionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheMessageRecoveryIdleConnectionTest.java @@ -84,6 +84,7 @@ public class IgniteCacheMessageRecoveryIdleConnectionTest extends GridCommonAbst /** * @throws Exception If failed. */ + @Test public void testCacheOperationsIdleConnectionCloseTx() throws Exception { cacheOperationsIdleConnectionClose(TRANSACTIONAL); } @@ -91,6 +92,7 @@ public void testCacheOperationsIdleConnectionCloseTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheOperationsIdleConnectionCloseAtomic() throws Exception { cacheOperationsIdleConnectionClose(ATOMIC); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheMessageWriteTimeoutTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheMessageWriteTimeoutTest.java index 3ba319bde6bd2..aa647735ad808 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheMessageWriteTimeoutTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheMessageWriteTimeoutTest.java @@ -74,6 +74,7 @@ public class IgniteCacheMessageWriteTimeoutTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testMessageQueueLimit() throws Exception { for (int i = 0; i < 3; i++) { log.info("Iteration: " + i); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheNearRestartRollbackSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheNearRestartRollbackSelfTest.java index d9a8e58b6f995..b527761a67dc9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheNearRestartRollbackSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheNearRestartRollbackSelfTest.java @@ -128,6 +128,7 @@ protected CacheConfiguration cacheConfiguration(String igniteIns /** * @throws Exception If failed. */ + @Test public void testRestarts() throws Exception { startGrids(4); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheNodeJoinAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheNodeJoinAbstractTest.java index 002a28d3fca84..1589375a43f56 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheNodeJoinAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheNodeJoinAbstractTest.java @@ -57,6 +57,7 @@ public abstract class IgniteCacheNodeJoinAbstractTest extends IgniteCacheAbstrac /** * @throws Exception If failed. */ + @Test public void testGet() throws Exception { final IgniteCache cache = jcache(0); @@ -111,6 +112,7 @@ public void testGet() throws Exception { /** * @throws Exception If failed. */ + @Test public void testScanQuery() throws Exception { final IgniteCache cache = jcache(0); @@ -148,4 +150,4 @@ public void testScanQuery() throws Exception { stopGrid(1); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCachePartitionLossPolicySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCachePartitionLossPolicySelfTest.java index 226ae229bec2a..acc0892e1210b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCachePartitionLossPolicySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCachePartitionLossPolicySelfTest.java @@ -163,6 +163,7 @@ protected CacheConfiguration cacheConfiguration() { /** * @throws Exception if failed. */ + @Test public void testReadOnlySafe() throws Exception { partLossPlc = PartitionLossPolicy.READ_ONLY_SAFE; @@ -172,6 +173,7 @@ public void testReadOnlySafe() throws Exception { /** * @throws Exception if failed. */ + @Test public void testReadOnlySafeWithPersistence() throws Exception { partLossPlc = PartitionLossPolicy.READ_ONLY_SAFE; @@ -183,6 +185,7 @@ public void testReadOnlySafeWithPersistence() throws Exception { /** * @throws Exception if failed. */ + @Test public void testReadOnlyAll() throws Exception { partLossPlc = PartitionLossPolicy.READ_ONLY_ALL; @@ -192,6 +195,7 @@ public void testReadOnlyAll() throws Exception { /** * @throws Exception if failed. */ + @Test public void testReadOnlyAllWithPersistence() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10041"); @@ -205,6 +209,7 @@ public void testReadOnlyAllWithPersistence() throws Exception { /** * @throws Exception if failed. */ + @Test public void testReadWriteSafe() throws Exception { partLossPlc = PartitionLossPolicy.READ_WRITE_SAFE; @@ -214,6 +219,7 @@ public void testReadWriteSafe() throws Exception { /** * @throws Exception if failed. */ + @Test public void testReadWriteSafeWithPersistence() throws Exception { partLossPlc = PartitionLossPolicy.READ_WRITE_SAFE; @@ -225,6 +231,7 @@ public void testReadWriteSafeWithPersistence() throws Exception { /** * @throws Exception if failed. */ + @Test public void testReadWriteAll() throws Exception { partLossPlc = PartitionLossPolicy.READ_WRITE_ALL; @@ -234,6 +241,7 @@ public void testReadWriteAll() throws Exception { /** * @throws Exception if failed. */ + @Test public void testReadWriteAllWithPersistence() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10041"); @@ -247,6 +255,7 @@ public void testReadWriteAllWithPersistence() throws Exception { /** * @throws Exception if failed. */ + @Test public void testReadWriteSafeAfterKillTwoNodes() throws Exception { partLossPlc = PartitionLossPolicy.READ_WRITE_SAFE; @@ -256,6 +265,7 @@ public void testReadWriteSafeAfterKillTwoNodes() throws Exception { /** * @throws Exception if failed. */ + @Test public void testReadWriteSafeAfterKillTwoNodesWithPersistence() throws Exception { partLossPlc = PartitionLossPolicy.READ_WRITE_SAFE; @@ -267,6 +277,7 @@ public void testReadWriteSafeAfterKillTwoNodesWithPersistence() throws Exception /** * @throws Exception if failed. */ + @Test public void testReadWriteSafeAfterKillTwoNodesWithDelay() throws Exception { partLossPlc = PartitionLossPolicy.READ_WRITE_SAFE; @@ -276,6 +287,7 @@ public void testReadWriteSafeAfterKillTwoNodesWithDelay() throws Exception { /** * @throws Exception if failed. */ + @Test public void testReadWriteSafeAfterKillTwoNodesWithDelayWithPersistence() throws Exception { partLossPlc = PartitionLossPolicy.READ_WRITE_SAFE; @@ -287,6 +299,7 @@ public void testReadWriteSafeAfterKillTwoNodesWithDelayWithPersistence() throws /** * @throws Exception if failed. */ + @Test public void testReadWriteSafeWithBackupsAfterKillThreeNodes() throws Exception { partLossPlc = PartitionLossPolicy.READ_WRITE_SAFE; @@ -298,6 +311,7 @@ public void testReadWriteSafeWithBackupsAfterKillThreeNodes() throws Exception { /** * @throws Exception if failed. */ + @Test public void testReadWriteSafeWithBackupsAfterKillThreeNodesWithPersistence() throws Exception { partLossPlc = PartitionLossPolicy.READ_WRITE_SAFE; @@ -311,6 +325,7 @@ public void testReadWriteSafeWithBackupsAfterKillThreeNodesWithPersistence() thr /** * @throws Exception if failed. */ + @Test public void testReadWriteSafeAfterKillCrd() throws Exception { partLossPlc = PartitionLossPolicy.READ_WRITE_SAFE; @@ -320,6 +335,7 @@ public void testReadWriteSafeAfterKillCrd() throws Exception { /** * @throws Exception if failed. */ + @Test public void testReadWriteSafeAfterKillCrdWithPersistence() throws Exception { partLossPlc = PartitionLossPolicy.READ_WRITE_SAFE; @@ -331,6 +347,7 @@ public void testReadWriteSafeAfterKillCrdWithPersistence() throws Exception { /** * @throws Exception if failed. */ + @Test public void testReadWriteSafeWithBackups() throws Exception { partLossPlc = PartitionLossPolicy.READ_WRITE_SAFE; @@ -342,6 +359,7 @@ public void testReadWriteSafeWithBackups() throws Exception { /** * @throws Exception if failed. */ + @Test public void testReadWriteSafeWithBackupsWithPersistence() throws Exception { partLossPlc = PartitionLossPolicy.READ_WRITE_SAFE; @@ -355,6 +373,7 @@ public void testReadWriteSafeWithBackupsWithPersistence() throws Exception { /** * @throws Exception if failed. */ + @Test public void testReadWriteSafeWithBackupsAfterKillCrd() throws Exception { partLossPlc = PartitionLossPolicy.READ_WRITE_SAFE; @@ -366,6 +385,7 @@ public void testReadWriteSafeWithBackupsAfterKillCrd() throws Exception { /** * @throws Exception if failed. */ + @Test public void testReadWriteSafeWithBackupsAfterKillCrdWithPersistence() throws Exception { partLossPlc = PartitionLossPolicy.READ_WRITE_SAFE; @@ -379,6 +399,7 @@ public void testReadWriteSafeWithBackupsAfterKillCrdWithPersistence() throws Exc /** * @throws Exception if failed. */ + @Test public void testIgnore() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-5078"); @@ -390,6 +411,7 @@ public void testIgnore() throws Exception { /** * @throws Exception if failed. */ + @Test public void testIgnoreWithPersistence() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-5078"); @@ -405,6 +427,7 @@ public void testIgnoreWithPersistence() throws Exception { /** * @throws Exception if failed. */ + @Test public void testIgnoreKillThreeNodes() throws Exception { partLossPlc = PartitionLossPolicy.IGNORE; @@ -419,6 +442,7 @@ public void testIgnoreKillThreeNodes() throws Exception { /** * @throws Exception if failed. */ + @Test public void testIgnoreKillThreeNodesWithPersistence() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10041"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCachePrimarySyncTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCachePrimarySyncTest.java index e9e22ee90429f..a2a36af110462 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCachePrimarySyncTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCachePrimarySyncTest.java @@ -96,6 +96,7 @@ public class IgniteCachePrimarySyncTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPutGet() throws Exception { Ignite ignite = ignite(SRVS); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCachePutGetRestartAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCachePutGetRestartAbstractTest.java index 5c3265faea6c5..06f0e28386a12 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCachePutGetRestartAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCachePutGetRestartAbstractTest.java @@ -104,6 +104,7 @@ public abstract class IgniteCachePutGetRestartAbstractTest extends IgniteCacheAb /** * @throws Exception If failed. */ + @Test public void testTxPutGetRestart() throws Exception { int clientGrid = gridCount() - 1; @@ -240,4 +241,4 @@ private void updateCache(IgniteCache cache, IgniteTransactions log.error("Update failed: " + e, e); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheReadFromBackupTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheReadFromBackupTest.java index 2bb5fbba81e72..b5e292941aad9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheReadFromBackupTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheReadFromBackupTest.java @@ -86,6 +86,7 @@ public class IgniteCacheReadFromBackupTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testGetFromBackupStoreReadThroughEnabled() throws Exception { for (CacheConfiguration ccfg : cacheConfigurations()) { ccfg.setCacheStoreFactory(new TestStoreFactory()); @@ -130,6 +131,7 @@ public void testGetFromBackupStoreReadThroughEnabled() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetFromBackupStoreReadThroughDisabled() throws Exception { for (CacheConfiguration ccfg : cacheConfigurations()) { ccfg.setCacheStoreFactory(new TestStoreFactory()); @@ -158,6 +160,7 @@ public void testGetFromBackupStoreReadThroughDisabled() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetFromPrimaryPreloadInProgress() throws Exception { for (final CacheConfiguration ccfg : cacheConfigurations()) { boolean near = (ccfg.getNearConfiguration() != null); @@ -244,6 +247,7 @@ public void testGetFromPrimaryPreloadInProgress() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNoPrimaryReadPreloadFinished() throws Exception { for (CacheConfiguration ccfg : cacheConfigurations()) { boolean near = (ccfg.getNearConfiguration() != null); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheServerNodeConcurrentStart.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheServerNodeConcurrentStart.java index 0b5280d4c4392..04cd731a60fa1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheServerNodeConcurrentStart.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheServerNodeConcurrentStart.java @@ -81,6 +81,7 @@ public class IgniteCacheServerNodeConcurrentStart extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testConcurrentStart() throws Exception { for (int i = 0; i < ITERATIONS; i++) { log.info("Iteration: " + i); @@ -98,4 +99,4 @@ public void testConcurrentStart() throws Exception { log.info("Iteration finished, time: " + (System.currentTimeMillis() - start) / 1000f); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSingleGetMessageTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSingleGetMessageTest.java index 974bcf21dc292..359fb16a5f2ac 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSingleGetMessageTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSingleGetMessageTest.java @@ -87,6 +87,7 @@ public class IgniteCacheSingleGetMessageTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testSingleGetMessage() throws Exception { assertFalse(ignite(0).configuration().isClientMode()); assertTrue(ignite(SRVS).configuration().isClientMode()); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSizeFailoverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSizeFailoverTest.java index cd859506895e4..1834f02e8a844 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSizeFailoverTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSizeFailoverTest.java @@ -73,6 +73,7 @@ public class IgniteCacheSizeFailoverTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testSize() throws Exception { startGrids(2); @@ -123,4 +124,4 @@ public void testSize() throws Exception { fut.get(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSystemTransactionsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSystemTransactionsSelfTest.java index eb19873c816f5..624a315c7b77a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSystemTransactionsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSystemTransactionsSelfTest.java @@ -70,6 +70,7 @@ public class IgniteCacheSystemTransactionsSelfTest extends GridCacheAbstractSelf /** * @throws Exception If failed. */ + @Test public void testSystemTxInsideUserTx() throws Exception { IgniteKernal ignite = (IgniteKernal)grid(0); @@ -107,6 +108,7 @@ public void testSystemTxInsideUserTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGridNearTxLocalDuplicateAsyncCommit() throws Exception { IgniteKernal ignite = (IgniteKernal)grid(0); @@ -170,4 +172,4 @@ private void checkEntries(String cacheName, Object... vals) throws Exception { } } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheThreadLocalTxTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheThreadLocalTxTest.java index cab6c720cca16..2b624dc36994b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheThreadLocalTxTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheThreadLocalTxTest.java @@ -68,6 +68,7 @@ public class IgniteCacheThreadLocalTxTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testSingleNode() throws Exception { threadLocalTx(startGrid(0)); } @@ -75,6 +76,7 @@ public void testSingleNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultiNode() throws Exception { startGridsMultiThreaded(4); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxIteratorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxIteratorSelfTest.java index e5bb583b95467..adf884b1ad308 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxIteratorSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxIteratorSelfTest.java @@ -86,6 +86,7 @@ private CacheConfiguration cacheConfiguration( /** * @throws Exception if failed. */ + @Test public void testModesSingleNode() throws Exception { checkModes(1); } @@ -93,6 +94,7 @@ public void testModesSingleNode() throws Exception { /** * @throws Exception if failed. */ + @Test public void testModesMultiNode() throws Exception { checkModes(3); } @@ -236,4 +238,4 @@ private TestClass(String data) { return S.toString(TestClass.class, this); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCrossCacheTxStoreSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCrossCacheTxStoreSelfTest.java index 66453b80ca75a..08ec24a8157e5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCrossCacheTxStoreSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCrossCacheTxStoreSelfTest.java @@ -119,6 +119,7 @@ private CacheConfiguration cacheConfiguration(String cacheName, Factory { return secondStores.computeIfAbsent(igniteInstanceName, (k) -> new TestStore()); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteMvccTxTimeoutAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteMvccTxTimeoutAbstractTest.java index 15d23f4d4c64a..26bb87015ac31 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteMvccTxTimeoutAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteMvccTxTimeoutAbstractTest.java @@ -95,6 +95,7 @@ public class IgniteMvccTxTimeoutAbstractTest extends GridCommonAbstractTest { /** * @throws IgniteCheckedException If test failed. */ + @Test public void testPessimisticRepeatableRead() throws Exception { checkTransactionTimeout(PESSIMISTIC, REPEATABLE_READ); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteOptimisticTxSuspendResumeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteOptimisticTxSuspendResumeTest.java index 73a7dc12d54c3..d5e461069de7a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteOptimisticTxSuspendResumeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteOptimisticTxSuspendResumeTest.java @@ -177,6 +177,7 @@ protected int gridCount() { * * @throws Exception If failed. */ + @Test public void testResumeTxInAnotherThread() throws Exception { executeTestForAllCaches(new CI2Exc>() { @Override public void applyx(Ignite ignite, final IgniteCache cache) throws Exception { @@ -238,6 +239,7 @@ public void testResumeTxInAnotherThread() throws Exception { * * @throws Exception If failed. */ + @Test public void testCrossCacheTxInAnotherThread() throws Exception { executeTestForAllCaches(new CI2Exc>() { @Override public void applyx(Ignite ignite, final IgniteCache cache) throws Exception { @@ -298,6 +300,7 @@ public void testCrossCacheTxInAnotherThread() throws Exception { * * @throws Exception If failed. */ + @Test public void testTxRollback() throws Exception { executeTestForAllCaches(new CI2Exc>() { @Override public void applyx(Ignite ignite, final IgniteCache cache) throws Exception { @@ -348,6 +351,7 @@ public void testTxRollback() throws Exception { * * @throws Exception If failed. */ + @Test public void testMultiTxSuspendResume() throws Exception { executeTestForAllCaches(new CI2Exc>() { @Override public void applyx(Ignite ignite, final IgniteCache cache) throws Exception { @@ -392,6 +396,7 @@ public void testMultiTxSuspendResume() throws Exception { * * @throws Exception If failed. */ + @Test public void testOpsProhibitedOnSuspendedTxFromOtherThread() throws Exception { executeTestForAllCaches(new CI2Exc>() { @Override public void applyx(Ignite ignite, final IgniteCache cache) throws Exception { @@ -424,6 +429,7 @@ public void testOpsProhibitedOnSuspendedTxFromOtherThread() throws Exception { * * @throws Exception If failed. */ + @Test public void testOpsProhibitedOnSuspendedTx() throws Exception { executeTestForAllCaches(new CI2Exc>() { @Override public void applyx(Ignite ignite, final IgniteCache cache) throws Exception { @@ -452,6 +458,7 @@ public void testOpsProhibitedOnSuspendedTx() throws Exception { * * @throws Exception If failed. */ + @Test public void testTxTimeoutOnResumed() throws Exception { executeTestForAllCaches(new CI2Exc>() { @Override public void applyx(Ignite ignite, final IgniteCache cache) throws Exception { @@ -491,6 +498,7 @@ public void testTxTimeoutOnResumed() throws Exception { * * @throws Exception If failed. */ + @Test public void testTxTimeoutOnSuspend() throws Exception { executeTestForAllCaches(new CI2Exc>() { @Override public void applyx(Ignite ignite, final IgniteCache cache) throws Exception { @@ -531,6 +539,7 @@ public void testTxTimeoutOnSuspend() throws Exception { * * @throws Exception If failed. */ + @Test public void testSuspendTxAndStartNew() throws Exception { executeTestForAllCaches(new CI2Exc>() { @Override public void applyx(Ignite ignite, final IgniteCache cache) throws Exception { @@ -571,6 +580,7 @@ public void testSuspendTxAndStartNew() throws Exception { * * @throws Exception If failed. */ + @Test public void testSuspendTxAndStartNewWithoutCommit() throws Exception { executeTestForAllCaches(new CI2Exc>() { @Override public void applyx(Ignite ignite, final IgniteCache cache) throws Exception { @@ -619,6 +629,7 @@ public void testSuspendTxAndStartNewWithoutCommit() throws Exception { * * @throws Exception If failed. */ + @Test public void testSuspendTxAndResumeAfterTopologyChange() throws Exception { Ignite srv = ignite(ThreadLocalRandom.current().nextInt(SERVER_CNT)); Ignite client = ignite(SERVER_CNT); @@ -713,6 +724,7 @@ private void doCheckSuspendTxAndResume(Ignite node, Map>() { @Override public void applyx(Ignite ignite, final IgniteCache cache) throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgnitePessimisticTxSuspendResumeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgnitePessimisticTxSuspendResumeTest.java index dba769d2d560c..cd373741dbe24 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgnitePessimisticTxSuspendResumeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgnitePessimisticTxSuspendResumeTest.java @@ -64,6 +64,7 @@ protected CacheConfiguration getCacheConfiguration() { * * @throws Exception If failed. */ + @Test public void testSuspendPessimisticTx() throws Exception { try (Ignite g = startGrid()) { IgniteCache cache = jcache(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteRejectConnectOnNodeStopTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteRejectConnectOnNodeStopTest.java index 97d685f225357..acd289d402846 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteRejectConnectOnNodeStopTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteRejectConnectOnNodeStopTest.java @@ -89,6 +89,7 @@ public class IgniteRejectConnectOnNodeStopTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testNodeStop() throws Exception { Ignite srv = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxCachePrimarySyncTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxCachePrimarySyncTest.java index bdf0b12dee21d..525f17ff1125c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxCachePrimarySyncTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxCachePrimarySyncTest.java @@ -133,6 +133,7 @@ public class IgniteTxCachePrimarySyncTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testSingleKeyCommitFromPrimary() throws Exception { singleKeyCommitFromPrimary(cacheConfiguration(DEFAULT_CACHE_NAME, PRIMARY_SYNC, 1, true, false)); @@ -246,6 +247,7 @@ private void singleKeyCommitFromPrimary( /** * @throws Exception If failed. */ + @Test public void testSingleKeyPrimaryNodeFail1() throws Exception { singleKeyPrimaryNodeLeft(cacheConfiguration(DEFAULT_CACHE_NAME, PRIMARY_SYNC, 1, true, false)); @@ -255,6 +257,7 @@ public void testSingleKeyPrimaryNodeFail1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSingleKeyPrimaryNodeFail2() throws Exception { singleKeyPrimaryNodeLeft(cacheConfiguration(DEFAULT_CACHE_NAME, PRIMARY_SYNC, 2, true, false)); @@ -371,6 +374,7 @@ private void singleKeyPrimaryNodeLeft( /** * @throws Exception If failed. */ + @Test public void testSingleKeyCommit() throws Exception { singleKeyCommit(cacheConfiguration(DEFAULT_CACHE_NAME, PRIMARY_SYNC, 1, true, false)); @@ -513,6 +517,7 @@ private void singleKeyCommit( /** * @throws Exception If failed. */ + @Test public void testWaitPrimaryResponse() throws Exception { checkWaitPrimaryResponse(cacheConfiguration(DEFAULT_CACHE_NAME, PRIMARY_SYNC, 1, true, false)); @@ -651,6 +656,7 @@ private void checkWaitPrimaryResponse( /** * @throws Exception If failed. */ + @Test public void testOnePhaseMessages() throws Exception { checkOnePhaseMessages(cacheConfiguration(DEFAULT_CACHE_NAME, PRIMARY_SYNC, 1, false, false)); } @@ -754,6 +760,7 @@ private void checkOnePhaseMessages( /** * @throws Exception If failed. */ + @Test public void testTxSyncMode() throws Exception { Ignite ignite = ignite(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxCacheWriteSynchronizationModesMultithreadedTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxCacheWriteSynchronizationModesMultithreadedTest.java index bed8a41149a80..5581418b686d5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxCacheWriteSynchronizationModesMultithreadedTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxCacheWriteSynchronizationModesMultithreadedTest.java @@ -128,6 +128,7 @@ public class IgniteTxCacheWriteSynchronizationModesMultithreadedTest extends Gri /** * @throws Exception If failed. */ + @Test public void testMultithreadedPrimarySyncRestart() throws Exception { multithreadedTests(PRIMARY_SYNC, true); } @@ -135,6 +136,7 @@ public void testMultithreadedPrimarySyncRestart() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultithreadedPrimarySync() throws Exception { multithreadedTests(PRIMARY_SYNC, false); } @@ -142,6 +144,7 @@ public void testMultithreadedPrimarySync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultithreadedFullSync() throws Exception { multithreadedTests(FULL_SYNC, false); } @@ -149,6 +152,7 @@ public void testMultithreadedFullSync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultithreadedFullSyncRestart() throws Exception { multithreadedTests(FULL_SYNC, true); } @@ -156,6 +160,7 @@ public void testMultithreadedFullSyncRestart() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultithreadedFullAsync() throws Exception { multithreadedTests(FULL_ASYNC, false); } @@ -163,6 +168,7 @@ public void testMultithreadedFullAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultithreadedFullAsyncRestart() throws Exception { multithreadedTests(FULL_ASYNC, true); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxConcurrentRemoveObjectsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxConcurrentRemoveObjectsTest.java index a5b2cb71a4ef9..6d20d4148f6f2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxConcurrentRemoveObjectsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxConcurrentRemoveObjectsTest.java @@ -121,6 +121,7 @@ private CacheConfiguration getCacheCfg() { * * @throws Exception If failed. */ + @Test public void testTxLeavesObjectsInLocalPartition() throws Exception { IgniteEx igniteEx = startGrid(getConfiguration()); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxConsistencyRestartAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxConsistencyRestartAbstractSelfTest.java index a530cab0834d8..df0925d369f3e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxConsistencyRestartAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxConsistencyRestartAbstractSelfTest.java @@ -105,6 +105,7 @@ public CacheConfiguration cacheConfiguration(String igniteInstanceName) { /** * @throws Exception If failed. */ + @Test public void testTxConsistency() throws Exception { startGridsMultiThreaded(GRID_CNT); @@ -208,4 +209,4 @@ public void testTxConsistency() throws Exception { } } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxGetAfterStopTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxGetAfterStopTest.java index 837763f0ecab8..f3c57cd69a2e8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxGetAfterStopTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxGetAfterStopTest.java @@ -74,6 +74,7 @@ public class IgniteTxGetAfterStopTest extends IgniteCacheAbstractTest { /** * @throws Exception If failed. */ + @Test public void testReplicated() throws Exception { getAfterStop(REPLICATED, null); } @@ -81,6 +82,7 @@ public void testReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPartitioned() throws Exception { getAfterStop(PARTITIONED, new NearCacheConfiguration()); } @@ -88,6 +90,7 @@ public void testPartitioned() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPartitionedNearDisabled() throws Exception { getAfterStop(PARTITIONED, null); } @@ -130,4 +133,4 @@ private void getAfterStop(CacheMode cacheMode, @Nullable NearCacheConfiguration assertEquals(key0, cache0.get(key0)); assertNull(cache1.get(key1)); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxOriginatingNodeFailureAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxOriginatingNodeFailureAbstractSelfTest.java index a7880a2eab3ce..c3ff589a27ab9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxOriginatingNodeFailureAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxOriginatingNodeFailureAbstractSelfTest.java @@ -67,6 +67,7 @@ public abstract class IgniteTxOriginatingNodeFailureAbstractSelfTest extends Gri /** * @throws Exception If failed. */ + @Test public void testManyKeysCommit() throws Exception { Collection keys = new ArrayList<>(200); @@ -79,6 +80,7 @@ public void testManyKeysCommit() throws Exception { /** * @throws Exception If failed. */ + @Test public void testManyKeysRollback() throws Exception { Collection keys = new ArrayList<>(200); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest.java index 3f55e9c8e68bc..504209ce45c89 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest.java @@ -84,6 +84,7 @@ public abstract class IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest /** * @throws Exception If failed. */ + @Test public void testManyKeysCommit() throws Exception { Collection keys = new ArrayList<>(200); @@ -96,6 +97,7 @@ public void testManyKeysCommit() throws Exception { /** * @throws Exception If failed. */ + @Test public void testManyKeysRollback() throws Exception { Collection keys = new ArrayList<>(200); @@ -108,6 +110,7 @@ public void testManyKeysRollback() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPrimaryNodeFailureCommit() throws Exception { checkPrimaryNodeCrash(true); } @@ -115,6 +118,7 @@ public void testPrimaryNodeFailureCommit() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPrimaryNodeFailureRollback() throws Exception { checkPrimaryNodeCrash(false); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxPreloadAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxPreloadAbstractTest.java index b4af2a8ed1d14..f836787eb4dea 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxPreloadAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxPreloadAbstractTest.java @@ -77,6 +77,7 @@ public abstract class IgniteTxPreloadAbstractTest extends GridCacheAbstractSelfT /** * @throws Exception If failed. */ + @Test public void testRemoteTxPreloading() throws Exception { IgniteCache cache = jcache(0); @@ -146,6 +147,7 @@ public void testRemoteTxPreloading() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLocalTxPreloadingOptimistic() throws Exception { testLocalTxPreloading(OPTIMISTIC); } @@ -153,6 +155,7 @@ public void testLocalTxPreloadingOptimistic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLocalTxPreloadingPessimistic() throws Exception { testLocalTxPreloading(PESSIMISTIC); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxRemoveTimeoutObjectsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxRemoveTimeoutObjectsTest.java index bcc72e5b95e70..359faa6ad4efe 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxRemoveTimeoutObjectsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxRemoveTimeoutObjectsTest.java @@ -70,6 +70,7 @@ public class IgniteTxRemoveTimeoutObjectsTest extends GridCacheAbstractSelfTest /** * @throws Exception If failed. */ + @Test public void testTxRemoveTimeoutObjects() throws Exception { IgniteCache cache0 = grid(0).cache(DEFAULT_CACHE_NAME); IgniteCache cache1 = grid(1).cache(DEFAULT_CACHE_NAME); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxTimeoutAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxTimeoutAbstractTest.java index 4cd64e3a41638..446295b1ef226 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxTimeoutAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxTimeoutAbstractTest.java @@ -96,6 +96,7 @@ public class IgniteTxTimeoutAbstractTest extends GridCommonAbstractTest { /** * @throws IgniteCheckedException If test failed. */ + @Test public void testPessimisticReadCommitted() throws Exception { checkTransactionTimeout(PESSIMISTIC, READ_COMMITTED); } @@ -103,6 +104,7 @@ public void testPessimisticReadCommitted() throws Exception { /** * @throws IgniteCheckedException If test failed. */ + @Test public void testPessimisticRepeatableRead() throws Exception { checkTransactionTimeout(PESSIMISTIC, REPEATABLE_READ); } @@ -110,6 +112,7 @@ public void testPessimisticRepeatableRead() throws Exception { /** * @throws IgniteCheckedException If test failed. */ + @Test public void testPessimisticSerializable() throws Exception { checkTransactionTimeout(PESSIMISTIC, SERIALIZABLE); } @@ -117,6 +120,7 @@ public void testPessimisticSerializable() throws Exception { /** * @throws IgniteCheckedException If test failed. */ + @Test public void testOptimisticReadCommitted() throws Exception { checkTransactionTimeout(OPTIMISTIC, READ_COMMITTED); } @@ -124,6 +128,7 @@ public void testOptimisticReadCommitted() throws Exception { /** * @throws IgniteCheckedException If test failed. */ + @Test public void testOptimisticRepeatableRead() throws Exception { checkTransactionTimeout(OPTIMISTIC, REPEATABLE_READ); } @@ -131,6 +136,7 @@ public void testOptimisticRepeatableRead() throws Exception { /** * @throws IgniteCheckedException If test failed. */ + @Test public void testOptimisticSerializable() throws Exception { checkTransactionTimeout(OPTIMISTIC, SERIALIZABLE); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/CacheGetReadFromBackupFailoverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/CacheGetReadFromBackupFailoverTest.java index 71cb4ed4b6cba..c27beaf2c35ed 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/CacheGetReadFromBackupFailoverTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/CacheGetReadFromBackupFailoverTest.java @@ -138,6 +138,7 @@ public int gridCount() { /** * @throws Exception If failed. */ + @Test public void testFailover() throws Exception { Ignite ignite = ignite(0); @@ -254,4 +255,4 @@ public void testFailover() throws Exception { fail("Test failed"); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/CachePartitionPartialCountersMapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/CachePartitionPartialCountersMapSelfTest.java index a4afbcace876b..7aa41b5d651dc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/CachePartitionPartialCountersMapSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/CachePartitionPartialCountersMapSelfTest.java @@ -22,6 +22,7 @@ public class CachePartitionPartialCountersMapSelfTest extends GridCommonAbstractTest { + @Test public void testAddAndRemove() throws Exception { CachePartitionPartialCountersMap map = new CachePartitionPartialCountersMap(10); @@ -54,4 +55,4 @@ public void testAddAndRemove() throws Exception { } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAbstractPartitionedOnlyByteArrayValuesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAbstractPartitionedOnlyByteArrayValuesSelfTest.java index 18459c91011ed..2828ee9f11dbd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAbstractPartitionedOnlyByteArrayValuesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAbstractPartitionedOnlyByteArrayValuesSelfTest.java @@ -83,6 +83,7 @@ public abstract class GridCacheAbstractPartitionedOnlyByteArrayValuesSelfTest ex * * @throws Exception If failed. */ + @Test public void testAtomic() throws Exception { testAtomic0(cachesAtomic); } @@ -107,4 +108,4 @@ private void testAtomic0(IgniteCache[] caches) throws Exception assertNull(cache.get(KEY_1)); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAbstractTransformWriteThroughSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAbstractTransformWriteThroughSelfTest.java index 1c1f3a55f15e7..58f6bc5fb3e99 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAbstractTransformWriteThroughSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAbstractTransformWriteThroughSelfTest.java @@ -159,6 +159,7 @@ public abstract class GridCacheAbstractTransformWriteThroughSelfTest extends Gri /** * @throws Exception If failed. */ + @Test public void testTransformOptimisticNearUpdate() throws Exception { checkTransform(OPTIMISTIC, NEAR_NODE, OP_UPDATE); } @@ -166,6 +167,7 @@ public void testTransformOptimisticNearUpdate() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTransformOptimisticPrimaryUpdate() throws Exception { checkTransform(OPTIMISTIC, PRIMARY_NODE, OP_UPDATE); } @@ -173,6 +175,7 @@ public void testTransformOptimisticPrimaryUpdate() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTransformOptimisticBackupUpdate() throws Exception { checkTransform(OPTIMISTIC, BACKUP_NODE, OP_UPDATE); } @@ -180,6 +183,7 @@ public void testTransformOptimisticBackupUpdate() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTransformOptimisticNearDelete() throws Exception { checkTransform(OPTIMISTIC, NEAR_NODE, OP_DELETE); } @@ -187,6 +191,7 @@ public void testTransformOptimisticNearDelete() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTransformOptimisticPrimaryDelete() throws Exception { checkTransform(OPTIMISTIC, PRIMARY_NODE, OP_DELETE); } @@ -194,6 +199,7 @@ public void testTransformOptimisticPrimaryDelete() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTransformOptimisticBackupDelete() throws Exception { checkTransform(OPTIMISTIC, BACKUP_NODE, OP_DELETE); } @@ -201,6 +207,7 @@ public void testTransformOptimisticBackupDelete() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTransformPessimisticNearUpdate() throws Exception { checkTransform(PESSIMISTIC, NEAR_NODE, OP_UPDATE); } @@ -208,6 +215,7 @@ public void testTransformPessimisticNearUpdate() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTransformPessimisticPrimaryUpdate() throws Exception { checkTransform(PESSIMISTIC, PRIMARY_NODE, OP_UPDATE); } @@ -215,6 +223,7 @@ public void testTransformPessimisticPrimaryUpdate() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTransformPessimisticBackupUpdate() throws Exception { checkTransform(PESSIMISTIC, BACKUP_NODE, OP_UPDATE); } @@ -222,6 +231,7 @@ public void testTransformPessimisticBackupUpdate() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTransformPessimisticNearDelete() throws Exception { checkTransform(PESSIMISTIC, NEAR_NODE, OP_DELETE); } @@ -229,6 +239,7 @@ public void testTransformPessimisticNearDelete() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTransformPessimisticPrimaryDelete() throws Exception { checkTransform(PESSIMISTIC, PRIMARY_NODE, OP_DELETE); } @@ -236,6 +247,7 @@ public void testTransformPessimisticPrimaryDelete() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTransformPessimisticBackupDelete() throws Exception { checkTransform(PESSIMISTIC, BACKUP_NODE, OP_DELETE); } @@ -337,4 +349,4 @@ else if (nodeType == BACKUP_NODE) { return keys; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAtomicFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAtomicFullApiSelfTest.java index b027aead6e6a1..d6c5b3fda6238 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAtomicFullApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAtomicFullApiSelfTest.java @@ -57,6 +57,7 @@ public class GridCacheAtomicFullApiSelfTest extends GridCachePartitionedFullApiS /** * @throws Exception If failed. */ + @Test public void testLock() throws Exception { GridTestUtils.assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -74,7 +75,8 @@ public void testLock() throws Exception { /** * @throws Exception In case of error. */ - @Override public void testGetAll() throws Exception { + @Override @Test + public void testGetAll() throws Exception { jcache().put("key1", 1); jcache().put("key2", 2); @@ -108,4 +110,4 @@ public void testLock() throws Exception { assertEquals(2, (int)map2.get("key2")); assertNull(map2.get("key9999")); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAtomicNearCacheSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAtomicNearCacheSelfTest.java index e7d9cb3210944..92c9beaa2b388 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAtomicNearCacheSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAtomicNearCacheSelfTest.java @@ -100,6 +100,7 @@ public class GridCacheAtomicNearCacheSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testNoBackups() throws Exception { doStartGrids(0); @@ -109,6 +110,7 @@ public void testNoBackups() throws Exception { /** * @throws Exception If failed. */ + @Test public void testWithBackups() throws Exception { doStartGrids(2); @@ -820,4 +822,4 @@ private Processor(Integer newVal) { return null; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheColocatedDebugTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheColocatedDebugTest.java index 92ea733c2fff4..56ce436d8932d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheColocatedDebugTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheColocatedDebugTest.java @@ -106,6 +106,7 @@ public class GridCacheColocatedDebugTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testSimplestPessimistic() throws Exception { checkSinglePut(false, PESSIMISTIC, REPEATABLE_READ); } @@ -113,6 +114,7 @@ public void testSimplestPessimistic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSimpleOptimistic() throws Exception { checkSinglePut(true, OPTIMISTIC, REPEATABLE_READ); } @@ -120,6 +122,7 @@ public void testSimpleOptimistic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReentry() throws Exception { checkReentry(PESSIMISTIC, REPEATABLE_READ); } @@ -127,6 +130,7 @@ public void testReentry() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDistributedInTxSeparatePessimistic() throws Exception { checkDistributedPut(true, true, PESSIMISTIC, REPEATABLE_READ); } @@ -134,6 +138,7 @@ public void testDistributedInTxSeparatePessimistic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDistributedInTxPessimistic() throws Exception { checkDistributedPut(true, false, PESSIMISTIC, REPEATABLE_READ); } @@ -141,6 +146,7 @@ public void testDistributedInTxPessimistic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDistributedSeparatePessimistic() throws Exception { checkDistributedPut(false, true, PESSIMISTIC, REPEATABLE_READ); } @@ -148,6 +154,7 @@ public void testDistributedSeparatePessimistic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDistributedPessimistic() throws Exception { checkDistributedPut(false, false, PESSIMISTIC, REPEATABLE_READ); } @@ -155,6 +162,7 @@ public void testDistributedPessimistic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDistributedNonLocalInTxSeparatePessimistic() throws Exception { checkNonLocalPuts(true, true, PESSIMISTIC, REPEATABLE_READ); } @@ -162,6 +170,7 @@ public void testDistributedNonLocalInTxSeparatePessimistic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDistributedNonLocalInTxPessimistic() throws Exception { checkNonLocalPuts(true, false, PESSIMISTIC, REPEATABLE_READ); } @@ -169,6 +178,7 @@ public void testDistributedNonLocalInTxPessimistic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDistributedNonLocalSeparatePessimistic() throws Exception { checkNonLocalPuts(false, true, PESSIMISTIC, REPEATABLE_READ); } @@ -176,6 +186,7 @@ public void testDistributedNonLocalSeparatePessimistic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDistributedNonLocalPessimistic() throws Exception { checkNonLocalPuts(false, false, PESSIMISTIC, REPEATABLE_READ); } @@ -183,6 +194,7 @@ public void testDistributedNonLocalPessimistic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRollbackSeparatePessimistic() throws Exception { checkRollback(true, PESSIMISTIC, REPEATABLE_READ); } @@ -190,6 +202,7 @@ public void testRollbackSeparatePessimistic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDistributedInTxSeparateOptimistic() throws Exception { checkDistributedPut(true, true, OPTIMISTIC, REPEATABLE_READ); } @@ -197,6 +210,7 @@ public void testDistributedInTxSeparateOptimistic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDistributedInTxOptimistic() throws Exception { checkDistributedPut(true, false, OPTIMISTIC, REPEATABLE_READ); } @@ -204,6 +218,7 @@ public void testDistributedInTxOptimistic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDistributedNonLocalInTxSeparateOptimistic() throws Exception { checkNonLocalPuts(true, true, OPTIMISTIC, REPEATABLE_READ); } @@ -211,6 +226,7 @@ public void testDistributedNonLocalInTxSeparateOptimistic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDistributedNonLocalInTxOptimistic() throws Exception { checkNonLocalPuts(true, false, OPTIMISTIC, REPEATABLE_READ); } @@ -218,6 +234,7 @@ public void testDistributedNonLocalInTxOptimistic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRollbackSeparateOptimistic() throws Exception { checkRollback(true, OPTIMISTIC, REPEATABLE_READ); } @@ -225,6 +242,7 @@ public void testRollbackSeparateOptimistic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRollback() throws Exception { checkRollback(false, PESSIMISTIC, REPEATABLE_READ); } @@ -232,6 +250,7 @@ public void testRollback() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutsMultithreadedColocated() throws Exception { checkPutsMultithreaded(true, false, 100000); } @@ -239,6 +258,7 @@ public void testPutsMultithreadedColocated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutsMultithreadedRemote() throws Exception { checkPutsMultithreaded(false, true, 100000); } @@ -246,6 +266,7 @@ public void testPutsMultithreadedRemote() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutsMultithreadedMixed() throws Exception { checkPutsMultithreaded(true, true, 100000); } @@ -352,6 +373,7 @@ public void checkPutsMultithreaded(boolean loc, boolean remote, final long maxIt /** * @throws Exception If failed. */ + @Test public void testLockLockedLocal() throws Exception { checkLockLocked(true); } @@ -359,6 +381,7 @@ public void testLockLockedLocal() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLockLockedRemote() throws Exception { checkLockLocked(false); } @@ -430,6 +453,7 @@ private void checkLockLocked(boolean loc) throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticGet() throws Exception { storeEnabled = false; @@ -709,6 +733,7 @@ private void checkNonLocalPuts(boolean explicitTx, boolean separate, Transaction /** * @throws Exception If failed. */ + @Test public void testWriteThrough() throws Exception { storeEnabled = true; @@ -894,6 +919,7 @@ private void checkRollback(boolean separate, TransactionConcurrency concurrency, /** * @throws Exception If failed. */ + @Test public void testExplicitLocks() throws Exception { storeEnabled = false; @@ -920,6 +946,7 @@ public void testExplicitLocks() throws Exception { /** * @throws Exception If failed. */ + @Test public void testExplicitLocksDistributed() throws Exception { storeEnabled = false; @@ -986,4 +1013,4 @@ private static Integer forPrimary(Ignite g, int prev) { throw new IllegalArgumentException("Can not find key being primary for node: " + g.cluster().localNode().id()); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheColocatedOptimisticTransactionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheColocatedOptimisticTransactionSelfTest.java index 5ed6b38cc01c0..d344763d418cd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheColocatedOptimisticTransactionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheColocatedOptimisticTransactionSelfTest.java @@ -110,6 +110,7 @@ public class GridCacheColocatedOptimisticTransactionSelfTest extends GridCommonA * * @throws Exception If failed. */ + @Test public void testOptimisticTransaction() throws Exception { for (IgniteCache cache : caches) { Transaction tx = cache.unwrap(Ignite.class).transactions().txStart(OPTIMISTIC, REPEATABLE_READ); @@ -148,4 +149,4 @@ public void testOptimisticTransaction() throws Exception { } } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEntrySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEntrySelfTest.java index 853763e20475b..0a5e6c7f52587 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEntrySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEntrySelfTest.java @@ -144,6 +144,7 @@ private Ignite grid(UUID nodeId) { } /** @throws Exception If failed. */ + @Test public void testClearWithReaders() throws Exception { Integer key = 1; @@ -192,6 +193,7 @@ public void testClearWithReaders() throws Exception { } /** @throws Exception If failed. */ + @Test public void testRemoveWithReaders() throws Exception { Integer key = 1; @@ -240,6 +242,7 @@ public void testRemoveWithReaders() throws Exception { } /** @throws Exception If failed. */ + @Test public void testEvictWithReaders() throws Exception { Integer key = 1; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionNearReadersSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionNearReadersSelfTest.java index ddb82c5d477c0..cc72c78d58b65 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionNearReadersSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionNearReadersSelfTest.java @@ -187,6 +187,7 @@ private IgnitePredicate nodeEvent(final UUID nodeId) { * * @throws Exception If failed. */ + @Test public void testReaders() throws Exception { Integer key = 1; @@ -279,4 +280,4 @@ public void testReaders() throws Exception { assertNull(localPeek(dhtOther, key)); assertNull(localPeek(nearOther, key)); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionsDisabledSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionsDisabledSelfTest.java index d31015d9e419d..f726a66004c57 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionsDisabledSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionsDisabledSelfTest.java @@ -73,6 +73,7 @@ public GridCacheDhtEvictionsDisabledSelfTest() { } /** @throws Exception If failed. */ + @Test public void testOneNode() throws Exception { checkNodes(startGridsMultiThreaded(1)); @@ -81,6 +82,7 @@ public void testOneNode() throws Exception { } /** @throws Exception If failed. */ + @Test public void testTwoNodes() throws Exception { checkNodes(startGridsMultiThreaded(2)); @@ -89,6 +91,7 @@ public void testTwoNodes() throws Exception { } /** @throws Exception If failed. */ + @Test public void testThreeNodes() throws Exception { checkNodes(startGridsMultiThreaded(3)); @@ -124,4 +127,4 @@ private void checkNodes(Ignite g) throws Exception { assertEquals(v1, v2); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtMappingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtMappingSelfTest.java index 5456e4ca17556..def8a42b8e510 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtMappingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtMappingSelfTest.java @@ -74,6 +74,7 @@ public class GridCacheDhtMappingSelfTest extends GridCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testMapping() throws Exception { int nodeCnt = 5; @@ -103,4 +104,4 @@ public void testMapping() throws Exception { // Test key should be on primary and backup node only. assertEquals(1 + BACKUPS, cnt); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtMultiBackupTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtMultiBackupTest.java index e1e5315dda4d3..e2d86415bed82 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtMultiBackupTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtMultiBackupTest.java @@ -41,6 +41,7 @@ public GridCacheDhtMultiBackupTest() { /** * @throws Exception If failed */ + @Test public void testPut() throws Exception { try { Ignite g = G.start("examples/config/example-cache.xml"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadBigDataSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadBigDataSelfTest.java index 86dbd4fb86d89..374c82038519b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadBigDataSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadBigDataSelfTest.java @@ -125,6 +125,7 @@ public GridCacheDhtPreloadBigDataSelfTest() { /** * @throws Exception If failed. */ + @Test public void testLargeObjects() throws Exception { preloadMode = SYNC; @@ -159,6 +160,7 @@ public void testLargeObjects() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLargeObjectsWithLifeCycleBean() throws Exception { preloadMode = SYNC; partitions = 23; @@ -230,4 +232,4 @@ private byte[] value(int size) { @Override protected long getTestTimeout() { return 6 * 60 * 1000; // 6 min. } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadDelayedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadDelayedSelfTest.java index 9941d58af0dae..545e2b01f8807 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadDelayedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadDelayedSelfTest.java @@ -110,6 +110,7 @@ public class GridCacheDhtPreloadDelayedSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testManualPreload() throws Exception { delay = -1; @@ -189,6 +190,7 @@ public void testManualPreload() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDelayedPreload() throws Exception { delay = PRELOAD_DELAY; @@ -260,6 +262,7 @@ public void testDelayedPreload() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAutomaticPreload() throws Exception { delay = 0; preloadMode = CacheRebalanceMode.SYNC; @@ -293,6 +296,7 @@ public void testAutomaticPreload() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAutomaticPreloadWithEmptyCache() throws Exception { preloadMode = SYNC; @@ -343,6 +347,7 @@ public void testAutomaticPreloadWithEmptyCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testManualPreloadSyncMode() throws Exception { preloadMode = CacheRebalanceMode.SYNC; delay = -1; @@ -358,6 +363,7 @@ public void testManualPreloadSyncMode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPreloadManyNodes() throws Exception { delay = 0; preloadMode = ASYNC; @@ -479,4 +485,4 @@ private final void checkMaps(final boolean strict, final GridDhtCacheAdapter c, int cnt) { for (int i = 0; i < cnt; i++) c.put(i, Integer.toString(i)); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadMessageCountTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadMessageCountTest.java index 886a8864ac6bf..1a91ad936eaa5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadMessageCountTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadMessageCountTest.java @@ -87,6 +87,7 @@ public class GridCacheDhtPreloadMessageCountTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testAutomaticPreload() throws Exception { Ignite g0 = startGrid(0); @@ -134,4 +135,4 @@ private void checkCache(IgniteCache c, int keyCnt) { assertEquals(Integer.valueOf(i), c.localPeek(key, CachePeekMode.ONHEAP)); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadMultiThreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadMultiThreadedSelfTest.java index 5f7be7afb1cce..89ba060e5ee52 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadMultiThreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadMultiThreadedSelfTest.java @@ -54,6 +54,7 @@ public GridCacheDhtPreloadMultiThreadedSelfTest() { /** * @throws Exception If failed. */ + @Test public void testNodeLeaveBeforePreloadingComplete() throws Exception { try { final CountDownLatch startLatch = new CountDownLatch(1); @@ -111,6 +112,7 @@ public void testNodeLeaveBeforePreloadingComplete() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConcurrentNodesStart() throws Exception { try { multithreadedAsync( @@ -137,6 +139,7 @@ public void testConcurrentNodesStart() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConcurrentNodesStartStop() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); @@ -184,4 +187,4 @@ public void testConcurrentNodesStartStop() throws Exception { return cfg; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadPerformanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadPerformanceTest.java index 4b08a09b9557a..e21f69f14aa75 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadPerformanceTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadPerformanceTest.java @@ -101,6 +101,7 @@ public class GridCacheDhtPreloadPerformanceTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testConcurrentStartPerformance() throws Exception { // // for (int i = 0; i < 10; i++) { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadPutGetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadPutGetSelfTest.java index a62984a525fb9..0fdf35391c46d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadPutGetSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadPutGetSelfTest.java @@ -93,6 +93,7 @@ public class GridCacheDhtPreloadPutGetSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPutGetAsync0() throws Exception { preloadMode = ASYNC; backups = 0; @@ -103,6 +104,7 @@ public void testPutGetAsync0() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutGetAsync1() throws Exception { preloadMode = ASYNC; backups = 1; @@ -113,6 +115,7 @@ public void testPutGetAsync1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutGetAsync2() throws Exception { preloadMode = ASYNC; backups = 2; @@ -123,6 +126,7 @@ public void testPutGetAsync2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutGetSync0() throws Exception { preloadMode = SYNC; backups = 0; @@ -133,6 +137,7 @@ public void testPutGetSync0() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutGetSync1() throws Exception { preloadMode = SYNC; backups = 1; @@ -143,6 +148,7 @@ public void testPutGetSync1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutGetSync2() throws Exception { preloadMode = SYNC; backups = 2; @@ -153,6 +159,7 @@ public void testPutGetSync2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutGetNone0() throws Exception { preloadMode = NONE; backups = 0; @@ -163,6 +170,7 @@ public void testPutGetNone0() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutGetNone1() throws Exception { if (MvccFeatureChecker.forcedMvcc()) fail("https://issues.apache.org/jira/browse/IGNITE-10261"); @@ -176,6 +184,7 @@ public void testPutGetNone1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutGetNone2() throws Exception { if (MvccFeatureChecker.forcedMvcc()) fail("https://issues.apache.org/jira/browse/IGNITE-10261"); @@ -280,4 +289,4 @@ private void performTest() throws Exception { stopAllGrids(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadSelfTest.java index 76b14249cfba2..59b841aaf4407 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadSelfTest.java @@ -158,6 +158,7 @@ protected boolean onheapCacheEnabled() { /** * @throws Exception If failed. */ + @Test public void testActivePartitionTransferSyncSameCoordinator() throws Exception { preloadMode = SYNC; @@ -167,6 +168,7 @@ public void testActivePartitionTransferSyncSameCoordinator() throws Exception { /** * @throws Exception If failed. */ + @Test public void testActivePartitionTransferAsyncSameCoordinator() throws Exception { checkActivePartitionTransfer(1000, 4, true, false); } @@ -174,6 +176,7 @@ public void testActivePartitionTransferAsyncSameCoordinator() throws Exception { /** * @throws Exception If failed. */ + @Test public void testActivePartitionTransferSyncChangingCoordinator() throws Exception { preloadMode = SYNC; @@ -183,6 +186,7 @@ public void testActivePartitionTransferSyncChangingCoordinator() throws Exceptio /** * @throws Exception If failed. */ + @Test public void testActivePartitionTransferAsyncChangingCoordinator() throws Exception { checkActivePartitionTransfer(1000, 4, false, false); } @@ -190,6 +194,7 @@ public void testActivePartitionTransferAsyncChangingCoordinator() throws Excepti /** * @throws Exception If failed. */ + @Test public void testActivePartitionTransferSyncRandomCoordinator() throws Exception { preloadMode = SYNC; @@ -199,6 +204,7 @@ public void testActivePartitionTransferSyncRandomCoordinator() throws Exception /** * @throws Exception If failed. */ + @Test public void testActivePartitionTransferAsyncRandomCoordinator() throws Exception { checkActivePartitionTransfer(1000, 4, false, true); } @@ -349,6 +355,7 @@ private void checkActiveState(Iterable grids) { /** * @throws Exception If failed. */ + @Test public void testMultiplePartitionBatchesSyncPreload() throws Exception { preloadMode = SYNC; preloadBatchSize = 100; @@ -360,6 +367,7 @@ public void testMultiplePartitionBatchesSyncPreload() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultiplePartitionBatchesAsyncPreload() throws Exception { preloadBatchSize = 100; partitions = 2; @@ -370,6 +378,7 @@ public void testMultiplePartitionBatchesAsyncPreload() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultipleNodesSyncPreloadSameCoordinator() throws Exception { preloadMode = SYNC; @@ -379,6 +388,7 @@ public void testMultipleNodesSyncPreloadSameCoordinator() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultipleNodesAsyncPreloadSameCoordinator() throws Exception { checkNodes(1000, 4, true, false); } @@ -386,6 +396,7 @@ public void testMultipleNodesAsyncPreloadSameCoordinator() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultipleNodesSyncPreloadChangingCoordinator() throws Exception { preloadMode = SYNC; @@ -395,6 +406,7 @@ public void testMultipleNodesSyncPreloadChangingCoordinator() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultipleNodesAsyncPreloadChangingCoordinator() throws Exception { checkNodes(1000, 4, false, false); } @@ -402,6 +414,7 @@ public void testMultipleNodesAsyncPreloadChangingCoordinator() throws Exception /** * @throws Exception If failed. */ + @Test public void testMultipleNodesSyncPreloadRandomCoordinator() throws Exception { preloadMode = SYNC; @@ -411,6 +424,7 @@ public void testMultipleNodesSyncPreloadRandomCoordinator() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultipleNodesAsyncPreloadRandomCoordinator() throws Exception { checkNodes(1000, 4, false, true); } @@ -624,4 +638,4 @@ private String top2string(Iterable grids) { return "Grid partition maps [" + map.toString() + ']'; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadStartStopSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadStartStopSelfTest.java index e77e5c8d1f6f7..a1a2a29f1058f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadStartStopSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadStartStopSelfTest.java @@ -164,6 +164,7 @@ private void stopGrids(Iterable grids) { } /** @throws Exception If failed. */ + @Test public void testDeadlock() throws Exception { info("Testing deadlock..."); @@ -263,4 +264,4 @@ private void checkKeys(IgniteCache c, int cnt) { } } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadUnloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadUnloadSelfTest.java index bc5e3d472138d..ce65ab4ad83cd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadUnloadSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadUnloadSelfTest.java @@ -121,6 +121,7 @@ public GridCacheDhtPreloadUnloadSelfTest() { } /** @throws Exception If failed. */ + @Test public void testUnloadZeroBackupsTwoNodes() throws Exception { preloadMode = SYNC; backups = 0; @@ -148,6 +149,7 @@ public void testUnloadZeroBackupsTwoNodes() throws Exception { } /** @throws Exception If failed. */ + @Test public void testUnloadOneBackupTwoNodes() throws Exception { preloadMode = SYNC; backups = 1; @@ -226,6 +228,7 @@ private void waitForUnload(long gridCnt, long cnt, long wait) throws Interrupted } /** @throws Exception If failed. */ + @Test public void testUnloadOneBackupThreeNodes() throws Exception { preloadMode = SYNC; backups = 1; @@ -258,6 +261,7 @@ public void testUnloadOneBackupThreeNodes() throws Exception { } /** @throws Exception If failed. */ + @Test public void testUnloadOneBackThreeNodesWithLifeCycleBean() throws Exception { preloadMode = SYNC; backups = 1; @@ -324,4 +328,4 @@ private String value(int size) { return b.toString(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheGlobalLoadTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheGlobalLoadTest.java index 6024030ab6f15..5b95ed6946c5d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheGlobalLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheGlobalLoadTest.java @@ -72,6 +72,7 @@ public class GridCacheGlobalLoadTest extends IgniteCacheAbstractTest { /** * @throws Exception If failed. */ + @Test public void testLoadCache() throws Exception { loadCache(false, false); } @@ -79,6 +80,7 @@ public void testLoadCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLoadCacheAsyncOld() throws Exception { loadCache(true, true); } @@ -86,6 +88,7 @@ public void testLoadCacheAsyncOld() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLoadCacheAsync() throws Exception { loadCache(true, false); } @@ -242,4 +245,4 @@ private static class TestStore extends CacheStoreAdapter { fail(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledLockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledLockSelfTest.java index 102185c24da03..56bb76604d8a7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledLockSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledLockSelfTest.java @@ -41,7 +41,8 @@ public class GridCachePartitionedNearDisabledLockSelfTest extends GridCacheParti } /** {@inheritDoc} */ - @Override public void testLockReentrancy() throws Throwable { + @Override @Test + public void testLockReentrancy() throws Throwable { fail("https://issues.apache.org/jira/browse/IGNITE-835"); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledMetricsSelfTest.java index 6c2da72db43b0..60f5485f3ab66 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledMetricsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledMetricsSelfTest.java @@ -77,6 +77,7 @@ public class GridCachePartitionedNearDisabledMetricsSelfTest extends GridCacheAb /** * @throws Exception If failed. */ + @Test public void testGettingRemovedKey() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-819"); @@ -120,4 +121,4 @@ public void testGettingRemovedKey() throws Exception { assertEquals(0, hits); assertEquals(1, misses); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedTopologyChangeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedTopologyChangeSelfTest.java index 2051616e85f3b..34a5e95562da5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedTopologyChangeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedTopologyChangeSelfTest.java @@ -103,6 +103,7 @@ public class GridCachePartitionedTopologyChangeSelfTest extends GridCommonAbstra /** * @throws Exception If failed. */ + @Test public void testNearTxNodeJoined() throws Exception { checkTxNodeJoined(PARTITION_READER); } @@ -110,6 +111,7 @@ public void testNearTxNodeJoined() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPrimaryTxNodeJoined() throws Exception { checkTxNodeJoined(PARTITION_PRIMARY); } @@ -117,6 +119,7 @@ public void testPrimaryTxNodeJoined() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBackupTxNodeJoined() throws Exception { checkTxNodeJoined(PARTITION_BACKUP); } @@ -124,6 +127,7 @@ public void testBackupTxNodeJoined() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNearTxNodeLeft() throws Exception { checkTxNodeLeft(PARTITION_READER); } @@ -131,6 +135,7 @@ public void testNearTxNodeLeft() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPrimaryTxNodeLeft() throws Exception { // This test does not make sense because if node is primary for some partition, // it will reside on node until node leaves grid. @@ -139,6 +144,7 @@ public void testPrimaryTxNodeLeft() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBackupTxNodeLeft() throws Exception { checkTxNodeLeft(PARTITION_BACKUP); } @@ -146,6 +152,7 @@ public void testBackupTxNodeLeft() throws Exception { /** * @throws Exception If failed. */ + @Test public void testExplicitLocks() throws Exception { try { startGridsMultiThreaded(2); @@ -617,4 +624,4 @@ private List partitions(Ignite node, int partType) { return res; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedTxOriginatingNodeFailureSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedTxOriginatingNodeFailureSelfTest.java index 81d479665067d..799f90b4003be 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedTxOriginatingNodeFailureSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedTxOriginatingNodeFailureSelfTest.java @@ -58,6 +58,7 @@ public class GridCachePartitionedTxOriginatingNodeFailureSelfTest extends /** * @throws Exception If failed. */ + @Test public void testTxFromPrimary() throws Exception { ClusterNode txNode = grid(originatingNode()).localNode(); @@ -79,6 +80,7 @@ public void testTxFromPrimary() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxFromBackup() throws Exception { ClusterNode txNode = grid(originatingNode()).localNode(); @@ -100,6 +102,7 @@ public void testTxFromBackup() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxFromNotColocated() throws Exception { ClusterNode txNode = grid(originatingNode()).localNode(); @@ -122,6 +125,7 @@ public void testTxFromNotColocated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxAllNodes() throws Exception { List allNodes = new ArrayList<>(GRID_CNT); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedUnloadEventsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedUnloadEventsSelfTest.java index d00dd7a71dcc3..38a913933db1a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedUnloadEventsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedUnloadEventsSelfTest.java @@ -89,6 +89,7 @@ protected CacheConfiguration cacheConfiguration() { /** * @throws Exception if failed. */ + @Test public void testUnloadEvents() throws Exception { final Ignite g1 = startGrid("g1"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionsStateValidationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionsStateValidationTest.java index fcc1293a959f7..eb4c17a1af514 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionsStateValidationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionsStateValidationTest.java @@ -102,6 +102,7 @@ public class GridCachePartitionsStateValidationTest extends GridCommonAbstractTe * * @throws Exception If failed. */ + @Test public void testValidationIfPartitionCountersAreInconsistent() throws Exception { IgniteEx ignite = (IgniteEx) startGrids(2); ignite.cluster().active(true); @@ -134,6 +135,7 @@ public void testValidationIfPartitionCountersAreInconsistent() throws Exception * * @throws Exception If failed. */ + @Test public void testPartitionCountersConsistencyOnExchange() throws Exception { IgniteEx ignite = (IgniteEx) startGrids(4); ignite.cluster().active(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionsStateValidatorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionsStateValidatorSelfTest.java index 9cf296a8eeae6..5a7ac0abb35be 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionsStateValidatorSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionsStateValidatorSelfTest.java @@ -100,6 +100,7 @@ private GridDhtPartitionsSingleMessage from(@Nullable Map() { @Override public void apply(Ignite ignite) { @@ -151,6 +153,7 @@ public void testClientAtomicLongCreateCloseFailover() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientQueueCreateCloseFailover() throws Exception { testFailoverWithClient(new IgniteInClosure() { @Override public void apply(Ignite ignite) { @@ -172,6 +175,7 @@ public void testClientQueueCreateCloseFailover() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientSetCreateCloseFailover() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-9015"); @@ -181,6 +185,7 @@ public void testClientSetCreateCloseFailover() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientCollocatedSetCreateCloseFailover() throws Exception { checkClientSetCreateCloseFailover(true); } @@ -284,6 +289,7 @@ private IgniteInternalFuture restartThread(final AtomicBoolean finished) { /** * @throws Exception If failed. */ + @Test public void testIncrementConsistency() throws Exception { startGrids(GRID_CNT); @@ -323,6 +329,7 @@ public void testIncrementConsistency() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueueClose() throws Exception { startGrids(GRID_CNT); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheClearDuringRebalanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheClearDuringRebalanceTest.java index 5194020b1a08b..4c2d97a2aa747 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheClearDuringRebalanceTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheClearDuringRebalanceTest.java @@ -77,6 +77,7 @@ public class IgniteCacheClearDuringRebalanceTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testClearAll() throws Exception { final IgniteEx node = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheCommitDelayTxRecoveryTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheCommitDelayTxRecoveryTest.java index 7b8854d40d2ac..f1e9de74d139d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheCommitDelayTxRecoveryTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheCommitDelayTxRecoveryTest.java @@ -97,6 +97,7 @@ public class IgniteCacheCommitDelayTxRecoveryTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testRecovery1() throws Exception { checkRecovery(1, false); } @@ -104,6 +105,7 @@ public void testRecovery1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRecovery2() throws Exception { checkRecovery(2, false); } @@ -111,6 +113,7 @@ public void testRecovery2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRecoveryStoreEnabled1() throws Exception { checkRecovery(1, true); } @@ -118,6 +121,7 @@ public void testRecoveryStoreEnabled1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRecoveryStoreEnabled2() throws Exception { checkRecovery(2, true); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheConcurrentPutGetRemove.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheConcurrentPutGetRemove.java index a83e9998ca699..ace30645d7f9d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheConcurrentPutGetRemove.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheConcurrentPutGetRemove.java @@ -67,6 +67,7 @@ public class IgniteCacheConcurrentPutGetRemove extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPutGetRemoveAtomic() throws Exception { putGetRemove(cacheConfiguration(ATOMIC, 1)); } @@ -74,6 +75,7 @@ public void testPutGetRemoveAtomic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutGetRemoveTx() throws Exception { putGetRemove(cacheConfiguration(TRANSACTIONAL, 1)); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheCrossCacheTxFailoverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheCrossCacheTxFailoverTest.java index 40f9dc4f3ac90..4f7d422f2c9d0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheCrossCacheTxFailoverTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheCrossCacheTxFailoverTest.java @@ -135,6 +135,7 @@ private CacheConfiguration cacheConfiguration(@NotNull String name, /** * @throws Exception If failed. */ + @Test public void testCrossCachePessimisticTxFailover() throws Exception { crossCacheTxFailover(PARTITIONED, true, PESSIMISTIC, REPEATABLE_READ); } @@ -142,6 +143,7 @@ public void testCrossCachePessimisticTxFailover() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCrossCachePessimisticTxFailoverDifferentAffinity() throws Exception { crossCacheTxFailover(PARTITIONED, false, PESSIMISTIC, REPEATABLE_READ); } @@ -149,6 +151,7 @@ public void testCrossCachePessimisticTxFailoverDifferentAffinity() throws Except /** * @throws Exception If failed. */ + @Test public void testCrossCacheOptimisticTxFailover() throws Exception { crossCacheTxFailover(PARTITIONED, true, OPTIMISTIC, REPEATABLE_READ); } @@ -156,6 +159,7 @@ public void testCrossCacheOptimisticTxFailover() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCrossCacheOptimisticSerializableTxFailover() throws Exception { crossCacheTxFailover(PARTITIONED, true, OPTIMISTIC, SERIALIZABLE); } @@ -163,6 +167,7 @@ public void testCrossCacheOptimisticSerializableTxFailover() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCrossCacheOptimisticTxFailoverDifferentAffinity() throws Exception { crossCacheTxFailover(PARTITIONED, false, OPTIMISTIC, REPEATABLE_READ); } @@ -170,6 +175,7 @@ public void testCrossCacheOptimisticTxFailoverDifferentAffinity() throws Excepti /** * @throws Exception If failed. */ + @Test public void testCrossCachePessimisticTxFailoverReplicated() throws Exception { crossCacheTxFailover(REPLICATED, true, PESSIMISTIC, REPEATABLE_READ); } @@ -177,6 +183,7 @@ public void testCrossCachePessimisticTxFailoverReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCrossCacheOptimisticTxFailoverReplicated() throws Exception { crossCacheTxFailover(REPLICATED, true, OPTIMISTIC, REPEATABLE_READ); } @@ -184,6 +191,7 @@ public void testCrossCacheOptimisticTxFailoverReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCrossCachePessimisticTxFailoverDifferentAffinityReplicated() throws Exception { crossCacheTxFailover(PARTITIONED, false, PESSIMISTIC, REPEATABLE_READ); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheLockFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheLockFailoverSelfTest.java index f813ef89000fe..ee26d4a48b2e2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheLockFailoverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheLockFailoverSelfTest.java @@ -85,6 +85,7 @@ public class IgniteCacheLockFailoverSelfTest extends GridCacheAbstractSelfTest { /** * @throws Exception If failed. */ + @Test public void testLockFailover() throws Exception { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -149,6 +150,7 @@ public Object call() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUnlockPrimaryLeft() throws Exception { GridCacheAdapter cache = ((IgniteKernal)grid(0)).internalCache(DEFAULT_CACHE_NAME); @@ -166,4 +168,4 @@ public void testUnlockPrimaryLeft() throws Exception { startGrid(1); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheMultiTxLockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheMultiTxLockSelfTest.java index bc3b13d8ab144..988916289ff1b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheMultiTxLockSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheMultiTxLockSelfTest.java @@ -94,6 +94,7 @@ public class IgniteCacheMultiTxLockSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testExplicitLockOneKey() throws Exception { checkExplicitLock(1, false); } @@ -101,6 +102,7 @@ public void testExplicitLockOneKey() throws Exception { /** * @throws Exception If failed. */ + @Test public void testExplicitLockManyKeys() throws Exception { checkExplicitLock(4, false); } @@ -108,6 +110,7 @@ public void testExplicitLockManyKeys() throws Exception { /** * @throws Exception If failed. */ + @Test public void testExplicitLockManyKeysWithClient() throws Exception { checkExplicitLock(4, true); } @@ -252,4 +255,4 @@ private TreeMap generateValues(int cnt) { return res; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePartitionedBackupNodeFailureRecoveryTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePartitionedBackupNodeFailureRecoveryTest.java index 6cecce148967f..cb226b7da0c95 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePartitionedBackupNodeFailureRecoveryTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePartitionedBackupNodeFailureRecoveryTest.java @@ -80,6 +80,7 @@ public class IgniteCachePartitionedBackupNodeFailureRecoveryTest extends IgniteC * * @throws Exception If failed. */ + @Test public void testBackUpFail() throws Exception { final IgniteEx node1 = grid(0); final IgniteEx node2 = grid(1); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePrimaryNodeFailureRecoveryAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePrimaryNodeFailureRecoveryAbstractTest.java index b0d083d5b66d0..c11d189a3e430 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePrimaryNodeFailureRecoveryAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePrimaryNodeFailureRecoveryAbstractTest.java @@ -120,6 +120,7 @@ public abstract class IgniteCachePrimaryNodeFailureRecoveryAbstractTest extends /** * @throws Exception If failed. */ + @Test public void testOptimisticPrimaryNodeFailureRecovery1() throws Exception { if (atomicityMode() == TRANSACTIONAL_SNAPSHOT) return; @@ -129,6 +130,7 @@ public void testOptimisticPrimaryNodeFailureRecovery1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOptimisticPrimaryNodeFailureRecovery2() throws Exception { if (atomicityMode() == TRANSACTIONAL_SNAPSHOT) return; @@ -138,6 +140,7 @@ public void testOptimisticPrimaryNodeFailureRecovery2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOptimisticPrimaryNodeFailureRollback1() throws Exception { if (atomicityMode() == TRANSACTIONAL_SNAPSHOT) return; @@ -147,6 +150,7 @@ public void testOptimisticPrimaryNodeFailureRollback1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOptimisticPrimaryNodeFailureRollback2() throws Exception { if (atomicityMode() == TRANSACTIONAL_SNAPSHOT) return; @@ -156,6 +160,7 @@ public void testOptimisticPrimaryNodeFailureRollback2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticPrimaryNodeFailureRecovery1() throws Exception { primaryNodeFailure(false, false, false); } @@ -163,6 +168,7 @@ public void testPessimisticPrimaryNodeFailureRecovery1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticPrimaryNodeFailureRecovery2() throws Exception { primaryNodeFailure(true, false, false); } @@ -170,6 +176,7 @@ public void testPessimisticPrimaryNodeFailureRecovery2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticPrimaryNodeFailureRollback1() throws Exception { primaryNodeFailure(false, true, false); } @@ -177,6 +184,7 @@ public void testPessimisticPrimaryNodeFailureRollback1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticPrimaryNodeFailureRollback2() throws Exception { primaryNodeFailure(true, true, false); } @@ -281,6 +289,7 @@ private void primaryNodeFailure(boolean locBackupKey, final boolean rollback, bo /** * @throws Exception If failed. */ + @Test public void testOptimisticPrimaryAndOriginatingNodeFailureRecovery1() throws Exception { if (atomicityMode() == TRANSACTIONAL_SNAPSHOT) return; @@ -290,6 +299,7 @@ public void testOptimisticPrimaryAndOriginatingNodeFailureRecovery1() throws Exc /** * @throws Exception If failed. */ + @Test public void testOptimisticPrimaryAndOriginatingNodeFailureRecovery2() throws Exception { if (atomicityMode() == TRANSACTIONAL_SNAPSHOT) return; @@ -299,6 +309,7 @@ public void testOptimisticPrimaryAndOriginatingNodeFailureRecovery2() throws Exc /** * @throws Exception If failed. */ + @Test public void testOptimisticPrimaryAndOriginatingNodeFailureRollback1() throws Exception { if (atomicityMode() == TRANSACTIONAL_SNAPSHOT) return; @@ -308,6 +319,7 @@ public void testOptimisticPrimaryAndOriginatingNodeFailureRollback1() throws Exc /** * @throws Exception If failed. */ + @Test public void testOptimisticPrimaryAndOriginatingNodeFailureRollback2() throws Exception { if (atomicityMode() == TRANSACTIONAL_SNAPSHOT) return; @@ -317,6 +329,7 @@ public void testOptimisticPrimaryAndOriginatingNodeFailureRollback2() throws Exc /** * @throws Exception If failed. */ + @Test public void testPessimisticPrimaryAndOriginatingNodeFailureRecovery1() throws Exception { primaryAndOriginatingNodeFailure(false, false, false); } @@ -324,6 +337,7 @@ public void testPessimisticPrimaryAndOriginatingNodeFailureRecovery1() throws Ex /** * @throws Exception If failed. */ + @Test public void testPessimisticPrimaryAndOriginatingNodeFailureRecovery2() throws Exception { primaryAndOriginatingNodeFailure(true, false, false); } @@ -331,6 +345,7 @@ public void testPessimisticPrimaryAndOriginatingNodeFailureRecovery2() throws Ex /** * @throws Exception If failed. */ + @Test public void testPessimisticPrimaryAndOriginatingNodeFailureRollback1() throws Exception { primaryAndOriginatingNodeFailure(false, true, false); } @@ -338,6 +353,7 @@ public void testPessimisticPrimaryAndOriginatingNodeFailureRollback1() throws Ex /** * @throws Exception If failed. */ + @Test public void testPessimisticPrimaryAndOriginatingNodeFailureRollback2() throws Exception { primaryAndOriginatingNodeFailure(true, true, false); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAbstractSelfTest.java index fbb7c3ae65ffc..8e8af6cd0ba8c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAbstractSelfTest.java @@ -169,6 +169,7 @@ protected CacheConfiguration cacheConfiguration(boolean evict, boolean store) th /** * @throws Exception If failed. */ + @Test public void testPut() throws Exception { checkRetry(Test.PUT, false, false); } @@ -176,6 +177,7 @@ public void testPut() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetAndPut() throws Exception { checkRetry(Test.GET_AND_PUT, false, false); } @@ -183,6 +185,7 @@ public void testGetAndPut() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutStoreEnabled() throws Exception { checkRetry(Test.PUT, false, true); } @@ -190,6 +193,7 @@ public void testPutStoreEnabled() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAll() throws Exception { checkRetry(Test.PUT_ALL, false, false); } @@ -197,6 +201,7 @@ public void testPutAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAsync() throws Exception { checkRetry(Test.PUT_ASYNC, false, false); } @@ -204,6 +209,7 @@ public void testPutAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAsyncStoreEnabled() throws Exception { checkRetry(Test.PUT_ASYNC, false, true); } @@ -211,6 +217,7 @@ public void testPutAsyncStoreEnabled() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvoke() throws Exception { checkRetry(Test.INVOKE, false, false); } @@ -218,6 +225,7 @@ public void testInvoke() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeAll() throws Exception { checkRetry(Test.INVOKE_ALL, false, false); } @@ -225,6 +233,7 @@ public void testInvokeAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeAllEvict() throws Exception { checkRetry(Test.INVOKE_ALL, true, false); } @@ -468,6 +477,7 @@ private void checkNoAtomicFutures() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFailsWithNoRetries() throws Exception { checkFailsWithNoRetries(false); } @@ -475,6 +485,7 @@ public void testFailsWithNoRetries() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFailsWithNoRetriesAsync() throws Exception { checkFailsWithNoRetries(true); } @@ -628,4 +639,4 @@ private static class TestCacheStore extends CacheStoreAdapter { STORE_MAP.remove(key); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAtomicSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAtomicSelfTest.java index d7e9981e67e19..366fe36a057bb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAtomicSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAtomicSelfTest.java @@ -46,6 +46,7 @@ public class IgniteCachePutRetryAtomicSelfTest extends IgniteCachePutRetryAbstra /** * @throws Exception If failed. */ + @Test public void testPutInsideTransaction() throws Exception { ignite(0).createCache(cacheConfiguration(false, false)); @@ -104,4 +105,4 @@ public void testPutInsideTransaction() throws Exception { } } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryTransactionalSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryTransactionalSelfTest.java index 161025fdb1e8d..737109c823c7a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryTransactionalSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryTransactionalSelfTest.java @@ -54,6 +54,7 @@ public class IgniteCachePutRetryTransactionalSelfTest extends IgniteCachePutRetr /** * @throws Exception If failed. */ + @Test public void testAtomicLongRetries() throws Exception { final AtomicBoolean finished = new AtomicBoolean(); @@ -91,6 +92,7 @@ public void testAtomicLongRetries() throws Exception { /** * @throws Exception If failed. */ + @Test public void testExplicitTransactionRetriesSingleValue() throws Exception { checkRetry(Test.TX_PUT, false, false); } @@ -98,6 +100,7 @@ public void testExplicitTransactionRetriesSingleValue() throws Exception { /** * @throws Exception If failed. */ + @Test public void testExplicitTransactionRetriesSingleValueStoreEnabled() throws Exception { checkRetry(Test.TX_PUT, false, true); } @@ -105,6 +108,7 @@ public void testExplicitTransactionRetriesSingleValueStoreEnabled() throws Excep /** * @throws Exception If failed. */ + @Test public void testExplicitTransactionRetries() throws Exception { explicitTransactionRetries(false, false); } @@ -112,6 +116,7 @@ public void testExplicitTransactionRetries() throws Exception { /** * @throws Exception If failed. */ + @Test public void testExplicitTransactionRetriesStoreEnabled() throws Exception { explicitTransactionRetries(false, true); } @@ -119,6 +124,7 @@ public void testExplicitTransactionRetriesStoreEnabled() throws Exception { /** * @throws Exception If failed. */ + @Test public void testExplicitTransactionRetriesEvictionEnabled() throws Exception { explicitTransactionRetries(true, false); } @@ -202,6 +208,7 @@ public void explicitTransactionRetries(boolean evict, boolean store) throws Exce /** * @throws Exception If failed. */ + @Test public void testOriginatingNodeFailureForcesOnePhaseCommitDataCleanup() throws Exception { ignite(0).createCache(cacheConfiguration(false, false)); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheStartWithLoadTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheStartWithLoadTest.java index 7d76c286db81e..cda238bf14222 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheStartWithLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheStartWithLoadTest.java @@ -76,6 +76,7 @@ public class IgniteCacheStartWithLoadTest extends GridCommonAbstractTest { /** * @throws Exception if failed. */ + @Test public void testNoRebalanceDuringCacheStart() throws Exception { IgniteEx crd = (IgniteEx)startGrids(4); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheTxRecoveryRollbackTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheTxRecoveryRollbackTest.java index 11c4c67f415c8..eed53276587cb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheTxRecoveryRollbackTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheTxRecoveryRollbackTest.java @@ -115,6 +115,7 @@ public class IgniteCacheTxRecoveryRollbackTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testNearTx1Implicit() throws Exception { nearTx1(null); } @@ -122,6 +123,7 @@ public void testNearTx1Implicit() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNearTx1Optimistic() throws Exception { nearTx1(OPTIMISTIC); } @@ -129,6 +131,7 @@ public void testNearTx1Optimistic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNearTx1Pessimistic() throws Exception { nearTx1(PESSIMISTIC); } @@ -213,6 +216,7 @@ private void nearTx1(final TransactionConcurrency concurrency) throws Exception /** * @throws Exception If failed. */ + @Test public void testNearTx2Implicit() throws Exception { nearTx2(null); } @@ -220,6 +224,7 @@ public void testNearTx2Implicit() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNearTx2Optimistic() throws Exception { nearTx2(OPTIMISTIC); } @@ -227,6 +232,7 @@ public void testNearTx2Optimistic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNearTx2Pessimistic() throws Exception { nearTx2(PESSIMISTIC); } @@ -319,6 +325,7 @@ private void nearTx2(final TransactionConcurrency concurrency) throws Exception /** * @throws Exception If failed. */ + @Test public void testTxWithStoreImplicit() throws Exception { txWithStore(null, true); } @@ -326,6 +333,7 @@ public void testTxWithStoreImplicit() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxWithStoreOptimistic() throws Exception { txWithStore(OPTIMISTIC, true); } @@ -333,6 +341,7 @@ public void testTxWithStoreOptimistic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxWithStorePessimistic() throws Exception { txWithStore(PESSIMISTIC, true); } @@ -340,6 +349,7 @@ public void testTxWithStorePessimistic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxWithStoreNoWriteThroughImplicit() throws Exception { txWithStore(null, false); } @@ -347,6 +357,7 @@ public void testTxWithStoreNoWriteThroughImplicit() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxWithStoreNoWriteThroughOptimistic() throws Exception { txWithStore(OPTIMISTIC, false); } @@ -354,6 +365,7 @@ public void testTxWithStoreNoWriteThroughOptimistic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxWithStoreNoWriteThroughPessimistic() throws Exception { txWithStore(PESSIMISTIC, false); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCrossCacheTxSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCrossCacheTxSelfTest.java index 91c66850a6f23..8b0a144976c2a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCrossCacheTxSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCrossCacheTxSelfTest.java @@ -107,6 +107,7 @@ protected boolean nearEnabled() { /** * @throws Exception If failed. */ + @Test public void testPessimisticReadCommitted() throws Exception { checkTxsSingleOp(PESSIMISTIC, READ_COMMITTED); } @@ -114,6 +115,7 @@ public void testPessimisticReadCommitted() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticRepeatableRead() throws Exception { checkTxsSingleOp(PESSIMISTIC, REPEATABLE_READ); } @@ -121,6 +123,7 @@ public void testPessimisticRepeatableRead() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOptimisticReadCommitted() throws Exception { checkTxsSingleOp(OPTIMISTIC, READ_COMMITTED); } @@ -128,6 +131,7 @@ public void testOptimisticReadCommitted() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOptimisticRepeatableRead() throws Exception { checkTxsSingleOp(OPTIMISTIC, REPEATABLE_READ); } @@ -135,6 +139,7 @@ public void testOptimisticRepeatableRead() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOptimisticSerializable() throws Exception { checkTxsSingleOp(OPTIMISTIC, SERIALIZABLE); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/NotMappedPartitionInTxTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/NotMappedPartitionInTxTest.java index c3fa4f047eb08..05c87c9329f63 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/NotMappedPartitionInTxTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/NotMappedPartitionInTxTest.java @@ -88,6 +88,7 @@ public class NotMappedPartitionInTxTest extends GridCommonAbstractTest { /** * */ + @Test public void testOneServerTx() throws Exception { try { isClient = false; @@ -110,6 +111,7 @@ public void testOneServerTx() throws Exception { /** * */ + @Test public void testOneServerMvcc() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10377"); @@ -132,6 +134,7 @@ public void testOneServerMvcc() throws Exception { /** * */ + @Test public void testFourServersTx() throws Exception { try { isClient = false; @@ -154,6 +157,7 @@ public void testFourServersTx() throws Exception { /** * */ + @Test public void testFourServersMvcc() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10377"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/TxRecoveryStoreEnabledTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/TxRecoveryStoreEnabledTest.java index 30ac83d5f50b9..9e2ef8d248e9f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/TxRecoveryStoreEnabledTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/TxRecoveryStoreEnabledTest.java @@ -102,6 +102,7 @@ public class TxRecoveryStoreEnabledTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testOptimistic() throws Exception { checkTxRecovery(OPTIMISTIC); } @@ -109,6 +110,7 @@ public void testOptimistic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimistic() throws Exception { checkTxRecovery(PESSIMISTIC); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/AtomicPutAllChangingTopologyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/AtomicPutAllChangingTopologyTest.java index 1eb8347d078ec..8261016a0ae8c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/AtomicPutAllChangingTopologyTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/AtomicPutAllChangingTopologyTest.java @@ -86,6 +86,7 @@ private CacheConfiguration cacheConfig() { /** * @throws Exception If failed. */ + @Test public void testPutAllOnChangingTopology() throws Exception { List futs = new LinkedList<>(); @@ -209,4 +210,4 @@ private void checkCacheState(Ignite node, IgniteCache cache) t ", actual2=" + locSize2 + "]", locSize, CACHE_SIZE); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java index ba17da04e378d..40939319116ea 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java @@ -131,6 +131,7 @@ protected boolean testClientNode() { /** * @throws Exception If failed. */ + @Test public void testPrimaryFullSync() throws Exception { checkRestarts(FULL_SYNC); } @@ -138,6 +139,7 @@ public void testPrimaryFullSync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPrimaryPrimarySync() throws Exception { checkRestarts(PRIMARY_SYNC); } @@ -145,6 +147,7 @@ public void testPrimaryPrimarySync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPrimaryFullAsync() throws Exception { checkRestarts(FULL_ASYNC); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicPreloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicPreloadSelfTest.java index a14c3efb3d3e1..d47dfe7570e53 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicPreloadSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicPreloadSelfTest.java @@ -68,6 +68,7 @@ public class GridCacheAtomicPreloadSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPessimisticSimpleTxsNear() throws Exception { checkSimpleTxs(true, PESSIMISTIC); } @@ -75,6 +76,7 @@ public void testPessimisticSimpleTxsNear() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticSimpleTxsColocated() throws Exception { checkSimpleTxs(false, PESSIMISTIC); } @@ -82,6 +84,7 @@ public void testPessimisticSimpleTxsColocated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOptimisticSimpleTxsColocated() throws Exception { checkSimpleTxs(false, OPTIMISTIC); } @@ -89,6 +92,7 @@ public void testOptimisticSimpleTxsColocated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOptimisticSimpleTxsNear() throws Exception { checkSimpleTxs(false, OPTIMISTIC); } @@ -218,4 +222,4 @@ private List generateKeys(ClusterNode node, IgniteCache return keys; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/IgniteCacheAtomicProtocolTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/IgniteCacheAtomicProtocolTest.java index 66c04eab4ac15..ea59e7c6b7fa0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/IgniteCacheAtomicProtocolTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/IgniteCacheAtomicProtocolTest.java @@ -122,6 +122,7 @@ private void blockRebalance() { /** * @throws Exception If failed. */ + @Test public void testPutAllPrimaryFailure1() throws Exception { putAllPrimaryFailure(true, false); } @@ -129,6 +130,7 @@ public void testPutAllPrimaryFailure1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAllPrimaryFailure1_UnstableTopology() throws Exception { blockRebalance = true; @@ -138,6 +140,7 @@ public void testPutAllPrimaryFailure1_UnstableTopology() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAllPrimaryFailure2() throws Exception { putAllPrimaryFailure(true, true); } @@ -145,6 +148,7 @@ public void testPutAllPrimaryFailure2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAllPrimaryFailure2_UnstableTopology() throws Exception { blockRebalance = true; @@ -214,6 +218,7 @@ private void putAllPrimaryFailure(boolean fail0, boolean fail1) throws Exception /** * @throws Exception If failed. */ + @Test public void testPutAllBackupFailure1() throws Exception { putAllBackupFailure1(); } @@ -221,6 +226,7 @@ public void testPutAllBackupFailure1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAllBackupFailure1_UnstableTopology() throws Exception { blockRebalance = true; @@ -275,6 +281,7 @@ private void putAllBackupFailure1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutBackupFailure1() throws Exception { putBackupFailure1(); } @@ -282,6 +289,7 @@ public void testPutBackupFailure1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutBackupFailure1_UnstableTopology() throws Exception { blockRebalance = true; @@ -331,6 +339,7 @@ private void putBackupFailure1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFullAsyncPutRemap() throws Exception { fullAsyncRemap(false); } @@ -338,6 +347,7 @@ public void testFullAsyncPutRemap() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFullAsyncPutAllRemap() throws Exception { fullAsyncRemap(true); } @@ -406,6 +416,7 @@ private void fullAsyncRemap(boolean putAll) throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutPrimarySync() throws Exception { startGrids(2); @@ -448,6 +459,7 @@ public void testPutPrimarySync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutNearNodeFailure() throws Exception { startGrids(2); @@ -485,6 +497,7 @@ public void testPutNearNodeFailure() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAllNearNodeFailure() throws Exception { final int SRVS = 4; @@ -545,6 +558,7 @@ public void testPutAllNearNodeFailure() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheOperations0() throws Exception { cacheOperations(0); } @@ -552,6 +566,7 @@ public void testCacheOperations0() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheOperations_UnstableTopology0() throws Exception { blockRebalance = true; @@ -561,6 +576,7 @@ public void testCacheOperations_UnstableTopology0() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheOperations1() throws Exception { cacheOperations(1); } @@ -568,6 +584,7 @@ public void testCacheOperations1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheOperations_UnstableTopology1() throws Exception { blockRebalance = true; @@ -577,6 +594,7 @@ public void testCacheOperations_UnstableTopology1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheOperations2() throws Exception { cacheOperations(2); } @@ -584,6 +602,7 @@ public void testCacheOperations2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheOperations_UnstableTopology2() throws Exception { blockRebalance = true; @@ -639,6 +658,7 @@ private void cacheOperations(int backups) throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutMissedDhtRequest_UnstableTopology() throws Exception { blockRebalance = true; @@ -678,6 +698,7 @@ public void testPutMissedDhtRequest_UnstableTopology() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAllMissedDhtRequest_UnstableTopology1() throws Exception { putAllMissedDhtRequest_UnstableTopology(true, false); } @@ -685,6 +706,7 @@ public void testPutAllMissedDhtRequest_UnstableTopology1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAllMissedDhtRequest_UnstableTopology2() throws Exception { putAllMissedDhtRequest_UnstableTopology(true, true); } @@ -750,6 +772,7 @@ private void putAllMissedDhtRequest_UnstableTopology(boolean fail0, boolean fail /** * @throws Exception If failed. */ + @Test public void testPutReaderUpdate1() throws Exception { readerUpdateDhtFails(false, false, false); @@ -761,6 +784,7 @@ public void testPutReaderUpdate1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutReaderUpdate2() throws Exception { readerUpdateDhtFails(true, false, false); @@ -772,6 +796,7 @@ public void testPutReaderUpdate2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAllReaderUpdate1() throws Exception { readerUpdateDhtFails(false, false, true); @@ -783,6 +808,7 @@ public void testPutAllReaderUpdate1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAllReaderUpdate2() throws Exception { readerUpdateDhtFails(true, false, true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest.java index 6e19fb74d213f..8bfedcbf3c4f9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest.java @@ -80,17 +80,20 @@ public class GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest extends GridCache } /** {@inheritDoc} */ - @Override public void testReaderTtlNoTx() { + @Override @Test + public void testReaderTtlNoTx() { // No-op. } /** {@inheritDoc} */ - @Override public void testReaderTtlTx() { + @Override @Test + public void testReaderTtlTx() { // No-op. } /** {@inheritDoc} */ - @Override public void testSize() throws Exception { + @Override @Test + public void testSize() throws Exception { IgniteCache cache = jcache(); int size = 10; @@ -119,7 +122,8 @@ public class GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest extends GridCache } /** {@inheritDoc} */ - @Override public void testClear() throws Exception { + @Override @Test + public void testClear() throws Exception { IgniteCache nearCache = jcache(); IgniteCache primary = fullCache(); @@ -154,7 +158,8 @@ public class GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest extends GridCache } /** {@inheritDoc} */ - @Override public void testLocalClearKeys() throws Exception { + @Override @Test + public void testLocalClearKeys() throws Exception { IgniteCache nearCache = jcache(); IgniteCache primary = fullCache(); @@ -185,7 +190,8 @@ public class GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest extends GridCache } /** {@inheritDoc} */ - @Override public void testEvictExpired() throws Exception { + @Override @Test + public void testEvictExpired() throws Exception { IgniteCache cache = jcache(); final String key = primaryKeysForCache(cache, 1).get(0); @@ -232,7 +238,8 @@ public class GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest extends GridCache } /** {@inheritDoc} */ - @Override public void testLocalEvict() throws Exception { + @Override @Test + public void testLocalEvict() throws Exception { IgniteCache cache = jcache(); List keys = primaryKeysForCache(cache, 3); @@ -281,7 +288,8 @@ public class GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest extends GridCache } /** {@inheritDoc} */ - @Override public void testPeekExpired() throws Exception { + @Override @Test + public void testPeekExpired() throws Exception { IgniteCache c = jcache(); String key = primaryKeysForCache(c, 1).get(0); @@ -303,4 +311,4 @@ public class GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest extends GridCache assert c.localSize() == 0 : "Cache is not empty."; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest.java index 6525e4a3e2a51..16f7c55222037 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest.java @@ -75,7 +75,8 @@ public class GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest extends GridCacheNe } /** {@inheritDoc} */ - @Override public void testClear() throws Exception { + @Override @Test + public void testClear() throws Exception { IgniteCache nearCache = jcache(); IgniteCache primary = fullCache(); @@ -111,4 +112,4 @@ public class GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest extends GridCacheNe for (String key : keys) assertEquals((Integer)i++, nearCache.localPeek(key, CachePeekMode.ONHEAP)); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPartitionedTckMetricsSelfTestImpl.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPartitionedTckMetricsSelfTestImpl.java index da0c7a92d94f8..0e6bbf68542f0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPartitionedTckMetricsSelfTestImpl.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPartitionedTckMetricsSelfTestImpl.java @@ -34,6 +34,7 @@ public class GridCacheAtomicPartitionedTckMetricsSelfTestImpl extends GridCacheA /** * @throws Exception If failed. */ + @Test public void testEntryProcessorRemove() throws Exception { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -68,6 +69,7 @@ public void testEntryProcessorRemove() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheStatistics() throws Exception { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -108,6 +110,7 @@ public void testCacheStatistics() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConditionReplace() throws Exception { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -158,6 +161,7 @@ public void testConditionReplace() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutIfAbsent() throws Exception { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -177,7 +181,7 @@ public void testPutIfAbsent() throws Exception { assertEquals(putCount, cache.localMetrics().getCachePuts()); result = cache.putIfAbsent(1, 1); - + ++hitCount; cache.containsKey(123); @@ -187,4 +191,4 @@ public void testPutIfAbsent() throws Exception { assertEquals(putCount, cache.localMetrics().getCachePuts()); assertEquals(missCount, cache.localMetrics().getCacheMisses()); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheGetStoreErrorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheGetStoreErrorSelfTest.java index cb537ee67dfcf..72ce55664af9c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheGetStoreErrorSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheGetStoreErrorSelfTest.java @@ -88,21 +88,25 @@ public class GridCacheGetStoreErrorSelfTest extends GridCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testGetErrorNear() throws Exception { checkGetError(true, PARTITIONED); } /** @throws Exception If failed. */ + @Test public void testGetErrorColocated() throws Exception { checkGetError(false, PARTITIONED); } /** @throws Exception If failed. */ + @Test public void testGetErrorReplicated() throws Exception { checkGetError(false, REPLICATED); } /** @throws Exception If failed. */ + @Test public void testGetErrorLocal() throws Exception { checkGetError(false, LOCAL); } @@ -166,4 +170,4 @@ public static class TestStore extends CacheStoreAdapter { // No-op. } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearAtomicMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearAtomicMetricsSelfTest.java index 4d82c71181fa5..59c36be635bc7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearAtomicMetricsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearAtomicMetricsSelfTest.java @@ -39,6 +39,7 @@ public class GridCacheNearAtomicMetricsSelfTest extends GridCacheNearMetricsSelf /** * Checks that enabled near cache does not affect metrics. */ + @Test public void testNearCachePutRemoveGetMetrics() { IgniteEx initiator = grid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearClientHitTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearClientHitTest.java index 6663a67915cb1..719875797ace0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearClientHitTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearClientHitTest.java @@ -94,6 +94,7 @@ private NearCacheConfiguration nearCacheConfiguration() { /** * @throws Exception If failed. */ + @Test public void testLocalPeekAfterPrimaryNodeLeft() throws Exception { try { Ignite crd = startGrid("coordinator", getConfiguration("coordinator")); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearEvictionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearEvictionSelfTest.java index 9c7c93345d9d5..7f72e8ea76cdc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearEvictionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearEvictionSelfTest.java @@ -83,6 +83,7 @@ protected CacheAtomicityMode atomicityMode() { } /** @throws Exception If failed. */ + @Test public void testNearEnabledOneNode() throws Exception { gridCnt = 1; @@ -106,6 +107,7 @@ public void testNearEnabledOneNode() throws Exception { } /** @throws Exception If failed. */ + @Test public void testNearEnabledTwoNodes() throws Exception { gridCnt = 2; @@ -139,6 +141,7 @@ public void testNearEnabledTwoNodes() throws Exception { } /** @throws Exception If failed. */ + @Test public void testNearEnabledThreeNodes() throws Exception { gridCnt = 3; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMetricsSelfTest.java index 70b06f34f2d9f..fda204dcb904a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMetricsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMetricsSelfTest.java @@ -107,6 +107,7 @@ protected int keyCount() { /** * @throws Exception If failed. */ + @Test public void testNearCacheDoesNotAffectCacheSize() throws Exception { IgniteCache cache0 = grid(0).cache(DEFAULT_CACHE_NAME); @@ -132,6 +133,7 @@ public void testNearCacheDoesNotAffectCacheSize() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPrimaryPut() throws Exception { Ignite g0 = grid(0); @@ -187,6 +189,7 @@ public void testPrimaryPut() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBackupPut() throws Exception { Ignite g0 = grid(0); @@ -241,6 +244,7 @@ else if (affinity(jcache).isBackup(g.cluster().localNode(), key)){ /** * @throws Exception If failed. */ + @Test public void testNearPut() throws Exception { Ignite g0 = grid(0); @@ -293,6 +297,7 @@ else if (affinity(jcache).isBackup(g.cluster().localNode(), key)){ /** * @throws Exception If failed. */ + @Test public void testPrimaryRead() throws Exception { Ignite g0 = grid(0); @@ -349,6 +354,7 @@ public void testPrimaryRead() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBackupRead() throws Exception { Ignite g0 = grid(0); @@ -400,6 +406,7 @@ public void testBackupRead() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNearRead() throws Exception { Ignite g0 = grid(0); @@ -453,6 +460,7 @@ else if (affinity(jcache).isBackup(g.cluster().localNode(), key)){ /** * @throws Exception If failed. */ + @Test public void testCreateReadRemoveInvokesFromPrimary() throws Exception { Ignite g0 = grid(0); @@ -508,6 +516,7 @@ else if (affinity(jcache).isBackup(g.cluster().localNode(), key)) { /** * @throws Exception If failed. */ + @Test public void testCreateReadRemoveInvokesFromBackup() throws Exception { Ignite g0 = grid(0); @@ -563,6 +572,7 @@ else if (affinity(jcache).isBackup(g.cluster().localNode(), key)) { /** * @throws Exception If failed. */ + @Test public void testCreateReadRemoveInvokesFromNear() throws Exception { Ignite g0 = grid(0); @@ -618,6 +628,7 @@ public void testCreateReadRemoveInvokesFromNear() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReadRemoveInvokesFromPrimary() throws Exception { Ignite g0 = grid(0); @@ -664,6 +675,7 @@ else if (affinity(jcache).isBackup(g.cluster().localNode(), key)) { /** * @throws Exception If failed. */ + @Test public void testReadRemoveInvokesFromBackup() throws Exception { Ignite g0 = grid(0); @@ -709,6 +721,7 @@ else if (affinity(jcache).isBackup(g.cluster().localNode(), key)) { /** * @throws Exception If failed. */ + @Test public void testReadRemoveInvokesFromNear() throws Exception { Ignite g0 = grid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiGetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiGetSelfTest.java index 4633161e12d40..e6b513549e7e7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiGetSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiGetSelfTest.java @@ -125,102 +125,121 @@ private boolean isTestDebug() { } /** @throws Exception If failed. */ + @Test public void testOptimisticReadCommittedNoPut() throws Exception { checkDoubleGet(OPTIMISTIC, READ_COMMITTED, false); } /** @throws Exception If failed. */ + @Test public void testOptimisticReadCommittedWithPut() throws Exception { checkDoubleGet(OPTIMISTIC, READ_COMMITTED, true); } /** @throws Exception If failed. */ + @Test public void testOptimisticReadCommitted() throws Exception { checkDoubleGet(OPTIMISTIC, READ_COMMITTED, false); checkDoubleGet(OPTIMISTIC, READ_COMMITTED, true); } /** @throws Exception If failed. */ + @Test public void testOptimisticRepeatableReadNoPut() throws Exception { checkDoubleGet(OPTIMISTIC, REPEATABLE_READ, false); } /** @throws Exception If failed. */ + @Test public void testOptimisticRepeatableReadWithPut() throws Exception { checkDoubleGet(OPTIMISTIC, REPEATABLE_READ, true); } /** @throws Exception If failed. */ + @Test public void testOptimisticRepeatableRead() throws Exception { checkDoubleGet(OPTIMISTIC, REPEATABLE_READ, false); checkDoubleGet(OPTIMISTIC, REPEATABLE_READ, true); } /** @throws Exception If failed. */ + @Test public void testOptimisticSerializableNoPut() throws Exception { checkDoubleGet(OPTIMISTIC, SERIALIZABLE, false); } /** @throws Exception If failed. */ + @Test public void testOptimisticSerializableWithPut() throws Exception { checkDoubleGet(OPTIMISTIC, SERIALIZABLE, true); } /** @throws Exception If failed. */ + @Test public void testOptimisticSerializable() throws Exception { checkDoubleGet(OPTIMISTIC, SERIALIZABLE, false); checkDoubleGet(OPTIMISTIC, SERIALIZABLE, true); } /** @throws Exception If failed. */ + @Test public void testPessimisticReadCommittedNoPut() throws Exception { checkDoubleGet(PESSIMISTIC, READ_COMMITTED, false); } /** @throws Exception If failed. */ + @Test public void testPessimisticReadCommittedWithPut() throws Exception { checkDoubleGet(PESSIMISTIC, READ_COMMITTED, true); } /** @throws Exception If failed. */ + @Test public void testPessimisticReadCommitted() throws Exception { checkDoubleGet(PESSIMISTIC, READ_COMMITTED, false); checkDoubleGet(PESSIMISTIC, READ_COMMITTED, true); } /** @throws Exception If failed. */ + @Test public void testPessimisticRepeatableReadNoPut() throws Exception { checkDoubleGet(PESSIMISTIC, REPEATABLE_READ, false); } /** @throws Exception If failed. */ + @Test public void testPessimisticRepeatableReadWithPut() throws Exception { checkDoubleGet(PESSIMISTIC, REPEATABLE_READ, true); } /** @throws Exception If failed. */ + @Test public void testPessimisticRepeatableRead() throws Exception { checkDoubleGet(PESSIMISTIC, REPEATABLE_READ, false); checkDoubleGet(PESSIMISTIC, REPEATABLE_READ, true); } /** @throws Exception If failed. */ + @Test public void testPessimisticSerializableNoPut() throws Exception { checkDoubleGet(PESSIMISTIC, SERIALIZABLE, false); } /** @throws Exception If failed. */ + @Test public void testPessimisticSerializableWithPut() throws Exception { checkDoubleGet(PESSIMISTIC, SERIALIZABLE, true); } /** @throws Exception If failed. */ + @Test public void testPessimisticSerializable() throws Exception { checkDoubleGet(PESSIMISTIC, SERIALIZABLE, false); checkDoubleGet(PESSIMISTIC, SERIALIZABLE, true); } /** @throws Exception If failed. */ + @Test public void testMvccPessimisticRepeatableReadNoPut() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-7187"); @@ -230,6 +249,7 @@ public void testMvccPessimisticRepeatableReadNoPut() throws Exception { } /** @throws Exception If failed. */ + @Test public void testMvccPessimisticRepeatableReadWithPut() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-7187"); @@ -332,4 +352,4 @@ private void checkDoubleGet(TransactionConcurrency concurrency, TransactionIsola ", t=" + t + (t != tx ? "tx=" + tx : "tx=''") + ']'; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiNodeSelfTest.java index 875284dfd874e..54bee6a095eb6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiNodeSelfTest.java @@ -256,6 +256,7 @@ private Map, Set>> mapKeys(int cnt) { } /** Test mappings. */ + @Test public void testMappings() { mapDebug = false; @@ -316,6 +317,7 @@ public void testMappings() { } /** @throws Exception If failed. */ + @Test public void testReadThroughAndPut() throws Exception { Integer key = 100000; @@ -339,6 +341,7 @@ public void testReadThroughAndPut() throws Exception { } /** @throws Exception If failed. */ + @Test public void testReadThrough() throws Exception { ClusterNode loc = grid(0).localNode(); @@ -384,6 +387,7 @@ public void testReadThrough() throws Exception { * @throws Exception If failed. */ @SuppressWarnings({"ConstantConditions"}) + @Test public void testOptimisticWriteThrough() throws Exception { IgniteCache near = jcache(0); @@ -429,6 +433,7 @@ public void testOptimisticWriteThrough() throws Exception { } /** @throws Exception If failed. */ + @Test public void testNoTransactionSinglePutx() throws Exception { IgniteCache near = jcache(0); @@ -446,6 +451,7 @@ public void testNoTransactionSinglePutx() throws Exception { } /** @throws Exception If failed. */ + @Test public void testNoTransactionSinglePut() throws Exception { IgniteCache near = jcache(0); @@ -488,6 +494,7 @@ public void testNoTransactionSinglePut() throws Exception { } /** @throws Exception If failed. */ + @Test public void testNoTransactionWriteThrough() throws Exception { IgniteCache near = jcache(0); @@ -517,6 +524,7 @@ public void testNoTransactionWriteThrough() throws Exception { * @throws Exception If failed. */ @SuppressWarnings({"ConstantConditions"}) + @Test public void testPessimisticWriteThrough() throws Exception { IgniteCache near = jcache(0); @@ -556,6 +564,7 @@ public void testPessimisticWriteThrough() throws Exception { } /** @throws Exception If failed. */ + @Test public void testConcurrentOps() throws Exception { // Don't create missing values. store.create(false); @@ -587,11 +596,13 @@ public void testConcurrentOps() throws Exception { } /** @throws Exception If failed. */ + @Test public void testBackupsLocalAffinity() throws Exception { checkBackupConsistency(2); } /** @throws Exception If failed. */ + @Test public void testBackupsRemoteAffinity() throws Exception { checkBackupConsistency(1); } @@ -618,11 +629,13 @@ private void checkBackupConsistency(int key) throws Exception { } /** @throws Exception If failed. */ + @Test public void testSingleLockLocalAffinity() throws Exception { checkSingleLock(2); } /** @throws Exception If failed. */ + @Test public void testSingleLockRemoteAffinity() throws Exception { checkSingleLock(1); } @@ -733,11 +746,13 @@ private void checkSingleLock(int key) throws Exception { } /** @throws Throwable If failed. */ + @Test public void testSingleLockReentryLocalAffinity() throws Throwable { checkSingleLockReentry(2); } /** @throws Throwable If failed. */ + @Test public void testSingleLockReentryRemoteAffinity() throws Throwable { checkSingleLockReentry(1); } @@ -800,11 +815,13 @@ private void checkSingleLockReentry(int key) throws Throwable { } /** @throws Exception If failed. */ + @Test public void testTransactionSingleGetLocalAffinity() throws Exception { checkTransactionSingleGet(2); } /** @throws Exception If failed. */ + @Test public void testTransactionSingleGetRemoteAffinity() throws Exception { checkTransactionSingleGet(1); } @@ -846,11 +863,13 @@ private void checkTransactionSingleGet(int key) throws Exception { } /** @throws Exception If failed. */ + @Test public void testTransactionSingleGetRemoveLocalAffinity() throws Exception { checkTransactionSingleGetRemove(2); } /** @throws Exception If failed. */ + @Test public void testTransactionSingleGetRemoveRemoteAffinity() throws Exception { checkTransactionSingleGetRemove(1); } @@ -960,4 +979,4 @@ boolean isEmpty() { map.remove(key); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOneNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOneNodeSelfTest.java index 2b4b60c9ba30d..c110c76121c52 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOneNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOneNodeSelfTest.java @@ -103,6 +103,7 @@ public GridCacheNearOneNodeSelfTest() { } /** @throws Exception If failed. */ + @Test public void testRemove() throws Exception { IgniteCache near = jcache(); @@ -131,6 +132,7 @@ public void testRemove() throws Exception { } /** @throws Exception If failed. */ + @Test public void testReadThrough() throws Exception { IgniteCache near = jcache(); @@ -160,6 +162,7 @@ public void testReadThrough() throws Exception { * * @throws Exception If failed. */ + @Test public void testOptimisticTxWriteThrough() throws Exception { IgniteCache near = jcache(); GridCacheAdapter dht = dht(); @@ -192,6 +195,7 @@ public void testOptimisticTxWriteThrough() throws Exception { } /** @throws Exception If failed. */ + @Test public void testSingleLockPut() throws Exception { IgniteCache near = jcache(); @@ -214,6 +218,7 @@ public void testSingleLockPut() throws Exception { } /** @throws Exception If failed. */ + @Test public void testSingleLock() throws Exception { IgniteCache near = jcache(); @@ -245,6 +250,7 @@ public void testSingleLock() throws Exception { } /** @throws Exception If failed. */ + @Test public void testSingleLockReentry() throws Exception { IgniteCache near = jcache(); @@ -289,6 +295,7 @@ public void testSingleLockReentry() throws Exception { } /** @throws Exception If failed. */ + @Test public void testTransactionSingleGet() throws Exception { IgniteCache cache = jcache(); @@ -308,6 +315,7 @@ public void testTransactionSingleGet() throws Exception { } /** @throws Exception If failed. */ + @Test public void testTransactionSingleGetRemove() throws Exception { IgniteCache cache = jcache(); @@ -393,4 +401,4 @@ boolean isEmpty() { map.remove(key); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java index e1ec15b52d4c6..59313f43ddbea 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java @@ -175,7 +175,8 @@ protected boolean clientHasNearCache() { } /** {@inheritDoc} */ - @Override public void testSize() throws Exception { + @Override @Test + public void testSize() throws Exception { IgniteCache nearCache = jcache(); int size = 10; @@ -204,13 +205,15 @@ protected boolean clientHasNearCache() { } /** {@inheritDoc} */ - @Override public void testLoadAll() throws Exception { + @Override @Test + public void testLoadAll() throws Exception { // Not needed for near-only cache. } /** * @throws Exception If failed. */ + @Test public void testReaderTtlTx() throws Exception { // IgniteProcessProxy#transactions is not implemented. if (isMultiJvm() || !txShouldBeUsed()) @@ -222,6 +225,7 @@ public void testReaderTtlTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReaderTtlNoTx() throws Exception { checkReaderTtl(false); } @@ -431,7 +435,8 @@ else if (i == nearIdx) } /** {@inheritDoc} */ - @Override public void testClear() throws Exception { + @Override @Test + public void testClear() throws Exception { IgniteCache nearCache = jcache(); IgniteCache primary = fullCache(); @@ -483,7 +488,8 @@ else if (i == nearIdx) } /** {@inheritDoc} */ - @Override public void testLocalClearKeys() throws Exception { + @Override @Test + public void testLocalClearKeys() throws Exception { IgniteCache nearCache = jcache(); IgniteCache primary = fullCache(); @@ -550,7 +556,8 @@ else if (i == nearIdx) /** {@inheritDoc} */ @SuppressWarnings("BusyWait") - @Override public void testLockUnlock() throws Exception { + @Override @Test + public void testLockUnlock() throws Exception { if (lockingEnabled()) { final CountDownLatch lockCnt = new CountDownLatch(1); final CountDownLatch unlockCnt = new CountDownLatch(1); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlySelfTest.java index bf8c1ca089fbe..5f0a2c35958b5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlySelfTest.java @@ -36,6 +36,7 @@ public abstract class GridCacheNearOnlySelfTest extends GridCacheClientModesAbst /** * @throws Exception If failed. */ + @Test public void testUpdateNearOnlyReader() throws Exception { IgniteCache dhtCache = dhtCache(); @@ -114,4 +115,4 @@ public static class CasePartitionedTransactional extends GridCacheNearOnlySelfTe return TRANSACTIONAL; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyTopologySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyTopologySelfTest.java index 4344bb1359213..3b2ea61477ea5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyTopologySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyTopologySelfTest.java @@ -90,31 +90,37 @@ public class GridCacheNearOnlyTopologySelfTest extends GridCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testStartupFirstOneNode() throws Exception { checkStartupNearNode(0, 2); } /** @throws Exception If failed. */ + @Test public void testStartupLastOneNode() throws Exception { checkStartupNearNode(1, 2); } /** @throws Exception If failed. */ + @Test public void testStartupFirstTwoNodes() throws Exception { checkStartupNearNode(0, 3); } /** @throws Exception If failed. */ + @Test public void testStartupInMiddleTwoNodes() throws Exception { checkStartupNearNode(1, 3); } /** @throws Exception If failed. */ + @Test public void testStartupLastTwoNodes() throws Exception { checkStartupNearNode(2, 3); } /** @throws Exception If failed. */ + @Test public void testKeyMapping() throws Exception { try { cache = true; @@ -137,6 +143,7 @@ public void testKeyMapping() throws Exception { } /** @throws Exception If failed. */ + @Test public void testKeyMappingOnComputeNode() throws Exception { try { cache = true; @@ -168,6 +175,7 @@ public void testKeyMappingOnComputeNode() throws Exception { } /** @throws Exception If failed. */ + @Test public void testNodeLeave() throws Exception { try { cache = true; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearPartitionedClearSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearPartitionedClearSelfTest.java index 90a740648a883..bdea450dab2c2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearPartitionedClearSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearPartitionedClearSelfTest.java @@ -110,6 +110,7 @@ public class GridCacheNearPartitionedClearSelfTest extends GridCommonAbstractTes * * @throws Exception If failed. */ + @Test public void testClear() throws Exception { IgniteCache cache = cacheForIndex(0); @@ -159,4 +160,4 @@ private int primaryKey0(Ignite ignite, IgniteCache cache) throws Exception { private IgniteCache cacheForIndex(int idx) { return grid(idx).cache(CACHE_NAME); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReaderPreloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReaderPreloadSelfTest.java index 316cc6e75e28d..3af3a4b47ffbf 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReaderPreloadSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReaderPreloadSelfTest.java @@ -83,6 +83,7 @@ public class GridCacheNearReaderPreloadSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testNearReaderPreload() throws Exception { for (int i = 0; i < REPEAT_CNT; i++) { startUp(); @@ -206,4 +207,4 @@ private void checkCache(IgniteCache cache, int key, int expVal assert F.eq(expVal, val) : "Unexpected cache value [key=" + key + ", expected=" + expVal + ", actual=" + val + ']'; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReadersSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReadersSelfTest.java index 88a757d11c5f7..3040132327217 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReadersSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReadersSelfTest.java @@ -148,6 +148,7 @@ private Ignite grid(UUID nodeId) { } /** @throws Exception If failed. */ + @Test public void testTwoNodesTwoKeysNoBackups() throws Exception { aff.backups(0); grids = 2; @@ -241,6 +242,7 @@ public void testTwoNodesTwoKeysNoBackups() throws Exception { } /** @throws Exception If failed. */ + @Test public void testTwoNodesTwoKeysOneBackup() throws Exception { aff.backups(1); grids = 2; @@ -357,6 +359,7 @@ public void testTwoNodesTwoKeysOneBackup() throws Exception { } /** @throws Exception If failed. */ + @Test public void testPutAllManyKeysOneReader() throws Exception { aff.backups(1); grids = 4; @@ -393,6 +396,7 @@ public void testPutAllManyKeysOneReader() throws Exception { } /** @throws Exception If failed. */ + @Test public void testPutAllManyKeysTwoReaders() throws Exception { aff.backups(1); grids = 5; @@ -436,6 +440,7 @@ public void testPutAllManyKeysTwoReaders() throws Exception { } /** @throws Exception If failed. */ + @Test public void testBackupEntryReaders() throws Exception { aff.backups(1); grids = 2; @@ -473,6 +478,7 @@ public void testBackupEntryReaders() throws Exception { } /** @throws Exception If failed. */ + @Test public void testImplicitLockReaders() throws Exception { grids = 3; aff.reset(grids, 1); @@ -552,6 +558,7 @@ public void testImplicitLockReaders() throws Exception { } /** @throws Exception If failed. */ + @Test public void testExplicitLockReaders() throws Exception { if (atomicityMode() == ATOMIC) return; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearTxForceKeyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearTxForceKeyTest.java index 21b90e2bddfe5..05b47ce78b6ed 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearTxForceKeyTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearTxForceKeyTest.java @@ -63,6 +63,7 @@ public class GridCacheNearTxForceKeyTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testNearTx() throws Exception { Ignite ignite0 = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearTxMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearTxMultiNodeSelfTest.java index 07ee991ba17b8..604a522e63212 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearTxMultiNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearTxMultiNodeSelfTest.java @@ -96,6 +96,7 @@ public class GridCacheNearTxMultiNodeSelfTest extends GridCommonAbstractTest { * @throws Exception If failed. */ @SuppressWarnings( {"unchecked"}) + @Test public void testTxCleanup() throws Exception { backups = 1; @@ -184,6 +185,7 @@ public void testTxCleanup() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxReadersUpdate() throws Exception { startGridsMultiThreaded(GRID_CNT); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAffinityExcludeNeighborsPerformanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAffinityExcludeNeighborsPerformanceTest.java index 59d1a041aa678..9124650cb7f65 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAffinityExcludeNeighborsPerformanceTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAffinityExcludeNeighborsPerformanceTest.java @@ -107,6 +107,7 @@ private static Collection nodes(Affinity aff, Obj /** * @throws Exception If failed. */ + @Test public void testCountPerformance() throws Exception { excNeighbores = false; @@ -188,6 +189,7 @@ private long checkCountPerformance0(Ignite g, int cnt) throws Exception { /** * @throws Exception If failed. */ + @Test public void testTimedPerformance() throws Exception { excNeighbores = false; @@ -252,4 +254,4 @@ private int checkTimedPerformance(long dur, String testName) throws Exception { stopAllGrids(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAffinitySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAffinitySelfTest.java index b92195b7f46d3..8ca170878ff71 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAffinitySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAffinitySelfTest.java @@ -111,6 +111,7 @@ private static Collection nodes(Affinity aff, Obj } /** @throws Exception If failed. */ + @Test public void testAffinity() throws Exception { waitTopologyUpdate(); @@ -162,6 +163,7 @@ private void waitTopologyUpdate() throws Exception { } /** @throws Exception If failed. */ + @Test public void testAffinityWithPut() throws Exception { waitTopologyUpdate(); @@ -285,4 +287,4 @@ private ListenerJob(int keyCnt, String master) { EVT_CACHE_OBJECT_REMOVED); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedBasicOpSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedBasicOpSelfTest.java index 5c0eefeb55691..48f821859ade2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedBasicOpSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedBasicOpSelfTest.java @@ -48,22 +48,26 @@ public class GridCachePartitionedBasicOpSelfTest extends GridCacheBasicOpAbstrac } /** {@inheritDoc} */ - @Override public void testBasicOps() throws Exception { + @Override @Test + public void testBasicOps() throws Exception { super.testBasicOps(); } /** {@inheritDoc} */ - @Override public void testBasicOpsAsync() throws Exception { + @Override @Test + public void testBasicOpsAsync() throws Exception { super.testBasicOpsAsync(); } /** {@inheritDoc} */ - @Override public void testOptimisticTransaction() throws Exception { + @Override @Test + public void testOptimisticTransaction() throws Exception { super.testOptimisticTransaction(); } /** {@inheritDoc} */ - @Override public void testPutWithExpiration() throws Exception { + @Override @Test + public void testPutWithExpiration() throws Exception { super.testPutWithExpiration(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedBasicStoreMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedBasicStoreMultiNodeSelfTest.java index 73d5b5ffd1491..810f06704b9ca 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedBasicStoreMultiNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedBasicStoreMultiNodeSelfTest.java @@ -130,6 +130,7 @@ protected NearCacheConfiguration nearCacheConfiguration() { /** * @throws Exception If failed. */ + @Test public void testPutFromPrimary() throws Exception { IgniteCache cache = jcache(0); @@ -143,6 +144,7 @@ public void testPutFromPrimary() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutFromBackup() throws Exception { IgniteCache cache = jcache(0); @@ -156,6 +158,7 @@ public void testPutFromBackup() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutFromNear() throws Exception { IgniteCache cache = jcache(0); @@ -169,6 +172,7 @@ public void testPutFromNear() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutIfAbsentFromPrimary() throws Exception { IgniteCache cache = jcache(0); @@ -182,6 +186,7 @@ public void testPutIfAbsentFromPrimary() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutIfAbsentFromBackup() throws Exception { IgniteCache cache = jcache(0); @@ -195,6 +200,7 @@ public void testPutIfAbsentFromBackup() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutIfAbsentFromNear() throws Exception { IgniteCache cache = jcache(0); @@ -208,6 +214,7 @@ public void testPutIfAbsentFromNear() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAll() throws Exception { IgniteCache cache = jcache(0); @@ -224,6 +231,7 @@ public void testPutAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultipleOperations() throws Exception { IgniteCache cache = jcache(0); @@ -285,4 +293,4 @@ static class StoreFactory implements Factory { return store; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedClientOnlyNoPrimaryFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedClientOnlyNoPrimaryFullApiSelfTest.java index eef5aebaacc98..ace4ffaee73c3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedClientOnlyNoPrimaryFullApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedClientOnlyNoPrimaryFullApiSelfTest.java @@ -49,6 +49,7 @@ public class GridCachePartitionedClientOnlyNoPrimaryFullApiSelfTest extends Grid /** * */ + @Test public void testMapKeysToNodes() { grid(0).affinity(DEFAULT_CACHE_NAME).mapKeysToNodes(Arrays.asList("1", "2")); } @@ -56,6 +57,7 @@ public void testMapKeysToNodes() { /** * */ + @Test public void testMapKeyToNode() { assert grid(0).affinity(DEFAULT_CACHE_NAME).mapKeyToNode("1") == null; } @@ -77,4 +79,4 @@ public void testMapKeyToNode() { } }; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedEvictionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedEvictionSelfTest.java index d6f9baff10acf..567b29e346538 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedEvictionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedEvictionSelfTest.java @@ -117,6 +117,7 @@ private IgniteCache cache(ClusterNode node) { * * @throws Exception If failed. */ + @Test public void testEvictionTxPessimisticReadCommitted() throws Exception { doTestEviction(PESSIMISTIC, READ_COMMITTED); } @@ -126,6 +127,7 @@ public void testEvictionTxPessimisticReadCommitted() throws Exception { * * @throws Exception If failed. */ + @Test public void testEvictionTxPessimisticRepeatableRead() throws Exception { doTestEviction(PESSIMISTIC, REPEATABLE_READ); } @@ -135,6 +137,7 @@ public void testEvictionTxPessimisticRepeatableRead() throws Exception { * * @throws Exception If failed. */ + @Test public void testEvictionTxPessimisticSerializable() throws Exception { doTestEviction(PESSIMISTIC, SERIALIZABLE); } @@ -144,6 +147,7 @@ public void testEvictionTxPessimisticSerializable() throws Exception { * * @throws Exception If failed. */ + @Test public void testEvictionTxOptimisticReadCommitted() throws Exception { doTestEviction(OPTIMISTIC, READ_COMMITTED); } @@ -153,6 +157,7 @@ public void testEvictionTxOptimisticReadCommitted() throws Exception { * * @throws Exception If failed. */ + @Test public void testEvictionTxOptimisticRepeatableRead() throws Exception { doTestEviction(OPTIMISTIC, REPEATABLE_READ); } @@ -162,6 +167,7 @@ public void testEvictionTxOptimisticRepeatableRead() throws Exception { * * @throws Exception If failed. */ + @Test public void testEvictionTxOptimisticSerializable() throws Exception { doTestEviction(OPTIMISTIC, SERIALIZABLE); } @@ -226,4 +232,4 @@ private void doTestEviction(TransactionConcurrency concurrency, TransactionIsola assertEquals(0, near(jcache(0)).nearSize()); assertEquals(0, near(jcache(1)).nearSize()); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedExplicitLockNodeFailureSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedExplicitLockNodeFailureSelfTest.java index 28afce1e9fe8e..2ce45915a0b49 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedExplicitLockNodeFailureSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedExplicitLockNodeFailureSelfTest.java @@ -92,6 +92,7 @@ public class GridCachePartitionedExplicitLockNodeFailureSelfTest extends GridCom /** @throws Exception If check failed. */ @SuppressWarnings("ErrorNotRethrown") + @Test public void testLockFromNearOrBackup() throws Exception { startGrids(GRID_CNT); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFilteredPutSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFilteredPutSelfTest.java index 20c32c1ff4d7f..f69fbb3314e78 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFilteredPutSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFilteredPutSelfTest.java @@ -89,6 +89,7 @@ private CacheConfiguration cacheConfiguration() { /** * @throws Exception If failed. */ + @Test public void testPutAndRollbackCheckNear() throws Exception { doPutAndRollback(); @@ -100,6 +101,7 @@ public void testPutAndRollbackCheckNear() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAndRollbackCheckDht() throws Exception { doPutAndRollback(); @@ -125,4 +127,4 @@ private void doPutAndRollback() throws Exception { assert c.localPeek(1, CachePeekMode.ONHEAP) == null; assert c.get(1) == null; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFullApiSelfTest.java index ae0c8d79cb636..c3c8cdcbc0e71 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFullApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFullApiSelfTest.java @@ -56,6 +56,7 @@ public class GridCachePartitionedFullApiSelfTest extends GridCacheAbstractFullAp /** * @throws Exception If failed. */ + @Test public void testUpdate() throws Exception { if (gridCount() > 1) { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -81,4 +82,4 @@ public void testUpdate() throws Exception { assertEquals(1, cnt); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedHitsAndMissesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedHitsAndMissesSelfTest.java index 64f594084ea7e..8bbe5ebacf633 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedHitsAndMissesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedHitsAndMissesSelfTest.java @@ -98,6 +98,7 @@ protected CacheConfiguration cacheConfiguration() throws Exception { * * @throws Exception If failed. */ + @Test public void testHitsAndMisses() throws Exception { startGrids(GRID_CNT); @@ -167,4 +168,4 @@ private static class IncrementingUpdater implements StreamReceiver { // No-op. } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeCounterSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeCounterSelfTest.java index e34ef97cedbd0..3b60b9f4e3845 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeCounterSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeCounterSelfTest.java @@ -189,6 +189,7 @@ public List grids(int max, Ignite... exclude) { } /** @throws Exception If failed. */ + @Test public void testMultiNearAndPrimary() throws Exception { // resetLog4j(Level.INFO, true, GridCacheTxManager.class.getName()); @@ -204,6 +205,7 @@ public void testMultiNearAndPrimary() throws Exception { } /** @throws Exception If failed. */ + @Test public void testOneNearAndPrimary() throws Exception { // resetLog4j(Level.INFO, true, GridCacheTxManager.class.getName()); @@ -519,6 +521,7 @@ private void checkNearAndPrimary(int gridCnt, int priThreads, int nearThreads) t } /** @throws Exception If failed. */ + @Test public void testMultiNearAndPrimaryMultiNode() throws Exception { int gridCnt = 4; @@ -528,6 +531,7 @@ public void testMultiNearAndPrimaryMultiNode() throws Exception { } /** @throws Exception If failed. */ + @Test public void testOneNearAndPrimaryMultiNode() throws Exception { int gridCnt = 2; @@ -779,4 +783,4 @@ private void onPrimary() { return S.toString(IncrementItemJob.class, this); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java index 8753ef1e6e05b..e797fa0ef96fb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java @@ -68,6 +68,7 @@ public Collection affinityNodes() { /** * @throws Exception If failed. */ + @Test public void testPutAllRemoveAll() throws Exception { for (int i = 0; i < gridCount(); i++) info(">>>>> Grid" + i + ": " + grid(i).localNode().id()); @@ -95,6 +96,7 @@ public void testPutAllRemoveAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAllPutAll() throws Exception { for (int i = 0; i < gridCount(); i++) info(">>>>> Grid" + i + ": " + grid(i).localNode().id()); @@ -134,6 +136,7 @@ public void testPutAllPutAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutDebug() throws Exception { for (int i = 0; i < gridCount(); i++) info(">>>>> Grid" + i + ": " + grid(i).localNode().id()); @@ -168,6 +171,7 @@ public void testPutDebug() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPeekPartitionedModes() throws Exception { jcache().put("key", 1); @@ -207,6 +211,7 @@ else if (!aff.isPrimaryOrBackup(grid(i).localNode(), "key")) { /** * @throws Exception If failed. */ + @Test public void testPeekAsyncPartitionedModes() throws Exception { jcache().put("key", 1); @@ -237,6 +242,7 @@ else if (!grid(i).affinity(DEFAULT_CACHE_NAME).isPrimaryOrBackup(grid(i).localNo * @throws Exception If failed. */ @SuppressWarnings("unchecked") + @Test public void testNearDhtKeySize() throws Exception { List keys = new ArrayList<>(5); @@ -312,6 +318,7 @@ else if (ignite1 == null) /** * @throws Exception If failed. */ + @Test public void testAffinity() throws Exception { for (int i = 0; i < gridCount(); i++) info("Grid " + i + ": " + grid(i).localNode().id()); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeLockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeLockSelfTest.java index 3122f60b823b1..34d28e1f60bc7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeLockSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeLockSelfTest.java @@ -47,27 +47,32 @@ public class GridCachePartitionedMultiNodeLockSelfTest extends GridCacheMultiNod } /** {@inheritDoc} */ - @Override public void testBasicLock() throws Exception { + @Override @Test + public void testBasicLock() throws Exception { super.testBasicLock(); } /** {@inheritDoc} */ - @Override public void testLockMultithreaded() throws Exception { + @Override @Test + public void testLockMultithreaded() throws Exception { super.testLockMultithreaded(); } /** {@inheritDoc} */ - @Override public void testLockReentry() throws IgniteCheckedException { + @Override @Test + public void testLockReentry() throws IgniteCheckedException { super.testLockReentry(); } /** {@inheritDoc} */ - @Override public void testMultiNodeLock() throws Exception { + @Override @Test + public void testMultiNodeLock() throws Exception { super.testMultiNodeLock(); } /** {@inheritDoc} */ - @Override public void testMultiNodeLockWithKeyLists() throws Exception { + @Override @Test + public void testMultiNodeLockWithKeyLists() throws Exception { super.testMultiNodeLockWithKeyLists(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiThreadedPutGetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiThreadedPutGetSelfTest.java index 4533594ec3c48..830c1714d1db9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiThreadedPutGetSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiThreadedPutGetSelfTest.java @@ -121,6 +121,7 @@ public class GridCachePartitionedMultiThreadedPutGetSelfTest extends GridCommonA * * @throws Exception If failed. */ + @Test public void testPessimisticReadCommitted() throws Exception { doTest(PESSIMISTIC, READ_COMMITTED); } @@ -130,6 +131,7 @@ public void testPessimisticReadCommitted() throws Exception { * * @throws Exception If failed. */ + @Test public void testPessimisticRepeatableRead() throws Exception { doTest(PESSIMISTIC, REPEATABLE_READ); } @@ -139,6 +141,7 @@ public void testPessimisticRepeatableRead() throws Exception { * * @throws Exception If failed. */ + @Test public void testPessimisticSerializable() throws Exception { doTest(PESSIMISTIC, SERIALIZABLE); } @@ -148,6 +151,7 @@ public void testPessimisticSerializable() throws Exception { * * @throws Exception If failed. */ + @Test public void testOptimisticReadCommitted() throws Exception { doTest(OPTIMISTIC, READ_COMMITTED); } @@ -157,6 +161,7 @@ public void testOptimisticReadCommitted() throws Exception { * * @throws Exception If failed. */ + @Test public void testOptimisticRepeatableRead() throws Exception { doTest(OPTIMISTIC, REPEATABLE_READ); } @@ -166,6 +171,7 @@ public void testOptimisticRepeatableRead() throws Exception { * * @throws Exception If failed. */ + @Test public void testOptimisticSerializable() throws Exception { doTest(OPTIMISTIC, SERIALIZABLE); } @@ -207,4 +213,4 @@ private void doTest(final TransactionConcurrency concurrency, final TransactionI } }, THREAD_CNT); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedNodeRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedNodeRestartTest.java index d7a0cdda00ce5..cc119f81b8a85 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedNodeRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedNodeRestartTest.java @@ -57,77 +57,92 @@ public class GridCachePartitionedNodeRestartTest extends GridCacheAbstractNodeRe } /** {@inheritDoc} */ - @Override public void testRestart() throws Exception { + @Override @Test + public void testRestart() throws Exception { super.testRestart(); } /** {@inheritDoc} */ - @Override public void testRestartWithPutTwoNodesNoBackups() throws Throwable { + @Override @Test + public void testRestartWithPutTwoNodesNoBackups() throws Throwable { super.testRestartWithPutTwoNodesNoBackups(); } /** {@inheritDoc} */ - @Override public void testRestartWithPutTwoNodesOneBackup() throws Throwable { + @Override @Test + public void testRestartWithPutTwoNodesOneBackup() throws Throwable { super.testRestartWithPutTwoNodesOneBackup(); } /** {@inheritDoc} */ - @Override public void testRestartWithPutFourNodesNoBackups() throws Throwable { + @Override @Test + public void testRestartWithPutFourNodesNoBackups() throws Throwable { super.testRestartWithPutFourNodesNoBackups(); } /** {@inheritDoc} */ - @Override public void testRestartWithPutFourNodesOneBackups() throws Throwable { + @Override @Test + public void testRestartWithPutFourNodesOneBackups() throws Throwable { super.testRestartWithPutFourNodesOneBackups(); } /** {@inheritDoc} */ - @Override public void testRestartWithPutSixNodesTwoBackups() throws Throwable { + @Override @Test + public void testRestartWithPutSixNodesTwoBackups() throws Throwable { super.testRestartWithPutSixNodesTwoBackups(); } /** {@inheritDoc} */ - @Override public void testRestartWithPutEightNodesTwoBackups() throws Throwable { + @Override @Test + public void testRestartWithPutEightNodesTwoBackups() throws Throwable { super.testRestartWithPutEightNodesTwoBackups(); } /** {@inheritDoc} */ - @Override public void testRestartWithPutTenNodesTwoBackups() throws Throwable { + @Override @Test + public void testRestartWithPutTenNodesTwoBackups() throws Throwable { super.testRestartWithPutTenNodesTwoBackups(); } /** {@inheritDoc} */ - @Override public void testRestartWithTxEightNodesTwoBackups() throws Throwable { + @Override @Test + public void testRestartWithTxEightNodesTwoBackups() throws Throwable { super.testRestartWithTxEightNodesTwoBackups(); } /** {@inheritDoc} */ - @Override public void testRestartWithTxFourNodesNoBackups() throws Throwable { + @Override @Test + public void testRestartWithTxFourNodesNoBackups() throws Throwable { super.testRestartWithTxFourNodesNoBackups(); } /** {@inheritDoc} */ - @Override public void testRestartWithTxFourNodesOneBackups() throws Throwable { + @Override @Test + public void testRestartWithTxFourNodesOneBackups() throws Throwable { super.testRestartWithTxFourNodesOneBackups(); } /** {@inheritDoc} */ - @Override public void testRestartWithTxSixNodesTwoBackups() throws Throwable { + @Override @Test + public void testRestartWithTxSixNodesTwoBackups() throws Throwable { super.testRestartWithTxSixNodesTwoBackups(); } /** {@inheritDoc} */ - @Override public void testRestartWithTxTenNodesTwoBackups() throws Throwable { + @Override @Test + public void testRestartWithTxTenNodesTwoBackups() throws Throwable { super.testRestartWithTxTenNodesTwoBackups(); } /** {@inheritDoc} */ - @Override public void testRestartWithTxTwoNodesNoBackups() throws Throwable { + @Override @Test + public void testRestartWithTxTwoNodesNoBackups() throws Throwable { super.testRestartWithTxTwoNodesNoBackups(); } /** {@inheritDoc} */ - @Override public void testRestartWithTxTwoNodesOneBackup() throws Throwable { + @Override @Test + public void testRestartWithTxTwoNodesOneBackup() throws Throwable { super.testRestartWithTxTwoNodesOneBackup(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOptimisticTxNodeRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOptimisticTxNodeRestartTest.java index df9b27f771f19..99bdfe33eef86 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOptimisticTxNodeRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOptimisticTxNodeRestartTest.java @@ -77,69 +77,84 @@ protected boolean nearEnabled() { } /** {@inheritDoc} */ - @Override public void testRestart() throws Exception { + @Override @Test + public void testRestart() throws Exception { } /** {@inheritDoc} */ - @Override public void testRestartWithPutTwoNodesNoBackups() throws Throwable { + @Override @Test + public void testRestartWithPutTwoNodesNoBackups() throws Throwable { } /** {@inheritDoc} */ - @Override public void testRestartWithPutTwoNodesOneBackup() throws Throwable { + @Override @Test + public void testRestartWithPutTwoNodesOneBackup() throws Throwable { } /** {@inheritDoc} */ - @Override public void testRestartWithPutFourNodesNoBackups() throws Throwable { + @Override @Test + public void testRestartWithPutFourNodesNoBackups() throws Throwable { } /** {@inheritDoc} */ - @Override public void testRestartWithPutFourNodesOneBackups() throws Throwable { + @Override @Test + public void testRestartWithPutFourNodesOneBackups() throws Throwable { } /** {@inheritDoc} */ - @Override public void testRestartWithPutSixNodesTwoBackups() throws Throwable { + @Override @Test + public void testRestartWithPutSixNodesTwoBackups() throws Throwable { } /** {@inheritDoc} */ - @Override public void testRestartWithPutEightNodesTwoBackups() throws Throwable { + @Override @Test + public void testRestartWithPutEightNodesTwoBackups() throws Throwable { } /** {@inheritDoc} */ - @Override public void testRestartWithPutTenNodesTwoBackups() throws Throwable { + @Override @Test + public void testRestartWithPutTenNodesTwoBackups() throws Throwable { } /** {@inheritDoc} */ - @Override public void testRestartWithTxEightNodesTwoBackups() throws Throwable { + @Override @Test + public void testRestartWithTxEightNodesTwoBackups() throws Throwable { super.testRestartWithTxEightNodesTwoBackups(); } /** {@inheritDoc} */ - @Override public void testRestartWithTxFourNodesNoBackups() throws Throwable { + @Override @Test + public void testRestartWithTxFourNodesNoBackups() throws Throwable { super.testRestartWithTxFourNodesNoBackups(); } /** {@inheritDoc} */ - @Override public void testRestartWithTxFourNodesOneBackups() throws Throwable { + @Override @Test + public void testRestartWithTxFourNodesOneBackups() throws Throwable { super.testRestartWithTxFourNodesOneBackups(); } /** {@inheritDoc} */ - @Override public void testRestartWithTxSixNodesTwoBackups() throws Throwable { + @Override @Test + public void testRestartWithTxSixNodesTwoBackups() throws Throwable { super.testRestartWithTxSixNodesTwoBackups(); } /** {@inheritDoc} */ - @Override public void testRestartWithTxTenNodesTwoBackups() throws Throwable { + @Override @Test + public void testRestartWithTxTenNodesTwoBackups() throws Throwable { super.testRestartWithTxTenNodesTwoBackups(); } /** {@inheritDoc} */ - @Override public void testRestartWithTxTwoNodesNoBackups() throws Throwable { + @Override @Test + public void testRestartWithTxTwoNodesNoBackups() throws Throwable { super.testRestartWithTxTwoNodesNoBackups(); } /** {@inheritDoc} */ - @Override public void testRestartWithTxTwoNodesOneBackup() throws Throwable { + @Override @Test + public void testRestartWithTxTwoNodesOneBackup() throws Throwable { super.testRestartWithTxTwoNodesOneBackup(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedPreloadLifecycleSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedPreloadLifecycleSelfTest.java index 7f25cba1b2674..0769ed582f676 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedPreloadLifecycleSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedPreloadLifecycleSelfTest.java @@ -156,6 +156,7 @@ public void checkCache(Object[] keys) throws Exception { /** * @throws Exception If failed. */ + @Test public void testLifecycleBean1() throws Exception { checkCache(keys(true, DFLT_KEYS.length, DFLT_KEYS)); } @@ -163,6 +164,7 @@ public void testLifecycleBean1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLifecycleBean2() throws Exception { checkCache(keys(false, DFLT_KEYS.length, DFLT_KEYS)); } @@ -170,6 +172,7 @@ public void testLifecycleBean2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLifecycleBean3() throws Exception { checkCache(keys(true, 500)); } @@ -177,6 +180,7 @@ public void testLifecycleBean3() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLifecycleBean4() throws Exception { checkCache(keys(false, 500)); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedStorePutSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedStorePutSelfTest.java index 96d4603fb3cc0..879674c2a9727 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedStorePutSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedStorePutSelfTest.java @@ -108,6 +108,7 @@ private CacheConfiguration cacheConfiguration() { /** * @throws Exception If failed. */ + @Test public void testPutx() throws Throwable { info("Putting to the first node."); @@ -143,4 +144,4 @@ private static class TestStore extends CacheStoreAdapter { // No-op } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxMultiNodeSelfTest.java index fd4108c90c137..9c06b9181343a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxMultiNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxMultiNodeSelfTest.java @@ -45,37 +45,44 @@ public class GridCachePartitionedTxMultiNodeSelfTest extends IgniteTxMultiNodeAb } /** {@inheritDoc} */ - @Override public void testPutOneEntryInTx() throws Exception { + @Override @Test + public void testPutOneEntryInTx() throws Exception { super.testPutOneEntryInTx(); } /** {@inheritDoc} */ - @Override public void testPutOneEntryInTxMultiThreaded() throws Exception { + @Override @Test + public void testPutOneEntryInTxMultiThreaded() throws Exception { super.testPutOneEntryInTxMultiThreaded(); } /** {@inheritDoc} */ - @Override public void testPutTwoEntriesInTx() throws Exception { + @Override @Test + public void testPutTwoEntriesInTx() throws Exception { super.testPutTwoEntriesInTx(); } /** {@inheritDoc} */ - @Override public void testPutTwoEntryInTxMultiThreaded() throws Exception { + @Override @Test + public void testPutTwoEntryInTxMultiThreaded() throws Exception { super.testPutTwoEntryInTxMultiThreaded(); } /** {@inheritDoc} */ - @Override public void testRemoveInTxQueried() throws Exception { + @Override @Test + public void testRemoveInTxQueried() throws Exception { super.testRemoveInTxQueried(); } /** {@inheritDoc} */ - @Override public void testRemoveInTxQueriedMultiThreaded() throws Exception { + @Override @Test + public void testRemoveInTxQueriedMultiThreaded() throws Exception { super.testRemoveInTxQueriedMultiThreaded(); } /** {@inheritDoc} */ - @Override public void testRemoveInTxSimple() throws Exception { + @Override @Test + public void testRemoveInTxSimple() throws Exception { super.testRemoveInTxSimple(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxSalvageSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxSalvageSelfTest.java index 2e4ad92351a30..8637fe5439a41 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxSalvageSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxSalvageSelfTest.java @@ -123,6 +123,7 @@ public class GridCachePartitionedTxSalvageSelfTest extends GridCommonAbstractTes /** * @throws Exception If failed. */ + @Test public void testOptimisticTxSalvageBeforeTimeout() throws Exception { checkSalvageBeforeTimeout(OPTIMISTIC, true); } @@ -130,6 +131,7 @@ public void testOptimisticTxSalvageBeforeTimeout() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticcTxSalvageBeforeTimeout() throws Exception { checkSalvageBeforeTimeout(PESSIMISTIC, false); } @@ -137,6 +139,7 @@ public void testPessimisticcTxSalvageBeforeTimeout() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOptimisticTxSalvageAfterTimeout() throws Exception { checkSalvageAfterTimeout(OPTIMISTIC, true); } @@ -144,6 +147,7 @@ public void testOptimisticTxSalvageAfterTimeout() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticTxSalvageAfterTimeout() throws Exception { checkSalvageAfterTimeout(PESSIMISTIC, false); } @@ -263,4 +267,4 @@ private void checkTxsNotEmpty(GridCacheContext ctx, int exp) { assertEquals("Some transactions were salvaged unexpectedly", exp, size); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePutArrayValueSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePutArrayValueSelfTest.java index 7ee83e816279c..bb9b000df2dad 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePutArrayValueSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePutArrayValueSelfTest.java @@ -60,6 +60,7 @@ public class GridCachePutArrayValueSelfTest extends GridCacheAbstractSelfTest { /** * @throws Exception If failed. */ + @Test public void testInternalKeys() throws Exception { assert gridCount() >= 2; @@ -126,4 +127,4 @@ public InternalKey(long key) { return S.toString(InternalKey.class, this); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheRendezvousAffinityClientSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheRendezvousAffinityClientSelfTest.java index 51c2fc249e728..25cad8384754a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheRendezvousAffinityClientSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheRendezvousAffinityClientSelfTest.java @@ -63,6 +63,7 @@ public class GridCacheRendezvousAffinityClientSelfTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + @Test public void testClientNode() throws Exception { try { client = true; @@ -111,4 +112,4 @@ public void testClientNode() throws Exception { stopAllGrids(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheStoreUpdateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheStoreUpdateTest.java index 02a9223f2c012..7fc2f405c4b35 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheStoreUpdateTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheStoreUpdateTest.java @@ -92,6 +92,7 @@ public class GridNearCacheStoreUpdateTest extends GridCommonAbstractTest { /** * @throws Exception If fail. */ + @Test public void testAtomicUpdateNear() throws Exception { cache = client.createCache(cacheConfiguration(), new NearCacheConfiguration()); @@ -101,6 +102,7 @@ public void testAtomicUpdateNear() throws Exception { /** * @throws Exception If fail. */ + @Test public void testTransactionAtomicUpdateNear() throws Exception { cache = client.createCache(cacheConfiguration(), new NearCacheConfiguration()); @@ -110,6 +112,7 @@ public void testTransactionAtomicUpdateNear() throws Exception { /** * @throws Exception If fail. */ + @Test public void testPessimisticRepeatableReadUpdateNear() throws Exception { cache = client.createCache(cacheConfiguration().setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL), new NearCacheConfiguration()); @@ -120,6 +123,7 @@ public void testPessimisticRepeatableReadUpdateNear() throws Exception { /** * @throws Exception If fail. */ + @Test public void testPessimisticReadCommittedUpdateNear() throws Exception { cache = client.createCache(cacheConfiguration().setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL), new NearCacheConfiguration()); @@ -130,6 +134,7 @@ public void testPessimisticReadCommittedUpdateNear() throws Exception { /** * @throws Exception If fail. */ + @Test public void testOptimisticSerializableUpdateNear() throws Exception { cache = client.createCache(cacheConfiguration().setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL), new NearCacheConfiguration()); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridPartitionedBackupLoadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridPartitionedBackupLoadSelfTest.java index f9c8ac0869de9..57c5e1c5fc07e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridPartitionedBackupLoadSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridPartitionedBackupLoadSelfTest.java @@ -101,6 +101,7 @@ private CacheConfiguration cacheConfiguration() { /** * @throws Exception If failed. */ + @Test public void testBackupLoad() throws Exception { grid(0).cache(DEFAULT_CACHE_NAME).put(1, 1); @@ -158,4 +159,4 @@ public Integer get(Integer key) { return map.get(key); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearOnlyTxTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearOnlyTxTest.java index ca12a9925ca99..1eb6c1c411976 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearOnlyTxTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearOnlyTxTest.java @@ -76,6 +76,7 @@ public class IgniteCacheNearOnlyTxTest extends IgniteCacheAbstractTest { /** * @throws Exception If failed. */ + @Test public void testNearOnlyPutMultithreaded() throws Exception { final Ignite ignite1 = ignite(1); @@ -113,6 +114,7 @@ public void testNearOnlyPutMultithreaded() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOptimisticTx() throws Exception { txMultithreaded(true); } @@ -120,6 +122,7 @@ public void testOptimisticTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticTx() throws Exception { txMultithreaded(false); } @@ -174,6 +177,7 @@ private void txMultithreaded(final boolean optimistic) throws Exception { /** * @throws Exception If failed. */ + @Test public void testConcurrentTx() throws Exception { final Ignite ignite1 = ignite(1); @@ -217,4 +221,4 @@ public void testConcurrentTx() throws Exception { fut1.get(); fut2.get(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearReadCommittedTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearReadCommittedTest.java index ad9bce047b2b2..2707028016517 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearReadCommittedTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearReadCommittedTest.java @@ -51,6 +51,7 @@ public class IgniteCacheNearReadCommittedTest extends GridCacheAbstractSelfTest /** * @throws Exception If failed. */ + @Test public void testReadCommittedCacheCleanup() throws Exception { IgniteCache cache = ignite(0).cache(DEFAULT_CACHE_NAME); @@ -70,4 +71,4 @@ public void testReadCommittedCacheCleanup() throws Exception { assertEquals(0, cache.localSize(CachePeekMode.ALL)); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearTxRollbackTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearTxRollbackTest.java index 06b625681b1ab..e8d6d9ccd0a4a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearTxRollbackTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearTxRollbackTest.java @@ -74,6 +74,7 @@ public class IgniteCacheNearTxRollbackTest extends IgniteCacheAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPutAllRollback() throws Exception { IgniteCache cache = jcache(0); @@ -135,4 +136,4 @@ private static class TestCommunicationSpi extends TcpCommunicationSpi { super.sendMessage(node, msg, ackClosure); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NearCacheMultithreadedUpdateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NearCacheMultithreadedUpdateTest.java index 703da8a59c72b..41830a7577c8d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NearCacheMultithreadedUpdateTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NearCacheMultithreadedUpdateTest.java @@ -77,6 +77,7 @@ public class NearCacheMultithreadedUpdateTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testUpdateMultithreadedTx() throws Exception { updateMultithreaded(TRANSACTIONAL, false); } @@ -84,6 +85,7 @@ public void testUpdateMultithreadedTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUpdateMultithreadedTxRestart() throws Exception { updateMultithreaded(TRANSACTIONAL, true); } @@ -91,6 +93,7 @@ public void testUpdateMultithreadedTxRestart() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUpdateMultithreadedAtomic() throws Exception { updateMultithreaded(ATOMIC, false); } @@ -98,6 +101,7 @@ public void testUpdateMultithreadedAtomic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUpdateMultithreadedAtomicRestart() throws Exception { updateMultithreaded(ATOMIC, true); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NearCachePutAllMultinodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NearCachePutAllMultinodeTest.java index ca60060775b15..4159fe29a67f3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NearCachePutAllMultinodeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NearCachePutAllMultinodeTest.java @@ -112,6 +112,7 @@ public class NearCachePutAllMultinodeTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testMultithreadedPutAll() throws Exception { final AtomicInteger idx = new AtomicInteger(); @@ -163,4 +164,4 @@ static class TestFactory implements Factory { }; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NearCacheSyncUpdateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NearCacheSyncUpdateTest.java index e1ca01f8ea2ac..25700157c3f7c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NearCacheSyncUpdateTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NearCacheSyncUpdateTest.java @@ -71,6 +71,7 @@ public class NearCacheSyncUpdateTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testNearCacheSyncUpdateAtomic() throws Exception { nearCacheSyncUpdateTx(ATOMIC); } @@ -78,6 +79,7 @@ public void testNearCacheSyncUpdateAtomic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNearCacheSyncUpdateTx() throws Exception { nearCacheSyncUpdateTx(TRANSACTIONAL); } @@ -85,6 +87,7 @@ public void testNearCacheSyncUpdateTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNearCacheSyncUpdateMvccTx() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-7187"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NoneRebalanceModeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NoneRebalanceModeSelfTest.java index 109dbff5477a4..19cd3c609bb4a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NoneRebalanceModeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NoneRebalanceModeSelfTest.java @@ -60,6 +60,7 @@ public class NoneRebalanceModeSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRemoveAll() throws Exception { GridNearTransactionalCache cache = (GridNearTransactionalCache)((IgniteKernal)grid(0)).internalCache(DEFAULT_CACHE_NAME); @@ -68,4 +69,4 @@ public void testRemoveAll() throws Exception { grid(0).cache(DEFAULT_CACHE_NAME).removeAll(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/CacheManualRebalancingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/CacheManualRebalancingTest.java index eb090a8e9260d..fcf5f355462e7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/CacheManualRebalancingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/CacheManualRebalancingTest.java @@ -90,6 +90,7 @@ private static CacheConfiguration cacheConfiguration() { /** * @throws Exception If failed. */ + @Test public void testRebalance() throws Exception { // Fill cache with large dataset to make rebalancing slow. try (IgniteDataStreamer streamer = grid(0).dataStreamer(MYCACHE)) { @@ -143,7 +144,7 @@ public static class MyCallable implements IgniteRunnable { assertNotNull(cache); boolean finished; - + log.info("Start rebalancing cache: " + cacheName + ", size: " + cache.localSize()); do { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/CacheNodeSafeAssertion.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/CacheNodeSafeAssertion.java index bf6b63fa7639e..752fc0971b27d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/CacheNodeSafeAssertion.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/CacheNodeSafeAssertion.java @@ -56,7 +56,8 @@ protected Ignite ignite() { } /** {@inheritDoc} */ - @Override public void test() throws AssertionError { + @Override @Test + public void test() throws AssertionError { Affinity affinity = ignite.affinity(cacheName); int partCnt = affinity.partitions(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRabalancingDelayedPartitionMapExchangeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRabalancingDelayedPartitionMapExchangeSelfTest.java index 96127aa5cd0f5..4ab4003f243ea 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRabalancingDelayedPartitionMapExchangeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRabalancingDelayedPartitionMapExchangeSelfTest.java @@ -119,6 +119,7 @@ public class DelayableCommunicationSpi extends TcpCommunicationSpi { /** * @throws Exception e if failed. */ + @Test public void test() throws Exception { IgniteEx ignite = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingAsyncSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingAsyncSelfTest.java index 0a8698a597cd8..52bb6ac27b8d6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingAsyncSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingAsyncSelfTest.java @@ -43,6 +43,7 @@ public class GridCacheRebalancingAsyncSelfTest extends GridCacheRebalancingSyncS /** * @throws Exception Exception. */ + @Test public void testNodeFailedAtRebalancing() throws Exception { IgniteEx ignite = startGrid(0); @@ -65,4 +66,4 @@ public void testNodeFailedAtRebalancing() throws Exception { checkSupplyContextMapIsEmpty(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingCancelTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingCancelTest.java index 3965290480a3d..2ee5a44236427 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingCancelTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingCancelTest.java @@ -62,6 +62,7 @@ public class GridCacheRebalancingCancelTest extends GridCommonAbstractTest { * * @throws Exception Exception. */ + @Test public void testClientNodeJoinAtRebalancing() throws Exception { final IgniteEx ignite0 = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingOrderingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingOrderingTest.java index d3a08070c2fa0..3965f73913926 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingOrderingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingOrderingTest.java @@ -268,6 +268,7 @@ private ServerStarter startServers() throws Exception { /** * @throws Exception If failed. */ + @Test public void testEvents() throws Exception { Ignite ignite = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionCountersTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionCountersTest.java index 258e36e531322..26cb20e803763 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionCountersTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionCountersTest.java @@ -93,6 +93,7 @@ private boolean contains(int[] arr, int a) { /** * Tests that after rebalancing all partition update counters have the same value on all nodes. */ + @Test public void test() throws Exception { IgniteEx ignite = (IgniteEx)startGrids(3); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionDistributionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionDistributionTest.java index f0cbd3885ac2d..9712616989d5d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionDistributionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionDistributionTest.java @@ -60,6 +60,7 @@ public class GridCacheRebalancingPartitionDistributionTest extends GridRollingRe * The test performs rolling restart and checks no server drops out and the partitions are balanced during * redistribution. */ + @Test public void testRollingRestart() throws InterruptedException { awaitPartitionMapExchange(); @@ -115,7 +116,8 @@ public FairDistributionAssertion() { } /** {@inheritDoc} */ - @Override public void test() throws AssertionError { + @Override @Test + public void test() throws AssertionError { super.test(); Affinity affinity = ignite().affinity(CACHE_NAME); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingSyncCheckDataTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingSyncCheckDataTest.java index 8a43b65d75a70..99ece5dfc78b4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingSyncCheckDataTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingSyncCheckDataTest.java @@ -57,6 +57,7 @@ public class GridCacheRebalancingSyncCheckDataTest extends GridCommonAbstractTes /** * @throws Exception If failed. */ + @Test public void testDataRebalancing() throws Exception { Ignite ignite = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingSyncSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingSyncSelfTest.java index a95ad43152d04..653f7d65de742 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingSyncSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingSyncSelfTest.java @@ -254,6 +254,7 @@ protected void checkData(Ignite ignite, String name, int from, int iter, boolean /** * @throws Exception If failed. */ + @Test public void testSimpleRebalancing() throws Exception { IgniteKernal ignite = (IgniteKernal)startGrid(0); @@ -305,6 +306,7 @@ public void testSimpleRebalancing() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLoadRebalancing() throws Exception { final Ignite ignite = startGrid(0); @@ -492,6 +494,7 @@ protected void awaitPartitionMessagesAbsent() throws Exception { /** * @throws Exception If failed. */ + @Test public void testComplexRebalancing() throws Exception { final Ignite ignite = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingUnmarshallingFailedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingUnmarshallingFailedSelfTest.java index 6d72a52b362de..9bc47e664dbd4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingUnmarshallingFailedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingUnmarshallingFailedSelfTest.java @@ -118,6 +118,7 @@ public TestKey() { /** * @throws Exception e. */ + @Test public void test() throws Exception { String marshClsName = GridTestProperties.getProperty(GridTestProperties.MARSH_CLASS_NAME); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingWithAsyncClearingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingWithAsyncClearingTest.java index 328653de64690..1f6d6963efe36 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingWithAsyncClearingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingWithAsyncClearingTest.java @@ -98,6 +98,7 @@ public class GridCacheRebalancingWithAsyncClearingTest extends GridCommonAbstrac * * @throws Exception If failed. */ + @Test public void testPartitionClearingNotBlockExchange() throws Exception { System.setProperty(IgniteSystemProperties.IGNITE_PDS_MAX_CHECKPOINT_MEMORY_HISTORY_SIZE, "1"); @@ -194,6 +195,7 @@ public void testPartitionClearingNotBlockExchange() throws Exception { * * @throws Exception If failed. */ + @Test public void testCorrectRebalancingCurrentlyRentingPartitions() throws Exception { IgniteEx ignite = (IgniteEx) startGrids(3); ignite.cluster().active(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedLockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedLockSelfTest.java index 0595f7d1a3285..dd8b52dc032fe 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedLockSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedLockSelfTest.java @@ -32,7 +32,8 @@ public class GridCacheReplicatedLockSelfTest extends GridCacheLockAbstractTest { } /** {@inheritDoc} */ - @Override public void testLockReentrancy() throws Throwable { + @Override @Test + public void testLockReentrancy() throws Throwable { fail("https://issues.apache.org/jira/browse/IGNITE-835"); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedNodeRestartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedNodeRestartSelfTest.java index bff8755218786..6c1e91e019e7e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedNodeRestartSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedNodeRestartSelfTest.java @@ -55,82 +55,98 @@ public class GridCacheReplicatedNodeRestartSelfTest extends GridCacheAbstractNod } /** {@inheritDoc} */ - @Override public void testRestartWithPutTwoNodesNoBackups() throws Throwable { + @Override @Test + public void testRestartWithPutTwoNodesNoBackups() throws Throwable { super.testRestartWithPutTwoNodesNoBackups(); } /** {@inheritDoc} */ - @Override public void testRestartWithPutTwoNodesOneBackup() throws Throwable { + @Override @Test + public void testRestartWithPutTwoNodesOneBackup() throws Throwable { // No-op. } /** {@inheritDoc} */ - @Override public void testRestartWithPutFourNodesOneBackups() throws Throwable { + @Override @Test + public void testRestartWithPutFourNodesOneBackups() throws Throwable { super.testRestartWithPutFourNodesOneBackups(); } /** {@inheritDoc} */ - @Override public void testRestartWithPutFourNodesNoBackups() throws Throwable { + @Override @Test + public void testRestartWithPutFourNodesNoBackups() throws Throwable { // No-op. } /** {@inheritDoc} */ - @Override public void testRestartWithPutSixNodesTwoBackups() throws Throwable { + @Override @Test + public void testRestartWithPutSixNodesTwoBackups() throws Throwable { super.testRestartWithPutSixNodesTwoBackups(); } /** {@inheritDoc} */ - @Override public void testRestartWithPutEightNodesTwoBackups() throws Throwable { + @Override @Test + public void testRestartWithPutEightNodesTwoBackups() throws Throwable { super.testRestartWithPutEightNodesTwoBackups(); } /** {@inheritDoc} */ - @Override public void testRestartWithPutTenNodesTwoBackups() throws Throwable { + @Override @Test + public void testRestartWithPutTenNodesTwoBackups() throws Throwable { super.testRestartWithPutTenNodesTwoBackups(); } /** {@inheritDoc} */ - @Override public void testRestartWithTxTwoNodesNoBackups() throws Throwable { + @Override @Test + public void testRestartWithTxTwoNodesNoBackups() throws Throwable { // No-op. } /** {@inheritDoc} */ - @Override public void testRestartWithTxTwoNodesOneBackup() throws Throwable { + @Override @Test + public void testRestartWithTxTwoNodesOneBackup() throws Throwable { super.testRestartWithTxTwoNodesOneBackup(); } /** {@inheritDoc} */ - @Override public void testRestartWithTxFourNodesOneBackups() throws Throwable { + @Override @Test + public void testRestartWithTxFourNodesOneBackups() throws Throwable { super.testRestartWithTxFourNodesOneBackups(); } /** {@inheritDoc} */ - @Override public void testRestartWithTxFourNodesNoBackups() throws Throwable { + @Override @Test + public void testRestartWithTxFourNodesNoBackups() throws Throwable { // No-op. } /** {@inheritDoc} */ - @Override public void testRestartWithTxSixNodesTwoBackups() throws Throwable { + @Override @Test + public void testRestartWithTxSixNodesTwoBackups() throws Throwable { super.testRestartWithTxSixNodesTwoBackups(); } /** {@inheritDoc} */ - @Override public void testRestartWithTxEightNodesTwoBackups() throws Throwable { + @Override @Test + public void testRestartWithTxEightNodesTwoBackups() throws Throwable { super.testRestartWithTxEightNodesTwoBackups(); } /** {@inheritDoc} */ - @Override public void testRestartWithTxTenNodesTwoBackups() throws Throwable { + @Override @Test + public void testRestartWithTxTenNodesTwoBackups() throws Throwable { super.testRestartWithTxTenNodesTwoBackups(); } /** {@inheritDoc} */ - @Override public void testRestartWithTxPutAllTenNodesTwoBackups() throws Throwable { + @Override @Test + public void testRestartWithTxPutAllTenNodesTwoBackups() throws Throwable { super.testRestartWithTxPutAllTenNodesTwoBackups(); } /** {@inheritDoc} */ - @Override public void testRestartWithTxPutAllFourNodesTwoBackups() throws Throwable { + @Override @Test + public void testRestartWithTxPutAllFourNodesTwoBackups() throws Throwable { super.testRestartWithTxPutAllFourNodesTwoBackups(); } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedTxMultiNodeBasicTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedTxMultiNodeBasicTest.java index ae97c0b15ed4b..9003669ab6fde 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedTxMultiNodeBasicTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedTxMultiNodeBasicTest.java @@ -44,37 +44,44 @@ public class GridCacheReplicatedTxMultiNodeBasicTest extends IgniteTxMultiNodeAb } /** {@inheritDoc} */ - @Override public void testPutOneEntryInTx() throws Exception { + @Override @Test + public void testPutOneEntryInTx() throws Exception { super.testPutOneEntryInTx(); } /** {@inheritDoc} */ - @Override public void testPutTwoEntriesInTx() throws Exception { + @Override @Test + public void testPutTwoEntriesInTx() throws Exception { super.testPutTwoEntriesInTx(); } /** {@inheritDoc} */ - @Override public void testPutOneEntryInTxMultiThreaded() throws Exception { + @Override @Test + public void testPutOneEntryInTxMultiThreaded() throws Exception { super.testPutOneEntryInTxMultiThreaded(); } /** {@inheritDoc} */ - @Override public void testPutTwoEntryInTxMultiThreaded() throws Exception { + @Override @Test + public void testPutTwoEntryInTxMultiThreaded() throws Exception { super.testPutTwoEntryInTxMultiThreaded(); } /** {@inheritDoc} */ - @Override public void testRemoveInTxQueried() throws Exception { + @Override @Test + public void testRemoveInTxQueried() throws Exception { super.testRemoveInTxQueried(); } /** {@inheritDoc} */ - @Override public void testRemoveInTxSimple() throws Exception { + @Override @Test + public void testRemoveInTxSimple() throws Exception { super.testRemoveInTxSimple(); } /** {@inheritDoc} */ - @Override public void testRemoveInTxQueriedMultiThreaded() throws Exception { + @Override @Test + public void testRemoveInTxQueriedMultiThreaded() throws Exception { super.testRemoveInTxQueriedMultiThreaded(); } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheSyncReplicatedPreloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheSyncReplicatedPreloadSelfTest.java index e55a43497dc42..566703285cd2d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheSyncReplicatedPreloadSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheSyncReplicatedPreloadSelfTest.java @@ -86,6 +86,7 @@ public GridCacheSyncReplicatedPreloadSelfTest() { * @throws Exception If test failed. */ @SuppressWarnings({"TooBroadScope"}) + @Test public void testNodeRestart() throws Exception { int keyCnt = 1000; int retries = 20; @@ -116,6 +117,7 @@ public void testNodeRestart() throws Exception { * @throws Exception If test failed. */ @SuppressWarnings({"TooBroadScope"}) + @Test public void testNodeRestartMultithreaded() throws Exception { final int keyCnt = 1000; final int retries = 50; @@ -157,4 +159,4 @@ public void testNodeRestartMultithreaded() throws Exception { }, threadCnt); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridReplicatedTxPreloadTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridReplicatedTxPreloadTest.java index 393cfb93b0386..49874a1c15d5d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridReplicatedTxPreloadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridReplicatedTxPreloadTest.java @@ -38,7 +38,8 @@ public class GridReplicatedTxPreloadTest extends IgniteTxPreloadAbstractTest { } /** {@inheritDoc} */ - @Override public void testLocalTxPreloadingOptimistic() throws Exception { + @Override @Test + public void testLocalTxPreloadingOptimistic() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-1755"); } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheSyncRebalanceModeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheSyncRebalanceModeSelfTest.java index 8f96639e5302d..db03d272e8665 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheSyncRebalanceModeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheSyncRebalanceModeSelfTest.java @@ -60,6 +60,7 @@ public class IgniteCacheSyncRebalanceModeSelfTest extends GridCommonAbstractTest /** * @throws Exception if failed. */ + @Test public void testStaticCache() throws Exception { IgniteEx ignite = startGrid(0); @@ -85,6 +86,7 @@ public void testStaticCache() throws Exception { /** * @throws Exception if failed. */ + @Test public void testDynamicCache() throws Exception { IgniteEx ignite = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadLifecycleSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadLifecycleSelfTest.java index dee3b5eca9a02..8d7ac5de8b854 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadLifecycleSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadLifecycleSelfTest.java @@ -159,6 +159,7 @@ public void checkCache(Object[] keys) throws Exception { /** * @throws Exception If failed. */ + @Test public void testLifecycleBean1() throws Exception { checkCache(keys(true, DFLT_KEYS.length, DFLT_KEYS)); } @@ -166,6 +167,7 @@ public void testLifecycleBean1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLifecycleBean2() throws Exception { checkCache(keys(false, DFLT_KEYS.length, DFLT_KEYS)); } @@ -173,6 +175,7 @@ public void testLifecycleBean2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLifecycleBean3() throws Exception { checkCache(keys(true, 500)); } @@ -180,6 +183,7 @@ public void testLifecycleBean3() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLifecycleBean4() throws Exception { checkCache(keys(false, 500)); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadSelfTest.java index 8101172e45aeb..33e94253fa438 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadSelfTest.java @@ -214,6 +214,7 @@ private void loadExternalClassesToCfg(CacheConfiguration cacheCfg) { /** * @throws Exception If failed. */ + @Test public void testSingleNode() throws Exception { preloadMode = SYNC; @@ -228,6 +229,7 @@ public void testSingleNode() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testIntegrity() throws Exception { preloadMode = SYNC; @@ -303,6 +305,7 @@ public void testIntegrity() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testDeployment() throws Exception { // TODO GG-11141. if (true) @@ -381,6 +384,7 @@ public void testDeployment() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testExternalClassesAtConfiguration() throws Exception { try { extClassloadingAtCfg = true; @@ -436,6 +440,7 @@ public void testExternalClassesAtConfiguration() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testExternalClassesAtConfigurationDynamicStart() throws Exception { try { extClassloadingAtCfg = false; @@ -474,6 +479,7 @@ public void testExternalClassesAtConfigurationDynamicStart() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testExternalClassesAtConfigurationDynamicStart2() throws Exception { try { extClassloadingAtCfg = false; @@ -512,6 +518,7 @@ public void testExternalClassesAtConfigurationDynamicStart2() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testExternalClassesAtMessage() throws Exception { try { useExtClassLoader = true; @@ -564,6 +571,7 @@ public void testExternalClassesAtMessage() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testExternalClassesAtEventP2pDisabled() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_EVENTS); @@ -573,6 +581,7 @@ public void testExternalClassesAtEventP2pDisabled() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testExternalClassesAtEvent() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_EVENTS); @@ -622,6 +631,7 @@ private void testExternalClassesAtEvent0(boolean p2p) throws Exception { /** * @throws Exception If test failed. */ + @Test public void testSync() throws Exception { preloadMode = SYNC; batchSize = 512; @@ -646,6 +656,7 @@ public void testSync() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testAsync() throws Exception { preloadMode = ASYNC; batchSize = 256; @@ -680,6 +691,7 @@ public void testAsync() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testBatchSize1() throws Exception { preloadMode = SYNC; batchSize = 1; // 1 byte but one entry should be in batch anyway. @@ -704,6 +716,7 @@ public void testBatchSize1() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testBatchSize1000() throws Exception { preloadMode = SYNC; batchSize = 1000; // 1000 bytes. @@ -728,6 +741,7 @@ public void testBatchSize1000() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testBatchSize10000() throws Exception { preloadMode = SYNC; batchSize = 10000; // 10000 bytes. @@ -753,6 +767,7 @@ public void testBatchSize10000() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testMultipleNodes() throws Exception { preloadMode = ASYNC; batchSize = 256; @@ -822,6 +837,7 @@ assert grid(gridIdx).cache(DEFAULT_CACHE_NAME).localSize(CachePeekMode.ALL) == c /** * @throws Exception If test failed. */ + @Test public void testConcurrentStartSync() throws Exception { preloadMode = SYNC; batchSize = 10000; @@ -837,6 +853,7 @@ public void testConcurrentStartSync() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testConcurrentStartAsync() throws Exception { preloadMode = ASYNC; batchSize = 10000; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadStartStopEventsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadStartStopEventsSelfTest.java index 07c50d3786d5c..5ba832e4e8c20 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadStartStopEventsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadStartStopEventsSelfTest.java @@ -64,6 +64,7 @@ public class GridCacheReplicatedPreloadStartStopEventsSelfTest extends GridCommo /** * @throws Exception If failed. */ + @Test public void testStartStopEvents() throws Exception { Ignite ignite = startGrid(0); @@ -92,4 +93,4 @@ else if (e.type() == EVT_CACHE_REBALANCE_STOPPED) assertTrue("Unexpected start count: " + preloadStartCnt.get(), preloadStartCnt.get() <= 1); assertTrue("Unexpected stop count: " + preloadStopCnt.get(), preloadStopCnt.get() <= 1); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/DhtAndNearEvictionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/DhtAndNearEvictionTest.java index 84434696c9179..69edc6bd662b0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/DhtAndNearEvictionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/DhtAndNearEvictionTest.java @@ -84,6 +84,7 @@ public class DhtAndNearEvictionTest extends GridCommonAbstractTest { *
  • backups=1
  • * */ + @Test public void testConcurrentWritesAndReadsWithReadThrough() throws Exception { startGrid(0); startGrid(1); @@ -136,6 +137,7 @@ public void testConcurrentWritesAndReadsWithReadThrough() throws Exception { /** * Checking rebalancing which used to be affected by IGNITE-9315. */ + @Test public void testRebalancing() throws Exception { Ignite grid0 = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/EvictionAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/EvictionAbstractTest.java index fa27cc8385624..37f111765a9c5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/EvictionAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/EvictionAbstractTest.java @@ -147,6 +147,7 @@ public abstract class EvictionAbstractTest> /** * @throws Exception If failed. */ + @Test public void testMaxSizePolicy() throws Exception { plcMax = 3; plcMaxMemSize = 0; @@ -158,6 +159,7 @@ public void testMaxSizePolicy() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMaxSizePolicyWithBatch() throws Exception { plcMax = 3; plcMaxMemSize = 0; @@ -169,6 +171,7 @@ public void testMaxSizePolicyWithBatch() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMaxMemSizePolicy() throws Exception { plcMax = 0; plcMaxMemSize = 3 * MockEntry.ENTRY_SIZE; @@ -182,6 +185,7 @@ public void testMaxMemSizePolicy() throws Exception { * * @throws Exception If failed. */ + @Test public void testMaxMemSizePolicyWithBatch() throws Exception { plcMax = 3; plcMaxMemSize = 10 * MockEntry.ENTRY_SIZE; @@ -193,6 +197,7 @@ public void testMaxMemSizePolicyWithBatch() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMaxSizeMemory() throws Exception { int max = 10; @@ -206,6 +211,7 @@ public void testMaxSizeMemory() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMaxSizeMemoryWithBatch() throws Exception { int max = 10; @@ -219,6 +225,7 @@ public void testMaxSizeMemoryWithBatch() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMaxMemSizeMemory() throws Exception { int max = 10; @@ -232,6 +239,7 @@ public void testMaxMemSizeMemory() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMaxSizeRandom() throws Exception { plcMax = 10; plcMaxMemSize = 0; @@ -243,6 +251,7 @@ public void testMaxSizeRandom() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMaxSizeRandomWithBatch() throws Exception { plcMax = 10; plcMaxMemSize = 0; @@ -254,6 +263,7 @@ public void testMaxSizeRandomWithBatch() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMaxMemSizeRandom() throws Exception { plcMax = 0; plcMaxMemSize = 10 * MockEntry.KEY_SIZE; @@ -265,6 +275,7 @@ public void testMaxMemSizeRandom() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMaxSizeAllowEmptyEntries() throws Exception { plcMax = 10; plcMaxMemSize = 0; @@ -276,6 +287,7 @@ public void testMaxSizeAllowEmptyEntries() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMaxSizeAllowEmptyEntriesWithBatch() throws Exception { plcMax = 10; plcMaxMemSize = 0; @@ -287,6 +299,7 @@ public void testMaxSizeAllowEmptyEntriesWithBatch() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMaxMemSizeAllowEmptyEntries() throws Exception { plcMax = 0; plcMaxMemSize = 10 * MockEntry.KEY_SIZE; @@ -298,6 +311,7 @@ public void testMaxMemSizeAllowEmptyEntries() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMaxSizePut() throws Exception { plcMax = 100; plcBatchSize = 1; @@ -309,6 +323,7 @@ public void testMaxSizePut() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMaxSizePutWithBatch() throws Exception { plcMax = 100; plcBatchSize = 2; @@ -320,6 +335,7 @@ public void testMaxSizePutWithBatch() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMaxMemSizePut() throws Exception { int max = 100; @@ -653,6 +669,7 @@ protected static String string(Iterable c) { } /** @throws Exception If failed. */ + @Test public void testMaxSizePartitionedNearDisabled() throws Exception { mode = PARTITIONED; nearEnabled = false; @@ -665,6 +682,7 @@ public void testMaxSizePartitionedNearDisabled() throws Exception { } /** @throws Exception If failed. */ + @Test public void testMaxSizePartitionedNearDisabledWithBatch() throws Exception { mode = PARTITIONED; nearEnabled = false; @@ -678,6 +696,7 @@ public void testMaxSizePartitionedNearDisabledWithBatch() throws Exception { } /** @throws Exception If failed. */ + @Test public void testMaxMemSizePartitionedNearDisabled() throws Exception { mode = PARTITIONED; nearEnabled = false; @@ -691,6 +710,7 @@ public void testMaxMemSizePartitionedNearDisabled() throws Exception { } /** @throws Exception If failed. */ + @Test public void testPartitionedNearEnabled() throws Exception { mode = PARTITIONED; nearEnabled = true; @@ -704,6 +724,7 @@ public void testPartitionedNearEnabled() throws Exception { } /** @throws Exception If failed. */ + @Test public void testPartitionedNearDisabledMultiThreaded() throws Exception { mode = PARTITIONED; nearEnabled = false; @@ -715,6 +736,7 @@ public void testPartitionedNearDisabledMultiThreaded() throws Exception { } /** @throws Exception If failed. */ + @Test public void testPartitionedNearEnabledMultiThreaded() throws Exception { mode = PARTITIONED; nearEnabled = true; @@ -1027,4 +1049,4 @@ public Collection queue() { } } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/EvictionPolicyFactoryAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/EvictionPolicyFactoryAbstractTest.java index 5c7404248130b..f111ac5715267 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/EvictionPolicyFactoryAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/EvictionPolicyFactoryAbstractTest.java @@ -161,6 +161,7 @@ public abstract class EvictionPolicyFactoryAbstractTest c) { } /** @throws Exception If failed. */ + @Test public void testMaxSizePartitionedNearDisabled() throws Exception { mode = PARTITIONED; nearEnabled = false; @@ -693,6 +710,7 @@ public void testMaxSizePartitionedNearDisabled() throws Exception { } /** @throws Exception If failed. */ + @Test public void testMaxSizePartitionedNearDisabledWithBatch() throws Exception { mode = PARTITIONED; nearEnabled = false; @@ -706,6 +724,7 @@ public void testMaxSizePartitionedNearDisabledWithBatch() throws Exception { } /** @throws Exception If failed. */ + @Test public void testMaxMemSizePartitionedNearDisabled() throws Exception { mode = PARTITIONED; nearEnabled = false; @@ -719,6 +738,7 @@ public void testMaxMemSizePartitionedNearDisabled() throws Exception { } /** @throws Exception If failed. */ + @Test public void testPartitionedNearEnabled() throws Exception { mode = PARTITIONED; nearEnabled = true; @@ -732,6 +752,7 @@ public void testPartitionedNearEnabled() throws Exception { } /** @throws Exception If failed. */ + @Test public void testPartitionedNearDisabledMultiThreaded() throws Exception { mode = PARTITIONED; nearEnabled = false; @@ -743,6 +764,7 @@ public void testPartitionedNearDisabledMultiThreaded() throws Exception { } /** @throws Exception If failed. */ + @Test public void testPartitionedNearEnabledMultiThreaded() throws Exception { mode = PARTITIONED; nearEnabled = true; @@ -1067,4 +1089,4 @@ public Collection queue() { } } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionConsistencySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionConsistencySelfTest.java index 5ff0be23a5cf5..b392644c075f0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionConsistencySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionConsistencySelfTest.java @@ -105,6 +105,7 @@ public class GridCacheConcurrentEvictionConsistencySelfTest extends GridCommonAb /** * @throws Exception If failed. */ + @Test public void testPolicyConsistencyFifoLocalTwoKeys() throws Exception { FifoEvictionPolicy plc = new FifoEvictionPolicy<>(); plc.setMaxSize(1); @@ -120,6 +121,7 @@ public void testPolicyConsistencyFifoLocalTwoKeys() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPolicyConsistencyLruLocalTwoKeys() throws Exception { LruEvictionPolicy plc = new LruEvictionPolicy<>(); plc.setMaxSize(1); @@ -135,6 +137,7 @@ public void testPolicyConsistencyLruLocalTwoKeys() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPolicyConsistencySortedLocalTwoKeys() throws Exception { SortedEvictionPolicy plc = new SortedEvictionPolicy<>(); plc.setMaxSize(1); @@ -150,6 +153,7 @@ public void testPolicyConsistencySortedLocalTwoKeys() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPolicyConsistencyFifoLocalFewKeys() throws Exception { FifoEvictionPolicy plc = new FifoEvictionPolicy<>(); plc.setMaxSize(POLICY_QUEUE_SIZE); @@ -164,6 +168,7 @@ public void testPolicyConsistencyFifoLocalFewKeys() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPolicyConsistencyLruLocalFewKeys() throws Exception { LruEvictionPolicy plc = new LruEvictionPolicy<>(); plc.setMaxSize(POLICY_QUEUE_SIZE); @@ -178,6 +183,7 @@ public void testPolicyConsistencyLruLocalFewKeys() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPolicyConsistencySortedLocalFewKeys() throws Exception { SortedEvictionPolicy plc = new SortedEvictionPolicy<>(); plc.setMaxSize(POLICY_QUEUE_SIZE); @@ -192,6 +198,7 @@ public void testPolicyConsistencySortedLocalFewKeys() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPolicyConsistencyFifoLocal() throws Exception { FifoEvictionPolicy plc = new FifoEvictionPolicy<>(); plc.setMaxSize(POLICY_QUEUE_SIZE); @@ -206,6 +213,7 @@ public void testPolicyConsistencyFifoLocal() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPolicyConsistencyLruLocal() throws Exception { LruEvictionPolicy plc = new LruEvictionPolicy<>(); plc.setMaxSize(POLICY_QUEUE_SIZE); @@ -220,6 +228,7 @@ public void testPolicyConsistencyLruLocal() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPolicyConsistencySortedLocal() throws Exception { SortedEvictionPolicy plc = new SortedEvictionPolicy<>(); plc.setMaxSize(POLICY_QUEUE_SIZE); @@ -344,4 +353,4 @@ else if (plc instanceof SortedEvictionPolicy) { return Collections.emptyList(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionsSelfTest.java index c986961677ea4..5a41fd5b03da8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionsSelfTest.java @@ -99,6 +99,7 @@ public class GridCacheConcurrentEvictionsSelfTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testConcurrentPutsFifoLocal() throws Exception { mode = LOCAL; @@ -115,6 +116,7 @@ public void testConcurrentPutsFifoLocal() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConcurrentPutsLruLocal() throws Exception { mode = LOCAL; @@ -131,6 +133,7 @@ public void testConcurrentPutsLruLocal() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConcurrentPutsSortedLocal() throws Exception { mode = LOCAL; @@ -199,4 +202,4 @@ private void checkConcurrentPuts() throws Exception { stopAllGrids(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesAbstractSelfTest.java index f28e56b6fcda2..939a93f14580f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesAbstractSelfTest.java @@ -121,6 +121,7 @@ public abstract class GridCacheEmptyEntriesAbstractSelfTest extends GridCommonAb * * @throws Exception If failed. */ + @Test public void testFifo() throws Exception { FifoEvictionPolicy plc = new FifoEvictionPolicy(); plc.setMaxSize(50); @@ -307,4 +308,4 @@ private void checkEmpty(IgniteCache cache) throws IgniteInterrup } } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesLocalSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesLocalSelfTest.java index 018cc2e699dbc..4f15f69908dfc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesLocalSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesLocalSelfTest.java @@ -35,7 +35,8 @@ public class GridCacheEmptyEntriesLocalSelfTest extends GridCacheEmptyEntriesAbs } /** {@inheritDoc} */ - @Override public void testFifo() throws Exception { + @Override @Test + public void testFifo() throws Exception { super.testFifo(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesPartitionedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesPartitionedSelfTest.java index 5d9faebd465dc..0053aa5721615 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesPartitionedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesPartitionedSelfTest.java @@ -35,7 +35,8 @@ public class GridCacheEmptyEntriesPartitionedSelfTest extends GridCacheEmptyEntr } /** {@inheritDoc} */ - @Override public void testFifo() throws Exception { + @Override @Test + public void testFifo() throws Exception { super.testFifo(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictableEntryEqualsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictableEntryEqualsSelfTest.java index 98c8b776ba386..ed941dbae679a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictableEntryEqualsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictableEntryEqualsSelfTest.java @@ -34,6 +34,7 @@ public class GridCacheEvictableEntryEqualsSelfTest extends GridCommonAbstractTes /** * @throws Exception If failed. */ + @Test public void testEquals() throws Exception { try (Ignite ignite = startGrid()) { CacheConfiguration cfg = new CacheConfiguration<>("test"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionFilterSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionFilterSelfTest.java index b432c2d584595..5baf8cf726a30 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionFilterSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionFilterSelfTest.java @@ -104,6 +104,7 @@ public class GridCacheEvictionFilterSelfTest extends GridCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testLocal() throws Exception { mode = LOCAL; @@ -111,6 +112,7 @@ public void testLocal() throws Exception { } /** @throws Exception If failed. */ + @Test public void testReplicated() throws Exception { mode = REPLICATED; @@ -118,6 +120,7 @@ public void testReplicated() throws Exception { } /** @throws Exception If failed. */ + @Test public void testPartitioned() throws Exception { mode = PARTITIONED; nearEnabled = true; @@ -126,6 +129,7 @@ public void testPartitioned() throws Exception { } /** @throws Exception If failed. */ + @Test public void testPartitionedNearDisabled() throws Exception { mode = PARTITIONED; nearEnabled = false; @@ -190,6 +194,7 @@ private void checkEvictionFilter() throws Exception { * * @throws Exception If failed. */ + @Test public void testPartitionedMixed() throws Exception { mode = PARTITIONED; nearEnabled = false; @@ -256,4 +261,4 @@ ConcurrentMap counts() { return cnts; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionLockUnlockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionLockUnlockSelfTest.java index 55b7b63691470..b8a47bf7c27ec 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionLockUnlockSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionLockUnlockSelfTest.java @@ -96,6 +96,7 @@ public class GridCacheEvictionLockUnlockSelfTest extends GridCommonAbstractTest } /** @throws Exception If failed. */ + @Test public void testLocal() throws Exception { mode = LOCAL; gridCnt = 1; @@ -104,6 +105,7 @@ public void testLocal() throws Exception { } /** @throws Exception If failed. */ + @Test public void testReplicated() throws Exception { mode = REPLICATED; gridCnt = 3; @@ -112,6 +114,7 @@ public void testReplicated() throws Exception { } /** @throws Exception If failed. */ + @Test public void testPartitioned() throws Exception { mode = PARTITIONED; gridCnt = 3; @@ -182,4 +185,4 @@ private static class EvictionPolicy implements org.apache.ignite.cache.eviction. entry.evict(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionTouchSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionTouchSelfTest.java index a91c5b6527e0d..28df7aeabf418 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionTouchSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionTouchSelfTest.java @@ -118,6 +118,7 @@ public class GridCacheEvictionTouchSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPolicyConsistency() throws Exception { FifoEvictionPolicy plc = new FifoEvictionPolicy<>(); plc.setMaxSize(500); @@ -173,6 +174,7 @@ public void testPolicyConsistency() throws Exception { /** * @throws Exception If failed. */ + @Test public void testEvictSingle() throws Exception { FifoEvictionPolicy plc = new FifoEvictionPolicy<>(); plc.setMaxSize(500); @@ -203,6 +205,7 @@ public void testEvictSingle() throws Exception { /** * @throws Exception If failed. */ + @Test public void testEvictAll() throws Exception { FifoEvictionPolicy plc = new FifoEvictionPolicy<>(); plc.setMaxSize(500); @@ -238,6 +241,7 @@ public void testEvictAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReload() throws Exception { FifoEvictionPolicy plc = new FifoEvictionPolicy<>(); plc.setMaxSize(100); @@ -269,4 +273,4 @@ public void testReload() throws Exception { stopAllGrids(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruEvictionPolicyFactorySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruEvictionPolicyFactorySelfTest.java index d53cb6f36c923..4bb4fc8879473 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruEvictionPolicyFactorySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruEvictionPolicyFactorySelfTest.java @@ -45,6 +45,7 @@ public class LruEvictionPolicyFactorySelfTest extends EvictionPolicyFactoryAbstr /** * @throws Exception If failed. */ + @Test public void testMiddleAccess() throws Exception { policyFactory = createPolicyFactory(); @@ -349,4 +350,4 @@ public void testMiddleAccess() throws Exception { assertTrue(policy(i).queue().size() <= plcMax + plcBatchSize); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruEvictionPolicySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruEvictionPolicySelfTest.java index 3c5334911ed9a..e49c5a63a721c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruEvictionPolicySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruEvictionPolicySelfTest.java @@ -30,6 +30,7 @@ public class LruEvictionPolicySelfTest extends /** * @throws Exception If failed. */ + @Test public void testMiddleAccess() throws Exception { startGrid(); @@ -350,4 +351,4 @@ public void testMiddleAccess() throws Exception { } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearEvictionPolicySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearEvictionPolicySelfTest.java index 27295c69ca35e..fb2a16eed9881 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearEvictionPolicySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearEvictionPolicySelfTest.java @@ -86,6 +86,7 @@ public class LruNearEvictionPolicySelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testAtomicNearEvictionMaxSize() throws Exception { atomicityMode = ATOMIC; @@ -95,6 +96,7 @@ public void testAtomicNearEvictionMaxSize() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTransactionalNearEvictionMaxSize() throws Exception { atomicityMode = TRANSACTIONAL; @@ -139,4 +141,4 @@ private void checkNearEvictionMaxSize() throws Exception { stopAllGrids(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearOnlyNearEvictionPolicySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearOnlyNearEvictionPolicySelfTest.java index a329e83f56252..04f15703963e0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearOnlyNearEvictionPolicySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearOnlyNearEvictionPolicySelfTest.java @@ -94,6 +94,7 @@ public class LruNearOnlyNearEvictionPolicySelfTest extends GridCommonAbstractTes /** * @throws Exception If failed. */ + @Test public void testPartitionedAtomicNearEvictionMaxSize() throws Exception { atomicityMode = ATOMIC; cacheMode = PARTITIONED; @@ -104,6 +105,7 @@ public void testPartitionedAtomicNearEvictionMaxSize() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPartitionedTransactionalNearEvictionMaxSize() throws Exception { atomicityMode = TRANSACTIONAL; cacheMode = PARTITIONED; @@ -114,6 +116,7 @@ public void testPartitionedTransactionalNearEvictionMaxSize() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReplicatedAtomicNearEvictionMaxSize() throws Exception { atomicityMode = ATOMIC; cacheMode = REPLICATED; @@ -124,6 +127,7 @@ public void testReplicatedAtomicNearEvictionMaxSize() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReplicatedTransactionalNearEvictionMaxSize() throws Exception { atomicityMode = TRANSACTIONAL; cacheMode = REPLICATED; @@ -174,4 +178,4 @@ private void checkNearEvictionMaxSize() throws Exception { stopAllGrids(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMetricTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMetricTest.java index a451c36bf8d7f..57cfd46f72fe3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMetricTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMetricTest.java @@ -43,6 +43,7 @@ public class PageEvictionMetricTest extends PageEvictionAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPageEvictionMetric() throws Exception { IgniteEx ignite = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMultinodeAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMultinodeAbstractTest.java index 777c2d7e999cc..5c993d1e52e0b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMultinodeAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMultinodeAbstractTest.java @@ -70,6 +70,7 @@ public abstract class PageEvictionMultinodeAbstractTest extends PageEvictionAbst /** * @throws Exception If failed. */ + @Test public void testPageEviction() throws Exception { for (int i = 0; i < CACHE_MODES.length; i++) { for (int j = 0; j < ATOMICITY_MODES.length; j++) { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionPagesRecyclingAndReusingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionPagesRecyclingAndReusingTest.java index 9c777fbe36c80..15be9d8d31f51 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionPagesRecyclingAndReusingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionPagesRecyclingAndReusingTest.java @@ -57,6 +57,7 @@ public class PageEvictionPagesRecyclingAndReusingTest extends PageEvictionAbstra /** * @throws Exception If failed. */ + @Test public void testPagesRecyclingAndReusingAtomicReplicated() throws Exception { testPagesRecyclingAndReusing(CacheAtomicityMode.ATOMIC, CacheMode.REPLICATED); } @@ -64,6 +65,7 @@ public void testPagesRecyclingAndReusingAtomicReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPagesRecyclingAndReusingAtomicLocal() throws Exception { testPagesRecyclingAndReusing(CacheAtomicityMode.ATOMIC, CacheMode.LOCAL); } @@ -71,6 +73,7 @@ public void testPagesRecyclingAndReusingAtomicLocal() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPagesRecyclingAndReusingTxReplicated() throws Exception { testPagesRecyclingAndReusing(CacheAtomicityMode.TRANSACTIONAL, CacheMode.REPLICATED); } @@ -78,6 +81,7 @@ public void testPagesRecyclingAndReusingTxReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPagesRecyclingAndReusingTxLocal() throws Exception { testPagesRecyclingAndReusing(CacheAtomicityMode.TRANSACTIONAL, CacheMode.LOCAL); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionReadThroughTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionReadThroughTest.java index ff713616c742f..2a9251f451bd6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionReadThroughTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionReadThroughTest.java @@ -42,6 +42,7 @@ public class PageEvictionReadThroughTest extends PageEvictionAbstractTest { /** * @throws Exception If failed. */ + @Test public void testEvictionWithReadThroughAtomicReplicated() throws Exception { testEvictionWithReadThrough(CacheAtomicityMode.ATOMIC, CacheMode.REPLICATED); } @@ -49,6 +50,7 @@ public void testEvictionWithReadThroughAtomicReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testEvictionWithReadThroughAtomicLocal() throws Exception { testEvictionWithReadThrough(CacheAtomicityMode.ATOMIC, CacheMode.LOCAL); } @@ -56,6 +58,7 @@ public void testEvictionWithReadThroughAtomicLocal() throws Exception { /** * @throws Exception If failed. */ + @Test public void testEvictionWithReadThroughTxReplicated() throws Exception { testEvictionWithReadThrough(CacheAtomicityMode.TRANSACTIONAL, CacheMode.REPLICATED); } @@ -63,6 +66,7 @@ public void testEvictionWithReadThroughTxReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testEvictionWithReadThroughTxLocal() throws Exception { testEvictionWithReadThrough(CacheAtomicityMode.TRANSACTIONAL, CacheMode.LOCAL); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionTouchOrderTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionTouchOrderTest.java index 43356490fe21e..3309e4d003b27 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionTouchOrderTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionTouchOrderTest.java @@ -45,6 +45,7 @@ public class PageEvictionTouchOrderTest extends PageEvictionAbstractTest { /** * @throws Exception If failed. */ + @Test public void testTouchOrderWithFairFifoEvictionAtomicReplicated() throws Exception { testTouchOrderWithFairFifoEviction(CacheAtomicityMode.ATOMIC, CacheMode.REPLICATED); } @@ -52,6 +53,7 @@ public void testTouchOrderWithFairFifoEvictionAtomicReplicated() throws Exceptio /** * @throws Exception If failed. */ + @Test public void testTouchOrderWithFairFifoEvictionAtomicLocal() throws Exception { testTouchOrderWithFairFifoEviction(CacheAtomicityMode.ATOMIC, CacheMode.LOCAL); } @@ -59,6 +61,7 @@ public void testTouchOrderWithFairFifoEvictionAtomicLocal() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTouchOrderWithFairFifoEvictionTxReplicated() throws Exception { testTouchOrderWithFairFifoEviction(CacheAtomicityMode.TRANSACTIONAL, CacheMode.REPLICATED); } @@ -66,6 +69,7 @@ public void testTouchOrderWithFairFifoEvictionTxReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTouchOrderWithFairFifoEvictionTxLocal() throws Exception { testTouchOrderWithFairFifoEviction(CacheAtomicityMode.TRANSACTIONAL, CacheMode.LOCAL); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionWithRebalanceAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionWithRebalanceAbstractTest.java index 3ad104b031160..519184b70bf4e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionWithRebalanceAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionWithRebalanceAbstractTest.java @@ -31,6 +31,7 @@ public abstract class PageEvictionWithRebalanceAbstractTest extends PageEviction /** * @throws Exception If failed. */ + @Test public void testEvictionWithRebalance() throws Exception { startGridsMultiThreaded(4); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/sorted/SortedEvictionPolicyPerformanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/sorted/SortedEvictionPolicyPerformanceTest.java index 39b01ed4cc089..94fa1ea2c4fb5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/sorted/SortedEvictionPolicyPerformanceTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/sorted/SortedEvictionPolicyPerformanceTest.java @@ -87,6 +87,7 @@ public class SortedEvictionPolicyPerformanceTest extends GridCommonAbstractTest /** * Tests throughput. */ + @Test public void testThroughput() throws Exception { final LongAdder cnt = new LongAdder(); final AtomicBoolean finished = new AtomicBoolean(); @@ -128,4 +129,4 @@ else if (p >= pPut && p < pGet) } }, THREADS); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheClientNearCacheExpiryTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheClientNearCacheExpiryTest.java index 3417ba8513a34..efde7b847321e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheClientNearCacheExpiryTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheClientNearCacheExpiryTest.java @@ -80,6 +80,7 @@ public class IgniteCacheClientNearCacheExpiryTest extends IgniteCacheAbstractTes /** * @throws Exception If failed. */ + @Test public void testExpirationOnClient() throws Exception { Ignite ignite = grid(NODES - 1); @@ -123,4 +124,4 @@ public void testExpirationOnClient() throws Exception { for (int i = KEYS_COUNT ; i < KEYS_COUNT * 2; i++) assertNull(cache.localPeek(i)); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyAbstractTest.java index c04d9d8d9663a..518ed388d619b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyAbstractTest.java @@ -118,6 +118,7 @@ public abstract class IgniteCacheExpiryPolicyAbstractTest extends IgniteCacheAbs /** * @throws Exception if failed. */ + @Test public void testCreateUpdate0() throws Exception { startGrids(1); @@ -149,6 +150,7 @@ public void testCreateUpdate0() throws Exception { /** * @throws Exception If failed. */ + @Test public void testZeroOnCreate() throws Exception { factory = CreatedExpiryPolicy.factoryOf(Duration.ZERO); @@ -176,6 +178,7 @@ private void zeroOnCreate(Integer key) throws Exception { /** * @throws Exception If failed. */ + @Test public void testZeroOnUpdate() throws Exception { factory = new FactoryBuilder.SingletonFactory<>(new TestPolicy(null, 0L, null)); @@ -207,6 +210,7 @@ private void zeroOnUpdate(Integer key) throws Exception { /** * @throws Exception If failed. */ + @Test public void testZeroOnAccess() throws Exception { factory = new FactoryBuilder.SingletonFactory<>(new TestPolicy(null, null, 0L)); @@ -252,6 +256,7 @@ public void testZeroOnAccess() throws Exception { /** * @throws Exception If failed. */ + @Test public void testZeroOnAccessEagerTtlDisabled() throws Exception { disableEagerTtl = true; @@ -277,6 +282,7 @@ private void zeroOnAccess(Integer key) throws Exception { /** * @throws Exception If failed. */ + @Test public void testEternal() throws Exception { factory = EternalExpiryPolicy.factoryOf(); @@ -298,6 +304,7 @@ public void testEternal() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNullFactory() throws Exception { factory = null; // Should work as eternal. @@ -349,6 +356,7 @@ private void eternal(Integer key) throws Exception { /** * @throws Exception If failed. */ + @Test public void testAccess() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-305"); @@ -595,6 +603,7 @@ private void accessGetAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCreateUpdate() throws Exception { factory = new FactoryBuilder.SingletonFactory<>(new TestPolicy(60_000L, 61_000L, null)); @@ -835,6 +844,7 @@ private void createUpdate(Integer key, @Nullable TransactionConcurrency txConcur /** * @throws Exception If failed. */ + @Test public void testNearCreateUpdate() throws Exception { if (cacheMode() != PARTITIONED) return; @@ -958,6 +968,7 @@ private void nearPutAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNearAccess() throws Exception { if (cacheMode() != PARTITIONED) return; @@ -1005,6 +1016,7 @@ public void testNearAccess() throws Exception { * * @throws Exception If failed. */ + @Test public void testNearExpiresOnClient() throws Exception { if (cacheMode() != PARTITIONED) return; @@ -1042,6 +1054,7 @@ public void testNearExpiresOnClient() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNearExpiresWithCacheStore() throws Exception { if(cacheMode() != PARTITIONED) return; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyWithStoreAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyWithStoreAbstractTest.java index 747cb43536739..234ce81fc0ad2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyWithStoreAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyWithStoreAbstractTest.java @@ -72,6 +72,7 @@ public abstract class IgniteCacheExpiryPolicyWithStoreAbstractTest extends Ignit /** * @throws Exception If failed. */ + @Test public void testLoadAll() throws Exception { IgniteCache cache = jcache(0); @@ -124,6 +125,7 @@ public void testLoadAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLoadCache() throws Exception { IgniteCache cache = jcache(0); @@ -150,6 +152,7 @@ public void testLoadCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReadThrough() throws Exception { IgniteCache cache = jcache(0); @@ -182,6 +185,7 @@ public void testReadThrough() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetReadThrough() throws Exception { getReadThrough(false, null, null); getReadThrough(true, null, null); @@ -354,4 +358,4 @@ private static class TestExpiryPolicyFactory implements Factory { }; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheLargeValueExpireTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheLargeValueExpireTest.java index 7e0b1d75c5ff9..41df474e2ab51 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheLargeValueExpireTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheLargeValueExpireTest.java @@ -62,6 +62,7 @@ public class IgniteCacheLargeValueExpireTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testExpire() throws Exception { try (Ignite ignite = startGrid(0)) { checkExpire(ignite, true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheOnlyOneTtlCleanupThreadExistsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheOnlyOneTtlCleanupThreadExistsTest.java index f47de7dd79664..faaf6e44c9c5d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheOnlyOneTtlCleanupThreadExistsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheOnlyOneTtlCleanupThreadExistsTest.java @@ -36,6 +36,7 @@ public class IgniteCacheOnlyOneTtlCleanupThreadExistsTest extends GridCommonAbst /** * @throws Exception If failed. */ + @Test public void testOnlyOneTtlCleanupThreadExists() throws Exception { try (final Ignite g = startGrid(0)) { checkCleanupThreadExists(false); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxExpiryPolicyWithStoreTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxExpiryPolicyWithStoreTest.java index f5888f88ac696..32c6f8d4d9c7e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxExpiryPolicyWithStoreTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxExpiryPolicyWithStoreTest.java @@ -45,7 +45,8 @@ public class IgniteCacheTxExpiryPolicyWithStoreTest extends IgniteCacheExpiryPol } /** {@inheritDoc} */ - @Override public void testGetReadThrough() throws Exception { + @Override @Test + public void testGetReadThrough() throws Exception { super.testGetReadThrough(); getReadThrough(false, TransactionConcurrency.OPTIMISTIC, TransactionIsolation.READ_COMMITTED); @@ -62,4 +63,4 @@ public class IgniteCacheTxExpiryPolicyWithStoreTest extends IgniteCacheExpiryPol getReadThrough(false, TransactionConcurrency.PESSIMISTIC, TransactionIsolation.SERIALIZABLE); getReadThrough(true, TransactionConcurrency.PESSIMISTIC, TransactionIsolation.SERIALIZABLE); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheLoadAllAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheLoadAllAbstractTest.java index 6b4f9761311ca..c9cd4cd551a02 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheLoadAllAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheLoadAllAbstractTest.java @@ -77,6 +77,7 @@ public abstract class IgniteCacheLoadAllAbstractTest extends IgniteCacheAbstract /** * @throws Exception If failed. */ + @Test public void testLoadAll() throws Exception { IgniteCache cache0 = jcache(0); @@ -259,4 +260,4 @@ private static class CacheWriterFactory implements Factory { }; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheLoaderWriterAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheLoaderWriterAbstractTest.java index 5cdac5bbc97d5..540fe67709a97 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheLoaderWriterAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheLoaderWriterAbstractTest.java @@ -81,6 +81,7 @@ public abstract class IgniteCacheLoaderWriterAbstractTest extends IgniteCacheAbs /** * @throws Exception If failed. */ + @Test public void testLoaderWriter() throws Exception { IgniteCache cache = jcache(0); @@ -162,6 +163,7 @@ public void testLoaderWriter() throws Exception { /** * */ + @Test public void testLoaderException() { IgniteCache cache = jcache(0); @@ -180,6 +182,7 @@ public void testLoaderException() { /** * */ + @Test public void testWriterException() { IgniteCache cache = jcache(0); @@ -198,6 +201,7 @@ public void testWriterException() { /** * @throws Exception If failed. */ + @Test public void testLoaderWriterBulk() throws Exception { Map vals = new HashMap<>(); @@ -432,4 +436,4 @@ class TestWriter implements CacheWriter, LifecycleAware { } } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheNoLoadPreviousValueAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheNoLoadPreviousValueAbstractTest.java index 4eb6269833aa1..19fbf7dfcd791 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheNoLoadPreviousValueAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheNoLoadPreviousValueAbstractTest.java @@ -72,6 +72,7 @@ public abstract class IgniteCacheNoLoadPreviousValueAbstractTest extends IgniteC /** * @throws Exception If failed. */ + @Test public void testNoLoadPreviousValue() throws Exception { IgniteCache cache = jcache(0); @@ -215,4 +216,4 @@ protected Collection keys() throws Exception { return keys; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheNoReadThroughAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheNoReadThroughAbstractTest.java index 37f6fce4a299c..811a7e779ceae 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheNoReadThroughAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheNoReadThroughAbstractTest.java @@ -86,6 +86,7 @@ public abstract class IgniteCacheNoReadThroughAbstractTest extends IgniteCacheAb /** * @throws Exception If failed. */ + @Test public void testNoReadThrough() throws Exception { IgniteCache cache = jcache(0); @@ -340,4 +341,4 @@ private static class NoReadThroughStoreFactory implements Factory { }; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheNoWriteThroughAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheNoWriteThroughAbstractTest.java index 5ab86ec92e694..a618409d45b9e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheNoWriteThroughAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheNoWriteThroughAbstractTest.java @@ -75,6 +75,7 @@ public abstract class IgniteCacheNoWriteThroughAbstractTest extends IgniteCacheA * @throws Exception If failed. */ @SuppressWarnings("UnnecessaryLocalVariable") + @Test public void testNoWriteThrough() throws Exception { IgniteCache cache = jcache(0); @@ -349,4 +350,4 @@ protected Collection keys() throws Exception { return keys; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheStoreNodeRestartAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheStoreNodeRestartAbstractTest.java index 9c455b6cccf43..4334c44eba9db 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheStoreNodeRestartAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheStoreNodeRestartAbstractTest.java @@ -73,6 +73,7 @@ public abstract class IgniteCacheStoreNodeRestartAbstractTest extends IgniteCach /** * @throws Exception If failed. */ + @Test public void testMarshaller() throws Exception { grid(0).cache(CACHE_NAME1).put("key1", new UserObject("key1")); @@ -113,4 +114,4 @@ public String getField() { return field; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheStoreSessionAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheStoreSessionAbstractTest.java index 40e36c2dbedbb..3ca0a9268200b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheStoreSessionAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheStoreSessionAbstractTest.java @@ -113,6 +113,7 @@ protected List testKeys(IgniteCache cache, int cnt) throws Exception { /** * @throws Exception If failed. */ + @Test public void testStoreSession() throws Exception { assertEquals(DEFAULT_CACHE_NAME, jcache(0).getName()); @@ -365,4 +366,4 @@ private void checkSession(String mtd) { assertEquals(exp.expCacheName, ses.cacheName()); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheStoreSessionWriteBehindAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheStoreSessionWriteBehindAbstractTest.java index a327fa99bc506..0fe88d9b396f7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheStoreSessionWriteBehindAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheStoreSessionWriteBehindAbstractTest.java @@ -113,6 +113,7 @@ protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throw /** * @throws Exception If failed. */ + @Test public void testSession() throws Exception { testCache(DEFAULT_CACHE_NAME); @@ -208,7 +209,7 @@ protected class TestStore implements CacheStore { /** {@inheritDoc} */ @Override public void writeAll(Collection> entries) throws CacheWriterException { log.info("writeAll: " + entries); - + assertTrue("Unexpected entries: " + entries, entries.size() == 10 || entries.size() == 1); checkSession("writeAll"); @@ -292,4 +293,4 @@ public ExpectedData(String expMtd, String expCacheName) { this.expCacheName = expCacheName; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionTest.java index b9e884b9b4d84..b6e1190adec81 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionTest.java @@ -61,6 +61,7 @@ public class IgniteCacheTxStoreSessionTest extends IgniteCacheStoreSessionAbstra /** * @throws Exception If failed. */ + @Test public void testStoreSessionTx() throws Exception { testTxPut(jcache(0), null, null); @@ -256,6 +257,7 @@ private Transaction startTx(TransactionConcurrency concurrency, TransactionIsola /** * @throws Exception If failed. */ + @Test public void testSessionCrossCacheTx() throws Exception { IgniteCache cache0 = ignite(0).cache(DEFAULT_CACHE_NAME); @@ -292,4 +294,4 @@ public void testSessionCrossCacheTx() throws Exception { assertEquals(0, expData.size()); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheAtomicLocalTckMetricsSelfTestImpl.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheAtomicLocalTckMetricsSelfTestImpl.java index 23e7a8b748ab6..3e7a73d6bfc66 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheAtomicLocalTckMetricsSelfTestImpl.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheAtomicLocalTckMetricsSelfTestImpl.java @@ -29,6 +29,7 @@ public class GridCacheAtomicLocalTckMetricsSelfTestImpl extends GridCacheAtomicL /** * @throws Exception If failed. */ + @Test public void testEntryProcessorRemove() throws Exception { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -63,6 +64,7 @@ public void testEntryProcessorRemove() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheStatistics() throws Exception { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -103,6 +105,7 @@ public void testCacheStatistics() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConditionReplace() throws Exception { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -153,6 +156,7 @@ public void testConditionReplace() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutIfAbsent() throws Exception { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -180,4 +184,4 @@ public void testPutIfAbsent() throws Exception { assertEquals(putCount, cache.localMetrics().getCachePuts()); assertEquals(missCount, cache.localMetrics().getCacheMisses()); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalByteArrayValuesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalByteArrayValuesSelfTest.java index e6c4771a90aad..9bed0651588ae 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalByteArrayValuesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalByteArrayValuesSelfTest.java @@ -87,6 +87,7 @@ public class GridCacheLocalByteArrayValuesSelfTest extends GridCacheAbstractByte * * @throws Exception If failed. */ + @Test public void testPessimistic() throws Exception { testTransaction(cache, PESSIMISTIC, KEY_1, wrap(1)); } @@ -96,6 +97,7 @@ public void testPessimistic() throws Exception { * * @throws Exception If failed. */ + @Test public void testPessimisticMixed() throws Exception { testTransactionMixed(cache, PESSIMISTIC, KEY_1, wrap(1), KEY_2, 1); } @@ -105,6 +107,7 @@ public void testPessimisticMixed() throws Exception { * * @throws Exception If failed. */ + @Test public void testOptimistic() throws Exception { testTransaction(cache, OPTIMISTIC, KEY_1, wrap(1)); } @@ -114,6 +117,7 @@ public void testOptimistic() throws Exception { * * @throws Exception If failed. */ + @Test public void testOptimisticMixed() throws Exception { testTransactionMixed(cache, OPTIMISTIC, KEY_1, wrap(1), KEY_2, 1); } @@ -124,6 +128,7 @@ public void testOptimisticMixed() throws Exception { * @throws Exception If failed. */ @SuppressWarnings("TooBroadScope") + @Test public void testSwap() throws Exception { // TODO GG-11148. // assert cache.getConfiguration(CacheConfiguration.class).isSwapEnabled(); @@ -200,4 +205,4 @@ private void testTransactionMixed(IgniteCache cache, Transactio tx.close(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalFullApiSelfTest.java index aaf69c96d432a..b197e9c17e8c5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalFullApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalFullApiSelfTest.java @@ -51,6 +51,7 @@ public class GridCacheLocalFullApiSelfTest extends GridCacheAbstractFullApiSelfT /** * @throws Exception In case of error. */ + @Test public void testMapKeysToNodes() throws Exception { IgniteCache cache = jcache(); @@ -85,6 +86,7 @@ public void testMapKeysToNodes() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLocalClearAsync() throws Exception { localCacheClear(true); } @@ -92,6 +94,7 @@ public void testLocalClearAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLocalClear() throws Exception { localCacheClear(false); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalIsolatedNodesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalIsolatedNodesSelfTest.java index e5d3b485c31bb..a224258900624 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalIsolatedNodesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalIsolatedNodesSelfTest.java @@ -60,6 +60,7 @@ public GridCacheLocalIsolatedNodesSelfTest() { * * @throws Exception If test failed. */ + @Test public void testIsolatedNodes() throws Exception { Ignite g1 = grid(0); UUID nid1 = g1.cluster().localNode().id(); @@ -123,4 +124,4 @@ private static class NodeIdFilter implements IgnitePredicate { } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalLoadAllSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalLoadAllSelfTest.java index 647027fc3fc27..b8b43ae18a6bb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalLoadAllSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalLoadAllSelfTest.java @@ -54,6 +54,7 @@ public GridCacheLocalLoadAllSelfTest() { * * @throws Exception If test failed. */ + @Test public void testCacheGetAll() throws Exception { Ignite ignite = grid(); @@ -115,4 +116,4 @@ private static class TestStore extends CacheStoreAdapter { // No-op. } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalLockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalLockSelfTest.java index 8f27b1bbcc03a..fd560b7028771 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalLockSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalLockSelfTest.java @@ -87,6 +87,7 @@ public GridCacheLocalLockSelfTest() { /** * @throws IgniteCheckedException If test failed. */ + @Test public void testLockReentry() throws IgniteCheckedException { IgniteCache cache = ignite.cache(DEFAULT_CACHE_NAME); @@ -132,6 +133,7 @@ public void testLockReentry() throws IgniteCheckedException { /** * @throws Exception If test failed. */ + @Test public void testLock() throws Throwable { final IgniteCache cache = ignite.cache(DEFAULT_CACHE_NAME); @@ -248,6 +250,7 @@ public void testLock() throws Throwable { /** * @throws Exception If test failed. */ + @Test public void testLockAndPut() throws Throwable { final IgniteCache cache = ignite.cache(DEFAULT_CACHE_NAME); @@ -326,4 +329,4 @@ public void testLockAndPut() throws Throwable { assert !cache.isLocalLocked(1, true); assert !cache.isLocalLocked(1, false); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalMultithreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalMultithreadedSelfTest.java index 491163158028b..2e58c92f49891 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalMultithreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalMultithreadedSelfTest.java @@ -96,6 +96,7 @@ public GridCacheLocalMultithreadedSelfTest() { /** * @throws Exception If test fails. */ + @Test public void testBasicLocks() throws Throwable { GridTestUtils.runMultiThreaded(new Callable() { /** {@inheritDoc} */ @@ -122,6 +123,7 @@ public void testBasicLocks() throws Throwable { /** * @throws Exception If test fails. */ + @Test public void testMultiLocks() throws Throwable { GridTestUtils.runMultiThreaded(new Callable() { /** {@inheritDoc} */ @@ -150,6 +152,7 @@ public void testMultiLocks() throws Throwable { /** * @throws Exception If test fails. */ + @Test public void testSlidingKeysLocks() throws Throwable { final AtomicInteger cnt = new AtomicInteger(); @@ -182,6 +185,7 @@ public void testSlidingKeysLocks() throws Throwable { /** * @throws Exception If test fails. */ + @Test public void testSingleLockTimeout() throws Exception { final CountDownLatch l1 = new CountDownLatch(1); final CountDownLatch l2 = new CountDownLatch(1); @@ -248,6 +252,7 @@ public void testSingleLockTimeout() throws Exception { /** * @throws Exception If test fails. */ + @Test public void testMultiLockTimeout() throws Exception { final CountDownLatch l1 = new CountDownLatch(1); final CountDownLatch l2 = new CountDownLatch(1); @@ -358,4 +363,4 @@ public void testMultiLockTimeout() throws Exception { private String thread() { return "Thread [id=" + Thread.currentThread().getId() + ", name=" + Thread.currentThread().getName() + ']'; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxTimeoutSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxTimeoutSelfTest.java index 62af45242c052..d33cb4be98c2e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxTimeoutSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxTimeoutSelfTest.java @@ -97,6 +97,7 @@ public GridCacheLocalTxTimeoutSelfTest() { /** * @throws IgniteCheckedException If test failed. */ + @Test public void testPessimisticReadCommitted() throws Exception { checkTransactionTimeout(PESSIMISTIC, READ_COMMITTED); } @@ -104,6 +105,7 @@ public void testPessimisticReadCommitted() throws Exception { /** * @throws IgniteCheckedException If test failed. */ + @Test public void testPessimisticRepeatableRead() throws Exception { checkTransactionTimeout(PESSIMISTIC, REPEATABLE_READ); } @@ -111,6 +113,7 @@ public void testPessimisticRepeatableRead() throws Exception { /** * @throws IgniteCheckedException If test failed. */ + @Test public void testPessimisticSerializable() throws Exception { checkTransactionTimeout(PESSIMISTIC, SERIALIZABLE); } @@ -118,6 +121,7 @@ public void testPessimisticSerializable() throws Exception { /** * @throws IgniteCheckedException If test failed. */ + @Test public void testOptimisticReadCommitted() throws Exception { checkTransactionTimeout(OPTIMISTIC, READ_COMMITTED); } @@ -125,6 +129,7 @@ public void testOptimisticReadCommitted() throws Exception { /** * @throws IgniteCheckedException If test failed. */ + @Test public void testOptimisticRepeatableRead() throws Exception { checkTransactionTimeout(OPTIMISTIC, REPEATABLE_READ); } @@ -132,6 +137,7 @@ public void testOptimisticRepeatableRead() throws Exception { /** * @throws IgniteCheckedException If test failed. */ + @Test public void testOptimisticSerializable() throws Exception { checkTransactionTimeout(OPTIMISTIC, SERIALIZABLE); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicNearEnabledMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicNearEnabledMultiJvmFullApiSelfTest.java index 5d28cb7ef37a1..18ac7304ca474 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicNearEnabledMultiJvmFullApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicNearEnabledMultiJvmFullApiSelfTest.java @@ -30,7 +30,8 @@ public class GridCacheAtomicNearEnabledMultiJvmFullApiSelfTest extends } /** {@inheritDoc} */ - @Override public void testPutAllPutAll() throws Exception { + @Override @Test + public void testPutAllPutAll() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-1112"); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheReplicatedNearOnlyMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheReplicatedNearOnlyMultiJvmFullApiSelfTest.java index 9b4db5b7bd791..6b360af4666ba 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheReplicatedNearOnlyMultiJvmFullApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheReplicatedNearOnlyMultiJvmFullApiSelfTest.java @@ -30,8 +30,9 @@ public class GridCacheReplicatedNearOnlyMultiJvmFullApiSelfTest extends } /** {@inheritDoc} */ - @Override public void testNearDhtKeySize() throws Exception { + @Override @Test + public void testNearDhtKeySize() throws Exception { if (isMultiJvm()) fail("https://issues.apache.org/jira/browse/IGNITE-648"); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractBasicCoordinatorFailoverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractBasicCoordinatorFailoverTest.java index 62ea12c45d5ee..a86efac2b23d7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractBasicCoordinatorFailoverTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractBasicCoordinatorFailoverTest.java @@ -688,6 +688,7 @@ protected void checkCoordinatorChangeActiveQueryClientFails_Simple(@Nullable Ign /** * @throws Exception If failed. */ + @Test public void testMultipleCoordinatorsLeft2Persistence() throws Exception { persistence = true; @@ -697,6 +698,7 @@ public void testMultipleCoordinatorsLeft2Persistence() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultipleCoordinatorsLeft3Persistence() throws Exception { persistence = true; @@ -706,6 +708,7 @@ public void testMultipleCoordinatorsLeft3Persistence() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultipleCoordinatorsLeft4() throws Exception { checkCoordinatorsLeft(4, true); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractCoordinatorFailoverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractCoordinatorFailoverTest.java index 4cddae62b6dda..3f4b049c4327d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractCoordinatorFailoverTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractCoordinatorFailoverTest.java @@ -30,6 +30,7 @@ public abstract class CacheMvccAbstractCoordinatorFailoverTest extends CacheMvcc /** * @throws Exception If failed. */ + @Test public void testAccountsTxGet_Server_Backups0_CoordinatorFails_Persistence() throws Exception { persistence = true; @@ -40,6 +41,7 @@ public void testAccountsTxGet_Server_Backups0_CoordinatorFails_Persistence() thr /** * @throws Exception If failed. */ + @Test public void testAccountsTxGet_SingleNode_CoordinatorFails() throws Exception { accountsTxReadAll(1, 0, 0, 1, null, true, GET, PUT, DFLT_TEST_TIME, RestartMode.RESTART_CRD); @@ -48,6 +50,7 @@ public void testAccountsTxGet_SingleNode_CoordinatorFails() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAccountsTxScan_Server_Backups0_CoordinatorFails() throws Exception { accountsTxReadAll(2, 0, 0, 64, null, true, SCAN, PUT, DFLT_TEST_TIME, RestartMode.RESTART_CRD); @@ -56,6 +59,7 @@ public void testAccountsTxScan_Server_Backups0_CoordinatorFails() throws Excepti /** * @throws Exception If failed. */ + @Test public void testAccountsTxScan_SingleNode_CoordinatorFails_Persistence() throws Exception { persistence = true; @@ -67,6 +71,7 @@ public void testAccountsTxScan_SingleNode_CoordinatorFails_Persistence() throws /** * @throws Exception If failed. */ + @Test public void testPutAllGetAll_Server_Backups0_RestartCoordinator_GetPut() throws Exception { putAllGetAll(RestartMode.RESTART_CRD , 2, 0, 0, 64, null, GET, PUT); @@ -75,6 +80,7 @@ public void testPutAllGetAll_Server_Backups0_RestartCoordinator_GetPut() throws /** * @throws Exception If failed. */ + @Test public void testPutAllGetAll_SingleNode_RestartCoordinator_GetPut_Persistence() throws Exception { persistence = true; @@ -85,6 +91,7 @@ public void testPutAllGetAll_SingleNode_RestartCoordinator_GetPut_Persistence() /** * @throws Exception If failed. */ + @Test public void testUpdate_N_Objects_Servers_Backups0__PutGet_CoordinatorFails_Persistence() throws Exception { persistence = true; @@ -95,6 +102,7 @@ public void testUpdate_N_Objects_Servers_Backups0__PutGet_CoordinatorFails_Persi /** * @throws Exception If failed. */ + @Test public void testUpdate_N_Objects_SingleNode__PutGet_CoordinatorFails() throws Exception { updateNObjectsTest(7, 1, 0, 0, 1, DFLT_TEST_TIME, @@ -104,6 +112,7 @@ public void testUpdate_N_Objects_SingleNode__PutGet_CoordinatorFails() throws Ex /** * @throws Exception If failed. */ + @Test public void testCoordinatorFailureSimplePessimisticTxPutGet() throws Exception { coordinatorFailureSimple(PESSIMISTIC, REPEATABLE_READ, GET, PUT); } @@ -111,6 +120,7 @@ public void testCoordinatorFailureSimplePessimisticTxPutGet() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReadInProgressCoordinatorFailsSimple_FromClientPutGet() throws Exception { readInProgressCoordinatorFailsSimple(true, null, GET, PUT); } @@ -118,6 +128,7 @@ public void testReadInProgressCoordinatorFailsSimple_FromClientPutGet() throws E /** * @throws Exception If failed. */ + @Test public void testCoordinatorChangeActiveQueryClientFails_Simple() throws Exception { checkCoordinatorChangeActiveQueryClientFails_Simple(null, GET, PUT); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccClusterRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccClusterRestartTest.java index 5cabffce784fa..4c23f8dea44ff 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccClusterRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccClusterRestartTest.java @@ -100,6 +100,7 @@ public class CacheMvccClusterRestartTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRestart1() throws Exception { restart1(3, 3); } @@ -107,6 +108,7 @@ public void testRestart1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRestart2() throws Exception { restart1(1, 3); } @@ -114,6 +116,7 @@ public void testRestart2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRestart3() throws Exception { restart1(3, 1); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccConfigurationValidationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccConfigurationValidationTest.java index f8a81ed606fcd..d4cef71ca478e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccConfigurationValidationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccConfigurationValidationTest.java @@ -77,6 +77,7 @@ public class CacheMvccConfigurationValidationTest extends GridCommonAbstractTest * @throws Exception If failed. */ @SuppressWarnings("ThrowableNotThrown") + @Test public void testMvccModeMismatchForGroup1() throws Exception { final Ignite node = startGrid(0); @@ -98,6 +99,7 @@ public void testMvccModeMismatchForGroup1() throws Exception { * @throws Exception If failed. */ @SuppressWarnings("ThrowableNotThrown") + @Test public void testMvccModeMismatchForGroup2() throws Exception { final Ignite node = startGrid(0); @@ -120,6 +122,7 @@ public void testMvccModeMismatchForGroup2() throws Exception { * @throws Exception If failed. */ @SuppressWarnings("ThrowableNotThrown") + @Test public void testMvccLocalCacheDisabled() throws Exception { final Ignite node1 = startGrid(1); final Ignite node2 = startGrid(2); @@ -152,6 +155,7 @@ public void testMvccLocalCacheDisabled() throws Exception { * @throws Exception If failed. */ @SuppressWarnings("ThrowableNotThrown") + @Test public void testNodeRestartWithCacheModeChangedTxToMvcc() throws Exception { cleanPersistenceDir(); @@ -199,6 +203,7 @@ public void testNodeRestartWithCacheModeChangedTxToMvcc() throws Exception { * @throws Exception If failed. */ @SuppressWarnings("ThrowableNotThrown") + @Test public void testNodeRestartWithCacheModeChangedMvccToTx() throws Exception { cleanPersistenceDir(); @@ -248,6 +253,7 @@ public void testNodeRestartWithCacheModeChangedMvccToTx() throws Exception { * @throws Exception If failed. */ @SuppressWarnings("unchecked") + @Test public void testTransactionalSnapshotLimitations() throws Exception { assertCannotStart( mvccCacheConfig().setCacheMode(LOCAL), diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccIteratorWithConcurrentTransactionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccIteratorWithConcurrentTransactionTest.java index 90c5b6e737034..1af1a9dfbb7bc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccIteratorWithConcurrentTransactionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccIteratorWithConcurrentTransactionTest.java @@ -33,6 +33,7 @@ public class CacheMvccIteratorWithConcurrentTransactionTest extends CacheMvccAbs /** * @throws Exception if failed. */ + @Test public void testScanQuery() throws Exception { doTestConsistency(clo); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccLocalEntriesWithConcurrentTransactionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccLocalEntriesWithConcurrentTransactionTest.java index f4c9781744f05..4add41526b59f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccLocalEntriesWithConcurrentTransactionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccLocalEntriesWithConcurrentTransactionTest.java @@ -34,6 +34,7 @@ public class CacheMvccLocalEntriesWithConcurrentTransactionTest extends CacheMvc /** * @throws Exception if failed. */ + @Test public void testLocalEntries() throws Exception { doTestConsistency(clo); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccOperationChecksTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccOperationChecksTest.java index 49196d229c02b..1939c48cb4f9e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccOperationChecksTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccOperationChecksTest.java @@ -61,6 +61,7 @@ public class CacheMvccOperationChecksTest extends CacheMvccAbstractTest { /** * @throws Exception if failed. */ + @Test public void testClearOperationsUnsupported() throws Exception { checkOperationUnsupported("clear", m("Clear"), E); @@ -79,6 +80,7 @@ public void testClearOperationsUnsupported() throws Exception { /** * @throws Exception if failed. */ + @Test public void testLoadOperationsUnsupported() throws Exception { checkOperationUnsupported("loadCache", m("Load"), t(IgniteBiPredicate.class, Object[].class), P, new Object[]{ 1 }); @@ -96,6 +98,7 @@ public void testLoadOperationsUnsupported() throws Exception { /** * @throws Exception if failed. */ + @Test public void testLockOperationsUnsupported() throws Exception { checkOperationUnsupported("lock", m("Lock"), t(Object.class), 1); @@ -105,6 +108,7 @@ public void testLockOperationsUnsupported() throws Exception { /** * @throws Exception if failed. */ + @Test public void testEvictOperationsUnsupported() throws Exception { checkOperationUnsupported("localEvict", m("Evict"), t(Collection.class), Collections.singleton(1)); } @@ -112,6 +116,7 @@ public void testEvictOperationsUnsupported() throws Exception { /** * @throws Exception if failed. */ + @Test public void testWithExpiryPolicyUnsupported() throws Exception { checkOperationUnsupported("withExpiryPolicy", m("withExpiryPolicy"), t(ExpiryPolicy.class), EternalExpiryPolicy.factoryOf().create()); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccPartitionedCoordinatorFailoverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccPartitionedCoordinatorFailoverTest.java index 342538210aef8..7b6f4da5217b9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccPartitionedCoordinatorFailoverTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccPartitionedCoordinatorFailoverTest.java @@ -41,6 +41,7 @@ public class CacheMvccPartitionedCoordinatorFailoverTest extends CacheMvccAbstra /** * @throws Exception If failed. */ + @Test public void testAccountsTxGet_ClientServer_Backups2_CoordinatorFails_Persistence() throws Exception { persistence = true; @@ -51,6 +52,7 @@ public void testAccountsTxGet_ClientServer_Backups2_CoordinatorFails_Persistence /** * @throws Exception If failed. */ + @Test public void testAccountsTxGet_Server_Backups1_CoordinatorFails() throws Exception { accountsTxReadAll(2, 0, 1, DFLT_PARTITION_COUNT, null, true, GET, PUT, DFLT_TEST_TIME, RestartMode.RESTART_CRD); @@ -59,6 +61,7 @@ public void testAccountsTxGet_Server_Backups1_CoordinatorFails() throws Exceptio /** * @throws Exception If failed. */ + @Test public void testAccountsTxScan_ClientServer_Backups2_CoordinatorFails() throws Exception { accountsTxReadAll(4, 2, 2, DFLT_PARTITION_COUNT, null, true, SCAN, PUT, DFLT_TEST_TIME, RestartMode.RESTART_CRD); @@ -67,6 +70,7 @@ public void testAccountsTxScan_ClientServer_Backups2_CoordinatorFails() throws E /** * @throws Exception If failed. */ + @Test public void testAccountsTxScan_Server_Backups1_CoordinatorFails_Persistence() throws Exception { persistence = true; @@ -77,6 +81,7 @@ public void testAccountsTxScan_Server_Backups1_CoordinatorFails_Persistence() th /** * @throws Exception If failed. */ + @Test public void testPutAllGetAll_ClientServer_Backups2_RestartCoordinator_GetPut() throws Exception { putAllGetAll(RestartMode.RESTART_CRD, 4, 2, 2, DFLT_PARTITION_COUNT, null, GET, PUT); @@ -85,6 +90,7 @@ public void testPutAllGetAll_ClientServer_Backups2_RestartCoordinator_GetPut() t /** * @throws Exception If failed. */ + @Test public void testPutAllGetAll_ClientServer_Backups1_RestartCoordinator_GetPut_Persistence() throws Exception { persistence = true; @@ -95,6 +101,7 @@ public void testPutAllGetAll_ClientServer_Backups1_RestartCoordinator_GetPut_Per /** * @throws Exception If failed. */ + @Test public void testUpdate_N_Objects_ClientServer_Backups1_PutGet_CoordinatorFails_Persistence() throws Exception { persistence = true; @@ -105,6 +112,7 @@ public void testUpdate_N_Objects_ClientServer_Backups1_PutGet_CoordinatorFails_P /** * @throws Exception If failed. */ + @Test public void testUpdate_N_Objects_ClientServer_Backups1__PutGet_CoordinatorFails() throws Exception { updateNObjectsTest(10, 3, 2, 1, DFLT_PARTITION_COUNT, DFLT_TEST_TIME, null, GET, PUT, RestartMode.RESTART_CRD); @@ -114,6 +122,7 @@ public void testUpdate_N_Objects_ClientServer_Backups1__PutGet_CoordinatorFails( /** * @throws Exception If failed. */ + @Test public void testGetReadInProgressCoordinatorFails() throws Exception { readInProgressCoordinatorFails(false, false, PESSIMISTIC, REPEATABLE_READ, GET, PUT, null); } @@ -121,6 +130,7 @@ public void testGetReadInProgressCoordinatorFails() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetReadInsideTxInProgressCoordinatorFails() throws Exception { readInProgressCoordinatorFails(false, true, PESSIMISTIC, REPEATABLE_READ, GET, PUT, null); } @@ -128,6 +138,7 @@ public void testGetReadInsideTxInProgressCoordinatorFails() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetReadInProgressCoordinatorFails_ReadDelay() throws Exception { readInProgressCoordinatorFails(true, false, PESSIMISTIC, REPEATABLE_READ, GET, PUT, null); } @@ -135,6 +146,7 @@ public void testGetReadInProgressCoordinatorFails_ReadDelay() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetReadInsideTxInProgressCoordinatorFails_ReadDelay() throws Exception { readInProgressCoordinatorFails(true, true, PESSIMISTIC, REPEATABLE_READ, GET, PUT, null); } @@ -142,6 +154,7 @@ public void testGetReadInsideTxInProgressCoordinatorFails_ReadDelay() throws Exc /** * @throws Exception If failed. */ + @Test public void testReadInProgressCoordinatorFailsSimple_FromServerPutGet() throws Exception { readInProgressCoordinatorFailsSimple(false, null, GET, PUT); } @@ -149,6 +162,7 @@ public void testReadInProgressCoordinatorFailsSimple_FromServerPutGet() throws E /** * @throws Exception If failed. */ + @Test public void testActivateDeactivateCLuster() throws Exception { disableScheduledVacuum = true; persistence = true; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccProcessorLazyStartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccProcessorLazyStartTest.java index 064e7bbd2a7af..5147cfbb856d6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccProcessorLazyStartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccProcessorLazyStartTest.java @@ -37,6 +37,7 @@ public class CacheMvccProcessorLazyStartTest extends CacheMvccAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPreconfiguredCacheMvccNotStarted() throws Exception { CacheConfiguration ccfg = cacheConfiguration(CacheMode.PARTITIONED, CacheWriteSynchronizationMode.FULL_SYNC, 0, 1); ccfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL); @@ -60,6 +61,7 @@ public void testPreconfiguredCacheMvccNotStarted() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPreconfiguredCacheMvccStarted() throws Exception { CacheConfiguration ccfg = cacheConfiguration(CacheMode.PARTITIONED, CacheWriteSynchronizationMode.FULL_SYNC, 0, 1); @@ -82,6 +84,7 @@ public void testPreconfiguredCacheMvccStarted() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccRestartedWithDynamicCache() throws Exception { persistence = true; @@ -129,6 +132,7 @@ public void testMvccRestartedWithDynamicCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccStartedWithDynamicCache() throws Exception { IgniteEx node1 = startGrid(1); IgniteEx node2 = startGrid(2); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccProcessorTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccProcessorTest.java index 7339a7d4db8da..d6430e1491e94 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccProcessorTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccProcessorTest.java @@ -37,6 +37,7 @@ public class CacheMvccProcessorTest extends CacheMvccAbstractTest { /** * @throws Exception If failed. */ + @Test public void testTreeWithPersistence() throws Exception { persistence = true; @@ -46,6 +47,7 @@ public void testTreeWithPersistence() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTreeWithoutPersistence() throws Exception { persistence = false; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccRemoteTxOnNearNodeStartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccRemoteTxOnNearNodeStartTest.java index 592cff672aff4..1016a9d239598 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccRemoteTxOnNearNodeStartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccRemoteTxOnNearNodeStartTest.java @@ -41,6 +41,7 @@ public class CacheMvccRemoteTxOnNearNodeStartTest extends CacheMvccAbstractTest * when first request is sent to OWNING partition and second to MOVING partition. * @throws Exception if failed. */ + @Test public void testRemoteTxOnNearNodeIsStartedIfPartitionIsMoving() throws Exception { startGridsMultiThreaded(3); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccScanQueryWithConcurrentTransactionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccScanQueryWithConcurrentTransactionTest.java index 8af6a5b9c03ab..62defed189b7b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccScanQueryWithConcurrentTransactionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccScanQueryWithConcurrentTransactionTest.java @@ -36,6 +36,7 @@ public class CacheMvccScanQueryWithConcurrentTransactionTest extends CacheMvccAb /** * @throws Exception if failed. */ + @Test public void testScanQuery() throws Exception { doTestConsistency(clo); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSizeWithConcurrentTransactionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSizeWithConcurrentTransactionTest.java index 2b8b73ed2f455..90f0407059570 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSizeWithConcurrentTransactionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSizeWithConcurrentTransactionTest.java @@ -29,6 +29,7 @@ public class CacheMvccSizeWithConcurrentTransactionTest extends CacheMvccAbstrac /** * @throws Exception if failed. */ + @Test public void testSize() throws Exception { doTestConsistency(clo); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTransactionsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTransactionsTest.java index 50c07cf307231..c8e999b7d7feb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTransactionsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTransactionsTest.java @@ -118,6 +118,7 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest { /** * @throws Exception if failed. */ + @Test public void testEmptyTx() throws Exception { Ignite node = startGrids(2); @@ -137,6 +138,7 @@ public void testEmptyTx() throws Exception { /** * @throws Exception if failed. */ + @Test public void testImplicitTxOps() throws Exception { checkTxWithAllCaches(new CI1>() { @Override public void apply(IgniteCache cache) { @@ -241,6 +243,7 @@ public void testImplicitTxOps() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticTx1() throws Exception { checkTxWithAllCaches(new CI1>() { @Override public void apply(IgniteCache cache) { @@ -281,6 +284,7 @@ public void testPessimisticTx1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticTx2() throws Exception { checkTxWithAllCaches(new CI1>() { @Override public void apply(IgniteCache cache) { @@ -316,6 +320,7 @@ public void testPessimisticTx2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticTx3() throws Exception { checkTxWithAllCaches(new CI1>() { @Override public void apply(IgniteCache cache) { @@ -404,6 +409,7 @@ private void checkTxWithAllCaches(IgniteInClosure> /** * @throws Exception If failed. */ + @Test public void testWithCacheGroups() throws Exception { Ignite srv0 = startGrid(0); @@ -462,6 +468,7 @@ public void testWithCacheGroups() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheRecreate() throws Exception { cacheRecreate(null); } @@ -469,6 +476,7 @@ public void testCacheRecreate() throws Exception { /** * @throws Exception If failed. */ + @Test public void testActiveQueriesCleanup() throws Exception { activeQueriesCleanup(false); } @@ -476,6 +484,7 @@ public void testActiveQueriesCleanup() throws Exception { /** * @throws Exception If failed. */ + @Test public void testActiveQueriesCleanupTx() throws Exception { activeQueriesCleanup(true); } @@ -540,6 +549,7 @@ private void activeQueriesCleanup(final boolean tx) throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxReadIsolationSimple() throws Exception { Ignite srv0 = startGrids(4); @@ -626,6 +636,7 @@ public void testTxReadIsolationSimple() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutGetAllSimple() throws Exception { Ignite node = startGrid(0); @@ -685,6 +696,7 @@ public void testPutGetAllSimple() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutRemoveSimple() throws Exception { putRemoveSimple(false); } @@ -692,6 +704,7 @@ public void testPutRemoveSimple() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutRemoveSimple_LargeKeys() throws Exception { putRemoveSimple(true); } @@ -826,6 +839,7 @@ private void checkValues(Map expVals, IgniteCache accounts) { /** * @throws Exception If failed */ + @Test public void testOperationsSequenceScanConsistency_SingleNode_SinglePartition() throws Exception { operationsSequenceConsistency(1, 0, 0, 1, SCAN); } @@ -1903,6 +1962,7 @@ public void testOperationsSequenceScanConsistency_SingleNode_SinglePartition() t /** * @throws Exception If failed */ + @Test public void testOperationsSequenceScanConsistency_SingleNode() throws Exception { operationsSequenceConsistency(1, 0, 0, 64, SCAN); } @@ -1910,6 +1970,7 @@ public void testOperationsSequenceScanConsistency_SingleNode() throws Exception /** * @throws Exception If failed */ + @Test public void testOperationsSequenceScanConsistency_ClientServer_Backups0() throws Exception { operationsSequenceConsistency(4, 2, 0, 64, SCAN); } @@ -1917,6 +1978,7 @@ public void testOperationsSequenceScanConsistency_ClientServer_Backups0() throws /** * @throws Exception If failed */ + @Test public void testOperationsSequenceScanConsistency_ClientServer_Backups1() throws Exception { operationsSequenceConsistency(4, 2, 1, 64, SCAN); } @@ -1924,6 +1986,7 @@ public void testOperationsSequenceScanConsistency_ClientServer_Backups1() throws /** * @throws Exception If failed */ + @Test public void testOperationsSequenceGetConsistency_SingleNode_SinglePartition() throws Exception { operationsSequenceConsistency(1, 0, 0, 1, GET); } @@ -1931,6 +1994,7 @@ public void testOperationsSequenceGetConsistency_SingleNode_SinglePartition() th /** * @throws Exception If failed */ + @Test public void testOperationsSequenceGetConsistency_SingleNode() throws Exception { operationsSequenceConsistency(1, 0, 0, 64, GET); } @@ -1938,6 +2002,7 @@ public void testOperationsSequenceGetConsistency_SingleNode() throws Exception { /** * @throws Exception If failed */ + @Test public void testOperationsSequenceGetConsistency_ClientServer_Backups0() throws Exception { operationsSequenceConsistency(4, 2, 0, 64, GET); } @@ -1945,6 +2010,7 @@ public void testOperationsSequenceGetConsistency_ClientServer_Backups0() throws /** * @throws Exception If failed */ + @Test public void testOperationsSequenceGetConsistency_ClientServer_Backups1() throws Exception { operationsSequenceConsistency(4, 2, 1, 64, GET); } @@ -2094,6 +2160,7 @@ private void operationsSequenceConsistency( /** * @throws Exception If failed. */ + @Test public void testNodesRestartNoHang() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-5935"); @@ -2211,6 +2278,7 @@ public void testNodesRestartNoHang() throws Exception { /** * @throws Exception If failed. */ + @Test public void testActiveQueryCleanupOnNodeFailure() throws Exception { testSpi = true; @@ -2258,6 +2326,7 @@ public void testActiveQueryCleanupOnNodeFailure() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRebalanceSimple() throws Exception { Ignite srv0 = startGrid(0); @@ -2337,6 +2406,7 @@ public void testRebalanceSimple() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRebalanceWithRemovedValuesSimple() throws Exception { Ignite node = startGrid(0); @@ -2389,6 +2459,7 @@ public void testRebalanceWithRemovedValuesSimple() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxPrepareFailureSimplePessimisticTx() throws Exception { testSpi = true; @@ -2462,6 +2533,7 @@ public void testTxPrepareFailureSimplePessimisticTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccCoordinatorChangeSimple() throws Exception { Ignite srv0 = startGrid(0); @@ -2546,6 +2618,7 @@ private void checkPutGet(List cacheNames) { /** * @throws Exception If failed. */ + @Test public void testMvccCoordinatorInfoConsistency() throws Exception { for (int i = 0; i < 4; i++) { startGrid(i); @@ -2578,6 +2651,7 @@ public void testMvccCoordinatorInfoConsistency() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccCoordinatorInfoConsistency_Persistence() throws Exception { persistence = true; @@ -2608,6 +2682,7 @@ private void checkCoordinatorsConsistency(@Nullable Integer expNodes) { /** * @throws Exception If failed. */ + @Test public void testGetVersionRequestFailover() throws Exception { final int NODES = 5; @@ -2698,6 +2773,7 @@ public void testGetVersionRequestFailover() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLoadWithStreamer() throws Exception { startGridsMultiThreaded(5); @@ -2731,6 +2807,7 @@ public void testLoadWithStreamer() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUpdate_N_Objects_SingleNode_SinglePartition_Get() throws Exception { int[] nValues = {3, 5, 10}; @@ -2744,6 +2821,7 @@ public void testUpdate_N_Objects_SingleNode_SinglePartition_Get() throws Excepti /** * @throws Exception If failed. */ + @Test public void testUpdate_N_Objects_SingleNode_Get() throws Exception { int[] nValues = {3, 5, 10}; @@ -2757,6 +2835,7 @@ public void testUpdate_N_Objects_SingleNode_Get() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUpdate_N_Objects_SingleNode_SinglePartition_Scan() throws Exception { int[] nValues = {3, 5, 10}; @@ -2770,6 +2849,7 @@ public void testUpdate_N_Objects_SingleNode_SinglePartition_Scan() throws Except /** * @throws Exception If failed. */ + @Test public void testUpdate_N_Objects_SingleNode_Scan() throws Exception { int[] nValues = {3, 5, 10}; @@ -2783,6 +2863,7 @@ public void testUpdate_N_Objects_SingleNode_Scan() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUpdate_N_Objects_ClientServer_Backups2_Get() throws Exception { int[] nValues = {3, 5, 10}; @@ -2796,6 +2877,7 @@ public void testUpdate_N_Objects_ClientServer_Backups2_Get() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUpdate_N_Objects_ClientServer_Backups1_Scan() throws Exception { int[] nValues = {3, 5, 10}; @@ -2809,6 +2891,7 @@ public void testUpdate_N_Objects_ClientServer_Backups1_Scan() throws Exception { /** * @throws Exception If failed. */ + @Test public void testImplicitPartsScan_SingleNode_SinglePartition() throws Exception { doImplicitPartsScanTest(1, 0, 0, 1, 10_000); } @@ -2816,6 +2899,7 @@ public void testImplicitPartsScan_SingleNode_SinglePartition() throws Exception /** * @throws Exception If failed. */ + @Test public void testImplicitPartsScan_SingleNode() throws Exception { doImplicitPartsScanTest(1, 0, 0, 64, 10_000); } @@ -2823,6 +2907,7 @@ public void testImplicitPartsScan_SingleNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testImplicitPartsScan_ClientServer_Backups0() throws Exception { doImplicitPartsScanTest(4, 2, 0, 64, 10_000); } @@ -2830,6 +2915,7 @@ public void testImplicitPartsScan_ClientServer_Backups0() throws Exception { /** * @throws Exception If failed. */ + @Test public void testImplicitPartsScan_ClientServer_Backups1() throws Exception { doImplicitPartsScanTest(4, 2, 1, 64, 10_000); } @@ -2837,6 +2923,7 @@ public void testImplicitPartsScan_ClientServer_Backups1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testImplicitPartsScan_ClientServer_Backups2() throws Exception { doImplicitPartsScanTest(4, 2, 2, 64, 10_000); } @@ -3035,6 +3122,7 @@ private void doImplicitPartsScanTest( /** * @throws IgniteCheckedException If failed. */ + @Test public void testSize() throws Exception { Ignite node = startGrid(0); @@ -3198,6 +3286,7 @@ public void testSize() throws Exception { /** * @throws IgniteCheckedException If failed. */ + @Test public void testInternalApi() throws Exception { Ignite node = startGrid(0); @@ -3298,6 +3387,7 @@ public void testInternalApi() throws Exception { /** * @throws Exception If failed. */ + @Test public void testExpiration() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-7311"); @@ -3353,6 +3443,7 @@ public void testExpiration() throws Exception { /** * @throws Exception If failed. */ + @Test public void testChangeExpireTime() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-7311"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTxFailoverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTxFailoverTest.java index 7aae61352bfc8..3f3a659ff9602 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTxFailoverTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTxFailoverTest.java @@ -88,6 +88,7 @@ protected CacheConfiguration cacheConfiguration() { /** * @throws Exception If fails. */ + @Test public void testSingleNodeTxMissedRollback() throws Exception { checkSingleNodeRestart(true, false, true); } @@ -95,6 +96,7 @@ public void testSingleNodeTxMissedRollback() throws Exception { /** * @throws Exception If fails. */ + @Test public void testSingleNodeTxMissedRollbackRecoverFromWAL() throws Exception { checkSingleNodeRestart(true, true, true); } @@ -102,6 +104,7 @@ public void testSingleNodeTxMissedRollbackRecoverFromWAL() throws Exception { /** * @throws Exception If fails. */ + @Test public void testSingleNodeTxMissedCommit() throws Exception { checkSingleNodeRestart(false, false, true); } @@ -109,6 +112,7 @@ public void testSingleNodeTxMissedCommit() throws Exception { /** * @throws Exception If fails. */ + @Test public void testSingleNodeTxMissedCommitRecoverFromWAL() throws Exception { checkSingleNodeRestart(false, true, true); } @@ -116,6 +120,7 @@ public void testSingleNodeTxMissedCommitRecoverFromWAL() throws Exception { /** * @throws Exception If fails. */ + @Test public void testSingleNodeRollbackedTxRecoverFromWAL() throws Exception { checkSingleNodeRestart(true, true, false); } @@ -123,6 +128,7 @@ public void testSingleNodeRollbackedTxRecoverFromWAL() throws Exception { /** * @throws Exception If fails. */ + @Test public void testSingleNodeCommitedTxRecoverFromWAL() throws Exception { checkSingleNodeRestart(false, true, false); } @@ -208,6 +214,7 @@ public void checkSingleNodeRestart(boolean rollBack, boolean recoverFromWAL, boo /** * @throws Exception If fails. */ + @Test public void testLostRollbackOnBackup() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10219"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccVacuumTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccVacuumTest.java index 0d1b20738cf56..0a9c67f857f16 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccVacuumTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccVacuumTest.java @@ -40,6 +40,7 @@ public class CacheMvccVacuumTest extends CacheMvccAbstractTest { /** * @throws Exception If failed. */ + @Test public void testStartStopVacuumInMemory() throws Exception { Ignite node0 = startGrid(0); Ignite node1 = startGrid(1); @@ -70,6 +71,7 @@ public void testStartStopVacuumInMemory() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStartStopVacuumPersistence() throws Exception { persistence = true; @@ -131,6 +133,7 @@ public void testStartStopVacuumPersistence() throws Exception { /** * @throws Exception If failed. */ + @Test public void testVacuumNotStartedWithoutMvcc() throws Exception { IgniteConfiguration cfg = getConfiguration("grid1"); @@ -142,6 +145,7 @@ public void testVacuumNotStartedWithoutMvcc() throws Exception { /** * @throws Exception If failed. */ + @Test public void testVacuumNotStartedWithoutMvccPersistence() throws Exception { persistence = true; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccCachePeekTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccCachePeekTest.java index 539283b0c0aee..c086452d7a559 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccCachePeekTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccCachePeekTest.java @@ -57,6 +57,7 @@ private interface ThrowingRunnable { /** * @throws Exception if failed. */ + @Test public void testPeek() throws Exception { doWithCache(this::checkPeekSerial); doWithCache(this::checkPeekDoesNotSeeAbortedVersions); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccUnsupportedTxModesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccUnsupportedTxModesTest.java index bd82405e2fe33..34e4f7bb95557 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccUnsupportedTxModesTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccUnsupportedTxModesTest.java @@ -62,231 +62,277 @@ public class MvccUnsupportedTxModesTest extends GridCommonAbstractTest { } /** */ + @Test public void testGetAndPutIfAbsent() { checkOperation(() -> cache.getAndPutIfAbsent(1, 1)); } /** */ + @Test public void testGetAndPutIfAbsentAsync() { checkOperation(() -> cache.getAndPutIfAbsentAsync(1, 1)); } /** */ + @Test public void testGet() { checkOperation(() -> cache.get(1)); } /** */ + @Test public void testGetAsync() { checkOperation(() -> cache.getAsync(1)); } /** */ + @Test public void testGetEntry() { checkOperation(() -> cache.getEntry(1)); } /** */ + @Test public void testGetEntryAsync() { checkOperation(() -> cache.getEntryAsync(1)); } /** */ + @Test public void testGetAll() { checkOperation(() -> cache.getAll(singleton(1))); } /** */ + @Test public void testGetAllAsync() { checkOperation(() -> cache.getAllAsync(singleton(1))); } /** */ + @Test public void testGetEntries() { checkOperation(() -> cache.getEntries(singleton(1))); } /** */ + @Test public void testGetEntriesAsync() { checkOperation(() -> cache.getEntriesAsync(singleton(1))); } /** */ + @Test public void testContainsKey() { checkOperation(() -> cache.containsKey(1)); } /** */ + @Test public void testContainsKeyAsync() { checkOperation(() -> cache.containsKeyAsync(1)); } /** */ + @Test public void testContainsKeys() { checkOperation(() -> cache.containsKeys(singleton(1))); } /** */ + @Test public void testContainsKeysAsync() { checkOperation(() -> cache.containsKeysAsync(singleton(1))); } /** */ + @Test public void testPut() { checkOperation(() -> cache.put(1, 1)); } /** */ + @Test public void testPutAsync() { checkOperation(() -> cache.putAsync(1, 1)); } /** */ + @Test public void testGetAndPut() { checkOperation(() -> cache.getAndPut(1, 1)); } /** */ + @Test public void testGetAndPutAsync() { checkOperation(() -> cache.getAndPutAsync(1, 1)); } /** */ + @Test public void testPutAll() { checkOperation(() -> cache.putAll(ImmutableMap.of(1, 1))); } /** */ + @Test public void testPutAllAsync() { checkOperation(() -> cache.putAllAsync(ImmutableMap.of(1, 1))); } /** */ + @Test public void testPutIfAbsent() { checkOperation(() -> cache.putIfAbsent(1, 1)); } /** */ + @Test public void testPutIfAbsentAsync() { checkOperation(() -> cache.putIfAbsentAsync(1, 1)); } /** */ + @Test public void testRemove1() { checkOperation(() -> cache.remove(1)); } /** */ + @Test public void testRemoveAsync1() { checkOperation(() -> cache.removeAsync(1)); } /** */ + @Test public void testRemove2() { checkOperation(() -> cache.remove(1, 1)); } /** */ + @Test public void testRemoveAsync2() { checkOperation(() -> cache.removeAsync(1, 1)); } /** */ + @Test public void testGetAndRemove() { checkOperation(() -> cache.getAndRemove(1)); } /** */ + @Test public void testGetAndRemoveAsync() { checkOperation(() -> cache.getAndRemoveAsync(1)); } /** */ + @Test public void testReplace1() { checkOperation(() -> cache.replace(1, 1, 1)); } /** */ + @Test public void testReplaceAsync1() { checkOperation(() -> cache.replaceAsync(1, 1, 1)); } /** */ + @Test public void testReplace2() { checkOperation(() -> cache.replace(1, 1)); } /** */ + @Test public void testReplaceAsync2() { checkOperation(() -> cache.replaceAsync(1, 1)); } /** */ + @Test public void testGetAndReplace() { checkOperation(() -> cache.getAndReplace(1, 1)); } /** */ + @Test public void testGetAndReplaceAsync() { checkOperation(() -> cache.getAndReplaceAsync(1, 1)); } /** */ + @Test public void testRemoveAll1() { checkOperation(() -> cache.removeAll(singleton(1))); } /** */ + @Test public void testRemoveAllAsync1() { checkOperation(() -> cache.removeAllAsync(singleton(1))); } /** */ + @Test public void testInvoke1() { checkOperation(() -> cache.invoke(1, testEntryProcessor)); } /** */ + @Test public void testInvokeAsync1() { checkOperation(() -> cache.invokeAsync(1, testEntryProcessor)); } /** */ + @Test public void testInvoke2() { checkOperation(() -> cache.invoke(1, testEntryProcessor)); } /** */ + @Test public void testInvokeAsync2() { checkOperation(() -> cache.invokeAsync(1, testEntryProcessor)); } /** */ + @Test public void testInvokeAll1() { checkOperation(() -> cache.invokeAll(singleton(1), testEntryProcessor)); } /** */ + @Test public void testInvokeAllAsync1() { checkOperation(() -> cache.invokeAllAsync(singleton(1), testEntryProcessor)); } /** */ + @Test public void testInvokeAll2() { checkOperation(() -> cache.invokeAll(singleton(1), testEntryProcessor)); } /** */ + @Test public void testInvokeAllAsync2() { checkOperation(() -> cache.invokeAllAsync(singleton(1), testEntryProcessor)); } /** */ + @Test public void testInvokeAll3() { checkOperation(() -> cache.invokeAll(Collections.singletonMap(1, testEntryProcessor))); } /** */ + @Test public void testInvokeAllAsync3() { checkOperation(() -> cache.invokeAllAsync(Collections.singletonMap(1, testEntryProcessor))); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgniteBaselineAffinityTopologyActivationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgniteBaselineAffinityTopologyActivationTest.java index 838c7327e2aaa..637ee08557d33 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgniteBaselineAffinityTopologyActivationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgniteBaselineAffinityTopologyActivationTest.java @@ -117,6 +117,7 @@ public class IgniteBaselineAffinityTopologyActivationTest extends GridCommonAbst * (it is the node that once wasn't presented in branchingHistory but hasn't participated in any branching point) * joins the cluster after restart, cluster gets activated. */ + @Test public void testAutoActivationWithCompatibleOldNode() throws Exception { startGridWithConsistentId("A"); startGridWithConsistentId("B"); @@ -168,6 +169,7 @@ public void testAutoActivationWithCompatibleOldNode() throws Exception { * IgniteCluster::setBaselineTopology(long topVer) should throw an exception * when online node from current BaselineTopology is not presented in topology version. */ + @Test public void testBltChangeTopVerRemoveOnlineNodeFails() throws Exception { Ignite ignite = startGridWithConsistentId("A"); @@ -198,6 +200,7 @@ public void testBltChangeTopVerRemoveOnlineNodeFails() throws Exception { /** * Verifies that online nodes cannot be removed from BaselineTopology (this may change in future). */ + @Test public void testOnlineNodesCannotBeRemovedFromBaselineTopology() throws Exception { Ignite nodeA = startGridWithConsistentId("A"); Ignite nodeB = startGridWithConsistentId("B"); @@ -224,6 +227,7 @@ public void testOnlineNodesCannotBeRemovedFromBaselineTopology() throws Exceptio /** * */ + @Test public void testNodeFailsToJoinWithIncompatiblePreviousBaselineTopology() throws Exception { startGridWithConsistentId("A"); startGridWithConsistentId("B"); @@ -272,6 +276,7 @@ public void testNodeFailsToJoinWithIncompatiblePreviousBaselineTopology() throws * Verifies scenario when parts of grid were activated independently they are not allowed to join * into the same grid again (due to risks of incompatible data modifications). */ + @Test public void testIncompatibleBltNodeIsProhibitedToJoinCluster() throws Exception { startGridWithConsistentId("A"); startGridWithConsistentId("B"); @@ -315,6 +320,7 @@ public void testIncompatibleBltNodeIsProhibitedToJoinCluster() throws Exception /** * Test verifies that node with out-of-data but still compatible Baseline Topology is allowed to join the cluster. */ + @Test public void testNodeWithOldBltIsAllowedToJoinCluster() throws Exception { final long expectedHash1 = (long)"A".hashCode() + "B".hashCode() + "C".hashCode(); @@ -376,6 +382,7 @@ public void testNodeWithOldBltIsAllowedToJoinCluster() throws Exception { * * @throws Exception If failed. */ + @Test public void testNodeJoinsDuringPartitionMapExchange() throws Exception { startGridWithConsistentId("A"); startGridWithConsistentId("B"); @@ -477,6 +484,7 @@ private void checkBaselineTopologyOnNode( * * @throws Exception If failed. */ + @Test public void testNodeWithBltIsNotAllowedToJoinClusterDuringFirstActivation() throws Exception { Ignite nodeC = startGridWithConsistentId("C"); @@ -528,6 +536,7 @@ public void testNodeWithBltIsNotAllowedToJoinClusterDuringFirstActivation() thro * Verifies that when new node outside of baseline topology joins active cluster with BLT already set * it receives BLT from the cluster and stores it locally. */ + @Test public void testNewNodeJoinsToActiveCluster() throws Exception { Ignite nodeA = startGridWithConsistentId("A"); Ignite nodeB = startGridWithConsistentId("B"); @@ -561,6 +570,7 @@ public void testNewNodeJoinsToActiveCluster() throws Exception { /** * */ + @Test public void testRemoveNodeFromBaselineTopology() throws Exception { final long expectedActivationHash = (long)"A".hashCode() + "C".hashCode(); @@ -615,6 +625,7 @@ public void testRemoveNodeFromBaselineTopology() throws Exception { /** * */ + @Test public void testAddNodeToBaselineTopology() throws Exception { final long expectedActivationHash = (long)"A".hashCode() + "B".hashCode() + "C".hashCode() + "D".hashCode(); @@ -646,6 +657,7 @@ public void testAddNodeToBaselineTopology() throws Exception { /** * Verifies that baseline topology is removed successfully through baseline changing API. */ + @Test public void testRemoveBaselineTopology() throws Exception { BaselineTopologyVerifier verifier = new BaselineTopologyVerifier() { @Override public void verify(BaselineTopology blt) { @@ -705,6 +717,7 @@ private Ignite startGridWithConsistentId(String consId) throws Exception { * Verifies that when new node joins already active cluster and new activation request is issued, * no changes to BaselineTopology branching history happen. */ + @Test public void testActivationHashIsNotUpdatedOnMultipleActivationRequests() throws Exception { final long expectedActivationHash = (long)"A".hashCode(); @@ -731,6 +744,7 @@ public void testActivationHashIsNotUpdatedOnMultipleActivationRequests() throws * Verifies that grid is autoactivated when full BaselineTopology is preset even on one node * and then all other nodes from BaselineTopology are started. */ + @Test public void testAutoActivationWithBaselineTopologyPreset() throws Exception { Ignite ig = startGridWithConsistentId("A"); @@ -771,6 +785,7 @@ private BaselineNode createBaselineNodeWithConsId(String consId) { } /** */ + @Test public void testAutoActivationSimple() throws Exception { startGrids(3); @@ -804,6 +819,7 @@ public void testAutoActivationSimple() throws Exception { /** * */ + @Test public void testNoAutoActivationOnJoinNewNodeToInactiveCluster() throws Exception { startGrids(2); @@ -829,6 +845,7 @@ public void testNoAutoActivationOnJoinNewNodeToInactiveCluster() throws Exceptio /** * Verifies that neither BaselineTopology nor BaselineTopologyHistory are changed when cluster is deactivated. */ + @Test public void testBaselineTopologyRemainsTheSameOnClusterDeactivation() throws Exception { startGrids(2); @@ -858,6 +875,7 @@ public void testBaselineTopologyRemainsTheSameOnClusterDeactivation() throws Exc /** * */ + @Test public void testBaselineHistorySyncWithNewNode() throws Exception { final long expectedBranchingHash = "A".hashCode() + "B".hashCode() + "C".hashCode(); @@ -899,6 +917,7 @@ public void testBaselineHistorySyncWithNewNode() throws Exception { /** * */ + @Test public void testBaselineHistorySyncWithOldNodeWithCompatibleHistory() throws Exception { final long expectedBranchingHash0 = "A".hashCode() + "B".hashCode() + "C".hashCode(); @@ -955,6 +974,7 @@ public void testBaselineHistorySyncWithOldNodeWithCompatibleHistory() throws Exc /** * @throws Exception if failed. */ + @Test public void testBaselineNotDeletedOnDeactivation() throws Exception { Ignite nodeA = startGridWithConsistentId("A"); startGridWithConsistentId("B"); @@ -990,6 +1010,7 @@ public void testBaselineNotDeletedOnDeactivation() throws Exception { /** * */ + @Test public void testNodeWithBltIsProhibitedToJoinNewCluster() throws Exception { BaselineTopologyVerifier nullVerifier = new BaselineTopologyVerifier() { @Override public void verify(BaselineTopology blt) { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgniteDataStorageMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgniteDataStorageMetricsSelfTest.java index 0f5aef9ac3744..b66d6739d822a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgniteDataStorageMetricsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgniteDataStorageMetricsSelfTest.java @@ -148,6 +148,7 @@ private CacheConfiguration cacheConfiguration( /** * @throws Exception if failed. */ + @Test public void testPersistenceMetrics() throws Exception { final IgniteEx ig = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsBinaryMetadataOnClusterRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsBinaryMetadataOnClusterRestartTest.java index 9121cca5ad8e1..d935465649200 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsBinaryMetadataOnClusterRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsBinaryMetadataOnClusterRestartTest.java @@ -116,6 +116,7 @@ public class IgnitePdsBinaryMetadataOnClusterRestartTest extends GridCommonAbstr /** * @see IGNITE-7258 refer to the following JIRA for more context about the problem verified by the test. */ + @Test public void testUpdatedBinaryMetadataIsPreservedOnJoinToOldCoordinator() throws Exception { Ignite ignite0 = startGridInASeparateWorkDir("A"); Ignite ignite1 = startGridInASeparateWorkDir("B"); @@ -169,6 +170,7 @@ public void testUpdatedBinaryMetadataIsPreservedOnJoinToOldCoordinator() throws /** * @see IGNITE-7258 refer to the following JIRA for more context about the problem verified by the test. */ + @Test public void testNewBinaryMetadataIsWrittenOnOldCoordinator() throws Exception { Ignite ignite0 = startGridInASeparateWorkDir("A"); Ignite ignite1 = startGridInASeparateWorkDir("B"); @@ -223,6 +225,7 @@ public void testNewBinaryMetadataIsWrittenOnOldCoordinator() throws Exception { * * @see IGNITE-7258 refer to the following JIRA for more context about the problem verified by the test. */ + @Test public void testNewBinaryMetadataIsPropagatedToAllOutOfDataNodes() throws Exception { Ignite igniteA = startGridInASeparateWorkDir("A"); startGridInASeparateWorkDir("B"); @@ -290,6 +293,7 @@ private String binaryTypeName(BinaryObject bObj) { * * @see IGNITE-7258 refer to the following JIRA for more context about the problem verified by the test. */ + @Test public void testNodeWithIncompatibleMetadataIsProhibitedToJoinTheCluster() throws Exception { final String decimalFieldName = "decField"; @@ -368,6 +372,7 @@ private void copyIncompatibleBinaryMetadata(String fromWorkDir, * Test verifies that binary metadata from regular java classes is saved and restored correctly * on cluster restart. */ + @Test public void testStaticMetadataIsRestoredOnRestart() throws Exception { clientMode = false; @@ -443,6 +448,7 @@ private void examineDynamicMetadata(int nodesCount, BinaryObjectExaminer... exam * Test verifies that metadata for binary types built with BinaryObjectBuilder is saved and updated correctly * on cluster restart. */ + @Test public void testDynamicMetadataIsRestoredOnRestart() throws Exception { clientMode = false; //1: start two nodes, add single BinaryObject @@ -509,6 +515,7 @@ public void testDynamicMetadataIsRestoredOnRestart() throws Exception { /** * */ + @Test public void testBinaryEnumMetadataIsRestoredOnRestart() throws Exception { clientMode = false; @@ -550,6 +557,7 @@ public void testBinaryEnumMetadataIsRestoredOnRestart() throws Exception { /** * Test verifies that metadata is saved, stored and delivered to client nodes correctly. */ + @Test public void testMixedMetadataIsRestoredOnRestart() throws Exception { clientMode = false; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsBinarySortObjectFieldsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsBinarySortObjectFieldsTest.java index 70a0203b5ebb2..cde234bf5833b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsBinarySortObjectFieldsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsBinarySortObjectFieldsTest.java @@ -121,6 +121,7 @@ public void setVal(Long val) { /** * @throws Exception if failed. */ + @Test public void testGivenCacheWithPojoValueAndPds_WhenPut_ThenNoHangup() throws Exception { System.setProperty("IGNITE_BINARY_SORT_OBJECT_FIELDS", "true"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCacheAssignmentNodeRestartsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCacheAssignmentNodeRestartsTest.java index 032b422a60bc8..008318e762ede 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCacheAssignmentNodeRestartsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCacheAssignmentNodeRestartsTest.java @@ -127,6 +127,7 @@ private CacheConfiguration cacheConfiguration(String name, /** * @throws Exception If failed. */ + @Test public void testAssignmentAfterRestarts() throws Exception { try { System.setProperty(IGNITE_PDS_CHECKPOINT_TEST_SKIP_SYNC, "true"); @@ -258,4 +259,4 @@ private void checkAffinity() throws Exception { } } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCacheConfigurationFileConsistencyCheckTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCacheConfigurationFileConsistencyCheckTest.java index 74a3950239195..79558f35d4a75 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCacheConfigurationFileConsistencyCheckTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCacheConfigurationFileConsistencyCheckTest.java @@ -102,6 +102,7 @@ public class IgnitePdsCacheConfigurationFileConsistencyCheckTest extends GridCom * * @throws Exception If fails. */ + @Test public void testStartDuplicatedCacheConfigurations() throws Exception { IgniteEx ig0 = (IgniteEx)startGrids(NODES); @@ -129,6 +130,7 @@ public void testStartDuplicatedCacheConfigurations() throws Exception { * * @throws Exception If failed. */ + @Test public void testTmpCacheConfigurationsDelete() throws Exception { IgniteEx ig0 = (IgniteEx)startGrids(NODES); @@ -168,6 +170,7 @@ public void testTmpCacheConfigurationsDelete() throws Exception { * * @throws Exception If failed. */ + @Test public void testCorruptedCacheConfigurationsValidation() throws Exception { IgniteEx ig0 = (IgniteEx)startGrids(NODES); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCacheObjectBinaryProcessorOnDiscoveryTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCacheObjectBinaryProcessorOnDiscoveryTest.java index 279d3c8c4e620..3c652278f2f72 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCacheObjectBinaryProcessorOnDiscoveryTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCacheObjectBinaryProcessorOnDiscoveryTest.java @@ -71,6 +71,7 @@ public class IgnitePdsCacheObjectBinaryProcessorOnDiscoveryTest extends GridComm * Tests that joining node metadata correctly handled on client. * @throws Exception If fails. */ + @Test public void testJoiningNodeBinaryMetaOnClient() throws Exception { IgniteEx ig0 = (IgniteEx)startGrids(2); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCacheRebalancingAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCacheRebalancingAbstractTest.java index 389a7feacaaff..02f85b8c266b2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCacheRebalancingAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCacheRebalancingAbstractTest.java @@ -211,6 +211,7 @@ protected long checkpointFrequency() { * * @throws Exception If fails. */ + @Test public void testRebalancingOnRestart() throws Exception { Ignite ignite0 = startGrid(0); @@ -262,6 +263,7 @@ public void testRebalancingOnRestart() throws Exception { * * @throws Exception If fails. */ + @Test public void testRebalancingOnRestartAfterCheckpoint() throws Exception { IgniteEx ignite0 = startGrid(0); @@ -323,6 +325,7 @@ public void testRebalancingOnRestartAfterCheckpoint() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTopologyChangesWithConstantLoad() throws Exception { final long timeOut = U.currentTimeMillis() + 5 * 60 * 1000; @@ -520,6 +523,7 @@ else if (nodesCnt.get() >= maxNodesCnt) /** * @throws Exception If failed. */ + @Test public void testForceRebalance() throws Exception { testForceRebalance(CACHE); } @@ -527,6 +531,7 @@ public void testForceRebalance() throws Exception { /** * @throws Exception If failed. */ + @Test public void testForceRebalanceClientTopology() throws Exception { filteredCacheEnabled = true; @@ -582,6 +587,7 @@ private void testForceRebalance(String cacheName) throws Exception { /** * @throws Exception If failed */ + @Test public void testPartitionCounterConsistencyOnUnstableTopology() throws Exception { final Ignite ig = startGrids(4); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCacheStartStopWithFreqCheckpointTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCacheStartStopWithFreqCheckpointTest.java index 8e00d8871dc36..d4d399553fa3c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCacheStartStopWithFreqCheckpointTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCacheStartStopWithFreqCheckpointTest.java @@ -103,6 +103,7 @@ private CacheConfiguration cacheConfiguration(int cacheIdx) { * * @throws Exception If failed. */ + @Test public void testCheckpointDeadlock() throws Exception { IgniteEx crd = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsContinuousRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsContinuousRestartTest.java index 25d54abb345e3..872b06ad170ee 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsContinuousRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsContinuousRestartTest.java @@ -122,6 +122,7 @@ public IgnitePdsContinuousRestartTest(boolean cancel) { /** * @throws Exception if failed. */ + @Test public void testRebalancingDuringLoad_1000_500_1_1() throws Exception { checkRebalancingDuringLoad(1000, 500, 1, 1); } @@ -129,6 +130,7 @@ public void testRebalancingDuringLoad_1000_500_1_1() throws Exception { /** * @throws Exception if failed. */ + @Test public void testRebalancingDuringLoad_8000_500_1_1() throws Exception { checkRebalancingDuringLoad(8000, 500, 1, 1); } @@ -136,6 +138,7 @@ public void testRebalancingDuringLoad_8000_500_1_1() throws Exception { /** * @throws Exception if failed. */ + @Test public void testRebalancingDuringLoad_1000_20000_1_1() throws Exception { checkRebalancingDuringLoad(1000, 20000, 1, 1); } @@ -143,6 +146,7 @@ public void testRebalancingDuringLoad_1000_20000_1_1() throws Exception { /** * @throws Exception if failed. */ + @Test public void testRebalancingDuringLoad_8000_8000_1_1() throws Exception { checkRebalancingDuringLoad(8000, 8000, 1, 1); } @@ -150,6 +154,7 @@ public void testRebalancingDuringLoad_8000_8000_1_1() throws Exception { /** * @throws Exception if failed. */ + @Test public void testRebalancingDuringLoad_1000_500_8_1() throws Exception { checkRebalancingDuringLoad(1000, 500, 8, 1); } @@ -157,6 +162,7 @@ public void testRebalancingDuringLoad_1000_500_8_1() throws Exception { /** * @throws Exception if failed. */ + @Test public void testRebalancingDuringLoad_8000_500_8_1() throws Exception { checkRebalancingDuringLoad(8000, 500, 8, 1); } @@ -164,6 +170,7 @@ public void testRebalancingDuringLoad_8000_500_8_1() throws Exception { /** * @throws Exception if failed. */ + @Test public void testRebalancingDuringLoad_1000_20000_8_1() throws Exception { checkRebalancingDuringLoad(1000, 20000, 8, 1); } @@ -171,6 +178,7 @@ public void testRebalancingDuringLoad_1000_20000_8_1() throws Exception { /** * @throws Exception if failed. */ + @Test public void testRebalancingDuringLoad_8000_8000_8_1() throws Exception { checkRebalancingDuringLoad(8000, 8000, 8, 1); } @@ -178,6 +186,7 @@ public void testRebalancingDuringLoad_8000_8000_8_1() throws Exception { /** * @throws Exception if failed. */ + @Test public void testRebalancingDuringLoad_1000_500_8_16() throws Exception { checkRebalancingDuringLoad(1000, 500, 8, 16); } @@ -185,6 +194,7 @@ public void testRebalancingDuringLoad_1000_500_8_16() throws Exception { /** * @throws Exception if failed. */ + @Test public void testRebalancingDuringLoad_8000_500_8_16() throws Exception { checkRebalancingDuringLoad(8000, 500, 8, 16); } @@ -192,6 +202,7 @@ public void testRebalancingDuringLoad_8000_500_8_16() throws Exception { /** * @throws Exception if failed. */ + @Test public void testRebalancingDuringLoad_1000_20000_8_16() throws Exception { checkRebalancingDuringLoad(1000, 20000, 8, 16); } @@ -199,6 +210,7 @@ public void testRebalancingDuringLoad_1000_20000_8_16() throws Exception { /** * @throws Exception if failed. */ + @Test public void testRebalancingDuringLoad_8000_8000_8_16() throws Exception { checkRebalancingDuringLoad(8000, 8000, 8, 16); } @@ -206,6 +218,7 @@ public void testRebalancingDuringLoad_8000_8000_8_16() throws Exception { /** * @throws Exception if failed. */ + @Test public void testRebalncingDuringLoad_10_10_1_1() throws Exception { checkRebalancingDuringLoad(10, 10, 1, 1); } @@ -213,6 +226,7 @@ public void testRebalncingDuringLoad_10_10_1_1() throws Exception { /** * @throws Exception if failed. */ + @Test public void testRebalncingDuringLoad_10_500_8_16() throws Exception { checkRebalancingDuringLoad(10, 500, 8, 16); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCorruptedIndexTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCorruptedIndexTest.java index da19285d6301d..78f9d80eb452c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCorruptedIndexTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCorruptedIndexTest.java @@ -123,6 +123,7 @@ public class IgnitePdsCorruptedIndexTest extends GridCommonAbstractTest { /** * */ + @Test public void testCorruption() throws Exception { final String corruptedNodeName = "corrupted"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCorruptedStoreTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCorruptedStoreTest.java index 39faf5a1179ff..8df0865143b7a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCorruptedStoreTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCorruptedStoreTest.java @@ -147,6 +147,7 @@ private CacheConfiguration cacheConfiguration(String name) { /** * @throws Exception If test failed. */ + @Test public void testNodeInvalidatedWhenPersistenceIsCorrupted() throws Exception { Ignite ignite = startGrid(0); @@ -191,6 +192,7 @@ public void testNodeInvalidatedWhenPersistenceIsCorrupted() throws Exception { * * @throws Exception In case of fail */ + @Test public void testWrongPageCRC() throws Exception { System.setProperty(IGNITE_PDS_SKIP_CRC, "true"); @@ -224,6 +226,7 @@ public void testWrongPageCRC() throws Exception { /** * Test node invalidation when meta storage is corrupted. */ + @Test public void testMetaStorageCorruption() throws Exception { IgniteEx ignite = startGrid(0); @@ -250,6 +253,7 @@ public void testMetaStorageCorruption() throws Exception { /** * Test node invalidation when cache meta is corrupted. */ + @Test public void testCacheMetaCorruption() throws Exception { IgniteEx ignite = startGrid(0); @@ -324,6 +328,7 @@ private void corruptTreeRoot(IgniteEx ignite, PageMemoryEx pageMem, int grpId, i /** * Test node invalidation when meta store is read only. */ + @Test public void testReadOnlyMetaStore() throws Exception { IgniteEx ignite0 = startGrid(0); @@ -368,6 +373,7 @@ public void testReadOnlyMetaStore() throws Exception { /** * Test node invalidation due to checkpoint error. */ + @Test public void testCheckpointFailure() throws Exception { IgniteEx ignite = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsDestroyCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsDestroyCacheTest.java index 99d6f01c07d5d..08f443efb592d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsDestroyCacheTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsDestroyCacheTest.java @@ -28,6 +28,7 @@ public class IgnitePdsDestroyCacheTest extends IgnitePdsDestroyCacheAbstractTest * * @throws Exception If failed. */ + @Test public void testDestroyCaches() throws Exception { Ignite ignite = startGrids(NODES); @@ -43,6 +44,7 @@ public void testDestroyCaches() throws Exception { * * @throws Exception If failed. */ + @Test public void testDestroyGroupCaches() throws Exception { Ignite ignite = startGrids(NODES); @@ -58,6 +60,7 @@ public void testDestroyGroupCaches() throws Exception { * * @throws Exception If failed. */ + @Test public void testDestroyCachesAbruptly() throws Exception { Ignite ignite = startGrids(NODES); @@ -67,12 +70,13 @@ public void testDestroyCachesAbruptly() throws Exception { checkDestroyCachesAbruptly(ignite); } - + /** * Test destroy group caches abruptly with checkpoints. * * @throws Exception If failed. */ + @Test public void testDestroyGroupCachesAbruptly() throws Exception { Ignite ignite = startGrids(NODES); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsDestroyCacheWithoutCheckpointsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsDestroyCacheWithoutCheckpointsTest.java index 1bb6f5d8de8ba..92969a1330e2f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsDestroyCacheWithoutCheckpointsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsDestroyCacheWithoutCheckpointsTest.java @@ -39,6 +39,7 @@ public class IgnitePdsDestroyCacheWithoutCheckpointsTest extends IgnitePdsDestro * * @throws Exception If failed. */ + @Test public void testDestroyCachesAbruptlyWithoutCheckpoints() throws Exception { Ignite ignite = startGrids(NODES); @@ -56,6 +57,7 @@ public void testDestroyCachesAbruptlyWithoutCheckpoints() throws Exception { * * @throws Exception If failed. */ + @Test public void testDestroyGroupCachesAbruptlyWithoutCheckpoints() throws Exception { Ignite ignite = startGrids(NODES); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsDynamicCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsDynamicCacheTest.java index be3ed0b5c948a..efaf8c0946bd1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsDynamicCacheTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsDynamicCacheTest.java @@ -82,6 +82,7 @@ public class IgnitePdsDynamicCacheTest extends IgniteDbDynamicCacheSelfTest { /** * @throws Exception If failed. */ + @Test public void testRestartAndCreate() throws Exception { startGrids(3); @@ -149,6 +150,7 @@ public void testRestartAndCreate() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDynamicCacheSavingOnNewNode() throws Exception { Ignite ignite = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsExchangeDuringCheckpointTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsExchangeDuringCheckpointTest.java index d6d5c4f28a857..04d47f9bd6b09 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsExchangeDuringCheckpointTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsExchangeDuringCheckpointTest.java @@ -42,6 +42,7 @@ public class IgnitePdsExchangeDuringCheckpointTest extends GridCommonAbstractTes /** * */ + @Test public void testExchangeOnNodeLeft() throws Exception { for (int i = 0; i < 5; i++) { startGrids(3); @@ -63,6 +64,7 @@ public void testExchangeOnNodeLeft() throws Exception { /** * */ + @Test public void testExchangeOnNodeJoin() throws Exception { for (int i = 0; i < 5; i++) { startGrids(2); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsMarshallerMappingRestoreOnNodeStartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsMarshallerMappingRestoreOnNodeStartTest.java index 27bfe28014cf5..aea1296ffab6d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsMarshallerMappingRestoreOnNodeStartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsMarshallerMappingRestoreOnNodeStartTest.java @@ -68,6 +68,7 @@ public class IgnitePdsMarshallerMappingRestoreOnNodeStartTest extends GridCommon * Test verifies that binary metadata from regular java classes is saved and restored correctly * on cluster restart. */ + @Test public void testStaticMetadataIsRestoredOnRestart() throws Exception { startGrids(1); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsPageSizesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsPageSizesTest.java index d90723940bb00..e2c3e79aea5bc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsPageSizesTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsPageSizesTest.java @@ -80,6 +80,7 @@ public class IgnitePdsPageSizesTest extends GridCommonAbstractTest { /** * @throws Exception if failed. */ + @Test public void testPageSize_1k() throws Exception { checkPageSize(1024); } @@ -87,6 +88,7 @@ public void testPageSize_1k() throws Exception { /** * @throws Exception if failed. */ + @Test public void testPageSize_2k() throws Exception { checkPageSize(2 * 1024); } @@ -94,6 +96,7 @@ public void testPageSize_2k() throws Exception { /** * @throws Exception if failed. */ + @Test public void testPageSize_4k() throws Exception { checkPageSize(4 * 1024); } @@ -101,6 +104,7 @@ public void testPageSize_4k() throws Exception { /** * @throws Exception if failed. */ + @Test public void testPageSize_8k() throws Exception { checkPageSize(8 * 1024); } @@ -108,6 +112,7 @@ public void testPageSize_8k() throws Exception { /** * @throws Exception if failed. */ + @Test public void testPageSize_16k() throws Exception { checkPageSize(16 * 1024); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsPartitionFilesDestroyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsPartitionFilesDestroyTest.java index 578692c97e840..173014ec4117a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsPartitionFilesDestroyTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsPartitionFilesDestroyTest.java @@ -145,6 +145,7 @@ private void checkData(IgniteEx ignite, int keysCnt, int multiplier) { * * @throws Exception If failed. */ + @Test public void testPartitionFileDestroyAfterCheckpoint() throws Exception { IgniteEx crd = (IgniteEx) startGrids(2); @@ -177,6 +178,7 @@ public void testPartitionFileDestroyAfterCheckpoint() throws Exception { * * @throws Exception If failed. */ + @Test public void testPartitionFileDestroyAndRecreate() throws Exception { IgniteEx crd = startGrid(0); @@ -224,6 +226,7 @@ public void testPartitionFileDestroyAndRecreate() throws Exception { * * @throws Exception If failed. */ + @Test public void testPartitionFileDestroyCrashRecovery1() throws Exception { IgniteEx crd = startGrid(0); @@ -277,6 +280,7 @@ public void testPartitionFileDestroyCrashRecovery1() throws Exception { * * @throws Exception If failed. */ + @Test public void testPartitionFileDestroyCrashRecovery2() throws Exception { IgniteEx crd = startGrid(0); @@ -338,6 +342,7 @@ public void testPartitionFileDestroyCrashRecovery2() throws Exception { * * @throws Exception If failed. */ + @Test public void testDestroyWhenPartitionsAreEmpty() throws Exception { IgniteEx crd = (IgniteEx) startGrids(2); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsPartitionsStateRecoveryTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsPartitionsStateRecoveryTest.java index 112fc59ecc1ba..7f95a778c1777 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsPartitionsStateRecoveryTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsPartitionsStateRecoveryTest.java @@ -94,6 +94,7 @@ public class IgnitePdsPartitionsStateRecoveryTest extends GridCommonAbstractTest * * @throws Exception If failed. */ + @Test public void testPartitionsStateConsistencyAfterRecovery() throws Exception { IgniteEx ignite = startGrid(0); @@ -135,6 +136,7 @@ public void testPartitionsStateConsistencyAfterRecovery() throws Exception { * * @throws Exception If failed. */ + @Test public void testPartitionsStateConsistencyAfterRecoveryNoCheckpoints() throws Exception { IgniteEx ignite = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsRecoveryAfterFileCorruptionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsRecoveryAfterFileCorruptionTest.java index 15205e0c66e90..29274fb040b90 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsRecoveryAfterFileCorruptionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsRecoveryAfterFileCorruptionTest.java @@ -117,6 +117,7 @@ public class IgnitePdsRecoveryAfterFileCorruptionTest extends GridCommonAbstract /** * @throws Exception if failed. */ + @Test public void testPageRecoveryAfterFileCorruption() throws Exception { IgniteEx ig = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsRemoveDuringRebalancingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsRemoveDuringRebalancingTest.java index e51901d476b78..6687641ffc377 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsRemoveDuringRebalancingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsRemoveDuringRebalancingTest.java @@ -100,6 +100,7 @@ public class IgnitePdsRemoveDuringRebalancingTest extends GridCommonAbstractTest /** * @throws Exception if failed. */ + @Test public void testRemovesDuringRebalancing() throws Exception { IgniteEx ig = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsTaskCancelingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsTaskCancelingTest.java index 6b53339737f3e..b908bc85abd03 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsTaskCancelingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsTaskCancelingTest.java @@ -110,6 +110,7 @@ private DataStorageConfiguration getDataStorageConfiguration() { /** * Checks that tasks canceling does not lead to node failure. */ + @Test public void testFailNodesOnCanceledTask() throws Exception { cleanPersistenceDir(); @@ -181,6 +182,7 @@ public void testFailNodesOnCanceledTask() throws Exception { /** * Test FilePageStore with multiple interrupted threads. */ + @Test public void testFilePageStoreInterruptThreads() throws Exception { failure.set(false); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsTxCacheRebalancingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsTxCacheRebalancingTest.java index 3b324c37436fd..a11e37cbbc554 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsTxCacheRebalancingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsTxCacheRebalancingTest.java @@ -52,6 +52,7 @@ public class IgnitePdsTxCacheRebalancingTest extends IgnitePdsCacheRebalancingAb /** * @throws Exception If failed. */ + @Test public void testTopologyChangesWithConstantLoadExplicitTx() throws Exception { explicitTx = true; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePersistentStoreCacheGroupsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePersistentStoreCacheGroupsTest.java index 5f28456d337bb..ccbcf3846bdba 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePersistentStoreCacheGroupsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePersistentStoreCacheGroupsTest.java @@ -126,6 +126,7 @@ protected int entriesCount() { /** * @throws Exception If failed. */ + @Test public void testClusterRestartStaticCaches1() throws Exception { clusterRestart(1, true); } @@ -133,6 +134,7 @@ public void testClusterRestartStaticCaches1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClusterRestartStaticCaches2() throws Exception { clusterRestart(3, true); } @@ -140,6 +142,7 @@ public void testClusterRestartStaticCaches2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClusterRestartDynamicCaches1() throws Exception { clusterRestart(1, false); } @@ -147,6 +150,7 @@ public void testClusterRestartDynamicCaches1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClusterRestartDynamicCaches2() throws Exception { clusterRestart(3, false); } @@ -155,6 +159,7 @@ public void testClusterRestartDynamicCaches2() throws Exception { * @throws Exception If failed. */ @SuppressWarnings("unchecked") + @Test public void testClusterRestartCachesWithH2Indexes() throws Exception { CacheConfiguration[] ccfgs1 = new CacheConfiguration[5]; @@ -218,6 +223,7 @@ public void testClusterRestartCachesWithH2Indexes() throws Exception { /** * @throws Exception If failed. */ + @Test public void testExpiryPolicy() throws Exception { long ttl = 10 * 60000; @@ -291,6 +297,7 @@ public void testExpiryPolicy() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCreateDropCache() throws Exception { ccfgs = new CacheConfiguration[]{cacheConfiguration(GROUP1, "c1", PARTITIONED, ATOMIC, 1) .setIndexedTypes(Integer.class, Person.class)}; @@ -307,6 +314,7 @@ public void testCreateDropCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCreateDropCache1() throws Exception { CacheConfiguration ccfg1 = cacheConfiguration(GROUP1, "c1", PARTITIONED, ATOMIC, 1); @@ -331,6 +339,7 @@ public void testCreateDropCache1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCreateDropCache2() throws Exception { CacheConfiguration ccfg1 = cacheConfiguration(GROUP1, "c1", PARTITIONED, ATOMIC, 1) .setIndexedTypes(Integer.class, Person.class); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePersistentStoreDataStructuresTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePersistentStoreDataStructuresTest.java index 80fb0e077c35d..8c7d1fe2f797b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePersistentStoreDataStructuresTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePersistentStoreDataStructuresTest.java @@ -92,6 +92,7 @@ public class IgnitePersistentStoreDataStructuresTest extends GridCommonAbstractT /** * @throws Exception If failed. */ + @Test public void testQueue() throws Exception { Ignite ignite = startGrids(4); @@ -117,6 +118,7 @@ public void testQueue() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAtomic() throws Exception { Ignite ignite = startGrids(4); @@ -142,6 +144,7 @@ public void testAtomic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSequence() throws Exception { Ignite ignite = startGrids(4); @@ -171,6 +174,7 @@ public void testSequence() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSequenceAfterAutoactivation() throws Exception { final String seqName = "testSequence"; @@ -215,6 +219,7 @@ public void testSequenceAfterAutoactivation() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSet() throws Exception { Ignite ignite = startGrids(4); @@ -246,6 +251,7 @@ public void testSet() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLockVolatility() throws Exception { Ignite ignite = startGrids(4); @@ -269,6 +275,7 @@ public void testLockVolatility() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSemaphoreVolatility() throws Exception { Ignite ignite = startGrids(4); @@ -292,6 +299,7 @@ public void testSemaphoreVolatility() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLatchVolatility() throws Exception { Ignite ignite = startGrids(4); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgniteRebalanceScheduleResendPartitionsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgniteRebalanceScheduleResendPartitionsTest.java index bb08a8dc5631f..7ef51bcb92d95 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgniteRebalanceScheduleResendPartitionsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgniteRebalanceScheduleResendPartitionsTest.java @@ -110,6 +110,7 @@ public class IgniteRebalanceScheduleResendPartitionsTest extends GridCommonAbstr * * @throws Exception If failed. */ + @Test public void test() throws Exception { Ignite ig0 = startGrids(3); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/LocalWacModeNoChangeDuringRebalanceOnNonNodeAssignTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/LocalWacModeNoChangeDuringRebalanceOnNonNodeAssignTest.java index 4f2817f29109c..8308fa15c634a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/LocalWacModeNoChangeDuringRebalanceOnNonNodeAssignTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/LocalWacModeNoChangeDuringRebalanceOnNonNodeAssignTest.java @@ -102,6 +102,7 @@ public class LocalWacModeNoChangeDuringRebalanceOnNonNodeAssignTest extends Grid /** * @throws Exception If failed. */ + @Test public void test() throws Exception { Ignite ig = startGrids(NODES); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/LocalWalModeChangeDuringRebalancingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/LocalWalModeChangeDuringRebalancingSelfTest.java index 56426f3c9d95b..57d4fadc3cd22 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/LocalWalModeChangeDuringRebalancingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/LocalWalModeChangeDuringRebalancingSelfTest.java @@ -196,6 +196,7 @@ protected int getKeysCount() { /** * @throws Exception If failed. */ + @Test public void testWalDisabledDuringRebalancing() throws Exception { doTestSimple(); } @@ -203,6 +204,7 @@ public void testWalDisabledDuringRebalancing() throws Exception { /** * @throws Exception If failed. */ + @Test public void testWalNotDisabledIfParameterSetToFalse() throws Exception { disableWalDuringRebalancing = false; @@ -286,6 +288,7 @@ else if (timestamp >= rebalanceStartedTimestamp && timestamp <= rebalanceFinishe /** * @throws Exception If failed. */ + @Test public void testLocalAndGlobalWalStateInterdependence() throws Exception { Ignite ignite = startGrids(3); @@ -325,6 +328,7 @@ public void testLocalAndGlobalWalStateInterdependence() throws Exception { * * @throws Exception If failed. */ + @Test public void testWithExchangesMerge() throws Exception { final int nodeCnt = 4; final int keyCnt = getKeysCount(); @@ -378,6 +382,7 @@ public void testWithExchangesMerge() throws Exception { /** * @throws Exception If failed. */ + @Test public void testParallelExchangeDuringRebalance() throws Exception { doTestParallelExchange(supplyMessageLatch); } @@ -385,6 +390,7 @@ public void testParallelExchangeDuringRebalance() throws Exception { /** * @throws Exception If failed. */ + @Test public void testParallelExchangeDuringCheckpoint() throws Exception { doTestParallelExchange(fileIOLatch); } @@ -440,6 +446,7 @@ private void doTestParallelExchange(AtomicReference latchRef) th /** * @throws Exception If failed. */ + @Test public void testDataClearedAfterRestartWithDisabledWal() throws Exception { Ignite ignite = startGrid(0); @@ -481,6 +488,7 @@ public void testDataClearedAfterRestartWithDisabledWal() throws Exception { /** * @throws Exception If failed. */ + @Test public void testWalNotDisabledAfterShrinkingBaselineTopology() throws Exception { Ignite ignite = startGrids(4); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/MemoryPolicyInitializationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/MemoryPolicyInitializationTest.java index fac021ef9b84e..093fcdb7ee07c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/MemoryPolicyInitializationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/MemoryPolicyInitializationTest.java @@ -68,6 +68,7 @@ public class MemoryPolicyInitializationTest extends GridCommonAbstractTest { /** * Verifies that expected memory policies are allocated when used doesn't provide any MemoryPolicyConfiguration. */ + @Test public void testNoConfigProvided() throws Exception { memCfg = null; @@ -84,6 +85,7 @@ public void testNoConfigProvided() throws Exception { * Verifies that expected memory policies are allocated when used provides MemoryPolicyConfiguration * with non-default custom MemoryPolicy. */ + @Test public void testCustomConfigNoDefault() throws Exception { prepareCustomNoDefaultConfig(); @@ -103,6 +105,7 @@ public void testCustomConfigNoDefault() throws Exception { * User is allowed to configure memory policy with 'default' name, * in that case Ignite instance will use this user-defined memory policy as a default one. */ + @Test public void testCustomConfigOverridesDefault() throws Exception { prepareCustomConfigWithOverridingDefault(); @@ -127,6 +130,7 @@ public void testCustomConfigOverridesDefault() throws Exception { * At the same time user still can create a memory policy with name 'default' * which although won't be used as default. */ + @Test public void testCustomConfigOverridesDefaultNameAndDeclaresDefault() throws Exception { prepareCustomConfigWithOverriddenDefaultName(); @@ -150,6 +154,7 @@ public void testCustomConfigOverridesDefaultNameAndDeclaresDefault() throws Exce * with specified default memory policy name and specified custom memory policy name * all started with correct memory policy. */ + @Test public void testCachesOnOverriddenMemoryPolicy() throws Exception { prepareCustomConfigWithOverridingDefaultAndCustom(); @@ -184,6 +189,7 @@ public void testCachesOnOverriddenMemoryPolicy() throws Exception { * with specified default memory policy name and specified custom memory policy name * all started with correct memory policy. */ + @Test public void testCachesOnUserDefinedDefaultMemoryPolicy() throws Exception { prepareCustomConfigWithOverriddenDefaultName(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/PersistenceDirectoryWarningLoggingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/PersistenceDirectoryWarningLoggingTest.java index bb55c8200ee33..8467030f43ef3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/PersistenceDirectoryWarningLoggingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/PersistenceDirectoryWarningLoggingTest.java @@ -60,6 +60,7 @@ public class PersistenceDirectoryWarningLoggingTest extends GridCommonAbstractTe /** * @throws Exception If failed. */ + @Test public void testPdsDirWarningSuppressed() throws Exception { startGrid(); @@ -69,6 +70,7 @@ public void testPdsDirWarningSuppressed() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPdsDirWarningIsLogged() throws Exception { IgniteConfiguration cfg = getConfiguration("0"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/ClientAffinityAssignmentWithBaselineTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/ClientAffinityAssignmentWithBaselineTest.java index 13a98e4a7ae8c..5d31f8778d7d5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/ClientAffinityAssignmentWithBaselineTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/ClientAffinityAssignmentWithBaselineTest.java @@ -225,6 +225,7 @@ else if (REPLICATED_TX_CACHE_NAME.equals(cacheName)) { /** * */ + @Test public void testPartitionedAtomicCache() throws Exception { testChangingBaselineDown(PARTITIONED_ATOMIC_CACHE_NAME, false); } @@ -232,6 +233,7 @@ public void testPartitionedAtomicCache() throws Exception { /** * */ + @Test public void testPartitionedTxCache() throws Exception { testChangingBaselineDown(PARTITIONED_TX_CACHE_NAME, false); } @@ -239,6 +241,7 @@ public void testPartitionedTxCache() throws Exception { /** * Test that activation after client join won't break cache. */ + @Test public void testLateActivation() throws Exception { testChangingBaselineDown(PARTITIONED_TX_CACHE_NAME, true); } @@ -246,6 +249,7 @@ public void testLateActivation() throws Exception { /** * */ + @Test public void testReplicatedAtomicCache() throws Exception { testChangingBaselineDown(REPLICATED_ATOMIC_CACHE_NAME, false); } @@ -253,6 +257,7 @@ public void testReplicatedAtomicCache() throws Exception { /** * */ + @Test public void testReplicatedTxCache() throws Exception { testChangingBaselineDown(REPLICATED_TX_CACHE_NAME, false); } @@ -328,6 +333,7 @@ private void testChangingBaselineDown(String cacheName, boolean lateActivation) /** * Tests that rejoin of baseline node with clear LFS under load won't break cache. */ + @Test public void testRejoinWithCleanLfs() throws Exception { IgniteEx ig0 = (IgniteEx)startGrids(DEFAULT_NODES_COUNT - 1); startGrid("flaky"); @@ -394,6 +400,7 @@ public void testRejoinWithCleanLfs() throws Exception { /** * Test that changing baseline down under cross-cache txs load won't break cache. */ + @Test public void testCrossCacheTxs() throws Exception { IgniteEx ig0 = (IgniteEx)startGrids(DEFAULT_NODES_COUNT); @@ -455,6 +462,7 @@ public void testCrossCacheTxs() throws Exception { /** * Tests that join of non-baseline node while long transactions are running won't break dynamically started cache. */ + @Test public void testDynamicCacheLongTransactionNodeStart() throws Exception { IgniteEx ig0 = (IgniteEx)startGrids(4); @@ -526,13 +534,14 @@ public void testDynamicCacheLongTransactionNodeStart() throws Exception { * Tests that if dynamic cache has no affinity nodes at the moment of start, * it will still work correctly when affinity nodes will appear. */ + @Test public void testDynamicCacheStartNoAffinityNodes() throws Exception { fail("IGNITE-8652"); IgniteEx ig0 = startGrid(0); ig0.cluster().active(true); - + IgniteEx client = (IgniteEx)startGrid("client"); CacheConfiguration dynamicCacheCfg = new CacheConfiguration() @@ -544,7 +553,7 @@ public void testDynamicCacheStartNoAffinityNodes() throws Exception { .setNodeFilter(new ConsistentIdNodeFilter((Serializable)ig0.localNode().consistentId())); IgniteCache dynamicCache = client.getOrCreateCache(dynamicCacheCfg); - + for (int i = 1; i < 4; i++) startGrid(i); @@ -552,29 +561,29 @@ public void testDynamicCacheStartNoAffinityNodes() throws Exception { for (int i = 0; i < ENTRIES; i++) dynamicCache.put(i, "abacaba" + i); - + AtomicBoolean releaseTx = new AtomicBoolean(false); CountDownLatch allTxsDoneLatch = new CountDownLatch(10); - + for (int i = 0; i < 10; i++) { final int i0 = i; - + GridTestUtils.runAsync(new Runnable() { @Override public void run() { try (Transaction tx = client.transactions().txStart(TransactionConcurrency.PESSIMISTIC, TransactionIsolation.REPEATABLE_READ)) { dynamicCache.put(i0, "txtxtxtx" + i0); - + while (!releaseTx.get()) LockSupport.parkNanos(1_000_000); - + tx.commit(); - + System.out.println("Tx #" + i0 + " committed"); } catch (Throwable t) { System.out.println("Tx #" + i0 + " failed"); - + t.printStackTrace(); } finally { @@ -583,7 +592,7 @@ public void testDynamicCacheStartNoAffinityNodes() throws Exception { } }); } - + GridTestUtils.runAsync(new Runnable() { @Override public void run() { try { @@ -608,6 +617,7 @@ public void testDynamicCacheStartNoAffinityNodes() throws Exception { /** * Tests that join of non-baseline node while long transactions are running won't break cache started on client join. */ + @Test public void testClientJoinCacheLongTransactionNodeStart() throws Exception { IgniteEx ig0 = (IgniteEx)startGrids(4); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteAbsentEvictionNodeOutOfBaselineTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteAbsentEvictionNodeOutOfBaselineTest.java index cddd701beea46..e04fea2d178c3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteAbsentEvictionNodeOutOfBaselineTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteAbsentEvictionNodeOutOfBaselineTest.java @@ -75,6 +75,7 @@ public class IgniteAbsentEvictionNodeOutOfBaselineTest extends GridCommonAbstrac /** * Removed partitions if node is out of baseline. */ + @Test public void testPartitionsRemovedIfJoiningNodeNotInBaseline() throws Exception { //given: start 3 nodes with data Ignite ignite0 = startGrids(3); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/CheckpointBufferDeadlockTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/CheckpointBufferDeadlockTest.java index 2ae492b95264c..f1cb82bd18114 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/CheckpointBufferDeadlockTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/CheckpointBufferDeadlockTest.java @@ -146,6 +146,7 @@ public class CheckpointBufferDeadlockTest extends GridCommonAbstractTest { /** * */ + @Test public void testFourCheckpointThreads() throws Exception { checkpointThreads = 4; @@ -155,6 +156,7 @@ public void testFourCheckpointThreads() throws Exception { /** * */ + @Test public void testOneCheckpointThread() throws Exception { checkpointThreads = 1; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgniteLogicalRecoveryTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgniteLogicalRecoveryTest.java index 93cc074e6d6ab..b8aaa96797117 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgniteLogicalRecoveryTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgniteLogicalRecoveryTest.java @@ -176,6 +176,7 @@ protected CacheConfiguration cacheConfiguration(String name, @Nu /** * */ + @Test public void testRecoveryOnJoinToActiveCluster() throws Exception { IgniteEx crd = (IgniteEx) startGridsMultiThreaded(3); @@ -205,6 +206,7 @@ public void testRecoveryOnJoinToActiveCluster() throws Exception { /** * */ + @Test public void testRecoveryOnJoinToInactiveCluster() throws Exception { IgniteEx crd = (IgniteEx) startGridsMultiThreaded(3); @@ -238,6 +240,7 @@ public void testRecoveryOnJoinToInactiveCluster() throws Exception { /** * */ + @Test public void testRecoveryOnDynamicallyStartedCaches() throws Exception { List dynamicCaches = Lists.newArrayList( cacheConfiguration(DYNAMIC_CACHE_PREFIX + 0, CacheMode.PARTITIONED, CacheAtomicityMode.TRANSACTIONAL), @@ -252,6 +255,7 @@ public void testRecoveryOnDynamicallyStartedCaches() throws Exception { /** * */ + @Test public void testRecoveryWithMvccCaches() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10052"); @@ -298,6 +302,7 @@ private void doTestWithDynamicCaches(List dynamicCaches) thr /** * */ + @Test public void testRecoveryOnJoinToDifferentBlt() throws Exception { IgniteEx crd = (IgniteEx) startGridsMultiThreaded(3); @@ -330,6 +335,7 @@ public void testRecoveryOnJoinToDifferentBlt() throws Exception { /** * */ + @Test public void testRecoveryOnCrushDuringCheckpointOnNodeStart() throws Exception { IgniteEx crd = (IgniteEx) startGridsMultiThreaded(3, false); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsCacheRestoreTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsCacheRestoreTest.java index 4787143329484..086a86ca35f7f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsCacheRestoreTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsCacheRestoreTest.java @@ -93,6 +93,7 @@ public class IgnitePdsCacheRestoreTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRestoreAndNewCache1() throws Exception { restoreAndNewCache(false); } @@ -100,6 +101,7 @@ public void testRestoreAndNewCache1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRestoreAndNewCache2() throws Exception { restoreAndNewCache(true); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsCacheWalDisabledOnRebalancingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsCacheWalDisabledOnRebalancingTest.java index 1246db1090cae..12e673f11f378 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsCacheWalDisabledOnRebalancingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsCacheWalDisabledOnRebalancingTest.java @@ -138,6 +138,7 @@ public class IgnitePdsCacheWalDisabledOnRebalancingTest extends GridCommonAbstra * If client joins topology during rebalancing process, rebalancing finishes successfully, * all partitions are owned as expected when rebalancing finishes. */ + @Test public void testClientJoinsLeavesDuringRebalancing() throws Exception { Ignite ig0 = startGrids(2); @@ -188,11 +189,12 @@ public void testClientJoinsLeavesDuringRebalancing() throws Exception { /** * If server nodes from BLT leave topology and then join again after additional keys were put to caches, * rebalance starts. - * + * * Test verifies that all moving partitions get owned after rebalance finishes. * * @throws Exception If failed. */ + @Test public void testServerNodesFromBltLeavesAndJoinsDuringRebalancing() throws Exception { Ignite ig0 = startGridsMultiThreaded(4); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsDataRegionMetricsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsDataRegionMetricsTest.java index 0154c14e9cccb..9be1627ea3ac5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsDataRegionMetricsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsDataRegionMetricsTest.java @@ -121,6 +121,7 @@ public class IgnitePdsDataRegionMetricsTest extends GridCommonAbstractTest { } /** */ + @Test public void testMemoryUsageSingleNode() throws Exception { DataRegionMetrics initMetrics = null; @@ -164,6 +165,7 @@ public void testMemoryUsageSingleNode() throws Exception { } /** */ + @Test public void testMemoryUsageMultipleNodes() throws Exception { IgniteEx node0 = startGrid(0); IgniteEx node1 = startGrid(1); @@ -215,6 +217,7 @@ public void testMemoryUsageMultipleNodes() throws Exception { * * @throws Exception If failed. */ + @Test public void testCheckpointBufferSize() throws Exception { IgniteEx ig = startGrid(0); @@ -232,6 +235,7 @@ public void testCheckpointBufferSize() throws Exception { * * @throws Exception If failed. */ + @Test public void testUsedCheckpointBuffer() throws Exception { IgniteEx ig = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsMultiNodePutGetRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsMultiNodePutGetRestartTest.java index d386c172ed05b..4923a48664e27 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsMultiNodePutGetRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsMultiNodePutGetRestartTest.java @@ -108,6 +108,7 @@ public class IgnitePdsMultiNodePutGetRestartTest extends GridCommonAbstractTest /** * @throws Exception if failed. */ + @Test public void testPutGetSimple() throws Exception { String home = U.getIgniteHome(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsPageEvictionDuringPartitionClearTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsPageEvictionDuringPartitionClearTest.java index 720b6045d1690..7d7c52074794e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsPageEvictionDuringPartitionClearTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsPageEvictionDuringPartitionClearTest.java @@ -85,6 +85,7 @@ public class IgnitePdsPageEvictionDuringPartitionClearTest extends GridCommonAbs /** * @throws Exception if failed. */ + @Test public void testPageEvictionOnNodeStart() throws Exception { for (int r = 0; r < 3; r++) { cleanPersistenceDir(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsPageEvictionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsPageEvictionTest.java index 3c07a164f481e..3a1f29a05b7dc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsPageEvictionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsPageEvictionTest.java @@ -102,6 +102,7 @@ public class IgnitePdsPageEvictionTest extends GridCommonAbstractTest { /** * @throws Exception if failed. */ + @Test public void testPageEvictionSql() throws Exception { IgniteEx ig = grid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsPartitionPreloadTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsPartitionPreloadTest.java index 0452ad48874dd..6e0137d868f13 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsPartitionPreloadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsPartitionPreloadTest.java @@ -152,6 +152,7 @@ private CacheConfiguration cacheConfiguration(CacheAtomicityMo } /** */ + @Test public void testLocalPreloadPartitionClient() throws Exception { cfgFactory = () -> cacheConfiguration(TRANSACTIONAL).setDataRegionName(MEM); @@ -166,6 +167,7 @@ public void testLocalPreloadPartitionClient() throws Exception { } /** */ + @Test public void testLocalPreloadPartitionPrimary() throws Exception { cfgFactory = () -> cacheConfiguration(TRANSACTIONAL); @@ -174,6 +176,7 @@ public void testLocalPreloadPartitionPrimary() throws Exception { } /** */ + @Test public void testLocalPreloadPartitionBackup() throws Exception { cfgFactory = () -> cacheConfiguration(TRANSACTIONAL); @@ -182,6 +185,7 @@ public void testLocalPreloadPartitionBackup() throws Exception { } /** */ + @Test public void testPreloadPartitionInMemoryRemote() throws Exception { cfgFactory = () -> cacheConfiguration(TRANSACTIONAL).setDataRegionName(MEM); @@ -202,6 +206,7 @@ public void testPreloadPartitionInMemoryRemote() throws Exception { } /** */ + @Test public void testPreloadPartitionInMemoryLocal() throws Exception { cfgFactory = () -> cacheConfiguration(TRANSACTIONAL).setDataRegionName(MEM); @@ -224,6 +229,7 @@ public void testPreloadPartitionInMemoryLocal() throws Exception { } /** */ + @Test public void testPreloadPartitionTransactionalClientSync() throws Exception { cfgFactory = () -> cacheConfiguration(TRANSACTIONAL); @@ -238,6 +244,7 @@ public void testPreloadPartitionTransactionalClientSync() throws Exception { } /** */ + @Test public void testPreloadPartitionTransactionalClientAsync() throws Exception { cfgFactory = () -> cacheConfiguration(TRANSACTIONAL); @@ -252,6 +259,7 @@ public void testPreloadPartitionTransactionalClientAsync() throws Exception { } /** */ + @Test public void testPreloadPartitionTransactionalNodeFilteredSync() throws Exception { cfgFactory = () -> cacheConfiguration(TRANSACTIONAL); @@ -259,6 +267,7 @@ public void testPreloadPartitionTransactionalNodeFilteredSync() throws Exception } /** */ + @Test public void testPreloadPartitionTransactionalNodeFilteredAsync() throws Exception { cfgFactory = () -> cacheConfiguration(TRANSACTIONAL); @@ -266,6 +275,7 @@ public void testPreloadPartitionTransactionalNodeFilteredAsync() throws Exceptio } /** */ + @Test public void testPreloadPartitionTransactionalPrimarySync() throws Exception { cfgFactory = () -> cacheConfiguration(TRANSACTIONAL); @@ -274,6 +284,7 @@ public void testPreloadPartitionTransactionalPrimarySync() throws Exception { } /** */ + @Test public void testPreloadPartitionTransactionalPrimaryAsync() throws Exception { cfgFactory = () -> cacheConfiguration(TRANSACTIONAL); @@ -282,6 +293,7 @@ public void testPreloadPartitionTransactionalPrimaryAsync() throws Exception { } /** */ + @Test public void testPreloadPartitionTransactionalBackupSync() throws Exception { cfgFactory = () -> cacheConfiguration(TRANSACTIONAL); @@ -290,6 +302,7 @@ public void testPreloadPartitionTransactionalBackupSync() throws Exception { } /** */ + @Test public void testPreloadPartitionTransactionalBackupAsync() throws Exception { cfgFactory = () -> cacheConfiguration(TRANSACTIONAL); @@ -298,6 +311,7 @@ public void testPreloadPartitionTransactionalBackupAsync() throws Exception { } /** */ + @Test public void testPreloadPartitionAtomicClientSync() throws Exception { cfgFactory = () -> cacheConfiguration(ATOMIC); @@ -312,6 +326,7 @@ public void testPreloadPartitionAtomicClientSync() throws Exception { } /** */ + @Test public void testPreloadPartitionAtomicClientAsync() throws Exception { cfgFactory = () -> cacheConfiguration(ATOMIC); @@ -326,6 +341,7 @@ public void testPreloadPartitionAtomicClientAsync() throws Exception { } /** */ + @Test public void testPreloadPartitionAtomicNodeFilteredSync() throws Exception { cfgFactory = () -> cacheConfiguration(ATOMIC); @@ -333,6 +349,7 @@ public void testPreloadPartitionAtomicNodeFilteredSync() throws Exception { } /** */ + @Test public void testPreloadPartitionAtomicNodeFilteredAsync() throws Exception { cfgFactory = () -> cacheConfiguration(ATOMIC); @@ -340,6 +357,7 @@ public void testPreloadPartitionAtomicNodeFilteredAsync() throws Exception { } /** */ + @Test public void testPreloadPartitionAtomicPrimarySync() throws Exception { cfgFactory = () -> cacheConfiguration(ATOMIC); @@ -348,6 +366,7 @@ public void testPreloadPartitionAtomicPrimarySync() throws Exception { } /** */ + @Test public void testPreloadPartitionAtomicPrimaryAsync() throws Exception { cfgFactory = () -> cacheConfiguration(ATOMIC); @@ -356,6 +375,7 @@ public void testPreloadPartitionAtomicPrimaryAsync() throws Exception { } /** */ + @Test public void testPreloadPartitionAtomicBackupSync() throws Exception { cfgFactory = () -> cacheConfiguration(ATOMIC); @@ -364,6 +384,7 @@ public void testPreloadPartitionAtomicBackupSync() throws Exception { } /** */ + @Test public void testPreloadPartitionAtomicBackupAsync() throws Exception { cfgFactory = () -> cacheConfiguration(ATOMIC); @@ -372,6 +393,7 @@ public void testPreloadPartitionAtomicBackupAsync() throws Exception { } /** */ + @Test public void testPreloadLocalTransactionalSync() throws Exception { cfgFactory = () -> cacheConfiguration(TRANSACTIONAL).setCacheMode(LOCAL); @@ -380,6 +402,7 @@ public void testPreloadLocalTransactionalSync() throws Exception { } /** */ + @Test public void testPreloadLocalTransactionalAsync() throws Exception { cfgFactory = () -> cacheConfiguration(TRANSACTIONAL).setCacheMode(LOCAL); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsRebalancingOnNotStableTopologyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsRebalancingOnNotStableTopologyTest.java index 8b3c8757c57fc..bfe9d7da880d8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsRebalancingOnNotStableTopologyTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsRebalancingOnNotStableTopologyTest.java @@ -55,6 +55,7 @@ public class IgnitePdsRebalancingOnNotStableTopologyTest extends GridCommonAbstr /** * @throws Exception When fails. */ + @Test public void test() throws Exception { Ignite ex = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsReserveWalSegmentsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsReserveWalSegmentsTest.java index cfbb8d8b8a5b5..80d3ba7cbb7e1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsReserveWalSegmentsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsReserveWalSegmentsTest.java @@ -93,6 +93,7 @@ public class IgnitePdsReserveWalSegmentsTest extends GridCommonAbstractTest { * * @throws Exception if failed. */ + @Test public void testWalManagerRangeReservation() throws Exception { IgniteEx ig0 = prepareGrid(4); @@ -122,6 +123,7 @@ public void testWalManagerRangeReservation() throws Exception { * * @throws Exception if failed. */ + @Test public void testWalDoesNotTruncatedWhenSegmentReserved() throws Exception { IgniteEx ig0 = prepareGrid(4); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsTransactionsHangTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsTransactionsHangTest.java index 36afe32e1bda2..a4923345f7497 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsTransactionsHangTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsTransactionsHangTest.java @@ -164,6 +164,7 @@ private CacheConfiguration getCacheConfiguration() { * * @throws Exception If failed. * */ + @Test public void testTransactionsDontHang() throws Exception { try { final Ignite g = startGrids(2); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsWholeClusterRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsWholeClusterRestartTest.java index 2458e21545f15..e1b12f487e65c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsWholeClusterRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsWholeClusterRestartTest.java @@ -96,6 +96,7 @@ public class IgnitePdsWholeClusterRestartTest extends GridCommonAbstractTest { /** * @throws Exception if failed. */ + @Test public void testRestarts() throws Exception { startGrids(GRID_CNT); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsWithTtlTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsWithTtlTest.java index bb371dce29bca..4316ef69caa51 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsWithTtlTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsWithTtlTest.java @@ -110,6 +110,7 @@ public class IgnitePdsWithTtlTest extends GridCommonAbstractTest { /** * @throws Exception if failed. */ + @Test public void testTtlIsApplied() throws Exception { loadAndWaitForCleanup(false); } @@ -117,6 +118,7 @@ public void testTtlIsApplied() throws Exception { /** * @throws Exception if failed. */ + @Test public void testTtlIsAppliedAfterRestart() throws Exception { loadAndWaitForCleanup(true); } @@ -148,6 +150,7 @@ private void loadAndWaitForCleanup(boolean restartGrid) throws Exception { /** * @throws Exception if failed. */ + @Test public void testRebalancingWithTtlExpirable() throws Exception { IgniteEx srv = startGrid(0); srv.cluster().active(true); @@ -171,6 +174,7 @@ public void testRebalancingWithTtlExpirable() throws Exception { /** * @throws Exception if failed. */ + @Test public void testStartStopAfterRebalanceWithTtlExpirable() throws Exception { try { IgniteEx srv = startGrid(0); @@ -243,4 +247,4 @@ private void pringStatistics(IgniteCacheProxy cache, String msg) { cache.context().printMemoryStats(); System.out.println("}} " + msg); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/SlowHistoricalRebalanceSmallHistoryTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/SlowHistoricalRebalanceSmallHistoryTest.java index bd1a1a9cc3575..6859b43785406 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/SlowHistoricalRebalanceSmallHistoryTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/SlowHistoricalRebalanceSmallHistoryTest.java @@ -118,6 +118,7 @@ public class SlowHistoricalRebalanceSmallHistoryTest extends GridCommonAbstractT /** * Checks that we reserve and release the same WAL index on exchange. */ + @Test public void testReservation() throws Exception { IgniteEx ig = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/checkpoint/IgniteCheckpointDirtyPagesForLowLoadTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/checkpoint/IgniteCheckpointDirtyPagesForLowLoadTest.java index c9174ba432657..1b56e07729676 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/checkpoint/IgniteCheckpointDirtyPagesForLowLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/checkpoint/IgniteCheckpointDirtyPagesForLowLoadTest.java @@ -98,6 +98,7 @@ public class IgniteCheckpointDirtyPagesForLowLoadTest extends GridCommonAbstract /** * @throws Exception if failed. */ + @Test public void testManyCachesAndNotManyPuts() throws Exception { try { IgniteEx ignite = startGrid(0); @@ -205,4 +206,4 @@ private int waitForCurrentCheckpointPagesCounterUpdated(GridCacheDatabaseSharedM return currCpPages; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/checkpoint/IgniteMassLoadSandboxTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/checkpoint/IgniteMassLoadSandboxTest.java index f38db0a832448..90e0781295b48 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/checkpoint/IgniteMassLoadSandboxTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/checkpoint/IgniteMassLoadSandboxTest.java @@ -173,6 +173,7 @@ public class IgniteMassLoadSandboxTest extends GridCommonAbstractTest { * * @throws Exception if failed. */ + @Test public void testContinuousPutMultithreaded() throws Exception { try { // System.setProperty(IgniteSystemProperties.IGNITE_DIRTY_PAGES_PARALLEL, "true"); @@ -233,6 +234,7 @@ public void testContinuousPutMultithreaded() throws Exception { * * @throws Exception if failed. */ + @Test public void testDataStreamerContinuousPutMultithreaded() throws Exception { try { // System.setProperty(IgniteSystemProperties.IGNITE_DIRTY_PAGES_PARALLEL, "true"); @@ -309,6 +311,7 @@ public void testDataStreamerContinuousPutMultithreaded() throws Exception { * * @throws Exception if failed. */ + @Test public void testCoveredWalLogged() throws Exception { GridStringLogger log0 = null; @@ -484,6 +487,7 @@ private static boolean keepInDb(int id) { * * @throws Exception if failed. */ + @Test public void testPutRemoveMultithreaded() throws Exception { setWalArchAndWorkToSameVal = false; customWalMode = WALMode.LOG_ONLY; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/DefaultPageSizeBackwardsCompatibilityTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/DefaultPageSizeBackwardsCompatibilityTest.java index 70d003d43a334..543e4016dab90 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/DefaultPageSizeBackwardsCompatibilityTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/DefaultPageSizeBackwardsCompatibilityTest.java @@ -104,6 +104,7 @@ public class DefaultPageSizeBackwardsCompatibilityTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + @Test public void testStartFrom16kDefaultStore() throws Exception { startGrids(2); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCacheDestroyDuringCheckpointTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCacheDestroyDuringCheckpointTest.java index 62cc244dc1346..549b82260bfc6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCacheDestroyDuringCheckpointTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCacheDestroyDuringCheckpointTest.java @@ -90,6 +90,7 @@ private DataStorageConfiguration createDbConfig() { /** * @throws Exception If fail. */ + @Test public void testCacheCreatePutCheckpointDestroy() throws Exception { IgniteEx ig = startGrid(0); ig.active(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCacheIntegrationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCacheIntegrationTest.java index ba9a00098e81e..73cb2599cdbeb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCacheIntegrationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCacheIntegrationTest.java @@ -111,6 +111,7 @@ public class IgnitePdsCacheIntegrationTest extends GridCommonAbstractTest { /** * @throws Exception if failed. */ + @Test public void testPutGetSimple() throws Exception { startGrids(GRID_CNT); @@ -146,6 +147,7 @@ public void testPutGetSimple() throws Exception { /** * @throws Exception if failed. */ + @Test public void testPutMultithreaded() throws Exception { startGrids(4); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCheckpointSimpleTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCheckpointSimpleTest.java index eafa2af94c85f..9c37aff4b3e37 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCheckpointSimpleTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCheckpointSimpleTest.java @@ -64,6 +64,7 @@ public class IgnitePdsCheckpointSimpleTest extends GridCommonAbstractTest { * Checks if same data can be loaded after checkpoint. * @throws Exception if failed. */ + @Test public void testRecoveryAfterCpEnd() throws Exception { IgniteEx ignite = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCheckpointSimulationWithRealCpDisabledTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCheckpointSimulationWithRealCpDisabledTest.java index 620814f85b293..3019df9726cae 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCheckpointSimulationWithRealCpDisabledTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCheckpointSimulationWithRealCpDisabledTest.java @@ -146,6 +146,7 @@ public class IgnitePdsCheckpointSimulationWithRealCpDisabledTest extends GridCom /** * @throws Exception if failed. */ + @Test public void testCheckpointSimulationMultiThreaded() throws Exception { IgniteEx ig = startGrid(0); @@ -203,6 +204,7 @@ public void testCheckpointSimulationMultiThreaded() throws Exception { /** * @throws Exception if failed. */ + @Test public void testGetForInitialWrite() throws Exception { IgniteEx ig = startGrid(0); @@ -303,6 +305,7 @@ public void testGetForInitialWrite() throws Exception { /** * @throws Exception if failed. */ + @Test public void testDataWalEntries() throws Exception { IgniteEx ig = startGrid(0); @@ -410,6 +413,7 @@ public void testDataWalEntries() throws Exception { /** * @throws Exception if failed. */ + @Test public void testPageWalEntries() throws Exception { IgniteEx ig = startGrid(0); @@ -510,6 +514,7 @@ public void testPageWalEntries() throws Exception { /** * @throws Exception if failed. */ + @Test public void testDirtyFlag() throws Exception { IgniteEx ig = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsDiskErrorsRecoveringTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsDiskErrorsRecoveringTest.java index 7e1727160102a..c675331e3e0a3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsDiskErrorsRecoveringTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsDiskErrorsRecoveringTest.java @@ -123,6 +123,7 @@ public class IgnitePdsDiskErrorsRecoveringTest extends GridCommonAbstractTest { /** * Test node stopping & recovering on cache initialization fail. */ + @Test public void testRecoveringOnCacheInitFail() throws Exception { // Fail to initialize page store. 2 extra pages is needed for MetaStorage. ioFactory = new FilteringFileIOFactory(".bin", new LimitedSizeFileIOFactory(new RandomAccessFileIOFactory(), 2 * PAGE_SIZE)); @@ -164,6 +165,7 @@ public void testRecoveringOnCacheInitFail() throws Exception { * * @throws Exception If test failed. */ + @Test public void testRecoveringOnCheckpointBeginFail() throws Exception { // Fail to write checkpoint start marker tmp file at the second checkpoint. Pass only initial checkpoint. ioFactory = new FilteringFileIOFactory("START.bin" + FilePageStoreManager.TMP_SUFFIX, new LimitedSizeFileIOFactory(new RandomAccessFileIOFactory(), 20)); @@ -214,6 +216,7 @@ public void testRecoveringOnCheckpointBeginFail() throws Exception { /** * Test node stopping & recovering on checkpoint pages write fail. */ + @Test public void testRecoveringOnCheckpointWriteFail() throws Exception { // Fail write partition and index files at the second checkpoint. Pass only initial checkpoint. ioFactory = new FilteringFileIOFactory(".bin", new LimitedSizeFileIOFactory(new RandomAccessFileIOFactory(), 128 * PAGE_SIZE)); @@ -263,6 +266,7 @@ public void testRecoveringOnCheckpointWriteFail() throws Exception { /** * Test node stopping & recovering on WAL writing fail with enabled MMAP (Batch allocation for WAL segments). */ + @Test public void testRecoveringOnWALWritingFail1() throws Exception { // Allow to allocate only 1 wal segment, fail on write to second. ioFactory = new FilteringFileIOFactory(".wal", new LimitedSizeFileIOFactory(new RandomAccessFileIOFactory(), WAL_SEGMENT_SIZE)); @@ -275,6 +279,7 @@ public void testRecoveringOnWALWritingFail1() throws Exception { /** * Test node stopping & recovering on WAL writing fail with disabled MMAP. */ + @Test public void testRecoveringOnWALWritingFail2() throws Exception { // Fail somewhere on the second wal segment. ioFactory = new FilteringFileIOFactory(".wal", new LimitedSizeFileIOFactory(new RandomAccessFileIOFactory(), (long) (1.5 * WAL_SEGMENT_SIZE))); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsNoActualWalHistoryTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsNoActualWalHistoryTest.java index c2967fef1cb6d..31d1f5d80c3e3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsNoActualWalHistoryTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsNoActualWalHistoryTest.java @@ -98,6 +98,7 @@ public class IgnitePdsNoActualWalHistoryTest extends GridCommonAbstractTest { /** * @throws Exception if failed. */ + @Test public void testWalBig() throws Exception { try { IgniteEx ignite = startGrid(1); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsPageReplacementTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsPageReplacementTest.java index 2697c01d4201a..43f60756c7619 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsPageReplacementTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsPageReplacementTest.java @@ -113,6 +113,7 @@ private DataStorageConfiguration createDbConfig() { /** * @throws Exception If fail. */ + @Test public void testPageReplacement() throws Exception { final IgniteEx ig = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsThreadInterruptionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsThreadInterruptionTest.java index adaa764aa4ca6..c24dd51d53af9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsThreadInterruptionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsThreadInterruptionTest.java @@ -106,6 +106,7 @@ private DataStorageConfiguration storageConfiguration() { * * @throws Exception If failed. */ + @Test public void testInterruptsOnLFSRead() throws Exception { final Ignite ignite = startGrid(); @@ -185,6 +186,7 @@ public void testInterruptsOnLFSRead() throws Exception { * * @throws Exception */ + @Test public void testInterruptsOnWALWrite() throws Exception { final Ignite ignite = startGrid(); @@ -256,4 +258,4 @@ public void testInterruptsOnWALWrite() throws Exception { log.info("Verified keys: " + verifiedKeys); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/filename/IgniteUidAsConsistentIdMigrationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/filename/IgniteUidAsConsistentIdMigrationTest.java index 6e8ef6598f1da..ed321b60ec183 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/filename/IgniteUidAsConsistentIdMigrationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/filename/IgniteUidAsConsistentIdMigrationTest.java @@ -160,6 +160,7 @@ private void deleteWorkFiles() throws IgniteCheckedException { * * @throws Exception if failed. */ + @Test public void testNewStyleIdIsGenerated() throws Exception { final Ignite ignite = startActivateFillDataGrid(0); @@ -174,6 +175,7 @@ public void testNewStyleIdIsGenerated() throws Exception { * * @throws Exception if failed. */ + @Test public void testNewStyleIdIsGeneratedInCustomStorePath() throws Exception { placeStorageInTemp = true; final Ignite ignite = startActivateFillDataGrid(0); @@ -196,6 +198,7 @@ public void testNewStyleIdIsGeneratedInCustomStorePath() throws Exception { * * @throws Exception if failed. */ + @Test public void testPreconfiguredConsitentIdIsApplied() throws Exception { this.configuredConsistentId = "someConfiguredConsistentId"; Ignite ignite = startActivateFillDataGrid(0); @@ -210,6 +213,7 @@ public void testPreconfiguredConsitentIdIsApplied() throws Exception { * * @throws Exception if failed */ + @Test public void testRestartOnExistingOldStyleId() throws Exception { final String expDfltConsistentId = "127.0.0.1:47500"; @@ -244,6 +248,7 @@ public void testRestartOnExistingOldStyleId() throws Exception { * * @throws Exception if failed */ + @Test public void testStartWithoutActivate() throws Exception { //start stop grid without activate startGrid(0); @@ -259,6 +264,7 @@ public void testStartWithoutActivate() throws Exception { * * @throws Exception if failed */ + @Test public void testRestartOnSameFolderWillCauseSameUuidGeneration() throws Exception { final UUID uuid; { @@ -290,6 +296,7 @@ public void testRestartOnSameFolderWillCauseSameUuidGeneration() throws Exceptio * * @throws Exception if failed */ + @Test public void testStartNodeAfterDeactivate() throws Exception { final UUID uuid; { @@ -365,6 +372,7 @@ public void testStartNodeAfterDeactivate() throws Exception { * * @throws Exception if failed */ + @Test public void testNodeIndexIncremented() throws Exception { final Ignite ignite0 = startGrid(0); final Ignite ignite1 = startGrid(1); @@ -387,6 +395,7 @@ public void testNodeIndexIncremented() throws Exception { * * @throws Exception if failed */ + @Test public void testNewStyleAlwaysSmallestNodeIndexIsCreated() throws Exception { final Ignite ignite0 = startGrid(0); final Ignite ignite1 = startGrid(1); @@ -419,6 +428,7 @@ public void testNewStyleAlwaysSmallestNodeIndexIsCreated() throws Exception { * * @throws Exception if failed */ + @Test public void testNewStyleAlwaysSmallestNodeIndexIsCreatedMultithreaded() throws Exception { final Ignite ignite0 = startGridsMultiThreaded(11); @@ -446,6 +456,7 @@ public void testNewStyleAlwaysSmallestNodeIndexIsCreatedMultithreaded() throws E * * @throws Exception if failed. */ + @Test public void testStartTwoOldStyleNodes() throws Exception { final String expDfltConsistentId1 = "127.0.0.1:47500"; @@ -495,6 +506,7 @@ public void testStartTwoOldStyleNodes() throws Exception { * * @throws Exception if failed. */ + @Test public void testStartOldStyleNodesByCompatibleProperty() throws Exception { clearPropsAfterTest = true; System.setProperty(IGNITE_DATA_STORAGE_FOLDER_BY_CONSISTENT_ID, "true"); @@ -537,6 +549,7 @@ public void testStartOldStyleNodesByCompatibleProperty() throws Exception { * * @throws Exception if failed. */ + @Test public void testStartOldStyleNoPortsNodesByCompatibleProperty() throws Exception { clearPropsAfterTest = true; System.setProperty(IGNITE_DATA_STORAGE_FOLDER_BY_CONSISTENT_ID, "true"); @@ -577,6 +590,7 @@ public void testStartOldStyleNoPortsNodesByCompatibleProperty() throws Exception * * @throws Exception if failed. */ + @Test public void testOldStyleNodeWithUnexpectedPort() throws Exception { this.configuredConsistentId = "127.0.0.1:49999"; //emulated old-style node with not appropriate consistent ID final Ignite ignite = startActivateFillDataGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/FsyncWalRolloverDoesNotBlockTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/FsyncWalRolloverDoesNotBlockTest.java index aa2e90ce47716..b885fa3bd873e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/FsyncWalRolloverDoesNotBlockTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/FsyncWalRolloverDoesNotBlockTest.java @@ -72,6 +72,7 @@ private RolloverRecord() { } /** */ + @Test public void test() throws Exception { IgniteEx ig = startGrid(0); @@ -86,4 +87,4 @@ public void test() throws Exception { ig.context().cache().context().database().checkpointReadUnlock(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteNodeStoppedDuringDisableWALTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteNodeStoppedDuringDisableWALTest.java index 1a1d44909cf5b..cefffcee4883b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteNodeStoppedDuringDisableWALTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteNodeStoppedDuringDisableWALTest.java @@ -94,6 +94,7 @@ public class IgniteNodeStoppedDuringDisableWALTest extends GridCommonAbstractTes * * @throws Exception If failed. */ + @Test public void test() throws Exception { for (NodeStopPoint nodeStopPoint : NodeStopPoint.values()) { testStopNodeWithDisableWAL(nodeStopPoint); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWALTailIsReachedDuringIterationOverArchiveTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWALTailIsReachedDuringIterationOverArchiveTest.java index e3c2c6c5fab1f..802db50df43ba 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWALTailIsReachedDuringIterationOverArchiveTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWALTailIsReachedDuringIterationOverArchiveTest.java @@ -118,6 +118,7 @@ public class IgniteWALTailIsReachedDuringIterationOverArchiveTest extends GridCo /** * @throws Exception If failed. */ + @Test public void testStandAloneIterator() throws Exception { IgniteEx ig = grid(); @@ -133,6 +134,7 @@ public void testStandAloneIterator() throws Exception { /** * @throws Exception If failed. */ + @Test public void testWALManagerIterator() throws Exception { IgniteEx ig = grid(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalFlushFailoverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalFlushFailoverTest.java index 8b182c9589dac..c0e426506839f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalFlushFailoverTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalFlushFailoverTest.java @@ -100,6 +100,7 @@ public class IgniteWalFlushFailoverTest extends GridCommonAbstractTest { * * @throws Exception In case of fail */ + @Test public void testErrorOnFlushByTimeout() throws Exception { flushByTimeout = true; flushingErrorTest(); @@ -110,6 +111,7 @@ public void testErrorOnFlushByTimeout() throws Exception { * * @throws Exception In case of fail */ + @Test public void testErrorOnDirectFlush() throws Exception { flushByTimeout = false; flushingErrorTest(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalFlushMultiNodeFailoverAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalFlushMultiNodeFailoverAbstractSelfTest.java index 232591cb00b41..c9cf203c3d527 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalFlushMultiNodeFailoverAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalFlushMultiNodeFailoverAbstractSelfTest.java @@ -138,6 +138,7 @@ protected boolean mmap() { * * @throws Exception In case of fail */ + @Test public void testFailWhileStart() throws Exception { failWhilePut(true); } @@ -147,6 +148,7 @@ public void testFailWhileStart() throws Exception { * * @throws Exception In case of fail */ + @Test public void testFailAfterStart() throws Exception { failWhilePut(false); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalFormatFileFailoverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalFormatFileFailoverTest.java index e603686aa5c52..64eb410cd99ce 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalFormatFileFailoverTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalFormatFileFailoverTest.java @@ -1,253 +1,256 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You 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.apache.ignite.internal.processors.cache.persistence.db.wal; - -import java.io.File; -import java.io.IOException; -import java.nio.file.OpenOption; -import java.util.Arrays; -import java.util.concurrent.atomic.AtomicReference; -import org.apache.ignite.IgniteCheckedException; -import org.apache.ignite.cache.CacheAtomicityMode; -import org.apache.ignite.configuration.CacheConfiguration; -import org.apache.ignite.configuration.DataRegionConfiguration; -import org.apache.ignite.configuration.DataStorageConfiguration; -import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.configuration.WALMode; -import org.apache.ignite.failure.FailureHandler; -import org.apache.ignite.failure.TestFailureHandler; -import org.apache.ignite.internal.pagemem.wal.IgniteWriteAheadLogManager; -import org.apache.ignite.internal.processors.cache.persistence.StorageException; -import org.apache.ignite.internal.processors.cache.persistence.file.FileIO; -import org.apache.ignite.internal.processors.cache.persistence.file.FileIODecorator; -import org.apache.ignite.internal.processors.cache.persistence.file.FileIOFactory; -import org.apache.ignite.internal.processors.cache.persistence.file.RandomAccessFileIOFactory; -import org.apache.ignite.internal.processors.cache.persistence.wal.FileWriteAheadLogManager; -import org.apache.ignite.internal.util.typedef.X; -import org.apache.ignite.testframework.GridTestUtils; -import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; - -/** - * - */ -public class IgniteWalFormatFileFailoverTest extends GridCommonAbstractTest { - /** */ - private static final String TEST_CACHE = "testCache"; - - /** */ - private static final String formatFile = "formatFile"; - - /** Fail method name reference. */ - private final AtomicReference failMtdNameRef = new AtomicReference<>(); - - /** */ - private boolean fsync; - - /** {@inheritDoc} */ - @Override protected void beforeTest() throws Exception { - cleanPersistenceDir(); - } - - /** {@inheritDoc} */ - @Override protected void afterTest() throws Exception { - stopAllGrids(); - - cleanPersistenceDir(); - } - - /** {@inheritDoc} */ - @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { - IgniteConfiguration cfg = super.getConfiguration(gridName); - - cfg.setCacheConfiguration(new CacheConfiguration(TEST_CACHE) - .setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL)); - - DataStorageConfiguration memCfg = new DataStorageConfiguration() - .setDefaultDataRegionConfiguration(new DataRegionConfiguration() - .setMaxSize(2048L * 1024 * 1024) - .setPersistenceEnabled(true)) - .setWalMode(fsync ? WALMode.FSYNC : WALMode.BACKGROUND) - .setWalBufferSize(1024 * 1024) - .setWalSegmentSize(512 * 1024) - .setFileIOFactory(new FailingFileIOFactory(failMtdNameRef)); - - cfg.setDataStorageConfiguration(memCfg); - - cfg.setFailureHandler(new TestFailureHandler(false)); - - return cfg; - } - - /** - * @throws Exception If failed. - */ - public void testNodeStartFailedFsync() throws Exception { - fsync = true; - - failMtdNameRef.set(formatFile); - - checkCause(GridTestUtils.assertThrows(log, () -> startGrid(0), IgniteCheckedException.class, null)); - } - - /** - * @throws Exception If failed. - */ - public void testFailureHandlerTriggeredFsync() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-10035"); - - fsync = true; - - failFormatFileOnClusterActivate(); - } - - /** - * @throws Exception If failed. - */ - public void testFailureHandlerTriggered() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-10035"); - - fsync = false; - - failFormatFileOnClusterActivate(); - } - - /** - * @throws Exception If failed. - */ - private void failFormatFileOnClusterActivate() throws Exception { - failMtdNameRef.set(null); - - startGrid(0); - startGrid(1); - - if (!fsync) { - setFileIOFactory(grid(0).context().cache().context().wal()); - setFileIOFactory(grid(1).context().cache().context().wal()); - } - - failMtdNameRef.set(formatFile); - - grid(0).cluster().active(true); - - checkCause(failureHandler(0).awaitFailure(2000).error()); - checkCause(failureHandler(1).awaitFailure(2000).error()); - } - - /** - * @param mtdName Method name. - */ - private static boolean isCalledFrom(String mtdName) { - return isCalledFrom(Thread.currentThread().getStackTrace(), mtdName); - } - - /** - * @param stackTrace Stack trace. - * @param mtdName Method name. - */ - private static boolean isCalledFrom(StackTraceElement[] stackTrace, String mtdName) { - return Arrays.stream(stackTrace).map(StackTraceElement::getMethodName).anyMatch(mtdName::equals); - } - - /** - * @param gridIdx Grid index. - * @return Failure handler configured for grid with given index. - */ - private TestFailureHandler failureHandler(int gridIdx) { - FailureHandler hnd = grid(gridIdx).configuration().getFailureHandler(); - - assertTrue(hnd instanceof TestFailureHandler); - - return (TestFailureHandler)hnd; - } - - /** - * @param t Throwable. - */ - private void checkCause(Throwable t) { - StorageException e = X.cause(t, StorageException.class); - - assertNotNull(e); - assertNotNull(e.getMessage()); - assertTrue(e.getMessage().contains("Failed to format WAL segment file")); - - IOException ioe = X.cause(e, IOException.class); - - assertNotNull(ioe); - assertNotNull(ioe.getMessage()); - assertTrue(ioe.getMessage().contains("No space left on device")); - - assertTrue(isCalledFrom(ioe.getStackTrace(), formatFile)); - } - - /** */ - private void setFileIOFactory(IgniteWriteAheadLogManager wal) { - if (wal instanceof FileWriteAheadLogManager) - ((FileWriteAheadLogManager)wal).setFileIOFactory(new FailingFileIOFactory(failMtdNameRef)); - else - fail(wal.getClass().toString()); - } - - /** - * Create File I/O which fails if specific method call present in stack trace. - */ - private static class FailingFileIOFactory implements FileIOFactory { - /** Serial version uid. */ - private static final long serialVersionUID = 0L; - - /** Delegate factory. */ - private final FileIOFactory delegateFactory = new RandomAccessFileIOFactory(); - - /** Fail method name reference. */ - private final AtomicReference failMtdNameRef; - - /** - * @param failMtdNameRef Fail method name reference. - */ - FailingFileIOFactory(AtomicReference failMtdNameRef) { - assertNotNull(failMtdNameRef); - - this.failMtdNameRef = failMtdNameRef; - } - - /** {@inheritDoc} */ - @Override public FileIO create(File file, OpenOption... modes) throws IOException { - final FileIO delegate = delegateFactory.create(file, modes); - - return new FileIODecorator(delegate) { - @Override public int write(byte[] buf, int off, int len) throws IOException { - conditionalFail(); - - return super.write(buf, off, len); - } - - @Override public void clear() throws IOException { - conditionalFail(); - - super.clear(); - } - - private void conditionalFail() throws IOException { - String failMtdName = failMtdNameRef.get(); - - if (failMtdName != null && isCalledFrom(failMtdName)) - throw new IOException("No space left on device"); - } - }; - } - } -} +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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.apache.ignite.internal.processors.cache.persistence.db.wal; + +import java.io.File; +import java.io.IOException; +import java.nio.file.OpenOption; +import java.util.Arrays; +import java.util.concurrent.atomic.AtomicReference; +import org.apache.ignite.IgniteCheckedException; +import org.apache.ignite.cache.CacheAtomicityMode; +import org.apache.ignite.configuration.CacheConfiguration; +import org.apache.ignite.configuration.DataRegionConfiguration; +import org.apache.ignite.configuration.DataStorageConfiguration; +import org.apache.ignite.configuration.IgniteConfiguration; +import org.apache.ignite.configuration.WALMode; +import org.apache.ignite.failure.FailureHandler; +import org.apache.ignite.failure.TestFailureHandler; +import org.apache.ignite.internal.pagemem.wal.IgniteWriteAheadLogManager; +import org.apache.ignite.internal.processors.cache.persistence.StorageException; +import org.apache.ignite.internal.processors.cache.persistence.file.FileIO; +import org.apache.ignite.internal.processors.cache.persistence.file.FileIODecorator; +import org.apache.ignite.internal.processors.cache.persistence.file.FileIOFactory; +import org.apache.ignite.internal.processors.cache.persistence.file.RandomAccessFileIOFactory; +import org.apache.ignite.internal.processors.cache.persistence.wal.FileWriteAheadLogManager; +import org.apache.ignite.internal.util.typedef.X; +import org.apache.ignite.testframework.GridTestUtils; +import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; + +/** + * + */ +public class IgniteWalFormatFileFailoverTest extends GridCommonAbstractTest { + /** */ + private static final String TEST_CACHE = "testCache"; + + /** */ + private static final String formatFile = "formatFile"; + + /** Fail method name reference. */ + private final AtomicReference failMtdNameRef = new AtomicReference<>(); + + /** */ + private boolean fsync; + + /** {@inheritDoc} */ + @Override protected void beforeTest() throws Exception { + cleanPersistenceDir(); + } + + /** {@inheritDoc} */ + @Override protected void afterTest() throws Exception { + stopAllGrids(); + + cleanPersistenceDir(); + } + + /** {@inheritDoc} */ + @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { + IgniteConfiguration cfg = super.getConfiguration(gridName); + + cfg.setCacheConfiguration(new CacheConfiguration(TEST_CACHE) + .setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL)); + + DataStorageConfiguration memCfg = new DataStorageConfiguration() + .setDefaultDataRegionConfiguration(new DataRegionConfiguration() + .setMaxSize(2048L * 1024 * 1024) + .setPersistenceEnabled(true)) + .setWalMode(fsync ? WALMode.FSYNC : WALMode.BACKGROUND) + .setWalBufferSize(1024 * 1024) + .setWalSegmentSize(512 * 1024) + .setFileIOFactory(new FailingFileIOFactory(failMtdNameRef)); + + cfg.setDataStorageConfiguration(memCfg); + + cfg.setFailureHandler(new TestFailureHandler(false)); + + return cfg; + } + + /** + * @throws Exception If failed. + */ + @Test + public void testNodeStartFailedFsync() throws Exception { + fsync = true; + + failMtdNameRef.set(formatFile); + + checkCause(GridTestUtils.assertThrows(log, () -> startGrid(0), IgniteCheckedException.class, null)); + } + + /** + * @throws Exception If failed. + */ + @Test + public void testFailureHandlerTriggeredFsync() throws Exception { + fail("https://issues.apache.org/jira/browse/IGNITE-10035"); + + fsync = true; + + failFormatFileOnClusterActivate(); + } + + /** + * @throws Exception If failed. + */ + @Test + public void testFailureHandlerTriggered() throws Exception { + fail("https://issues.apache.org/jira/browse/IGNITE-10035"); + + fsync = false; + + failFormatFileOnClusterActivate(); + } + + /** + * @throws Exception If failed. + */ + private void failFormatFileOnClusterActivate() throws Exception { + failMtdNameRef.set(null); + + startGrid(0); + startGrid(1); + + if (!fsync) { + setFileIOFactory(grid(0).context().cache().context().wal()); + setFileIOFactory(grid(1).context().cache().context().wal()); + } + + failMtdNameRef.set(formatFile); + + grid(0).cluster().active(true); + + checkCause(failureHandler(0).awaitFailure(2000).error()); + checkCause(failureHandler(1).awaitFailure(2000).error()); + } + + /** + * @param mtdName Method name. + */ + private static boolean isCalledFrom(String mtdName) { + return isCalledFrom(Thread.currentThread().getStackTrace(), mtdName); + } + + /** + * @param stackTrace Stack trace. + * @param mtdName Method name. + */ + private static boolean isCalledFrom(StackTraceElement[] stackTrace, String mtdName) { + return Arrays.stream(stackTrace).map(StackTraceElement::getMethodName).anyMatch(mtdName::equals); + } + + /** + * @param gridIdx Grid index. + * @return Failure handler configured for grid with given index. + */ + private TestFailureHandler failureHandler(int gridIdx) { + FailureHandler hnd = grid(gridIdx).configuration().getFailureHandler(); + + assertTrue(hnd instanceof TestFailureHandler); + + return (TestFailureHandler)hnd; + } + + /** + * @param t Throwable. + */ + private void checkCause(Throwable t) { + StorageException e = X.cause(t, StorageException.class); + + assertNotNull(e); + assertNotNull(e.getMessage()); + assertTrue(e.getMessage().contains("Failed to format WAL segment file")); + + IOException ioe = X.cause(e, IOException.class); + + assertNotNull(ioe); + assertNotNull(ioe.getMessage()); + assertTrue(ioe.getMessage().contains("No space left on device")); + + assertTrue(isCalledFrom(ioe.getStackTrace(), formatFile)); + } + + /** */ + private void setFileIOFactory(IgniteWriteAheadLogManager wal) { + if (wal instanceof FileWriteAheadLogManager) + ((FileWriteAheadLogManager)wal).setFileIOFactory(new FailingFileIOFactory(failMtdNameRef)); + else + fail(wal.getClass().toString()); + } + + /** + * Create File I/O which fails if specific method call present in stack trace. + */ + private static class FailingFileIOFactory implements FileIOFactory { + /** Serial version uid. */ + private static final long serialVersionUID = 0L; + + /** Delegate factory. */ + private final FileIOFactory delegateFactory = new RandomAccessFileIOFactory(); + + /** Fail method name reference. */ + private final AtomicReference failMtdNameRef; + + /** + * @param failMtdNameRef Fail method name reference. + */ + FailingFileIOFactory(AtomicReference failMtdNameRef) { + assertNotNull(failMtdNameRef); + + this.failMtdNameRef = failMtdNameRef; + } + + /** {@inheritDoc} */ + @Override public FileIO create(File file, OpenOption... modes) throws IOException { + final FileIO delegate = delegateFactory.create(file, modes); + + return new FileIODecorator(delegate) { + @Override public int write(byte[] buf, int off, int len) throws IOException { + conditionalFail(); + + return super.write(buf, off, len); + } + + @Override public void clear() throws IOException { + conditionalFail(); + + super.clear(); + } + + private void conditionalFail() throws IOException { + String failMtdName = failMtdNameRef.get(); + + if (failMtdName != null && isCalledFrom(failMtdName)) + throw new IOException("No space left on device"); + } + }; + } + } +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalHistoryReservationsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalHistoryReservationsTest.java index 4c34093a10544..2544aae233793 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalHistoryReservationsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalHistoryReservationsTest.java @@ -106,6 +106,7 @@ public class IgniteWalHistoryReservationsTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testReservedOnExchange() throws Exception { System.setProperty(IGNITE_PDS_WAL_REBALANCE_THRESHOLD, "0"); @@ -251,6 +252,7 @@ private void printProgress(int k) { /** * @throws Exception If failed. */ + @Test public void testRemovesArePreloadedIfHistoryIsAvailable() throws Exception { int entryCnt = 10_000; @@ -300,6 +302,7 @@ public void testRemovesArePreloadedIfHistoryIsAvailable() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNodeIsClearedIfHistoryIsUnavailable() throws Exception { int entryCnt = 10_000; @@ -360,6 +363,7 @@ public void testNodeIsClearedIfHistoryIsUnavailable() throws Exception { /** * @throws Exception If failed. */ + @Test public void testWalHistoryPartiallyRemoved() throws Exception { int entryCnt = 10_000; @@ -399,6 +403,7 @@ public void testWalHistoryPartiallyRemoved() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNodeLeftDuringExchange() throws Exception { System.setProperty(IGNITE_PDS_WAL_REBALANCE_THRESHOLD, "0"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalIteratorExceptionDuringReadTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalIteratorExceptionDuringReadTest.java index ccd889aaaaf42..9174720354ad0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalIteratorExceptionDuringReadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalIteratorExceptionDuringReadTest.java @@ -81,6 +81,7 @@ public class IgniteWalIteratorExceptionDuringReadTest extends GridCommonAbstract /** * @throws Exception If failed. */ + @Test public void test() throws Exception { IgniteEx ig = (IgniteEx)startGrid(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalIteratorSwitchSegmentTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalIteratorSwitchSegmentTest.java index 0e147b7f1fd07..62357f71b1f60 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalIteratorSwitchSegmentTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalIteratorSwitchSegmentTest.java @@ -105,6 +105,7 @@ public class IgniteWalIteratorSwitchSegmentTest extends GridCommonAbstractTest { * * @throws Exception If some thing failed. */ + @Test public void testCheckSerializer() throws Exception { for (int serVer : checkSerializerVers) { checkInvariantSwitchSegmentSize(serVer); @@ -161,6 +162,7 @@ private void checkInvariantSwitchSegmentSize(int serVer) throws Exception { * * @throws Exception If some thing failed. */ + @Test public void testInvariantSwitchSegment() throws Exception { for (int serVer : checkSerializerVers) { try { @@ -177,6 +179,7 @@ public void testInvariantSwitchSegment() throws Exception { * * @throws Exception If some thing failed. */ + @Test public void testSwitchReadingSegmentFromWorkToArchive() throws Exception { for (int serVer : checkSerializerVers) { try { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRebalanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRebalanceTest.java index febe4567578f2..edf757ddc0192 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRebalanceTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRebalanceTest.java @@ -148,6 +148,7 @@ public class IgniteWalRebalanceTest extends GridCommonAbstractTest { * * @throws Exception if failed. */ + @Test public void testSimple() throws Exception { IgniteEx ig0 = startGrid(0); IgniteEx ig1 = startGrid(1); @@ -187,6 +188,7 @@ public void testSimple() throws Exception { * * @throws Exception If failed. */ + @Test public void testRebalanceRemoves() throws Exception { IgniteEx ig0 = startGrid(0); IgniteEx ig1 = startGrid(1); @@ -234,6 +236,7 @@ public void testRebalanceRemoves() throws Exception { * * @throws Exception If failed. */ + @Test public void testWithLocalWalChange() throws Exception { System.setProperty(IgniteSystemProperties.IGNITE_DISABLE_WAL_DURING_REBALANCING, "true"); @@ -323,6 +326,7 @@ else if (k % 3 == 1) * * @throws Exception If failed. */ + @Test public void testWithGlobalWalChange() throws Exception { // Prepare some data. IgniteEx crd = (IgniteEx) startGrids(3); @@ -402,6 +406,7 @@ public void testWithGlobalWalChange() throws Exception { * * @throws Exception If failed. */ + @Test public void testRebalanceCancelOnSupplyError() throws Exception { // Prepare some data. IgniteEx crd = (IgniteEx) startGrids(3); @@ -637,4 +642,4 @@ public void reset() { failRead = false; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoveryPPCTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoveryPPCTest.java index 49cf5b4612f9f..55b22d43b35d9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoveryPPCTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoveryPPCTest.java @@ -137,6 +137,7 @@ public class IgniteWalRecoveryPPCTest extends GridCommonAbstractTest { /** * @throws Exception if failed. */ + @Test public void testWalSimple() throws Exception { try { IgniteEx ignite = startGrid(1); @@ -233,6 +234,7 @@ else if (i % 2 == 0) /** * */ + @Test public void testDynamicallyStartedNonPersistentCache() throws Exception { try { IgniteEx ignite = startGrid(1); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoverySeveralRestartsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoverySeveralRestartsTest.java index db20ace425b6f..84375095d3026 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoverySeveralRestartsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoverySeveralRestartsTest.java @@ -113,6 +113,7 @@ public class IgniteWalRecoverySeveralRestartsTest extends GridCommonAbstractTest /** * @throws Exception if failed. */ + @Test public void testWalRecoverySeveralRestarts() throws Exception { try { IgniteEx ignite = startGrid(1); @@ -168,6 +169,7 @@ public void testWalRecoverySeveralRestarts() throws Exception { /** * @throws Exception if failed. */ + @Test public void testWalRecoveryWithDynamicCache() throws Exception { try { IgniteEx ignite = startGrid(1); @@ -221,6 +223,7 @@ public void testWalRecoveryWithDynamicCache() throws Exception { /** * @throws Exception if failed. */ + @Test public void testWalRecoveryWithDynamicCacheLargeObjects() throws Exception { try { IgniteEx ignite = startGrid(1); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalSerializerVersionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalSerializerVersionTest.java index dcb8e7f452719..16edab1ea9273 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalSerializerVersionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalSerializerVersionTest.java @@ -76,6 +76,7 @@ public class IgniteWalSerializerVersionTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCheckDifferentSerializerVersions() throws Exception { System.setProperty(IGNITE_WAL_SERIALIZER_VERSION, "1"); @@ -127,6 +128,7 @@ public void testCheckDifferentSerializerVersions() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCheckDifferentSerializerVersionsAndLogTimestamp() throws Exception { IgniteCallable> recordsFactory = new IgniteCallable>() { @Override public List call() throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalCompactionAfterRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalCompactionAfterRestartTest.java index 3685fe7635683..1a11a45c8578e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalCompactionAfterRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalCompactionAfterRestartTest.java @@ -100,6 +100,7 @@ public class WalCompactionAfterRestartTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void test() throws Exception { IgniteEx ig = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalCompactionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalCompactionTest.java index 14525f097a3da..a0ebe3a7e14cc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalCompactionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalCompactionTest.java @@ -116,6 +116,7 @@ public class WalCompactionTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testApplyingUpdatesFromCompactedWal() throws Exception { testApplyingUpdatesFromCompactedWal(false); } @@ -125,6 +126,7 @@ public void testApplyingUpdatesFromCompactedWal() throws Exception { * * @throws Exception If failed. */ + @Test public void testApplyingUpdatesFromCompactedWalWhenCompressorDisabled() throws Exception { testApplyingUpdatesFromCompactedWal(true); } @@ -241,6 +243,7 @@ else if (arr[i] != 1) { /** * */ + @Test public void testCompressorToleratesEmptyWalSegmentsFsync() throws Exception { testCompressorToleratesEmptyWalSegments(WALMode.FSYNC); } @@ -248,6 +251,7 @@ public void testCompressorToleratesEmptyWalSegmentsFsync() throws Exception { /** * */ + @Test public void testCompressorToleratesEmptyWalSegmentsLogOnly() throws Exception { testCompressorToleratesEmptyWalSegments(WALMode.LOG_ONLY); } @@ -321,6 +325,7 @@ private void testCompressorToleratesEmptyWalSegments(WALMode walMode) throws Exc /** * @throws Exception If failed. */ + @Test public void testSeekingStartInCompactedSegment() throws Exception { IgniteEx ig = (IgniteEx)startGrids(3); ig.cluster().active(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalDeletionArchiveAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalDeletionArchiveAbstractTest.java index 3a99236806c08..5690c9f2a01e8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalDeletionArchiveAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalDeletionArchiveAbstractTest.java @@ -94,6 +94,7 @@ private Ignite startGrid(Consumer customConfigurator) /** * History size parameters consistency check. Should be set just one of wal history size or max wal archive size. */ + @Test public void testGridDoesNotStart_BecauseBothWalHistorySizeAndMaxWalArchiveSizeUsed() throws Exception { //given: wal history size and max wal archive size are both set. IgniteConfiguration configuration = getConfiguration(getTestIgniteInstanceName()); @@ -124,6 +125,7 @@ private String findSourceMessage(Throwable ex) { /** * Correct delete archived wal files. */ + @Test public void testCorrectDeletedArchivedWalFiles() throws Exception { //given: configured grid with setted max wal archive size long maxWalArchiveSize = 2 * 1024 * 1024; @@ -164,6 +166,7 @@ public void testCorrectDeletedArchivedWalFiles() throws Exception { /** * Checkpoint triggered depends on wal size. */ + @Test public void testCheckpointStarted_WhenWalHasTooBigSizeWithoutCheckpoint() throws Exception { //given: configured grid with max wal archive size = 1MB, wal segment size = 512KB Ignite ignite = startGrid(dbCfg -> { @@ -190,6 +193,7 @@ public void testCheckpointStarted_WhenWalHasTooBigSizeWithoutCheckpoint() throws * * @deprecated Test old removing process depends on WalHistorySize. */ + @Test public void testCheckpointHistoryRemovingByWalHistorySize() throws Exception { //given: configured grid with wal history size = 10 int walHistorySize = 10; @@ -224,6 +228,7 @@ public void testCheckpointHistoryRemovingByWalHistorySize() throws Exception { * Correct delete checkpoint history from memory depends on IGNITE_PDS_MAX_CHECKPOINT_MEMORY_HISTORY_SIZE. WAL files * doesn't delete because deleting was disabled. */ + @Test public void testCorrectDeletedCheckpointHistoryButKeepWalFiles() throws Exception { System.setProperty(IGNITE_PDS_MAX_CHECKPOINT_MEMORY_HISTORY_SIZE, "2"); //given: configured grid with disabled WAL removing. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalPathsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalPathsTest.java index 7141fed0807f4..be59889d2dd7a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalPathsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalPathsTest.java @@ -67,6 +67,7 @@ private IgniteConfiguration getConfig(boolean relativePath) throws Exception { * * @throws Exception If failed. */ + @Test public void testWalStoreAndArchivePathsEquality() throws Exception { IgniteConfiguration cfg = getConfig(false); @@ -78,6 +79,7 @@ public void testWalStoreAndArchivePathsEquality() throws Exception { * * @throws Exception If failed. */ + @Test public void testWalStoreAndArchiveAbsolutAndRelativePathsEquality() throws Exception { final IgniteConfiguration cfg = getConfig(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRecoveryTxLogicalRecordsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRecoveryTxLogicalRecordsTest.java index d2ea4f114d372..8e1e416ef4da5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRecoveryTxLogicalRecordsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRecoveryTxLogicalRecordsTest.java @@ -146,6 +146,7 @@ public class WalRecoveryTxLogicalRecordsTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testWalTxSimple() throws Exception { Ignite ignite = startGrid(); @@ -221,6 +222,7 @@ public void testWalTxSimple() throws Exception { /** * @throws Exception if failed. */ + @Test public void testWalRecoveryRemoves() throws Exception { Ignite ignite = startGrid(); @@ -309,6 +311,7 @@ public void testWalRecoveryRemoves() throws Exception { /** * @throws Exception if failed. */ + @Test public void testHistoricalRebalanceIterator() throws Exception { System.setProperty(IgniteSystemProperties.IGNITE_PDS_WAL_REBALANCE_THRESHOLD, "0"); @@ -473,6 +476,7 @@ public void testHistoricalRebalanceIterator() throws Exception { /** * @throws Exception If failed. */ + @Test public void testWalAfterPreloading() throws Exception { Ignite ignite = startGrid(); @@ -515,6 +519,7 @@ public void testWalAfterPreloading() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRecoveryRandomPutRemove() throws Exception { try { pageSize = 1024; @@ -572,6 +577,7 @@ public void testRecoveryRandomPutRemove() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRecoveryNoPageLost1() throws Exception { recoveryNoPageLost(false); } @@ -579,6 +585,7 @@ public void testRecoveryNoPageLost1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRecoveryNoPageLost2() throws Exception { recoveryNoPageLost(true); } @@ -588,6 +595,7 @@ public void testRecoveryNoPageLost2() throws Exception { * * @throws Exception If failed. */ + @Test public void testRecoveryNoPageLost3() throws Exception { try { pageSize = 1024; @@ -723,6 +731,7 @@ private List allocatedPages(Ignite ignite, String cacheName) throws Exc /** * @throws Exception If failed. */ + @Test public void testFreeListRecovery() throws Exception { try { pageSize = 1024; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRolloverRecordLoggingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRolloverRecordLoggingTest.java index df6f57ddb1b8e..e1a4d8151e87e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRolloverRecordLoggingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRolloverRecordLoggingTest.java @@ -93,6 +93,7 @@ private RolloverRecord() { } /** */ + @Test public void testAvoidInfinityWaitingOnRolloverOfSegment() throws Exception { IgniteEx ig = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRolloverTypesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRolloverTypesTest.java index db56cd24a534f..7b9a38bb4141e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRolloverTypesTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRolloverTypesTest.java @@ -101,41 +101,49 @@ private AdHocWALRecord() { } /** */ + @Test public void testCurrentSegmentTypeLogOnlyModeArchiveOn() throws Exception { checkCurrentSegmentType(LOG_ONLY, false); } /** */ + @Test public void testCurrentSegmentTypeLogOnlyModeArchiveOff() throws Exception { checkCurrentSegmentType(LOG_ONLY, true); } /** */ + @Test public void testCurrentSegmentTypeLogFsyncModeArchiveOn() throws Exception { checkCurrentSegmentType(FSYNC, false); } /** */ + @Test public void testCurrentSegmentTypeLogFsyncModeArchiveOff() throws Exception { checkCurrentSegmentType(FSYNC, true); } /** */ + @Test public void testNextSegmentTypeLogOnlyModeArchiveOn() throws Exception { checkNextSegmentType(LOG_ONLY, false); } /** */ + @Test public void testNextSegmentTypeLogOnlyModeArchiveOff() throws Exception { checkNextSegmentType(LOG_ONLY, true); } /** */ + @Test public void testNextSegmentTypeFsyncModeArchiveOn() throws Exception { checkNextSegmentType(FSYNC, false); } /** */ + @Test public void testNextSegmentTypeFsyncModeArchiveOff() throws Exception { checkNextSegmentType(FSYNC, true); } @@ -187,21 +195,25 @@ private void checkNextSegmentType(WALMode mode, boolean disableArch) throws Exce } /** */ + @Test public void testNextSegmentTypeWithCacheActivityLogOnlyModeArchiveOn() throws Exception { checkNextSegmentTypeWithCacheActivity(LOG_ONLY, false); } /** */ + @Test public void testNextSegmentTypeWithCacheActivityLogOnlyModeArchiveOff() throws Exception { checkNextSegmentTypeWithCacheActivity(LOG_ONLY, true); } /** */ + @Test public void testNextSegmentTypeWithCacheActivityFsyncModeArchiveOn() throws Exception { checkNextSegmentTypeWithCacheActivity(FSYNC, false); } /** */ + @Test public void testNextSegmentTypeWithCacheActivityFsyncModeArchiveOff() throws Exception { checkNextSegmentTypeWithCacheActivity(FSYNC, true); } @@ -273,21 +285,25 @@ private void checkNextSegmentTypeWithCacheActivity(WALMode mode, boolean disable } /** */ + @Test public void testCurrentSegmentTypeWithCacheActivityLogOnlyModeArchiveOn() throws Exception { checkCurrentSegmentTypeWithCacheActivity(LOG_ONLY, false); } /** */ + @Test public void testCurrentSegmentTypeWithCacheActivityLogOnlyModeArchiveOff() throws Exception { checkCurrentSegmentTypeWithCacheActivity(LOG_ONLY, true); } /** */ + @Test public void testCurrentSegmentTypeWithCacheActivityFsyncModeArchiveOn() throws Exception { checkCurrentSegmentTypeWithCacheActivity(FSYNC, false); } /** */ + @Test public void testCurrentSegmentTypeWithCacheActivityFsyncModeArchiveOff() throws Exception { checkCurrentSegmentTypeWithCacheActivity(FSYNC, true); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteAbstractWalIteratorInvalidCrcTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteAbstractWalIteratorInvalidCrcTest.java index 0b53bb8252051..1f3dc88104630 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteAbstractWalIteratorInvalidCrcTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteAbstractWalIteratorInvalidCrcTest.java @@ -150,6 +150,7 @@ public abstract class IgniteAbstractWalIteratorInvalidCrcTest extends GridCommon * Test that iteration fails if one of archive segments contains record with invalid CRC. * @throws Exception If failed. */ + @Test public void testArchiveCorruptedPtr() throws Exception { doTest((archiveDescs, descs) -> archiveDescs.get(random.nextInt(archiveDescs.size())), false, true); } @@ -159,6 +160,7 @@ public void testArchiveCorruptedPtr() throws Exception { * and it is not the tail segment. * @throws Exception If failed. */ + @Test public void testNotTailCorruptedPtr() throws Exception { doTest((archiveDescs, descs) -> descs.get(random.nextInt(descs.size() - 1)), true, true); } @@ -168,6 +170,7 @@ public void testNotTailCorruptedPtr() throws Exception { * Test that iteration does not fail if tail segment in working directory contains record with invalid CRC. * @throws Exception If failed. */ + @Test public void testTailCorruptedPtr() throws Exception { doTest((archiveDescs, descs) -> descs.get(descs.size() - 1), false, false); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteDataIntegrityTests.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteDataIntegrityTests.java index 3ad4c9007e752..72899f872f222 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteDataIntegrityTests.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteDataIntegrityTests.java @@ -86,6 +86,7 @@ public class IgniteDataIntegrityTests extends TestCase { /** * */ + @Test public void testSuccessfulPath() throws Exception { checkIntegrity(); } @@ -93,6 +94,7 @@ public void testSuccessfulPath() throws Exception { /** * */ + @Test public void testIntegrityViolationChecking() throws Exception { toggleOneRandomBit(0, 1024 - 16); @@ -108,6 +110,7 @@ public void testIntegrityViolationChecking() throws Exception { /** * */ + @Test public void testSkipingLastCorruptedEntry() throws Exception { toggleOneRandomBit(1024 - 16, 1024); @@ -123,6 +126,7 @@ public void testSkipingLastCorruptedEntry() throws Exception { /** * */ + @Test public void testExpandBuffer() { ByteBufferExpander expBuf = new ByteBufferExpander(24, ByteOrder.nativeOrder()); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgnitePureJavaCrcCompatibility.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgnitePureJavaCrcCompatibility.java index faafad214270a..2702ceed829f2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgnitePureJavaCrcCompatibility.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgnitePureJavaCrcCompatibility.java @@ -32,6 +32,7 @@ public class IgnitePureJavaCrcCompatibility extends TestCase { * Test crc algo equality results. * @throws Exception */ + @Test public void testAlgoEqual() throws Exception { ByteBuffer buf = ByteBuffer.allocate(1024); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteReplayWalIteratorInvalidCrcTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteReplayWalIteratorInvalidCrcTest.java index 756ef78798032..7bcf73c275eef 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteReplayWalIteratorInvalidCrcTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteReplayWalIteratorInvalidCrcTest.java @@ -49,6 +49,7 @@ public class IgniteReplayWalIteratorInvalidCrcTest extends IgniteAbstractWalIter * {@inheritDoc} * Case is not relevant to the replay iterator. */ - @Override public void testNotTailCorruptedPtr() { + @Override @Test + public void testNotTailCorruptedPtr() { } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/reader/IgniteWalReaderTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/reader/IgniteWalReaderTest.java index beab13883a7e0..545df062ad687 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/reader/IgniteWalReaderTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/reader/IgniteWalReaderTest.java @@ -202,6 +202,7 @@ public class IgniteWalReaderTest extends GridCommonAbstractTest { /** * @throws Exception if failed. */ + @Test public void testFillWalAndReadRecords() throws Exception { setWalAndArchiveToSameVal = false; @@ -293,6 +294,7 @@ private int iterateAndCount(WALIterator walIter) throws IgniteCheckedException { * * @throws Exception if failed. */ + @Test public void testArchiveCompletedEventFired() throws Exception { assertTrue(checkWhetherWALRelatedEventFired(EVT_WAL_SEGMENT_ARCHIVED)); } @@ -302,6 +304,7 @@ public void testArchiveCompletedEventFired() throws Exception { * * @throws Exception if failed. */ + @Test public void testArchiveCompactedEventFired() throws Exception { boolean oldEnableWalCompaction = enableWalCompaction; @@ -353,6 +356,7 @@ private boolean checkWhetherWALRelatedEventFired(int evtType) throws Exception { * * @throws Exception if failure occurs. */ + @Test public void testArchiveIncompleteSegmentAfterInactivity() throws Exception { AtomicBoolean waitingForEvt = new AtomicBoolean(); @@ -399,6 +403,7 @@ public void testArchiveIncompleteSegmentAfterInactivity() throws Exception { * * @throws Exception if failed. */ + @Test public void testFillWalForExactSegmentsCount() throws Exception { customWalMode = WALMode.FSYNC; @@ -483,6 +488,7 @@ private boolean remove(Map m, Object key, Object val) { * * @throws Exception if failed. */ + @Test public void testTxFillWalAndExtractDataRecords() throws Exception { Ignite ignite0 = startGrid(); @@ -584,6 +590,7 @@ private void scanIterateAndCount( /** * @throws Exception if failed. */ + @Test public void testFillWalWithDifferentTypes() throws Exception { Ignite ig = startGrid(); @@ -778,6 +785,7 @@ else if (val12 instanceof BinaryObject) { * * @throws Exception if failed. */ + @Test public void testReadEmptyWal() throws Exception { customWalMode = WALMode.FSYNC; @@ -845,6 +853,7 @@ private void createCache2(Ignite ig, CacheAtomicityMode mode) { * * @throws Exception if failed. */ + @Test public void testRemoveOperationPresentedForDataEntry() throws Exception { runRemoveOperationTest(CacheAtomicityMode.TRANSACTIONAL); } @@ -854,6 +863,7 @@ public void testRemoveOperationPresentedForDataEntry() throws Exception { * * @throws Exception if failed. */ + @Test public void testRemoveOperationPresentedForDataEntryForAtomic() throws Exception { runRemoveOperationTest(CacheAtomicityMode.ATOMIC); } @@ -941,6 +951,7 @@ private void runRemoveOperationTest(CacheAtomicityMode mode) throws Exception { * * @throws Exception if failed. */ + @Test public void testPutAllTxIntoTwoNodes() throws Exception { Ignite ignite = startGrid("node0"); Ignite ignite1 = startGrid(1); @@ -1040,6 +1051,7 @@ public void testPutAllTxIntoTwoNodes() throws Exception { * * @throws Exception if failed. */ + @Test public void testTxRecordsReadWoBinaryMeta() throws Exception { clearProps = true; @@ -1081,6 +1093,7 @@ public void testTxRecordsReadWoBinaryMeta() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCheckBoundsIterator() throws Exception { Ignite ignite = startGrid("node0"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/file/FileDownloaderTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/file/FileDownloaderTest.java index 6f01d93c3b487..d2fb572e0ac7a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/file/FileDownloaderTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/file/FileDownloaderTest.java @@ -68,6 +68,7 @@ public class FileDownloaderTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void test() throws Exception { assertTrue(UPLOADER_PATH.toFile().createNewFile()); assertTrue(!DOWNLOADER_PATH.toFile().exists()); @@ -120,4 +121,4 @@ public void test() throws Exception { assertArrayEquals(Files.readAllBytes(UPLOADER_PATH), Files.readAllBytes(DOWNLOADER_PATH)); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/metastorage/IgniteMetaStorageBasicTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/metastorage/IgniteMetaStorageBasicTest.java index 538b332517940..652a917d374c8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/metastorage/IgniteMetaStorageBasicTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/metastorage/IgniteMetaStorageBasicTest.java @@ -83,6 +83,7 @@ public class IgniteMetaStorageBasicTest extends GridCommonAbstractTest { /** * */ + @Test public void testMetaStorageMassivePutFixed() throws Exception { IgniteEx ig = startGrid(0); @@ -120,6 +121,7 @@ public void testMetaStorageMassivePutFixed() throws Exception { /** * */ + @Test public void testMetaStorageMassivePutRandom() throws Exception { IgniteEx ig = startGrid(0); @@ -164,6 +166,7 @@ public void testMetaStorageMassivePutRandom() throws Exception { * * @throws Exception If failed. */ + @Test public void testMetaStorageMassivePutUpdateRestart() throws Exception { IgniteEx ig = startGrid(0); @@ -188,6 +191,7 @@ public void testMetaStorageMassivePutUpdateRestart() throws Exception { /** * @throws Exception If fails. */ + @Test public void testRecoveryOfMetastorageWhenNodeNotInBaseline() throws Exception { IgniteEx ig0 = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/FillFactorMetricTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/FillFactorMetricTest.java index ac65c6dcb2676..b6c5a7620bdbd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/FillFactorMetricTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/FillFactorMetricTest.java @@ -95,6 +95,7 @@ protected CacheConfiguration cacheCfg() { * * @throws Exception if failed. */ + @Test public void testEmptyCachePagesFillFactor() throws Exception { startGrids(1); @@ -112,6 +113,7 @@ public void testEmptyCachePagesFillFactor() throws Exception { /** * throws if failed. */ + @Test public void testFillAndEmpty() throws Exception { final AtomicBoolean stopLoadFlag = new AtomicBoolean(); final AtomicBoolean doneFlag = new AtomicBoolean(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageIdDistributionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageIdDistributionTest.java index 1f4b94fa27e93..db4d762502d89 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageIdDistributionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageIdDistributionTest.java @@ -60,6 +60,7 @@ public class PageIdDistributionTest extends GridCommonAbstractTest { /** * */ + @Test public void testDistributions() { printPageIdDistribution( CU.cacheId("partitioned"), 1024, 10_000, 32, 2.5f); @@ -149,6 +150,7 @@ private void printPageIdDistribution( * * @throws Exception If failed. */ + @Test public void testRealHistory() throws Exception { int capacity = CACHE_IDS.length * PARTS * PAGES; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImplNoLoadTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImplNoLoadTest.java index 36a64f3022bc7..6b64d188fb770 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImplNoLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImplNoLoadTest.java @@ -112,7 +112,8 @@ public class PageMemoryImplNoLoadTest extends PageMemoryNoLoadSelfTest { } /** {@inheritDoc} */ - @Override public void testPageHandleDeallocation() throws Exception { + @Override @Test + public void testPageHandleDeallocation() throws Exception { // No-op. } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImplTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImplTest.java index cfd9543480d29..b4791bab8b7c3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImplTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImplTest.java @@ -73,6 +73,7 @@ public class PageMemoryImplTest extends GridCommonAbstractTest { /** * @throws Exception if failed. */ + @Test public void testThatAllocationTooMuchPagesCauseToOOMException() throws Exception { PageMemoryImpl memory = createPageMemory(PageMemoryImpl.ThrottlingPolicy.DISABLED); @@ -90,6 +91,7 @@ public void testThatAllocationTooMuchPagesCauseToOOMException() throws Exception /** * @throws Exception If failed. */ + @Test public void testCheckpointBufferOverusageDontCauseWriteLockLeak() throws Exception { PageMemoryImpl memory = createPageMemory(PageMemoryImpl.ThrottlingPolicy.DISABLED); @@ -143,6 +145,7 @@ public void testCheckpointBufferOverusageDontCauseWriteLockLeak() throws Excepti * Tests that checkpoint buffer won't be overflowed with enabled CHECKPOINT_BUFFER_ONLY throttling. * @throws Exception If failed. */ + @Test public void testCheckpointBufferCantOverflowMixedLoad() throws Exception { testCheckpointBufferCantOverflowWithThrottlingMixedLoad(PageMemoryImpl.ThrottlingPolicy.CHECKPOINT_BUFFER_ONLY); } @@ -151,6 +154,7 @@ public void testCheckpointBufferCantOverflowMixedLoad() throws Exception { * Tests that checkpoint buffer won't be overflowed with enabled SPEED_BASED throttling. * @throws Exception If failed. */ + @Test public void testCheckpointBufferCantOverflowMixedLoadSpeedBased() throws Exception { testCheckpointBufferCantOverflowWithThrottlingMixedLoad(PageMemoryImpl.ThrottlingPolicy.SPEED_BASED); } @@ -159,6 +163,7 @@ public void testCheckpointBufferCantOverflowMixedLoadSpeedBased() throws Excepti * Tests that checkpoint buffer won't be overflowed with enabled TARGET_RATIO_BASED throttling. * @throws Exception If failed. */ + @Test public void testCheckpointBufferCantOverflowMixedLoadRatioBased() throws Exception { testCheckpointBufferCantOverflowWithThrottlingMixedLoad(PageMemoryImpl.ThrottlingPolicy.TARGET_RATIO_BASED); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryNoStoreLeakTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryNoStoreLeakTest.java index 8505a3572c62c..ec911dc1fc251 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryNoStoreLeakTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryNoStoreLeakTest.java @@ -46,6 +46,7 @@ public class PageMemoryNoStoreLeakTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPageDoubleInitMemoryLeak() throws Exception { long initVMsize = D.getCommittedVirtualMemorySize(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PagesWriteThrottleSandboxTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PagesWriteThrottleSandboxTest.java index c417b07995ebb..07909f5194e27 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PagesWriteThrottleSandboxTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PagesWriteThrottleSandboxTest.java @@ -112,6 +112,7 @@ public class PagesWriteThrottleSandboxTest extends GridCommonAbstractTest { /** * @throws Exception if failed. */ + @Test public void testThrottle() throws Exception { startGrids(1).active(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PagesWriteThrottleSmokeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PagesWriteThrottleSmokeTest.java index dd1f8e33dc81f..1970f3a62d29e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PagesWriteThrottleSmokeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PagesWriteThrottleSmokeTest.java @@ -123,6 +123,7 @@ public class PagesWriteThrottleSmokeTest extends GridCommonAbstractTest { /** * @throws Exception if failed. */ + @Test public void testThrottle() throws Exception { startGrids(2).active(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateCacheTest.java index 938b3c81b1650..c0656c0a64765 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateCacheTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateCacheTest.java @@ -31,6 +31,7 @@ public class IgniteChangeGlobalStateCacheTest extends IgniteChangeGlobalStateAbs /** * */ + @Test public void testCheckValueAfterActivation(){ String cacheName = "my-cache"; @@ -64,6 +65,7 @@ public void testCheckValueAfterActivation(){ /** * @throws Exception If failed. */ + @Test public void testMoreKeyValueAfterActivate() throws Exception { String cacheName = "my-cache"; @@ -117,6 +119,7 @@ public void testMoreKeyValueAfterActivate() throws Exception { /** * @throws Exception if fail. */ + @Test public void testDeActivateAndActivateCacheValue() throws Exception { String chName = "myCache"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateDataStreamerTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateDataStreamerTest.java index 16be316154b21..a43e0d34ca94b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateDataStreamerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateDataStreamerTest.java @@ -38,6 +38,7 @@ public class IgniteChangeGlobalStateDataStreamerTest extends IgniteChangeGlobalS /** * @throws Exception If failed. */ + @Test public void testDeActivateAndActivateDataStreamer() throws Exception { Ignite ig1 = primary(0); Ignite ig2 = primary(1); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateDataStructureTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateDataStructureTest.java index 8902a36ea5622..f3ff41c4b304a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateDataStructureTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateDataStructureTest.java @@ -37,6 +37,7 @@ public class IgniteChangeGlobalStateDataStructureTest extends IgniteChangeGlobal /** * @throws Exception If failed. */ + @Test public void testDeActivateAndActivateAtomicLong() throws Exception { String lName = "myLong"; @@ -108,6 +109,7 @@ public void testDeActivateAndActivateAtomicLong() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeActivateAndActivateCountDownLatch() throws Exception { final AtomicInteger cnt = new AtomicInteger(); @@ -202,6 +204,7 @@ public void testDeActivateAndActivateCountDownLatch() throws Exception { /** * */ + @Test public void testDeActivateAndActivateAtomicSequence(){ String seqName = "mySeq"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateFailOverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateFailOverTest.java index 1ef269e555c20..9ebc3a0e8dd4b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateFailOverTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateFailOverTest.java @@ -57,6 +57,7 @@ public class IgniteChangeGlobalStateFailOverTest extends IgniteChangeGlobalState /** * @throws Exception If failed. */ + @Test public void testActivateDeActivateOnFixTopology() throws Exception { final Ignite igB1 = backUp(0); final Ignite igB2 = backUp(1); @@ -143,6 +144,7 @@ public void testActivateDeActivateOnFixTopology() throws Exception { /** * @throws Exception If failed. */ + @Test public void testActivateDeActivateOnJoiningNode() throws Exception { final Ignite igB1 = backUp(0); final Ignite igB2 = backUp(1); @@ -276,6 +278,7 @@ public void testActivateDeActivateOnJoiningNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testActivateDeActivateOnFixTopologyWithPutValues() throws Exception { final Ignite igB1 = backUp(0); final Ignite igB2 = backUp(1); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateServiceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateServiceTest.java index e6c9ae5976e03..3e5c66f022ca4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateServiceTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateServiceTest.java @@ -48,6 +48,7 @@ public class IgniteChangeGlobalStateServiceTest extends IgniteChangeGlobalStateA /** * */ + @Test public void testDeployService() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-6629"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateTest.java index f69c3a32fe165..fea4b5b5f9804 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateTest.java @@ -42,6 +42,7 @@ public class IgniteChangeGlobalStateTest extends IgniteChangeGlobalStateAbstract /** * @throws Exception if fail. */ + @Test public void testStopPrimaryAndActivateFromServerNode() throws Exception { Ignite ig1P = primary(0); Ignite ig2P = primary(1); @@ -71,6 +72,7 @@ public void testStopPrimaryAndActivateFromServerNode() throws Exception { /** * @throws Exception if fail. */ + @Test public void testStopPrimaryAndActivateFromClientNode() throws Exception { Ignite ig1P = primary(0); Ignite ig2P = primary(1); @@ -112,6 +114,7 @@ public void testStopPrimaryAndActivateFromClientNode() throws Exception { /** * @throws Exception if fail. */ + @Test public void testConcurrentActivateFromClientNodeAndServerNode() throws Exception { final Ignite ig1B = backUp(0); final Ignite ig2B = backUp(1); @@ -209,6 +212,7 @@ public void testConcurrentActivateFromClientNodeAndServerNode() throws Exception /** * @throws Exception if fail. */ + @Test public void testConcurrentActivateFromServerNode() throws Exception { final Ignite ig1B = backUp(0); final Ignite ig2B = backUp(1); @@ -264,6 +268,7 @@ public void testConcurrentActivateFromServerNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testActiveAndInActiveAtTheSameTimeCluster() throws Exception { Ignite ig1P = primary(0); Ignite ig2P = primary(1); @@ -301,6 +306,7 @@ public void testActiveAndInActiveAtTheSameTimeCluster() throws Exception { /** * @throws Exception If failed. */ + @Test public void testActivateOnAlreadyActivatedCluster() throws Exception { Ignite ig1P = primary(0); Ignite ig2P = primary(1); @@ -358,6 +364,7 @@ public void testActivateOnAlreadyActivatedCluster() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTryUseCacheInActiveCluster() throws Exception { Ignite ig1B = backUp(0); Ignite ig2B = backUp(1); @@ -400,6 +407,7 @@ private void checkExceptionTryUseCache(final Ignite ig) { /** * @throws Exception If failed. */ + @Test public void testTryUseServiceInActiveCluster() throws Exception { Ignite ig1B = backUp(0); Ignite ig2B = backUp(1); @@ -442,6 +450,7 @@ private void checkExceptionTryUseService(final Ignite ig) { /** * @throws Exception If failed. */ + @Test public void testTryUseDataStructureInActiveCluster() throws Exception { Ignite ig1B = backUp(0); Ignite ig2B = backUp(1); @@ -484,6 +493,7 @@ private void checkExceptionTryUseDataStructure(final Ignite ig){ /** * @throws Exception If failed. */ + @Test public void testFailGetLock() throws Exception { Ignite ig1P = primary(0); Ignite ig2P = primary(1); @@ -541,6 +551,7 @@ public void testFailGetLock() throws Exception { /** * @throws Exception If failed. */ + @Test public void testActivateAfterFailGetLock() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-1094"); @@ -617,6 +628,7 @@ public void testActivateAfterFailGetLock() throws Exception { /** * @throws Exception if fail. */ + @Test public void testDeActivateFromServerNode() throws Exception { Ignite ig1 = primary(0); Ignite ig2 = primary(1); @@ -636,6 +648,7 @@ public void testDeActivateFromServerNode() throws Exception { /** * @throws Exception if fail. */ + @Test public void testDeActivateFromClientNode() throws Exception { Ignite ig1 = primary(0); Ignite ig2 = primary(1); @@ -663,6 +676,7 @@ public void testDeActivateFromClientNode() throws Exception { /** * @throws Exception if fail. */ + @Test public void testDeActivateCheckCacheDestroy() throws Exception { String chName = "myCache"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteNoParrallelClusterIsAllowedTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteNoParrallelClusterIsAllowedTest.java index 7180d7bf16d10..286b009868e0a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteNoParrallelClusterIsAllowedTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteNoParrallelClusterIsAllowedTest.java @@ -32,6 +32,7 @@ public class IgniteNoParrallelClusterIsAllowedTest extends IgniteChangeGlobalSta /** * @throws Exception if failed. */ + @Test public void testSimple() throws Exception { startPrimaryNodes(primaryNodes()); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteStandByClusterTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteStandByClusterTest.java index 6900af87d2f39..625cff049b493 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteStandByClusterTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteStandByClusterTest.java @@ -81,6 +81,7 @@ public class IgniteStandByClusterTest extends GridCommonAbstractTest { /** * @throws Exception if fail. */ + @Test public void testStartDynamicCachesAfterActivation() throws Exception { final String cacheName0 = "cache0"; final String cacheName = "cache"; @@ -146,6 +147,7 @@ public void testStartDynamicCachesAfterActivation() throws Exception { /** * @throws Exception if fail. */ + @Test public void testStaticCacheStartAfterActivationWithCacheFilter() throws Exception { String cache1 = "cache1"; String cache2 = "cache2"; @@ -213,6 +215,7 @@ public void testStaticCacheStartAfterActivationWithCacheFilter() throws Exceptio /** * @throws Exception if fail. */ + @Test public void testSimple() throws Exception { IgniteEx ig = startGrid(0); @@ -238,6 +241,7 @@ public void testSimple() throws Exception { /** * @throws Exception if fail. */ + @Test public void testJoinDaemonAndDaemonStop() throws Exception { IgniteEx ig = startGrid(0); @@ -258,6 +262,7 @@ public void testJoinDaemonAndDaemonStop() throws Exception { /** * Check that daemon node does not move cluster to compatibility mode. */ + @Test public void testJoinDaemonToBaseline() throws Exception { Ignite ignite0 = startGrid(0); @@ -279,6 +284,7 @@ public void testJoinDaemonToBaseline() throws Exception { /** * @throws Exception if fail. */ + @Test public void testCheckStatusFromDaemon() throws Exception { IgniteEx ig = startGrid(0); @@ -309,6 +315,7 @@ public void testCheckStatusFromDaemon() throws Exception { /** * @throws Exception if fail. */ + @Test public void testRestartCluster() throws Exception { IgniteEx ig1 = startGrid(getConfiguration("node1")); IgniteEx ig2 = startGrid(getConfiguration("node2")); @@ -344,6 +351,7 @@ public void testRestartCluster() throws Exception { /** * @throws Exception if fail. */ + @Test public void testActivateDeActivateCallbackForPluginProviders() throws Exception { IgniteEx ig1 = startGrid(getConfiguration("node1")); IgniteEx ig2 = startGrid(getConfiguration("node2")); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/JoinActiveNodeToActiveCluster.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/JoinActiveNodeToActiveCluster.java index 8e90e78337500..781de1dfc4bbd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/JoinActiveNodeToActiveCluster.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/JoinActiveNodeToActiveCluster.java @@ -193,58 +193,68 @@ public class JoinActiveNodeToActiveCluster extends AbstractNodeJoinTemplate { // Server node join. /** {@inheritDoc} */ - @Override public void testJoinWithOutConfiguration() throws Exception { + @Override @Test + public void testJoinWithOutConfiguration() throws Exception { withOutConfigurationTemplate().execute(); } /** {@inheritDoc} */ - @Override public void testStaticCacheConfigurationOnJoin() throws Exception { + @Override @Test + public void testStaticCacheConfigurationOnJoin() throws Exception { staticCacheConfigurationOnJoinTemplate().execute(); } /** {@inheritDoc} */ - @Override public void testStaticCacheConfigurationInCluster() throws Exception { + @Override @Test + public void testStaticCacheConfigurationInCluster() throws Exception { staticCacheConfigurationInClusterTemplate().execute(); } /** {@inheritDoc} */ - @Override public void testStaticCacheConfigurationSameOnBoth() throws Exception { + @Override @Test + public void testStaticCacheConfigurationSameOnBoth() throws Exception { staticCacheConfigurationSameOnBothTemplate().execute(); } /** {@inheritDoc} */ - @Override public void testStaticCacheConfigurationDifferentOnBoth() throws Exception { + @Override @Test + public void testStaticCacheConfigurationDifferentOnBoth() throws Exception { staticCacheConfigurationDifferentOnBothTemplate().execute(); } // Client node join. /** {@inheritDoc} */ - @Override public void testJoinClientWithOutConfiguration() throws Exception { + @Override @Test + public void testJoinClientWithOutConfiguration() throws Exception { joinClientWithOutConfigurationTemplate().execute(); } /** {@inheritDoc} */ - @Override public void testJoinClientStaticCacheConfigurationOnJoin() throws Exception { + @Override @Test + public void testJoinClientStaticCacheConfigurationOnJoin() throws Exception { joinClientStaticCacheConfigurationOnJoinTemplate().execute(); } /** {@inheritDoc} */ - @Override public void testJoinClientStaticCacheConfigurationInCluster() throws Exception { + @Override @Test + public void testJoinClientStaticCacheConfigurationInCluster() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-5518"); joinClientStaticCacheConfigurationInClusterTemplate().execute(); } /** {@inheritDoc} */ - @Override public void testJoinClientStaticCacheConfigurationSameOnBoth() throws Exception { + @Override @Test + public void testJoinClientStaticCacheConfigurationSameOnBoth() throws Exception { joinClientStaticCacheConfigurationSameOnBothTemplate().execute(); } /** * */ - @Override public void testJoinClientStaticCacheConfigurationDifferentOnBoth() throws Exception { + @Override @Test + public void testJoinClientStaticCacheConfigurationDifferentOnBoth() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-5518"); joinClientStaticCacheConfigurationDifferentOnBothTemplate().execute(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/JoinActiveNodeToInActiveCluster.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/JoinActiveNodeToInActiveCluster.java index 59e0691ea4e6a..828e072039730 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/JoinActiveNodeToInActiveCluster.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/JoinActiveNodeToInActiveCluster.java @@ -153,56 +153,66 @@ public class JoinActiveNodeToInActiveCluster extends AbstractNodeJoinTemplate { // Server node join. /** {@inheritDoc} */ - @Override public void testJoinWithOutConfiguration() throws Exception { + @Override @Test + public void testJoinWithOutConfiguration() throws Exception { withOutConfigurationTemplate().execute(); } /** {@inheritDoc} */ - @Override public void testStaticCacheConfigurationOnJoin() throws Exception { + @Override @Test + public void testStaticCacheConfigurationOnJoin() throws Exception { staticCacheConfigurationOnJoinTemplate().execute(); } /** {@inheritDoc} */ - @Override public void testStaticCacheConfigurationInCluster() throws Exception { + @Override @Test + public void testStaticCacheConfigurationInCluster() throws Exception { staticCacheConfigurationInClusterTemplate().execute(); } /** {@inheritDoc} */ - @Override public void testStaticCacheConfigurationSameOnBoth() throws Exception { + @Override @Test + public void testStaticCacheConfigurationSameOnBoth() throws Exception { staticCacheConfigurationSameOnBothTemplate().execute(); } /** {@inheritDoc} */ - @Override public void testStaticCacheConfigurationDifferentOnBoth() throws Exception { + @Override @Test + public void testStaticCacheConfigurationDifferentOnBoth() throws Exception { staticCacheConfigurationDifferentOnBothTemplate().execute(); } // Client node join. /** {@inheritDoc} */ - @Override public void testJoinClientWithOutConfiguration() throws Exception { + @Override @Test + public void testJoinClientWithOutConfiguration() throws Exception { joinClientWithOutConfigurationTemplate().execute(); } /** {@inheritDoc} */ - @Override public void testJoinClientStaticCacheConfigurationOnJoin() throws Exception { + @Override @Test + public void testJoinClientStaticCacheConfigurationOnJoin() throws Exception { joinClientStaticCacheConfigurationOnJoinTemplate().execute(); } /** {@inheritDoc} */ - @Override public void testJoinClientStaticCacheConfigurationInCluster() throws Exception { + @Override @Test + public void testJoinClientStaticCacheConfigurationInCluster() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-5518"); joinClientStaticCacheConfigurationInClusterTemplate().execute(); } /** {@inheritDoc} */ - @Override public void testJoinClientStaticCacheConfigurationSameOnBoth() throws Exception { + @Override @Test + public void testJoinClientStaticCacheConfigurationSameOnBoth() throws Exception { joinClientStaticCacheConfigurationSameOnBothTemplate().execute(); } /** {@inheritDoc} */ - @Override public void testJoinClientStaticCacheConfigurationDifferentOnBoth() throws Exception { + @Override @Test + public void testJoinClientStaticCacheConfigurationDifferentOnBoth() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-5518"); joinClientStaticCacheConfigurationDifferentOnBothTemplate().execute(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/JoinInActiveNodeToActiveCluster.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/JoinInActiveNodeToActiveCluster.java index d9b0dd4a48327..fa741aba81017 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/JoinInActiveNodeToActiveCluster.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/JoinInActiveNodeToActiveCluster.java @@ -192,54 +192,64 @@ public class JoinInActiveNodeToActiveCluster extends AbstractNodeJoinTemplate { // Server node join. /** {@inheritDoc} */ - @Override public void testJoinWithOutConfiguration() throws Exception { + @Override @Test + public void testJoinWithOutConfiguration() throws Exception { withOutConfigurationTemplate().execute(); } /** {@inheritDoc} */ - @Override public void testStaticCacheConfigurationOnJoin() throws Exception { + @Override @Test + public void testStaticCacheConfigurationOnJoin() throws Exception { staticCacheConfigurationOnJoinTemplate().execute(); } /** {@inheritDoc} */ - @Override public void testStaticCacheConfigurationInCluster() throws Exception { + @Override @Test + public void testStaticCacheConfigurationInCluster() throws Exception { staticCacheConfigurationInClusterTemplate().execute(); } /** {@inheritDoc} */ - @Override public void testStaticCacheConfigurationSameOnBoth() throws Exception { + @Override @Test + public void testStaticCacheConfigurationSameOnBoth() throws Exception { staticCacheConfigurationSameOnBothTemplate().execute(); } /** {@inheritDoc} */ - @Override public void testStaticCacheConfigurationDifferentOnBoth() throws Exception { + @Override @Test + public void testStaticCacheConfigurationDifferentOnBoth() throws Exception { staticCacheConfigurationDifferentOnBothTemplate().execute(); } // Client node join. /** {@inheritDoc} */ - @Override public void testJoinClientWithOutConfiguration() throws Exception { + @Override @Test + public void testJoinClientWithOutConfiguration() throws Exception { joinClientWithOutConfigurationTemplate().execute(); } /** {@inheritDoc} */ - @Override public void testJoinClientStaticCacheConfigurationOnJoin() throws Exception { + @Override @Test + public void testJoinClientStaticCacheConfigurationOnJoin() throws Exception { joinClientStaticCacheConfigurationOnJoinTemplate().execute(); } /** {@inheritDoc} */ - @Override public void testJoinClientStaticCacheConfigurationInCluster() throws Exception { + @Override @Test + public void testJoinClientStaticCacheConfigurationInCluster() throws Exception { joinClientStaticCacheConfigurationInClusterTemplate().execute(); } /** {@inheritDoc} */ - @Override public void testJoinClientStaticCacheConfigurationSameOnBoth() throws Exception { + @Override @Test + public void testJoinClientStaticCacheConfigurationSameOnBoth() throws Exception { joinClientStaticCacheConfigurationSameOnBothTemplate().execute(); } /** {@inheritDoc} */ - @Override public void testJoinClientStaticCacheConfigurationDifferentOnBoth() throws Exception { + @Override @Test + public void testJoinClientStaticCacheConfigurationDifferentOnBoth() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-5518"); joinClientStaticCacheConfigurationDifferentOnBothTemplate().execute(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/JoinInActiveNodeToInActiveCluster.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/JoinInActiveNodeToInActiveCluster.java index dabd0a38f3dc0..a6e79bef7fc46 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/JoinInActiveNodeToInActiveCluster.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/JoinInActiveNodeToInActiveCluster.java @@ -153,56 +153,66 @@ public class JoinInActiveNodeToInActiveCluster extends AbstractNodeJoinTemplate // Server node join. /** {@inheritDoc} */ - @Override public void testJoinWithOutConfiguration() throws Exception { + @Override @Test + public void testJoinWithOutConfiguration() throws Exception { withOutConfigurationTemplate().execute(); } /** {@inheritDoc} */ - @Override public void testStaticCacheConfigurationOnJoin() throws Exception { + @Override @Test + public void testStaticCacheConfigurationOnJoin() throws Exception { staticCacheConfigurationOnJoinTemplate().execute(); } /** {@inheritDoc} */ - @Override public void testStaticCacheConfigurationInCluster() throws Exception { + @Override @Test + public void testStaticCacheConfigurationInCluster() throws Exception { staticCacheConfigurationInClusterTemplate().execute(); } /** {@inheritDoc} */ - @Override public void testStaticCacheConfigurationSameOnBoth() throws Exception { + @Override @Test + public void testStaticCacheConfigurationSameOnBoth() throws Exception { staticCacheConfigurationSameOnBothTemplate().execute(); } /** {@inheritDoc} */ - @Override public void testStaticCacheConfigurationDifferentOnBoth() throws Exception { + @Override @Test + public void testStaticCacheConfigurationDifferentOnBoth() throws Exception { staticCacheConfigurationDifferentOnBothTemplate().execute(); } // Client node join. /** {@inheritDoc} */ - @Override public void testJoinClientWithOutConfiguration() throws Exception { + @Override @Test + public void testJoinClientWithOutConfiguration() throws Exception { joinClientWithOutConfigurationTemplate().execute(); } /** {@inheritDoc} */ - @Override public void testJoinClientStaticCacheConfigurationOnJoin() throws Exception { + @Override @Test + public void testJoinClientStaticCacheConfigurationOnJoin() throws Exception { joinClientStaticCacheConfigurationOnJoinTemplate().execute(); } /** {@inheritDoc} */ - @Override public void testJoinClientStaticCacheConfigurationInCluster() throws Exception { + @Override @Test + public void testJoinClientStaticCacheConfigurationInCluster() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-5518"); joinClientStaticCacheConfigurationInClusterTemplate().execute(); } /** {@inheritDoc} */ - @Override public void testJoinClientStaticCacheConfigurationSameOnBoth() throws Exception { + @Override @Test + public void testJoinClientStaticCacheConfigurationSameOnBoth() throws Exception { joinClientStaticCacheConfigurationSameOnBothTemplate().execute(); } /** {@inheritDoc} */ - @Override public void testJoinClientStaticCacheConfigurationDifferentOnBoth() throws Exception { + @Override @Test + public void testJoinClientStaticCacheConfigurationDifferentOnBoth() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-5518"); joinClientStaticCacheConfigurationDifferentOnBothTemplate().execute(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/persistence/JoinActiveNodeToActiveClusterWithPersistence.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/persistence/JoinActiveNodeToActiveClusterWithPersistence.java index 1ccfb7d3d7008..b41e6e6094e53 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/persistence/JoinActiveNodeToActiveClusterWithPersistence.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/persistence/JoinActiveNodeToActiveClusterWithPersistence.java @@ -67,22 +67,26 @@ private AbstractNodeJoinTemplate.JoinNodeTestPlanBuilder persistent(AbstractNode } /** {@inheritDoc} */ - @Override public void testJoinWithOutConfiguration() throws Exception { + @Override @Test + public void testJoinWithOutConfiguration() throws Exception { withOutConfigurationTemplate().execute(); } /** {@inheritDoc} */ - @Override public void testJoinClientWithOutConfiguration() throws Exception { + @Override @Test + public void testJoinClientWithOutConfiguration() throws Exception { joinClientWithOutConfigurationTemplate().execute(); } /** {@inheritDoc} */ - @Override public void testJoinClientStaticCacheConfigurationDifferentOnBoth() throws Exception { + @Override @Test + public void testJoinClientStaticCacheConfigurationDifferentOnBoth() throws Exception { staticCacheConfigurationDifferentOnBothTemplate().execute(); } /** {@inheritDoc} */ - @Override public void testJoinClientStaticCacheConfigurationInCluster() throws Exception { + @Override @Test + public void testJoinClientStaticCacheConfigurationInCluster() throws Exception { staticCacheConfigurationInClusterTemplate().execute(); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/reconnect/IgniteStandByClientReconnectTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/reconnect/IgniteStandByClientReconnectTest.java index d2244d450ebd8..720f6074a8392 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/reconnect/IgniteStandByClientReconnectTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/reconnect/IgniteStandByClientReconnectTest.java @@ -27,6 +27,7 @@ public class IgniteStandByClientReconnectTest extends IgniteAbstractStandByClien /** * @throws Exception If failed. */ + @Test public void testActiveClientReconnectToActiveCluster() throws Exception { CountDownLatch activateLatch = new CountDownLatch(1); @@ -108,6 +109,7 @@ public void testActiveClientReconnectToActiveCluster() throws Exception { /** * @throws Exception If failed. */ + @Test public void testActiveClientReconnectToInActiveCluster() throws Exception { CountDownLatch activateLatch = new CountDownLatch(1); @@ -188,6 +190,7 @@ public void testActiveClientReconnectToInActiveCluster() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInActiveClientReconnectToActiveCluster() throws Exception { CountDownLatch activateLatch = new CountDownLatch(1); @@ -245,6 +248,7 @@ public void testInActiveClientReconnectToActiveCluster() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInActiveClientReconnectToInActiveCluster() throws Exception { startNodes(null); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/reconnect/IgniteStandByClientReconnectToNewClusterTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/reconnect/IgniteStandByClientReconnectToNewClusterTest.java index c1f672b29af5d..710756197911b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/reconnect/IgniteStandByClientReconnectToNewClusterTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/reconnect/IgniteStandByClientReconnectToNewClusterTest.java @@ -30,6 +30,7 @@ public class IgniteStandByClientReconnectToNewClusterTest extends IgniteAbstract /** * @throws Exception If failed. */ + @Test public void testActiveClientReconnectsToActiveCluster() throws Exception { CountDownLatch activateLatch = new CountDownLatch(1); @@ -109,6 +110,7 @@ public void testActiveClientReconnectsToActiveCluster() throws Exception { /** * @throws Exception If failed. */ + @Test public void testActiveClientReconnectsToInactiveCluster() throws Exception { startNodes(null); @@ -189,6 +191,7 @@ public void testActiveClientReconnectsToInactiveCluster() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInactiveClientReconnectsToActiveCluster() throws Exception { CountDownLatch activateLatch = new CountDownLatch(1); @@ -250,6 +253,7 @@ public void testInactiveClientReconnectsToActiveCluster() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInactiveClientReconnectsToInactiveCluster() throws Exception { startNodes(null); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/tree/io/TrackingPageIOTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/tree/io/TrackingPageIOTest.java index cacea48c5289c..82e1866b88741 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/tree/io/TrackingPageIOTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/tree/io/TrackingPageIOTest.java @@ -46,6 +46,7 @@ public class TrackingPageIOTest extends TestCase { /** * */ + @Test public void testBasics() throws Exception { ByteBuffer buf = createBuffer(); @@ -72,6 +73,7 @@ public void testBasics() throws Exception { /** * */ + @Test public void testMarkingRandomly() throws Exception { ByteBuffer buf = createBuffer(); @@ -82,6 +84,7 @@ public void testMarkingRandomly() throws Exception { /** * */ + @Test public void testZeroingRandomly() throws Exception { ByteBuffer buf = createBuffer(); @@ -142,6 +145,7 @@ private void checkMarkingRandomly(ByteBuffer buf, int backupId, boolean testZero /** * @throws Exception If failed. */ + @Test public void testFindNextChangedPage() throws Exception { ByteBuffer buf = createBuffer(); @@ -197,6 +201,7 @@ else if (setIdx.contains(pageId)) /** * */ + @Test public void testMerging() throws Exception { ByteBuffer buf = createBuffer(); @@ -235,6 +240,7 @@ public void testMerging() throws Exception { /** * */ + @Test public void testMerging_MarksShouldBeDropForSuccessfulBackup() throws Exception { ByteBuffer buf = createBuffer(); @@ -303,6 +309,7 @@ private void generateMarking( * * @throws Exception if failed. */ + @Test public void testThatWeDontFailIfSnapshotTagWasLost() throws Exception { ByteBuffer buf = createBuffer(); @@ -356,4 +363,4 @@ public void testThatWeDontFailIfSnapshotTagWasLost() throws Exception { assertFalse(io.wasChanged(buf, id, oldTag, oldTag - 1, PAGE_SIZE)); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/SegmentedRingByteBufferTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/SegmentedRingByteBufferTest.java index 87f3fa781daef..883d19cd65750 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/SegmentedRingByteBufferTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/SegmentedRingByteBufferTest.java @@ -50,6 +50,7 @@ public class SegmentedRingByteBufferTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testAligned() throws Exception { doTestAligned(ONHEAP); } @@ -57,6 +58,7 @@ public void testAligned() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAlignedDirect() throws Exception { doTestAligned(DIRECT); } @@ -64,6 +66,7 @@ public void testAlignedDirect() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNotAligned() throws Exception { doTestNotAligned(ONHEAP); } @@ -71,6 +74,7 @@ public void testNotAligned() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNotAlignedDirect() throws Exception { doTestNotAligned(DIRECT); } @@ -78,6 +82,7 @@ public void testNotAlignedDirect() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNoOverflowMultiThreaded() throws Exception { doTestNoOverflowMultiThreaded(ONHEAP); } @@ -85,6 +90,7 @@ public void testNoOverflowMultiThreaded() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNoOverflowMultiThreadedDirect() throws Exception { doTestNoOverflowMultiThreaded(DIRECT); } @@ -92,6 +98,7 @@ public void testNoOverflowMultiThreadedDirect() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultiThreaded() throws Exception { doTestMultiThreaded(ONHEAP); } @@ -99,6 +106,7 @@ public void testMultiThreaded() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultiThreadedDirect() throws Exception { doTestMultiThreaded(DIRECT); } @@ -106,6 +114,7 @@ public void testMultiThreadedDirect() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultiThreaded2() throws Exception { doTestMultiThreaded2(ONHEAP); } @@ -113,6 +122,7 @@ public void testMultiThreaded2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultiThreadedDirect2() throws Exception { doTestMultiThreaded2(DIRECT); } @@ -782,4 +792,4 @@ public int size() { return res; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentAwareTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentAwareTest.java index d651e01595f56..dbae64e891e21 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentAwareTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentAwareTest.java @@ -38,6 +38,7 @@ public class SegmentAwareTest extends TestCase { * * @throws IgniteCheckedException if failed. */ + @Test public void testAvoidDeadlockArchiverAndLockStorage() throws IgniteCheckedException { SegmentAware aware = new SegmentAware(10, false); @@ -74,6 +75,7 @@ public void testAvoidDeadlockArchiverAndLockStorage() throws IgniteCheckedExcept /** * Waiting finished when work segment is set. */ + @Test public void testFinishAwaitSegment_WhenExactWaitingSegmentWasSet() throws IgniteCheckedException, InterruptedException { //given: thread which awaited segment. SegmentAware aware = new SegmentAware(10, false); @@ -90,6 +92,7 @@ public void testFinishAwaitSegment_WhenExactWaitingSegmentWasSet() throws Ignite /** * Waiting finished when work segment greater than expected is set. */ + @Test public void testFinishAwaitSegment_WhenGreaterThanWaitingSegmentWasSet() throws IgniteCheckedException, InterruptedException { //given: thread which awaited segment. SegmentAware aware = new SegmentAware(10, false); @@ -106,6 +109,7 @@ public void testFinishAwaitSegment_WhenGreaterThanWaitingSegmentWasSet() throws /** * Waiting finished when work segment is set. */ + @Test public void testFinishAwaitSegment_WhenNextSegmentEqualToWaitingOne() throws IgniteCheckedException, InterruptedException { //given: thread which awaited segment. SegmentAware aware = new SegmentAware(10, false); @@ -128,6 +132,7 @@ public void testFinishAwaitSegment_WhenNextSegmentEqualToWaitingOne() throws Ign /** * Waiting finished when interrupt was triggered. */ + @Test public void testFinishAwaitSegment_WhenInterruptWasCall() throws IgniteCheckedException, InterruptedException { //given: thread which awaited segment. SegmentAware aware = new SegmentAware(10, false); @@ -144,6 +149,7 @@ public void testFinishAwaitSegment_WhenInterruptWasCall() throws IgniteCheckedEx /** * Waiting finished when next work segment triggered. */ + @Test public void testFinishWaitSegmentForArchive_WhenWorkSegmentIncremented() throws IgniteCheckedException, InterruptedException { //given: thread which awaited segment. SegmentAware aware = new SegmentAware(10, false); @@ -163,6 +169,7 @@ public void testFinishWaitSegmentForArchive_WhenWorkSegmentIncremented() throws /** * Waiting finished when work segment is set. */ + @Test public void testFinishWaitSegmentForArchive_WhenWorkSegmentGreaterValue() throws IgniteCheckedException, InterruptedException { //given: thread which awaited segment. SegmentAware aware = new SegmentAware(10, false); @@ -182,6 +189,7 @@ public void testFinishWaitSegmentForArchive_WhenWorkSegmentGreaterValue() throws /** * Waiting finished when interrupt was triggered. */ + @Test public void testFinishWaitSegmentForArchive_WhenInterruptWasCall() throws IgniteCheckedException, InterruptedException { //given: thread which awaited segment. SegmentAware aware = new SegmentAware(10, false); @@ -201,6 +209,7 @@ public void testFinishWaitSegmentForArchive_WhenInterruptWasCall() throws Ignite /** * Should correct calculate next segment. */ + @Test public void testCorrectCalculateNextSegmentIndex() throws IgniteCheckedException, InterruptedException { //given: thread which awaited segment. SegmentAware aware = new SegmentAware(10, false); @@ -217,6 +226,7 @@ public void testCorrectCalculateNextSegmentIndex() throws IgniteCheckedException /** * Waiting finished when segment archived. */ + @Test public void testFinishWaitNextAbsoluteIndex_WhenMarkAsArchivedFirstSegment() throws IgniteCheckedException, InterruptedException { //given: thread which awaited segment. SegmentAware aware = new SegmentAware(2, false); @@ -236,6 +246,7 @@ public void testFinishWaitNextAbsoluteIndex_WhenMarkAsArchivedFirstSegment() thr /** * Waiting finished when segment archived. */ + @Test public void testFinishWaitNextAbsoluteIndex_WhenSetToArchivedFirst() throws IgniteCheckedException, InterruptedException { //given: thread which awaited segment. SegmentAware aware = new SegmentAware(2, false); @@ -255,6 +266,7 @@ public void testFinishWaitNextAbsoluteIndex_WhenSetToArchivedFirst() throws Igni /** * Waiting finished when force interrupt was triggered. */ + @Test public void testFinishWaitNextAbsoluteIndex_WhenOnlyForceInterruptWasCall() throws IgniteCheckedException, InterruptedException { //given: thread which awaited segment. SegmentAware aware = new SegmentAware(2, false); @@ -280,6 +292,7 @@ public void testFinishWaitNextAbsoluteIndex_WhenOnlyForceInterruptWasCall() thro /** * Waiting finished when segment archived. */ + @Test public void testFinishSegmentArchived_WhenSetExactWaitingSegment() throws IgniteCheckedException, InterruptedException { //given: thread which awaited segment. SegmentAware aware = new SegmentAware(10, false); @@ -296,6 +309,7 @@ public void testFinishSegmentArchived_WhenSetExactWaitingSegment() throws Ignite /** * Waiting finished when segment archived. */ + @Test public void testFinishSegmentArchived_WhenMarkExactWaitingSegment() throws IgniteCheckedException, InterruptedException { //given: thread which awaited segment. SegmentAware aware = new SegmentAware(10, false); @@ -312,6 +326,7 @@ public void testFinishSegmentArchived_WhenMarkExactWaitingSegment() throws Ignit /** * Waiting finished when segment archived. */ + @Test public void testFinishSegmentArchived_WhenSetGreaterThanWaitingSegment() throws IgniteCheckedException, InterruptedException { //given: thread which awaited segment. SegmentAware aware = new SegmentAware(10, false); @@ -328,6 +343,7 @@ public void testFinishSegmentArchived_WhenSetGreaterThanWaitingSegment() throws /** * Waiting finished when segment archived. */ + @Test public void testFinishSegmentArchived_WhenMarkGreaterThanWaitingSegment() throws IgniteCheckedException, InterruptedException { //given: thread which awaited segment. SegmentAware aware = new SegmentAware(10, false); @@ -344,6 +360,7 @@ public void testFinishSegmentArchived_WhenMarkGreaterThanWaitingSegment() throws /** * Waiting finished when interrupt was triggered. */ + @Test public void testFinishSegmentArchived_WhenInterruptWasCall() throws IgniteCheckedException, InterruptedException { //given: thread which awaited segment. SegmentAware aware = new SegmentAware(10, false); @@ -363,6 +380,7 @@ public void testFinishSegmentArchived_WhenInterruptWasCall() throws IgniteChecke /** * Waiting finished when release work segment. */ + @Test public void testMarkAsMovedToArchive_WhenReleaseLockedSegment() throws IgniteCheckedException, InterruptedException { //given: thread which awaited segment. SegmentAware aware = new SegmentAware(10, false); @@ -381,6 +399,7 @@ public void testMarkAsMovedToArchive_WhenReleaseLockedSegment() throws IgniteChe /** * Waiting finished and increment archived segment when interrupt was call. */ + @Test public void testMarkAsMovedToArchive_WhenInterruptWasCall() throws IgniteCheckedException, InterruptedException { //given: thread which awaited segment. SegmentAware aware = new SegmentAware(10, false); @@ -401,6 +420,7 @@ public void testMarkAsMovedToArchive_WhenInterruptWasCall() throws IgniteChecked /** * Waiting finished when segment archived. */ + @Test public void testFinishWaitSegmentToCompress_WhenSetLastArchivedSegment() throws IgniteCheckedException, InterruptedException { //given: thread which awaited segment. SegmentAware aware = new SegmentAware(10, true); @@ -419,6 +439,7 @@ public void testFinishWaitSegmentToCompress_WhenSetLastArchivedSegment() throws /** * Waiting finished when segment archived. */ + @Test public void testFinishWaitSegmentToCompress_WhenMarkLastArchivedSegment() throws IgniteCheckedException, InterruptedException { //given: thread which awaited segment. SegmentAware aware = new SegmentAware(10, true); @@ -437,6 +458,7 @@ public void testFinishWaitSegmentToCompress_WhenMarkLastArchivedSegment() throws /** * Next segment for compress based on truncated archive idx. */ + @Test public void testCorrectCalculateNextCompressSegment() throws IgniteCheckedException, InterruptedException { SegmentAware aware = new SegmentAware(10, true); @@ -449,6 +471,7 @@ public void testCorrectCalculateNextCompressSegment() throws IgniteCheckedExcept /** * Waiting finished when interrupt was call. */ + @Test public void testFinishWaitSegmentToCompress_WhenInterruptWasCall() throws IgniteCheckedException, InterruptedException { //given: thread which awaited segment. SegmentAware aware = new SegmentAware(10, true); @@ -466,6 +489,7 @@ public void testFinishWaitSegmentToCompress_WhenInterruptWasCall() throws Ignite /** * Tests that {@link SegmentAware#onSegmentCompressed} returns segments in proper order. */ + @Test public void testLastCompressedIdxProperOrdering() throws IgniteInterruptedCheckedException { SegmentAware aware = new SegmentAware(10, true); @@ -489,6 +513,7 @@ public void testLastCompressedIdxProperOrdering() throws IgniteInterruptedChecke /** * Segment reserve correctly. */ + @Test public void testReserveCorrectly() { //given: thread which awaited segment. SegmentAware aware = new SegmentAware(10, false); @@ -532,6 +557,7 @@ public void testReserveCorrectly() { /** * Should fail when release unreserved segment. */ + @Test public void testAssertFail_WhenReleaseUnreservedSegment() { //given: thread which awaited segment. SegmentAware aware = new SegmentAware(10, false); @@ -551,6 +577,7 @@ public void testAssertFail_WhenReleaseUnreservedSegment() { /** * Segment locked correctly. */ + @Test public void testReserveWorkSegmentCorrectly() { //given: thread which awaited segment. SegmentAware aware = new SegmentAware(10, false); @@ -584,6 +611,7 @@ public void testReserveWorkSegmentCorrectly() { /** * Should fail when release unlocked segment. */ + @Test public void testAssertFail_WhenReleaseUnreservedWorkSegment() { //given: thread which awaited segment. SegmentAware aware = new SegmentAware(10, false); @@ -654,4 +682,4 @@ interface Waiter { */ void await() throws IgniteInterruptedCheckedException; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/reader/StandaloneWalRecordsIteratorTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/reader/StandaloneWalRecordsIteratorTest.java index b77b72aa905f9..ce8a112c3e9dc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/reader/StandaloneWalRecordsIteratorTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/reader/StandaloneWalRecordsIteratorTest.java @@ -131,6 +131,7 @@ private String createWalFiles() throws Exception { * * @throws Exception if test failed. */ + @Test public void testCorrectClosingFileDescriptors() throws Exception { // Iterate by all archived WAL segments. @@ -147,6 +148,7 @@ public void testCorrectClosingFileDescriptors() throws Exception { * * @throws Exception if test failed. */ + @Test public void testStrictBounds() throws Exception { String dir = createWalFiles(); @@ -315,4 +317,4 @@ public CountedFileIO(File file, OpenOption... modes) throws IOException { */ public static int getCountClosedWalFiles() { return WAL_CLOSE_COUNTER.get(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/CacheScanQueryFailoverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/CacheScanQueryFailoverTest.java index 0633138f0c245..61708c11a5d7e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/CacheScanQueryFailoverTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/CacheScanQueryFailoverTest.java @@ -85,6 +85,7 @@ public class CacheScanQueryFailoverTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testScanQueryWithFailedClosures() throws Exception { Ignite srv = startGrids(4); Ignite client = startGrid("client"); @@ -103,6 +104,7 @@ public void testScanQueryWithFailedClosures() throws Exception { /** * @throws Exception If failed. */ + @Test public void testScanQueryOverLocalCacheWithFailedClosures() throws Exception { Ignite srv = startGrids(4); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryTransformerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryTransformerSelfTest.java index 53acd22acecf1..938084d7b4cef 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryTransformerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryTransformerSelfTest.java @@ -80,6 +80,7 @@ public class GridCacheQueryTransformerSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testGetKeys() throws Exception { IgniteCache cache = grid().createCache("test-cache"); @@ -111,6 +112,7 @@ public void testGetKeys() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetKeysFiltered() throws Exception { IgniteCache cache = grid().createCache("test-cache"); @@ -148,6 +150,7 @@ public void testGetKeysFiltered() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetObjectField() throws Exception { IgniteCache cache = grid().createCache("test-cache"); @@ -179,6 +182,7 @@ public void testGetObjectField() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetObjectFieldPartitioned() throws Exception { IgniteCache cache = grid().createCache("test-cache"); @@ -219,6 +223,7 @@ public void testGetObjectFieldPartitioned() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetObjectFieldFiltered() throws Exception { IgniteCache cache = grid().createCache("test-cache"); @@ -256,6 +261,7 @@ public void testGetObjectFieldFiltered() throws Exception { /** * @throws Exception If failed. */ + @Test public void testKeepBinary() throws Exception { IgniteCache cache = grid().createCache("test-cache"); @@ -289,6 +295,7 @@ public void testKeepBinary() throws Exception { /** * @throws Exception If failed. */ + @Test public void testKeepBinaryFiltered() throws Exception { IgniteCache cache = grid().createCache("test-cache"); @@ -328,6 +335,7 @@ public void testKeepBinaryFiltered() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLocal() throws Exception { IgniteCache cache = grid().createCache("test-cache"); @@ -369,6 +377,7 @@ public void testLocal() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLocalFiltered() throws Exception { IgniteCache cache = grid().createCache("test-cache"); @@ -416,6 +425,7 @@ public void testLocalFiltered() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLocalKeepBinary() throws Exception { IgniteCache cache = grid().createCache("test-cache"); @@ -457,6 +467,7 @@ public void testLocalKeepBinary() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLocalKeepBinaryFiltered() throws Exception { IgniteCache cache = grid().createCache("test-cache"); @@ -504,6 +515,7 @@ public void testLocalKeepBinaryFiltered() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUnsupported() throws Exception { final IgniteCache cache = grid().createCache("test-cache"); @@ -592,6 +604,7 @@ public void testUnsupported() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPageSize() throws Exception { IgniteCache cache = grid().createCache("test-cache"); @@ -629,6 +642,7 @@ public void testPageSize() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLocalInjection() throws Exception { IgniteCache cache = grid().createCache("test-cache"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCircularQueueTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCircularQueueTest.java index a07bd64d80581..17188ef5cd1dc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCircularQueueTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCircularQueueTest.java @@ -27,6 +27,7 @@ public class GridCircularQueueTest extends GridCommonAbstractTest { /** * */ + @Test public void testQueue() { GridCacheQueryManager.CircularQueue q = new GridCacheQueryManager.CircularQueue<>(4); @@ -115,4 +116,4 @@ private void check(GridCacheQueryManager.CircularQueue q, ArrayDeque d) { for (Object o : d) assertEquals(q.get(i++), o); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/IgniteCacheQueryCacheDestroySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/IgniteCacheQueryCacheDestroySelfTest.java index d0d392b50b604..0e790e71744a0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/IgniteCacheQueryCacheDestroySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/IgniteCacheQueryCacheDestroySelfTest.java @@ -55,6 +55,7 @@ public class IgniteCacheQueryCacheDestroySelfTest extends GridCommonAbstractTest /** * The main test code. */ + @Test public void testQueue() throws Throwable { startGridsMultiThreaded(GRID_CNT); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/IndexingSpiQuerySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/IndexingSpiQuerySelfTest.java index bd7661674a716..5f8491f11cfef 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/IndexingSpiQuerySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/IndexingSpiQuerySelfTest.java @@ -89,6 +89,7 @@ protected CacheConfiguration cacheConfiguration(String cacheName) { /** * @throws Exception If failed. */ + @Test public void testSimpleIndexingSpi() throws Exception { indexingSpi = new MyIndexingSpi(); @@ -110,6 +111,7 @@ public void testSimpleIndexingSpi() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIndexingSpiWithDisabledQueryProcessor() throws Exception { indexingSpi = new MyIndexingSpi(); @@ -131,6 +133,7 @@ public void testIndexingSpiWithDisabledQueryProcessor() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBinaryIndexingSpi() throws Exception { indexingSpi = new MyBinaryIndexingSpi(); @@ -159,6 +162,7 @@ public void testBinaryIndexingSpi() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNonBinaryIndexingSpi() throws Exception { System.setProperty(IgniteSystemProperties.IGNITE_UNWRAP_BINARY_FOR_INDEXING_SPI, "true"); @@ -193,6 +197,7 @@ public void testNonBinaryIndexingSpi() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIndexingSpiFailure() throws Exception { indexingSpi = new MyBrokenIndexingSpi(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/IndexingSpiQueryTxSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/IndexingSpiQueryTxSelfTest.java index d3f6896b9f8b5..e93655bdbd57d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/IndexingSpiQueryTxSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/IndexingSpiQueryTxSelfTest.java @@ -71,6 +71,7 @@ public class IndexingSpiQueryTxSelfTest extends GridCacheAbstractSelfTest { } /** */ + @Test public void testIndexingSpiWithTxClient() throws Exception { IgniteEx client = startGrid("client"); @@ -80,6 +81,7 @@ public void testIndexingSpiWithTxClient() throws Exception { } /** */ + @Test public void testIndexingSpiWithTxLocal() throws Exception { IgniteEx ignite = (IgniteEx)primaryNode(0, DEFAULT_CACHE_NAME); @@ -87,6 +89,7 @@ public void testIndexingSpiWithTxLocal() throws Exception { } /** */ + @Test public void testIndexingSpiWithTxNotLocal() throws Exception { IgniteEx ignite = (IgniteEx)primaryNode(0, DEFAULT_CACHE_NAME); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/ScanQueryOffheapExpiryPolicySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/ScanQueryOffheapExpiryPolicySelfTest.java index a3b1d4169dbea..c106e42b6c1cf 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/ScanQueryOffheapExpiryPolicySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/ScanQueryOffheapExpiryPolicySelfTest.java @@ -74,6 +74,7 @@ public class ScanQueryOffheapExpiryPolicySelfTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testEntriesMovedFromOnHeap() throws Exception { Ignite ignite0 = grid(0); Ignite ignite1 = grid(1); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousBatchAckTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousBatchAckTest.java index 400ae283155da..919ca7fe9e7e8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousBatchAckTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousBatchAckTest.java @@ -118,6 +118,7 @@ else if (igniteInstanceName.endsWith(SERVER2)) /** * @throws Exception If failed. */ + @Test public void testPartition() throws Exception { checkBackupAcknowledgeMessage(cacheConfiguration(PARTITIONED, 1, ATOMIC, false)); } @@ -125,6 +126,7 @@ public void testPartition() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPartitionWithFilter() throws Exception { filterOn.set(true); @@ -134,6 +136,7 @@ public void testPartitionWithFilter() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPartitionNoBackups() throws Exception { checkBackupAcknowledgeMessage(cacheConfiguration(PARTITIONED, 0, ATOMIC, false)); } @@ -141,6 +144,7 @@ public void testPartitionNoBackups() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPartitionTx() throws Exception { checkBackupAcknowledgeMessage(cacheConfiguration(PARTITIONED, 1, TRANSACTIONAL, false)); } @@ -148,6 +152,7 @@ public void testPartitionTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPartitionTxWithFilter() throws Exception { filterOn.set(true); @@ -157,6 +162,7 @@ public void testPartitionTxWithFilter() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPartitionTxNoBackup() throws Exception { checkBackupAcknowledgeMessage(cacheConfiguration(PARTITIONED, 0, TRANSACTIONAL, false)); } @@ -164,6 +170,7 @@ public void testPartitionTxNoBackup() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPartitionTxNoBackupWithFilter() throws Exception { filterOn.set(true); @@ -173,6 +180,7 @@ public void testPartitionTxNoBackupWithFilter() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReplicated() throws Exception { checkBackupAcknowledgeMessage(cacheConfiguration(REPLICATED, 1, ATOMIC, false)); } @@ -180,6 +188,7 @@ public void testReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReplicatedTx() throws Exception { checkBackupAcknowledgeMessage(cacheConfiguration(REPLICATED, 1, TRANSACTIONAL, false)); } @@ -187,6 +196,7 @@ public void testReplicatedTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReplicatedTxWithFilter() throws Exception { filterOn.set(true); @@ -198,6 +208,7 @@ public void testReplicatedTxWithFilter() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPartitionMvccTx() throws Exception { checkBackupAcknowledgeMessage(cacheConfiguration(PARTITIONED, 1, TRANSACTIONAL_SNAPSHOT, false)); } @@ -205,6 +216,7 @@ public void testPartitionMvccTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPartitionMvccTxWithFilter() throws Exception { filterOn.set(true); @@ -214,6 +226,7 @@ public void testPartitionMvccTxWithFilter() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPartitionMvccTxNoBackup() throws Exception { checkBackupAcknowledgeMessage(cacheConfiguration(PARTITIONED, 0, TRANSACTIONAL_SNAPSHOT, false)); } @@ -221,6 +234,7 @@ public void testPartitionMvccTxNoBackup() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPartitionMvccTxNoBackupWithFilter() throws Exception { filterOn.set(true); @@ -230,6 +244,7 @@ public void testPartitionMvccTxNoBackupWithFilter() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReplicatedMvccTx() throws Exception { checkBackupAcknowledgeMessage(cacheConfiguration(REPLICATED, 1, TRANSACTIONAL_SNAPSHOT, false)); } @@ -237,6 +252,7 @@ public void testReplicatedMvccTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReplicatedMvccTxWithFilter() throws Exception { filterOn.set(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFailoverMvccTxSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFailoverMvccTxSelfTest.java index 7c15f38a7e14e..896fef9685d3f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFailoverMvccTxSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFailoverMvccTxSelfTest.java @@ -42,17 +42,20 @@ public class CacheContinuousQueryAsyncFailoverMvccTxSelfTest extends CacheConti } /** {@inheritDoc} */ - @Override public void testBackupQueueEvict() throws Exception { + @Override @Test + public void testBackupQueueEvict() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-7311"); } /** {@inheritDoc} */ - @Override public void testLeftPrimaryAndBackupNodes() throws Exception { + @Override @Test + public void testLeftPrimaryAndBackupNodes() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10047"); } /** {@inheritDoc} */ - @Override public void testFailoverStartStopBackup() throws Exception { + @Override @Test + public void testFailoverStartStopBackup() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10391"); } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFilterListenerTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFilterListenerTest.java index 328b023aac0ab..b47a91328cb58 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFilterListenerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFilterListenerTest.java @@ -114,6 +114,7 @@ public class CacheContinuousQueryAsyncFilterListenerTest extends GridCommonAbstr /** * @throws Exception If failed. */ + @Test public void testNonDeadLockInListenerTx() throws Exception { testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL), true, true, false); } @@ -121,6 +122,7 @@ public void testNonDeadLockInListenerTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNonDeadLockInListenerTxJCacheApi() throws Exception { testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL), true, true, true); } @@ -128,6 +130,7 @@ public void testNonDeadLockInListenerTxJCacheApi() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNonDeadLockInListenerMvccTx() throws Exception { testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL_SNAPSHOT), true, true, false); } @@ -135,6 +138,7 @@ public void testNonDeadLockInListenerMvccTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNonDeadLockInListenerMvccTxJCacheApi() throws Exception { testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL_SNAPSHOT), true, true, true); } @@ -142,6 +146,7 @@ public void testNonDeadLockInListenerMvccTxJCacheApi() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNonDeadLockInListenerAtomic() throws Exception { testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, ATOMIC), true, true, false); } @@ -149,6 +154,7 @@ public void testNonDeadLockInListenerAtomic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNonDeadLockInListenerAtomicJCacheApi() throws Exception { testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, ATOMIC), true, true, true); } @@ -156,6 +162,7 @@ public void testNonDeadLockInListenerAtomicJCacheApi() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNonDeadLockInListenerReplicatedAtomic() throws Exception { testNonDeadLockInListener(cacheConfiguration(REPLICATED, 2, ATOMIC), true, true, false); } @@ -163,6 +170,7 @@ public void testNonDeadLockInListenerReplicatedAtomic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNonDeadLockInListenerReplicatedAtomicJCacheApi() throws Exception { testNonDeadLockInListener(cacheConfiguration(REPLICATED, 2, ATOMIC), true, true, true); } @@ -170,6 +178,7 @@ public void testNonDeadLockInListenerReplicatedAtomicJCacheApi() throws Exceptio /** * @throws Exception If failed. */ + @Test public void testNonDeadLockInListenerReplicatedAtomicOffHeapValues() throws Exception { testNonDeadLockInListener(cacheConfiguration(REPLICATED, 2, ATOMIC), true, true, false); } @@ -177,6 +186,7 @@ public void testNonDeadLockInListenerReplicatedAtomicOffHeapValues() throws Exce /** * @throws Exception If failed. */ + @Test public void testNonDeadLockInListenerAtomicWithoutBackup() throws Exception { testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 0, ATOMIC), true, true, false); } @@ -184,6 +194,7 @@ public void testNonDeadLockInListenerAtomicWithoutBackup() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNonDeadLockInListenerAtomicWithoutBackupJCacheApi() throws Exception { testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 0, ATOMIC), true, true, true); } @@ -191,6 +202,7 @@ public void testNonDeadLockInListenerAtomicWithoutBackupJCacheApi() throws Excep /** * @throws Exception If failed. */ + @Test public void testNonDeadLockInListener() throws Exception { testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL), true, true, false); } @@ -198,6 +210,7 @@ public void testNonDeadLockInListener() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNonDeadLockInListenerReplicated() throws Exception { testNonDeadLockInListener(cacheConfiguration(REPLICATED, 2, TRANSACTIONAL), true, true, false); } @@ -205,6 +218,7 @@ public void testNonDeadLockInListenerReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNonDeadLockInListenerReplicatedJCacheApi() throws Exception { testNonDeadLockInListener(cacheConfiguration(REPLICATED, 2, TRANSACTIONAL), true, true, true); } @@ -212,6 +226,7 @@ public void testNonDeadLockInListenerReplicatedJCacheApi() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNonDeadLockInListenerMvcc() throws Exception { testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL_SNAPSHOT), true, true, false); } @@ -219,6 +234,7 @@ public void testNonDeadLockInListenerMvcc() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNonDeadLockInListenerReplicatedMvcc() throws Exception { testNonDeadLockInListener(cacheConfiguration(REPLICATED, 2, TRANSACTIONAL_SNAPSHOT), true, true, false); } @@ -226,6 +242,7 @@ public void testNonDeadLockInListenerReplicatedMvcc() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNonDeadLockInListenerReplicatedJCacheApiMvcc() throws Exception { testNonDeadLockInListener(cacheConfiguration(REPLICATED, 2, TRANSACTIONAL_SNAPSHOT), true, true, true); } @@ -237,6 +254,7 @@ public void testNonDeadLockInListenerReplicatedJCacheApiMvcc() throws Exception /** * @throws Exception If failed. */ + @Test public void testNonDeadLockInFilterTx() throws Exception { testNonDeadLockInFilter(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL), true, true, false); } @@ -244,6 +262,7 @@ public void testNonDeadLockInFilterTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNonDeadLockInFilterTxJCacheApi() throws Exception { testNonDeadLockInFilter(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL), true, true, true); } @@ -251,6 +270,7 @@ public void testNonDeadLockInFilterTxJCacheApi() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNonDeadLockInFilterMvccTx() throws Exception { testNonDeadLockInFilter(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL_SNAPSHOT), true, true, false); } @@ -258,6 +278,7 @@ public void testNonDeadLockInFilterMvccTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNonDeadLockInFilterMvccTxJCacheApi() throws Exception { testNonDeadLockInFilter(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL_SNAPSHOT), true, true, true); } @@ -265,6 +286,7 @@ public void testNonDeadLockInFilterMvccTxJCacheApi() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNonDeadLockInFilterAtomic() throws Exception { testNonDeadLockInFilter(cacheConfiguration(PARTITIONED, 2, ATOMIC), true, true, false); } @@ -272,6 +294,7 @@ public void testNonDeadLockInFilterAtomic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNonDeadLockInFilterAtomicJCacheApi() throws Exception { testNonDeadLockInFilter(cacheConfiguration(PARTITIONED, 2, ATOMIC), true, true, true); } @@ -279,6 +302,7 @@ public void testNonDeadLockInFilterAtomicJCacheApi() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNonDeadLockInFilterReplicatedAtomic() throws Exception { testNonDeadLockInFilter(cacheConfiguration(REPLICATED, 2, ATOMIC), true, true, false); } @@ -286,6 +310,7 @@ public void testNonDeadLockInFilterReplicatedAtomic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNonDeadLockInFilterAtomicWithoutBackup() throws Exception { testNonDeadLockInFilter(cacheConfiguration(PARTITIONED, 0, ATOMIC), true, true, false); } @@ -293,6 +318,7 @@ public void testNonDeadLockInFilterAtomicWithoutBackup() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNonDeadLockInFilter() throws Exception { testNonDeadLockInFilter(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL), true, true, false); } @@ -300,6 +326,7 @@ public void testNonDeadLockInFilter() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNonDeadLockInFilterReplicated() throws Exception { testNonDeadLockInFilter(cacheConfiguration(REPLICATED, 2, TRANSACTIONAL), true, true, false); } @@ -307,6 +334,7 @@ public void testNonDeadLockInFilterReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNonDeadLockInFilterReplicatedJCacheApi() throws Exception { testNonDeadLockInFilter(cacheConfiguration(REPLICATED, 2, TRANSACTIONAL), true, true, false); } @@ -314,6 +342,7 @@ public void testNonDeadLockInFilterReplicatedJCacheApi() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNonDeadLockInFilterMvcc() throws Exception { testNonDeadLockInFilter(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL_SNAPSHOT), true, true, false); } @@ -321,6 +350,7 @@ public void testNonDeadLockInFilterMvcc() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNonDeadLockInFilterReplicatedMvcc() throws Exception { testNonDeadLockInFilter(cacheConfiguration(REPLICATED, 2, TRANSACTIONAL_SNAPSHOT), true, true, false); } @@ -328,6 +358,7 @@ public void testNonDeadLockInFilterReplicatedMvcc() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNonDeadLockInFilterReplicatedJCacheApiMvcc() throws Exception { testNonDeadLockInFilter(cacheConfiguration(REPLICATED, 2, TRANSACTIONAL_SNAPSHOT), true, true, false); } @@ -339,6 +370,7 @@ public void testNonDeadLockInFilterReplicatedJCacheApiMvcc() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNonDeadLockInFilterTxSyncFilter() throws Exception { testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL), false, true, false); } @@ -346,6 +378,7 @@ public void testNonDeadLockInFilterTxSyncFilter() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNonDeadLockInFilterMvccTxSyncFilter() throws Exception { testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL_SNAPSHOT), false, true, false); } @@ -353,6 +386,7 @@ public void testNonDeadLockInFilterMvccTxSyncFilter() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNonDeadLockInFilterAtomicSyncFilter() throws Exception { testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, ATOMIC), false, true, false); } @@ -360,6 +394,7 @@ public void testNonDeadLockInFilterAtomicSyncFilter() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNonDeadLockInFilterReplicatedAtomicSyncFilter() throws Exception { testNonDeadLockInListener(cacheConfiguration(REPLICATED, 2, ATOMIC), false, true, false); } @@ -367,6 +402,7 @@ public void testNonDeadLockInFilterReplicatedAtomicSyncFilter() throws Exception /** * @throws Exception If failed. */ + @Test public void testNonDeadLockInFilterAtomicWithoutBackupSyncFilter() throws Exception { testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 0, ATOMIC), false, true, false); } @@ -374,6 +410,7 @@ public void testNonDeadLockInFilterAtomicWithoutBackupSyncFilter() throws Except /** * @throws Exception If failed. */ + @Test public void testNonDeadLockInFilterSyncFilter() throws Exception { testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL), false, true, false); } @@ -381,6 +418,7 @@ public void testNonDeadLockInFilterSyncFilter() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNonDeadLockInFilterReplicatedSyncFilter() throws Exception { testNonDeadLockInListener(cacheConfiguration(REPLICATED, 2, TRANSACTIONAL), false, true, false); } @@ -388,6 +426,7 @@ public void testNonDeadLockInFilterReplicatedSyncFilter() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNonDeadLockInFilterSyncFilterMvcc() throws Exception { testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL_SNAPSHOT), false, true, false); } @@ -395,6 +434,7 @@ public void testNonDeadLockInFilterSyncFilterMvcc() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNonDeadLockInFilterReplicatedSyncFilterMvcc() throws Exception { testNonDeadLockInListener(cacheConfiguration(REPLICATED, 2, TRANSACTIONAL_SNAPSHOT), false, true, false); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryConcurrentPartitionUpdateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryConcurrentPartitionUpdateTest.java index 53a17151db79c..7ef15113b2f05 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryConcurrentPartitionUpdateTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryConcurrentPartitionUpdateTest.java @@ -84,6 +84,7 @@ public class CacheContinuousQueryConcurrentPartitionUpdateTest extends GridCommo /** * @throws Exception If failed. */ + @Test public void testConcurrentUpdatePartitionAtomic() throws Exception { concurrentUpdatePartition(ATOMIC, false); } @@ -91,6 +92,7 @@ public void testConcurrentUpdatePartitionAtomic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConcurrentUpdatePartitionTx() throws Exception { concurrentUpdatePartition(TRANSACTIONAL, false); } @@ -98,6 +100,7 @@ public void testConcurrentUpdatePartitionTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConcurrentUpdatePartitionMvccTx() throws Exception { concurrentUpdatePartition(TRANSACTIONAL_SNAPSHOT, false); } @@ -105,6 +108,7 @@ public void testConcurrentUpdatePartitionMvccTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConcurrentUpdatePartitionAtomicCacheGroup() throws Exception { concurrentUpdatePartition(ATOMIC, true); } @@ -112,6 +116,7 @@ public void testConcurrentUpdatePartitionAtomicCacheGroup() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConcurrentUpdatePartitionTxCacheGroup() throws Exception { concurrentUpdatePartition(TRANSACTIONAL, true); } @@ -119,6 +124,7 @@ public void testConcurrentUpdatePartitionTxCacheGroup() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConcurrentUpdatePartitionMvccTxCacheGroup() throws Exception { concurrentUpdatePartition(TRANSACTIONAL_SNAPSHOT, true); } @@ -274,6 +280,7 @@ private T2 startListener(IgniteCache /** * @throws Exception If failed. */ + @Test public void testConcurrentUpdatesAndQueryStartAtomic() throws Exception { concurrentUpdatesAndQueryStart(ATOMIC, false); } @@ -281,6 +288,7 @@ public void testConcurrentUpdatesAndQueryStartAtomic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConcurrentUpdatesAndQueryStartTx() throws Exception { concurrentUpdatesAndQueryStart(TRANSACTIONAL, false); } @@ -288,6 +296,7 @@ public void testConcurrentUpdatesAndQueryStartTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConcurrentUpdatesAndQueryStartMvccTx() throws Exception { concurrentUpdatesAndQueryStart(TRANSACTIONAL_SNAPSHOT, false); } @@ -295,6 +304,7 @@ public void testConcurrentUpdatesAndQueryStartMvccTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConcurrentUpdatesAndQueryStartAtomicCacheGroup() throws Exception { concurrentUpdatesAndQueryStart(ATOMIC, true); } @@ -302,6 +312,7 @@ public void testConcurrentUpdatesAndQueryStartAtomicCacheGroup() throws Exceptio /** * @throws Exception If failed. */ + @Test public void testConcurrentUpdatesAndQueryStartTxCacheGroup() throws Exception { concurrentUpdatesAndQueryStart(TRANSACTIONAL, true); } @@ -309,6 +320,7 @@ public void testConcurrentUpdatesAndQueryStartTxCacheGroup() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConcurrentUpdatesAndQueryStartMvccTxCacheGroup() throws Exception { concurrentUpdatesAndQueryStart(TRANSACTIONAL_SNAPSHOT, true); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryCounterAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryCounterAbstractTest.java index 45b30e8c61eb9..165116fafb6fc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryCounterAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryCounterAbstractTest.java @@ -177,6 +177,7 @@ protected CacheAtomicityMode atomicityMode() { /** * @throws Exception If failed. */ + @Test public void testAllEntries() throws Exception { IgniteCache cache = grid(0).cache(CACHE_NAME); @@ -248,6 +249,7 @@ public void testAllEntries() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTwoQueryListener() throws Exception { if (cacheMode() == LOCAL) return; @@ -384,6 +386,7 @@ private void checkEvents(Map>> evnts, long iter) /** * @throws Exception If failed. */ + @Test public void testRestartQuery() throws Exception { IgniteCache cache = grid(0).cache(CACHE_NAME); @@ -442,6 +445,7 @@ public void testRestartQuery() throws Exception { /** * @throws Exception If failed. */ + @Test public void testEntriesByFilter() throws Exception { IgniteCache cache = grid(0).cache(CACHE_NAME); @@ -537,6 +541,7 @@ public void testEntriesByFilter() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLoadCache() throws Exception { IgniteCache cache = grid(0).cache(CACHE_NAME); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryEventBufferTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryEventBufferTest.java index 382f16692175c..0615a2f852c22 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryEventBufferTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryEventBufferTest.java @@ -37,6 +37,7 @@ public class CacheContinuousQueryEventBufferTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testBuffer1() throws Exception { testBuffer(1); } @@ -44,6 +45,7 @@ public void testBuffer1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBuffer2() throws Exception { for (int i = 0; i < 10; i++) { log.info("Iteration: " + i); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryExecuteInPrimaryTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryExecuteInPrimaryTest.java index 3395f26ac97de..55b3938482246 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryExecuteInPrimaryTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryExecuteInPrimaryTest.java @@ -99,6 +99,7 @@ protected CacheConfiguration cacheConfiguration( /** * @throws Exception If failed. */ + @Test public void testLocalCache() throws Exception { CacheConfiguration ccfg = cacheConfiguration(ATOMIC, LOCAL); @@ -109,6 +110,7 @@ public void testLocalCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReplicatedCache() throws Exception { CacheConfiguration ccfg = cacheConfiguration(ATOMIC, REPLICATED); @@ -119,6 +121,7 @@ public void testReplicatedCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPartitionedCache() throws Exception { CacheConfiguration ccfg = cacheConfiguration(ATOMIC, PARTITIONED); @@ -129,6 +132,7 @@ public void testPartitionedCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTransactionLocalCache() throws Exception { CacheConfiguration ccfg = cacheConfiguration(TRANSACTIONAL, LOCAL); @@ -139,6 +143,7 @@ public void testTransactionLocalCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTransactionReplicatedCache() throws Exception { CacheConfiguration ccfg = cacheConfiguration(TRANSACTIONAL, REPLICATED); @@ -149,6 +154,7 @@ public void testTransactionReplicatedCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTransactionPartitionedCache() throws Exception { CacheConfiguration ccfg = cacheConfiguration(TRANSACTIONAL, PARTITIONED); @@ -159,6 +165,7 @@ public void testTransactionPartitionedCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccTransactionLocalCache() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-9530"); @@ -171,6 +178,7 @@ public void testMvccTransactionLocalCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccTransactionReplicatedCache() throws Exception { CacheConfiguration ccfg = cacheConfiguration(TRANSACTIONAL_SNAPSHOT, REPLICATED); @@ -181,6 +189,7 @@ public void testMvccTransactionReplicatedCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccTransactionPartitionedCache() throws Exception { CacheConfiguration ccfg = cacheConfiguration(TRANSACTIONAL_SNAPSHOT, PARTITIONED); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFactoryFilterRandomOperationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFactoryFilterRandomOperationTest.java index d216d4f88ad58..1abd5c3988203 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFactoryFilterRandomOperationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFactoryFilterRandomOperationTest.java @@ -91,6 +91,7 @@ public class CacheContinuousQueryFactoryFilterRandomOperationTest extends CacheC /** * @throws Exception If failed. */ + @Test public void testInternalQuery() throws Exception { CacheConfiguration ccfg = cacheConfiguration(REPLICATED, 1, diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAbstractSelfTest.java index e7c22611f31a8..30d54074549cb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAbstractSelfTest.java @@ -215,6 +215,7 @@ protected NearCacheConfiguration nearCacheConfiguration() { /** * @throws Exception If failed. */ + @Test public void testFirstFilteredEvent() throws Exception { this.backups = 2; @@ -259,6 +260,7 @@ public void testFirstFilteredEvent() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRebalanceVersion() throws Exception { Ignite ignite0 = startGrid(0); @@ -311,6 +313,7 @@ public void testRebalanceVersion() throws Exception { * * @throws Exception If fail. */ + @Test public void testRebalance() throws Exception { for (int iter = 0; iter < 5; iter++) { log.info("Iteration: " + iter); @@ -426,6 +429,7 @@ private void waitRebalanceFinished(Ignite ignite, long topVer, int minorVer) thr /** * @throws Exception If failed. */ + @Test public void testOneBackup() throws Exception { checkBackupQueue(1, false); } @@ -433,6 +437,7 @@ public void testOneBackup() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOneBackupClientUpdate() throws Exception { checkBackupQueue(1, true); } @@ -440,6 +445,7 @@ public void testOneBackupClientUpdate() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUpdatePartitionCounter() throws Exception { this.backups = 2; @@ -540,6 +546,7 @@ private void checkPartCounter(int nodes, int killedNodeIdx, Map u /** * @throws Exception If failed. */ + @Test public void testStartStopQuery() throws Exception { this.backups = 1; @@ -644,6 +651,7 @@ public void testStartStopQuery() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLeftPrimaryAndBackupNodes() throws Exception { if (cacheMode() == REPLICATED) return; @@ -814,6 +822,7 @@ public void testLeftPrimaryAndBackupNodes() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemoteFilter() throws Exception { this.backups = 2; @@ -926,6 +935,7 @@ public void testRemoteFilter() throws Exception { /** * @throws Exception If failed. */ + @Test public void testThreeBackups() throws Exception { if (cacheMode() == REPLICATED) return; @@ -1352,6 +1362,7 @@ private List testKeys(IgniteCache cache, int parts) thr /** * @throws Exception If failed. */ + @Test public void testBackupQueueCleanupClientQuery() throws Exception { startGridsMultiThreaded(2); @@ -1425,6 +1436,7 @@ public void testBackupQueueCleanupClientQuery() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBackupQueueEvict() throws Exception { startGridsMultiThreaded(2); @@ -1497,6 +1509,7 @@ public void testBackupQueueEvict() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBackupQueueCleanupServerQuery() throws Exception { Ignite qryClient = startGridsMultiThreaded(2); @@ -1573,6 +1586,7 @@ private Collection backupQueue(Ignite ignite) { /** * @throws Exception If failed. */ + @Test public void testFailoverStartStopBackup() throws Exception { failoverStartStopFilter(2); } @@ -1580,6 +1594,7 @@ public void testFailoverStartStopBackup() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStartStop() throws Exception { this.backups = 2; @@ -1899,6 +1914,7 @@ private void failoverStartStopFilter(int backups) throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultiThreadedFailover() throws Exception { this.backups = 2; @@ -2106,6 +2122,7 @@ public void testMultiThreadedFailover() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultiThreaded() throws Exception { this.backups = 2; @@ -2299,6 +2316,7 @@ private boolean checkEvents(boolean logAll, * * @throws Exception If failed. */ + @Test public void testNoEventLossOnTopologyChange() throws Exception { final int batchLoadSize = 2000; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverMvccTxSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverMvccTxSelfTest.java index 2d578f28e3d84..03592dd056e4e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverMvccTxSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverMvccTxSelfTest.java @@ -37,17 +37,20 @@ public class CacheContinuousQueryFailoverMvccTxSelfTest extends CacheContinuousQ } /** {@inheritDoc} */ - @Override public void testBackupQueueEvict() throws Exception { + @Override @Test + public void testBackupQueueEvict() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-7311"); } /** {@inheritDoc} */ - @Override public void testLeftPrimaryAndBackupNodes() throws Exception { + @Override @Test + public void testLeftPrimaryAndBackupNodes() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10047"); } /** {@inheritDoc} */ - @Override public void testFailoverStartStopBackup() throws Exception { + @Override @Test + public void testFailoverStartStopBackup() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10391"); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryLostPartitionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryLostPartitionTest.java index a8b895fc4d4d7..8f24fc06a1762 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryLostPartitionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryLostPartitionTest.java @@ -80,6 +80,7 @@ public class CacheContinuousQueryLostPartitionTest extends GridCommonAbstractTes /** * @throws Exception If failed. */ + @Test public void testTxEvent() throws Exception { testEvent(TX_CACHE_NAME, false); } @@ -87,6 +88,7 @@ public void testTxEvent() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccTxEvent() throws Exception { testEvent(MVCC_TX_CACHE_NAME, false); } @@ -94,6 +96,7 @@ public void testMvccTxEvent() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAtomicEvent() throws Exception { testEvent(CACHE_NAME, false); } @@ -101,6 +104,7 @@ public void testAtomicEvent() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxClientEvent() throws Exception { testEvent(TX_CACHE_NAME, true); } @@ -108,6 +112,7 @@ public void testTxClientEvent() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccTxClientEvent() throws Exception { testEvent(MVCC_TX_CACHE_NAME, true); } @@ -115,6 +120,7 @@ public void testMvccTxClientEvent() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAtomicClientEvent() throws Exception { testEvent(CACHE_NAME, true); } @@ -123,6 +129,7 @@ public void testAtomicClientEvent() throws Exception { * @param cacheName Cache name. * @throws Exception If failed. */ + @Test public void testEvent(String cacheName, boolean client) throws Exception { IgniteCache cache1 = grid(0).getOrCreateCache(cacheName); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOperationFromCallbackTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOperationFromCallbackTest.java index a9e3d439d5305..9ddac4cf6f365 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOperationFromCallbackTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOperationFromCallbackTest.java @@ -136,6 +136,7 @@ public class CacheContinuousQueryOperationFromCallbackTest extends GridCommonAbs /** * @throws Exception If failed. */ + @Test public void testAtomicOneBackup() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 1, ATOMIC, FULL_SYNC); @@ -145,6 +146,7 @@ public void testAtomicOneBackup() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxOneBackupFilter() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 1, TRANSACTIONAL, FULL_SYNC); @@ -154,6 +156,7 @@ public void testTxOneBackupFilter() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxOneBackupFilterPrimary() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 1, TRANSACTIONAL, PRIMARY_SYNC); @@ -163,6 +166,7 @@ public void testTxOneBackupFilterPrimary() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxOneBackup() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 1, TRANSACTIONAL, FULL_SYNC); @@ -172,6 +176,7 @@ public void testTxOneBackup() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAtomicTwoBackups() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 2, ATOMIC, FULL_SYNC); @@ -181,6 +186,7 @@ public void testAtomicTwoBackups() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxTwoBackupsFilter() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL, FULL_SYNC); @@ -190,6 +196,7 @@ public void testTxTwoBackupsFilter() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxTwoBackupsFilterPrimary() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL, PRIMARY_SYNC); @@ -199,6 +206,7 @@ public void testTxTwoBackupsFilterPrimary() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxReplicatedFilter() throws Exception { CacheConfiguration ccfg = cacheConfiguration(REPLICATED, 0, TRANSACTIONAL, FULL_SYNC); @@ -208,6 +216,7 @@ public void testTxReplicatedFilter() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxTwoBackup() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL, FULL_SYNC); @@ -217,6 +226,7 @@ public void testTxTwoBackup() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxReplicated() throws Exception { CacheConfiguration ccfg = cacheConfiguration(REPLICATED, 2, TRANSACTIONAL, FULL_SYNC); @@ -226,6 +236,7 @@ public void testTxReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxReplicatedPrimary() throws Exception { CacheConfiguration ccfg = cacheConfiguration(REPLICATED, 2, TRANSACTIONAL, PRIMARY_SYNC); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOperationP2PTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOperationP2PTest.java index 6f5de393858f9..f7f109b552c6c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOperationP2PTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOperationP2PTest.java @@ -93,6 +93,7 @@ public class CacheContinuousQueryOperationP2PTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testAtomicClient() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 1, @@ -105,6 +106,7 @@ public void testAtomicClient() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAtomic() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 1, @@ -117,6 +119,7 @@ public void testAtomic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAtomicReplicated() throws Exception { CacheConfiguration ccfg = cacheConfiguration(REPLICATED, 0, @@ -129,6 +132,7 @@ public void testAtomicReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAtomicReplicatedClient() throws Exception { CacheConfiguration ccfg = cacheConfiguration(REPLICATED, 0, @@ -141,6 +145,7 @@ public void testAtomicReplicatedClient() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTx() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 1, @@ -152,6 +157,7 @@ public void testTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxClient() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 1, @@ -164,6 +170,7 @@ public void testTxClient() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxReplicated() throws Exception { CacheConfiguration ccfg = cacheConfiguration(REPLICATED, 0, @@ -176,6 +183,7 @@ public void testTxReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxReplicatedClient() throws Exception { CacheConfiguration ccfg = cacheConfiguration(REPLICATED, 0, @@ -188,6 +196,7 @@ public void testTxReplicatedClient() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccTx() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 1, @@ -199,6 +208,7 @@ public void testMvccTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccTxClient() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 1, @@ -211,6 +221,7 @@ public void testMvccTxClient() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccTxReplicated() throws Exception { CacheConfiguration ccfg = cacheConfiguration(REPLICATED, 0, @@ -223,6 +234,7 @@ public void testMvccTxReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccTxReplicatedClient() throws Exception { CacheConfiguration ccfg = cacheConfiguration(REPLICATED, 0, diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOrderingEventTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOrderingEventTest.java index 1ad45dd8c1b53..35a4bb3704ca0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOrderingEventTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOrderingEventTest.java @@ -133,6 +133,7 @@ public class CacheContinuousQueryOrderingEventTest extends GridCommonAbstractTes /** * @throws Exception If failed. */ + @Test public void testAtomicOnheapTwoBackup() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 2, ATOMIC, PRIMARY_SYNC); @@ -142,6 +143,7 @@ public void testAtomicOnheapTwoBackup() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxOnheapTwoBackup() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL, FULL_SYNC); @@ -151,6 +153,7 @@ public void testTxOnheapTwoBackup() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxOnheapWithoutBackup() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 0, TRANSACTIONAL, PRIMARY_SYNC); @@ -160,6 +163,7 @@ public void testTxOnheapWithoutBackup() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxOnheapWithoutBackupFullSync() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 0, TRANSACTIONAL, FULL_SYNC); @@ -169,6 +173,7 @@ public void testTxOnheapWithoutBackupFullSync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccTxOnheapTwoBackup() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL_SNAPSHOT, FULL_SYNC); @@ -178,6 +183,7 @@ public void testMvccTxOnheapTwoBackup() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccTxOnheapWithoutBackup() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 0, TRANSACTIONAL_SNAPSHOT, PRIMARY_SYNC); @@ -187,6 +193,7 @@ public void testMvccTxOnheapWithoutBackup() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccTxOnheapWithoutBackupFullSync() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 0, TRANSACTIONAL_SNAPSHOT, FULL_SYNC); @@ -198,6 +205,7 @@ public void testMvccTxOnheapWithoutBackupFullSync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAtomicOnheapTwoBackupAsync() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 2, ATOMIC, PRIMARY_SYNC); @@ -207,6 +215,7 @@ public void testAtomicOnheapTwoBackupAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAtomicOnheapTwoBackupAsyncFullSync() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 2, ATOMIC, FULL_SYNC); @@ -216,6 +225,7 @@ public void testAtomicOnheapTwoBackupAsyncFullSync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAtomicReplicatedAsync() throws Exception { CacheConfiguration ccfg = cacheConfiguration(REPLICATED, 0, ATOMIC, PRIMARY_SYNC); @@ -225,6 +235,7 @@ public void testAtomicReplicatedAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAtomicReplicatedAsyncFullSync() throws Exception { CacheConfiguration ccfg = cacheConfiguration(REPLICATED, 0, ATOMIC, FULL_SYNC); @@ -234,6 +245,7 @@ public void testAtomicReplicatedAsyncFullSync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAtomicOnheapWithoutBackupAsync() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 0, ATOMIC, PRIMARY_SYNC); @@ -243,6 +255,7 @@ public void testAtomicOnheapWithoutBackupAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxOnheapTwoBackupAsync() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL, PRIMARY_SYNC); @@ -252,6 +265,7 @@ public void testTxOnheapTwoBackupAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxOnheapAsync() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 0, TRANSACTIONAL, PRIMARY_SYNC); @@ -261,6 +275,7 @@ public void testTxOnheapAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxOnheapAsyncFullSync() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 0, TRANSACTIONAL, FULL_SYNC); @@ -270,6 +285,7 @@ public void testTxOnheapAsyncFullSync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccTxOnheapTwoBackupAsync() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL_SNAPSHOT, PRIMARY_SYNC); @@ -279,6 +295,7 @@ public void testMvccTxOnheapTwoBackupAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccTxOnheapAsync() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 0, TRANSACTIONAL_SNAPSHOT, PRIMARY_SYNC); @@ -288,6 +305,7 @@ public void testMvccTxOnheapAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccTxOnheapAsyncFullSync() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 0, TRANSACTIONAL_SNAPSHOT, FULL_SYNC); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryRandomOperationsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryRandomOperationsTest.java index af92c31e4a814..0ca978bc55a97 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryRandomOperationsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryRandomOperationsTest.java @@ -144,6 +144,7 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract /** * @throws Exception If failed. */ + @Test public void testFilterAndFactoryProvided() throws Exception { final CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 1, @@ -188,6 +189,7 @@ public void testFilterAndFactoryProvided() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAtomicClient() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 1, @@ -200,6 +202,7 @@ public void testAtomicClient() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAtomic() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 1, @@ -212,6 +215,7 @@ public void testAtomic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAtomicAllNodes() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 1, @@ -224,6 +228,7 @@ public void testAtomicAllNodes() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAtomicReplicated() throws Exception { CacheConfiguration ccfg = cacheConfiguration(REPLICATED, 0, @@ -236,6 +241,7 @@ public void testAtomicReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAtomicReplicatedAllNodes() throws Exception { CacheConfiguration ccfg = cacheConfiguration(REPLICATED, 0, @@ -248,6 +254,7 @@ public void testAtomicReplicatedAllNodes() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAtomicReplicatedClient() throws Exception { CacheConfiguration ccfg = cacheConfiguration(REPLICATED, 0, @@ -260,6 +267,7 @@ public void testAtomicReplicatedClient() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAtomicNoBackups() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 0, @@ -272,6 +280,7 @@ public void testAtomicNoBackups() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAtomicNoBackupsAllNodes() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 0, @@ -284,6 +293,7 @@ public void testAtomicNoBackupsAllNodes() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAtomicNoBackupsClient() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 0, @@ -296,6 +306,7 @@ public void testAtomicNoBackupsClient() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTx() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 1, @@ -308,6 +319,7 @@ public void testTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxAllNodes() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 1, @@ -320,6 +332,7 @@ public void testTxAllNodes() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxExplicit() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 1, @@ -332,6 +345,7 @@ public void testTxExplicit() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccTx() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 1, @@ -344,6 +358,7 @@ public void testMvccTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccTxAllNodes() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 1, @@ -356,6 +371,7 @@ public void testMvccTxAllNodes() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccTxExplicit() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 1, @@ -368,6 +384,7 @@ public void testMvccTxExplicit() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDoubleRemoveAtomicWithoutBackup() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 0, @@ -380,6 +397,7 @@ public void testDoubleRemoveAtomicWithoutBackup() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDoubleRemoveAtomicWithoutBackupWithStore() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 0, @@ -392,6 +410,7 @@ public void testDoubleRemoveAtomicWithoutBackupWithStore() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDoubleRemoveAtomic() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 1, @@ -404,6 +423,7 @@ public void testDoubleRemoveAtomic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDoubleRemoveAtomicWithStore() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 1, @@ -416,6 +436,7 @@ public void testDoubleRemoveAtomicWithStore() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDoubleRemoveTx() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 1, @@ -428,6 +449,7 @@ public void testDoubleRemoveTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDoubleRemoveTxWithStore() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 1, @@ -440,6 +462,7 @@ public void testDoubleRemoveTxWithStore() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDoubleRemoveReplicatedTx() throws Exception { CacheConfiguration ccfg = cacheConfiguration(REPLICATED, 0, @@ -452,6 +475,7 @@ public void testDoubleRemoveReplicatedTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDoubleRemoveReplicatedTxWithStore() throws Exception { CacheConfiguration ccfg = cacheConfiguration(REPLICATED, 0, @@ -464,6 +488,7 @@ public void testDoubleRemoveReplicatedTxWithStore() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDoubleRemoveMvccTx() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 1, @@ -476,6 +501,7 @@ public void testDoubleRemoveMvccTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDoubleRemoveMvccTxWithStore() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-8582"); @@ -490,6 +516,7 @@ public void testDoubleRemoveMvccTxWithStore() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDoubleRemoveReplicatedMvccTx() throws Exception { CacheConfiguration ccfg = cacheConfiguration(REPLICATED, 0, @@ -502,6 +529,7 @@ public void testDoubleRemoveReplicatedMvccTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDoubleRemoveReplicatedMvccTxWithStore() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-8582"); @@ -516,6 +544,7 @@ public void testDoubleRemoveReplicatedMvccTxWithStore() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDoubleRemoveReplicatedAtomic() throws Exception { CacheConfiguration ccfg = cacheConfiguration(REPLICATED, 0, @@ -528,6 +557,7 @@ public void testDoubleRemoveReplicatedAtomic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDoubleRemoveReplicatedAtomicWithStore() throws Exception { CacheConfiguration ccfg = cacheConfiguration(REPLICATED, 0, @@ -823,6 +853,7 @@ private void checkSingleEvent( /** * @throws Exception If failed. */ + @Test public void testTxClient() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 1, @@ -835,6 +866,7 @@ public void testTxClient() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxClientExplicit() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 1, @@ -847,6 +879,7 @@ public void testTxClientExplicit() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxReplicated() throws Exception { CacheConfiguration ccfg = cacheConfiguration(REPLICATED, 0, @@ -859,6 +892,7 @@ public void testTxReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxReplicatedClient() throws Exception { CacheConfiguration ccfg = cacheConfiguration(REPLICATED, 0, @@ -871,6 +905,7 @@ public void testTxReplicatedClient() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxNoBackups() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 0, @@ -883,6 +918,7 @@ public void testTxNoBackups() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxNoBackupsAllNodes() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 0, @@ -895,6 +931,7 @@ public void testTxNoBackupsAllNodes() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxNoBackupsExplicit() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 0, @@ -907,6 +944,7 @@ public void testTxNoBackupsExplicit() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxNoBackupsClient() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 0, @@ -919,6 +957,7 @@ public void testTxNoBackupsClient() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccTxClient() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 1, @@ -931,6 +970,7 @@ public void testMvccTxClient() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccTxClientExplicit() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 1, @@ -943,6 +983,7 @@ public void testMvccTxClientExplicit() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccTxReplicated() throws Exception { CacheConfiguration ccfg = cacheConfiguration(REPLICATED, 0, @@ -955,6 +996,7 @@ public void testMvccTxReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccTxReplicatedClient() throws Exception { CacheConfiguration ccfg = cacheConfiguration(REPLICATED, 0, @@ -967,6 +1009,7 @@ public void testMvccTxReplicatedClient() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccTxNoBackups() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 0, @@ -979,6 +1022,7 @@ public void testMvccTxNoBackups() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccTxNoBackupsAllNodes() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 0, @@ -991,6 +1035,7 @@ public void testMvccTxNoBackupsAllNodes() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccTxNoBackupsExplicit() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 0, @@ -1003,6 +1048,7 @@ public void testMvccTxNoBackupsExplicit() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccTxNoBackupsClient() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 0, diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryVariationsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryVariationsTest.java index fc86a35c16ed3..2fe7fe55839ef 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryVariationsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryVariationsTest.java @@ -105,6 +105,7 @@ public class CacheContinuousQueryVariationsTest extends IgniteCacheConfigVariati /** * @throws Exception If failed. */ + @Test public void testRandomOperationJCacheApiKeepBinary() throws Exception { testRandomOperation(true, false, false, false, true); } @@ -112,6 +113,7 @@ public void testRandomOperationJCacheApiKeepBinary() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRandomOperationJCacheApiAsyncCallback() throws Exception { testRandomOperation(true, false, false, true, false); } @@ -119,6 +121,7 @@ public void testRandomOperationJCacheApiAsyncCallback() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRandomOperationJCacheApiWithFilter() throws Exception { testRandomOperation(true, false, true, false, false); } @@ -126,6 +129,7 @@ public void testRandomOperationJCacheApiWithFilter() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRandomOperationJCacheApiWithFilterAsyncCallback() throws Exception { testRandomOperation(true, false, true, true, false); } @@ -133,6 +137,7 @@ public void testRandomOperationJCacheApiWithFilterAsyncCallback() throws Excepti /** * @throws Exception If failed. */ + @Test public void testRandomOperationJCacheApiSyncWithFilter() throws Exception { testRandomOperation(true, true, true, false, false); } @@ -140,6 +145,7 @@ public void testRandomOperationJCacheApiSyncWithFilter() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRandomOperation() throws Exception { testRandomOperation(true, true, false, false, false); } @@ -147,6 +153,7 @@ public void testRandomOperation() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRandomOperationWithKeepBinary() throws Exception { testRandomOperation(true, true, false, false, true); } @@ -154,6 +161,7 @@ public void testRandomOperationWithKeepBinary() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRandomOperationWithAsyncCallback() throws Exception { testRandomOperation(true, true, false, true, false); } @@ -161,6 +169,7 @@ public void testRandomOperationWithAsyncCallback() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRandomOperationWithFilter() throws Exception { testRandomOperation(true, true, true, false, false); } @@ -168,6 +177,7 @@ public void testRandomOperationWithFilter() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRandomOperationWithFilterWithKeepBinary() throws Exception { testRandomOperation(true, true, true, false, true); } @@ -175,6 +185,7 @@ public void testRandomOperationWithFilterWithKeepBinary() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRandomOperationWithFilterAsyncCallback() throws Exception { testRandomOperation(true, true, true, true, false); } @@ -623,6 +634,7 @@ private void checkNoEvent(List>> evtsQueues) /** * @throws Exception If failed. */ + @Test public void testRemoveRemoveScenario() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -717,7 +729,7 @@ public void testRemoveRemoveScenario() throws Exception { while (evts.size() != 10) { Thread.sleep(100); } - + evts.clear(); log.info("Finish iteration: " + i); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousWithTransformerFailoverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousWithTransformerFailoverTest.java index 241dc2ac5c166..8ab746fab531a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousWithTransformerFailoverTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousWithTransformerFailoverTest.java @@ -83,6 +83,7 @@ public class CacheContinuousWithTransformerFailoverTest extends GridCommonAbstra /** * @throws Exception If failed. */ + @Test public void testServerNodeLeft() throws Exception { startGrids(3); @@ -150,6 +151,7 @@ public void testServerNodeLeft() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTransformerException() throws Exception { try { startGrids(1); @@ -204,6 +206,7 @@ public void testTransformerException() throws Exception { * * @throws Exception If failed. */ + @Test public void testCrossCallback() throws Exception { startGrids(2); try { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousWithTransformerReplicatedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousWithTransformerReplicatedSelfTest.java index 3768aad50d626..21038538616e8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousWithTransformerReplicatedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousWithTransformerReplicatedSelfTest.java @@ -144,6 +144,7 @@ protected Ignite gridToRunQuery() throws Exception { /** * @throws Exception If failed. */ + @Test public void testContinuousWithTransformer() throws Exception { runContinuousQueryWithTransformer(SKIP_EVT_FILTER, DFLT_ENTRY_CNT, SKIP_KEEP_BINARY, false); } @@ -151,6 +152,7 @@ public void testContinuousWithTransformer() throws Exception { /** * @throws Exception If failed. */ + @Test public void testContinuousWithTransformerAsync() throws Exception { runContinuousQueryWithTransformer(SKIP_EVT_FILTER, DFLT_ENTRY_CNT, SKIP_KEEP_BINARY, true); } @@ -158,6 +160,7 @@ public void testContinuousWithTransformerAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testContinuousWithTransformerAndRegularListener() throws Exception { runContinuousQueryWithTransformer(SKIP_EVT_FILTER, DFLT_ENTRY_CNT, SKIP_KEEP_BINARY, false); } @@ -165,6 +168,7 @@ public void testContinuousWithTransformerAndRegularListener() throws Exception { /** * @throws Exception If failed. */ + @Test public void testContinuousWithTransformerAndRegularListenerAsync() throws Exception { runContinuousQueryWithTransformer(SKIP_EVT_FILTER, DFLT_ENTRY_CNT, SKIP_KEEP_BINARY, true); } @@ -172,6 +176,7 @@ public void testContinuousWithTransformerAndRegularListenerAsync() throws Except /** * @throws Exception If failed. */ + @Test public void testContinuousWithTransformerWithFilter() throws Exception { runContinuousQueryWithTransformer(ADD_EVT_FILTER, DFLT_ENTRY_CNT / 2, SKIP_KEEP_BINARY, false); } @@ -179,6 +184,7 @@ public void testContinuousWithTransformerWithFilter() throws Exception { /** * @throws Exception If failed. */ + @Test public void testContinuousWithTransformerWithFilterAsync() throws Exception { runContinuousQueryWithTransformer(ADD_EVT_FILTER, DFLT_ENTRY_CNT / 2, SKIP_KEEP_BINARY, true); } @@ -186,6 +192,7 @@ public void testContinuousWithTransformerWithFilterAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testContinuousWithTransformerAndRegularListenerWithFilter() throws Exception { runContinuousQueryWithTransformer(ADD_EVT_FILTER, DFLT_ENTRY_CNT / 2, KEEP_BINARY, false); } @@ -193,6 +200,7 @@ public void testContinuousWithTransformerAndRegularListenerWithFilter() throws E /** * @throws Exception If failed. */ + @Test public void testContinuousWithTransformerAndRegularListenerWithFilterAsync() throws Exception { runContinuousQueryWithTransformer(ADD_EVT_FILTER, DFLT_ENTRY_CNT / 2, KEEP_BINARY, true); } @@ -200,6 +208,7 @@ public void testContinuousWithTransformerAndRegularListenerWithFilterAsync() thr /** * @throws Exception If failed. */ + @Test public void testContinuousWithTransformerKeepBinary() throws Exception { runContinuousQueryWithTransformer(SKIP_EVT_FILTER, DFLT_ENTRY_CNT, KEEP_BINARY, false); } @@ -207,6 +216,7 @@ public void testContinuousWithTransformerKeepBinary() throws Exception { /** * @throws Exception If failed. */ + @Test public void testContinuousWithTransformerKeepBinaryAsync() throws Exception { runContinuousQueryWithTransformer(SKIP_EVT_FILTER, DFLT_ENTRY_CNT, KEEP_BINARY, true); } @@ -214,6 +224,7 @@ public void testContinuousWithTransformerKeepBinaryAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testContinuousWithTransformerAndRegularListenerKeepBinary() throws Exception { runContinuousQueryWithTransformer(SKIP_EVT_FILTER, DFLT_ENTRY_CNT, KEEP_BINARY, false); } @@ -221,6 +232,7 @@ public void testContinuousWithTransformerAndRegularListenerKeepBinary() throws E /** * @throws Exception If failed. */ + @Test public void testContinuousWithTransformerAndRegularListenerKeepBinaryAsync() throws Exception { runContinuousQueryWithTransformer(SKIP_EVT_FILTER, DFLT_ENTRY_CNT, KEEP_BINARY, true); } @@ -228,6 +240,7 @@ public void testContinuousWithTransformerAndRegularListenerKeepBinaryAsync() thr /** * @throws Exception If failed. */ + @Test public void testContinuousWithTransformerWithFilterKeepBinary() throws Exception { runContinuousQueryWithTransformer(ADD_EVT_FILTER, DFLT_ENTRY_CNT / 2, KEEP_BINARY, false); } @@ -235,6 +248,7 @@ public void testContinuousWithTransformerWithFilterKeepBinary() throws Exception /** * @throws Exception If failed. */ + @Test public void testContinuousWithTransformerWithFilterKeepBinaryAsync() throws Exception { runContinuousQueryWithTransformer(ADD_EVT_FILTER, DFLT_ENTRY_CNT / 2, KEEP_BINARY, true); } @@ -242,6 +256,7 @@ public void testContinuousWithTransformerWithFilterKeepBinaryAsync() throws Exce /** * @throws Exception If failed. */ + @Test public void testContinuousWithTransformerAndRegularListenerWithFilterKeepBinary() throws Exception { runContinuousQueryWithTransformer(ADD_EVT_FILTER, DFLT_ENTRY_CNT / 2, KEEP_BINARY, false); } @@ -249,6 +264,7 @@ public void testContinuousWithTransformerAndRegularListenerWithFilterKeepBinary( /** * @throws Exception If failed. */ + @Test public void testContinuousWithTransformerAndRegularListenerWithFilterKeepBinaryAsync() throws Exception { runContinuousQueryWithTransformer(ADD_EVT_FILTER, DFLT_ENTRY_CNT / 2, KEEP_BINARY, true); } @@ -256,6 +272,7 @@ public void testContinuousWithTransformerAndRegularListenerWithFilterKeepBinaryA /** * @throws Exception If failed. */ + @Test public void testTransformerReturnNull() throws Exception { Ignite ignite = gridToRunQuery(); @@ -305,6 +322,7 @@ public void testTransformerReturnNull() throws Exception { /** * @throws Exception If failed. */ + @Test public void testExpired() throws Exception { Ignite ignite = gridToRunQuery(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheEntryProcessorExternalizableFailedTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheEntryProcessorExternalizableFailedTest.java index 435ccc05eeb31..cb13d9ed0ecd6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheEntryProcessorExternalizableFailedTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheEntryProcessorExternalizableFailedTest.java @@ -121,6 +121,7 @@ private int getServerNodeCount() { /** * @throws Exception If failed. */ + @Test public void testOptimisticFullSync() throws Exception { CacheConfiguration ccfg = cacheConfiguration(FULL_SYNC, 2); @@ -142,6 +143,7 @@ public void testOptimisticFullSync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticOnePhaseCommit() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PRIMARY_SYNC, 1); @@ -163,6 +165,7 @@ public void testPessimisticOnePhaseCommit() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticOnePhaseCommitWithNearCache() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PRIMARY_SYNC, 1) .setNearConfiguration(new NearCacheConfiguration()); @@ -185,6 +188,7 @@ public void testPessimisticOnePhaseCommitWithNearCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticOnePhaseCommitFullSync() throws Exception { CacheConfiguration ccfg = cacheConfiguration(FULL_SYNC, 1); @@ -206,6 +210,7 @@ public void testPessimisticOnePhaseCommitFullSync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticOnePhaseCommitFullSyncWithNearCache() throws Exception { CacheConfiguration ccfg = cacheConfiguration(FULL_SYNC, 1) .setNearConfiguration(new NearCacheConfiguration()); @@ -228,6 +233,7 @@ public void testPessimisticOnePhaseCommitFullSyncWithNearCache() throws Exceptio /** * @throws Exception If failed. */ + @Test public void testPessimistic() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PRIMARY_SYNC, 2); @@ -249,6 +255,7 @@ public void testPessimistic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticWithNearCache() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PRIMARY_SYNC, 2) .setNearConfiguration(new NearCacheConfiguration()); @@ -271,6 +278,7 @@ public void testPessimisticWithNearCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticFullSync() throws Exception { CacheConfiguration ccfg = cacheConfiguration(FULL_SYNC, 2); @@ -292,6 +300,7 @@ public void testPessimisticFullSync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOptimisticOnePhaseCommit() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PRIMARY_SYNC, 1); @@ -313,6 +322,7 @@ public void testOptimisticOnePhaseCommit() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOptimisticOnePhaseCommitFullSync() throws Exception { CacheConfiguration ccfg = cacheConfiguration(FULL_SYNC, 1); @@ -334,6 +344,7 @@ public void testOptimisticOnePhaseCommitFullSync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOptimisticOnePhaseCommitFullSyncWithNearCache() throws Exception { CacheConfiguration ccfg = cacheConfiguration(FULL_SYNC, 1) .setNearConfiguration(new NearCacheConfiguration()); @@ -356,6 +367,7 @@ public void testOptimisticOnePhaseCommitFullSyncWithNearCache() throws Exception /** * @throws Exception If failed. */ + @Test public void testOptimistic() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PRIMARY_SYNC, 2); @@ -377,6 +389,7 @@ public void testOptimistic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOptimisticFullSyncWithNearCache() throws Exception { CacheConfiguration ccfg = cacheConfiguration(FULL_SYNC, 2); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheEntryProcessorNonSerializableTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheEntryProcessorNonSerializableTest.java index 693668556ffb9..750a5a90ebadc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheEntryProcessorNonSerializableTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheEntryProcessorNonSerializableTest.java @@ -110,6 +110,7 @@ private int getServerNodeCount() { /** * @throws Exception If failed. */ + @Test public void testPessimisticOnePhaseCommit() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PRIMARY_SYNC, 1); @@ -123,6 +124,7 @@ public void testPessimisticOnePhaseCommit() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticOnePhaseCommitWithNearCache() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PRIMARY_SYNC, 1) .setNearConfiguration(new NearCacheConfiguration()); @@ -137,6 +139,7 @@ public void testPessimisticOnePhaseCommitWithNearCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticOnePhaseCommitFullSync() throws Exception { CacheConfiguration ccfg = cacheConfiguration(FULL_SYNC, 1); @@ -150,6 +153,7 @@ public void testPessimisticOnePhaseCommitFullSync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticOnePhaseCommitFullSyncWithNearCache() throws Exception { CacheConfiguration ccfg = cacheConfiguration(FULL_SYNC, 1) .setNearConfiguration(new NearCacheConfiguration()); @@ -164,6 +168,7 @@ public void testPessimisticOnePhaseCommitFullSyncWithNearCache() throws Exceptio /** * @throws Exception If failed. */ + @Test public void testPessimistic() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PRIMARY_SYNC, 2); @@ -177,6 +182,7 @@ public void testPessimistic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticWithNearCache() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PRIMARY_SYNC, 2) .setNearConfiguration(new NearCacheConfiguration()); @@ -191,6 +197,7 @@ public void testPessimisticWithNearCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPessimisticFullSync() throws Exception { CacheConfiguration ccfg = cacheConfiguration(FULL_SYNC, 2); @@ -204,6 +211,7 @@ public void testPessimisticFullSync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOptimisticOnePhaseCommit() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PRIMARY_SYNC, 1); @@ -217,6 +225,7 @@ public void testOptimisticOnePhaseCommit() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOptimisticOnePhaseCommitFullSync() throws Exception { CacheConfiguration ccfg = cacheConfiguration(FULL_SYNC, 1); @@ -230,6 +239,7 @@ public void testOptimisticOnePhaseCommitFullSync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOptimisticOnePhaseCommitFullSyncWithNearCache() throws Exception { CacheConfiguration ccfg = cacheConfiguration(FULL_SYNC, 1) .setNearConfiguration(new NearCacheConfiguration()); @@ -244,6 +254,7 @@ public void testOptimisticOnePhaseCommitFullSyncWithNearCache() throws Exception /** * @throws Exception If failed. */ + @Test public void testOptimistic() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PRIMARY_SYNC, 2); @@ -257,6 +268,7 @@ public void testOptimistic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOptimisticFullSync() throws Exception { CacheConfiguration ccfg = cacheConfiguration(FULL_SYNC, 2); @@ -270,6 +282,7 @@ public void testOptimisticFullSync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOptimisticFullSyncWithNearCache() throws Exception { CacheConfiguration ccfg = cacheConfiguration(FULL_SYNC, 2); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationNearEnabledTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationNearEnabledTest.java index 0684d1f579548..83138bcca8cdf 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationNearEnabledTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationNearEnabledTest.java @@ -40,12 +40,14 @@ public class CacheKeepBinaryIterationNearEnabledTest extends CacheKeepBinaryIter } /** {@inheritDoc} */ - @Override public void testMvccTxOnHeap() throws Exception { + @Override @Test + public void testMvccTxOnHeap() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-7187"); } /** {@inheritDoc} */ - @Override public void testMvccTxOnHeapLocalEntries() throws Exception { + @Override @Test + public void testMvccTxOnHeapLocalEntries() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-7187"); } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationStoreEnabledTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationStoreEnabledTest.java index 910ce4ab0b6c6..347b9fa961812 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationStoreEnabledTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationStoreEnabledTest.java @@ -51,12 +51,14 @@ public class CacheKeepBinaryIterationStoreEnabledTest extends CacheKeepBinaryIte } /** {@inheritDoc} */ - @Override public void testMvccTxOnHeap() throws Exception { + @Override @Test + public void testMvccTxOnHeap() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-8582"); } /** {@inheritDoc} */ - @Override public void testMvccTxOnHeapLocalEntries() throws Exception { + @Override @Test + public void testMvccTxOnHeapLocalEntries() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-8582"); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationTest.java index 842b6f4ef17a9..7e80d75c0761e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationTest.java @@ -81,6 +81,7 @@ public class CacheKeepBinaryIterationTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testAtomicOnHeap() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 1, ATOMIC); @@ -93,6 +94,7 @@ public void testAtomicOnHeap() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxOnHeap() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED,1, TRANSACTIONAL); @@ -105,6 +107,7 @@ public void testTxOnHeap() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccTxOnHeap() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED,1, TRANSACTIONAL_SNAPSHOT); @@ -117,6 +120,7 @@ public void testMvccTxOnHeap() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAtomicOnHeapLocalEntries() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 1, ATOMIC); @@ -129,6 +133,7 @@ public void testAtomicOnHeapLocalEntries() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxOnHeapLocalEntries() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 1, TRANSACTIONAL); @@ -141,6 +146,7 @@ public void testTxOnHeapLocalEntries() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccTxOnHeapLocalEntries() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 1, TRANSACTIONAL_SNAPSHOT); @@ -394,4 +400,4 @@ public QueryTestValue(Integer val) { return S.toString(QueryTestValue.class, this); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/ClientReconnectContinuousQueryTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/ClientReconnectContinuousQueryTest.java index 9ec25d343e48c..aa1e03bea485b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/ClientReconnectContinuousQueryTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/ClientReconnectContinuousQueryTest.java @@ -102,6 +102,7 @@ protected CacheAtomicityMode atomicityMode() { * * @throws Exception If failed. */ + @Test public void testClientReconnect() throws Exception { try { startGrids(2); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/ContinuousQueryMarshallerTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/ContinuousQueryMarshallerTest.java index 44dcc1cd63f4c..d54872afbc523 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/ContinuousQueryMarshallerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/ContinuousQueryMarshallerTest.java @@ -65,6 +65,7 @@ public class ContinuousQueryMarshallerTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRemoteFilterFactoryClient() throws Exception { check("server", "client"); } @@ -72,6 +73,7 @@ public void testRemoteFilterFactoryClient() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemoteFilterFactoryServer() throws Exception { check("server1", "server2"); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/ContinuousQueryPeerClassLoadingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/ContinuousQueryPeerClassLoadingTest.java index 73d8d0d99fe76..5def703fcab2d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/ContinuousQueryPeerClassLoadingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/ContinuousQueryPeerClassLoadingTest.java @@ -55,6 +55,7 @@ public class ContinuousQueryPeerClassLoadingTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testRemoteFilterFactoryClient() throws Exception { check("server", "client1", "client2"); } @@ -62,6 +63,7 @@ public void testRemoteFilterFactoryClient() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemoteFilterFactoryServer1() throws Exception { check("server1", "server2", "client"); } @@ -69,6 +71,7 @@ public void testRemoteFilterFactoryServer1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemoteFilterFactoryServer2() throws Exception { check("server1", "server2", "server3"); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/ContinuousQueryReassignmentTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/ContinuousQueryReassignmentTest.java index 2a537cab4d7a4..67607256f262d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/ContinuousQueryReassignmentTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/ContinuousQueryReassignmentTest.java @@ -63,6 +63,7 @@ public class ContinuousQueryReassignmentTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testContinuousQueryNotCalledOnReassignment() throws Exception { testContinuousQueryNotCalledOnReassignment(false); } @@ -70,6 +71,7 @@ public void testContinuousQueryNotCalledOnReassignment() throws Exception { /** * @throws Exception if failed. */ + @Test public void testLocalContinuousQueryNotCalledOnReassignment() throws Exception { testContinuousQueryNotCalledOnReassignment(true); } @@ -114,6 +116,7 @@ private void testContinuousQueryNotCalledOnReassignment(boolean loc) throws Exce /** * @throws Exception If failed. */ + @Test public void testContinuousQueryWithRemoteFilterNotCalledOnReassignment() throws Exception { Ignite lsnrNode = startGrid(1); Ignite victim = startGrid(2); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/ContinuousQueryRemoteFilterMissingInClassPathSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/ContinuousQueryRemoteFilterMissingInClassPathSelfTest.java index 226302ff9d616..a0444aa4fed64 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/ContinuousQueryRemoteFilterMissingInClassPathSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/ContinuousQueryRemoteFilterMissingInClassPathSelfTest.java @@ -97,6 +97,7 @@ public class ContinuousQueryRemoteFilterMissingInClassPathSelfTest extends GridC /** * @throws Exception If fail. */ + @Test public void testWarningMessageOnClientNode() throws Exception { ldr = new URLClassLoader(URLS, getClass().getClassLoader()); @@ -121,6 +122,7 @@ public void testWarningMessageOnClientNode() throws Exception { /** * @throws Exception If fail. */ + @Test public void testNoWarningMessageOnClientNode() throws Exception { ldr = new URLClassLoader(URLS, getClass().getClassLoader()); @@ -143,6 +145,7 @@ public void testNoWarningMessageOnClientNode() throws Exception { /** * @throws Exception If fail. */ + @Test public void testExceptionOnServerNode() throws Exception { ldr = new URLClassLoader(URLS, getClass().getClassLoader()); @@ -168,6 +171,7 @@ public void testExceptionOnServerNode() throws Exception { /** * @throws Exception If fail. */ + @Test public void testNoExceptionOnServerNode() throws Exception { ldr = new URLClassLoader(URLS, getClass().getClassLoader()); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java index a11b147945823..0f7103fc691b2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java @@ -265,6 +265,7 @@ protected void cacheRemove(IgniteCache cache, Integer key) { /** * @throws Exception If failed. */ + @Test public void testIllegalArguments() throws Exception { final ContinuousQuery q = new ContinuousQuery<>(); @@ -307,6 +308,7 @@ public void testIllegalArguments() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAllEntries() throws Exception { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -373,6 +375,7 @@ public void testAllEntries() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFilterException() throws Exception { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -399,6 +402,7 @@ public void testFilterException() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTwoQueryListener() throws Exception { if (cacheMode() == LOCAL) return; @@ -454,6 +458,7 @@ public void testTwoQueryListener() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBackupCleanerTaskFinalize() throws Exception { final String CACHE_NAME = "LOCAL_CACHE"; @@ -478,6 +483,7 @@ public void testBackupCleanerTaskFinalize() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRestartQuery() throws Exception { if (cacheMode() == LOCAL) return; @@ -531,6 +537,7 @@ public void testRestartQuery() throws Exception { /** * @throws Exception If failed. */ + @Test public void testEntriesByFilter() throws Exception { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -600,6 +607,7 @@ public void testEntriesByFilter() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLocalNodeOnly() throws Exception { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -671,6 +679,7 @@ public void testLocalNodeOnly() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBuffering() throws Exception { if (grid(0).cache(DEFAULT_CACHE_NAME).getConfiguration(CacheConfiguration.class).getCacheMode() != PARTITIONED) return; @@ -756,6 +765,7 @@ public void testBuffering() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTimeInterval() throws Exception { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -836,6 +846,7 @@ public void testTimeInterval() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInitialQuery() throws Exception { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -881,6 +892,7 @@ public void testInitialQuery() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInitialQueryAndUpdates() throws Exception { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -943,6 +955,7 @@ public void testInitialQueryAndUpdates() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLoadCache() throws Exception { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -976,6 +989,7 @@ public void testLoadCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInternalKey() throws Exception { if (atomicityMode() == ATOMIC) return; @@ -1016,6 +1030,7 @@ public void testInternalKey() throws Exception { * @throws Exception If failed. */ @SuppressWarnings("TryFinallyCanBeTryWithResources") + @Test public void testNodeJoinWithoutCache() throws Exception { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -1048,6 +1063,7 @@ public void testNodeJoinWithoutCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testEvents() throws Exception { final AtomicInteger cnt = new AtomicInteger(); final CountDownLatch latch = new CountDownLatch(50); @@ -1143,6 +1159,7 @@ public void testEvents() throws Exception { /** * @throws Exception If failed. */ + @Test public void testExpired() throws Exception { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME). withExpiryPolicy(new CreatedExpiryPolicy(new Duration(MILLISECONDS, 1000))); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAtomicSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAtomicSelfTest.java index 36754ec54dca8..f8e06b56fd55b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAtomicSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAtomicSelfTest.java @@ -37,7 +37,8 @@ public class GridCacheContinuousQueryAtomicSelfTest extends GridCacheContinuousQ } /** {@inheritDoc} */ - @Override public void testInternalKey() throws Exception { + @Override @Test + public void testInternalKey() throws Exception { // No-op. } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryConcurrentTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryConcurrentTest.java index 9dca5eaaa49e7..798de0dda453d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryConcurrentTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryConcurrentTest.java @@ -100,6 +100,7 @@ public class GridCacheContinuousQueryConcurrentTest extends GridCommonAbstractTe /** * @throws Exception If failed. */ + @Test public void testReplicatedTx() throws Exception { testRegistration(cacheConfiguration(CacheMode.REPLICATED, CacheAtomicityMode.TRANSACTIONAL, 1)); } @@ -107,6 +108,7 @@ public void testReplicatedTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReplicatedMvccTx() throws Exception { testRegistration(cacheConfiguration(CacheMode.REPLICATED, CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT, 1)); } @@ -114,6 +116,7 @@ public void testReplicatedMvccTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRestartReplicated() throws Exception { testRestartRegistration(cacheConfiguration(CacheMode.REPLICATED, CacheAtomicityMode.ATOMIC, 2)); } @@ -121,6 +124,7 @@ public void testRestartReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRestartPartition() throws Exception { testRestartRegistration(cacheConfiguration(CacheMode.PARTITIONED, CacheAtomicityMode.ATOMIC, 2)); } @@ -128,6 +132,7 @@ public void testRestartPartition() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRestartPartitionTx() throws Exception { testRestartRegistration(cacheConfiguration(CacheMode.PARTITIONED, CacheAtomicityMode.TRANSACTIONAL, 2)); } @@ -135,6 +140,7 @@ public void testRestartPartitionTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRestartPartitionMvccTx() throws Exception { testRestartRegistration(cacheConfiguration(CacheMode.PARTITIONED, CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT, 2)); } @@ -142,6 +148,7 @@ public void testRestartPartitionMvccTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReplicatedAtomic() throws Exception { testRegistration(cacheConfiguration(CacheMode.REPLICATED, CacheAtomicityMode.ATOMIC, 2)); } @@ -149,6 +156,7 @@ public void testReplicatedAtomic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPartitionTx() throws Exception { testRegistration(cacheConfiguration(CacheMode.PARTITIONED, CacheAtomicityMode.TRANSACTIONAL, 2)); } @@ -156,6 +164,7 @@ public void testPartitionTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPartitionMvccTx() throws Exception { testRegistration(cacheConfiguration(CacheMode.PARTITIONED, CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT, 2)); } @@ -163,6 +172,7 @@ public void testPartitionMvccTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPartitionAtomic() throws Exception { testRegistration(cacheConfiguration(CacheMode.PARTITIONED, CacheAtomicityMode.ATOMIC, 2)); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryMultiNodesFilteringTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryMultiNodesFilteringTest.java index d567dd9cff3fc..6a3518ee079ad 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryMultiNodesFilteringTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryMultiNodesFilteringTest.java @@ -89,6 +89,7 @@ public class GridCacheContinuousQueryMultiNodesFilteringTest extends GridCommonA } /** */ + @Test public void testFiltersAndListeners() throws Exception { for (int i = 1; i <= SERVER_GRIDS_COUNT; i++) startGrid(i, false); @@ -146,6 +147,7 @@ public void testFiltersAndListeners() throws Exception { /** * @throws Exception If failed. */ + @Test public void testWithNodeFilter() throws Exception { List qryCursors = new ArrayList<>(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryNodesFilteringTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryNodesFilteringTest.java index 1679b90a057bc..41f7eeb1cce8b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryNodesFilteringTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryNodesFilteringTest.java @@ -51,6 +51,7 @@ public class GridCacheContinuousQueryNodesFilteringTest extends GridCommonAbstra * * @throws Exception if failed. */ + @Test public void testNodeWithoutAttributeExclusion() throws Exception { try (Ignite node1 = startNodeWithCache()) { try (Ignite node2 = startGrid("node2", getConfiguration("node2", false, null))) { @@ -64,6 +65,7 @@ public void testNodeWithoutAttributeExclusion() throws Exception { * * @throws Exception if failed. */ + @Test public void testNodeWithAttributeFailure() throws Exception { try (Ignite node1 = startNodeWithCache()) { GridStringLogger log = new GridStringLogger(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryPartitionedOnlySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryPartitionedOnlySelfTest.java index 8cf26acb669e6..79664f3ca1443 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryPartitionedOnlySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryPartitionedOnlySelfTest.java @@ -42,7 +42,8 @@ public class GridCacheContinuousQueryPartitionedOnlySelfTest extends GridCacheCo } /** {@inheritDoc} */ - @Override public void testInternalKey() throws Exception { + @Override @Test + public void testInternalKey() throws Exception { // Disabled since data structures are not allowed in partitioned only mode. } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryReplicatedAtomicSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryReplicatedAtomicSelfTest.java index 4432eae0f3a26..fdf2f37696dcd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryReplicatedAtomicSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryReplicatedAtomicSelfTest.java @@ -31,7 +31,8 @@ public class GridCacheContinuousQueryReplicatedAtomicSelfTest extends GridCacheC } /** {@inheritDoc} */ - @Override public void testInternalKey() throws Exception { + @Override @Test + public void testInternalKey() throws Exception { // No-op. } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryReplicatedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryReplicatedSelfTest.java index 863bc804c1124..39f7e82144eff 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryReplicatedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryReplicatedSelfTest.java @@ -48,6 +48,7 @@ public class GridCacheContinuousQueryReplicatedSelfTest extends GridCacheContinu /** * @throws Exception If failed. */ + @Test public void testRemoteNodeCallback() throws Exception { IgniteCache cache1 = grid(0).cache(DEFAULT_CACHE_NAME); IgniteCache cache2 = grid(1).cache(DEFAULT_CACHE_NAME); @@ -87,6 +88,7 @@ public void testRemoteNodeCallback() throws Exception { * * @throws Exception If failed. */ + @Test public void testCrossCallback() throws Exception { // Prepare. IgniteCache cache1 = grid(0).cache(DEFAULT_CACHE_NAME); @@ -132,4 +134,4 @@ public void testCrossCallback() throws Exception { assert latch2.await(LATCH_TIMEOUT, MILLISECONDS); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryReplicatedTxOneNodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryReplicatedTxOneNodeTest.java index d761289e698f4..4e769b4ec0c9c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryReplicatedTxOneNodeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryReplicatedTxOneNodeTest.java @@ -87,6 +87,7 @@ protected CacheMode cacheMode() { /** * @throws Exception If failed. */ + @Test public void testLocal() throws Exception { if (cacheMode() == CacheMode.REPLICATED) doTest(true); @@ -95,6 +96,7 @@ public void testLocal() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDistributed() throws Exception { doTest(false); } @@ -102,6 +104,7 @@ public void testDistributed() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLocalOneNode() throws Exception { doTestOneNode(true); } @@ -109,6 +112,7 @@ public void testLocalOneNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDistributedOneNode() throws Exception { doTestOneNode(false); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryTxSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryTxSelfTest.java index 91b6b9ccdf309..c9529203d3648 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryTxSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryTxSelfTest.java @@ -43,7 +43,8 @@ public class GridCacheContinuousQueryTxSelfTest extends GridCacheContinuousQuery } /** {@inheritDoc} */ - @Override public void testInternalKey() throws Exception { + @Override @Test + public void testInternalKey() throws Exception { // No-op. } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryBackupQueueTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryBackupQueueTest.java index a8f0d71cede3c..824fec9fc86df 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryBackupQueueTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryBackupQueueTest.java @@ -130,6 +130,7 @@ protected CacheAtomicityMode atomicityMode() { /** * @throws Exception If failed. */ + @Test public void testBackupQueue() throws Exception { final CacheEventListener lsnr = new CacheEventListener(); @@ -153,6 +154,7 @@ public void testBackupQueue() throws Exception { /** * @throws Exception If failed. */ + @Test public void testManyQueryBackupQueue() throws Exception { List qryCursors = new ArrayList<>(); @@ -185,6 +187,7 @@ public void testManyQueryBackupQueue() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBackupQueueAutoUnsubscribeFalse() throws Exception { try { client = true; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryClientReconnectTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryClientReconnectTest.java index 906cc7d8d190c..3a76cf4ba14eb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryClientReconnectTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryClientReconnectTest.java @@ -75,6 +75,7 @@ protected CacheAtomicityMode atomicMode() { /** * @throws Exception If failed. */ + @Test public void testReconnectClient() throws Exception { Ignite client = grid(serverCount()); @@ -118,6 +119,7 @@ public void testReconnectClient() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReconnectClientAndLeftRouter() throws Exception { if (!tcpDiscovery()) return; @@ -187,4 +189,4 @@ private static class CacheEventListener implements CacheEntryUpdatedListener cache = jcache(); @@ -181,6 +182,7 @@ public void testWriteThrough() throws Exception { } /** @throws Exception If test failed. */ + @Test public void testReadThrough() throws Exception { IgniteCache cache = jcache(); @@ -273,6 +275,7 @@ public void testReadThrough() throws Exception { } /** @throws Exception If failed. */ + @Test public void testMultithreaded() throws Exception { final ConcurrentMap> perThread = new ConcurrentHashMap<>(); @@ -357,4 +360,4 @@ private void checkLastMethod(@Nullable String mtd) { } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStoreMultithreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStoreMultithreadedSelfTest.java index 4fce452a327f1..11865aaae0b2d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStoreMultithreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStoreMultithreadedSelfTest.java @@ -33,6 +33,7 @@ public class GridCacheWriteBehindStoreMultithreadedSelfTest extends GridCacheWri * * @throws Exception If failed. */ + @Test public void testPutGetRemoveWithCoalescing() throws Exception { testPutGetRemove(true); } @@ -42,6 +43,7 @@ public void testPutGetRemoveWithCoalescing() throws Exception { * * @throws Exception If failed. */ + @Test public void testPutGetRemoveWithoutCoalescing() throws Exception { testPutGetRemove(false); } @@ -86,6 +88,7 @@ private void testPutGetRemove(boolean writeCoalescing) throws Exception { * * @throws Exception if failed. */ + @Test public void testStoreFailureWithCoalescing() throws Exception { testStoreFailure(true); } @@ -95,6 +98,7 @@ public void testStoreFailureWithCoalescing() throws Exception { * * @throws Exception if failed. */ + @Test public void testStoreFailureWithoutCoalescing() throws Exception { testStoreFailure(false); } @@ -162,6 +166,7 @@ private void testStoreFailure(boolean writeCoalescing) throws Exception { * * @throws Exception If failed. */ + @Test public void testFlushFromTheSameThreadWithCoalescing() throws Exception { testFlushFromTheSameThread(true); } @@ -172,6 +177,7 @@ public void testFlushFromTheSameThreadWithCoalescing() throws Exception { * * @throws Exception If failed. */ + @Test public void testFlushFromTheSameThreadWithoutCoalescing() throws Exception { testFlushFromTheSameThread(false); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStorePartitionedMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStorePartitionedMultiNodeSelfTest.java index d60dc4a5c2097..137f7605e247e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStorePartitionedMultiNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStorePartitionedMultiNodeSelfTest.java @@ -122,6 +122,7 @@ private void prepare() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSingleWritesOnDhtNode() throws Exception { checkSingleWrites(); } @@ -129,6 +130,7 @@ public void testSingleWritesOnDhtNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBatchWritesOnDhtNode() throws Exception { checkBatchWrites(); } @@ -136,6 +138,7 @@ public void testBatchWritesOnDhtNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxWritesOnDhtNode() throws Exception { checkTxWrites(); } @@ -221,4 +224,4 @@ private void checkWrites() throws IgniteInterruptedCheckedException { for (int i = 0; i < 100; i++) assertTrue(allKeys.contains(i)); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStoreSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStoreSelfTest.java index 33bbfdc1504f2..a765f23adfdd8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStoreSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStoreSelfTest.java @@ -39,6 +39,7 @@ public class GridCacheWriteBehindStoreSelfTest extends GridCacheWriteBehindStore * * @throws Exception If failed. */ + @Test public void testShutdownWithFailureWithCoalescing() throws Exception { testShutdownWithFailure(true); } @@ -48,6 +49,7 @@ public void testShutdownWithFailureWithCoalescing() throws Exception { * * @throws Exception If failed. */ + @Test public void testShutdownWithFailureWithoutCoalescing() throws Exception { testShutdownWithFailure(false); } @@ -93,6 +95,7 @@ private void testShutdownWithFailure(final boolean writeCoalescing) throws Excep * * @throws Exception If failed. */ + @Test public void testSimpleStoreWithCoalescing() throws Exception { testSimpleStore(true); } @@ -102,6 +105,7 @@ public void testSimpleStoreWithCoalescing() throws Exception { * * @throws Exception If failed. */ + @Test public void testSimpleStoreWithoutCoalescing() throws Exception { testSimpleStore(false); } @@ -112,6 +116,7 @@ public void testSimpleStoreWithoutCoalescing() throws Exception { * * @throws Exception If failed. */ + @Test public void testSimpleStoreFlushFrequencyWithoutCoalescing() throws Exception { initStore(1, false); @@ -177,6 +182,7 @@ private void testSimpleStore(boolean writeCoalescing) throws Exception { * * @throws Exception If failed. */ + @Test public void testValuePropagationWithCoalescing() throws Exception { testValuePropagation(true); } @@ -187,6 +193,7 @@ public void testValuePropagationWithCoalescing() throws Exception { * * @throws Exception If failed. */ + @Test public void testValuePropagationWithoutCoalescing() throws Exception { testValuePropagation(false); } @@ -233,6 +240,7 @@ private void testValuePropagation(boolean writeCoalescing) throws Exception { * * @throws Exception If failed. */ + @Test public void testContinuousPutWithCoalescing() throws Exception { testContinuousPut(true); } @@ -242,6 +250,7 @@ public void testContinuousPutWithCoalescing() throws Exception { * * @throws Exception If failed. */ + @Test public void testContinuousPutWithoutCoalescing() throws Exception { testContinuousPut(false); } @@ -318,6 +327,7 @@ private void testContinuousPut(boolean writeCoalescing) throws Exception { * * @throws Exception If failed. */ + @Test public void testShutdownWithCoalescing() throws Exception { testShutdown(true); } @@ -328,6 +338,7 @@ public void testShutdownWithCoalescing() throws Exception { * * @throws Exception If failed. */ + @Test public void testShutdownWithoutCoalescing() throws Exception { testShutdown(false); } @@ -387,6 +398,7 @@ private void testShutdown(boolean writeCoalescing) throws Exception { * * @throws Exception If failed. */ + @Test public void testBatchApplyWithCoalescing() throws Exception { testBatchApply(true); } @@ -397,6 +409,7 @@ public void testBatchApplyWithCoalescing() throws Exception { * * @throws Exception If failed. */ + @Test public void testBatchApplyWithoutCoalescing() throws Exception { testBatchApply(false); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/IgniteCacheWriteBehindNoUpdateSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/IgniteCacheWriteBehindNoUpdateSelfTest.java index ce26c2ce96b5d..0366bfb68ed11 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/IgniteCacheWriteBehindNoUpdateSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/IgniteCacheWriteBehindNoUpdateSelfTest.java @@ -83,6 +83,7 @@ public class IgniteCacheWriteBehindNoUpdateSelfTest extends GridCommonAbstractTe /** * @throws Exception If failed. */ + @Test public void testEntryProcessorNoUpdate() throws Exception { IgniteCache cache = ignite(0).cache(THROTTLES_CACHE_NAME); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/IgnteCacheClientWriteBehindStoreAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/IgnteCacheClientWriteBehindStoreAbstractTest.java index 23bb781327bcd..3c53cb167f189 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/IgnteCacheClientWriteBehindStoreAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/IgnteCacheClientWriteBehindStoreAbstractTest.java @@ -91,6 +91,7 @@ public abstract class IgnteCacheClientWriteBehindStoreAbstractTest extends Ignit /** * @throws Exception If failed. */ + @Test public void testClientWithoutStore() throws Exception { Ignite client = grid(2); @@ -111,4 +112,4 @@ public void testClientWithoutStore() throws Exception { assertEquals(1000, storeMap.size()); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/IgnteCacheClientWriteBehindStoreNonCoalescingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/IgnteCacheClientWriteBehindStoreNonCoalescingTest.java index dd8d81013604a..4a84db322699a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/IgnteCacheClientWriteBehindStoreNonCoalescingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/IgnteCacheClientWriteBehindStoreNonCoalescingTest.java @@ -80,6 +80,7 @@ public class IgnteCacheClientWriteBehindStoreNonCoalescingTest extends IgniteCac /** * @throws Exception If failed. */ + @Test public void testNonCoalescingIncrementing() throws Exception { Ignite ignite = grid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/AtomicOperationsInTxTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/AtomicOperationsInTxTest.java index b58dbe00df7bc..b808c82791ad7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/AtomicOperationsInTxTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/AtomicOperationsInTxTest.java @@ -71,6 +71,7 @@ public class AtomicOperationsInTxTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testEnablingAtomicOperationDuringTransaction() throws Exception { GridTestUtils.assertThrows(log, (Callable)() -> { try (Transaction tx = grid(0).transactions().txStart()) { @@ -85,6 +86,7 @@ public void testEnablingAtomicOperationDuringTransaction() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAllowedAtomicOperations() throws Exception { checkOperations(true); } @@ -92,6 +94,7 @@ public void testAllowedAtomicOperations() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNotAllowedAtomicOperations() throws Exception { checkOperations(false); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/DepthFirstSearchTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/DepthFirstSearchTest.java index 3d1064cddc695..3934ea88aee87 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/DepthFirstSearchTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/DepthFirstSearchTest.java @@ -62,6 +62,7 @@ public class DepthFirstSearchTest extends TestCase { /** * @throws Exception If failed. */ + @Test public void testNoCycle() throws Exception { assertNull(findCycle(Collections.>emptyMap(), T1)); @@ -115,6 +116,7 @@ public void testNoCycle() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFindCycle2() throws Exception { Map> wfg = new HashMap>() {{ put(T1, Collections.singleton(T2)); @@ -180,6 +182,7 @@ public void testFindCycle2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFindCycle3() throws Exception { Map> wfg = new HashMap>() {{ put(T1, Collections.singleton(T2)); @@ -240,6 +243,7 @@ public void testFindCycle3() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFindCycle4() throws Exception { Map> wfg = new HashMap>() {{ put(T1, Collections.singleton(T2)); @@ -255,6 +259,7 @@ public void testFindCycle4() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRandomNoExceptions() throws Exception { int maxNodesCnt = 100; int minNodesCnt = 10; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TransactionIntegrityWithPrimaryIndexCorruptionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TransactionIntegrityWithPrimaryIndexCorruptionTest.java index fd31ee5e78f56..ba07d4cb71327 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TransactionIntegrityWithPrimaryIndexCorruptionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TransactionIntegrityWithPrimaryIndexCorruptionTest.java @@ -52,61 +52,73 @@ public class TransactionIntegrityWithPrimaryIndexCorruptionTest extends Abstract } /** */ + @Test public void testPrimaryIndexCorruptionDuringCommitPrimaryColocatedThrowsError() throws Exception { doTestTransferAmount0(true, true, () -> new AssertionError("Test")); } /** */ + @Test public void testPrimaryIndexCorruptionDuringCommitPrimaryColocatedThrowsUnchecked() throws Exception { doTestTransferAmount0(true, true, () -> new RuntimeException("Test")); } /** */ + @Test public void testPrimaryIndexCorruptionDuringCommitPrimaryColocatedThrowsChecked() throws Exception { doTestTransferAmount0(true, true, () -> new IgniteCheckedException("Test")); } /** */ + @Test public void testPrimaryIndexCorruptionDuringCommitPrimaryNonColocatedThrowsError() throws Exception { doTestTransferAmount0(false, true, () -> new AssertionError("Test")); } /** */ + @Test public void testPrimaryIndexCorruptionDuringCommitPrimaryNonColocatedThrowsUnchecked() throws Exception { doTestTransferAmount0(false, true, () -> new RuntimeException("Test")); } /** */ + @Test public void testPrimaryIndexCorruptionDuringCommitPrimaryNonColocatedThrowsChecked() throws Exception { doTestTransferAmount0(false, true, () -> new IgniteCheckedException("Test")); } /** */ + @Test public void testPrimaryIndexCorruptionDuringCommitBackupColocatedThrowsError() throws Exception { doTestTransferAmount0(true, false, () -> new AssertionError("Test")); } /** */ + @Test public void testPrimaryIndexCorruptionDuringCommitBackupColocatedThrowsUnchecked() throws Exception { doTestTransferAmount0(true, false, () -> new RuntimeException("Test")); } /** */ + @Test public void testPrimaryIndexCorruptionDuringCommitBackupColocatedThrowsChecked() throws Exception { doTestTransferAmount0(true, false, () -> new IgniteCheckedException("Test")); } /** */ + @Test public void testPrimaryIndexCorruptionDuringCommitBackupNonColocatedThrowsError() throws Exception { doTestTransferAmount0(false, false, () -> new AssertionError("Test")); } /** */ + @Test public void testPrimaryIndexCorruptionDuringCommitBackupNonColocatedThrowsUnchecked() throws Exception { doTestTransferAmount0(false, false, () -> new RuntimeException("Test")); } /** */ + @Test public void testPrimaryIndexCorruptionDuringCommitBackupNonColocatedThrowsChecked() throws Exception { doTestTransferAmount0(false, false, () -> new IgniteCheckedException("Test")); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TransactionIntegrityWithSystemWorkerDeathTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TransactionIntegrityWithSystemWorkerDeathTest.java index 551335f2fee6f..a65bd4539d797 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TransactionIntegrityWithSystemWorkerDeathTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TransactionIntegrityWithSystemWorkerDeathTest.java @@ -42,6 +42,7 @@ public class TransactionIntegrityWithSystemWorkerDeathTest extends AbstractTrans } /** */ + @Test public void testFailoverWithDiscoWorkerTermination() throws Exception { doTestTransferAmount(new FailoverScenario() { static final int failedNodeIdx = 1; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDataConsistencyOnCommitFailureTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDataConsistencyOnCommitFailureTest.java index 881c6804255df..f472102cb1518 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDataConsistencyOnCommitFailureTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDataConsistencyOnCommitFailureTest.java @@ -81,6 +81,7 @@ public class TxDataConsistencyOnCommitFailureTest extends GridCommonAbstractTest } /** */ + @Test public void testCommitErrorOnNearNode2PC() throws Exception { nodesCnt = 3; @@ -97,6 +98,7 @@ public void testCommitErrorOnNearNode2PC() throws Exception { } /** */ + @Test public void testCommitErrorOnNearNode1PC() throws Exception { nodesCnt = 2; @@ -114,6 +116,7 @@ public void testCommitErrorOnNearNode1PC() throws Exception { /** */ @IgniteIgnore(value = "https://issues.apache.org/jira/browse/IGNITE-9806", forceFailure = false) + @Test public void testCommitErrorOnColocatedNode2PC() throws Exception { nodesCnt = 3; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockCauseTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockCauseTest.java index 8f5ee30c44e67..2680d0778d30f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockCauseTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockCauseTest.java @@ -84,6 +84,7 @@ public class TxDeadlockCauseTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCause() throws Exception { startGrids(1); @@ -96,6 +97,7 @@ public void testCause() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCauseSeveralNodes() throws Exception { startGrids(2); @@ -108,6 +110,7 @@ public void testCauseSeveralNodes() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCauseNear() throws Exception { ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME) .setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL) @@ -124,6 +127,7 @@ public void testCauseNear() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCauseSeveralNodesNear() throws Exception { ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME) .setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL) @@ -146,6 +150,7 @@ public void testCauseSeveralNodesNear() throws Exception { * instead of {@link IgniteCache#get(java.lang.Object)} and {@link IgniteCache#put(java.lang.Object, java.lang.Object)} operations sequence. * @throws Exception If failed. */ + @Test public void testCauseObject(int nodes, final int keysCnt, final long timeout, final TransactionIsolation isolation, final boolean oneOp) throws Exception { final Ignite ignite = grid(new Random().nextInt(nodes)); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionMessageMarshallingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionMessageMarshallingTest.java index 1609f0efbe122..7fe9786d67bae 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionMessageMarshallingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionMessageMarshallingTest.java @@ -56,6 +56,7 @@ public class TxDeadlockDetectionMessageMarshallingTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + @Test public void testMessageUnmarshallWithoutCacheContext() throws Exception { try { Ignite ignite = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionNoHangsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionNoHangsTest.java index 3f1639a5edf02..ebd9e65c6bdcb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionNoHangsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionNoHangsTest.java @@ -105,6 +105,7 @@ public class TxDeadlockDetectionNoHangsTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testNoHangsPessimistic() throws Exception { assertTrue(grid(0).context().cache().context().tm().deadlockDetectionEnabled()); @@ -126,6 +127,7 @@ public void testNoHangsPessimistic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNoHangsOptimistic() throws Exception { assertTrue(grid(0).context().cache().context().tm().deadlockDetectionEnabled()); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionTest.java index 6cf65c8fd4f33..41112a115e557 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionTest.java @@ -102,6 +102,7 @@ public class TxDeadlockDetectionTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testNoHangs() throws Exception { final AtomicBoolean stop = new AtomicBoolean(); @@ -182,6 +183,7 @@ public void testNoHangs() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNoDeadlockSimple() throws Exception { final AtomicInteger threadCnt = new AtomicInteger(); @@ -236,6 +238,7 @@ public void testNoDeadlockSimple() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNoDeadlock() throws Exception { for (int i = 2; i <= 10; i++) { final int threads = i; @@ -310,6 +313,7 @@ public void testNoDeadlock() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFailedTxLocksRequest() throws Exception { doTestFailedMessage(TxLocksRequest.class); } @@ -317,6 +321,7 @@ public void testFailedTxLocksRequest() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFailedTxLocksResponse() throws Exception { doTestFailedMessage(TxLocksResponse.class); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionUnmasrhalErrorsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionUnmasrhalErrorsTest.java index 0cadafefe31be..6711c6a62cc9c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionUnmasrhalErrorsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionUnmasrhalErrorsTest.java @@ -86,6 +86,7 @@ public class TxDeadlockDetectionUnmasrhalErrorsTest extends GridCommonAbstractTe /** * @throws Exception If failed. */ + @Test public void testDeadlockCacheObjectContext() throws Exception { IgniteCache cache0 = null; IgniteCache cache1 = null; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxLabelTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxLabelTest.java index 50b107d042e6f..8d70c30c15ef0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxLabelTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxLabelTest.java @@ -42,6 +42,7 @@ public class TxLabelTest extends GridCommonAbstractTest { /** * Tests transaction labels. */ + @Test public void testLabel() { testLabel0(grid(0), "lbl0"); testLabel0(grid(0), "lbl1"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxMultiCacheAsyncOpsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxMultiCacheAsyncOpsTest.java index 89f20ec52b4fd..4030d3869920d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxMultiCacheAsyncOpsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxMultiCacheAsyncOpsTest.java @@ -77,6 +77,7 @@ private CacheConfiguration cacheConfiguration(int idx) { /** * */ + @Test public void testCommitAfterAsyncPut() { CacheConfiguration[] caches = cacheConfigurations(); @@ -106,6 +107,7 @@ public void testCommitAfterAsyncPut() { /** * */ + @Test public void testCommitAfterAsyncGet() { CacheConfiguration[] caches = cacheConfigurations(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOnCachesStartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOnCachesStartTest.java index 24044040cac8b..dd138bb5c0034 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOnCachesStartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOnCachesStartTest.java @@ -73,6 +73,7 @@ public class TxOnCachesStartTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testTransactionCloseOnCachesStartAndStop() throws Exception { Ignite srv = startGrids(5); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticDeadlockDetectionCrossCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticDeadlockDetectionCrossCacheTest.java index 056b093f7fba6..96759f758cef5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticDeadlockDetectionCrossCacheTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticDeadlockDetectionCrossCacheTest.java @@ -83,6 +83,7 @@ public class TxOptimisticDeadlockDetectionCrossCacheTest extends GridCommonAbstr /** * @throws Exception If failed. */ + @Test public void testDeadlock() throws Exception { startGrids(2); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticDeadlockDetectionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticDeadlockDetectionTest.java index 182b1c2befa9c..595cb21ab1a4f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticDeadlockDetectionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticDeadlockDetectionTest.java @@ -130,6 +130,7 @@ public class TxOptimisticDeadlockDetectionTest extends AbstractDeadlockDetection /** * @throws Exception If failed. */ + @Test public void testDeadlocksPartitioned() throws Exception { for (CacheWriteSynchronizationMode syncMode : CacheWriteSynchronizationMode.values()) { doTestDeadlocks(createCache(PARTITIONED, syncMode, false), ORDINAL_START_KEY); @@ -140,6 +141,7 @@ public void testDeadlocksPartitioned() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeadlocksPartitionedNear() throws Exception { for (CacheWriteSynchronizationMode syncMode : CacheWriteSynchronizationMode.values()) { doTestDeadlocks(createCache(PARTITIONED, syncMode, true), ORDINAL_START_KEY); @@ -150,6 +152,7 @@ public void testDeadlocksPartitionedNear() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeadlocksReplicated() throws Exception { for (CacheWriteSynchronizationMode syncMode : CacheWriteSynchronizationMode.values()) { doTestDeadlocks(createCache(REPLICATED, syncMode, false), ORDINAL_START_KEY); @@ -160,6 +163,7 @@ public void testDeadlocksReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeadlocksPartitionedNearTxOnPrimary() throws Exception { for (CacheWriteSynchronizationMode syncMode : CacheWriteSynchronizationMode.values()) { doTestDeadlocksTxOnPrimary(createCache(PARTITIONED, syncMode, true), ORDINAL_START_KEY); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticOnPartitionExchangeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticOnPartitionExchangeTest.java index 369e75506b69f..9b353242965c1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticOnPartitionExchangeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticOnPartitionExchangeTest.java @@ -106,6 +106,7 @@ public class TxOptimisticOnPartitionExchangeTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testConsistencyOnPartitionExchange() throws Exception { doTest(SERIALIZABLE, true); doTest(READ_COMMITTED, true); @@ -312,4 +313,4 @@ private void sendMessage( super.sendMessage(node, msg, ackC); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticPrepareOnUnstableTopologyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticPrepareOnUnstableTopologyTest.java index cbdcffede5770..3d94801b9fa9d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticPrepareOnUnstableTopologyTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticPrepareOnUnstableTopologyTest.java @@ -90,6 +90,7 @@ public class TxOptimisticPrepareOnUnstableTopologyTest extends GridCommonAbstrac /** * */ + @Test public void testPrepareOnUnstableTopology() throws Exception { for (TransactionIsolation isolation : TransactionIsolation.values()) { doPrepareOnUnstableTopology(4, false, isolation, 0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxPessimisticDeadlockDetectionCrossCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxPessimisticDeadlockDetectionCrossCacheTest.java index b6bd7fbf4f093..c9f06df59c80b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxPessimisticDeadlockDetectionCrossCacheTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxPessimisticDeadlockDetectionCrossCacheTest.java @@ -75,6 +75,7 @@ public class TxPessimisticDeadlockDetectionCrossCacheTest extends GridCommonAbst /** * @throws Exception If failed. */ + @Test public void testDeadlockNoNear() throws Exception { doTestDeadlock(false, false); } @@ -82,6 +83,7 @@ public void testDeadlockNoNear() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeadlockOneNear() throws Exception { doTestDeadlock(false, true); } @@ -89,6 +91,7 @@ public void testDeadlockOneNear() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeadlockAnotherNear() throws Exception { doTestDeadlock(true, false); doTestDeadlock(false, true); @@ -97,6 +100,7 @@ public void testDeadlockAnotherNear() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeadlockBothNear() throws Exception { doTestDeadlock(true, true); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxPessimisticDeadlockDetectionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxPessimisticDeadlockDetectionTest.java index 77d3725bab442..06da617348058 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxPessimisticDeadlockDetectionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxPessimisticDeadlockDetectionTest.java @@ -118,6 +118,7 @@ public class TxPessimisticDeadlockDetectionTest extends AbstractDeadlockDetectio /** * @throws Exception If failed. */ + @Test public void testDeadlocksPartitioned() throws Exception { for (CacheWriteSynchronizationMode syncMode : CacheWriteSynchronizationMode.values()) { doTestDeadlocks(createCache(PARTITIONED, syncMode, false), ORDINAL_START_KEY); @@ -128,6 +129,7 @@ public void testDeadlocksPartitioned() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeadlocksPartitionedNear() throws Exception { for (CacheWriteSynchronizationMode syncMode : CacheWriteSynchronizationMode.values()) { doTestDeadlocks(createCache(PARTITIONED, syncMode, true), ORDINAL_START_KEY); @@ -138,6 +140,7 @@ public void testDeadlocksPartitionedNear() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeadlocksReplicated() throws Exception { for (CacheWriteSynchronizationMode syncMode : CacheWriteSynchronizationMode.values()) { doTestDeadlocks(createCache(REPLICATED, syncMode, false), ORDINAL_START_KEY); @@ -148,6 +151,7 @@ public void testDeadlocksReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeadlocksLocal() throws Exception { for (CacheWriteSynchronizationMode syncMode : CacheWriteSynchronizationMode.values()) { IgniteCache cache = null; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackAsyncTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackAsyncTest.java index 612d6cebb1d3d..08541c771ace5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackAsyncTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackAsyncTest.java @@ -220,6 +220,7 @@ private Ignite startClient() throws Exception { /** * */ + @Test public void testRollbackSimple() throws Exception { startClient(); @@ -324,6 +325,7 @@ private void testRollbackSimple0(Ignite near) throws Exception { /** * */ + @Test public void testSynchronousRollback() throws Exception { Ignite client = startClient(); @@ -474,6 +476,7 @@ private void testSynchronousRollback0(Ignite holdLockNode, final Ignite tryLockN /** * */ + @Test public void testEnlistManyRead() throws Exception { testEnlistMany(false, REPEATABLE_READ, PESSIMISTIC); } @@ -481,6 +484,7 @@ public void testEnlistManyRead() throws Exception { /** * */ + @Test public void testEnlistManyWrite() throws Exception { testEnlistMany(true, REPEATABLE_READ, PESSIMISTIC); } @@ -488,6 +492,7 @@ public void testEnlistManyWrite() throws Exception { /** * */ + @Test public void testEnlistManyReadOptimistic() throws Exception { testEnlistMany(false, SERIALIZABLE, OPTIMISTIC); } @@ -495,6 +500,7 @@ public void testEnlistManyReadOptimistic() throws Exception { /** * */ + @Test public void testEnlistManyWriteOptimistic() throws Exception { testEnlistMany(true, SERIALIZABLE, OPTIMISTIC); } @@ -539,6 +545,7 @@ private void testEnlistMany(boolean write, TransactionIsolation isolation, /** * Rollback tx while near lock request is delayed. */ + @Test public void testRollbackDelayNearLockRequest() throws Exception { final Ignite client = startClient(); @@ -579,6 +586,7 @@ public void testRollbackDelayNearLockRequest() throws Exception { /** * Tests rollback with concurrent commit. */ + @Test public void testRollbackDelayFinishRequest() throws Exception { final Ignite client = startClient(); @@ -638,6 +646,7 @@ public void testRollbackDelayFinishRequest() throws Exception { /** * */ + @Test public void testMixedAsyncRollbackTypes() throws Exception { final Ignite client = startClient(); @@ -818,6 +827,7 @@ public void testMixedAsyncRollbackTypes() throws Exception { /** * Tests proxy object returned by {@link IgniteTransactions#localActiveTransactions()} */ + @Test public void testRollbackProxy() throws Exception { final CountDownLatch keyLocked = new CountDownLatch(1); @@ -906,6 +916,7 @@ public void testRollbackProxy() throws Exception { /** * */ + @Test public void testRollbackOnTopologyLockPessimistic() throws Exception { final Ignite client = startClient(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnIncorrectParamsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnIncorrectParamsTest.java index 75b76257cc8fb..91b32d405a86b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnIncorrectParamsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnIncorrectParamsTest.java @@ -51,6 +51,7 @@ public class TxRollbackOnIncorrectParamsTest extends GridCommonAbstractTest { /** * */ + @Test public void testTimeoutSetLocalGuarantee() throws Exception { Ignite ignite = startGrid(0); @@ -103,6 +104,7 @@ public void testTimeoutSetLocalGuarantee() throws Exception { /** * */ + @Test public void testLabelFilledLocalGuarantee() throws Exception { Ignite ignite = startGrid(0); @@ -142,6 +144,7 @@ public void testLabelFilledLocalGuarantee() throws Exception { /** * */ + @Test public void testLabelFilledRemoteGuarantee() throws Exception { Ignite ignite = startGrid(0); Ignite remote = startGrid(1); @@ -202,6 +205,7 @@ public void testLabelFilledRemoteGuarantee() throws Exception { /** * */ + @Test public void testTimeoutSetRemoteGuarantee() throws Exception { Ignite ignite = startGrid(0); Ignite remote = startGrid(1); @@ -264,6 +268,7 @@ public void testTimeoutSetRemoteGuarantee() throws Exception { /** * */ + @Test public void testRollbackInsideLocalListenerAfterRemoteFilter() throws Exception { Ignite ignite = startGrid(0); Ignite remote = startGrid(1); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTimeoutOnePhaseCommitTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTimeoutOnePhaseCommitTest.java index 2375d9ed03231..3298b10cefa52 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTimeoutOnePhaseCommitTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTimeoutOnePhaseCommitTest.java @@ -98,16 +98,19 @@ public class TxRollbackOnTimeoutOnePhaseCommitTest extends GridCommonAbstractTes } /** */ + @Test public void testRollbackOnTimeoutPartitionDesyncPessimistic() throws Exception { doTestRollbackOnTimeoutPartitionDesync(PESSIMISTIC); } /** */ + @Test public void testRollbackOnTimeoutPartitionDesyncOptimistic() throws Exception { doTestRollbackOnTimeoutPartitionDesync(OPTIMISTIC); } /** */ + @Test public void testUnlockOptimistic() throws IgniteCheckedException { IgniteEx client = grid("client"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTimeoutTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTimeoutTest.java index 0ae15b0e5c007..c1c2d7b209c86 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTimeoutTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTimeoutTest.java @@ -181,6 +181,7 @@ protected void validateDeadlockException(Exception e) { /** * @throws Exception If failed. */ + @Test public void testLockAndConcurrentTimeout() throws Exception { startClient(); @@ -248,6 +249,7 @@ private void lock(final Ignite node, final boolean retry) throws Exception { * * @throws Exception If failed. */ + @Test public void testWaitingTxUnblockedOnTimeout() throws Exception { waitingTxUnblockedOnTimeout(grid(0), grid(0)); @@ -271,6 +273,7 @@ public void testWaitingTxUnblockedOnTimeout() throws Exception { * * @throws Exception If failed. */ + @Test public void testWaitingTxUnblockedOnThreadDeath() throws Exception { waitingTxUnblockedOnThreadDeath(grid(0), grid(0)); @@ -294,6 +297,7 @@ public void testWaitingTxUnblockedOnThreadDeath() throws Exception { * * @throws Exception If failed. */ + @Test public void testDeadlockUnblockedOnTimeout() throws Exception { deadlockUnblockedOnTimeout(ignite(0), ignite(1)); @@ -372,6 +376,7 @@ private void deadlockUnblockedOnTimeout(final Ignite node1, final Ignite node2) * * @throws Exception If failed. */ + @Test public void testTimeoutRemoval() throws Exception { IgniteEx client = (IgniteEx)startClient(); @@ -403,6 +408,7 @@ public void testTimeoutRemoval() throws Exception { * * @throws Exception If failed. */ + @Test public void testSimple() throws Exception { for (TransactionConcurrency concurrency : TransactionConcurrency.values()) for (TransactionIsolation isolation : TransactionIsolation.values()) { @@ -414,6 +420,7 @@ public void testSimple() throws Exception { /** * Test timeouts with random values and different tx configurations. */ + @Test public void testRandomMixedTxConfigurations() throws Exception { final Ignite client = startClient(); @@ -518,6 +525,7 @@ public void testRandomMixedTxConfigurations() throws Exception { * * @throws Exception If failed. */ + @Test public void testTimeoutOnPrimaryDHTNode() throws Exception { final ClusterNode n0 = grid(0).affinity(CACHE_NAME).mapKeyToNode(0); @@ -532,6 +540,7 @@ public void testTimeoutOnPrimaryDHTNode() throws Exception { /** * */ + @Test public void testLockRelease() throws Exception { final Ignite client = startClient(); @@ -593,6 +602,7 @@ public void testLockRelease() throws Exception { /** * */ + @Test public void testEnlistManyRead() throws Exception { testEnlistMany(false); } @@ -600,6 +610,7 @@ public void testEnlistManyRead() throws Exception { /** * */ + @Test public void testEnlistManyWrite() throws Exception { testEnlistMany(true); } @@ -607,6 +618,7 @@ public void testEnlistManyWrite() throws Exception { /** * */ + @Test public void testRollbackOnTimeoutTxRemapOptimisticReadCommitted() throws Exception { doTestRollbackOnTimeoutTxRemap(OPTIMISTIC, READ_COMMITTED, true); } @@ -614,6 +626,7 @@ public void testRollbackOnTimeoutTxRemapOptimisticReadCommitted() throws Excepti /** * */ + @Test public void testRollbackOnTimeoutTxRemapOptimisticRepeatableRead() throws Exception { doTestRollbackOnTimeoutTxRemap(OPTIMISTIC, REPEATABLE_READ, true); } @@ -621,6 +634,7 @@ public void testRollbackOnTimeoutTxRemapOptimisticRepeatableRead() throws Except /** * */ + @Test public void testRollbackOnTimeoutTxRemapOptimisticSerializable() throws Exception { doTestRollbackOnTimeoutTxRemap(OPTIMISTIC, SERIALIZABLE, true); } @@ -628,6 +642,7 @@ public void testRollbackOnTimeoutTxRemapOptimisticSerializable() throws Exceptio /** * */ + @Test public void testRollbackOnTimeoutTxRemapPessimisticReadCommitted() throws Exception { doTestRollbackOnTimeoutTxRemap(PESSIMISTIC, READ_COMMITTED, true); } @@ -635,6 +650,7 @@ public void testRollbackOnTimeoutTxRemapPessimisticReadCommitted() throws Except /** * */ + @Test public void testRollbackOnTimeoutTxRemapPessimisticRepeatableRead() throws Exception { doTestRollbackOnTimeoutTxRemap(PESSIMISTIC, REPEATABLE_READ, true); } @@ -642,6 +658,7 @@ public void testRollbackOnTimeoutTxRemapPessimisticRepeatableRead() throws Excep /** * */ + @Test public void testRollbackOnTimeoutTxRemapPessimisticSerializable() throws Exception { doTestRollbackOnTimeoutTxRemap(PESSIMISTIC, SERIALIZABLE, true); } @@ -649,6 +666,7 @@ public void testRollbackOnTimeoutTxRemapPessimisticSerializable() throws Excepti /** * */ + @Test public void testRollbackOnTimeoutTxServerRemapOptimisticReadCommitted() throws Exception { doTestRollbackOnTimeoutTxRemap(OPTIMISTIC, READ_COMMITTED, false); } @@ -656,6 +674,7 @@ public void testRollbackOnTimeoutTxServerRemapOptimisticReadCommitted() throws E /** * */ + @Test public void testRollbackOnTimeoutTxServerRemapOptimisticRepeatableRead() throws Exception { doTestRollbackOnTimeoutTxRemap(OPTIMISTIC, REPEATABLE_READ, false); } @@ -663,6 +682,7 @@ public void testRollbackOnTimeoutTxServerRemapOptimisticRepeatableRead() throws /** * */ + @Test public void testRollbackOnTimeoutTxServerRemapOptimisticSerializable() throws Exception { doTestRollbackOnTimeoutTxRemap(OPTIMISTIC, SERIALIZABLE, false); } @@ -670,6 +690,7 @@ public void testRollbackOnTimeoutTxServerRemapOptimisticSerializable() throws Ex /** * */ + @Test public void testRollbackOnTimeoutTxServerRemapPessimisticReadCommitted() throws Exception { doTestRollbackOnTimeoutTxRemap(PESSIMISTIC, READ_COMMITTED, false); } @@ -677,6 +698,7 @@ public void testRollbackOnTimeoutTxServerRemapPessimisticReadCommitted() throws /** * */ + @Test public void testRollbackOnTimeoutTxServerRemapPessimisticRepeatableRead() throws Exception { doTestRollbackOnTimeoutTxRemap(PESSIMISTIC, REPEATABLE_READ, false); } @@ -684,6 +706,7 @@ public void testRollbackOnTimeoutTxServerRemapPessimisticRepeatableRead() throws /** * */ + @Test public void testRollbackOnTimeoutTxServerRemapPessimisticSerializable() throws Exception { doTestRollbackOnTimeoutTxRemap(PESSIMISTIC, SERIALIZABLE, false); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTopologyChangeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTopologyChangeTest.java index 3fd6fd35c3364..69dc4644861db 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTopologyChangeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTopologyChangeTest.java @@ -109,6 +109,7 @@ public class TxRollbackOnTopologyChangeTest extends GridCommonAbstractTest { /** * Tests rollbacks on topology change. */ + @Test public void testRollbackOnTopologyChange() throws Exception { final AtomicBoolean stop = new AtomicBoolean(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxStateChangeEventTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxStateChangeEventTest.java index 446609fdd7907..41f0d3d8fa480 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxStateChangeEventTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxStateChangeEventTest.java @@ -70,6 +70,7 @@ public class TxStateChangeEventTest extends GridCommonAbstractTest { /** * */ + @Test public void testLocal() throws Exception { check(true); } @@ -77,6 +78,7 @@ public void testLocal() throws Exception { /** * */ + @Test public void testRemote() throws Exception { check(false); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxWithSmallTimeoutAndContentionOneKeyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxWithSmallTimeoutAndContentionOneKeyTest.java index 62f46352391bf..cc39805def78b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxWithSmallTimeoutAndContentionOneKeyTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxWithSmallTimeoutAndContentionOneKeyTest.java @@ -149,6 +149,7 @@ protected long randomTimeOut() { * * @throws Exception If failed. */ + @Test public void test() throws Exception { startGrids(4); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryAbstractTest.java index 16ea84857840a..2c8e90c4e47e5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryAbstractTest.java @@ -54,6 +54,7 @@ public abstract class CacheVersionedEntryAbstractTest extends GridCacheAbstractS /** * @throws Exception If failed. */ + @Test public void testInvoke() throws Exception { Cache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -71,6 +72,7 @@ public void testInvoke() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeAll() throws Exception { Cache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -95,6 +97,7 @@ public void testInvokeAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLocalPeek() throws Exception { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -107,6 +110,7 @@ public void testLocalPeek() throws Exception { /** * @throws Exception If failed. */ + @Test public void testVersionComparision() throws Exception { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -142,4 +146,4 @@ private void checkVersionedEntry(CacheEntry entry) { assertNotNull(entry.getKey()); assertNotNull(entry.getValue()); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureProcessorRemoteTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureProcessorRemoteTest.java index 395cbc9c46f74..73f1dba63eb7f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureProcessorRemoteTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureProcessorRemoteTest.java @@ -66,6 +66,7 @@ public class GridClosureProcessorRemoteTest extends GridCommonAbstractTest { /** * @throws Exception Thrown in case of failure. */ + @Test public void testAnonymousBroadcast() throws Exception { Ignite g = grid(0); @@ -90,6 +91,7 @@ public void testAnonymousBroadcast() throws Exception { /** * @throws Exception Thrown in case of failure. */ + @Test public void testAnonymousUnicast() throws Exception { Ignite g = grid(0); @@ -117,6 +119,7 @@ public void testAnonymousUnicast() throws Exception { * * @throws Exception Thrown in case of failure. */ + @Test public void testAnonymousUnicastRequest() throws Exception { Ignite g = grid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureProcessorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureProcessorSelfTest.java index fef74e8f4d145..b6d4dd0dfa3a9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureProcessorSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureProcessorSelfTest.java @@ -314,6 +314,7 @@ private IgnitePredicate singleNodePredicate(final int idx) { /** * @throws Exception If failed. */ + @Test public void testRunAsyncSingle() throws Exception { IgniteRunnable job = new ClosureTestRunnable(); @@ -340,6 +341,7 @@ public void testRunAsyncSingle() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRunAsyncMultiple() throws Exception { Collection jobs = F.asList(new ClosureTestRunnable(), new ClosureTestRunnable()); @@ -354,6 +356,7 @@ public void testRunAsyncMultiple() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCallAsyncSingle() throws Exception { IgniteCallable job = new ClosureTestCallable(); @@ -382,6 +385,7 @@ public void testCallAsyncSingle() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCallAsyncErrorNoFailover() throws Exception { IgniteCompute comp = compute(grid(0).cluster().forPredicate(F.notEqualTo(grid(0).localNode()))); @@ -400,6 +404,7 @@ public void testCallAsyncErrorNoFailover() throws Exception { /** * @throws Exception If failed. */ + @Test public void testWithName() throws Exception { grid(0).compute().withName("TestTaskName").call(new ClosureTestCallable()); } @@ -407,6 +412,7 @@ public void testWithName() throws Exception { /** * @throws Exception If failed. */ + @Test public void testWithTimeout() throws Exception { Collection jobs = F.asList(new TestCallableTimeout()); @@ -438,6 +444,7 @@ public void testWithTimeout() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCallAsyncMultiple() throws Exception { Collection jobs = F.asList(new ClosureTestCallable(), new ClosureTestCallable()); @@ -457,6 +464,7 @@ public void testCallAsyncMultiple() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReduceAsync() throws Exception { Collection jobs = F.asList(new ClosureTestCallable(), new ClosureTestCallable()); @@ -477,6 +485,7 @@ public void testReduceAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReducerError() throws Exception { final Ignite g = grid(0); @@ -508,4 +517,4 @@ public void testReducerError() throws Exception { } }, IgniteException.class, null); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureSerializationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureSerializationTest.java index 2b7d3a4ab0bee..701902afae4a0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureSerializationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureSerializationTest.java @@ -57,6 +57,7 @@ public class GridClosureSerializationTest extends GridCommonAbstractTest { * @throws Exception If failed. */ @SuppressWarnings({"Convert2Lambda"}) + @Test public void testSerializationFailure() throws Exception { final IgniteEx ignite0 = grid(0); final IgniteEx ignite1 = grid(1); @@ -78,6 +79,7 @@ public void testSerializationFailure() throws Exception { * @throws Exception If failed. */ @SuppressWarnings({"Convert2Lambda"}) + @Test public void testExceptionSerializationFailure() throws Exception { final IgniteEx ignite0 = grid(0); final IgniteEx ignite1 = grid(1); @@ -99,6 +101,7 @@ public void testExceptionSerializationFailure() throws Exception { * @throws Exception If failed. */ @SuppressWarnings({"Convert2Lambda"}) + @Test public void testAttributesSerializationFailure() throws Exception { final IgniteEx ignite0 = grid(0); final IgniteEx ignite1 = grid(1); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cluster/GridAddressResolverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cluster/GridAddressResolverSelfTest.java index 2b706d5c2cf03..9dc0958d345ee 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cluster/GridAddressResolverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cluster/GridAddressResolverSelfTest.java @@ -76,6 +76,7 @@ public class GridAddressResolverSelfTest extends GridCommonAbstractTest { } /** */ + @Test public void test() throws Exception { startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cluster/GridUpdateNotifierSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cluster/GridUpdateNotifierSelfTest.java index 58c41b5165bfb..846c8eeb04847 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cluster/GridUpdateNotifierSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cluster/GridUpdateNotifierSelfTest.java @@ -64,6 +64,7 @@ public class GridUpdateNotifierSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testNotifier() throws Exception { String nodeVer = IgniteProperties.get("ignite.version"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/GridComputeJobExecutionErrorToLogManualTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/GridComputeJobExecutionErrorToLogManualTest.java index dc24156919be1..3935dfe330f20 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/GridComputeJobExecutionErrorToLogManualTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/GridComputeJobExecutionErrorToLogManualTest.java @@ -58,6 +58,7 @@ public class GridComputeJobExecutionErrorToLogManualTest extends GridCommonAbstr /** * @throws Exception If fails. */ + @Test public void testRuntimeException() throws Exception { Ignite ignite = grid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/IgniteComputeConfigVariationsFullApiTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/IgniteComputeConfigVariationsFullApiTest.java index d1fbb341373f4..5da51ae05cdf2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/IgniteComputeConfigVariationsFullApiTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/IgniteComputeConfigVariationsFullApiTest.java @@ -177,9 +177,11 @@ protected void runTest(final Factory[] factories, final ComputeTest test) throws /** * @throws Exception If failed. */ + @Test public void testExecuteTaskClass() throws Exception { runTest(jobFactories, new ComputeTest() { - @Override public void test(Factory factory, Ignite ignite) throws Exception { + @Override @Test + public void test(Factory factory, Ignite ignite) throws Exception { // Begin with negative to check 'null' value in the test. final int[] i = {-1}; @@ -201,9 +203,11 @@ public void testExecuteTaskClass() throws Exception { /** * @throws Exception If failed. */ + @Test public void testExecuteTaskClassAsync() throws Exception { runTest(jobFactories, new ComputeTest() { - @Override public void test(Factory factory, Ignite ignite) throws Exception { + @Override @Test + public void test(Factory factory, Ignite ignite) throws Exception { // Begin with negative to check 'null' value in the test. final int[] i = {-1}; @@ -225,9 +229,11 @@ public void testExecuteTaskClassAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testExecuteTask() throws Exception { runTest(jobFactories, new ComputeTest() { - @Override public void test(Factory factory, Ignite ignite) throws Exception { + @Override @Test + public void test(Factory factory, Ignite ignite) throws Exception { // Begin with negative to check 'null' value in the test. final int[] i = {-1}; @@ -248,9 +254,11 @@ public void testExecuteTask() throws Exception { /** * @throws Exception If failed. */ + @Test public void testExecuteTaskAsync() throws Exception { runTest(jobFactories, new ComputeTest() { - @Override public void test(Factory factory, Ignite ignite) throws Exception { + @Override @Test + public void test(Factory factory, Ignite ignite) throws Exception { // Begin with negative to check 'null' value in the test. final int[] i = {-1}; @@ -271,9 +279,11 @@ public void testExecuteTaskAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBroadcastClosure() throws Exception { runTest(closureFactories, new ComputeTest() { - @Override public void test(Factory factory, Ignite ignite) throws Exception { + @Override @Test + public void test(Factory factory, Ignite ignite) throws Exception { final Collection resultsAllNull = ignite.compute() .broadcast((IgniteClosure)factory.create(), null); @@ -294,9 +304,11 @@ public void testBroadcastClosure() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBroadcastClosureAsync() throws Exception { runTest(closureFactories, new ComputeTest() { - @Override public void test(Factory factory, Ignite ignite) throws Exception { + @Override @Test + public void test(Factory factory, Ignite ignite) throws Exception { final Collection resultsAllNull = ignite.compute() .broadcast((IgniteClosure)factory.create(), null); @@ -317,9 +329,11 @@ public void testBroadcastClosureAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBroadcastCallable() throws Exception { runTest(callableFactories, new ComputeTest() { - @Override public void test(Factory factory, Ignite ignite) throws Exception { + @Override @Test + public void test(Factory factory, Ignite ignite) throws Exception { EchoCallable job = (EchoCallable)factory.create(); job.setArg(null); @@ -346,9 +360,11 @@ public void testBroadcastCallable() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBroadcastCallableAsync() throws Exception { runTest(callableFactories, new ComputeTest() { - @Override public void test(Factory factory, Ignite ignite) throws Exception { + @Override @Test + public void test(Factory factory, Ignite ignite) throws Exception { EchoCallable job = (EchoCallable)factory.create(); job.setArg(null); @@ -375,9 +391,11 @@ public void testBroadcastCallableAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBroadcastRunnable() throws Exception { runTest(runnableFactories, new ComputeTest() { - @Override public void test(Factory factory, Ignite ignite) throws Exception { + @Override @Test + public void test(Factory factory, Ignite ignite) throws Exception { IgniteRunnable job = (IgniteRunnable)factory.create(); ignite.compute().broadcast(job); @@ -389,9 +407,11 @@ public void testBroadcastRunnable() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBroadcastRunnableAsync() throws Exception { runTest(runnableFactories, new ComputeTest() { - @Override public void test(Factory factory, Ignite ignite) throws Exception { + @Override @Test + public void test(Factory factory, Ignite ignite) throws Exception { IgniteRunnable job = (IgniteRunnable)factory.create(); IgniteFuture fut = ignite.compute().broadcastAsync(job); @@ -405,9 +425,11 @@ public void testBroadcastRunnableAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRun() throws Exception { runTest(runnableFactories, new ComputeTest() { - @Override public void test(Factory factory, Ignite ignite) throws Exception { + @Override @Test + public void test(Factory factory, Ignite ignite) throws Exception { IgniteRunnable job = (IgniteRunnable)factory.create(); ignite.compute().run(job); @@ -427,9 +449,11 @@ public void testRun() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRunAsync() throws Exception { runTest(runnableFactories, new ComputeTest() { - @Override public void test(Factory factory, Ignite ignite) throws Exception { + @Override @Test + public void test(Factory factory, Ignite ignite) throws Exception { IgniteRunnable job = (IgniteRunnable)factory.create(); IgniteFuture fut0 = ignite.compute().runAsync(job); @@ -453,9 +477,11 @@ public void testRunAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testApplyAsync() throws Exception { runTest(closureFactories, new ComputeTest() { - @Override public void test(Factory factory, Ignite ignite) throws Exception { + @Override @Test + public void test(Factory factory, Ignite ignite) throws Exception { final IgniteCompute comp = ignite.compute(); Collection> futures = new ArrayList<>(MAX_JOB_COUNT); @@ -480,9 +506,11 @@ public void testApplyAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testApply() throws Exception { runTest(closureFactories, new ComputeTest() { - @Override public void test(Factory factory, Ignite ignite) throws Exception { + @Override @Test + public void test(Factory factory, Ignite ignite) throws Exception { Collection results = new ArrayList<>(MAX_JOB_COUNT); for (int i = 0; i < MAX_JOB_COUNT; ++i) { @@ -499,9 +527,11 @@ public void testApply() throws Exception { /** * @throws Exception If failed. */ + @Test public void testApplyForCollection() throws Exception { runTest(closureFactories, new ComputeTest() { - @Override public void test(Factory factory, Ignite ignite) throws Exception { + @Override @Test + public void test(Factory factory, Ignite ignite) throws Exception { Collection params = new ArrayList<>(MAX_JOB_COUNT); for (int i = 0; i < MAX_JOB_COUNT; ++i) { @@ -524,9 +554,11 @@ public void testApplyForCollection() throws Exception { /** * @throws Exception If failed. */ + @Test public void testApplyForCollectionAsync() throws Exception { runTest(closureFactories, new ComputeTest() { - @Override public void test(Factory factory, Ignite ignite) throws Exception { + @Override @Test + public void test(Factory factory, Ignite ignite) throws Exception { Collection params = new ArrayList<>(MAX_JOB_COUNT); for (int i = 0; i < MAX_JOB_COUNT; ++i) { @@ -550,9 +582,11 @@ public void testApplyForCollectionAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testApplyForCollectionWithReducer() throws Exception { runTest(closureFactories, new ComputeTest() { - @Override public void test(Factory factory, Ignite ignite) throws Exception { + @Override @Test + public void test(Factory factory, Ignite ignite) throws Exception { Collection params = new ArrayList<>(MAX_JOB_COUNT); for (int i = 0; i < MAX_JOB_COUNT; ++i) { @@ -585,9 +619,11 @@ public void testApplyForCollectionWithReducer() throws Exception { /** * @throws Exception If failed. */ + @Test public void testApplyForCollectionWithReducerAsync() throws Exception { runTest(closureFactories, new ComputeTest() { - @Override public void test(Factory factory, Ignite ignite) throws Exception { + @Override @Test + public void test(Factory factory, Ignite ignite) throws Exception { Collection params = new ArrayList<>(MAX_JOB_COUNT); for (int i = 0; i < MAX_JOB_COUNT; ++i) { @@ -620,9 +656,11 @@ public void testApplyForCollectionWithReducerAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCallAsync() throws Exception { runTest(callableFactories, new ComputeTest() { - @Override public void test(Factory factory, Ignite ignite) throws Exception { + @Override @Test + public void test(Factory factory, Ignite ignite) throws Exception { final IgniteCompute comp = ignite.compute(); Collection> futures = new ArrayList<>(MAX_JOB_COUNT); @@ -648,9 +686,11 @@ public void testCallAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCall() throws Exception { runTest(callableFactories, new ComputeTest() { - @Override public void test(Factory factory, Ignite ignite) throws Exception { + @Override @Test + public void test(Factory factory, Ignite ignite) throws Exception { Collection results = new ArrayList<>(MAX_JOB_COUNT); for (int i = 0; i < MAX_JOB_COUNT; ++i) { @@ -668,9 +708,11 @@ public void testCall() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCallCollection() throws Exception { runTest(callableFactories, new ComputeTest() { - @Override public void test(Factory factory, Ignite ignite) throws Exception { + @Override @Test + public void test(Factory factory, Ignite ignite) throws Exception { Collection jobs = new ArrayList<>(MAX_JOB_COUNT); for (int i = 0; i < MAX_JOB_COUNT; ++i) { @@ -690,9 +732,11 @@ public void testCallCollection() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCallCollectionAsync() throws Exception { runTest(callableFactories, new ComputeTest() { - @Override public void test(Factory factory, Ignite ignite) throws Exception { + @Override @Test + public void test(Factory factory, Ignite ignite) throws Exception { Collection jobs = new ArrayList<>(MAX_JOB_COUNT); for (int i = 0; i < MAX_JOB_COUNT; ++i) { @@ -712,9 +756,11 @@ public void testCallCollectionAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCallCollectionWithReducer() throws Exception { runTest(callableFactories, new ComputeTest() { - @Override public void test(Factory factory, Ignite ignite) throws Exception { + @Override @Test + public void test(Factory factory, Ignite ignite) throws Exception { Collection jobs = new ArrayList<>(MAX_JOB_COUNT); for (int i = 0; i < MAX_JOB_COUNT; ++i) { @@ -746,9 +792,11 @@ public void testCallCollectionWithReducer() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCallCollectionWithReducerAsync() throws Exception { runTest(callableFactories, new ComputeTest() { - @Override public void test(Factory factory, Ignite ignite) throws Exception { + @Override @Test + public void test(Factory factory, Ignite ignite) throws Exception { Collection jobs = new ArrayList<>(MAX_JOB_COUNT); for (int i = 0; i < MAX_JOB_COUNT; ++i) { @@ -780,9 +828,11 @@ public void testCallCollectionWithReducerAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAffinityCall() throws Exception { runTest(callableFactories, new ComputeTest() { - @Override public void test(Factory factory, Ignite ignite) throws Exception { + @Override @Test + public void test(Factory factory, Ignite ignite) throws Exception { ignite.getOrCreateCache(CACHE_NAME); final IgniteCompute comp = ignite.compute(); @@ -806,9 +856,11 @@ public void testAffinityCall() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAffinityCallAsync() throws Exception { runTest(callableFactories, new ComputeTest() { - @Override public void test(Factory factory, Ignite ignite) throws Exception { + @Override @Test + public void test(Factory factory, Ignite ignite) throws Exception { ignite.getOrCreateCache(CACHE_NAME); final IgniteCompute comp = ignite.compute(); @@ -834,9 +886,11 @@ public void testAffinityCallAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultiCacheAffinityCall() throws Exception { runTest(callableFactories, new ComputeTest() { - @Override public void test(Factory factory, Ignite ignite) throws Exception { + @Override @Test + public void test(Factory factory, Ignite ignite) throws Exception { ignite.getOrCreateCache("test0"); ignite.getOrCreateCache("test1"); @@ -861,9 +915,11 @@ public void testMultiCacheAffinityCall() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultiCacheAffinityCallAsync() throws Exception { runTest(callableFactories, new ComputeTest() { - @Override public void test(Factory factory, Ignite ignite) throws Exception { + @Override @Test + public void test(Factory factory, Ignite ignite) throws Exception { ignite.getOrCreateCache("test0"); ignite.getOrCreateCache("test1"); @@ -890,9 +946,11 @@ public void testMultiCacheAffinityCallAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultiCacheByPartIdAffinityCall() throws Exception { runTest(callableFactories, new ComputeTest() { - @Override public void test(Factory factory, Ignite ignite) throws Exception { + @Override @Test + public void test(Factory factory, Ignite ignite) throws Exception { ignite.getOrCreateCache("test0"); ignite.getOrCreateCache("test1"); @@ -917,9 +975,11 @@ public void testMultiCacheByPartIdAffinityCall() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultiCacheByPartIdAffinityCallAsync() throws Exception { runTest(callableFactories, new ComputeTest() { - @Override public void test(Factory factory, Ignite ignite) throws Exception { + @Override @Test + public void test(Factory factory, Ignite ignite) throws Exception { ignite.getOrCreateCache("test0"); ignite.getOrCreateCache("test1"); @@ -946,9 +1006,11 @@ public void testMultiCacheByPartIdAffinityCallAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAffinityRun() throws Exception { runTest(runnableFactories, new ComputeTest() { - @Override public void test(Factory factory, Ignite ignite) throws Exception { + @Override @Test + public void test(Factory factory, Ignite ignite) throws Exception { ignite.getOrCreateCache(CACHE_NAME); final IgniteCompute comp = ignite.compute(); @@ -965,9 +1027,11 @@ public void testAffinityRun() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAffinityRunAsync() throws Exception { runTest(runnableFactories, new ComputeTest() { - @Override public void test(Factory factory, Ignite ignite) throws Exception { + @Override @Test + public void test(Factory factory, Ignite ignite) throws Exception { ignite.getOrCreateCache(CACHE_NAME); final IgniteCompute comp = ignite.compute(); @@ -986,9 +1050,11 @@ public void testAffinityRunAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultiCacheAffinityRun() throws Exception { runTest(runnableFactories, new ComputeTest() { - @Override public void test(Factory factory, Ignite ignite) throws Exception { + @Override @Test + public void test(Factory factory, Ignite ignite) throws Exception { ignite.getOrCreateCache("test0"); ignite.getOrCreateCache("test1"); @@ -1006,9 +1072,11 @@ public void testMultiCacheAffinityRun() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultiCacheAffinityRunAsync() throws Exception { runTest(runnableFactories, new ComputeTest() { - @Override public void test(Factory factory, Ignite ignite) throws Exception { + @Override @Test + public void test(Factory factory, Ignite ignite) throws Exception { ignite.getOrCreateCache("test0"); ignite.getOrCreateCache("test1"); @@ -1028,9 +1096,11 @@ public void testMultiCacheAffinityRunAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultiCacheByPartIdAffinityRun() throws Exception { runTest(runnableFactories, new ComputeTest() { - @Override public void test(Factory factory, Ignite ignite) throws Exception { + @Override @Test + public void test(Factory factory, Ignite ignite) throws Exception { ignite.getOrCreateCache("test0"); ignite.getOrCreateCache("test1"); @@ -1048,9 +1118,11 @@ public void testMultiCacheByPartIdAffinityRun() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultiCacheByPartIdAffinityRunAsync() throws Exception { runTest(runnableFactories, new ComputeTest() { - @Override public void test(Factory factory, Ignite ignite) throws Exception { + @Override @Test + public void test(Factory factory, Ignite ignite) throws Exception { ignite.getOrCreateCache("test0"); ignite.getOrCreateCache("test1"); @@ -1070,9 +1142,11 @@ public void testMultiCacheByPartIdAffinityRunAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeployExecuteByName() throws Exception { runTest(jobFactories, new ComputeTest() { - @Override public void test(Factory factory, Ignite ignite) throws Exception { + @Override @Test + public void test(Factory factory, Ignite ignite) throws Exception { final int[] i = {-1}; final IgniteCompute comp = ignite.compute(); @@ -1127,7 +1201,8 @@ public interface ComputeTest { * @param ignite Ignite instance to use. * @throws Exception If failed. */ - public void test(Factory factory, Ignite ignite) throws Exception; + @Test + public void test(Factory factory, Ignite ignite) throws Exception; } /** @@ -2469,4 +2544,4 @@ private static void writeJobState(ObjectOutput out, boolean isVal, byte bVal, ch out.writeObject(eVal); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/IgniteComputeCustomExecutorConfigurationSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/IgniteComputeCustomExecutorConfigurationSelfTest.java index 2277100067848..de717f6e43374 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/IgniteComputeCustomExecutorConfigurationSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/IgniteComputeCustomExecutorConfigurationSelfTest.java @@ -49,6 +49,7 @@ public class IgniteComputeCustomExecutorConfigurationSelfTest extends GridCommon /** * @throws Exception If failed. */ + @Test public void testConfigurations() throws Exception { try { checkStartWithInvalidConfiguration(getConfiguration("node0") diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/IgniteComputeCustomExecutorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/IgniteComputeCustomExecutorSelfTest.java index 18c52c0b5d94f..3c212601aa787 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/IgniteComputeCustomExecutorSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/IgniteComputeCustomExecutorSelfTest.java @@ -96,6 +96,7 @@ private ExecutorConfiguration createExecConfiguration(String name) { /** * @throws Exception If fails. */ + @Test public void testInvalidCustomExecutor() throws Exception { grid(0).compute().withExecutor("invalid").broadcast(new IgniteRunnable() { @Override public void run() { @@ -107,6 +108,7 @@ public void testInvalidCustomExecutor() throws Exception { /** * @throws Exception If fails. */ + @Test public void testAllComputeApiByCustomExecutor() throws Exception { IgniteCompute comp = grid(0).compute().withExecutor(EXEC_NAME0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/PublicThreadpoolStarvationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/PublicThreadpoolStarvationTest.java index dd9e0d5090df8..f123382b79112 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/PublicThreadpoolStarvationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/PublicThreadpoolStarvationTest.java @@ -113,6 +113,7 @@ private void fillCaches() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheSizeOnPublicThreadpoolStarvation() throws Exception { grid(0).compute().run(new IgniteRunnable() { @Override public void run() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridEventConsumeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridEventConsumeSelfTest.java index d2d895ed8e8f2..72f2127d5f659 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridEventConsumeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridEventConsumeSelfTest.java @@ -174,6 +174,7 @@ private Collection localRoutines(GridContinuousProcessor proc) /** * @throws Exception If failed. */ + @Test public void testApi() throws Exception { try { grid(0).events().stopRemoteListen(null); @@ -251,6 +252,7 @@ public void testApi() throws Exception { /** * @throws Exception If failed. */ + @Test public void testApiAsyncOld() throws Exception { IgniteEvents evtAsync = grid(0).events().withAsync(); @@ -341,6 +343,7 @@ public void testApiAsyncOld() throws Exception { /** * @throws Exception If failed. */ + @Test public void testApiAsync() throws Exception { IgniteEvents evt = grid(0).events(); @@ -420,6 +423,7 @@ public void testApiAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAllEvents() throws Exception { final Collection nodeIds = new HashSet<>(); final AtomicInteger cnt = new AtomicInteger(); @@ -460,6 +464,7 @@ public void testAllEvents() throws Exception { /** * @throws Exception If failed. */ + @Test public void testEventsByType() throws Exception { final Collection nodeIds = new HashSet<>(); final AtomicInteger cnt = new AtomicInteger(); @@ -501,6 +506,7 @@ public void testEventsByType() throws Exception { /** * @throws Exception If failed. */ + @Test public void testEventsByFilter() throws Exception { final Collection nodeIds = new HashSet<>(); final AtomicInteger cnt = new AtomicInteger(); @@ -545,6 +551,7 @@ public void testEventsByFilter() throws Exception { /** * @throws Exception If failed. */ + @Test public void testEventsByTypeAndFilter() throws Exception { final Collection nodeIds = new HashSet<>(); final AtomicInteger cnt = new AtomicInteger(); @@ -591,6 +598,7 @@ public void testEventsByTypeAndFilter() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemoteProjection() throws Exception { final Collection nodeIds = new ConcurrentSkipListSet<>(); final AtomicInteger cnt = new AtomicInteger(); @@ -632,6 +640,7 @@ public void testRemoteProjection() throws Exception { /** * @throws Exception If failed. */ + @Test public void testProjectionWithLocalNode() throws Exception { final Collection nodeIds = new HashSet<>(); final AtomicInteger cnt = new AtomicInteger(); @@ -673,6 +682,7 @@ public void testProjectionWithLocalNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLocalNodeOnly() throws Exception { final Collection nodeIds = new HashSet<>(); final AtomicInteger cnt = new AtomicInteger(); @@ -716,6 +726,7 @@ public void testLocalNodeOnly() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStopByCallback() throws Exception { final Collection nodeIds = new HashSet<>(); final AtomicInteger cnt = new AtomicInteger(); @@ -757,6 +768,7 @@ public void testStopByCallback() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStopRemoteListen() throws Exception { final Collection nodeIds = new HashSet<>(); final AtomicInteger cnt = new AtomicInteger(); @@ -807,6 +819,7 @@ public void testStopRemoteListen() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStopLocalListenByCallback() throws Exception { final AtomicInteger cnt = new AtomicInteger(); final CountDownLatch latch = new CountDownLatch(1); @@ -842,6 +855,7 @@ public void testStopLocalListenByCallback() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNodeJoin() throws Exception { final Collection nodeIds = new HashSet<>(); final AtomicInteger cnt = new AtomicInteger(); @@ -893,6 +907,7 @@ public void testNodeJoin() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNodeJoinWithProjection() throws Exception { final Collection nodeIds = new HashSet<>(); final AtomicInteger cnt = new AtomicInteger(); @@ -947,6 +962,7 @@ public void testNodeJoinWithProjection() throws Exception { * * @throws Exception If failed. */ + @Test public void testNodeJoinWithP2P() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-585"); @@ -995,6 +1011,7 @@ public void testNodeJoinWithP2P() throws Exception { /** * @throws Exception If failed. */ + @Test public void testResources() throws Exception { final Collection nodeIds = new HashSet<>(); final AtomicInteger cnt = new AtomicInteger(); @@ -1049,6 +1066,7 @@ public void testResources() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMasterNodeLeave() throws Exception { final CountDownLatch latch = new CountDownLatch(GRID_CNT); @@ -1088,6 +1106,7 @@ public void testMasterNodeLeave() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMasterNodeLeaveNoAutoUnsubscribe() throws Exception { Ignite g = startGrid("anotherGrid"); @@ -1145,6 +1164,7 @@ public void testMasterNodeLeaveNoAutoUnsubscribe() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultithreadedWithNodeRestart() throws Exception { final AtomicBoolean stop = new AtomicBoolean(); final BlockingQueue> queue = new LinkedBlockingQueue<>(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridMessageListenSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridMessageListenSelfTest.java index c0cd5f2999665..ed397c4fcbe5a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridMessageListenSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridMessageListenSelfTest.java @@ -143,6 +143,7 @@ public class GridMessageListenSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testNullTopic() throws Exception { latch = new CountDownLatch(MSG_CNT * GRID_CNT); @@ -163,6 +164,7 @@ public void testNullTopic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNonNullTopic() throws Exception { latch = new CountDownLatch(MSG_CNT * GRID_CNT); @@ -183,6 +185,7 @@ public void testNonNullTopic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStopListen() throws Exception { latch = new CountDownLatch(GRID_CNT); @@ -208,6 +211,7 @@ public void testStopListen() throws Exception { /** * @throws Exception If failed. */ + @Test public void testProjection() throws Exception { latch = new CountDownLatch(MSG_CNT * (GRID_CNT - 1)); @@ -227,6 +231,7 @@ public void testProjection() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNodeJoin() throws Exception { latch = new CountDownLatch(MSG_CNT * (GRID_CNT + 1)); @@ -259,6 +264,7 @@ public void testNodeJoin() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNodeJoinWithProjection() throws Exception { latch = new CountDownLatch(MSG_CNT * GRID_CNT); @@ -298,6 +304,7 @@ public void testNodeJoinWithProjection() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNullTopicWithDeployment() throws Exception { Class cls = getExternalClassLoader().loadClass(LSNR_CLS_NAME); @@ -317,6 +324,7 @@ public void testNullTopicWithDeployment() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNonNullTopicWithDeployment() throws Exception { ClassLoader ldr = getExternalClassLoader(); @@ -341,6 +349,7 @@ public void testNonNullTopicWithDeployment() throws Exception { /** * @throws Exception If failed. */ + @Test public void testListenActor() throws Exception { latch = new CountDownLatch(MSG_CNT * (GRID_CNT + 1)); @@ -494,4 +503,4 @@ private Actor(UUID sourceNodeId) { latch.countDown(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/IgniteNoCustomEventsOnNodeStart.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/IgniteNoCustomEventsOnNodeStart.java index dc151a62bd418..3b9c1c8c456cb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/IgniteNoCustomEventsOnNodeStart.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/IgniteNoCustomEventsOnNodeStart.java @@ -56,6 +56,7 @@ public class IgniteNoCustomEventsOnNodeStart extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testNoCustomEventsOnStart() throws Exception { failed = false; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/BPlusTreeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/BPlusTreeSelfTest.java index ae9aff80131c4..7e2d8c076a73c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/BPlusTreeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/BPlusTreeSelfTest.java @@ -216,6 +216,7 @@ protected ReuseList createReuseList(int cacheId, PageMemory pageMem, long rootId /** * @throws IgniteCheckedException If failed. */ + @Test public void testFind() throws IgniteCheckedException { TestTree tree = createTestTree(true); TreeMap map = new TreeMap<>(); @@ -234,6 +235,7 @@ public void testFind() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testRetries() throws IgniteCheckedException { TestTree tree = createTestTree(true); @@ -254,6 +256,7 @@ public void testRetries() throws IgniteCheckedException { /** * @throws Exception if failed. */ + @Test public void testIsEmpty() throws Exception { TestTree tree = createTestTree(true); @@ -277,6 +280,7 @@ public void testIsEmpty() throws Exception { /** * @throws IgniteCheckedException If failed. */ + @Test public void testFindWithClosure() throws IgniteCheckedException { TestTree tree = createTestTree(true); TreeMap map = new TreeMap<>(); @@ -339,6 +343,7 @@ private void checkCursor(GridCursor cursor, Iterator iterator) throw /** * @throws IgniteCheckedException If failed. */ + @Test public void testPutRemove_1_20_mm_1() throws IgniteCheckedException { MAX_PER_PAGE = 1; CNT = 20; @@ -351,6 +356,7 @@ public void testPutRemove_1_20_mm_1() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testPutRemove_1_20_mm_0() throws IgniteCheckedException { MAX_PER_PAGE = 1; CNT = 20; @@ -363,6 +369,7 @@ public void testPutRemove_1_20_mm_0() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testPutRemove_1_20_pm_1() throws IgniteCheckedException { MAX_PER_PAGE = 1; CNT = 20; @@ -375,6 +382,7 @@ public void testPutRemove_1_20_pm_1() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testPutRemove_1_20_pm_0() throws IgniteCheckedException { MAX_PER_PAGE = 1; CNT = 20; @@ -387,6 +395,7 @@ public void testPutRemove_1_20_pm_0() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testPutRemove_1_20_pp_1() throws IgniteCheckedException { MAX_PER_PAGE = 1; CNT = 20; @@ -399,6 +408,7 @@ public void testPutRemove_1_20_pp_1() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testPutRemove_1_20_pp_0() throws IgniteCheckedException { MAX_PER_PAGE = 1; CNT = 20; @@ -411,6 +421,7 @@ public void testPutRemove_1_20_pp_0() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testPutRemove_1_20_mp_1() throws IgniteCheckedException { MAX_PER_PAGE = 1; CNT = 20; @@ -423,6 +434,7 @@ public void testPutRemove_1_20_mp_1() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testPutRemove_1_20_mp_0() throws IgniteCheckedException { MAX_PER_PAGE = 1; CNT = 20; @@ -436,6 +448,7 @@ public void testPutRemove_1_20_mp_0() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testPutRemove_2_40_mm_1() throws IgniteCheckedException { MAX_PER_PAGE = 2; CNT = 40; @@ -448,6 +461,7 @@ public void testPutRemove_2_40_mm_1() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testPutRemove_2_40_mm_0() throws IgniteCheckedException { MAX_PER_PAGE = 2; CNT = 40; @@ -460,6 +474,7 @@ public void testPutRemove_2_40_mm_0() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testPutRemove_2_40_pm_1() throws IgniteCheckedException { MAX_PER_PAGE = 2; CNT = 40; @@ -472,6 +487,7 @@ public void testPutRemove_2_40_pm_1() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testPutRemove_2_40_pm_0() throws IgniteCheckedException { MAX_PER_PAGE = 2; CNT = 40; @@ -484,6 +500,7 @@ public void testPutRemove_2_40_pm_0() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testPutRemove_2_40_pp_1() throws IgniteCheckedException { MAX_PER_PAGE = 2; CNT = 40; @@ -496,6 +513,7 @@ public void testPutRemove_2_40_pp_1() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testPutRemove_2_40_pp_0() throws IgniteCheckedException { MAX_PER_PAGE = 2; CNT = 40; @@ -508,6 +526,7 @@ public void testPutRemove_2_40_pp_0() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testPutRemove_2_40_mp_1() throws IgniteCheckedException { MAX_PER_PAGE = 2; CNT = 40; @@ -520,6 +539,7 @@ public void testPutRemove_2_40_mp_1() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testPutRemove_2_40_mp_0() throws IgniteCheckedException { MAX_PER_PAGE = 2; CNT = 40; @@ -533,6 +553,7 @@ public void testPutRemove_2_40_mp_0() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testPutRemove_3_60_mm_1() throws IgniteCheckedException { MAX_PER_PAGE = 3; CNT = 60; @@ -545,6 +566,7 @@ public void testPutRemove_3_60_mm_1() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testPutRemove_3_60_mm_0() throws IgniteCheckedException { MAX_PER_PAGE = 3; CNT = 60; @@ -557,6 +579,7 @@ public void testPutRemove_3_60_mm_0() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testPutRemove_3_60_pm_1() throws IgniteCheckedException { MAX_PER_PAGE = 3; CNT = 60; @@ -569,6 +592,7 @@ public void testPutRemove_3_60_pm_1() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testPutRemove_3_60_pm_0() throws IgniteCheckedException { MAX_PER_PAGE = 3; CNT = 60; @@ -581,6 +605,7 @@ public void testPutRemove_3_60_pm_0() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testPutRemove_3_60_pp_1() throws IgniteCheckedException { MAX_PER_PAGE = 3; CNT = 60; @@ -593,6 +618,7 @@ public void testPutRemove_3_60_pp_1() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testPutRemove_3_60_pp_0() throws IgniteCheckedException { MAX_PER_PAGE = 3; CNT = 60; @@ -605,6 +631,7 @@ public void testPutRemove_3_60_pp_0() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testPutRemove_3_60_mp_1() throws IgniteCheckedException { MAX_PER_PAGE = 3; CNT = 60; @@ -617,6 +644,7 @@ public void testPutRemove_3_60_mp_1() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testPutRemove_3_60_mp_0() throws IgniteCheckedException { MAX_PER_PAGE = 3; CNT = 60; @@ -733,6 +761,7 @@ private void checkIterateC(TestTree tree, long lower, long upper, TestTreeRowClo /** * @throws IgniteCheckedException If failed. */ + @Test public void testRandomInvoke_1_30_1() throws IgniteCheckedException { MAX_PER_PAGE = 1; CNT = 30; @@ -743,6 +772,7 @@ public void testRandomInvoke_1_30_1() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testRandomInvoke_1_30_0() throws IgniteCheckedException { MAX_PER_PAGE = 1; CNT = 30; @@ -854,6 +884,7 @@ else if (rnd % 3 == 0) { /** * @throws IgniteCheckedException If failed. */ + @Test public void testRandomPutRemove_1_30_0() throws IgniteCheckedException { MAX_PER_PAGE = 1; CNT = 30; @@ -864,6 +895,7 @@ public void testRandomPutRemove_1_30_0() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testRandomPutRemove_1_30_1() throws IgniteCheckedException { MAX_PER_PAGE = 1; CNT = 30; @@ -874,6 +906,7 @@ public void testRandomPutRemove_1_30_1() throws IgniteCheckedException { /** * @throws Exception If failed. */ + @Test public void testMassiveRemove3_false() throws Exception { MAX_PER_PAGE = 3; @@ -883,6 +916,7 @@ public void testMassiveRemove3_false() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMassiveRemove3_true() throws Exception { MAX_PER_PAGE = 3; @@ -892,6 +926,7 @@ public void testMassiveRemove3_true() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMassiveRemove2_false() throws Exception { MAX_PER_PAGE = 2; @@ -901,6 +936,7 @@ public void testMassiveRemove2_false() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMassiveRemove2_true() throws Exception { MAX_PER_PAGE = 2; @@ -910,6 +946,7 @@ public void testMassiveRemove2_true() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMassiveRemove1_false() throws Exception { MAX_PER_PAGE = 1; @@ -919,6 +956,7 @@ public void testMassiveRemove1_false() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMassiveRemove1_true() throws Exception { MAX_PER_PAGE = 1; @@ -993,6 +1031,7 @@ private void doTestMassiveRemove(final boolean canGetRow) throws Exception { /** * @throws Exception If failed. */ + @Test public void testMassivePut1_true() throws Exception { MAX_PER_PAGE = 1; @@ -1002,6 +1041,7 @@ public void testMassivePut1_true() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMassivePut1_false() throws Exception { MAX_PER_PAGE = 1; @@ -1011,12 +1051,14 @@ public void testMassivePut1_false() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMassivePut2_true() throws Exception { MAX_PER_PAGE = 2; doTestMassivePut(true); } + @Test public void testMassivePut2_false() throws Exception { MAX_PER_PAGE = 2; @@ -1026,12 +1068,14 @@ public void testMassivePut2_false() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMassivePut3_true() throws Exception { MAX_PER_PAGE = 3; doTestMassivePut(true); } + @Test public void testMassivePut3_false() throws Exception { MAX_PER_PAGE = 3; @@ -1164,6 +1208,7 @@ private void assertEqualContents(IgniteTree tree, Map map /** * @throws IgniteCheckedException If failed. */ + @Test public void testEmptyCursors() throws IgniteCheckedException { MAX_PER_PAGE = 5; @@ -1194,6 +1239,7 @@ private void doTestCursor(boolean canGetRow) throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testCursorConcurrentMerge() throws IgniteCheckedException { MAX_PER_PAGE = 5; @@ -1269,6 +1315,7 @@ public void testCursorConcurrentMerge() throws IgniteCheckedException { * * @throws IgniteCheckedException If failed. */ + @Test public void testSizeForPutRmvSequential() throws IgniteCheckedException { MAX_PER_PAGE = 5; @@ -1358,6 +1405,7 @@ public void testSizeForPutRmvSequential() throws IgniteCheckedException { * * @throws Exception If failed. */ + @Test public void testSizeForRandomPutRmvMultithreaded_5_4() throws Exception { MAX_PER_PAGE = 5; CNT = 10_000; @@ -1365,6 +1413,7 @@ public void testSizeForRandomPutRmvMultithreaded_5_4() throws Exception { doTestSizeForRandomPutRmvMultithreaded(4); } + @Test public void testSizeForRandomPutRmvMultithreaded_3_256() throws Exception { MAX_PER_PAGE = 3; CNT = 10_000; @@ -1481,6 +1530,7 @@ private void doTestSizeForRandomPutRmvMultithreaded(final int rmvPutSlidingWindo * * @see #doTestSizeForRandomPutRmvMultithreadedAsync doTestSizeForRandomPutRmvMultithreadedAsync() for details. */ + @Test public void testSizeForRandomPutRmvMultithreadedAsync_16() throws Exception { doTestSizeForRandomPutRmvMultithreadedAsync(16); } @@ -1491,6 +1541,7 @@ public void testSizeForRandomPutRmvMultithreadedAsync_16() throws Exception { * * @see #doTestSizeForRandomPutRmvMultithreadedAsync doTestSizeForRandomPutRmvMultithreadedAsync() for details. */ + @Test public void testSizeForRandomPutRmvMultithreadedAsync_3() throws Exception { doTestSizeForRandomPutRmvMultithreadedAsync(3); } @@ -1660,6 +1711,7 @@ public void doTestSizeForRandomPutRmvMultithreadedAsync(final int rmvPutSlidingW * * @throws Exception if test failed */ + @Test public void testPutSizeLivelock() throws Exception { MAX_PER_PAGE = 5; CNT = 800; @@ -1792,6 +1844,7 @@ public void testPutSizeLivelock() throws Exception { * * @throws Exception If failed. */ + @Test public void testPutRmvSizeSinglePageContention() throws Exception { MAX_PER_PAGE = 10; CNT = 20_000; @@ -1913,6 +1966,7 @@ public void testPutRmvSizeSinglePageContention() throws Exception { * * @throws Exception If failed. */ + @Test public void testPutRmvFindSizeMultithreaded() throws Exception { MAX_PER_PAGE = 5; CNT = 60_000; @@ -2050,6 +2104,7 @@ public void testPutRmvFindSizeMultithreaded() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTestRandomPutRemoveMultithreaded_1_30_0() throws Exception { MAX_PER_PAGE = 1; CNT = 30; @@ -2060,6 +2115,7 @@ public void testTestRandomPutRemoveMultithreaded_1_30_0() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTestRandomPutRemoveMultithreaded_1_30_1() throws Exception { MAX_PER_PAGE = 1; CNT = 30; @@ -2070,6 +2126,7 @@ public void testTestRandomPutRemoveMultithreaded_1_30_1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTestRandomPutRemoveMultithreaded_2_50_0() throws Exception { MAX_PER_PAGE = 2; CNT = 50; @@ -2080,6 +2137,7 @@ public void testTestRandomPutRemoveMultithreaded_2_50_0() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTestRandomPutRemoveMultithreaded_2_50_1() throws Exception { MAX_PER_PAGE = 2; CNT = 50; @@ -2090,6 +2148,7 @@ public void testTestRandomPutRemoveMultithreaded_2_50_1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTestRandomPutRemoveMultithreaded_3_70_0() throws Exception { MAX_PER_PAGE = 3; CNT = 70; @@ -2100,6 +2159,7 @@ public void testTestRandomPutRemoveMultithreaded_3_70_0() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTestRandomPutRemoveMultithreaded_3_70_1() throws Exception { MAX_PER_PAGE = 3; CNT = 70; @@ -2110,6 +2170,7 @@ public void testTestRandomPutRemoveMultithreaded_3_70_1() throws Exception { /** * @throws IgniteCheckedException If failed. */ + @Test public void testFindFirstAndLast() throws IgniteCheckedException { MAX_PER_PAGE = 5; @@ -2136,6 +2197,7 @@ public void testFindFirstAndLast() throws IgniteCheckedException { /** * @throws Exception If failed. */ + @Test public void testIterate() throws Exception { MAX_PER_PAGE = 5; @@ -2166,6 +2228,7 @@ public void testIterate() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIterateConcurrentPutRemove() throws Exception { iterateConcurrentPutRemove(); } @@ -2173,6 +2236,7 @@ public void testIterateConcurrentPutRemove() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIterateConcurrentPutRemove_1() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-7265"); @@ -2184,6 +2248,7 @@ public void testIterateConcurrentPutRemove_1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIterateConcurrentPutRemove_5() throws Exception { MAX_PER_PAGE = 5; @@ -2193,6 +2258,7 @@ public void testIterateConcurrentPutRemove_5() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIteratePutRemove_10() throws Exception { MAX_PER_PAGE = 10; @@ -2338,6 +2404,7 @@ private void iterateConcurrentPutRemove() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConcurrentGrowDegenerateTreeAndConcurrentRemove() throws Exception { //calculate tree size when split happens final TestTree t = createTestTree(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/CacheFreeListImplSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/CacheFreeListImplSelfTest.java index 74f80df5bfaa1..4780123fa4cf9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/CacheFreeListImplSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/CacheFreeListImplSelfTest.java @@ -79,6 +79,7 @@ public class CacheFreeListImplSelfTest extends GridCommonAbstractTest { /** * @throws Exception if failed. */ + @Test public void testInsertDeleteSingleThreaded_1024() throws Exception { checkInsertDeleteSingleThreaded(1024); } @@ -86,6 +87,7 @@ public void testInsertDeleteSingleThreaded_1024() throws Exception { /** * @throws Exception if failed. */ + @Test public void testInsertDeleteSingleThreaded_2048() throws Exception { checkInsertDeleteSingleThreaded(2048); } @@ -93,6 +95,7 @@ public void testInsertDeleteSingleThreaded_2048() throws Exception { /** * @throws Exception if failed. */ + @Test public void testInsertDeleteSingleThreaded_4096() throws Exception { checkInsertDeleteSingleThreaded(4096); } @@ -100,6 +103,7 @@ public void testInsertDeleteSingleThreaded_4096() throws Exception { /** * @throws Exception if failed. */ + @Test public void testInsertDeleteSingleThreaded_8192() throws Exception { checkInsertDeleteSingleThreaded(8192); } @@ -107,6 +111,7 @@ public void testInsertDeleteSingleThreaded_8192() throws Exception { /** * @throws Exception if failed. */ + @Test public void testInsertDeleteSingleThreaded_16384() throws Exception { checkInsertDeleteSingleThreaded(16384); } @@ -114,6 +119,7 @@ public void testInsertDeleteSingleThreaded_16384() throws Exception { /** * @throws Exception if failed. */ + @Test public void testInsertDeleteMultiThreaded_1024() throws Exception { checkInsertDeleteMultiThreaded(1024); } @@ -121,6 +127,7 @@ public void testInsertDeleteMultiThreaded_1024() throws Exception { /** * @throws Exception if failed. */ + @Test public void testInsertDeleteMultiThreaded_2048() throws Exception { checkInsertDeleteMultiThreaded(2048); } @@ -128,6 +135,7 @@ public void testInsertDeleteMultiThreaded_2048() throws Exception { /** * @throws Exception if failed. */ + @Test public void testInsertDeleteMultiThreaded_4096() throws Exception { checkInsertDeleteMultiThreaded(4096); } @@ -135,6 +143,7 @@ public void testInsertDeleteMultiThreaded_4096() throws Exception { /** * @throws Exception if failed. */ + @Test public void testInsertDeleteMultiThreaded_8192() throws Exception { checkInsertDeleteMultiThreaded(8192); } @@ -142,6 +151,7 @@ public void testInsertDeleteMultiThreaded_8192() throws Exception { /** * @throws Exception if failed. */ + @Test public void testInsertDeleteMultiThreaded_16384() throws Exception { checkInsertDeleteMultiThreaded(16384); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/DataRegionMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/DataRegionMetricsSelfTest.java index 122f50e964629..6381825209076 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/DataRegionMetricsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/DataRegionMetricsSelfTest.java @@ -61,6 +61,7 @@ public class DataRegionMetricsSelfTest extends GridCommonAbstractTest { * Test for allocationRate metric in single-threaded mode. * @throws Exception if any happens during test. */ + @Test public void testAllocationRateSingleThreaded() throws Exception { threadsCnt = 1; memMetrics.rateTimeInterval(RATE_TIME_INTERVAL_2); @@ -84,6 +85,7 @@ public void testAllocationRateSingleThreaded() throws Exception { * Test for allocationRate metric in multi-threaded mode with short silent period in the middle of the test. * @throws Exception if any happens during test. */ + @Test public void testAllocationRateMultiThreaded() throws Exception { threadsCnt = 4; memMetrics.rateTimeInterval(RATE_TIME_INTERVAL_1); @@ -123,6 +125,7 @@ public void testAllocationRateMultiThreaded() throws Exception { * Test verifies that allocationRate calculation algorithm survives setting new values to rateTimeInterval parameter. * @throws Exception if any happens during test. */ + @Test public void testAllocationRateTimeIntervalConcurrentChange() throws Exception { threadsCnt = 5; memMetrics.rateTimeInterval(RATE_TIME_INTERVAL_1); @@ -153,6 +156,7 @@ public void testAllocationRateTimeIntervalConcurrentChange() throws Exception { * * @throws Exception if any happens during test. */ + @Test public void testAllocationRateSubintervalsConcurrentChange() throws Exception { threadsCnt = 5; memMetrics.rateTimeInterval(RATE_TIME_INTERVAL_1); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbDynamicCacheSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbDynamicCacheSelfTest.java index 126ed5ffbe86a..a726a04e55c7e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbDynamicCacheSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbDynamicCacheSelfTest.java @@ -79,6 +79,7 @@ public class IgniteDbDynamicCacheSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCreate() throws Exception { int iterations = 200; @@ -112,6 +113,7 @@ public void testCreate() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultipleDynamicCaches() throws Exception { int caches = 10; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbMemoryLeakAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbMemoryLeakAbstractTest.java index 81b5515f29044..166e58f4bc280 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbMemoryLeakAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbMemoryLeakAbstractTest.java @@ -173,6 +173,7 @@ protected static int nextInt() { /** * @throws Exception If failed. */ + @Test public void testMemoryLeak() throws Exception { final IgniteEx ignite = grid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbPutGetAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbPutGetAbstractTest.java index f17028070aa55..5a9557fcf8c81 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbPutGetAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbPutGetAbstractTest.java @@ -78,6 +78,7 @@ private IgniteCache cache(String name) throws Exception { /** * */ + @Test public void testGradualRandomPutAllRemoveAll() throws Exception { IgniteCache cache = cache(DEFAULT_CACHE_NAME); @@ -138,6 +139,7 @@ private void doPutRemoveAll(Random rnd, IgniteCache cache, Map /** * */ + @Test public void testRandomRemove() throws Exception { IgniteCache cache = cache(DEFAULT_CACHE_NAME); @@ -177,6 +179,7 @@ public void testRandomRemove() throws Exception { /** */ + @Test public void testRandomPut() throws Exception { IgniteCache cache = cache(DEFAULT_CACHE_NAME); @@ -205,6 +208,7 @@ public void testRandomPut() throws Exception { /** * @throws Exception if failed. */ + @Test public void testPutGetSimple() throws Exception { IgniteCache cache = cache(DEFAULT_CACHE_NAME); @@ -229,6 +233,7 @@ public void testPutGetSimple() throws Exception { /** * @throws Exception if failed. */ + @Test public void testPutGetLarge() throws Exception { IgniteCache cache = cache(DEFAULT_CACHE_NAME); @@ -271,6 +276,7 @@ public void testPutGetLarge() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutGetLargeKeys() throws Exception { IgniteCache cache = ignite(0).cache(DEFAULT_CACHE_NAME); @@ -319,6 +325,7 @@ private int[] randomInts(final int size) { /** * @throws Exception if failed. */ + @Test public void testPutGetOverwrite() throws Exception { final IgniteCache cache = cache(DEFAULT_CACHE_NAME); @@ -347,6 +354,7 @@ public void testPutGetOverwrite() throws Exception { /** * @throws Exception if failed. */ + @Test public void testOverwriteNormalSizeAfterSmallerSize() throws Exception { final IgniteCache cache = cache(DEFAULT_CACHE_NAME); @@ -371,6 +379,7 @@ public void testOverwriteNormalSizeAfterSmallerSize() throws Exception { /** * @throws Exception if failed. */ + @Test public void testPutDoesNotTriggerRead() throws Exception { IgniteEx ig = grid(0); @@ -382,6 +391,7 @@ public void testPutDoesNotTriggerRead() throws Exception { /** * @throws Exception if failed. */ + @Test public void testPutGetMultipleObjects() throws Exception { final IgniteCache cache = cache(DEFAULT_CACHE_NAME); @@ -455,6 +465,7 @@ public void testPutGetMultipleObjects() throws Exception { /** * @throws Exception if failed. */ + @Test public void testSizeClear() throws Exception { final IgniteCache cache = cache(DEFAULT_CACHE_NAME); @@ -491,6 +502,7 @@ public void testSizeClear() throws Exception { /** * @throws Exception if failed. */ + @Test public void testBounds() throws Exception { IgniteEx ig = ig(); @@ -549,6 +561,7 @@ public void testBounds() throws Exception { /** * @throws Exception if failed. */ + @Test public void testMultithreadedPut() throws Exception { IgniteEx ig = ig(); @@ -613,6 +626,7 @@ public void testMultithreadedPut() throws Exception { /** * @throws Exception if failed. */ + @Test public void testPutGetRandomUniqueMultipleObjects() throws Exception { final IgniteCache cache = cache(DEFAULT_CACHE_NAME); @@ -680,6 +694,7 @@ private static int[] generateUniqueRandomKeys(int cnt, Random rnd) { /** * @throws Exception If failed. */ + @Test public void testPutPrimaryUniqueSecondaryDuplicates() throws Exception { final IgniteCache cache = cache(DEFAULT_CACHE_NAME); @@ -724,6 +739,7 @@ public void testPutPrimaryUniqueSecondaryDuplicates() throws Exception { /** * @throws Exception if failed. */ + @Test public void testPutGetRandomNonUniqueMultipleObjects() throws Exception { final IgniteCache cache = cache(DEFAULT_CACHE_NAME); @@ -770,6 +786,7 @@ public void testPutGetRandomNonUniqueMultipleObjects() throws Exception { /** * @throws Exception if failed. */ + @Test public void testPutGetRemoveMultipleForward() throws Exception { final IgniteCache cache = cache(DEFAULT_CACHE_NAME); @@ -814,6 +831,7 @@ public void testPutGetRemoveMultipleForward() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRandomPutGetRemove() throws Exception { final IgniteCache cache = cache(DEFAULT_CACHE_NAME); @@ -861,6 +879,7 @@ public void testRandomPutGetRemove() throws Exception { assertEquals(map.get(key), cache.get(key)); } + @Test public void testPutGetRemoveMultipleBackward() throws Exception { final IgniteCache cache = cache(DEFAULT_CACHE_NAME); @@ -905,6 +924,7 @@ public void testPutGetRemoveMultipleBackward() throws Exception { /** * @throws Exception if failed. */ + @Test public void testIndexOverwrite() throws Exception { final IgniteCache cache = cache(DEFAULT_CACHE_NAME); @@ -948,6 +968,7 @@ public void testIndexOverwrite() throws Exception { /** * @throws Exception if failed. */ + @Test public void testObjectKey() throws Exception { IgniteEx ig = ig(); @@ -993,6 +1014,7 @@ public void testObjectKey() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIterators() throws Exception { IgniteEx ignite = ig(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbPutGetWithCacheStoreTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbPutGetWithCacheStoreTest.java index 8cca7f40e6ac1..74ba710ffcdef 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbPutGetWithCacheStoreTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbPutGetWithCacheStoreTest.java @@ -93,6 +93,7 @@ public class IgniteDbPutGetWithCacheStoreTest extends GridCommonAbstractTest { /** * @throws Exception if failed. */ + @Test public void testWriteThrough() throws Exception { checkWriteThrough(ATOMIC); checkWriteThrough(TRANSACTIONAL); @@ -101,6 +102,7 @@ public void testWriteThrough() throws Exception { /** * @throws Exception if failed. */ + @Test public void testReadThrough() throws Exception { checkReadThrough(ATOMIC); checkReadThrough(TRANSACTIONAL); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbSingleNodeTinyPutGetTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbSingleNodeTinyPutGetTest.java index 345eb86011b44..982d82d24cd84 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbSingleNodeTinyPutGetTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbSingleNodeTinyPutGetTest.java @@ -30,6 +30,7 @@ public class IgniteDbSingleNodeTinyPutGetTest extends IgniteDbSingleNodePutGetTe } /** */ + @Test public void testPutGetTiny() { IgniteEx ig = grid(0); @@ -43,107 +44,128 @@ public void testPutGetTiny() { } /** {@inheritDoc} */ - @Override public void testGradualRandomPutAllRemoveAll() { + @Override @Test + public void testGradualRandomPutAllRemoveAll() { // No-op } /** {@inheritDoc} */ - @Override public void testRandomRemove() { + @Override @Test + public void testRandomRemove() { // No-op } /** {@inheritDoc} */ - @Override public void testRandomPut() { + @Override @Test + public void testRandomPut() { // No-op } /** {@inheritDoc} */ - @Override public void testPutGetSimple() { + @Override @Test + public void testPutGetSimple() { // No-op } /** {@inheritDoc} */ - @Override public void testPutGetLarge() { + @Override @Test + public void testPutGetLarge() { // No-op } /** {@inheritDoc} */ - @Override public void testPutGetOverwrite() { + @Override @Test + public void testPutGetOverwrite() { // No-op } /** {@inheritDoc} */ - @Override public void testOverwriteNormalSizeAfterSmallerSize() { + @Override @Test + public void testOverwriteNormalSizeAfterSmallerSize() { // No-op } /** {@inheritDoc} */ - @Override public void testPutDoesNotTriggerRead() { + @Override @Test + public void testPutDoesNotTriggerRead() { // No-op } /** {@inheritDoc} */ - @Override public void testPutGetMultipleObjects() { + @Override @Test + public void testPutGetMultipleObjects() { // No-op } /** {@inheritDoc} */ - @Override public void testSizeClear() { + @Override @Test + public void testSizeClear() { // No-op } /** {@inheritDoc} */ - @Override public void testBounds() { + @Override @Test + public void testBounds() { // No-op } /** {@inheritDoc} */ - @Override public void testMultithreadedPut() { + @Override @Test + public void testMultithreadedPut() { // No-op } /** {@inheritDoc} */ - @Override public void testPutGetRandomUniqueMultipleObjects() { + @Override @Test + public void testPutGetRandomUniqueMultipleObjects() { // No-op } /** {@inheritDoc} */ - @Override public void testPutPrimaryUniqueSecondaryDuplicates() { + @Override @Test + public void testPutPrimaryUniqueSecondaryDuplicates() { // No-op } /** {@inheritDoc} */ - @Override public void testPutGetRandomNonUniqueMultipleObjects() { + @Override @Test + public void testPutGetRandomNonUniqueMultipleObjects() { // No-op } /** {@inheritDoc} */ - @Override public void testPutGetRemoveMultipleForward() { + @Override @Test + public void testPutGetRemoveMultipleForward() { // No-op } /** {@inheritDoc} */ - @Override public void testRandomPutGetRemove() { + @Override @Test + public void testRandomPutGetRemove() { // No-op } /** {@inheritDoc} */ - @Override public void testPutGetRemoveMultipleBackward() { + @Override @Test + public void testPutGetRemoveMultipleBackward() { // No-op } /** {@inheritDoc} */ - @Override public void testIndexOverwrite() { + @Override @Test + public void testIndexOverwrite() { // No-op } /** {@inheritDoc} */ - @Override public void testObjectKey() { + @Override @Test + public void testObjectKey() { // No-op } /** {@inheritDoc} */ - @Override public void testIterators() { + @Override @Test + public void testIterators() { // No-op } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IndexStorageSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IndexStorageSelfTest.java index bbdcd383ed9de..a17a39880dd95 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IndexStorageSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IndexStorageSelfTest.java @@ -57,6 +57,7 @@ public class IndexStorageSelfTest extends GridCommonAbstractTest { /** * @throws Exception if failed. */ + @Test public void testMetaIndexAllocation() throws Exception { metaAllocation(); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/SwapPathConstructionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/SwapPathConstructionSelfTest.java index 5910a35efdc56..ccd60bff70680 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/SwapPathConstructionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/SwapPathConstructionSelfTest.java @@ -78,6 +78,7 @@ private void cleanUpSwapDir() { /** * Verifies relative swap file path construction. Directory with swap files is cleaned up during after-test phase. */ + @Test public void testRelativeSwapFilePath() throws Exception { memCfg = createMemoryConfiguration(true); @@ -94,6 +95,7 @@ public void testRelativeSwapFilePath() throws Exception { * Verifies absolute swap file path construction. System tmp directory is used to allocate swap files, * so no clean up is needed. */ + @Test public void testAbsoluteSwapFilePath() throws Exception { memCfg = createMemoryConfiguration(false); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorMvccSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorMvccSelfTest.java index ca8be09a18bc2..e071716995f0d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorMvccSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorMvccSelfTest.java @@ -51,19 +51,22 @@ public class DataStreamProcessorMvccSelfTest extends DataStreamProcessorSelfTest } /** {@inheritDoc} */ - @Override public void testUpdateStore() throws Exception { + @Override @Test + public void testUpdateStore() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-8582"); super.testUpdateStore(); } /** {@inheritDoc} */ - @Override public void testFlushTimeout() { + @Override @Test + public void testFlushTimeout() { fail("https://issues.apache.org/jira/browse/IGNITE-9321"); } /** {@inheritDoc} */ - @Override public void testLocal() { + @Override @Test + public void testLocal() { // Do not check local caches with MVCC enabled. } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorSelfTest.java index 39f43e34ec0e5..7b06aa6f4f380 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorSelfTest.java @@ -192,6 +192,7 @@ protected boolean customKeepBinary() { /** * @throws Exception If failed. */ + @Test public void testPartitioned() throws Exception { mode = PARTITIONED; @@ -201,6 +202,7 @@ public void testPartitioned() throws Exception { /** * @throws Exception If failed. */ + @Test public void testColocated() throws Exception { mode = PARTITIONED; nearEnabled = false; @@ -211,6 +213,7 @@ public void testColocated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReplicated() throws Exception { mode = REPLICATED; @@ -220,6 +223,7 @@ public void testReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLocal() throws Exception { mode = LOCAL; @@ -337,6 +341,7 @@ private void checkDataStreamer() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPartitionedIsolated() throws Exception { mode = PARTITIONED; @@ -346,6 +351,7 @@ public void testPartitionedIsolated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReplicatedIsolated() throws Exception { mode = REPLICATED; @@ -440,6 +446,7 @@ private void checkIsolatedDataStreamer() throws Exception { * * @throws Exception If failed. */ + @Test public void testPrimitiveArrays() throws Exception { try { useCache = true; @@ -473,6 +480,7 @@ public void testPrimitiveArrays() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReplicatedMultiThreaded() throws Exception { mode = REPLICATED; @@ -482,6 +490,7 @@ public void testReplicatedMultiThreaded() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPartitionedMultiThreaded() throws Exception { mode = PARTITIONED; @@ -613,6 +622,7 @@ protected void checkLoaderMultithreaded(int nodesCntNoCache, int nodesCntCache) /** * @throws Exception If failed. */ + @Test public void testLoaderApi() throws Exception { useCache = true; @@ -769,6 +779,7 @@ private static IgniteClosure removeClosure(@Nullable final T exp) { /** * @throws Exception If failed. */ + @Test public void testFlush() throws Exception { // Local caches are not allowed with MVCC enabled. mode = getCacheAtomicityMode() != TRANSACTIONAL_SNAPSHOT ? LOCAL : PARTITIONED; @@ -824,6 +835,7 @@ public Void call() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTryFlush() throws Exception { // Local caches are not allowed with MVCC enabled. mode = getCacheAtomicityMode() != TRANSACTIONAL_SNAPSHOT ? LOCAL : PARTITIONED; @@ -862,6 +874,7 @@ public void testTryFlush() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFlushTimeout() throws Exception { // Local caches are not allowed with MVCC enabled. mode = getCacheAtomicityMode() != TRANSACTIONAL_SNAPSHOT ? LOCAL : PARTITIONED; @@ -916,6 +929,7 @@ public void testFlushTimeout() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUpdateStore() throws Exception { storeMap = new ConcurrentHashMap<>(); @@ -988,6 +1002,7 @@ public void testUpdateStore() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCustomUserUpdater() throws Exception { useCache = true; @@ -1026,6 +1041,7 @@ public void testCustomUserUpdater() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLocalDataStreamerDedicatedThreadPool() throws Exception { try { useCache = true; @@ -1070,6 +1086,7 @@ public void testLocalDataStreamerDedicatedThreadPool() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemoteDataStreamerDedicatedThreadPool() throws Exception { try { useCache = true; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerClientReconnectAfterClusterRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerClientReconnectAfterClusterRestartTest.java index 239647c58529b..56e08a1535138 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerClientReconnectAfterClusterRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerClientReconnectAfterClusterRestartTest.java @@ -53,21 +53,25 @@ public class DataStreamerClientReconnectAfterClusterRestartTest extends GridComm } /** */ + @Test public void testOneClient() throws Exception { clusterRestart(false, false); } /** */ + @Test public void testOneClientAllowOverwrite() throws Exception { clusterRestart(false, true); } /** */ + @Test public void testTwoClients() throws Exception { clusterRestart(true, false); } /** */ + @Test public void testTwoClientsAllowOverwrite() throws Exception { clusterRestart(true, true); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImplSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImplSelfTest.java index e4c7660386394..345499f2488e9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImplSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImplSelfTest.java @@ -114,6 +114,7 @@ public class DataStreamerImplSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCloseWithCancellation() throws Exception { cnt = 0; @@ -142,6 +143,7 @@ public void testCloseWithCancellation() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNullPointerExceptionUponDataStreamerClosing() throws Exception { cnt = 0; @@ -189,6 +191,7 @@ public void testNullPointerExceptionUponDataStreamerClosing() throws Exception { * * @throws Exception If failed. */ + @Test public void testAddDataFromMap() throws Exception { cnt = 0; @@ -225,6 +228,7 @@ public void testAddDataFromMap() throws Exception { * * @throws Exception If fail. */ + @Test public void testNoDataNodesOnClose() throws Exception { boolean failed = false; @@ -254,6 +258,7 @@ public void testNoDataNodesOnClose() throws Exception { * * @throws Exception If fail. */ + @Test public void testNoDataNodesOnFlush() throws Exception { boolean failed = false; @@ -296,6 +301,7 @@ public void testNoDataNodesOnFlush() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAllOperationFinishedBeforeFutureCompletion() throws Exception { cnt = 0; @@ -348,6 +354,7 @@ public void testAllOperationFinishedBeforeFutureCompletion() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemapOnTopologyChangeDuringUpdatePreparation() throws Exception { cnt = 0; @@ -430,6 +437,7 @@ public void testRemapOnTopologyChangeDuringUpdatePreparation() throws Exception * * @throws Exception if failed */ + @Test public void testRetryWhenTopologyMismatch() throws Exception { final int KEY = 1; final String VAL = "1"; @@ -465,6 +473,7 @@ public void testRetryWhenTopologyMismatch() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientEventsNotCausingRemaps() throws Exception { Ignite ignite = startGrids(2); @@ -493,6 +502,7 @@ public void testClientEventsNotCausingRemaps() throws Exception { /** * @throws Exception If failed. */ + @Test public void testServerEventsCauseRemaps() throws Exception { Ignite ignite = startGrids(2); @@ -525,6 +535,7 @@ public void testServerEventsCauseRemaps() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDataStreamerWaitsUntilDynamicCacheStartIsFinished() throws Exception { final Ignite ignite0 = startGrids(2); final Ignite ignite1 = grid(1); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultiThreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultiThreadedSelfTest.java index 6d7b367727b9a..3226ff81d100b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultiThreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultiThreadedSelfTest.java @@ -84,6 +84,7 @@ private CacheConfiguration cacheConfiguration() { /** * @throws Exception If failed. */ + @Test public void testStartStopIgnites() throws Exception { startStopIgnites(); } @@ -91,6 +92,7 @@ public void testStartStopIgnites() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStartStopIgnitesDynamicCache() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-1602"); @@ -141,4 +143,4 @@ private void startStopIgnites() throws Exception { stopAllGrids(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultinodeCreateCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultinodeCreateCacheTest.java index 3725288fdd938..daf3160e493ee 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultinodeCreateCacheTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultinodeCreateCacheTest.java @@ -57,6 +57,7 @@ public class DataStreamerMultinodeCreateCacheTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testCreateCacheAndStream() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-1603"); @@ -99,4 +100,4 @@ public void testCreateCacheAndStream() throws Exception { fut.get(2 * 60_000); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerTimeoutTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerTimeoutTest.java index 6e88adf1d54e1..d262113a57e10 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerTimeoutTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerTimeoutTest.java @@ -79,6 +79,7 @@ private CacheConfiguration cacheConfiguration() { * Test timeout on {@code DataStreamer.addData()} method * @throws Exception If fail. */ + @Test public void testTimeoutOnCloseMethod() throws Exception { failOn = 1; @@ -109,6 +110,7 @@ public void testTimeoutOnCloseMethod() throws Exception { * * @throws Exception If fail. */ + @Test public void testTimeoutOnAddData() throws Exception { failOn = 1; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerUpdateAfterLoadTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerUpdateAfterLoadTest.java index bdfc1168f7e1f..76fb6bbc787c6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerUpdateAfterLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerUpdateAfterLoadTest.java @@ -71,6 +71,7 @@ public class DataStreamerUpdateAfterLoadTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testUpdateAfterLoad() throws Exception { Ignite ignite0 = ignite(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/IgniteDataStreamerPerformanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/IgniteDataStreamerPerformanceTest.java index f7c82942270ac..7db4049b1753c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/IgniteDataStreamerPerformanceTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/IgniteDataStreamerPerformanceTest.java @@ -115,6 +115,7 @@ public class IgniteDataStreamerPerformanceTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPerformance() throws Exception { doTest(); } @@ -195,4 +196,4 @@ private void doTest() throws Exception { stopAllGrids(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractSelfTest.java index 497d66e7860df..687de8a9f31fa 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractSelfTest.java @@ -82,6 +82,7 @@ protected IgfsAbstractSelfTest(IgfsMode mode) { * * @throws Exception If failed. */ + @Test public void testExists() throws Exception { create(igfs, paths(DIR), null); @@ -93,6 +94,7 @@ public void testExists() throws Exception { * * @throws Exception If failed. */ + @Test public void testExistsPathDoesNotExist() throws Exception { assert !igfs.exists(DIR); } @@ -102,6 +104,7 @@ public void testExistsPathDoesNotExist() throws Exception { * * @throws Exception If failed. */ + @Test public void testListFiles() throws Exception { create(igfs, paths(DIR, SUBDIR, SUBSUBDIR), paths(FILE)); @@ -124,6 +127,7 @@ public void testListFiles() throws Exception { * * @throws Exception If failed. */ + @Test public void testListFilesPathDoesNotExist() throws Exception { Collection paths = null; @@ -142,6 +146,7 @@ public void testListFilesPathDoesNotExist() throws Exception { * * @throws Exception If failed. */ + @Test public void testInfo() throws Exception { create(igfs, paths(DIR), null); @@ -157,6 +162,7 @@ public void testInfo() throws Exception { * * @throws Exception If failed. */ + @Test public void testInfoPathDoesNotExist() throws Exception { IgfsFile info = null; @@ -176,6 +182,7 @@ public void testInfoPathDoesNotExist() throws Exception { * * @throws Exception If failed. */ + @Test public void testRenameFile() throws Exception { create(igfs, paths(DIR, SUBDIR), paths(FILE)); @@ -190,6 +197,7 @@ public void testRenameFile() throws Exception { * * @throws Exception If failed. */ + @Test public void testRenameFileParentRoot() throws Exception { IgfsPath file1 = new IgfsPath("/file1"); IgfsPath file2 = new IgfsPath("/file2"); @@ -208,6 +216,7 @@ public void testRenameFileParentRoot() throws Exception { * * @throws Exception If failed. */ + @Test public void testRenameDirectory() throws Exception { create(igfs, paths(DIR, SUBDIR), null); @@ -222,6 +231,7 @@ public void testRenameDirectory() throws Exception { * * @throws Exception If failed. */ + @Test public void testRenameDirectoryParentRoot() throws Exception { IgfsPath dir1 = new IgfsPath("/dir1"); IgfsPath dir2 = new IgfsPath("/dir2"); @@ -240,6 +250,7 @@ public void testRenameDirectoryParentRoot() throws Exception { * * @throws Exception If failed. */ + @Test public void testMoveFile() throws Exception { create(igfs, paths(DIR, SUBDIR, DIR_NEW, SUBDIR_NEW), paths(FILE)); @@ -254,6 +265,7 @@ public void testMoveFile() throws Exception { * * @throws Exception If failed. */ + @Test public void testMoveFileDestinationRoot() throws Exception { create(igfs, paths(DIR, SUBDIR), paths(FILE)); @@ -268,6 +280,7 @@ public void testMoveFileDestinationRoot() throws Exception { * * @throws Exception If failed. */ + @Test public void testMoveFileSourceParentRoot() throws Exception { IgfsPath file = new IgfsPath("/" + FILE.name()); @@ -285,6 +298,7 @@ public void testMoveFileSourceParentRoot() throws Exception { * * @throws Exception If failed. */ + @Test public void testMoveRenameFile() throws Exception { create(igfs, paths(DIR, SUBDIR, DIR_NEW, SUBDIR_NEW), paths(FILE)); @@ -299,6 +313,7 @@ public void testMoveRenameFile() throws Exception { * * @throws Exception If failed. */ + @Test public void testMoveRenameFileDestinationRoot() throws Exception { IgfsPath file = new IgfsPath("/" + FILE.name()); @@ -315,6 +330,7 @@ public void testMoveRenameFileDestinationRoot() throws Exception { * * @throws Exception If failed. */ + @Test public void testMoveRenameFileSourceParentRoot() throws Exception { IgfsPath file = new IgfsPath("/" + FILE_NEW.name()); @@ -332,6 +348,7 @@ public void testMoveRenameFileSourceParentRoot() throws Exception { * * @throws Exception If failed. */ + @Test public void testMoveDirectory() throws Exception { create(igfs, paths(DIR, SUBDIR, SUBSUBDIR, DIR_NEW, SUBDIR_NEW), null); @@ -346,6 +363,7 @@ public void testMoveDirectory() throws Exception { * * @throws Exception If failed. */ + @Test public void testMoveDirectoryDestinationRoot() throws Exception { create(igfs, paths(DIR, SUBDIR, SUBSUBDIR), null); @@ -360,6 +378,7 @@ public void testMoveDirectoryDestinationRoot() throws Exception { * * @throws Exception If failed. */ + @Test public void testMoveDirectorySourceParentRoot() throws Exception { IgfsPath dir = new IgfsPath("/" + SUBSUBDIR.name()); @@ -377,6 +396,7 @@ public void testMoveDirectorySourceParentRoot() throws Exception { * * @throws Exception If failed. */ + @Test public void testMoveRenameDirectory() throws Exception { create(igfs, paths(DIR, SUBDIR, SUBSUBDIR, DIR_NEW, SUBDIR_NEW), null); @@ -391,6 +411,7 @@ public void testMoveRenameDirectory() throws Exception { * * @throws Exception If failed. */ + @Test public void testMoveRenameDirectoryDestinationRoot() throws Exception { IgfsPath dir = new IgfsPath("/" + SUBSUBDIR.name()); @@ -407,6 +428,7 @@ public void testMoveRenameDirectoryDestinationRoot() throws Exception { * * @throws Exception If failed. */ + @Test public void testMoveRenameDirectorySourceParentRoot() throws Exception { IgfsPath dir = new IgfsPath("/" + SUBSUBDIR_NEW.name()); @@ -423,6 +445,7 @@ public void testMoveRenameDirectorySourceParentRoot() throws Exception { * * @throws Exception If failed. */ + @Test public void testMoveRenameSourceDoesNotExist() throws Exception { create(igfs, paths(DIR, DIR_NEW), null); @@ -443,6 +466,7 @@ public void testMoveRenameSourceDoesNotExist() throws Exception { * @throws Exception If failed. */ @SuppressWarnings("ConstantConditions") + @Test public void testMkdirs() throws Exception { if (!propertiesSupported()) return; @@ -520,6 +544,7 @@ public void testMkdirs() throws Exception { * @throws Exception If failed. */ @SuppressWarnings("ConstantConditions") + @Test public void testMkdirsParentRoot() throws Exception { Map props = null; @@ -546,6 +571,7 @@ public void testMkdirsParentRoot() throws Exception { * * @throws Exception If failed. */ + @Test public void testDelete() throws Exception { create(igfs, paths(DIR, SUBDIR, SUBSUBDIR), paths(FILE)); @@ -559,6 +585,7 @@ public void testDelete() throws Exception { * * @throws Exception If failed. */ + @Test public void testDeleteParentRoot() throws Exception { create(igfs, paths(DIR, SUBDIR, SUBSUBDIR), paths(FILE)); @@ -572,6 +599,7 @@ public void testDeleteParentRoot() throws Exception { * * @throws Exception If failed. */ + @Test public void testDeleteDirectoryNotEmpty() throws Exception { create(igfs, paths(DIR, SUBDIR, SUBSUBDIR), paths(FILE)); checkExist(igfs, igfsSecondary, SUBDIR, SUBSUBDIR, FILE); @@ -594,6 +622,7 @@ public void testDeleteDirectoryNotEmpty() throws Exception { * @throws Exception If failed. */ @SuppressWarnings("ConstantConditions") + @Test public void testUpdate() throws Exception { if(!propertiesSupported()) return; @@ -616,6 +645,7 @@ public void testUpdate() throws Exception { * @throws Exception If failed. */ @SuppressWarnings("ConstantConditions") + @Test public void testUpdateParentRoot() throws Exception { if(!propertiesSupported()) return; @@ -637,6 +667,7 @@ public void testUpdateParentRoot() throws Exception { * * @throws Exception If failed. */ + @Test public void testUpdatePathDoesNotExist() throws Exception { final Map props = properties("owner", "group", "0555"); @@ -651,6 +682,7 @@ public void testUpdatePathDoesNotExist() throws Exception { * @throws Exception If failed. */ @SuppressWarnings("ConstantConditions") + @Test public void testFormat() throws Exception { if (mode == PROXY) return; @@ -721,6 +753,7 @@ public void testFormat() throws Exception { * * @throws Exception If failed. */ + @Test public void testRootPropertiesPersistAfterFormat() throws Exception { if(!propertiesSupported()) return; @@ -761,6 +794,7 @@ private void checkRootPropertyUpdate(String prop, String setVal, String expGetVa * * @throws Exception If failed. */ + @Test public void testOpen() throws Exception { create(igfs, paths(DIR, SUBDIR), null); @@ -777,6 +811,7 @@ public void testOpen() throws Exception { * * @throws Exception If failed. */ + @Test public void testOpenDoesNotExist() throws Exception { igfsSecondary.delete(FILE.toString(), false); @@ -800,6 +835,7 @@ public void testOpenDoesNotExist() throws Exception { * * @throws Exception If failed. */ + @Test public void testSetTimes() throws Exception { createFile(igfs, FILE, true, chunk); @@ -909,6 +945,7 @@ private void checkSetTimes(IgfsPath path) throws Exception { * @throws Exception If failed. */ @SuppressWarnings({"ConstantConditions", "EmptyTryBlock"}) + @Test public void testCreate() throws Exception { create(igfs, paths(DIR, SUBDIR), null); @@ -993,6 +1030,7 @@ public void testCreate() throws Exception { * * @throws Exception If failed. */ + @Test public void testCreateParentRoot() throws Exception { IgfsPath file = new IgfsPath("/" + FILE.name()); @@ -1006,6 +1044,7 @@ public void testCreateParentRoot() throws Exception { * * @throws Exception If failed. */ + @Test public void testCreateNoClose() throws Exception { if (mode != PRIMARY) return; @@ -1035,6 +1074,7 @@ public void testCreateNoClose() throws Exception { * * @throws Exception If failed. */ + @Test public void testCreateRenameNoClose() throws Exception { if (dual) return; @@ -1060,6 +1100,7 @@ public void testCreateRenameNoClose() throws Exception { * * @throws Exception If failed. */ + @Test public void testCreateRenameParentNoClose() throws Exception { if (dual) return; @@ -1085,6 +1126,7 @@ public void testCreateRenameParentNoClose() throws Exception { * * @throws Exception If failed. */ + @Test public void testCreateDeleteNoClose() throws Exception { if (mode != PRIMARY) return; @@ -1139,6 +1181,7 @@ public void testCreateDeleteNoClose() throws Exception { * * @throws Exception If failed. */ + @Test public void testCreateDeleteParentNoClose() throws Exception { if (mode != PRIMARY) return; @@ -1193,6 +1236,7 @@ public void testCreateDeleteParentNoClose() throws Exception { * * @throws Exception If failed. */ + @Test public void testCreateUpdateNoClose() throws Exception { if (dual) return; @@ -1223,6 +1267,7 @@ public void testCreateUpdateNoClose() throws Exception { * * @throws Exception On error. */ + @Test public void testSimpleWrite() throws Exception { IgfsPath path = new IgfsPath("/file1"); @@ -1258,6 +1303,7 @@ public void testSimpleWrite() throws Exception { * * @throws Exception If failed. */ + @Test public void testCreateConsistency() throws Exception { final AtomicInteger ctr = new AtomicInteger(); final AtomicReference err = new AtomicReference<>(); @@ -1300,6 +1346,7 @@ public void testCreateConsistency() throws Exception { * * @throws Exception If failed. */ + @Test public void testCreateConsistencyMultithreaded() throws Exception { final AtomicBoolean stop = new AtomicBoolean(); @@ -1379,6 +1426,7 @@ public void testCreateConsistencyMultithreaded() throws Exception { * @throws Exception If failed. */ @SuppressWarnings({"EmptyTryBlock"}) + @Test public void testAppend() throws Exception { if (appendSupported()) { create(igfs, paths(DIR, SUBDIR), null); @@ -1519,6 +1567,7 @@ public void testAppend() throws Exception { * * @throws Exception If failed. */ + @Test public void testAppendParentRoot() throws Exception { if (appendSupported()) { IgfsPath file = new IgfsPath("/" + FILE.name()); @@ -1536,6 +1585,7 @@ public void testAppendParentRoot() throws Exception { * * @throws Exception If failed. */ + @Test public void testAppendNoClose() throws Exception { if (mode != PRIMARY) return; @@ -1570,6 +1620,7 @@ public Object call() throws Exception { * * @throws Exception If failed. */ + @Test public void testAppendRenameNoClose() throws Exception { if (dual) return; @@ -1598,6 +1649,7 @@ public void testAppendRenameNoClose() throws Exception { * * @throws Exception If failed. */ + @Test public void testAppendRenameParentNoClose() throws Exception { if (dual) return; @@ -1626,6 +1678,7 @@ public void testAppendRenameParentNoClose() throws Exception { * * @throws Exception If failed. */ + @Test public void testAppendDeleteNoClose() throws Exception { if (mode != PRIMARY) return; @@ -1681,6 +1734,7 @@ public boolean apply() { * * @throws Exception If failed. */ + @Test public void testAppendDeleteParentNoClose() throws Exception { if (mode != PRIMARY) return; @@ -1736,6 +1790,7 @@ public boolean apply() { * * @throws Exception If failed. */ + @Test public void testAppendUpdateNoClose() throws Exception { if (dual) return; @@ -1767,6 +1822,7 @@ public void testAppendUpdateNoClose() throws Exception { * * @throws Exception If failed. */ + @Test public void testAppendConsistency() throws Exception { if (appendSupported()) { final AtomicInteger ctr = new AtomicInteger(); @@ -1818,6 +1874,7 @@ public void run() { * * @throws Exception If failed. */ + @Test public void testAppendConsistencyMultithreaded() throws Exception { if (appendSupported()) { final AtomicBoolean stop = new AtomicBoolean(); @@ -1891,6 +1948,7 @@ public void run() { * * @throws Exception If failed. */ + @Test public void testStop() throws Exception { create(igfs, paths(DIR, SUBDIR), null); @@ -1911,6 +1969,7 @@ public void testStop() throws Exception { * * @throws Exception If failed. */ + @Test public void testConcurrentMkdirsDelete() throws Exception { for (int i = 0; i < REPEAT_CNT; i++) { final CyclicBarrier barrier = new CyclicBarrier(2); @@ -1959,6 +2018,7 @@ public void testConcurrentMkdirsDelete() throws Exception { * * @throws Exception If failed. */ + @Test public void testConcurrentRenameDeleteSource() throws Exception { for (int i = 0; i < REPEAT_CNT; i++) { final CyclicBarrier barrier = new CyclicBarrier(2); @@ -2023,6 +2083,7 @@ public void testConcurrentRenameDeleteSource() throws Exception { * * @throws Exception If failed. */ + @Test public void testConcurrentRenameDeleteDestination() throws Exception { for (int i = 0; i < REPEAT_CNT; i++) { final CyclicBarrier barrier = new CyclicBarrier(2); @@ -2079,6 +2140,7 @@ public void testConcurrentRenameDeleteDestination() throws Exception { * * @throws Exception If failed. */ + @Test public void testConcurrentRenames() throws Exception { for (int i = 0; i < REPEAT_CNT; i++) { final CyclicBarrier barrier = new CyclicBarrier(2); @@ -2139,6 +2201,7 @@ public void testConcurrentRenames() throws Exception { * * @throws Exception If failed. */ + @Test public void testConcurrentDeletes() throws Exception { for (int i = 0; i < REPEAT_CNT; i++) { final CyclicBarrier barrier = new CyclicBarrier(2); @@ -2186,6 +2249,7 @@ public void testConcurrentDeletes() throws Exception { * * @throws Exception If failed. */ + @Test public void testDeadlocksRename() throws Exception { checkDeadlocksRepeat(5, 2, 2, 2, RENAME_CNT, 0, 0, 0, 0); } @@ -2195,6 +2259,7 @@ public void testDeadlocksRename() throws Exception { * * @throws Exception If failed. */ + @Test public void testDeadlocksDelete() throws Exception { checkDeadlocksRepeat(5, 2, 2, 2, 0, DELETE_CNT, 0, 0, 0); } @@ -2204,6 +2269,7 @@ public void testDeadlocksDelete() throws Exception { * * @throws Exception If failed. */ + @Test public void testDeadlocksUpdate() throws Exception { checkDeadlocksRepeat(5, 2, 2, 2, 0, 0, UPDATE_CNT, 0, 0); } @@ -2213,6 +2279,7 @@ public void testDeadlocksUpdate() throws Exception { * * @throws Exception If failed. */ + @Test public void testDeadlocksMkdirs() throws Exception { checkDeadlocksRepeat(5, 2, 2, 2, 0, 0, 0, MKDIRS_CNT, 0); } @@ -2222,6 +2289,7 @@ public void testDeadlocksMkdirs() throws Exception { * * @throws Exception If failed. */ + @Test public void testDeadlocksDeleteRename() throws Exception { checkDeadlocksRepeat(5, 2, 2, 2, RENAME_CNT, DELETE_CNT, 0, 0, 0); } @@ -2231,6 +2299,7 @@ public void testDeadlocksDeleteRename() throws Exception { * * @throws Exception If failed. */ + @Test public void testDeadlocksDeleteMkdirsRename() throws Exception { checkDeadlocksRepeat(5, 2, 2, 2, RENAME_CNT, DELETE_CNT, 0, MKDIRS_CNT, 0); } @@ -2240,6 +2309,7 @@ public void testDeadlocksDeleteMkdirsRename() throws Exception { * * @throws Exception If failed. */ + @Test public void testDeadlocksDeleteMkdirs() throws Exception { checkDeadlocksRepeat(5, 2, 2, 2, 0, DELETE_CNT, 0, MKDIRS_CNT, 0); } @@ -2249,6 +2319,7 @@ public void testDeadlocksDeleteMkdirs() throws Exception { * * @throws Exception If failed. */ + @Test public void testDeadlocksCreate() throws Exception { checkDeadlocksRepeat(5, 2, 2, 2, 0, 0, 0, 0, CREATE_CNT); } @@ -2258,6 +2329,7 @@ public void testDeadlocksCreate() throws Exception { * * @throws Exception If failed. */ + @Test public void testDeadlocks() throws Exception { checkDeadlocksRepeat(5, 2, 2, 2, RENAME_CNT, DELETE_CNT, UPDATE_CNT, MKDIRS_CNT, CREATE_CNT); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAttributesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAttributesSelfTest.java index b430a8ceca8f8..f4e4ad528d5ed 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAttributesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAttributesSelfTest.java @@ -39,6 +39,7 @@ public class IgfsAttributesSelfTest extends IgfsCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testSerialization() throws Exception { Map pathModes = new HashMap<>(); @@ -79,4 +80,4 @@ private boolean eq(IgfsAttributes attr1, IgfsAttributes attr2) throws Exception return true; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsBackupFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsBackupFailoverSelfTest.java index ff9c51a56a4e8..b1b76efc2cac3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsBackupFailoverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsBackupFailoverSelfTest.java @@ -205,6 +205,7 @@ private IgfsPath filePath(int j) { * * @throws Exception On error. */ + @Test public void testReadFailoverAfterStopMultipleNodes() throws Exception { final IgfsImpl igfs0 = nodeDatas[0].igfsImpl; @@ -259,6 +260,7 @@ public void testReadFailoverAfterStopMultipleNodes() throws Exception { * * @throws Exception On error. */ + @Test public void testReadFailoverWhileStoppingMultipleNodes() throws Exception { final IgfsImpl igfs0 = nodeDatas[0].igfsImpl; @@ -340,6 +342,7 @@ public void testReadFailoverWhileStoppingMultipleNodes() throws Exception { * * @throws Exception On error. */ + @Test public void testWriteFailoverAfterStopMultipleNodes() throws Exception { final IgfsImpl igfs0 = nodeDatas[0].igfsImpl; @@ -434,6 +437,7 @@ public void testWriteFailoverAfterStopMultipleNodes() throws Exception { * * @throws Exception */ + @Test public void testWriteFailoverWhileStoppingMultipleNodes() throws Exception { final IgfsImpl igfs0 = nodeDatas[0].igfsImpl; @@ -598,4 +602,4 @@ protected static int doWithRetries(int attempts, Callable clo) throws Exce @Override protected long getTestTimeout() { return 20 * 60 * 1000; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsBlockMessageSystemPoolStarvationSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsBlockMessageSystemPoolStarvationSelfTest.java index 9012e0e27f4ad..bff20bdd1c73d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsBlockMessageSystemPoolStarvationSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsBlockMessageSystemPoolStarvationSelfTest.java @@ -106,6 +106,7 @@ public class IgfsBlockMessageSystemPoolStarvationSelfTest extends IgfsCommonAbst * @throws Exception If failed. */ @SuppressWarnings("unchecked") + @Test public void testStarvation() throws Exception { // 1. Create two IGFS file to make all system threads busy. CountDownLatch fileWriteLatch = new CountDownLatch(1); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCachePerBlockLruEvictionPolicySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCachePerBlockLruEvictionPolicySelfTest.java index 3d9dbe994d0e2..3d1400b01c2e5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCachePerBlockLruEvictionPolicySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCachePerBlockLruEvictionPolicySelfTest.java @@ -243,6 +243,7 @@ private void start() throws Exception { * * @throws Exception If failed. */ + @Test public void testFilePrimary() throws Exception { start(); @@ -267,6 +268,7 @@ public void testFilePrimary() throws Exception { * * @throws Exception If failed. */ + @Test public void testFileDual() throws Exception { start(); @@ -297,6 +299,7 @@ public void testFileDual() throws Exception { * * @throws Exception If failed. */ + @Test public void testFileDualExclusion() throws Exception { start(); @@ -324,6 +327,7 @@ public void testFileDualExclusion() throws Exception { * * @throws Exception If failed. */ + @Test public void testRenameDifferentExcludeSettings() throws Exception { start(); @@ -351,6 +355,7 @@ public void testRenameDifferentExcludeSettings() throws Exception { * * @throws Exception If failed. */ + @Test public void testBlockCountEviction() throws Exception { start(); @@ -386,6 +391,7 @@ public void testBlockCountEviction() throws Exception { * * @throws Exception If failed. */ + @Test public void testDataSizeEviction() throws Exception { start(); @@ -493,4 +499,4 @@ private void checkEvictionPolicy(final int curBlocks, final long curBytes) }, 5000) : "Unexpected counts [expectedBlocks=" + curBlocks + ", actualBlocks=" + evictPlc.getCurrentBlocks() + ", expectedBytes=" + curBytes + ", currentBytes=" + curBytes + ']'; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCacheSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCacheSelfTest.java index f8f3a0c421ffd..621bce1f4c301 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCacheSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCacheSelfTest.java @@ -100,6 +100,7 @@ protected CacheConfiguration cacheConfiguration(@NotNull String cacheName) { * * @throws Exception If failed. */ + @Test public void testCache() throws Exception { final Ignite g = grid(); @@ -133,4 +134,4 @@ public void testCache() throws Exception { assert g.cache(CACHE_NAME) != null; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsDataManagerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsDataManagerSelfTest.java index c07f0baf15bf8..9cfecbbe92173 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsDataManagerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsDataManagerSelfTest.java @@ -151,6 +151,7 @@ protected CacheConfiguration cacheConfiguration(@NotNull String cacheName) { * @throws Exception If failed. */ @SuppressWarnings("ConstantConditions") + @Test public void testDataStoring() throws Exception { for (int i = 0; i < 10; i++) { IgfsPath path = IgfsPath.ROOT; @@ -235,6 +236,7 @@ public void testDataStoring() throws Exception { * * @throws Exception If failed. */ + @Test public void testDataStoringRemainder() throws Exception { final int blockSize = IGFS_BLOCK_SIZE; @@ -326,6 +328,7 @@ public void testDataStoringRemainder() throws Exception { } /** @throws Exception If failed. */ + @Test public void testDataStoringFlush() throws Exception { final int blockSize = IGFS_BLOCK_SIZE; final int writesCnt = 64; @@ -400,6 +403,7 @@ public void testDataStoringFlush() throws Exception { * * @throws Exception If failed. */ + @Test public void testAffinity() throws Exception { final int blockSize = 10; final int grpSize = blockSize * DATA_BLOCK_GROUP_CNT; @@ -453,6 +457,7 @@ public void testAffinity() throws Exception { } /** @throws Exception If failed. */ + @Test public void testAffinity2() throws Exception { int blockSize = BLOCK_SIZE; @@ -488,6 +493,7 @@ public void testAffinity2() throws Exception { } /** @throws Exception If failed. */ + @Test public void testAffinityFileMap() throws Exception { int blockSize = BLOCK_SIZE; @@ -616,4 +622,4 @@ private void expectsAffinityFail(final IgfsEntryInfo info, final long start, fin } }, IgfsException.class, msg); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsDualAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsDualAbstractSelfTest.java index fb297459d5bf0..bb90417a27138 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsDualAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsDualAbstractSelfTest.java @@ -52,6 +52,7 @@ protected IgfsDualAbstractSelfTest(IgfsMode mode) { * * @throws Exception If failed. */ + @Test public void testExistsPathMissing() throws Exception { create(igfsSecondary, paths(DIR), null); @@ -63,6 +64,7 @@ public void testExistsPathMissing() throws Exception { * * @throws Exception If failed. */ + @Test public void testListFilesPathMissing() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, SUBSUBDIR), paths(FILE)); @@ -85,6 +87,7 @@ public void testListFilesPathMissing() throws Exception { * * @throws Exception If failed. */ + @Test public void testInfoPathMissing() throws Exception { create(igfsSecondary, paths(DIR), null); create(igfs, null, null); @@ -101,6 +104,7 @@ public void testInfoPathMissing() throws Exception { * * @throws Exception If failed. */ + @Test public void testRenameFileSourceMissingPartially() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR), paths(FILE)); create(igfs, paths(DIR), null); @@ -117,6 +121,7 @@ public void testRenameFileSourceMissingPartially() throws Exception { * * @throws Exception If failed. */ + @Test public void testRenameFileSourceMissing() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR), paths(FILE)); create(igfs, null, null); @@ -133,6 +138,7 @@ public void testRenameFileSourceMissing() throws Exception { * * @throws Exception If failed. */ + @Test public void testRenameFileParentRootSourceMissing() throws Exception { IgfsPath file1 = new IgfsPath("/file1"); IgfsPath file2 = new IgfsPath("/file2"); @@ -151,6 +157,7 @@ public void testRenameFileParentRootSourceMissing() throws Exception { * * @throws Exception If failed. */ + @Test public void testRenameDirectorySourceMissingPartially() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR), null); create(igfs, paths(DIR), null); @@ -166,6 +173,7 @@ public void testRenameDirectorySourceMissingPartially() throws Exception { * * @throws Exception If failed. */ + @Test public void testRenameDirectorySourceMissing() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR), null); create(igfs, null, null); @@ -182,6 +190,7 @@ public void testRenameDirectorySourceMissing() throws Exception { * * @throws Exception If failed. */ + @Test public void testRenameDirectoryParentRootSourceMissing() throws Exception { IgfsPath dir1 = new IgfsPath("/dir1"); IgfsPath dir2 = new IgfsPath("/dir2"); @@ -200,6 +209,7 @@ public void testRenameDirectoryParentRootSourceMissing() throws Exception { * * @throws Exception If failed. */ + @Test public void testMoveFileSourceMissingPartially() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, DIR_NEW, SUBDIR_NEW), paths(FILE)); create(igfs, paths(DIR, DIR_NEW, SUBDIR_NEW), paths(FILE)); @@ -216,6 +226,7 @@ public void testMoveFileSourceMissingPartially() throws Exception { * * @throws Exception If failed. */ + @Test public void testMoveFileSourceMissing() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, DIR_NEW, SUBDIR_NEW), paths(FILE)); create(igfs, paths(DIR_NEW, SUBDIR_NEW), paths(FILE)); @@ -232,6 +243,7 @@ public void testMoveFileSourceMissing() throws Exception { * * @throws Exception If failed. */ + @Test public void testMoveFileDestinationMissingPartially() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, DIR_NEW, SUBDIR_NEW), paths(FILE)); create(igfs, paths(DIR, SUBDIR, DIR_NEW), paths(FILE)); @@ -248,6 +260,7 @@ public void testMoveFileDestinationMissingPartially() throws Exception { * * @throws Exception If failed. */ + @Test public void testMoveFileDestinationMissing() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, DIR_NEW, SUBDIR_NEW), paths(FILE)); create(igfs, paths(DIR, SUBDIR), paths(FILE)); @@ -264,6 +277,7 @@ public void testMoveFileDestinationMissing() throws Exception { * * @throws Exception If failed. */ + @Test public void testMoveFileSourceAndDestinationMissingPartially() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, DIR_NEW, SUBDIR_NEW), paths(FILE)); create(igfs, paths(DIR, DIR_NEW), null); @@ -280,6 +294,7 @@ public void testMoveFileSourceAndDestinationMissingPartially() throws Exception * * @throws Exception If failed. */ + @Test public void testMoveFileSourceAndDestinationMissing() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, DIR_NEW, SUBDIR_NEW), paths(FILE)); create(igfs, null, null); @@ -296,6 +311,7 @@ public void testMoveFileSourceAndDestinationMissing() throws Exception { * * @throws Exception If failed. */ + @Test public void testMoveFileDestinationRootSourceMissingPartially() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR), paths(FILE)); create(igfs, paths(DIR), null); @@ -312,6 +328,7 @@ public void testMoveFileDestinationRootSourceMissingPartially() throws Exception * * @throws Exception If failed. */ + @Test public void testMoveFileDestinationRootSourceMissing() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR), paths(FILE)); create(igfs, null, null); @@ -328,6 +345,7 @@ public void testMoveFileDestinationRootSourceMissing() throws Exception { * * @throws Exception If failed. */ + @Test public void testMoveFileSourceParentRootSourceMissing() throws Exception { IgfsPath file = new IgfsPath("/" + FILE.name()); @@ -345,6 +363,7 @@ public void testMoveFileSourceParentRootSourceMissing() throws Exception { * * @throws Exception If failed. */ + @Test public void testMoveFileSourceParentRootDestinationMissingPartially() throws Exception { IgfsPath file = new IgfsPath("/" + FILE.name()); @@ -363,6 +382,7 @@ public void testMoveFileSourceParentRootDestinationMissingPartially() throws Exc * * @throws Exception If failed. */ + @Test public void testMoveFileSourceParentRootDestinationMissing() throws Exception { IgfsPath file = new IgfsPath("/" + FILE.name()); @@ -381,6 +401,7 @@ public void testMoveFileSourceParentRootDestinationMissing() throws Exception { * * @throws Exception If failed. */ + @Test public void testMoveRenameFileSourceMissingPartially() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, DIR_NEW, SUBDIR_NEW), paths(FILE)); create(igfs, paths(DIR, DIR_NEW, SUBDIR_NEW), paths(FILE)); @@ -397,6 +418,7 @@ public void testMoveRenameFileSourceMissingPartially() throws Exception { * * @throws Exception If failed. */ + @Test public void testMoveRenameFileSourceMissing() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, DIR_NEW, SUBDIR_NEW), paths(FILE)); create(igfs, paths(DIR_NEW, SUBDIR_NEW), paths(FILE)); @@ -413,6 +435,7 @@ public void testMoveRenameFileSourceMissing() throws Exception { * * @throws Exception If failed. */ + @Test public void testMoveRenameFileDestinationMissingPartially() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, DIR_NEW, SUBDIR_NEW), paths(FILE)); create(igfs, paths(DIR, SUBDIR, DIR_NEW), paths(FILE)); @@ -429,6 +452,7 @@ public void testMoveRenameFileDestinationMissingPartially() throws Exception { * * @throws Exception If failed. */ + @Test public void testMoveRenameFileDestinationMissing() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, DIR_NEW, SUBDIR_NEW), paths(FILE)); create(igfs, paths(DIR, SUBDIR), paths(FILE)); @@ -445,6 +469,7 @@ public void testMoveRenameFileDestinationMissing() throws Exception { * * @throws Exception If failed. */ + @Test public void testMoveRenameFileSourceAndDestinationMissingPartially() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, DIR_NEW, SUBDIR_NEW), paths(FILE)); create(igfs, paths(DIR, DIR_NEW), null); @@ -461,6 +486,7 @@ public void testMoveRenameFileSourceAndDestinationMissingPartially() throws Exce * * @throws Exception If failed. */ + @Test public void testMoveRenameFileSourceAndDestinationMissing() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, DIR_NEW, SUBDIR_NEW), paths(FILE)); create(igfs, null, null); @@ -477,6 +503,7 @@ public void testMoveRenameFileSourceAndDestinationMissing() throws Exception { * * @throws Exception If failed. */ + @Test public void testMoveRenameFileDestinationRootSourceMissingPartially() throws Exception { IgfsPath file = new IgfsPath("/" + FILE.name()); @@ -495,6 +522,7 @@ public void testMoveRenameFileDestinationRootSourceMissingPartially() throws Exc * * @throws Exception If failed. */ + @Test public void testMoveRenameFileDestinationRootSourceMissing() throws Exception { IgfsPath file = new IgfsPath("/" + FILE.name()); @@ -513,6 +541,7 @@ public void testMoveRenameFileDestinationRootSourceMissing() throws Exception { * * @throws Exception If failed. */ + @Test public void testMoveRenameFileSourceParentRootSourceMissing() throws Exception { IgfsPath file = new IgfsPath("/" + FILE_NEW.name()); @@ -530,6 +559,7 @@ public void testMoveRenameFileSourceParentRootSourceMissing() throws Exception { * * @throws Exception If failed. */ + @Test public void testMoveRenameFileSourceParentRootDestinationMissingPartially() throws Exception { IgfsPath file = new IgfsPath("/" + FILE_NEW.name()); @@ -548,6 +578,7 @@ public void testMoveRenameFileSourceParentRootDestinationMissingPartially() thro * * @throws Exception If failed. */ + @Test public void testMoveRenameFileSourceParentRootDestinationMissing() throws Exception { IgfsPath file = new IgfsPath("/" + FILE_NEW.name()); @@ -566,6 +597,7 @@ public void testMoveRenameFileSourceParentRootDestinationMissing() throws Except * * @throws Exception If failed. */ + @Test public void testMoveDirectorySourceMissingPartially() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, SUBSUBDIR, DIR_NEW, SUBDIR_NEW), null); create(igfs, paths(DIR, DIR_NEW, SUBDIR_NEW), null); @@ -582,6 +614,7 @@ public void testMoveDirectorySourceMissingPartially() throws Exception { * * @throws Exception If failed. */ + @Test public void testMoveDirectorySourceMissing() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, SUBSUBDIR, DIR_NEW, SUBDIR_NEW), null); create(igfs, paths(DIR_NEW, SUBDIR_NEW), null); @@ -599,6 +632,7 @@ public void testMoveDirectorySourceMissing() throws Exception { * * @throws Exception If failed. */ + @Test public void testMoveDirectoryDestinationMissingPartially() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, SUBSUBDIR, DIR_NEW, SUBDIR_NEW), null); create(igfs, paths(DIR, SUBDIR, SUBSUBDIR, DIR_NEW), null); @@ -615,6 +649,7 @@ public void testMoveDirectoryDestinationMissingPartially() throws Exception { * * @throws Exception If failed. */ + @Test public void testMoveDirectoryDestinationMissing() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, SUBSUBDIR, DIR_NEW, SUBDIR_NEW), null); create(igfs, paths(DIR, SUBDIR, SUBSUBDIR), null); @@ -631,6 +666,7 @@ public void testMoveDirectoryDestinationMissing() throws Exception { * * @throws Exception If failed. */ + @Test public void testMoveDirectorySourceAndDestinationMissingPartially() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, SUBSUBDIR, DIR_NEW, SUBDIR_NEW), null); create(igfs, paths(DIR, DIR_NEW), null); @@ -647,6 +683,7 @@ public void testMoveDirectorySourceAndDestinationMissingPartially() throws Excep * * @throws Exception If failed. */ + @Test public void testMoveDirectorySourceAndDestinationMissing() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, SUBSUBDIR, DIR_NEW, SUBDIR_NEW), null); create(igfs, null, null); @@ -663,6 +700,7 @@ public void testMoveDirectorySourceAndDestinationMissing() throws Exception { * * @throws Exception If failed. */ + @Test public void testMoveDirectoryDestinationRootSourceMissingPartially() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, SUBSUBDIR), null); create(igfs, paths(DIR), null); @@ -679,6 +717,7 @@ public void testMoveDirectoryDestinationRootSourceMissingPartially() throws Exce * * @throws Exception If failed. */ + @Test public void testMoveDirectoryDestinationRootSourceMissing() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, SUBSUBDIR), null); create(igfs, null, null); @@ -695,6 +734,7 @@ public void testMoveDirectoryDestinationRootSourceMissing() throws Exception { * * @throws Exception If failed. */ + @Test public void testMoveDirectorySourceParentRootSourceMissing() throws Exception { IgfsPath dir = new IgfsPath("/" + SUBSUBDIR.name()); @@ -712,6 +752,7 @@ public void testMoveDirectorySourceParentRootSourceMissing() throws Exception { * * @throws Exception If failed. */ + @Test public void testMoveDirectorySourceParentRootDestinationMissingPartially() throws Exception { IgfsPath dir = new IgfsPath("/" + SUBSUBDIR.name()); @@ -730,6 +771,7 @@ public void testMoveDirectorySourceParentRootDestinationMissingPartially() throw * * @throws Exception If failed. */ + @Test public void testMoveDirectorySourceParentRootDestinationMissing() throws Exception { IgfsPath dir = new IgfsPath("/" + SUBSUBDIR.name()); @@ -748,6 +790,7 @@ public void testMoveDirectorySourceParentRootDestinationMissing() throws Excepti * * @throws Exception If failed. */ + @Test public void testMoveRenameDirectorySourceMissingPartially() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, SUBSUBDIR, DIR_NEW, SUBDIR_NEW), null); create(igfs, paths(DIR, DIR_NEW, SUBDIR_NEW), null); @@ -764,6 +807,7 @@ public void testMoveRenameDirectorySourceMissingPartially() throws Exception { * * @throws Exception If failed. */ + @Test public void testMoveRenameDirectorySourceMissing() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, SUBSUBDIR, DIR_NEW, SUBDIR_NEW), null); create(igfs, paths(DIR_NEW, SUBDIR_NEW), null); @@ -781,6 +825,7 @@ public void testMoveRenameDirectorySourceMissing() throws Exception { * * @throws Exception If failed. */ + @Test public void testMoveRenameDirectoryDestinationMissingPartially() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, SUBSUBDIR, DIR_NEW, SUBDIR_NEW), null); create(igfs, paths(DIR, SUBDIR, SUBSUBDIR, DIR_NEW), null); @@ -797,6 +842,7 @@ public void testMoveRenameDirectoryDestinationMissingPartially() throws Exceptio * * @throws Exception If failed. */ + @Test public void testMoveRenameDirectoryDestinationMissing() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, SUBSUBDIR, DIR_NEW, SUBDIR_NEW), null); create(igfs, paths(DIR, SUBDIR, SUBSUBDIR), null); @@ -813,6 +859,7 @@ public void testMoveRenameDirectoryDestinationMissing() throws Exception { * * @throws Exception If failed. */ + @Test public void testMoveRenameDirectorySourceAndDestinationMissingPartially() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, SUBSUBDIR, DIR_NEW, SUBDIR_NEW), null); create(igfs, paths(DIR, DIR_NEW), null); @@ -829,6 +876,7 @@ public void testMoveRenameDirectorySourceAndDestinationMissingPartially() throws * * @throws Exception If failed. */ + @Test public void testMoveRenameDirectorySourceAndDestinationMissing() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, SUBSUBDIR, DIR_NEW, SUBDIR_NEW), null); create(igfs, null, null); @@ -845,6 +893,7 @@ public void testMoveRenameDirectorySourceAndDestinationMissing() throws Exceptio * * @throws Exception If failed. */ + @Test public void testMoveRenameDirectoryDestinationRootSourceMissingPartially() throws Exception { IgfsPath dir = new IgfsPath("/" + SUBSUBDIR.name()); @@ -863,6 +912,7 @@ public void testMoveRenameDirectoryDestinationRootSourceMissingPartially() throw * * @throws Exception If failed. */ + @Test public void testMoveRenameDirectoryDestinationRootSourceMissing() throws Exception { IgfsPath dir = new IgfsPath("/" + SUBSUBDIR.name()); @@ -881,6 +931,7 @@ public void testMoveRenameDirectoryDestinationRootSourceMissing() throws Excepti * * @throws Exception If failed. */ + @Test public void testMoveRenameDirectorySourceParentRootSourceMissing() throws Exception { IgfsPath dir = new IgfsPath("/" + SUBSUBDIR_NEW.name()); @@ -898,6 +949,7 @@ public void testMoveRenameDirectorySourceParentRootSourceMissing() throws Except * * @throws Exception If failed. */ + @Test public void testMoveRenameDirectorySourceParentRootDestinationMissingPartially() throws Exception { IgfsPath dir = new IgfsPath("/" + SUBSUBDIR_NEW.name()); @@ -916,6 +968,7 @@ public void testMoveRenameDirectorySourceParentRootDestinationMissingPartially() * * @throws Exception If failed. */ + @Test public void testMoveRenameDirectorySourceParentRootDestinationMissing() throws Exception { IgfsPath dir = new IgfsPath("/" + SUBSUBDIR_NEW.name()); @@ -934,6 +987,7 @@ public void testMoveRenameDirectorySourceParentRootDestinationMissing() throws E * * @throws Exception If failed. */ + @Test public void testMkdirsParentPathMissingPartially() throws Exception { Map props = null; @@ -964,6 +1018,7 @@ public void testMkdirsParentPathMissingPartially() throws Exception { * * @throws Exception If failed. */ + @Test public void testMkdrisParentPathMissing() throws Exception { Map props = null; @@ -995,6 +1050,7 @@ public void testMkdrisParentPathMissing() throws Exception { * * @throws Exception If failed. */ + @Test public void testDeletePathMissingPartially() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, SUBSUBDIR), paths(FILE)); create(igfs, paths(DIR), null); @@ -1010,6 +1066,7 @@ public void testDeletePathMissingPartially() throws Exception { * * @throws Exception If failed. */ + @Test public void testDeletePathMissing() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, SUBSUBDIR), paths(FILE)); create(igfs, null, null); @@ -1025,6 +1082,7 @@ public void testDeletePathMissing() throws Exception { * * @throws Exception If failed. */ + @Test public void testDeleteParentRootPathMissing() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, SUBSUBDIR), paths(FILE)); create(igfs, null, null); @@ -1039,6 +1097,7 @@ public void testDeleteParentRootPathMissing() throws Exception { * * @throws Exception If failed. */ + @Test public void testUpdatePathMissingPartially() throws Exception { if(!propertiesSupported()) return; @@ -1070,6 +1129,7 @@ public void testUpdatePathMissingPartially() throws Exception { * * @throws Exception If failed. */ + @Test public void testUpdatePathMissing() throws Exception { if(!propertiesSupported()) return; @@ -1101,6 +1161,7 @@ public void testUpdatePathMissing() throws Exception { * * @throws Exception If failed. */ + @Test public void testUpdateParentRootPathMissing() throws Exception { doUpdateParentRootPathMissing(properties("owner", "group", "0555")); } @@ -1131,6 +1192,7 @@ protected void doUpdateParentRootPathMissing(Map props) throws E * * @throws Exception If failed. */ + @Test public void testOpenMissing() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR), null); create(igfs, null, null); @@ -1145,6 +1207,7 @@ public void testOpenMissing() throws Exception { * * @throws Exception If failed. */ + @Test public void testCreateParentMissingPartially() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR), null); create(igfs, paths(DIR), null); @@ -1161,6 +1224,7 @@ public void testCreateParentMissingPartially() throws Exception { * * @throws Exception If failed. */ + @Test public void testSetPropertiesOnPartiallyMissingDirectory() throws Exception { if (!propertiesSupported()) return; @@ -1181,6 +1245,7 @@ public void testSetPropertiesOnPartiallyMissingDirectory() throws Exception { * * @throws Exception If failed. */ + @Test public void testCreateParentMissing() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR), null); create(igfs, null, null); @@ -1196,6 +1261,7 @@ public void testCreateParentMissing() throws Exception { * * @throws Exception If failed. */ + @Test public void testSetPropertiesOnMissingDirectory() throws Exception { if (!propertiesSupported()) return; @@ -1219,6 +1285,7 @@ public void testSetPropertiesOnMissingDirectory() throws Exception { * * @throws Exception If failed. */ + @Test public void testAppendParentMissingPartially() throws Exception { if (!appendSupported()) return; @@ -1240,6 +1307,7 @@ public void testAppendParentMissingPartially() throws Exception { * * @throws Exception If failed. */ + @Test public void testAppendParentMissing() throws Exception { if (!appendSupported()) return; @@ -1261,6 +1329,7 @@ public void testAppendParentMissing() throws Exception { * * @throws Exception If failed. */ + @Test public void testConcurrentRenameDeleteSourceRemote() throws Exception { for (int i = 0; i < REPEAT_CNT; i++) { final CyclicBarrier barrier = new CyclicBarrier(2); @@ -1317,6 +1386,7 @@ public void testConcurrentRenameDeleteSourceRemote() throws Exception { * * @throws Exception If failed. */ + @Test public void testConcurrentRenameDeleteDestinationRemote() throws Exception { for (int i = 0; i < REPEAT_CNT; i++) { final CyclicBarrier barrier = new CyclicBarrier(2); @@ -1369,6 +1439,7 @@ public void testConcurrentRenameDeleteDestinationRemote() throws Exception { * * @throws Exception If failed. */ + @Test public void testConcurrentRenamesRemote() throws Exception { for (int i = 0; i < REPEAT_CNT; i++) { final CyclicBarrier barrier = new CyclicBarrier(2); @@ -1429,6 +1500,7 @@ public void testConcurrentRenamesRemote() throws Exception { * * @throws Exception If failed. */ + @Test public void testConcurrentDeletesRemote() throws Exception { for (int i = 0; i < REPEAT_CNT; i++) { final CyclicBarrier barrier = new CyclicBarrier(2); @@ -1522,6 +1594,7 @@ private T2 checkParentListingTime(IgfsSecondaryFileSystem fs, IgfsPa * * @throws Exception On error. */ + @Test public void testAccessAndModificationTimeUpwardsPropagation() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR), paths(FILE, FILE2)); @@ -1548,6 +1621,7 @@ public void testAccessAndModificationTimeUpwardsPropagation() throws Exception { * * @throws Exception If failed. */ + @Test public void testSetTimesMissingPartially() throws Exception { if (!timesSupported()) return; @@ -1585,6 +1659,7 @@ public void testSetTimesMissingPartially() throws Exception { * * @throws Exception If failed. */ + @Test public void testSecondarySize() throws Exception { igfs.mkdirs(SUBDIR); @@ -1610,4 +1685,4 @@ public static boolean propertiesContains(Map allProps, Map set = new HashSet<>(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsModesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsModesSelfTest.java index cd3bacc619096..497b886c51637 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsModesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsModesSelfTest.java @@ -219,6 +219,7 @@ final void pathModes(IgniteBiTuple... modes) { * * @throws Exception If failed. */ + @Test public void testModeDefaultIsNotSet() throws Exception { setSecondaryFs = true; @@ -232,6 +233,7 @@ public void testModeDefaultIsNotSet() throws Exception { * * @throws Exception If failed. */ + @Test public void testModeDefaultIsSet() throws Exception { mode = DUAL_SYNC; @@ -247,6 +249,7 @@ public void testModeDefaultIsSet() throws Exception { * * @throws Exception If failed. */ + @Test public void testModeSecondaryNoUri() throws Exception { mode = PROXY; @@ -268,6 +271,7 @@ public void testModeSecondaryNoUri() throws Exception { * * @throws Exception If failed. */ + @Test public void testPathMode() throws Exception { pathModes(F.t("/dir1", PROXY), F.t("/dir2", DUAL_SYNC), F.t("/dir3", PRIMARY), F.t("/dir4", PRIMARY)); @@ -296,6 +300,7 @@ public void testPathMode() throws Exception { * * @throws Exception If failed. */ + @Test public void testPathModeSwitchToPrimary() throws Exception { mode = DUAL_SYNC; @@ -313,6 +318,7 @@ public void testPathModeSwitchToPrimary() throws Exception { * * @throws Exception If failed. */ + @Test public void testPathModeSecondaryNoCfg() throws Exception { pathModes(F.t("dir", PROXY)); @@ -334,6 +340,7 @@ public void testPathModeSecondaryNoCfg() throws Exception { * * @throws Exception If failed. */ + @Test public void testPropagationPrimary() throws Exception { mode = PRIMARY; @@ -345,6 +352,7 @@ public void testPropagationPrimary() throws Exception { * * @throws Exception If failed. */ + @Test public void testPropagationDualSync() throws Exception { mode = DUAL_SYNC; @@ -356,6 +364,7 @@ public void testPropagationDualSync() throws Exception { * * @throws Exception If failed. */ + @Test public void testPropagationDualAsync() throws Exception { mode = DUAL_ASYNC; @@ -484,4 +493,4 @@ private void checkPropagation() throws Exception { assert !igfsSecondary.exists(dir); assert !igfsSecondary.exists(file); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsOneClientNodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsOneClientNodeTest.java index a55f607883703..cf00f924aeb10 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsOneClientNodeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsOneClientNodeTest.java @@ -94,6 +94,7 @@ protected CacheConfiguration cacheConfiguration(@NotNull String cacheName) { /** * @throws Exception If failed. */ + @Test public void testStartIgfs() throws Exception { final IgfsImpl igfs = (IgfsImpl) grid(0).fileSystem("igfs"); @@ -124,4 +125,4 @@ public void testStartIgfs() throws Exception { } }, IgfsException.class, "Failed to execute operation because there are no IGFS metadata nodes."); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsPrimaryMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsPrimaryMultiNodeSelfTest.java index f004d4069bbe2..87f3cb0bf6709 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsPrimaryMultiNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsPrimaryMultiNodeSelfTest.java @@ -29,7 +29,8 @@ public class IgfsPrimaryMultiNodeSelfTest extends IgfsPrimarySelfTest { /** * @throws Exception If failed. */ - @Override public void testCreateConsistencyMultithreaded() throws Exception { + @Override @Test + public void testCreateConsistencyMultithreaded() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-8823"); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsPrimaryRelaxedConsistencyMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsPrimaryRelaxedConsistencyMultiNodeSelfTest.java index d35237cacd0fb..e29b8ffcad596 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsPrimaryRelaxedConsistencyMultiNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsPrimaryRelaxedConsistencyMultiNodeSelfTest.java @@ -27,9 +27,10 @@ public class IgfsPrimaryRelaxedConsistencyMultiNodeSelfTest extends IgfsPrimaryR } @Override + @Test public void testCreateConsistencyMultithreaded() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-8823"); super.testCreateConsistencyMultithreaded(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsProcessorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsProcessorSelfTest.java index 0ba3bcb221393..6d868e355a23f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsProcessorSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsProcessorSelfTest.java @@ -165,6 +165,7 @@ public String igfsName() { } /** @throws Exception If failed. */ + @Test public void testigfsEnabled() throws Exception { IgniteFileSystem igfs = grid(0).fileSystem(igfsName()); @@ -176,6 +177,7 @@ public void testigfsEnabled() throws Exception { * * @throws Exception If failed. */ + @Test public void testUpdateProperties() throws Exception { IgfsPath p = path("/tmp/my"); @@ -209,6 +211,7 @@ public void testUpdateProperties() throws Exception { } /** @throws Exception If failed. */ + @Test public void testCreate() throws Exception { IgfsPath path = path("/file"); @@ -235,6 +238,7 @@ public void testCreate() throws Exception { * * @throws Exception In case of any exception. */ + @Test public void testMakeListDeleteDirs() throws Exception { assertListDir("/"); @@ -293,6 +297,7 @@ public void testMakeListDeleteDirs() throws Exception { * @throws Exception In case of any exception. */ @SuppressWarnings("TooBroadScope") + @Test public void testMakeListDeleteDirsMultithreaded() throws Exception { assertListDir("/"); @@ -343,6 +348,7 @@ public void testMakeListDeleteDirsMultithreaded() throws Exception { } /** @throws Exception If failed. */ + @Test public void testBasicOps() throws Exception { // Create directories. igfs.mkdirs(path("/A/B1/C1")); @@ -423,6 +429,7 @@ public void testBasicOps() throws Exception { * * @throws Exception If failed. */ + @Test public void testSize() throws Exception { IgfsPath dir1 = path("/dir1"); IgfsPath subDir1 = path("/dir1/subdir1"); @@ -469,6 +476,7 @@ private > List sorted(Collection col) { } /** @throws Exception If failed. */ + @Test public void testRename() throws Exception { // Create directories. igfs.mkdirs(path("/A/B1/C1")); @@ -616,6 +624,7 @@ private IgfsPath path(long i) { } /** @throws Exception If failed. */ + @Test public void testCreateOpenAppend() throws Exception { // Error - path points to root directory. assertCreateFails("/", false); @@ -676,6 +685,7 @@ public void testCreateOpenAppend() throws Exception { /** @throws Exception If failed. */ @SuppressWarnings("BusyWait") + @Test public void testDeleteCacheConsistency() throws Exception { IgfsPath path = new IgfsPath("/someFile"); @@ -735,21 +745,25 @@ public void testDeleteCacheConsistency() throws Exception { } /** @throws Exception If failed. */ + @Test public void testCreateAppendLongData1() throws Exception { checkCreateAppendLongData(123, 1024, 100); } /** @throws Exception If failed. */ + @Test public void testCreateAppendLongData2() throws Exception { checkCreateAppendLongData(123 + 1024, 1024, 100); } /** @throws Exception If failed. */ + @Test public void testCreateAppendLongData3() throws Exception { checkCreateAppendLongData(123, 1024, 1000); } /** @throws Exception If failed. */ + @Test public void testCreateAppendLongData4() throws Exception { checkCreateAppendLongData(123 + 1024, 1024, 1000); } @@ -759,6 +773,7 @@ public void testCreateAppendLongData4() throws Exception { * * @throws Exception If failed. */ + @Test public void testFormatNonEmpty() throws Exception { String dirPath = "/A/B/C"; @@ -793,6 +808,7 @@ public void testFormatNonEmpty() throws Exception { * * @throws Exception If failed. */ + @Test public void testFormatEmpty() throws Exception { igfs.clear(); } @@ -989,4 +1005,4 @@ private void assertListDir(String path, String... item) { assertEquals(Arrays.asList(item), names); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsProcessorValidationSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsProcessorValidationSelfTest.java index ee7a36dde51bd..ff1887097f91d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsProcessorValidationSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsProcessorValidationSelfTest.java @@ -114,6 +114,7 @@ private T[] concat(T[] first, T[] second, Class cls) { /** * @throws Exception If failed. */ + @Test public void testLocalIfAffinityMapperIsWrongClass() throws Exception { for (FileSystemConfiguration igfsCfg : g1Cfg.getFileSystemConfiguration()) { @@ -130,6 +131,7 @@ public void testLocalIfAffinityMapperIsWrongClass() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLocalIfIgfsConfigsHaveDuplicatedNames() throws Exception { String igfsCfgName = "igfs-cfg"; @@ -142,6 +144,7 @@ public void testLocalIfIgfsConfigsHaveDuplicatedNames() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLocalIfQueryIndexingEnabledForDataCache() throws Exception { g1IgfsCfg1.setDataCacheConfiguration(dataCache(1024)); g1IgfsCfg1.getDataCacheConfiguration().setIndexedTypes(Integer.class, String.class); @@ -152,6 +155,7 @@ public void testLocalIfQueryIndexingEnabledForDataCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLocalIfQueryIndexingEnabledForMetaCache() throws Exception { g1IgfsCfg1.setMetaCacheConfiguration(metaCache()); @@ -163,6 +167,7 @@ public void testLocalIfQueryIndexingEnabledForMetaCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLocalNullIgfsNameIsNotSupported() throws Exception { try { g1IgfsCfg1.setName(null); @@ -185,6 +190,7 @@ public void testLocalNullIgfsNameIsNotSupported() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLocalIfNonPrimaryModeAndHadoopFileSystemUriIsNull() throws Exception { g1IgfsCfg2.setDefaultMode(PROXY); @@ -194,6 +200,7 @@ public void testLocalIfNonPrimaryModeAndHadoopFileSystemUriIsNull() throws Excep /** * @throws Exception If failed. */ + @Test public void testRemoteIfDataBlockSizeDiffers() throws Exception { IgniteConfiguration g2Cfg = getConfiguration("g2"); @@ -211,6 +218,7 @@ public void testRemoteIfDataBlockSizeDiffers() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemoteIfAffinityMapperGroupSizeDiffers() throws Exception { IgniteConfiguration g2Cfg = getConfiguration("g2"); @@ -226,6 +234,7 @@ public void testRemoteIfAffinityMapperGroupSizeDiffers() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemoteIfDefaultModeDiffers() throws Exception { IgniteConfiguration g2Cfg = getConfiguration("g2"); @@ -248,6 +257,7 @@ public void testRemoteIfDefaultModeDiffers() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemoteIfPathModeDiffers() throws Exception { IgniteConfiguration g2Cfg = getConfiguration("g2"); @@ -267,6 +277,7 @@ public void testRemoteIfPathModeDiffers() throws Exception { /** * @throws Exception If failed. */ + @Test public void testZeroEndpointTcpPort() throws Exception { checkInvalidPort(0); } @@ -274,6 +285,7 @@ public void testZeroEndpointTcpPort() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNegativeEndpointTcpPort() throws Exception { checkInvalidPort(-1); } @@ -281,6 +293,7 @@ public void testNegativeEndpointTcpPort() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTooBigEndpointTcpPort() throws Exception { checkInvalidPort(65536); } @@ -288,6 +301,7 @@ public void testTooBigEndpointTcpPort() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPreConfiguredCache() throws Exception { FileSystemConfiguration igfsCfg1 = new FileSystemConfiguration(g1IgfsCfg1); igfsCfg1.setName("igfs"); @@ -334,6 +348,7 @@ private void checkInvalidPort(int port) throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvalidEndpointThreadCount() throws Exception { final String failMsg = "IGFS endpoint thread count must be positive"; @@ -403,4 +418,4 @@ private CacheConfiguration metaCache() { return metaCache; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsSecondaryFileSystemInjectionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsSecondaryFileSystemInjectionSelfTest.java index c40be7dbca91d..c08809c8ab0aa 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsSecondaryFileSystemInjectionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsSecondaryFileSystemInjectionSelfTest.java @@ -93,6 +93,7 @@ public class IgfsSecondaryFileSystemInjectionSelfTest extends GridCommonAbstract /** * @throws Exception If failed. */ + @Test public void testInjectPrimaryByField() throws Exception { secondary = new TestBaseSecondaryFsMock() { @FileSystemResource @@ -119,6 +120,7 @@ public void testInjectPrimaryByField() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInjectPrimaryByMethods() throws Exception { secondary = new TestBaseSecondaryFsMock() { /** Ignite instance. */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsServerManagerIpcEndpointRegistrationAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsServerManagerIpcEndpointRegistrationAbstractSelfTest.java index 0d65bb87aa7ec..a24273e208b70 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsServerManagerIpcEndpointRegistrationAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsServerManagerIpcEndpointRegistrationAbstractSelfTest.java @@ -62,6 +62,7 @@ public abstract class IgfsServerManagerIpcEndpointRegistrationAbstractSelfTest e /** * @throws Exception If failed. */ + @Test public void testLoopbackEndpointsRegistration() throws Exception { IgniteConfiguration cfg = gridConfiguration(); @@ -81,6 +82,7 @@ public void testLoopbackEndpointsRegistration() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLoopbackEndpointsCustomHostRegistration() throws Exception { IgniteConfiguration cfg = gridConfigurationManyIgfsCaches(2); @@ -263,4 +265,4 @@ protected FileSystemConfiguration igfsConfiguration(@Nullable IgfsIpcEndpointTyp return igfsConfiguration; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsServerManagerIpcEndpointRegistrationOnLinuxAndMacSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsServerManagerIpcEndpointRegistrationOnLinuxAndMacSelfTest.java index 030c852e520fd..f964a49299b0f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsServerManagerIpcEndpointRegistrationOnLinuxAndMacSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsServerManagerIpcEndpointRegistrationOnLinuxAndMacSelfTest.java @@ -32,6 +32,7 @@ public class IgfsServerManagerIpcEndpointRegistrationOnLinuxAndMacSelfTest /** * @throws Exception If failed. */ + @Test public void testLoopbackAndShmemEndpointsRegistration() throws Exception { IgniteConfiguration cfg = gridConfigurationManyIgfsCaches(3); @@ -51,4 +52,4 @@ public void testLoopbackAndShmemEndpointsRegistration() throws Exception { assertEquals(4, res.get1().intValue()); assertEquals(2, res.get2().intValue()); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsServerManagerIpcEndpointRegistrationOnWindowsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsServerManagerIpcEndpointRegistrationOnWindowsSelfTest.java index b16beb124a5ee..d97bb401fb42f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsServerManagerIpcEndpointRegistrationOnWindowsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsServerManagerIpcEndpointRegistrationOnWindowsSelfTest.java @@ -35,6 +35,7 @@ public class IgfsServerManagerIpcEndpointRegistrationOnWindowsSelfTest /** * @throws Exception If failed. */ + @Test public void testShmemEndpointsRegistration() throws Exception { Throwable e = GridTestUtils.assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -50,4 +51,4 @@ public void testShmemEndpointsRegistration() throws Exception { assert e.getCause().getCause().getMessage().contains(" should not be configured on Windows (configure " + IpcServerTcpEndpoint.class.getSimpleName() + ")"); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsSizeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsSizeSelfTest.java index d37cd9c6ec83c..5bfe79837d7bf 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsSizeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsSizeSelfTest.java @@ -173,6 +173,7 @@ private void startUp() throws Exception { * * @throws Exception If failed. */ + @Test public void testPartitioned() throws Exception { cacheMode = PARTITIONED; nearEnabled = true; @@ -185,6 +186,7 @@ public void testPartitioned() throws Exception { * * @throws Exception If failed. */ + @Test public void testColocated() throws Exception { cacheMode = PARTITIONED; nearEnabled = false; @@ -197,6 +199,7 @@ public void testColocated() throws Exception { * * @throws Exception If failed. */ + @Test public void testReplicated() throws Exception { cacheMode = REPLICATED; @@ -208,6 +211,7 @@ public void testReplicated() throws Exception { * * @throws Exception If failed. */ + @Test public void testPartitionedOversize() throws Exception { cacheMode = PARTITIONED; nearEnabled = true; @@ -220,6 +224,7 @@ public void testPartitionedOversize() throws Exception { * * @throws Exception If failed. */ + @Test public void testColocatedOversize() throws Exception { cacheMode = PARTITIONED; nearEnabled = false; @@ -232,6 +237,7 @@ public void testColocatedOversize() throws Exception { * * @throws Exception If failed. */ + @Test public void testReplicatedOversize() throws Exception { cacheMode = REPLICATED; @@ -243,6 +249,7 @@ public void testReplicatedOversize() throws Exception { * * @throws Exception If failed. */ + @Test public void testPartitionedPreload() throws Exception { cacheMode = PARTITIONED; nearEnabled = true; @@ -255,6 +262,7 @@ public void testPartitionedPreload() throws Exception { * * @throws Exception If failed. */ + @Test public void testColocatedPreload() throws Exception { cacheMode = PARTITIONED; nearEnabled = false; @@ -709,4 +717,4 @@ private int length() { return len; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsStartCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsStartCacheTest.java index 46fdae578abca..799879ce3b445 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsStartCacheTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsStartCacheTest.java @@ -106,6 +106,7 @@ private IgniteConfiguration config(boolean igfs, int idx) { /** * @throws Exception If failed. */ + @Test public void testCacheStart() throws Exception { Ignite g0 = G.start(config(true, 0)); @@ -165,4 +166,4 @@ private void checkCache(GridCacheAdapter cache) { assertTrue(cache.context().systemTx()); assertEquals(SYSTEM_POOL, cache.context().ioPolicy()); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsStreamsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsStreamsSelfTest.java index c8571d3981d90..8bf3f1f5d2581 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsStreamsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsStreamsSelfTest.java @@ -158,6 +158,7 @@ protected CacheConfiguration cacheConfiguration(@NotNull String cacheName) { * * @throws Exception In case of exception. */ + @Test public void testCreateFile() throws Exception { IgfsPath path = new IgfsPath("/asdf"); @@ -171,6 +172,7 @@ public void testCreateFile() throws Exception { } /** @throws Exception If failed. */ + @Test public void testCreateFileColocated() throws Exception { IgfsPath path = new IgfsPath("/colocated"); @@ -209,6 +211,7 @@ public void testCreateFileColocated() throws Exception { } /** @throws Exception If failed. */ + @Test public void testCreateFileFragmented() throws Exception { IgfsEx impl = (IgfsEx)grid(0).fileSystem("igfs"); String metaCacheName = grid(0).igfsx("igfs").configuration().getMetaCacheConfiguration().getName(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsTaskSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsTaskSelfTest.java index f95907763b9e1..6c8aeec806103 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsTaskSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsTaskSelfTest.java @@ -149,6 +149,7 @@ private IgniteConfiguration config(int idx) { * @throws Exception If failed. */ @SuppressWarnings("ConstantConditions") + @Test public void testTask() throws Exception { String arg = DICTIONARY[new Random(System.currentTimeMillis()).nextInt(DICTIONARY.length)]; @@ -168,6 +169,7 @@ public void testTask() throws Exception { * @throws Exception If failed. */ @SuppressWarnings("ConstantConditions") + @Test public void testTaskAsync() throws Exception { String arg = DICTIONARY[new Random(System.currentTimeMillis()).nextInt(DICTIONARY.length)]; @@ -287,4 +289,4 @@ private static class Job implements IgfsJob, Serializable { // No-op. } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/benchmark/IgfsBenchmark.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/benchmark/IgfsBenchmark.java index f3bce8e4af5c8..5977695b0d907 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/benchmark/IgfsBenchmark.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/benchmark/IgfsBenchmark.java @@ -482,6 +482,7 @@ private void recursePath(String parentPath, int depth, FileOperation operation) * * @param fs Filesystem. */ + @Test public void testReadFile(IgniteFileSystem fs) { try { recursePath(path, 1, new ReadFileOperation(fs, size)); @@ -496,6 +497,7 @@ public void testReadFile(IgniteFileSystem fs) { * * @param fs Filesystem. */ + @Test public void testWriteFile(IgniteFileSystem fs) { try { recursePath(path, 1, new WriteFileOperation(fs, size)); @@ -510,6 +512,7 @@ public void testWriteFile(IgniteFileSystem fs) { * * @param fs Filesystem. */ + @Test public void testDeleteFile(IgniteFileSystem fs) { try { recursePath(path, 1, new DeleteFileOperation(fs, 0)); @@ -524,6 +527,7 @@ public void testDeleteFile(IgniteFileSystem fs) { * * @param fs Filesystem. */ + @Test public void testInfoFile(IgniteFileSystem fs) { try { recursePath(path, 1, new InfoFileOperation(fs)); @@ -538,6 +542,7 @@ public void testInfoFile(IgniteFileSystem fs) { * * @param fs Filesystem. */ + @Test public void testListPathFile(IgniteFileSystem fs) { try { recursePath(path, 1, new ListPathFileOperation(fs)); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/split/IgfsByteDelimiterRecordResolverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/split/IgfsByteDelimiterRecordResolverSelfTest.java index 9564a1899d911..faab90b681bd6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/split/IgfsByteDelimiterRecordResolverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/split/IgfsByteDelimiterRecordResolverSelfTest.java @@ -31,6 +31,7 @@ public class IgfsByteDelimiterRecordResolverSelfTest extends IgfsAbstractRecordR * * @throws Exception If failed. */ + @Test public void testNoDelimiters() throws Exception { byte[] delim = wrap(2); byte[] data = array(F.t(wrap(1), 8)); @@ -47,6 +48,7 @@ public void testNoDelimiters() throws Exception { * * @throws Exception If failed. */ + @Test public void testHeadDelimiter() throws Exception { byte[] delim = array(F.t(wrap(2), 8)); byte[] data = array(F.t(delim, 1), F.t(wrap(1), 8)); @@ -73,6 +75,7 @@ public void testHeadDelimiter() throws Exception { * * @throws Exception If failed. */ + @Test public void testEndDelimiter() throws Exception { byte[] delim = array(F.t(wrap(2), 8)); byte[] data = array(F.t(wrap(1), 8), F.t(delim, 1)); @@ -99,6 +102,7 @@ public void testEndDelimiter() throws Exception { * * @throws Exception If failed. */ + @Test public void testMiddleDelimiter() throws Exception { byte[] delim = array(F.t(wrap(2), 8)); byte[] data = array(F.t(wrap(1), 8), F.t(delim, 1), F.t(wrap(1), 8)); @@ -139,6 +143,7 @@ public void testMiddleDelimiter() throws Exception { * * @throws Exception If failed. */ + @Test public void testTwoHeadDelimiters() throws Exception { byte[] delim = array(F.t(wrap(2), 8)); byte[] data = array(F.t(delim, 2), F.t(wrap(1), 8)); @@ -179,6 +184,7 @@ public void testTwoHeadDelimiters() throws Exception { * * @throws Exception If failed. */ + @Test public void testTwoTailDelimiters() throws Exception { byte[] delim = array(F.t(wrap(2), 8)); byte[] data = array(F.t(wrap(1), 8), F.t(delim, 2)); @@ -219,6 +225,7 @@ public void testTwoTailDelimiters() throws Exception { * * @throws Exception If failed. */ + @Test public void testHeadAndTailDelimiters() throws Exception { byte[] delim = array(F.t(wrap(2), 8)); byte[] data = array(F.t(delim, 1), F.t(wrap(1), 8), F.t(delim, 1)); @@ -259,6 +266,7 @@ public void testHeadAndTailDelimiters() throws Exception { * * @throws Exception If failed. */ + @Test public void testDelimiterStartsWithTheSameBytesAsLastPreviousDataByte() throws Exception { byte[] delim = array(F.t(wrap(1, 1, 2), 1)); byte[] data = array(F.t(wrap(1), 1), F.t(delim, 1), F.t(wrap(1), 1)); @@ -332,4 +340,4 @@ public void assertSplitNull(long suggestedStart, long suggestedLen, byte[] data, private IgfsByteDelimiterRecordResolver resolver(byte[]... delims) { return new IgfsByteDelimiterRecordResolver(delims); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/split/IgfsFixedLengthRecordResolverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/split/IgfsFixedLengthRecordResolverSelfTest.java index d869d5c9cac7e..641319587f7b2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/split/IgfsFixedLengthRecordResolverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/split/IgfsFixedLengthRecordResolverSelfTest.java @@ -31,6 +31,7 @@ public class IgfsFixedLengthRecordResolverSelfTest extends IgfsAbstractRecordRes * * @throws Exception If failed. */ + @Test public void testResolver() throws Exception { byte[] data = array(F.t(wrap(1), 24)); @@ -144,4 +145,4 @@ public void assertSplitNull(long suggestedStart, long suggestedLen, byte[] data, private IgfsFixedLengthRecordResolver resolver(int len) { return new IgfsFixedLengthRecordResolver(len); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/split/IgfsNewLineDelimiterRecordResolverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/split/IgfsNewLineDelimiterRecordResolverSelfTest.java index d0050614945fe..40e00e1ccb524 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/split/IgfsNewLineDelimiterRecordResolverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/split/IgfsNewLineDelimiterRecordResolverSelfTest.java @@ -34,6 +34,7 @@ public class IgfsNewLineDelimiterRecordResolverSelfTest extends IgfsAbstractReco * * @throws Exception If failed. */ + @Test public void test() throws Exception{ byte[] data = array(F.t(wrap(1), 8), F.t(wrap(SYM_LF), 1), F.t(wrap(1), 8), F.t(wrap(SYM_CR, SYM_LF), 1), F.t(wrap(1), 8)); @@ -127,4 +128,4 @@ public void assertSplitNull(long suggestedStart, long suggestedLen, byte[] data) private IgfsNewLineRecordResolver resolver() { return IgfsNewLineRecordResolver.NEW_LINE; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/split/IgfsStringDelimiterRecordResolverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/split/IgfsStringDelimiterRecordResolverSelfTest.java index cc4c2db6d979b..c7f39a5a135b5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/split/IgfsStringDelimiterRecordResolverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/split/IgfsStringDelimiterRecordResolverSelfTest.java @@ -36,6 +36,7 @@ public class IgfsStringDelimiterRecordResolverSelfTest extends IgfsAbstractRecor * * @throws Exception If failed. */ + @Test public void testResolver() throws Exception { String delim = "aaaaaaaa"; @@ -134,4 +135,4 @@ public void assertSplitNull(long suggestedStart, long suggestedLen, byte[] data, private IgfsStringDelimiterRecordResolver resolver(String... delims) { return new IgfsStringDelimiterRecordResolver(UTF8, delims); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/jobmetrics/GridJobMetricsProcessorLoadTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/jobmetrics/GridJobMetricsProcessorLoadTest.java index c75f002340c79..f4ade3e86993b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/jobmetrics/GridJobMetricsProcessorLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/jobmetrics/GridJobMetricsProcessorLoadTest.java @@ -55,6 +55,7 @@ public GridJobMetricsProcessorLoadTest() { /** * @throws Exception if failed. */ + @Test public void testJobMetricsMultiThreaded() throws Exception { GridTestUtils.runMultiThreaded(new Runnable() { @Override public void run() { @@ -86,4 +87,4 @@ public void testJobMetricsMultiThreaded() throws Exception { ctx.jobMetric().getJobMetrics(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/messaging/IgniteMessagingConfigVariationFullApiTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/messaging/IgniteMessagingConfigVariationFullApiTest.java index 33a8a7392cbff..afc2a3131d1bf 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/messaging/IgniteMessagingConfigVariationFullApiTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/messaging/IgniteMessagingConfigVariationFullApiTest.java @@ -55,6 +55,7 @@ public class IgniteMessagingConfigVariationFullApiTest extends IgniteConfigVaria /** * @throws Exception If failed. */ + @Test public void testLocalServer() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -66,6 +67,7 @@ public void testLocalServer() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLocalServerAsync() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -77,6 +79,7 @@ public void testLocalServerAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLocalListener() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -88,6 +91,7 @@ public void testLocalListener() throws Exception { /** * @throws Exception If failed. */ + @Test public void testServerClientMessage() throws Exception { if (!testsCfg.withClients()) return; @@ -102,6 +106,7 @@ public void testServerClientMessage() throws Exception { /** * @throws Exception If failed. */ + @Test public void testServerClientMessageAsync() throws Exception { if (!testsCfg.withClients()) return; @@ -116,6 +121,7 @@ public void testServerClientMessageAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientClientMessage() throws Exception { if (!testsCfg.withClients()) return; @@ -130,6 +136,7 @@ public void testClientClientMessage() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientClientMessageAsync() throws Exception { if (!testsCfg.withClients()) return; @@ -144,6 +151,7 @@ public void testClientClientMessageAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientServerMessage() throws Exception { if (!testsCfg.withClients()) return; @@ -158,6 +166,7 @@ public void testClientServerMessage() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientServerMessageAsync() throws Exception { if (!testsCfg.withClients()) return; @@ -172,6 +181,7 @@ public void testClientServerMessageAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCollectionMessage() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -183,6 +193,7 @@ public void testCollectionMessage() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOrderedMessage() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -194,6 +205,7 @@ public void testOrderedMessage() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientServerOrderedMessage() throws Exception { if (!testsCfg.withClients()) return; @@ -208,6 +220,7 @@ public void testClientServerOrderedMessage() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientClientOrderedMessage() throws Exception { if (!testsCfg.withClients()) return; @@ -222,6 +235,7 @@ public void testClientClientOrderedMessage() throws Exception { /** * @throws Exception If failed. */ + @Test public void testServerClientOrderedMessage() throws Exception { if (!testsCfg.withClients()) return; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/odbc/OdbcConfigurationValidationSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/odbc/OdbcConfigurationValidationSelfTest.java index f7e9aca73e37c..d4abc1fba6836 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/odbc/OdbcConfigurationValidationSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/odbc/OdbcConfigurationValidationSelfTest.java @@ -46,6 +46,7 @@ public class OdbcConfigurationValidationSelfTest extends GridCommonAbstractTest * * @throws Exception If failed. */ + @Test public void testAddressDefault() throws Exception { check(new OdbcConfiguration(), true); } @@ -55,6 +56,7 @@ public void testAddressDefault() throws Exception { * * @throws Exception If failed. */ + @Test public void testAddressHostOnly() throws Exception { check(new OdbcConfiguration().setEndpointAddress("127.0.0.1"), true); } @@ -64,6 +66,7 @@ public void testAddressHostOnly() throws Exception { * * @throws Exception If failed. */ + @Test public void testAddressHostAndPort() throws Exception { check(new OdbcConfiguration().setEndpointAddress("127.0.0.1:9999"), true); @@ -76,6 +79,7 @@ public void testAddressHostAndPort() throws Exception { * * @throws Exception If failed. */ + @Test public void testAddressHostAndPortRange() throws Exception { check(new OdbcConfiguration().setEndpointAddress("127.0.0.1:9999..10000"), true); check(new OdbcConfiguration().setEndpointAddress("127.0.0.1:9999..10000"), true); @@ -89,6 +93,7 @@ public void testAddressHostAndPortRange() throws Exception { * * @throws Exception If failed. */ + @Test public void testAddressInvalidHost() throws Exception { check(new OdbcConfiguration().setEndpointAddress("126.0.0.1"), false); } @@ -98,6 +103,7 @@ public void testAddressInvalidHost() throws Exception { * * @throws Exception If failed. */ + @Test public void testAddressInvalidFormat() throws Exception { check(new OdbcConfiguration().setEndpointAddress("127.0.0.1:"), false); @@ -121,6 +127,7 @@ public void testAddressInvalidFormat() throws Exception { * * @throws Exception If failed. */ + @Test public void testConnectionParams() throws Exception { check(new OdbcConfiguration().setEndpointAddress("127.0.0.1:9998..10000") .setSocketSendBufferSize(4 * 1024), true); @@ -140,6 +147,7 @@ public void testConnectionParams() throws Exception { * * @throws Exception If failed. */ + @Test public void testThreadPoolSize() throws Exception { check(new OdbcConfiguration().setThreadPoolSize(0), false); check(new OdbcConfiguration().setThreadPoolSize(-1), false); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/odbc/OdbcEscapeSequenceSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/odbc/OdbcEscapeSequenceSelfTest.java index 6eed58060d91b..cf82daee1a962 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/odbc/OdbcEscapeSequenceSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/odbc/OdbcEscapeSequenceSelfTest.java @@ -31,6 +31,7 @@ public class OdbcEscapeSequenceSelfTest extends GridCommonAbstractTest { /** * Test simple cases. */ + @Test public void testTrivial() { check( "select * from table;", @@ -41,6 +42,7 @@ public void testTrivial() { /** * Test escape sequence series. */ + @Test public void testSimpleFunction() throws Exception { check( "test()", @@ -76,6 +78,7 @@ public void testSimpleFunction() throws Exception { /** * Test escape sequence for explicit data type conversion */ + @Test public void testConvertFunction() throws Exception { check( "CONVERT ( CURDATE(), CHAR )", @@ -207,6 +210,7 @@ public void testConvertFunction() throws Exception { /** * Test simple nested escape sequences. Depth = 2. */ + @Test public void testNestedFunction() throws Exception { check( "func1(field1, func2(field2))", @@ -227,6 +231,7 @@ public void testNestedFunction() throws Exception { /** * Test nested escape sequences. Depth > 2. */ + @Test public void testDeepNestedFunction() { check( "func1(func2(func3(field1)))", @@ -252,6 +257,7 @@ public void testDeepNestedFunction() { /** * Test series of nested escape sequences. */ + @Test public void testNestedFunctionMixed() { check( "func1(func2(field1), func3(field2))", @@ -272,6 +278,7 @@ public void testNestedFunctionMixed() { /** * Test invalid escape sequence. */ + @Test public void testFailedOnInvalidFunctionSequence() { checkFail("{fnfunc1()}"); @@ -283,6 +290,7 @@ public void testFailedOnInvalidFunctionSequence() { /** * Test escape sequences with additional whitespace characters */ + @Test public void testFunctionEscapeSequenceWithWhitespaces() throws Exception { check("func1()", "{ fn func1()}"); @@ -296,6 +304,7 @@ public void testFunctionEscapeSequenceWithWhitespaces() throws Exception { /** * Test guid escape sequences */ + @Test public void testGuidEscapeSequence() { check( "CAST('12345678-9abc-def0-1234-123456789abc' AS UUID)", @@ -316,6 +325,7 @@ public void testGuidEscapeSequence() { /** * Test invalid escape sequence. */ + @Test public void testFailedOnInvalidGuidSequence() { checkFail("select {guid'12345678-9abc-def0-1234-123456789abc'}"); @@ -341,6 +351,7 @@ public void testFailedOnInvalidGuidSequence() { /** * Test escape sequences with additional whitespace characters */ + @Test public void testGuidEscapeSequenceWithWhitespaces() throws Exception { check( "CAST('12345678-9abc-def0-1234-123456789abc' AS UUID)", @@ -361,6 +372,7 @@ public void testGuidEscapeSequenceWithWhitespaces() throws Exception { /** * Test date escape sequences */ + @Test public void testDateEscapeSequence() throws Exception { check( "'2016-08-26'", @@ -381,6 +393,7 @@ public void testDateEscapeSequence() throws Exception { /** * Test date escape sequences with additional whitespace characters */ + @Test public void testDateEscapeSequenceWithWhitespaces() throws Exception { check("'2016-08-26'", "{ d '2016-08-26'}"); @@ -392,6 +405,7 @@ public void testDateEscapeSequenceWithWhitespaces() throws Exception { /** * Test invalid escape sequence. */ + @Test public void testFailedOnInvalidDateSequence() { checkFail("{d'2016-08-26'}"); @@ -411,6 +425,7 @@ public void testFailedOnInvalidDateSequence() { /** * Test date escape sequences */ + @Test public void testTimeEscapeSequence() throws Exception { check("'13:15:08'", "{t '13:15:08'}"); @@ -423,6 +438,7 @@ public void testTimeEscapeSequence() throws Exception { /** * Test date escape sequences with additional whitespace characters */ + @Test public void testTimeEscapeSequenceWithWhitespaces() throws Exception { check("'13:15:08'", "{ t '13:15:08'}"); @@ -434,6 +450,7 @@ public void testTimeEscapeSequenceWithWhitespaces() throws Exception { /** * Test invalid escape sequence. */ + @Test public void testFailedOnInvalidTimeSequence() { checkFail("{t'13:15:08'}"); @@ -453,6 +470,7 @@ public void testFailedOnInvalidTimeSequence() { /** * Test timestamp escape sequences */ + @Test public void testTimestampEscapeSequence() throws Exception { check( "'2016-08-26 13:15:08'", @@ -478,6 +496,7 @@ public void testTimestampEscapeSequence() throws Exception { /** * Test timestamp escape sequences with additional whitespace characters */ + @Test public void testTimestampEscapeSequenceWithWhitespaces() throws Exception { check("'2016-08-26 13:15:08'", "{ ts '2016-08-26 13:15:08'}" @@ -495,6 +514,7 @@ public void testTimestampEscapeSequenceWithWhitespaces() throws Exception { /** * Test invalid escape sequence. */ + @Test public void testFailedOnInvalidTimestampSequence() { checkFail("{ts '2016-08-26 13:15:08,12345'}"); @@ -523,6 +543,7 @@ public void testFailedOnInvalidTimestampSequence() { /** * Test escape sequence series. */ + @Test public void testOuterJoinFunction() throws Exception { check( "t OUTER JOIN t2 ON t.id=t2.id", @@ -543,6 +564,7 @@ public void testOuterJoinFunction() throws Exception { /** * Test simple nested escape sequences. Depth = 2. */ + @Test public void testNestedOuterJoin() throws Exception { check( "t OUTER JOIN (t2 OUTER JOIN t3 ON t2.id=t3.id) ON t.id=t2.id", @@ -563,6 +585,7 @@ public void testNestedOuterJoin() throws Exception { /** * Test nested escape sequences. Depth > 2. */ + @Test public void testDeepNestedOuterJoin() { check( "t OUTER JOIN (t2 OUTER JOIN (t3 OUTER JOIN t4 ON t3.id=t4.id) ON t2.id=t3.id) ON t.id=t2.id", @@ -588,6 +611,7 @@ public void testDeepNestedOuterJoin() { /** * Test invalid escape sequence. */ + @Test public void testFailedOnInvalidOuterJoinSequence() { checkFail("{ojt OUTER JOIN t2 ON t.id=t2.id}"); @@ -599,6 +623,7 @@ public void testFailedOnInvalidOuterJoinSequence() { /** * Test escape sequences with additional whitespace characters */ + @Test public void testOuterJoinSequenceWithWhitespaces() throws Exception { check( "t OUTER JOIN t2 ON t.id=t2.id", @@ -619,6 +644,7 @@ public void testOuterJoinSequenceWithWhitespaces() throws Exception { /** * Test non-escape sequences. */ + @Test public void testNonEscapeSequence() throws Exception { check("'{fn test()}'", "'{fn test()}'"); @@ -676,6 +702,7 @@ public void testNonEscapeSequence() throws Exception { /** * Test escape sequence series. */ + @Test public void testSimpleCallProc() throws Exception { check( "CALL test()", @@ -711,6 +738,7 @@ public void testSimpleCallProc() throws Exception { /** * Test simple nested escape sequences. Depth = 2. */ + @Test public void testNestedCallProc() throws Exception { check( "CALL func1(field1, CALL func2(field2))", @@ -731,6 +759,7 @@ public void testNestedCallProc() throws Exception { /** * Test nested escape sequences. Depth > 2. */ + @Test public void testDeepNestedCallProc() { check( "CALL func1(CALL func2(CALL func3(field1)))", @@ -756,6 +785,7 @@ public void testDeepNestedCallProc() { /** * Test series of nested escape sequences. */ + @Test public void testNestedCallProcMixed() { check( "CALL func1(CALL func2(field1), CALL func3(field2))", @@ -776,6 +806,7 @@ public void testNestedCallProcMixed() { /** * Test invalid escape sequence. */ + @Test public void testFailedOnInvalidCallProcSequence() { checkFail("{callfunc1()}"); @@ -787,6 +818,7 @@ public void testFailedOnInvalidCallProcSequence() { /** * Test escape sequences with additional whitespace characters */ + @Test public void testCallProcEscapeSequenceWithWhitespaces() throws Exception { check("CALL func1()", "{ call func1()}"); @@ -800,6 +832,7 @@ public void testCallProcEscapeSequenceWithWhitespaces() throws Exception { /** * Test escape sequence series. */ + @Test public void testLikeEscapeSequence() throws Exception { check( "ESCAPE '\\'", @@ -850,6 +883,7 @@ public void testLikeEscapeSequence() throws Exception { /** * Test escape sequences with additional whitespace characters */ + @Test public void testLikeEscapeSequenceWithWhitespaces() throws Exception { check("ESCAPE '\\'", "{ '\\' }"); check("ESCAPE '\\'", "{ escape '\\'}"); @@ -864,6 +898,7 @@ public void testLikeEscapeSequenceWithWhitespaces() throws Exception { /** * Test invalid escape sequence. */ + @Test public void testLikeOnInvalidLikeEscapeSequence() { checkFail("LIKE 'AAA's'"); checkFail("LIKE 'AAA\'s'"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/port/GridPortProcessorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/port/GridPortProcessorSelfTest.java index 9d5d52bd4c29b..b1f17e5aa62eb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/port/GridPortProcessorSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/port/GridPortProcessorSelfTest.java @@ -52,6 +52,7 @@ public class GridPortProcessorSelfTest extends GridCommonAbstractTest { /** * @throws Exception If any exception occurs. */ + @Test public void testA() throws Exception { Class cls1 = TcpCommunicationSpi.class; @@ -81,6 +82,7 @@ public void testA() throws Exception { /** * @throws Exception If any exception occurs. */ + @Test public void testB() throws Exception { final AtomicInteger ai = new AtomicInteger(); @@ -126,4 +128,4 @@ public void testB() throws Exception { assertEquals(i, ai.get()); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandlerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandlerSelfTest.java index 6f89915993906..f62a17f37a0ec 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandlerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandlerSelfTest.java @@ -102,6 +102,7 @@ protected CacheAtomicityMode atomicityMode(){ * * @throws Exception If failed. */ + @Test public void testCacheGetFailsSyncNotify() throws Exception { GridRestCommandHandler hnd = new TestableCacheCommandHandler(grid().context(), "getAsync"); @@ -128,6 +129,7 @@ public void testCacheGetFailsSyncNotify() throws Exception { * * @throws Exception In case of any exception. */ + @Test public void testAppendPrepend() throws Exception { assertEquals("as" + "df", testAppend("as", "df", true)); assertEquals("df" + "as", testAppend("as", "df", false)); @@ -216,6 +218,7 @@ private T testAppend(T curVal, T newVal, boolean append) throws IgniteChecke * * @throws Exception If failed. */ + @Test public void testCacheClear() throws Exception { GridRestCommandHandler hnd = new GridCacheCommandHandler(((IgniteKernal)grid()).context()); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/log/GridLogCommandHandlerTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/log/GridLogCommandHandlerTest.java index 7f0a6de4144d7..f9ec7213eb8ae 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/log/GridLogCommandHandlerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/log/GridLogCommandHandlerTest.java @@ -69,6 +69,7 @@ public class GridLogCommandHandlerTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testSupportedCommands() throws Exception { GridLogCommandHandler cmdHandler = new GridLogCommandHandler(newContext()); @@ -81,6 +82,7 @@ public void testSupportedCommands() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUnSupportedCommands() throws Exception { GridLogCommandHandler cmdHandler = new GridLogCommandHandler(newContext()); @@ -93,6 +95,7 @@ public void testUnSupportedCommands() throws Exception { /** * @throws Exception If failed. */ + @Test public void testHandleAsync() throws Exception { IgniteConfiguration cfg = new IgniteConfiguration(); cfg.setIgniteHome(igniteHome); @@ -114,6 +117,7 @@ public void testHandleAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testHandleAsyncForNonExistingLines() throws Exception { IgniteConfiguration cfg = new IgniteConfiguration(); cfg.setIgniteHome(igniteHome); @@ -135,6 +139,7 @@ public void testHandleAsyncForNonExistingLines() throws Exception { /** * @throws Exception If failed. */ + @Test public void testHandleAsyncFromAndToNotSet() throws Exception { IgniteConfiguration cfg = new IgniteConfiguration(); cfg.setIgniteHome(igniteHome); @@ -153,6 +158,7 @@ public void testHandleAsyncFromAndToNotSet() throws Exception { /** * @throws Exception If failed. */ + @Test public void testHandleAsyncPathNotSet() throws Exception { GridTestKernalContext ctx = newContext(); ctx.config().setIgniteHome(igniteHome); @@ -172,6 +178,7 @@ public void testHandleAsyncPathNotSet() throws Exception { /** * @throws Exception If failed. */ + @Test public void testHandleAsyncPathIsOutsideIgniteHome() throws Exception { IgniteConfiguration cfg = new IgniteConfiguration(); cfg.setIgniteHome(igniteHome); @@ -193,6 +200,7 @@ public void testHandleAsyncPathIsOutsideIgniteHome() throws Exception { /** * @throws Exception If failed. */ + @Test public void testHandleAsyncFromGreaterThanTo() throws Exception { IgniteConfiguration cfg = new IgniteConfiguration(); cfg.setIgniteHome(igniteHome); @@ -214,6 +222,7 @@ public void testHandleAsyncFromGreaterThanTo() throws Exception { /** * @throws Exception If failed. */ + @Test public void testHandleAsyncFromEqualTo() throws Exception { IgniteConfiguration cfg = new IgniteConfiguration(); cfg.setIgniteHome(igniteHome); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/query/GridQueryCommandHandlerTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/query/GridQueryCommandHandlerTest.java index f0ff25a2c72f3..5d31bd2f1018c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/query/GridQueryCommandHandlerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/query/GridQueryCommandHandlerTest.java @@ -51,6 +51,7 @@ public class GridQueryCommandHandlerTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testSupportedCommands() throws Exception { GridTestKernalContext ctx = newContext(grid().configuration()); @@ -72,6 +73,7 @@ public void testSupportedCommands() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUnsupportedCommands() throws Exception { GridTestKernalContext ctx = newContext(grid().configuration()); @@ -87,6 +89,7 @@ public void testUnsupportedCommands() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNullCache() throws Exception { QueryCommandHandler cmdHnd = new QueryCommandHandler(grid().context()); @@ -116,6 +119,7 @@ public void testNullCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNullPageSize() throws Exception { grid().getOrCreateCache(getName()); @@ -151,6 +155,7 @@ public void testNullPageSize() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQuery() throws Exception { grid().getOrCreateCache(getName()); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/top/CacheTopologyCommandHandlerTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/top/CacheTopologyCommandHandlerTest.java index 5d7dfd709c210..0e8539c19fcc1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/top/CacheTopologyCommandHandlerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/top/CacheTopologyCommandHandlerTest.java @@ -70,6 +70,7 @@ public class CacheTopologyCommandHandlerTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testTopologyCommandOnDynamicCacheCreateDestroy() throws Exception { GridRestTopologyRequest req = new GridRestTopologyRequest(); req.command(GridRestCommand.TOPOLOGY); @@ -80,6 +81,7 @@ public void testTopologyCommandOnDynamicCacheCreateDestroy() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNodeCommandOnDynamicCacheCreateDestroy1() throws Exception { Ignite node = startGrid(); @@ -93,6 +95,7 @@ public void testNodeCommandOnDynamicCacheCreateDestroy1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNodeCommandOnDynamicCacheCreateDestroy2() throws Exception { Ignite node = startGrid(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/ClosureServiceClientsNodesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/ClosureServiceClientsNodesTest.java index c3a3a1e6a0e32..e5ba62cc36b79 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/ClosureServiceClientsNodesTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/ClosureServiceClientsNodesTest.java @@ -82,6 +82,7 @@ public class ClosureServiceClientsNodesTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testDefaultClosure() throws Exception { Set srvNames = new HashSet<>(NODES_CNT - 1); @@ -116,6 +117,7 @@ public void testDefaultClosure() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientClosure() throws Exception { for (int i = 0 ; i < NODES_CNT; i++) { log.info("Iteration: " + i); @@ -143,6 +145,7 @@ public void testClientClosure() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCustomClosure() throws Exception { for (int i = 0 ; i < NODES_CNT; i++) { log.info("Iteration: " + i); @@ -166,6 +169,7 @@ public void testCustomClosure() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDefaultService() throws Exception { UUID clientNodeId = grid(CLIENT_IDX).cluster().localNode().id(); @@ -207,6 +211,7 @@ public void testDefaultService() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientService() throws Exception { UUID clientNodeId = grid(CLIENT_IDX).cluster().localNode().id(); @@ -267,4 +272,4 @@ private static class TestService implements Service { log.info("Executing test service."); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceClientNodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceClientNodeTest.java index 1d6cbaeac590e..eada35ada7f16 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceClientNodeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceClientNodeTest.java @@ -61,6 +61,7 @@ public class GridServiceClientNodeTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testDeployFromClient() throws Exception { startGrids(3); @@ -74,6 +75,7 @@ public void testDeployFromClient() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeployFromClientAfterRouterStop1() throws Exception { startGrid(0); @@ -102,6 +104,7 @@ public void testDeployFromClientAfterRouterStop1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeployFromClientAfterRouterStop2() throws Exception { startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceContinuousQueryRedeployTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceContinuousQueryRedeployTest.java index 2437b47f70e5f..7fe86d4f46026 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceContinuousQueryRedeployTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceContinuousQueryRedeployTest.java @@ -62,6 +62,7 @@ public class GridServiceContinuousQueryRedeployTest extends GridCommonAbstractTe /** * @throws Exception If failed. */ + @Test public void testServiceRedeploymentAfterCancel() throws Exception { final Ignite ignite = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceDeploymentCompoundFutureSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceDeploymentCompoundFutureSelfTest.java index ad93c6aabb5d0..26b9402c3fe41 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceDeploymentCompoundFutureSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceDeploymentCompoundFutureSelfTest.java @@ -34,6 +34,7 @@ public class GridServiceDeploymentCompoundFutureSelfTest extends GridCommonAbstr /** * @throws Exception If failed. */ + @Test public void testWaitForCompletionOnFailingFuture() throws Exception { GridServiceDeploymentCompoundFuture compFut = new GridServiceDeploymentCompoundFuture(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceDeploymentExceptionPropagationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceDeploymentExceptionPropagationTest.java index d987ce6264f7c..6e76665ee6403 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceDeploymentExceptionPropagationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceDeploymentExceptionPropagationTest.java @@ -28,6 +28,7 @@ public class GridServiceDeploymentExceptionPropagationTest extends GridCommonAbstractTest { /** */ @SuppressWarnings("unused") + @Test public void testExceptionPropagation() throws Exception { try (Ignite srv = startGrid("server")) { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServicePackagePrivateSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServicePackagePrivateSelfTest.java index c085192fdb0ca..117fd1851fc80 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServicePackagePrivateSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServicePackagePrivateSelfTest.java @@ -30,6 +30,7 @@ public class GridServicePackagePrivateSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPackagePrivateService() throws Exception { try { Ignite server = startGrid("server"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorAbstractSelfTest.java index 79e22606e4074..d14608be34f1b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorAbstractSelfTest.java @@ -154,6 +154,7 @@ protected Ignite randomGrid() { /** * @throws Exception If failed. */ + @Test public void testSameConfigurationOld() throws Exception { String name = "dupServiceOld"; @@ -183,6 +184,7 @@ public void testSameConfigurationOld() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSameConfiguration() throws Exception { String name = "dupServiceOld"; @@ -208,6 +210,7 @@ public void testSameConfiguration() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDifferentConfigurationOld() throws Exception { String name = "dupServiceOld"; @@ -241,6 +244,7 @@ public void testDifferentConfigurationOld() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDifferentConfiguration() throws Exception { String name = "dupService"; @@ -270,6 +274,7 @@ public void testDifferentConfiguration() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetServiceByName() throws Exception { String name = "serviceByName"; @@ -289,6 +294,7 @@ public void testGetServiceByName() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetServicesByName() throws Exception { final String name = "servicesByName"; @@ -315,6 +321,7 @@ public void testGetServicesByName() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeployOnEachNodeOld() throws Exception { Ignite g = randomGrid(); @@ -347,6 +354,7 @@ public void testDeployOnEachNodeOld() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeployOnEachNode() throws Exception { Ignite g = randomGrid(); @@ -375,6 +383,7 @@ public void testDeployOnEachNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeploySingletonOld() throws Exception { Ignite g = randomGrid(); @@ -407,6 +416,7 @@ public void testDeploySingletonOld() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeploySingleton() throws Exception { Ignite g = randomGrid(); @@ -435,6 +445,7 @@ public void testDeploySingleton() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAffinityDeployOld() throws Exception { Ignite g = randomGrid(); @@ -464,6 +475,7 @@ public void testAffinityDeployOld() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAffinityDeploy() throws Exception { Ignite g = randomGrid(); @@ -489,6 +501,7 @@ public void testAffinityDeploy() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeployMultiple1Old() throws Exception { Ignite g = randomGrid(); @@ -521,6 +534,7 @@ public void testDeployMultiple1Old() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeployMultiple1() throws Exception { Ignite g = randomGrid(); @@ -549,6 +563,7 @@ public void testDeployMultiple1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeployMultiple2Old() throws Exception { Ignite g = randomGrid(); @@ -583,6 +598,7 @@ public void testDeployMultiple2Old() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeployMultiple2() throws Exception { Ignite g = randomGrid(); @@ -613,6 +629,7 @@ public void testDeployMultiple2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCancelSingleton() throws Exception { Ignite g = randomGrid(); @@ -648,6 +665,7 @@ public void testCancelSingleton() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCancelSingletonAsync() throws Exception { Ignite g = randomGrid(); @@ -683,6 +701,7 @@ public void testCancelSingletonAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCancelEachNode() throws Exception { Ignite g = randomGrid(); @@ -718,6 +737,7 @@ public void testCancelEachNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCancelAsyncEachNode() throws Exception { Ignite g = randomGrid(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorBatchDeploySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorBatchDeploySelfTest.java index c461ce2a5a04c..9c64cbfd975a3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorBatchDeploySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorBatchDeploySelfTest.java @@ -91,6 +91,7 @@ public class GridServiceProcessorBatchDeploySelfTest extends GridCommonAbstractT /** * @throws Exception If failed. */ + @Test public void testDeployAll() throws Exception { Ignite client = grid(CLIENT_NODE_NAME); @@ -110,6 +111,7 @@ public void testDeployAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeployAllAsync() throws Exception { Ignite client = grid(CLIENT_NODE_NAME); @@ -131,6 +133,7 @@ public void testDeployAllAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeployAllTopologyChange() throws Exception { Ignite client = grid(CLIENT_NODE_NAME); @@ -183,6 +186,7 @@ public void testDeployAllTopologyChange() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeployAllTopologyChangeFail() throws Exception { final Ignite client = grid(CLIENT_NODE_NAME); @@ -260,6 +264,7 @@ public void testDeployAllTopologyChangeFail() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeployAllFail() throws Exception { deployAllFail(false); } @@ -267,6 +272,7 @@ public void testDeployAllFail() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeployAllAsyncFail() throws Exception { deployAllFail(true); } @@ -298,6 +304,7 @@ private void deployAllFail(boolean async) throws Exception { /** * @throws Exception If failed. */ + @Test public void testClashingNames() throws Exception { Ignite client = grid(CLIENT_NODE_NAME); @@ -324,6 +331,7 @@ public void testClashingNames() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClashingNamesFail() throws Exception { Ignite client = grid(CLIENT_NODE_NAME); @@ -356,6 +364,7 @@ public void testClashingNamesFail() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClashingNameDifferentConfig() throws Exception { Ignite client = grid(CLIENT_NODE_NAME); @@ -390,6 +399,7 @@ public void testClashingNameDifferentConfig() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCancelAll() throws Exception { Ignite client = grid(CLIENT_NODE_NAME); @@ -411,6 +421,7 @@ public void testCancelAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCancelAllAsync() throws Exception { Ignite client = grid(CLIENT_NODE_NAME); @@ -434,6 +445,7 @@ public void testCancelAllAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCancelAllTopologyChange() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10021"); @@ -486,6 +498,7 @@ public void testCancelAllTopologyChange() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCancelAllClashingNames() throws Exception { Ignite client = grid(CLIENT_NODE_NAME); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorMultiNodeConfigSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorMultiNodeConfigSelfTest.java index e43d02934ddc2..a677fbc11db43 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorMultiNodeConfigSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorMultiNodeConfigSelfTest.java @@ -144,6 +144,7 @@ public class GridServiceProcessorMultiNodeConfigSelfTest extends GridServiceProc /** * @throws Exception If failed. */ + @Test public void testSingletonUpdateTopology() throws Exception { checkSingletonUpdateTopology(CLUSTER_SINGLE); } @@ -151,6 +152,7 @@ public void testSingletonUpdateTopology() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeployOnEachNodeUpdateTopology() throws Exception { checkDeployOnEachNodeUpdateTopology(NODE_SINGLE); } @@ -158,6 +160,7 @@ public void testDeployOnEachNodeUpdateTopology() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeployOnEachNodeButClientUpdateTopology() throws Exception { checkDeployOnEachNodeButClientUpdateTopology(NODE_SINGLE_BUT_CLIENT); } @@ -165,6 +168,7 @@ public void testDeployOnEachNodeButClientUpdateTopology() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAll() throws Exception { checkSingletonUpdateTopology(CLUSTER_SINGLE); @@ -182,6 +186,7 @@ public void testAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAffinityUpdateTopology() throws Exception { Ignite g = randomGrid(); @@ -204,6 +209,7 @@ public void testAffinityUpdateTopology() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeployLimits() throws Exception { final Ignite g = randomGrid(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorMultiNodeSelfTest.java index 517f061d32323..e36f192286aa7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorMultiNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorMultiNodeSelfTest.java @@ -38,6 +38,7 @@ public class GridServiceProcessorMultiNodeSelfTest extends GridServiceProcessorA /** * @throws Exception If failed. */ + @Test public void testSingletonUpdateTopology() throws Exception { String name = "serviceSingletonUpdateTopology"; @@ -82,6 +83,7 @@ public void testSingletonUpdateTopology() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAffinityDeployUpdateTopology() throws Exception { Ignite g = randomGrid(); @@ -120,6 +122,7 @@ public void testAffinityDeployUpdateTopology() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeployOnEachNodeButClientUpdateTopology() throws Exception { // Prestart client node. Ignite client = startGrid("client", getConfiguration("client").setClientMode(true)); @@ -185,6 +188,7 @@ public void testDeployOnEachNodeButClientUpdateTopology() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeployOnEachProjectionNodeUpdateTopology() throws Exception { // Prestart client node. Ignite client = startGrid("client", getConfiguration("client").setClientMode(true)); @@ -252,6 +256,7 @@ public void testDeployOnEachProjectionNodeUpdateTopology() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeployOnEachNodeUpdateTopology() throws Exception { // Prestart client node. Ignite client = startGrid("client", getConfiguration("client").setClientMode(true)); @@ -329,6 +334,7 @@ public void testDeployOnEachNodeUpdateTopology() throws Exception { * @throws Exception If failed. */ @SuppressWarnings("deprecation") + @Test public void testDeployLimits() throws Exception { final String name = "serviceWithLimitsUpdateTopology"; @@ -390,4 +396,4 @@ public void testDeployLimits() throws Exception { stopExtraNodes(extraNodes); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorProxySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorProxySelfTest.java index 014aae51f9c55..fcf4bc4286810 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorProxySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorProxySelfTest.java @@ -41,6 +41,7 @@ public class GridServiceProcessorProxySelfTest extends GridServiceProcessorAbstr /** * @throws Exception If failed. */ + @Test public void testNodeSingletonProxy() throws Exception { String name = "testNodeSingletonProxy"; @@ -73,6 +74,7 @@ public void testNodeSingletonProxy() throws Exception { * @throws Exception If failed. */ @SuppressWarnings("ThrowableNotThrown") + @Test public void testException() throws Exception { String name = "errorService"; @@ -95,6 +97,7 @@ public void testException() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClusterSingletonProxy() throws Exception { String name = "testClusterSingletonProxy"; @@ -113,6 +116,7 @@ public void testClusterSingletonProxy() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultiNodeProxy() throws Exception { Ignite ignite = randomGrid(); @@ -138,6 +142,7 @@ public void testMultiNodeProxy() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNodeSingletonRemoteNotStickyProxy() throws Exception { String name = "testNodeSingletonRemoteNotStickyProxy"; @@ -176,6 +181,7 @@ public void testNodeSingletonRemoteNotStickyProxy() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNodeSingletonRemoteStickyProxy() throws Exception { String name = "testNodeSingletonRemoteStickyProxy"; @@ -211,6 +217,7 @@ public void testNodeSingletonRemoteStickyProxy() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSingletonProxyInvocation() throws Exception { final String name = "testProxyInvocationFromSeveralNodes"; @@ -233,6 +240,7 @@ public void testSingletonProxyInvocation() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLocalProxyInvocation() throws Exception { final String name = "testLocalProxyInvocation"; @@ -273,6 +281,7 @@ public void testLocalProxyInvocation() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemoteNotStickProxyInvocation() throws Exception { final String name = "testRemoteNotStickProxyInvocation"; @@ -308,6 +317,7 @@ public void testRemoteNotStickProxyInvocation() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemoteStickyProxyInvocation() throws Exception { final String name = "testRemoteStickyProxyInvocation"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorSingleNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorSingleNodeSelfTest.java index 202b4b6316e39..a51ff686a63ed 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorSingleNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorSingleNodeSelfTest.java @@ -33,6 +33,7 @@ public class GridServiceProcessorSingleNodeSelfTest extends GridServiceProcessor /** * @throws Exception If failed. */ + @Test public void testNodeSingletonNotDeployedProxy() throws Exception { String name = "testNodeSingletonNotDeployedProxy"; @@ -55,4 +56,4 @@ public void testNodeSingletonNotDeployedProxy() throws Exception { info("Got expected exception: " + e.getMessage()); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorStopSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorStopSelfTest.java index 8eefa20454883..d18522c12e27b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorStopSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorStopSelfTest.java @@ -52,6 +52,7 @@ public class GridServiceProcessorStopSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testStopDuringDeployment() throws Exception { final CountDownLatch depLatch = new CountDownLatch(1); @@ -98,6 +99,7 @@ public void testStopDuringDeployment() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStopDuringHangedDeployment() throws Exception { final CountDownLatch depLatch = new CountDownLatch(1); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProxyClientReconnectSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProxyClientReconnectSelfTest.java index 5fdcdc49e5224..6f22bd832a188 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProxyClientReconnectSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProxyClientReconnectSelfTest.java @@ -57,6 +57,7 @@ public class GridServiceProxyClientReconnectSelfTest extends GridCommonAbstractT /** * @throws Exception If failed. */ + @Test public void testClientReconnect() throws Exception { startGrid("server"); @@ -93,6 +94,7 @@ public void testClientReconnect() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientReconnectLongServiceInit() throws Exception { startGrid("server"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProxyNodeStopSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProxyNodeStopSelfTest.java index f09b744f42a4c..ada59b7cc0667 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProxyNodeStopSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProxyNodeStopSelfTest.java @@ -53,6 +53,7 @@ public class GridServiceProxyNodeStopSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testProxyHashCode() throws Exception { Ignite server = startGrid("server"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceReassignmentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceReassignmentSelfTest.java index e44c8eabde0c7..c5bd9acbcb023 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceReassignmentSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceReassignmentSelfTest.java @@ -46,6 +46,7 @@ public class GridServiceReassignmentSelfTest extends GridServiceProcessorAbstrac /** * @throws Exception If failed. */ + @Test public void testClusterSingleton() throws Exception { checkReassigns(1, 1); } @@ -53,6 +54,7 @@ public void testClusterSingleton() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNodeSingleton() throws Exception { checkReassigns(0, 1); } @@ -60,6 +62,7 @@ public void testNodeSingleton() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLimited1() throws Exception { checkReassigns(5, 2); } @@ -67,6 +70,7 @@ public void testLimited1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLimited2() throws Exception { checkReassigns(7, 3); } @@ -249,4 +253,4 @@ private int nextRandomIdx(Iterable startedGrids, Random rnd) { } } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceSerializationSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceSerializationSelfTest.java index 7c0b03dc8df8b..03e08ca5aa379 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceSerializationSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceSerializationSelfTest.java @@ -54,6 +54,7 @@ public class GridServiceSerializationSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testServiceSerialization() throws Exception { try { Ignite server = startGridsMultiThreaded(3); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceConfigVariationsFullApiTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceConfigVariationsFullApiTest.java index 9ea065213da65..6866fe2dda0aa 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceConfigVariationsFullApiTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceConfigVariationsFullApiTest.java @@ -83,6 +83,7 @@ public class IgniteServiceConfigVariationsFullApiTest extends IgniteConfigVariat * * @throws Exception If failed. */ + @Test public void testNodeSingletonDeploy() throws Exception { runInAllDataModes(new ServiceTestRunnable(true, new DeployClosure() { @Override public void run(IgniteServices services, String svcName, TestService svc) throws Exception { @@ -99,6 +100,7 @@ public void testNodeSingletonDeploy() throws Exception { * * @throws Exception If failed. */ + @Test public void testClusterSingletonDeploy() throws Exception { runInAllDataModes(new ServiceTestRunnable(false, new DeployClosure() { @Override public void run(IgniteServices services, String svcName, TestService svc) throws Exception { @@ -115,6 +117,7 @@ public void testClusterSingletonDeploy() throws Exception { * * @throws Exception If failed. */ + @Test public void testKeyAffinityDeploy() throws Exception { runInAllDataModes(new ServiceTestRunnable(false, new DeployClosure() { @Override public void run(IgniteServices services, String svcName, TestService svc) { @@ -135,6 +138,7 @@ public void testKeyAffinityDeploy() throws Exception { * * @throws Exception If failed. */ + @Test public void testMultipleDeploy() throws Exception { runInAllDataModes(new ServiceTestRunnable(true, new DeployClosure() { @Override public void run(IgniteServices services, String svcName, TestService svc) { @@ -148,6 +152,7 @@ public void testMultipleDeploy() throws Exception { * * @throws Exception If failed. */ + @Test public void testDeploy() throws Exception { runInAllDataModes(new ServiceTestRunnable(false, new DeployClosure() { @Override public void run(IgniteServices services, String svcName, TestService svc) throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDeployment2ClassLoadersDefaultMarshallerTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDeployment2ClassLoadersDefaultMarshallerTest.java index 000ed20d328c2..db66aaf787b2a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDeployment2ClassLoadersDefaultMarshallerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDeployment2ClassLoadersDefaultMarshallerTest.java @@ -151,6 +151,7 @@ protected Marshaller marshaller() { /** * @throws Exception If failed. */ + @Test public void testServiceDeployment1() throws Exception { startGrid(0).services().deploy(serviceConfig(true)); @@ -173,6 +174,7 @@ public void testServiceDeployment1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testServiceDeployment2() throws Exception { for (int i = 0 ; i < 4; i++) startGrid(i); @@ -190,6 +192,7 @@ public void testServiceDeployment2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testServiceDeployment3() throws Exception { startGrid(0).services().deploy(serviceConfig(true)); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDeploymentClassLoadingDefaultMarshallerTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDeploymentClassLoadingDefaultMarshallerTest.java index 7f087210c2655..426f989733d02 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDeploymentClassLoadingDefaultMarshallerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDeploymentClassLoadingDefaultMarshallerTest.java @@ -124,6 +124,7 @@ protected Marshaller marshaller() { /** * @throws Exception If failed. */ + @Test public void testServiceDeployment1() throws Exception { startGrid(SERVER_NODE); @@ -141,6 +142,7 @@ public void testServiceDeployment1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testServiceDeployment2() throws Exception { startGrid(SERVER_NODE); @@ -154,6 +156,7 @@ public void testServiceDeployment2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testServiceDeployment3() throws Exception { startGrid(SERVER_NODE_WITH_EXT_CLASS_LOADER).services().deploy(serviceConfig()); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDynamicCachesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDynamicCachesSelfTest.java index 7e5a18ddae955..2d161898ed37f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDynamicCachesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDynamicCachesSelfTest.java @@ -63,6 +63,7 @@ public class IgniteServiceDynamicCachesSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testDeployCalledAfterCacheStart() throws Exception { String cacheName = "cache"; @@ -108,6 +109,7 @@ public void testDeployCalledAfterCacheStart() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeployCalledBeforeCacheStart() throws Exception { String cacheName = "cache"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceProxyTimeoutInitializedTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceProxyTimeoutInitializedTest.java index 6bf76f51b92c4..a4140104d39b3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceProxyTimeoutInitializedTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceProxyTimeoutInitializedTest.java @@ -103,6 +103,7 @@ public class IgniteServiceProxyTimeoutInitializedTest extends GridCommonAbstract * @throws Exception If fail. */ @SuppressWarnings({"Convert2Lambda"}) + @Test public void testUnavailableService() throws Exception { srvc = new TestWaitServiceImpl(); @@ -143,6 +144,7 @@ public void testUnavailableService() throws Exception { * @throws Exception If fail. */ @SuppressWarnings({"Convert2Lambda"}) + @Test public void testServiceException() throws Exception { srvc = new HangServiceImpl(); @@ -195,7 +197,8 @@ private static class TestWaitServiceImpl implements Service, TestService { private static final long serialVersionUID = 0L; /** {@inheritDoc} */ - @Override public void test() { + @Override @Test + public void test() { // No-op } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceReassignmentTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceReassignmentTest.java index e74b27de99caa..394ad7f00aea6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceReassignmentTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceReassignmentTest.java @@ -87,6 +87,7 @@ public class IgniteServiceReassignmentTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testNodeRestart1() throws Exception { srvcCfg = serviceConfiguration(); @@ -129,6 +130,7 @@ public void testNodeRestart1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNodeRestart2() throws Exception { startGrids(3); @@ -157,6 +159,7 @@ public void testNodeRestart2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNodeRestartRandom() throws Exception { final int NODES = 5; @@ -190,6 +193,7 @@ public void testNodeRestartRandom() throws Exception { /** * @throws Exception If failed. */ + @Test public void testZombieAssignmentsCleanup() throws Exception { useStrLog = true; @@ -246,6 +250,7 @@ public void testZombieAssignmentsCleanup() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNodeStopWhileThereAreCacheActivitiesInServiceProcessor() throws Exception { final int nodesCnt = 2; final int maxSvc = 1024; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/ServiceDeploymentOnActivationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/ServiceDeploymentOnActivationTest.java index 29e38d3f62834..6800a24ab4663 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/ServiceDeploymentOnActivationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/ServiceDeploymentOnActivationTest.java @@ -101,6 +101,7 @@ public class ServiceDeploymentOnActivationTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testServersWithPersistence() throws Exception { persistence = true; @@ -110,6 +111,7 @@ public void testServersWithPersistence() throws Exception { /** * @throws Exception if failed. */ + @Test public void testClientsWithPersistence() throws Exception { persistence = true; @@ -119,6 +121,7 @@ public void testClientsWithPersistence() throws Exception { /** * @throws Exception if failed. */ + @Test public void testServersWithoutPersistence() throws Exception { persistence = false; @@ -128,6 +131,7 @@ public void testServersWithoutPersistence() throws Exception { /** * @throws Exception if failed. */ + @Test public void testClientsWithoutPersistence() throws Exception { persistence = false; @@ -137,6 +141,7 @@ public void testClientsWithoutPersistence() throws Exception { /** * @throws Exception If failed. */ + @Test public void testServersStaticConfigWithPersistence() throws Exception { persistence = true; @@ -146,6 +151,7 @@ public void testServersStaticConfigWithPersistence() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientsStaticConfigWithPersistence() throws Exception { persistence = true; @@ -155,6 +161,7 @@ public void testClientsStaticConfigWithPersistence() throws Exception { /** * @throws Exception If failed. */ + @Test public void testServersStaticConfigWithoutPersistence() throws Exception { persistence = false; @@ -164,6 +171,7 @@ public void testServersStaticConfigWithoutPersistence() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientsStaticConfigWithoutPersistence() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-8279"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/ServiceDeploymentOutsideBaselineTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/ServiceDeploymentOutsideBaselineTest.java index 878ec0d43c5db..0a3d74fb2ec3b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/ServiceDeploymentOutsideBaselineTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/ServiceDeploymentOutsideBaselineTest.java @@ -93,6 +93,7 @@ public class ServiceDeploymentOutsideBaselineTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testDeployOutsideBaseline() throws Exception { checkDeploymentFromOutsideNode(true, false); } @@ -100,6 +101,7 @@ public void testDeployOutsideBaseline() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeployOutsideBaselineNoPersistence() throws Exception { checkDeploymentFromOutsideNode(false, false); } @@ -107,6 +109,7 @@ public void testDeployOutsideBaselineNoPersistence() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeployOutsideBaselineStatic() throws Exception { checkDeploymentFromOutsideNode(true, true); } @@ -114,6 +117,7 @@ public void testDeployOutsideBaselineStatic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeployOutsideBaselineStaticNoPersistence() throws Exception { checkDeploymentFromOutsideNode(false, true); } @@ -121,6 +125,7 @@ public void testDeployOutsideBaselineStaticNoPersistence() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeployFromNodeAddedToBlt() throws Exception { checkDeployWithNodeAddedToBlt(true); } @@ -128,6 +133,7 @@ public void testDeployFromNodeAddedToBlt() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeployToNodeAddedToBlt() throws Exception { checkDeployWithNodeAddedToBlt(false); } @@ -135,6 +141,7 @@ public void testDeployToNodeAddedToBlt() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeployFromNodeRemovedFromBlt() throws Exception { checkDeployFromNodeRemovedFromBlt(true, false); } @@ -142,6 +149,7 @@ public void testDeployFromNodeRemovedFromBlt() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeployFromNodeRemovedFromBltStatic() throws Exception { checkDeployFromNodeRemovedFromBlt(true, true); } @@ -149,6 +157,7 @@ public void testDeployFromNodeRemovedFromBltStatic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeployToNodeRemovedFromBlt() throws Exception { checkDeployFromNodeRemovedFromBlt(false, false); } @@ -156,6 +165,7 @@ public void testDeployToNodeRemovedFromBlt() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStaticDeployFromEachPersistentNodes() throws Exception { checkDeployFromEachNodes(true, true); } @@ -163,6 +173,7 @@ public void testStaticDeployFromEachPersistentNodes() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeployFromEachNodes() throws Exception { checkDeployFromEachNodes(false, false); } @@ -170,6 +181,7 @@ public void testDeployFromEachNodes() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStaticDeployFromEachNodes() throws Exception { checkDeployFromEachNodes(false, true); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/ServicePredicateAccessCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/ServicePredicateAccessCacheTest.java index 33a1993670bb6..06236e77c5c14 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/ServicePredicateAccessCacheTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/ServicePredicateAccessCacheTest.java @@ -72,6 +72,7 @@ public class ServicePredicateAccessCacheTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPredicateAccessCache() throws Exception { final Ignite ignite0 = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/SystemCacheNotConfiguredTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/SystemCacheNotConfiguredTest.java index a76eb22585a64..1fd925138ebc5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/SystemCacheNotConfiguredTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/SystemCacheNotConfiguredTest.java @@ -66,6 +66,7 @@ public class SystemCacheNotConfiguredTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void test() throws Exception { captureErr(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/timeout/GridTimeoutProcessorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/timeout/GridTimeoutProcessorSelfTest.java index 606b10252b19a..8875e8fe65fca 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/timeout/GridTimeoutProcessorSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/timeout/GridTimeoutProcessorSelfTest.java @@ -66,6 +66,7 @@ public class GridTimeoutProcessorSelfTest extends GridCommonAbstractTest { * * @throws Exception If test failed. */ + @Test public void testTimeouts() throws Exception { int max = 100; @@ -136,6 +137,7 @@ public void testTimeouts() throws Exception { * * @throws Exception If test failed. */ + @Test public void testTimeoutsMultithreaded() throws Exception { final int max = 100; @@ -212,6 +214,7 @@ public void testTimeoutsMultithreaded() throws Exception { * * @throws Exception If test failed. */ + @Test public void testTimeoutObjectAdapterMultithreaded() throws Exception { final int max = 100; @@ -272,6 +275,7 @@ public void testTimeoutObjectAdapterMultithreaded() throws Exception { * * @throws Exception If test failed. */ + @Test public void testTimeoutNeverCalled() throws Exception { int max = 100; @@ -331,6 +335,7 @@ public void testTimeoutNeverCalled() throws Exception { * * @throws Exception If test failed. */ + @Test public void testTimeoutNeverCalledMultithreaded() throws Exception { int threads = 20; @@ -395,6 +400,7 @@ public void testTimeoutNeverCalledMultithreaded() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testAddRemoveInterleaving() throws Exception { final AtomicInteger callCnt = new AtomicInteger(0); @@ -517,6 +523,7 @@ public void testAddRemoveInterleaving() throws Exception { * * @throws Exception If test failed. */ + @Test public void testTimeoutCallOnce() throws Exception { ctx.timeout().addTimeoutObject(new GridTimeoutObject() { /** Timeout ID. */ @@ -558,6 +565,7 @@ public void testTimeoutCallOnce() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testTimeoutSameEndTime() throws Exception { final CountDownLatch latch = new CountDownLatch(2); @@ -631,6 +639,7 @@ public void testTimeoutSameEndTime() throws Exception { * * @throws Exception If test failed. */ + @Test public void testCancelingWithClearedInterruptedFlag() throws Exception { final CountDownLatch onTimeoutCalled = new CountDownLatch(1); @@ -652,4 +661,4 @@ public void testCancelingWithClearedInterruptedFlag() throws Exception { onTimeoutCalled.await(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/product/GridProductVersionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/product/GridProductVersionSelfTest.java index 92990deb62703..02c274e9b8c04 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/product/GridProductVersionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/product/GridProductVersionSelfTest.java @@ -32,6 +32,7 @@ public class GridProductVersionSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testFromString() throws Exception { IgniteProductVersion ver = IgniteProductVersion.fromString("1.2.3"); @@ -138,4 +139,4 @@ public void testFromString() throws Exception { IgniteProductVersion.fromString(VER_STR + '-' + BUILD_TSTAMP + '-' + REV_HASH_STR); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/sql/SqlParserBulkLoadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/sql/SqlParserBulkLoadSelfTest.java index b6716ffbf6a8f..d27b2b9409c38 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/sql/SqlParserBulkLoadSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/sql/SqlParserBulkLoadSelfTest.java @@ -22,6 +22,7 @@ */ public class SqlParserBulkLoadSelfTest extends SqlParserAbstractSelfTest { /** Tests for COPY command. */ + @Test public void testCopy() { assertParseError(null, "copy grom 'any.file' into Person (_key, age, firstName, lastName) format csv", diff --git a/modules/core/src/test/java/org/apache/ignite/internal/sql/SqlParserCreateIndexSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/sql/SqlParserCreateIndexSelfTest.java index a3be0183944d0..cf1cbf6a36dff 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/sql/SqlParserCreateIndexSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/sql/SqlParserCreateIndexSelfTest.java @@ -43,6 +43,7 @@ public class SqlParserCreateIndexSelfTest extends SqlParserAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testCreateIndex() throws Exception { // Base. parseValidate(null, "CREATE INDEX idx ON tbl(a)", null, "TBL", "IDX", DEFAULT_PROPS, "A", false); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/sql/SqlParserDropIndexSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/sql/SqlParserDropIndexSelfTest.java index a0af3a62d9d7b..b53ed7f0158b8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/sql/SqlParserDropIndexSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/sql/SqlParserDropIndexSelfTest.java @@ -28,6 +28,7 @@ public class SqlParserDropIndexSelfTest extends SqlParserAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testDropIndex() throws Exception { // Base. parseValidate(null, "DROP INDEX idx", null, "IDX"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/sql/SqlParserSetStreamingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/sql/SqlParserSetStreamingSelfTest.java index 7e699f6adabb7..34868ca2481da 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/sql/SqlParserSetStreamingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/sql/SqlParserSetStreamingSelfTest.java @@ -27,6 +27,7 @@ public class SqlParserSetStreamingSelfTest extends SqlParserAbstractSelfTest { /** * */ + @Test public void testParseSetStreaming() { parseValidate("set streaming on", true, false, 2048, 0, 0, 0, false); parseValidate("set streaming 1", true, false, 2048, 0, 0, 0, false); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/sql/SqlParserTransactionalKeywordsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/sql/SqlParserTransactionalKeywordsSelfTest.java index 103bb97925cc6..3d82c0ffafc7d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/sql/SqlParserTransactionalKeywordsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/sql/SqlParserTransactionalKeywordsSelfTest.java @@ -29,6 +29,7 @@ public class SqlParserTransactionalKeywordsSelfTest extends SqlParserAbstractSel /** * Test parsing of different forms of BEGIN/START. */ + @Test public void testBegin() { assertBegin("begin"); assertBegin("BEGIN"); @@ -44,6 +45,7 @@ public void testBegin() { /** * Test parsing of different forms of COMMIT. */ + @Test public void testCommit() { assertCommit("commit"); assertCommit("COMMIT transaction"); @@ -54,6 +56,7 @@ public void testCommit() { /** * Test parsing of different forms of ROLLBACK. */ + @Test public void testRollback() { assertRollback("rollback"); assertRollback("ROLLBACK transaction"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/sql/SqlParserUserSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/sql/SqlParserUserSelfTest.java index 2c240f4dd2d0c..c211c0ca76d6a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/sql/SqlParserUserSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/sql/SqlParserUserSelfTest.java @@ -31,6 +31,7 @@ public class SqlParserUserSelfTest extends SqlParserAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testCreateUser() throws Exception { // Base. parseValidateCreate("CREATE USER test WITH PASSWORD 'test'", "TEST", "test"); @@ -51,6 +52,7 @@ public void testCreateUser() throws Exception { * * @throws Exception If failed. */ + @Test public void testAlterUser() throws Exception { // Base. parseValidateAlter("ALTER USER test WITH PASSWORD 'test'", "TEST", "test"); @@ -71,6 +73,7 @@ public void testAlterUser() throws Exception { * * @throws Exception If failed. */ + @Test public void testDropUser() throws Exception { // Base. parseValidateDrop("DROP USER test", "TEST"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/GridArraysSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/GridArraysSelfTest.java index 1cab527794c87..897addc013ca7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/GridArraysSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/GridArraysSelfTest.java @@ -32,6 +32,7 @@ public class GridArraysSelfTest extends GridCommonAbstractTest { /** */ + @Test public void testSet() { String[] arr = set(EMPTY, 4, "aa"); @@ -71,6 +72,7 @@ public void testSet() { /** */ + @Test public void testClearTail() { String[] arr = new String[10]; @@ -105,6 +107,7 @@ public void testClearTail() { /** */ + @Test public void testRemoveLong() { long[] arr = {0,1,2,3,4,5,6}; @@ -117,6 +120,7 @@ public void testRemoveLong() { /** */ + @Test public void testRemove() { Integer[] arr = {0,1,2,3,4,5,6}; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/GridCleanerTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/GridCleanerTest.java index deb87b0a89faa..f9c00bf9fdce6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/GridCleanerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/GridCleanerTest.java @@ -26,6 +26,7 @@ public class GridCleanerTest extends TestCase { /** * @throws Exception If failed. */ + @Test public void testCreate() throws Exception { Object cleaner = GridCleaner.create(this, new Runnable() { @Override public void run() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/GridHandleTableSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/GridHandleTableSelfTest.java index bd6105fa58a98..2c658f18df31d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/GridHandleTableSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/GridHandleTableSelfTest.java @@ -26,6 +26,7 @@ public class GridHandleTableSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testGrow() throws Exception { GridHandleTable table = new GridHandleTable(8, 2); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/GridStartupWithUndefinedIgniteHomeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/GridStartupWithUndefinedIgniteHomeSelfTest.java index cb0beed3888f0..ef3a6d60f8f9d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/GridStartupWithUndefinedIgniteHomeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/GridStartupWithUndefinedIgniteHomeSelfTest.java @@ -60,6 +60,7 @@ public class GridStartupWithUndefinedIgniteHomeSelfTest extends TestCase { /** * @throws Exception If failed. */ + @Test public void testStartStopWithUndefinedIgniteHome() throws Exception { IgniteUtils.nullifyHomeDirectory(); @@ -103,4 +104,4 @@ public void testStartStopWithUndefinedIgniteHome() throws Exception { } } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteDevOnlyLogTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteDevOnlyLogTest.java index 9a829473b7395..0c0bbe1f1c626 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteDevOnlyLogTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteDevOnlyLogTest.java @@ -55,6 +55,7 @@ public class IgniteDevOnlyLogTest extends GridCommonAbstractTest { } /** Check that dev-only messages appear in the log. */ + @Test public void testDevOnlyQuietMessage() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-9328"); @@ -72,6 +73,7 @@ public void testDevOnlyQuietMessage() throws Exception { } /** Check that dev-only messages appear in the log. */ + @Test public void testDevOnlyVerboseMessage() throws Exception { additionalArgs = Collections.singletonList("-D" + IgniteSystemProperties.IGNITE_QUIET + "=false"); @@ -91,6 +93,7 @@ public void testDevOnlyVerboseMessage() throws Exception { * doesn't print anything if {@link org.apache.ignite.IgniteSystemProperties#IGNITE_DEV_ONLY_LOGGING_DISABLED} * is set to {@code true}. */ + @Test public void testDevOnlyDisabledProperty() throws Exception { additionalArgs = Collections.singletonList("-D" + IgniteSystemProperties.IGNITE_DEV_ONLY_LOGGING_DISABLED + "=true"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteExceptionRegistrySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteExceptionRegistrySelfTest.java index 81b7522014960..cb8524f6b527d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteExceptionRegistrySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteExceptionRegistrySelfTest.java @@ -36,6 +36,7 @@ public class IgniteExceptionRegistrySelfTest extends GridCommonAbstractTest { /** * @throws Exception if failed. */ + @Test public void testOnException() throws Exception { awaitPartitionMapExchange(); @@ -90,6 +91,7 @@ public void testOnException() throws Exception { /** * @throws Exception if failed. */ + @Test public void testMultiThreadedMaxSize() throws Exception { final int maxSize = 10; @@ -108,4 +110,4 @@ public void testMultiThreadedMaxSize() throws Exception { assert maxSize + 1 >= size && maxSize - 1 <= size; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteUtilsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteUtilsSelfTest.java index 310705bb2c96c..84e590732125f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteUtilsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteUtilsSelfTest.java @@ -103,6 +103,7 @@ private String text120() { /** * */ + @Test public void testIsPow2() { assertTrue(U.isPow2(1)); assertTrue(U.isPow2(2)); @@ -127,6 +128,7 @@ public void testIsPow2() { /** * @throws Exception If failed. */ + @Test public void testAllLocalIps() throws Exception { Collection ips = U.allLocalIps(); @@ -136,6 +138,7 @@ public void testAllLocalIps() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAllLocalMACs() throws Exception { Collection macs = U.allLocalMACs(); @@ -147,6 +150,7 @@ public void testAllLocalMACs() throws Exception { * * @throws Exception If failed. */ + @Test public void testAllLocalMACsMultiThreaded() throws Exception { GridTestUtils.runMultiThreaded(new Runnable() { @Override public void run() { @@ -162,6 +166,7 @@ public void testAllLocalMACsMultiThreaded() throws Exception { /** * @throws Exception If failed. */ + @Test public void testByteArray2String() throws Exception { assertEquals("{0x0A,0x14,0x1E,0x28,0x32,0x3C,0x46,0x50,0x5A}", U.byteArray2String(new byte[]{10, 20, 30, 40, 50, 60, 70, 80, 90}, "0x%02X", ",0x%02X")); @@ -170,6 +175,7 @@ public void testByteArray2String() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFormatMins() throws Exception { printFormatMins(0); printFormatMins(1); @@ -197,6 +203,7 @@ private void printFormatMins(long mins) { /** * @throws Exception If failed. */ + @Test public void testDownloadUrlFromHttp() throws Exception { GridEmbeddedHttpServer srv = null; try { @@ -220,6 +227,7 @@ public void testDownloadUrlFromHttp() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDownloadUrlFromHttps() throws Exception { GridEmbeddedHttpServer srv = null; try { @@ -243,6 +251,7 @@ public void testDownloadUrlFromHttps() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDownloadUrlFromLocalFile() throws Exception { File file = new File(System.getProperty("java.io.tmpdir") + File.separator + "url-http.file"); @@ -256,6 +265,7 @@ public void testDownloadUrlFromLocalFile() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOs() throws Exception { System.out.println("OS string: " + U.osString()); System.out.println("JDK string: " + U.jdkString()); @@ -282,6 +292,7 @@ public void testOs() throws Exception { /** * @throws Exception If failed. */ + @Test public void testJavaSerialization() throws Exception { ByteArrayOutputStream byteOut = new ByteArrayOutputStream(); ObjectOutputStream objOut = new ObjectOutputStream(byteOut); @@ -300,6 +311,7 @@ public void testJavaSerialization() throws Exception { /** * */ + @Test public void testHidePassword() { Collection uriList = new ArrayList<>(); @@ -368,6 +380,7 @@ private SelfReferencedJob(Ignite ignite) throws IgniteCheckedException { /** * @throws Exception If test fails. */ + @Test public void testDetectPeerDeployAwareInfiniteRecursion() throws Exception { Ignite g = startGrid(1); @@ -402,6 +415,7 @@ private static ComputeJob job(final Runnable r) { /** * @throws Exception If test failed. */ + @Test public void testPeerDeployAware0() throws Exception { Collection col = new ArrayList<>(); @@ -470,6 +484,7 @@ public void testPeerDeployAware0() throws Exception { /** * Test UUID to bytes array conversion. */ + @Test public void testsGetBytes() { for (int i = 0; i < 100; i++) { UUID id = UUID.randomUUID(); @@ -486,6 +501,7 @@ public void testsGetBytes() { * */ @SuppressWarnings("ZeroLengthArrayAllocation") + @Test public void testReadByteArray() { assertTrue(Arrays.equals(new byte[0], U.readByteArray(ByteBuffer.allocate(0)))); assertTrue(Arrays.equals(new byte[0], U.readByteArray(ByteBuffer.allocate(0), ByteBuffer.allocate(0)))); @@ -527,6 +543,7 @@ public void testReadByteArray() { * */ @SuppressWarnings("ZeroLengthArrayAllocation") + @Test public void testHashCodeFromBuffers() { assertEquals(Arrays.hashCode(new byte[0]), U.hashCode(ByteBuffer.allocate(0))); assertEquals(Arrays.hashCode(new byte[0]), U.hashCode(ByteBuffer.allocate(0), ByteBuffer.allocate(0))); @@ -551,6 +568,7 @@ public void testHashCodeFromBuffers() { /** * Test annotation look up. */ + @Test public void testGetAnnotations() { assert U.getAnnotation(A1.class, Ann1.class) != null; assert U.getAnnotation(A2.class, Ann1.class) != null; @@ -565,6 +583,7 @@ public void testGetAnnotations() { /** * */ + @Test public void testUnique() { int[][][] arrays = new int[][][]{ new int[][]{EMPTY, EMPTY, EMPTY}, @@ -591,6 +610,7 @@ public void testUnique() { /** * */ + @Test public void testDifference() { int[][][] arrays = new int[][][]{ new int[][]{EMPTY, EMPTY, EMPTY}, @@ -614,6 +634,7 @@ public void testDifference() { /** * */ + @Test public void testCopyIfExceeded() { int[][] arrays = new int[][]{new int[]{13, 14, 17, 11}, new int[]{13}, EMPTY}; @@ -631,6 +652,7 @@ public void testCopyIfExceeded() { /** * */ + @Test public void testIsIncreasingArray() { assertTrue(U.isIncreasingArray(EMPTY, 0)); assertTrue(U.isIncreasingArray(new int[]{Integer.MIN_VALUE, -10, 1, 13, Integer.MAX_VALUE}, 5)); @@ -649,6 +671,7 @@ public void testIsIncreasingArray() { /** * */ + @Test public void testIsNonDecreasingArray() { assertTrue(U.isNonDecreasingArray(EMPTY, 0)); assertTrue(U.isNonDecreasingArray(new int[]{Integer.MIN_VALUE, -10, 1, 13, Integer.MAX_VALUE}, 5)); @@ -667,6 +690,7 @@ public void testIsNonDecreasingArray() { /** * Test InetAddress Comparator. */ + @Test public void testInetAddressesComparator() { List ips = new ArrayList() { { @@ -691,6 +715,7 @@ public void testInetAddressesComparator() { } + @Test public void testMD5Calculation() throws Exception { String md5 = U.calculateMD5(new ByteArrayInputStream("Corrupted information.".getBytes())); @@ -700,6 +725,7 @@ public void testMD5Calculation() throws Exception { /** * @throws Exception If failed. */ + @Test public void testResolveLocalAddresses() throws Exception { InetAddress inetAddress = InetAddress.getByName("0.0.0.0"); @@ -721,6 +747,7 @@ public void testResolveLocalAddresses() throws Exception { /** * */ + @Test public void testToSocketAddressesNoDuplicates() { Collection addrs = new ArrayList<>(); @@ -776,6 +803,7 @@ private static void checkString(String s0) throws Exception { * * @throws Exception If failed. */ + @Test public void testLongStringWriteUTF() throws Exception { checkString(null); checkString(""); @@ -797,6 +825,7 @@ public void testLongStringWriteUTF() throws Exception { /** * */ + @Test public void testCeilPow2() throws Exception { assertEquals(2, U.ceilPow2(2)); assertEquals(4, U.ceilPow2(3)); @@ -823,6 +852,7 @@ public void testCeilPow2() throws Exception { /** * */ + @Test public void testIsOldestNodeVersionAtLeast() { IgniteProductVersion v240 = IgniteProductVersion.fromString("2.4.0"); IgniteProductVersion v241 = IgniteProductVersion.fromString("2.4.1"); @@ -850,6 +880,7 @@ public void testIsOldestNodeVersionAtLeast() { /** * */ + @Test public void testDoInParallel() throws Throwable { CyclicBarrier barrier = new CyclicBarrier(3); @@ -878,6 +909,7 @@ public void testDoInParallel() throws Throwable { /** * */ + @Test public void testDoInParallelBatch() { CyclicBarrier barrier = new CyclicBarrier(3); @@ -911,6 +943,7 @@ public void testDoInParallelBatch() { /** * Test optimal splitting on batch sizes. */ + @Test public void testOptimalBatchSize() { assertArrayEquals(new int[]{1}, IgniteUtils.calculateOptimalBatchSizes(1, 1)); @@ -942,6 +975,7 @@ public void testOptimalBatchSize() { /** * Test parallel execution in order. */ + @Test public void testDoInParallelResultsOrder() throws IgniteCheckedException { ExecutorService executorService = Executors.newFixedThreadPool(4); @@ -957,6 +991,7 @@ public void testDoInParallelResultsOrder() throws IgniteCheckedException { /** * Test parallel execution steal job. */ + @Test public void testDoInParallelWithStealingJob() throws IgniteCheckedException { // Pool size should be less that input data collection. ExecutorService executorService = Executors.newFixedThreadPool(1); @@ -1029,6 +1064,7 @@ public void run() { /** * Test parallel execution steal job. */ + @Test public void testDoInParallelWithStealingJobRunTaskInExecutor() throws Exception { // Pool size should be less that input data collection. ExecutorService executorService = Executors.newFixedThreadPool(2); @@ -1109,6 +1145,7 @@ private void testOrder(ExecutorService executorService, int size, int parallelis /** * */ + @Test public void testDoInParallelException() { String expectedException = "ExpectedException"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/StripedExecutorTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/StripedExecutorTest.java index 9a4bf0619c4df..41064e5436efb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/StripedExecutorTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/StripedExecutorTest.java @@ -44,6 +44,7 @@ public class StripedExecutorTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCompletedTasks() throws Exception { stripedExecSvc.execute(0, new TestRunnable()); stripedExecSvc.execute(1, new TestRunnable()); @@ -56,6 +57,7 @@ public void testCompletedTasks() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStripesCompletedTasks() throws Exception { stripedExecSvc.execute(0, new TestRunnable()); stripedExecSvc.execute(1, new TestRunnable()); @@ -72,6 +74,7 @@ public void testStripesCompletedTasks() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStripesActiveStatuses() throws Exception { stripedExecSvc.execute(0, new TestRunnable()); stripedExecSvc.execute(1, new TestRunnable(true)); @@ -88,6 +91,7 @@ public void testStripesActiveStatuses() throws Exception { /** * @throws Exception If failed. */ + @Test public void testActiveStripesCount() throws Exception { stripedExecSvc.execute(0, new TestRunnable()); stripedExecSvc.execute(1, new TestRunnable(true)); @@ -100,6 +104,7 @@ public void testActiveStripesCount() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStripesQueueSizes() throws Exception { stripedExecSvc.execute(0, new TestRunnable()); stripedExecSvc.execute(0, new TestRunnable(true)); @@ -120,6 +125,7 @@ public void testStripesQueueSizes() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueueSize() throws Exception { stripedExecSvc.execute(1, new TestRunnable()); stripedExecSvc.execute(1, new TestRunnable(true)); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/future/GridCompoundFutureSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/future/GridCompoundFutureSelfTest.java index a6021332e7e9e..88c92e2b445fc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/future/GridCompoundFutureSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/future/GridCompoundFutureSelfTest.java @@ -33,6 +33,7 @@ public class GridCompoundFutureSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testMarkInitialized() throws Exception { GridCompoundFuture fut = new GridCompoundFuture<>(); @@ -53,6 +54,7 @@ public void testMarkInitialized() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCompleteOnReducer() throws Exception { GridCompoundFuture fut = new GridCompoundFuture<>(CU.boolReducer()); @@ -85,6 +87,7 @@ public void testCompleteOnReducer() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCompleteOnException() throws Exception { GridCompoundFuture fut = new GridCompoundFuture<>(CU.boolReducer()); @@ -117,6 +120,7 @@ public void testCompleteOnException() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConcurrentCompletion() throws Exception { GridCompoundFuture fut = new GridCompoundFuture<>(CU.boolReducer()); @@ -149,6 +153,7 @@ public void testConcurrentCompletion() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConcurrentRandomCompletion() throws Exception { GridCompoundFuture fut = new GridCompoundFuture<>(CU.boolReducer()); @@ -187,4 +192,4 @@ else if (op == 8) assertTrue(fut.isDone()); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/future/GridEmbeddedFutureSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/future/GridEmbeddedFutureSelfTest.java index 314acceaba3c7..4b01fdb42392f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/future/GridEmbeddedFutureSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/future/GridEmbeddedFutureSelfTest.java @@ -47,6 +47,7 @@ public class GridEmbeddedFutureSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testFutureChain() throws Exception { GridFutureAdapter fut = new GridFutureAdapter<>(); @@ -70,6 +71,7 @@ public void testFutureChain() throws Exception { * @throws Exception If failed. */ @SuppressWarnings("ErrorNotRethrown") + @Test public void testFutureCompletesCorrectly() throws Exception { List list = Arrays.asList( null, @@ -137,4 +139,4 @@ public void testFutureCompletesCorrectly() throws Exception { } } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/future/GridFutureAdapterSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/future/GridFutureAdapterSelfTest.java index 89f3a0309c3fc..2c6f04624f0f8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/future/GridFutureAdapterSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/future/GridFutureAdapterSelfTest.java @@ -43,6 +43,7 @@ public class GridFutureAdapterSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testOnDone() throws Exception { GridFutureAdapter fut = new GridFutureAdapter<>(); @@ -92,6 +93,7 @@ public void testOnDone() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOnCancelled() throws Exception { GridTestUtils.assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -119,6 +121,7 @@ public void testOnCancelled() throws Exception { /** * @throws Exception If failed. */ + @Test public void testListenSyncNotify() throws Exception { GridFutureAdapter fut = new GridFutureAdapter<>(); @@ -170,6 +173,7 @@ public void testListenSyncNotify() throws Exception { /** * @throws Exception If failed. */ + @Test public void testListenNotify() throws Exception { GridTestKernalContext ctx = new GridTestKernalContext(log); @@ -228,6 +232,7 @@ public void testListenNotify() throws Exception { * * @throws Exception In case of any exception. */ + @Test public void testChaining() throws Exception { checkChaining(null); @@ -326,6 +331,7 @@ private void checkChaining(ExecutorService exec) throws Exception { /** * @throws Exception If failed. */ + @Test public void testGet() throws Exception { GridFutureAdapter unfinished = new GridFutureAdapter<>(); GridFutureAdapter finished = new GridFutureAdapter<>(); @@ -371,4 +377,4 @@ public void testGet() throws Exception { } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/future/GridFutureQueueTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/future/GridFutureQueueTest.java index e68141bb23e9e..d8d58ca5f8949 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/future/GridFutureQueueTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/future/GridFutureQueueTest.java @@ -91,7 +91,8 @@ private static class QueueTest { * @param writers Number of writers threads. * @throws Exception If failed. */ - public void testQueue(long time, int writers) throws Exception { + @Test + public void testQueue(long time, int writers) throws Exception { System.out.println("Start test [writers=" + writers + ", time=" + time + "]"); Thread rdr = new Thread() { @@ -180,4 +181,4 @@ public void testQueue(long time, int writers) throws Exception { System.gc(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/future/IgniteFutureImplTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/future/IgniteFutureImplTest.java index 16adbd1266195..84eb4448d41c3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/future/IgniteFutureImplTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/future/IgniteFutureImplTest.java @@ -72,6 +72,7 @@ public class IgniteFutureImplTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testFutureGet() throws Exception { GridFutureAdapter fut0 = new GridFutureAdapter<>(); @@ -91,6 +92,7 @@ public void testFutureGet() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFutureException() throws Exception { GridFutureAdapter fut0 = new GridFutureAdapter<>(); @@ -130,6 +132,7 @@ public void testFutureException() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFutureIgniteException() throws Exception { GridFutureAdapter fut0 = new GridFutureAdapter<>(); @@ -153,6 +156,7 @@ public void testFutureIgniteException() throws Exception { /** * @throws Exception If failed. */ + @Test public void testListeners() throws Exception { GridFutureAdapter fut0 = new GridFutureAdapter<>(); @@ -197,6 +201,7 @@ public void testListeners() throws Exception { /** * @throws Exception If failed. */ + @Test public void testListenersOnError() throws Exception { { GridFutureAdapter fut0 = new GridFutureAdapter<>(); @@ -264,6 +269,7 @@ public void testListenersOnError() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAsyncListeners() throws Exception { GridFutureAdapter fut0 = new GridFutureAdapter<>(); @@ -305,6 +311,7 @@ private void checkAsyncListener(IgniteFutureImpl fut) throws Interrupted /** * @throws Exception If failed. */ + @Test public void testAsyncListenersOnError() throws Exception { checkAsyncListenerOnError(new IgniteException("Test exception")); checkAsyncListenerOnError(new IgniteCheckedException("Test checked exception")); @@ -384,6 +391,7 @@ private void checkAsyncListenerOnError(Exception err0, IgniteFutureImpl /** * @throws Exception If failed. */ + @Test public void testChain() throws Exception { GridFutureAdapter fut0 = new GridFutureAdapter<>(); @@ -425,6 +433,7 @@ public void testChain() throws Exception { /** * @throws Exception If failed. */ + @Test public void testChainError() throws Exception { { GridFutureAdapter fut0 = new GridFutureAdapter<>(); @@ -574,6 +583,7 @@ public void testChainError() throws Exception { /** * @throws Exception If failed. */ + @Test public void testChainAsync() throws Exception { GridFutureAdapter fut0 = new GridFutureAdapter<>(); @@ -646,6 +656,7 @@ private TestClosure(CountDownLatch latch) { /** * @throws Exception If failed. */ + @Test public void testChainAsyncOnError() throws Exception { checkChainedOnError(new IgniteException("Test exception")); checkChainedOnError(new IgniteCheckedException("Test checked exception")); @@ -804,4 +815,4 @@ protected IgniteFutureImpl createFuture(IgniteInternalFuture fut) { protected Class expectedException() { return IgniteException.class; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/future/nio/GridNioEmbeddedFutureSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/future/nio/GridNioEmbeddedFutureSelfTest.java index b7b69662f3925..6f193e4e05f3c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/future/nio/GridNioEmbeddedFutureSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/future/nio/GridNioEmbeddedFutureSelfTest.java @@ -30,6 +30,7 @@ public class GridNioEmbeddedFutureSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testNioEmbeddedFuture() throws Exception { // Original future. final GridNioFutureImpl origFut = new GridNioFutureImpl<>(null); @@ -57,4 +58,4 @@ public void testNioEmbeddedFuture() throws Exception { // Wait for embedded future completes. assertEquals(new Integer(100), embFut.get(1, SECONDS)); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/future/nio/GridNioFutureSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/future/nio/GridNioFutureSelfTest.java index 44a1effe89f4c..2ba4342093a4f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/future/nio/GridNioFutureSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/future/nio/GridNioFutureSelfTest.java @@ -38,6 +38,7 @@ public class GridNioFutureSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testOnDone() throws Exception { GridNioFutureImpl fut = new GridNioFutureImpl<>(null); @@ -87,6 +88,7 @@ public void testOnDone() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOnCancelled() throws Exception { GridTestUtils.assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -114,6 +116,7 @@ public void testOnCancelled() throws Exception { /** * @throws Exception If failed. */ + @Test public void testListenSyncNotify() throws Exception { GridNioFutureImpl fut = new GridNioFutureImpl<>(null); @@ -165,6 +168,7 @@ public void testListenSyncNotify() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGet() throws Exception { GridNioFutureImpl unfinished = new GridNioFutureImpl<>(null); GridNioFutureImpl finished = new GridNioFutureImpl<>(null); @@ -210,4 +214,4 @@ public void testGet() throws Exception { } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/io/GridUnsafeDataInputOutputByteOrderSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/io/GridUnsafeDataInputOutputByteOrderSelfTest.java index f3ff7810c0f64..b0902e65c22e5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/io/GridUnsafeDataInputOutputByteOrderSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/io/GridUnsafeDataInputOutputByteOrderSelfTest.java @@ -64,6 +64,7 @@ public class GridUnsafeDataInputOutputByteOrderSelfTest extends TestCase { /** * @throws Exception If failed. */ + @Test public void testShort() throws Exception { short val = (short)RND.nextLong(); @@ -76,6 +77,7 @@ public void testShort() throws Exception { /** * @throws Exception If failed. */ + @Test public void testShortArray() throws Exception { short[] arr = new short[ARR_LEN]; @@ -95,6 +97,7 @@ public void testShortArray() throws Exception { /** * @throws Exception If failed. */ + @Test public void testChar() throws Exception { char val = (char)RND.nextLong(); @@ -107,6 +110,7 @@ public void testChar() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCharArray() throws Exception { char[] arr = new char[ARR_LEN]; @@ -126,6 +130,7 @@ public void testCharArray() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInt() throws Exception { int val = RND.nextInt(); @@ -138,6 +143,7 @@ public void testInt() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIntArray() throws Exception { int[] arr = new int[ARR_LEN]; @@ -157,6 +163,7 @@ public void testIntArray() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLong() throws Exception { long val = RND.nextLong(); @@ -169,6 +176,7 @@ public void testLong() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLongArray() throws Exception { long[] arr = new long[ARR_LEN]; @@ -188,6 +196,7 @@ public void testLongArray() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFloat() throws Exception { float val = RND.nextFloat(); @@ -200,6 +209,7 @@ public void testFloat() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFloatArray() throws Exception { float[] arr = new float[ARR_LEN]; @@ -219,6 +229,7 @@ public void testFloatArray() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDouble() throws Exception { double val = RND.nextDouble(); @@ -231,6 +242,7 @@ public void testDouble() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDoubleArray() throws Exception { double[] arr = new double[ARR_LEN]; @@ -246,4 +258,4 @@ public void testDoubleArray() throws Exception { assertArrayEquals(arr, in.readDoubleArray(), 0); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/io/GridUnsafeDataOutputArraySizingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/io/GridUnsafeDataOutputArraySizingSelfTest.java index bfde5acd26f51..fd28d89c2d76a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/io/GridUnsafeDataOutputArraySizingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/io/GridUnsafeDataOutputArraySizingSelfTest.java @@ -49,6 +49,7 @@ public class GridUnsafeDataOutputArraySizingSelfTest extends GridCommonAbstractT /** * @throws Exception If failed. */ + @Test public void testSmall() throws Exception { final GridUnsafeDataOutput out = new GridUnsafeDataOutput(512); @@ -62,6 +63,7 @@ public void testSmall() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBig() throws Exception { GridUnsafeDataOutput out = new GridUnsafeDataOutput(512); @@ -75,6 +77,7 @@ public void testBig() throws Exception { * @throws Exception If failed. */ @SuppressWarnings("BusyWait") + @Test public void testChanged1() throws Exception { GridUnsafeDataOutput out = new GridUnsafeDataOutput(512); @@ -93,6 +96,7 @@ public void testChanged1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testChanged2() throws Exception { final GridUnsafeDataOutput out = new GridUnsafeDataOutput(512); @@ -146,4 +150,4 @@ private static class WriteAndCheckPredicate implements GridAbsPredicate { } } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryCrashDetectionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryCrashDetectionSelfTest.java index 0c5f5644e89b5..18051911bb238 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryCrashDetectionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryCrashDetectionSelfTest.java @@ -70,6 +70,7 @@ public class IpcSharedMemoryCrashDetectionSelfTest extends GridCommonAbstractTes /** * @throws Exception If failed. */ + @Test public void testIgfsServerClientInteractionsUponClientKilling() throws Exception { // Run server endpoint. IpcSharedMemoryServerEndpoint srv = new IpcSharedMemoryServerEndpoint(U.defaultWorkDirectory()); @@ -112,6 +113,7 @@ public void testIgfsServerClientInteractionsUponClientKilling() throws Exception /** * @throws Exception If failed. */ + @Test public void testIgfsClientServerInteractionsUponServerKilling() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-1386"); @@ -163,6 +165,7 @@ public void testIgfsClientServerInteractionsUponServerKilling() throws Exception /** * @throws Exception If failed. */ + @Test public void testClientThrowsCorrectExceptionUponServerKilling() throws Exception { info("Shared memory IDs before starting server-client interactions: " + IpcSharedMemoryUtils.sharedMemoryIds()); @@ -520,4 +523,4 @@ public void shmemIds(String shmemIds) { }); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryNativeLoaderSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryNativeLoaderSelfTest.java index bca9401cf3a1c..7fbf76f2415f7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryNativeLoaderSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryNativeLoaderSelfTest.java @@ -36,6 +36,7 @@ public class IpcSharedMemoryNativeLoaderSelfTest extends TestCase { * * @throws Exception If failed. */ + @Test public void testLoadWithCorruptedLibFile() throws Exception { if (U.isWindows()) return; @@ -76,4 +77,4 @@ private void readStreams(Process proc) throws IOException { while ((s = errOut.readLine()) != null) System.out.println("ERR>>>>>> " + s); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemorySpaceSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemorySpaceSelfTest.java index 0bbbe3c9e27e6..2fb7ee883bffa 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemorySpaceSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemorySpaceSelfTest.java @@ -59,6 +59,7 @@ public class IpcSharedMemorySpaceSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testBasicOperations() throws Exception { File tokFile = new File(IgniteSystemProperties.getString("java.io.tmpdir"), UUID.randomUUID().toString()); @@ -155,6 +156,7 @@ public void testBasicOperations() throws Exception { /** * @throws Exception If failed. */ + @Test public void testForceClose() throws Exception { File tokFile = new File(IgniteSystemProperties.getString("java.io.tmpdir"), getTestIgniteInstanceName()); @@ -196,6 +198,7 @@ public void testForceClose() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReadAfterClose() throws Exception { File tokFile = new File(IgniteSystemProperties.getString("java.io.tmpdir"), getTestIgniteInstanceName()); @@ -234,6 +237,7 @@ public void testReadAfterClose() throws Exception { /** * @throws Exception If failed. */ + @Test public void testWriteAfterClose() throws Exception { File tokFile = new File(IgniteSystemProperties.getString("java.io.tmpdir"), getTestIgniteInstanceName()); @@ -266,4 +270,4 @@ public void testWriteAfterClose() throws Exception { assert !tokFile.exists(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryUtilsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryUtilsSelfTest.java index 8b2aa413d3b25..28cc5a4005371 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryUtilsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryUtilsSelfTest.java @@ -36,6 +36,7 @@ public class IpcSharedMemoryUtilsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPid() throws Exception { int pid = IpcSharedMemoryUtils.pid(); @@ -50,6 +51,7 @@ public void testPid() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIdsGet() throws Exception { File tokFile = new File(IgniteSystemProperties.getString("java.io.tmpdir"), getTestIgniteInstanceName()); @@ -80,4 +82,4 @@ public void testIdsGet() throws Exception { assertFalse(IpcSharedMemoryUtils.sharedMemoryIds().contains(shmemId)); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioDelimitedBufferSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioDelimitedBufferSelfTest.java index 03b5169ec2fd7..5c321d785f2c1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioDelimitedBufferSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioDelimitedBufferSelfTest.java @@ -34,6 +34,7 @@ public class GridNioDelimitedBufferSelfTest extends TestCase { /** * Tests simple delimiter (excluded from alphabet) */ + @Test public void testReadZString() throws Exception { Random rnd = new Random(); @@ -81,6 +82,7 @@ public void testReadZString() throws Exception { /** * Tests compound delimiter (included to alphabet) */ + @Test public void testDelim() throws Exception { byte[] delim = "aabb".getBytes(ASCII); @@ -111,4 +113,4 @@ public void testDelim() throws Exception { assertEquals(strs, res); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSelfTest.java index e623467319a1c..572c98fd73fd8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSelfTest.java @@ -103,6 +103,7 @@ public class GridNioSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testSimpleMessages() throws Exception { final Collection sesSet = new GridConcurrentHashSet<>(); @@ -159,6 +160,7 @@ public void testSimpleMessages() throws Exception { * * @throws Exception if failed. */ + @Test public void testServerShutdown() throws Exception { GridNioServerListener lsnr = new GridNioServerListenerAdapter() { @Override public void onConnected(GridNioSession ses) { @@ -214,6 +216,7 @@ public void testServerShutdown() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCorrectSocketClose() throws Exception { final AtomicReference err = new AtomicReference<>(); @@ -259,6 +262,7 @@ public void testCorrectSocketClose() throws Exception { /** * @throws Exception If failed. */ + @Test public void testThroughput() throws Exception { GridNioServerListener lsnr = new GridNioServerListenerAdapter() { @Override public void onConnected(GridNioSession ses) { @@ -339,6 +343,7 @@ public void testThroughput() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCloseSession() throws Exception { final AtomicReference err = new AtomicReference<>(); @@ -414,6 +419,7 @@ public void testCloseSession() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSendAfterServerStop() throws Exception { final AtomicReference sesRef = new AtomicReference<>(); @@ -631,6 +637,7 @@ protected GridNioServer.Builder serverBuilder(int port, /** * @throws Exception If test failed. */ + @Test public void testSendReceive() throws Exception { CountDownLatch latch = new CountDownLatch(10); @@ -665,6 +672,7 @@ public void testSendReceive() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testAsyncSendReceive() throws Exception { CountDownLatch latch = new CountDownLatch(10); @@ -703,6 +711,7 @@ public void testAsyncSendReceive() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testMultiThreadedSendReceive() throws Exception { CountDownLatch latch = new CountDownLatch(MSG_CNT * THREAD_CNT); @@ -749,6 +758,7 @@ public void testMultiThreadedSendReceive() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConcurrentConnects() throws Exception { final CyclicBarrier barrier = new CyclicBarrier(THREAD_CNT); @@ -846,6 +856,7 @@ public void testConcurrentConnects() throws Exception { /** * @throws Exception if test failed. */ + @Test public void testDeliveryDuration() throws Exception { idProvider.set(1); @@ -913,6 +924,7 @@ public void testDeliveryDuration() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSessionIdleTimeout() throws Exception { final int sesCnt = 20; @@ -975,6 +987,7 @@ public void testSessionIdleTimeout() throws Exception { /** * @throws Exception If failed. */ + @Test public void testWriteTimeout() throws Exception { final int sesCnt = 20; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSessionMetaKeySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSessionMetaKeySelfTest.java index 71950eec98a31..428f21916806b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSessionMetaKeySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSessionMetaKeySelfTest.java @@ -30,6 +30,7 @@ public class GridNioSessionMetaKeySelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testNextRandomKey() throws Exception { AtomicInteger keyGen = U.staticField(GridNioSessionMetaKey.class, "keyGen"); @@ -54,4 +55,4 @@ public void testNextRandomKey() throws Exception { keyGen.set(initVal); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSslSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSslSelfTest.java index 1c4aa27d86281..d002a50fdb018 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSslSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSslSelfTest.java @@ -75,13 +75,15 @@ public class GridNioSslSelfTest extends GridNioSelfTest { } /** {@inheritDoc} */ - @Override public void testWriteTimeout() throws Exception { + @Override @Test + public void testWriteTimeout() throws Exception { // Skip base test because it enables "skipWrite" mode in the GridNioServer // which makes SSL handshake impossible. } /** {@inheritDoc} */ - @Override public void testAsyncSendReceive() throws Exception { + @Override @Test + public void testAsyncSendReceive() throws Exception { // No-op, do not want to mess with SSL channel. } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridRoundTripTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridRoundTripTest.java index d83fde6654e0e..ab7f903ee7174 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridRoundTripTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridRoundTripTest.java @@ -43,6 +43,7 @@ public class GridRoundTripTest extends TestCase { * @throws IOException If error occurs. * @throws InterruptedException If interrupted */ + @Test public void testRunServer() throws IOException, InterruptedException { final ServerSocket sock = new ServerSocket(); @@ -74,6 +75,7 @@ public void testRunServer() throws IOException, InterruptedException { * Runs client test */ @SuppressWarnings("InfiniteLoopStatement") + @Test public void testRunClient() { Socket sock = new Socket(); @@ -228,4 +230,4 @@ private static byte[] createMessage(int len) { return res; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/nio/IgniteExceptionInNioWorkerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/nio/IgniteExceptionInNioWorkerSelfTest.java index 9af3f8c11467a..cffbdfbc9c179 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/nio/IgniteExceptionInNioWorkerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/nio/IgniteExceptionInNioWorkerSelfTest.java @@ -65,6 +65,7 @@ public class IgniteExceptionInNioWorkerSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testBrokenMessage() throws Exception { startGrids(GRID_CNT); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/nio/impl/GridNioFilterChainSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/nio/impl/GridNioFilterChainSelfTest.java index 588857583fd79..da6ef730ef595 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/nio/impl/GridNioFilterChainSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/nio/impl/GridNioFilterChainSelfTest.java @@ -66,6 +66,7 @@ public class GridNioFilterChainSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testChainEvents() throws Exception { final AtomicReference connectedEvt = new AtomicReference<>(); final AtomicReference disconnectedEvt = new AtomicReference<>(); @@ -400,4 +401,4 @@ public MockNioSession(InetSocketAddress locAddr, InetSocketAddress rmtAddr) { // No-op. } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/GridOffHeapMapAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/GridOffHeapMapAbstractSelfTest.java index b0c6037ddb0fd..27377ca0644bb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/GridOffHeapMapAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/GridOffHeapMapAbstractSelfTest.java @@ -140,6 +140,7 @@ private int hash(int h) { /** * @throws Exception If failed. */ + @Test public void testInsert() throws Exception { map = newMap(); @@ -160,6 +161,7 @@ public void testInsert() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRehash() throws Exception { initCap = 10; @@ -197,6 +199,7 @@ public void testRehash() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGet() throws Exception { map = newMap(); @@ -217,6 +220,7 @@ public void testGet() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPut1() throws Exception { map = newMap(); @@ -237,6 +241,7 @@ public void testPut1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPut2() throws Exception { map = newMap(); @@ -265,6 +270,7 @@ public void testPut2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemove() throws Exception { map = newMap(); @@ -294,6 +300,7 @@ public void testRemove() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemovex() throws Exception { map = newMap(); @@ -322,6 +329,7 @@ public void testRemovex() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIterator() throws Exception { initCap = 10; @@ -394,6 +402,7 @@ public void testIterator() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIteratorMultithreaded() throws Exception { initCap = 10; @@ -468,6 +477,7 @@ public void testIteratorMultithreaded() throws Exception { /** * */ + @Test public void testInsertLoad() { map = newMap(); @@ -502,6 +512,7 @@ public void testInsertLoad() { /** * */ + @Test public void testPutLoad() { map = newMap(); @@ -537,6 +548,7 @@ public void testPutLoad() { /** * */ + @Test public void testLru1() { lruStripes = 1; mem = 10; @@ -579,6 +591,7 @@ public void testLru1() { /** * */ + @Test public void testLru2() { mem = 1000 + 64 * 16; // Add segment size. @@ -616,6 +629,7 @@ public void testLru2() { /** * @throws Exception If failed. */ + @Test public void testLruMultithreaded() throws Exception { mem = 1000 + 64 * 16; // Add segment size. @@ -667,6 +681,7 @@ public void testLruMultithreaded() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIteratorAfterRehash() throws Exception { mem = 0; initCap = 10; @@ -737,6 +752,7 @@ public void testIteratorAfterRehash() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultithreadedOps() throws Exception { mem = 1512; // Small enough for evictions. @@ -824,4 +840,4 @@ public void testMultithreadedOps() throws Exception { assertEquals(zeroAllocated, map.allocatedSize()); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/GridOffHeapMapPerformanceAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/GridOffHeapMapPerformanceAbstractTest.java index f7388e8399fb0..ec3db2da72e52 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/GridOffHeapMapPerformanceAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/GridOffHeapMapPerformanceAbstractTest.java @@ -133,6 +133,7 @@ private String string() { /** * Test plain hash map. */ + @Test public void testHashMapPutRemove() { Map map = new HashMap<>(LOAD_CNT); @@ -187,6 +188,7 @@ public void testHashMapPutRemove() { /** * */ + @Test public void testInsertRemoveLoad() { info("Starting insert performance test..."); @@ -240,6 +242,7 @@ public void testInsertRemoveLoad() { /** * */ + @Test public void testPutRemoveLoad() { info("Starting put performance test..."); @@ -288,4 +291,4 @@ public void testPutRemoveLoad() { rmv = cnt % 3 == 0; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/GridOffHeapPartitionedMapAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/GridOffHeapPartitionedMapAbstractSelfTest.java index d57131808c75c..0e8bc5837c63e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/GridOffHeapPartitionedMapAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/GridOffHeapPartitionedMapAbstractSelfTest.java @@ -143,6 +143,7 @@ private byte[] bytes(int len) { /** * @throws Exception If failed. */ + @Test public void testInsert() throws Exception { map = newMap(); @@ -165,6 +166,7 @@ public void testInsert() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRehash() throws Exception { initCap = 10; @@ -203,6 +205,7 @@ public void testRehash() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPointerAfterRehash() throws Exception { initCap = 10; @@ -245,6 +248,7 @@ public void testPointerAfterRehash() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutRandomKeys() throws Exception { map = newMap(); @@ -274,6 +278,7 @@ public void testPutRandomKeys() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGet() throws Exception { map = newMap(); @@ -296,6 +301,7 @@ public void testGet() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPut1() throws Exception { map = newMap(); @@ -318,6 +324,7 @@ public void testPut1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPut2() throws Exception { map = newMap(); @@ -348,6 +355,7 @@ public void testPut2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemove() throws Exception { map = newMap(); @@ -379,6 +387,7 @@ public void testRemove() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemovex() throws Exception { map = newMap(); @@ -409,6 +418,7 @@ public void testRemovex() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIterator() throws Exception { initCap = 10; @@ -482,6 +492,7 @@ public void testIterator() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIteratorMultithreaded() throws Exception { initCap = 10; @@ -579,6 +590,7 @@ public void testIteratorMultithreaded() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIteratorRemoveMultithreaded() throws Exception { initCap = 10; @@ -636,6 +648,7 @@ public void testIteratorRemoveMultithreaded() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPartitionIterator() throws Exception { initCap = 10; @@ -710,6 +723,7 @@ public void testPartitionIterator() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPartitionIteratorMultithreaded() throws Exception { initCap = 10; @@ -785,6 +799,7 @@ public void testPartitionIteratorMultithreaded() throws Exception { /** * */ + @Test public void testInsertLoad() { mem = 0; // Disable LRU. @@ -825,6 +840,7 @@ public void testInsertLoad() { /** * */ + @Test public void testPutLoad() { mem = 0; // Disable LRU. @@ -866,6 +882,7 @@ public void testPutLoad() { /** * */ + @Test public void testLru1() { lruStripes = 1; mem = 10; @@ -910,6 +927,7 @@ public void testLru1() { /** * */ + @Test public void testLru2() { mem = 1000 + 64 * 16 * parts; // Add segment size. @@ -949,6 +967,7 @@ public void testLru2() { /** * @throws Exception If failed. */ + @Test public void testLruMultithreaded() throws Exception { mem = 1000 + 64 * 16 * parts; // Add segment size. @@ -1008,6 +1027,7 @@ public void testLruMultithreaded() throws Exception { * */ @SuppressWarnings("TooBroadScope") + @Test public void testValuePointerEvict() { mem = 90; @@ -1075,6 +1095,7 @@ public void testValuePointerEvict() { * */ @SuppressWarnings("TooBroadScope") + @Test public void testValuePointerEnableEviction() { mem = 90; @@ -1141,6 +1162,7 @@ public void testValuePointerEnableEviction() { /** * */ + @Test public void testValuePointerRemove() { map = newMap(); @@ -1154,4 +1176,4 @@ public void testValuePointerRemove() { assertNull(map.valuePointer(1, k.hashCode(), k.getBytes())); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/GridOffHeapPartitionedMapPerformanceAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/GridOffHeapPartitionedMapPerformanceAbstractTest.java index 86432fc0d4f36..2fc5454a4293c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/GridOffHeapPartitionedMapPerformanceAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/GridOffHeapPartitionedMapPerformanceAbstractTest.java @@ -108,6 +108,7 @@ protected GridOffHeapPartitionedMapPerformanceAbstractTest() { /** * @throws Exception If failed. */ + @Test public void testPuts() throws Exception { info("Warming up..."); @@ -121,6 +122,7 @@ public void testPuts() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutsConcurrentMap() throws Exception { info("Warming up..."); @@ -134,6 +136,7 @@ public void testPutsConcurrentMap() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutRemoves() throws Exception { info("Warming up..."); @@ -147,6 +150,7 @@ public void testPutRemoves() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutRemovesConcurrentMap() throws Exception { info("Warming up..."); @@ -427,4 +431,4 @@ private T3 randomKey(Random rnd) { private GridByteArrayWrapper randomKeyWrapper(Random rnd) { return wrappers[rnd.nextInt(keys.length)]; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/unsafe/GridUnsafeMemorySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/unsafe/GridUnsafeMemorySelfTest.java index 47b0684f7ef07..0ab0c627b94f6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/unsafe/GridUnsafeMemorySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/unsafe/GridUnsafeMemorySelfTest.java @@ -29,6 +29,7 @@ */ public class GridUnsafeMemorySelfTest extends GridCommonAbstractTest { /** */ + @Test public void testBuffers() { ByteBuffer b1 = GridUnsafe.allocateBuffer(10); ByteBuffer b2 = GridUnsafe.allocateBuffer(20); @@ -64,6 +65,7 @@ public void testBuffers() { /** * @throws Exception If failed. */ + @Test public void testBytes() throws Exception { GridUnsafeMemory mem = new GridUnsafeMemory(64); @@ -90,6 +92,7 @@ public void testBytes() throws Exception { /** * @throws Exception If failed. */ + @Test public void testByte() throws Exception { GridUnsafeMemory mem = new GridUnsafeMemory(64); @@ -120,6 +123,7 @@ public void testByte() throws Exception { /** * @throws Exception If failed. */ + @Test public void testShort() throws Exception { GridUnsafeMemory mem = new GridUnsafeMemory(64); @@ -142,6 +146,7 @@ public void testShort() throws Exception { /** * */ + @Test public void testFloat() { GridUnsafeMemory mem = new GridUnsafeMemory(64); @@ -164,6 +169,7 @@ public void testFloat() { /** * */ + @Test public void testDouble() { GridUnsafeMemory mem = new GridUnsafeMemory(64); @@ -187,6 +193,7 @@ public void testDouble() { /** * @throws Exception If failed. */ + @Test public void testInt() throws Exception { GridUnsafeMemory mem = new GridUnsafeMemory(64); @@ -223,6 +230,7 @@ public void testInt() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLong() throws Exception { GridUnsafeMemory mem = new GridUnsafeMemory(64); @@ -258,6 +266,7 @@ public void testLong() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCompare1() throws Exception { checkCompare("123"); } @@ -265,6 +274,7 @@ public void testCompare1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCompare2() throws Exception { checkCompare("1234567890"); } @@ -272,6 +282,7 @@ public void testCompare2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCompare3() throws Exception { checkCompare("12345678901234567890"); } @@ -310,6 +321,7 @@ public void checkCompare(String s) throws Exception { /** * @throws Exception If failed. */ + @Test public void testOutOfMemory() throws Exception { int cap = 64; int block = 9; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/unsafe/GridUnsafeStripedLruSefTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/unsafe/GridUnsafeStripedLruSefTest.java index 76ccceb56915b..a8a3bfa04d7a3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/unsafe/GridUnsafeStripedLruSefTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/unsafe/GridUnsafeStripedLruSefTest.java @@ -65,6 +65,7 @@ private void init() { /** * */ + @Test public void testOffer1() { checkOffer(1000); } @@ -72,6 +73,7 @@ public void testOffer1() { /** * */ + @Test public void testOffer2() { stripes = 11; @@ -95,6 +97,7 @@ private void checkOffer(int cnt) { /** * */ + @Test public void testRemove1() { checkRemove(1000); } @@ -102,6 +105,7 @@ public void testRemove1() { /** * */ + @Test public void testRemove2() { stripes = 35; @@ -130,6 +134,7 @@ private void checkRemove(int cnt) { /** * */ + @Test public void testPoll1() { checkPoll(1000); } @@ -137,6 +142,7 @@ public void testPoll1() { /** * */ + @Test public void testPoll2() { stripes = 20; @@ -180,6 +186,7 @@ private void checkPoll(int cnt) { /** * @throws Exception If failed. */ + @Test public void testLruMultithreaded() throws Exception { checkLruMultithreaded(1000000); } @@ -226,4 +233,4 @@ private void checkLruMultithreaded(final int cnt) throws Exception { assertEquals(0, lru.size()); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/tostring/CircularStringBuilderSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/tostring/CircularStringBuilderSelfTest.java index b927863d66c46..5546f0015a229 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/tostring/CircularStringBuilderSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/tostring/CircularStringBuilderSelfTest.java @@ -28,6 +28,7 @@ public class CircularStringBuilderSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCSBPrimitive() throws Exception { CircularStringBuilder csb = new CircularStringBuilder(1); csb.append((String)null); @@ -43,6 +44,7 @@ public void testCSBPrimitive() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCSBOverflow() throws Exception { testSB(3, "1234", 2, "234"); testSB(4, "1234", 2, "1234"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/tostring/GridToStringBuilderSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/tostring/GridToStringBuilderSelfTest.java index bf33f4a408153..521b3983616ef 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/tostring/GridToStringBuilderSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/tostring/GridToStringBuilderSelfTest.java @@ -50,6 +50,7 @@ public class GridToStringBuilderSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testToString() throws Exception { TestClass1 obj = new TestClass1(); @@ -64,6 +65,7 @@ public void testToString() throws Exception { /** * @throws Exception If failed. */ + @Test public void testToStringWithAdditions() throws Exception { TestClass1 obj = new TestClass1(); @@ -81,6 +83,7 @@ public void testToStringWithAdditions() throws Exception { /** * @throws Exception If failed. */ + @Test public void testToStringCheckSimpleListRecursionPrevention() throws Exception { ArrayList list1 = new ArrayList<>(); ArrayList list2 = new ArrayList<>(); @@ -95,6 +98,7 @@ public void testToStringCheckSimpleListRecursionPrevention() throws Exception { /** * @throws Exception If failed. */ + @Test public void testToStringCheckSimpleMapRecursionPrevention() throws Exception { HashMap map1 = new HashMap<>(); HashMap map2 = new HashMap<>(); @@ -109,6 +113,7 @@ public void testToStringCheckSimpleMapRecursionPrevention() throws Exception { /** * @throws Exception If failed. */ + @Test public void testToStringCheckListAdvancedRecursionPrevention() throws Exception { ArrayList list1 = new ArrayList<>(); ArrayList list2 = new ArrayList<>(); @@ -123,6 +128,7 @@ public void testToStringCheckListAdvancedRecursionPrevention() throws Exception /** * @throws Exception If failed. */ + @Test public void testToStringCheckMapAdvancedRecursionPrevention() throws Exception { HashMap map1 = new HashMap<>(); HashMap map2 = new HashMap<>(); @@ -137,6 +143,7 @@ public void testToStringCheckMapAdvancedRecursionPrevention() throws Exception { /** * @throws Exception If failed. */ + @Test public void testToStringCheckObjectRecursionPrevention() throws Exception { Node n1 = new Node(); Node n2 = new Node(); @@ -244,6 +251,7 @@ private BarrierCallable(CyclicBarrier bar, Object obj, String exp) { /** * JUnit. */ + @Test public void testToStringPerformance() { TestClass1 obj = new TestClass1(); @@ -286,6 +294,7 @@ private void testArr(V v, int limit) throws Exception { * * @throws Exception if failed. */ + @Test public void testArrLimitWithRecursion() throws Exception { int limit = IgniteSystemProperties.getInteger(IGNITE_TO_STRING_COLLECTION_LIMIT, 100); @@ -325,6 +334,7 @@ private void checkArrayOverflow(Object[] arrOf, Object[] arr, int limit) { /** * @throws Exception If failed. */ + @Test public void testToStringCollectionLimits() throws Exception { int limit = IgniteSystemProperties.getInteger(IGNITE_TO_STRING_COLLECTION_LIMIT, 100); @@ -429,6 +439,7 @@ public void testToStringCollectionLimits() throws Exception { /** * @throws Exception If failed. */ + @Test public void testToStringColAndMapLimitWithRecursion() throws Exception { int limit = IgniteSystemProperties.getInteger(IGNITE_TO_STRING_COLLECTION_LIMIT, 100); Map strMap = new TreeMap<>(); @@ -479,6 +490,7 @@ private void checkColAndMap(TestClass1 testCls) { /** * @throws Exception If failed. */ + @Test public void testToStringSizeLimits() throws Exception { int limit = IgniteSystemProperties.getInteger(IGNITE_TO_STRING_MAX_LENGTH, 10_000); int tailLen = limit / 10 * 2; @@ -509,6 +521,7 @@ public void testToStringSizeLimits() throws Exception { /** * */ + @Test public void testObjectPlusStringToString() { IgniteTxKey k = new IgniteTxKey(new KeyCacheObjectImpl(1, null, 1), 123); @@ -520,6 +533,7 @@ public void testObjectPlusStringToString() { /** * */ + @Test public void testHierarchy() { Wrapper w = new Wrapper(); Parent p = w.p; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/tostring/IncludeSensitiveAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/tostring/IncludeSensitiveAbstractTest.java index 3907e85400ad8..a33bb4ce18bff 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/tostring/IncludeSensitiveAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/tostring/IncludeSensitiveAbstractTest.java @@ -96,6 +96,7 @@ protected void commitTx() { * * @throws Exception If failed. */ + @Test public void test() throws Exception { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); diff --git a/modules/core/src/test/java/org/apache/ignite/jvmtest/FileIOTest.java b/modules/core/src/test/java/org/apache/ignite/jvmtest/FileIOTest.java index eb1f8d5c487ef..8932c04479905 100644 --- a/modules/core/src/test/java/org/apache/ignite/jvmtest/FileIOTest.java +++ b/modules/core/src/test/java/org/apache/ignite/jvmtest/FileIOTest.java @@ -38,6 +38,7 @@ public class FileIOTest extends TestCase { /** * @throws Exception If failed. */ + @Test public void testReadLineFromBinaryFile() throws Exception { File file = new File(FILE_PATH); @@ -79,6 +80,7 @@ public void testReadLineFromBinaryFile() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultipleFilesCreation() throws Exception { File parent = new File(TMP_DIR, "testMultipleFilesCreation"); @@ -127,6 +129,7 @@ public void testMultipleFilesCreation() throws Exception { /** * */ + @Test public void testGetAbsolutePath() { for (int i = 0; i < 1000000; i++) { new File("/" + UUID.randomUUID().toString()).getAbsolutePath(); @@ -136,4 +139,4 @@ public void testGetAbsolutePath() { new File("/Users").getAbsolutePath(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/jvmtest/FileLocksTest.java b/modules/core/src/test/java/org/apache/ignite/jvmtest/FileLocksTest.java index b376f0bae009a..c1bbc50f182ce 100644 --- a/modules/core/src/test/java/org/apache/ignite/jvmtest/FileLocksTest.java +++ b/modules/core/src/test/java/org/apache/ignite/jvmtest/FileLocksTest.java @@ -33,6 +33,7 @@ public class FileLocksTest extends TestCase { /** * @throws Exception If failed. */ + @Test public void testWriteLocks() throws Exception { final File file = new File(LOCK_FILE_PATH); @@ -77,6 +78,7 @@ public void testWriteLocks() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReadLocks() throws Exception { final File file = new File(LOCK_FILE_PATH); @@ -118,4 +120,4 @@ public void testReadLocks() throws Exception { thread.join(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/jvmtest/LinkedHashMapTest.java b/modules/core/src/test/java/org/apache/ignite/jvmtest/LinkedHashMapTest.java index 536784e341def..305494a42917e 100644 --- a/modules/core/src/test/java/org/apache/ignite/jvmtest/LinkedHashMapTest.java +++ b/modules/core/src/test/java/org/apache/ignite/jvmtest/LinkedHashMapTest.java @@ -27,6 +27,7 @@ */ public class LinkedHashMapTest extends TestCase { /** @throws Exception If failed. */ + @Test public void testAccessOrder1() throws Exception { X.println(">>> testAccessOrder1 <<<"); @@ -52,6 +53,7 @@ public void testAccessOrder1() throws Exception { } /** @throws Exception If failed. */ + @Test public void testAccessOrder2() throws Exception { X.println(">>> testAccessOrder2 <<<"); @@ -69,6 +71,7 @@ public void testAccessOrder2() throws Exception { } /** @throws Exception If failed. */ + @Test public void testAccessOrder3() throws Exception { X.println(">>> testAccessOrder3 <<<"); @@ -84,4 +87,4 @@ public void testAccessOrder3() throws Exception { X.println("State after get: " + map); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/jvmtest/NetworkFailureTest.java b/modules/core/src/test/java/org/apache/ignite/jvmtest/NetworkFailureTest.java index c331ce97e781d..7e865eaf4e0d7 100644 --- a/modules/core/src/test/java/org/apache/ignite/jvmtest/NetworkFailureTest.java +++ b/modules/core/src/test/java/org/apache/ignite/jvmtest/NetworkFailureTest.java @@ -40,6 +40,7 @@ public class NetworkFailureTest extends TestCase { /** * @throws Exception If failed. */ + @Test public void testNetworkFailure() throws Exception { final AtomicBoolean done = new AtomicBoolean(); @@ -141,6 +142,7 @@ public void testNetworkFailure() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReadTimeout() throws Exception { final InetAddress addr = InetAddress.getByName("192.168.3.10"); @@ -223,6 +225,7 @@ public void testReadTimeout() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSocketCloseOnTimeout() throws Exception { final AtomicBoolean done = new AtomicBoolean(); @@ -323,6 +326,7 @@ public void testSocketCloseOnTimeout() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConnectionTime() throws Exception { X.println("Unexistent host."); checkConnection(InetAddress.getByName("192.168.0.222")); @@ -370,4 +374,4 @@ private Socket openSocket(InetAddress addr, int port) throws IOException { return sock; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/jvmtest/QueueSizeCounterMultiThreadedTest.java b/modules/core/src/test/java/org/apache/ignite/jvmtest/QueueSizeCounterMultiThreadedTest.java index 6e7be771fedad..fd9ad2516e93e 100644 --- a/modules/core/src/test/java/org/apache/ignite/jvmtest/QueueSizeCounterMultiThreadedTest.java +++ b/modules/core/src/test/java/org/apache/ignite/jvmtest/QueueSizeCounterMultiThreadedTest.java @@ -36,6 +36,7 @@ public class QueueSizeCounterMultiThreadedTest extends TestCase { /** * @throws Exception If failed. */ + @Test public void testQueueSizeCounter() throws Exception { final ConcurrentLinkedQueue q = new ConcurrentLinkedQueue<>(); @@ -99,4 +100,4 @@ public void testQueueSizeCounter() throws Exception { fut1.get(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/jvmtest/ReadWriteLockMultiThreadedTest.java b/modules/core/src/test/java/org/apache/ignite/jvmtest/ReadWriteLockMultiThreadedTest.java index 666a5a1941561..ca0993e5e464a 100644 --- a/modules/core/src/test/java/org/apache/ignite/jvmtest/ReadWriteLockMultiThreadedTest.java +++ b/modules/core/src/test/java/org/apache/ignite/jvmtest/ReadWriteLockMultiThreadedTest.java @@ -34,6 +34,7 @@ public class ReadWriteLockMultiThreadedTest extends TestCase { * @throws Exception If failed. */ @SuppressWarnings({"LockAcquiredButNotSafelyReleased"}) + @Test public void testReadThenWriteLockAcquire() throws Exception { ReadWriteLock lock = new ReentrantReadWriteLock(); @@ -45,6 +46,7 @@ public void testReadThenWriteLockAcquire() throws Exception { /** * */ + @Test public void testNotOwnedLockRelease() { ReadWriteLock lock = new ReentrantReadWriteLock(); @@ -55,6 +57,7 @@ public void testNotOwnedLockRelease() { * @throws Exception If failed. */ @SuppressWarnings({"LockAcquiredButNotSafelyReleased"}) + @Test public void testWriteLockAcquire() throws Exception { final ReadWriteLock lock = new ReentrantReadWriteLock(); @@ -124,6 +127,7 @@ public void testWriteLockAcquire() throws Exception { * @throws Exception If failed. */ @SuppressWarnings({"LockAcquiredButNotSafelyReleased"}) + @Test public void testReadLockAcquire() throws Exception { final ReadWriteLock lock = new ReentrantReadWriteLock(); @@ -169,6 +173,7 @@ public void testReadLockAcquire() throws Exception { * @throws Exception If failed. */ @SuppressWarnings({"LockAcquiredButNotSafelyReleased"}) + @Test public void testTryWriteLock() throws Exception { final ReadWriteLock lock = new ReentrantReadWriteLock(); @@ -204,4 +209,4 @@ public void testTryWriteLock() throws Exception { fut.get(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/jvmtest/RegExpTest.java b/modules/core/src/test/java/org/apache/ignite/jvmtest/RegExpTest.java index 9b8c4bd11949f..4e0d5c51aa129 100644 --- a/modules/core/src/test/java/org/apache/ignite/jvmtest/RegExpTest.java +++ b/modules/core/src/test/java/org/apache/ignite/jvmtest/RegExpTest.java @@ -30,6 +30,7 @@ public class RegExpTest extends TestCase { /** * @throws Exception If failed. */ + @Test public void testRegExp() throws Exception { String normal = "swap-spaces/space1/b53b3a3d6ab90ce0268229151c9bde11|b53b3a3d6ab90ce0268229151c9bde11|1315392441288"; @@ -53,4 +54,4 @@ public void testRegExp() throws Exception { assert normal.matches(ptrn); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/jvmtest/ServerSocketMultiThreadedTest.java b/modules/core/src/test/java/org/apache/ignite/jvmtest/ServerSocketMultiThreadedTest.java index f6fe7dbb49d1b..8b6a676d83769 100644 --- a/modules/core/src/test/java/org/apache/ignite/jvmtest/ServerSocketMultiThreadedTest.java +++ b/modules/core/src/test/java/org/apache/ignite/jvmtest/ServerSocketMultiThreadedTest.java @@ -47,6 +47,7 @@ public class ServerSocketMultiThreadedTest extends TestCase { /** * @throws Exception If failed. */ + @Test public void testConcurrentBind() throws Exception { final AtomicInteger bindExCnt = new AtomicInteger(); final AtomicInteger sockExCnt = new AtomicInteger(); @@ -100,4 +101,4 @@ public void testConcurrentBind() throws Exception { X.println("Test stats [bindExCnt=" + bindExCnt.get() + ", sockExCnt=" + sockExCnt.get() + ", okCnt=" + okCnt + ']'); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/lang/GridByteArrayListSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/GridByteArrayListSelfTest.java index aad28ea828a58..8f42a54ce9e22 100644 --- a/modules/core/src/test/java/org/apache/ignite/lang/GridByteArrayListSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/lang/GridByteArrayListSelfTest.java @@ -34,6 +34,7 @@ public class GridByteArrayListSelfTest extends GridCommonAbstractTest { /** * */ + @Test public void testCapacity() { int cap = 10; @@ -64,6 +65,7 @@ public void testCapacity() { /** * */ + @Test public void testAddSetByte() { GridByteArrayList list = new GridByteArrayList(10); @@ -83,6 +85,7 @@ public void testAddSetByte() { /** * */ + @Test public void testAddSetInteger() { GridByteArrayList list = new GridByteArrayList(10); @@ -118,6 +121,7 @@ public void testAddSetInteger() { /** * */ + @Test public void testAddByteArray() { GridByteArrayList list = new GridByteArrayList(3); @@ -140,6 +144,7 @@ public void testAddByteArray() { /** * */ + @Test public void testAddByteBuffer() { GridByteArrayList list = new GridByteArrayList(3); @@ -167,6 +172,7 @@ public void testAddByteBuffer() { * */ @SuppressWarnings({"ErrorNotRethrown"}) + @Test public void testBounds() { GridByteArrayList list = new GridByteArrayList(3); @@ -201,6 +207,7 @@ public void testBounds() { /** * @throws Exception If failed. */ + @Test public void testRead() throws Exception { GridByteArrayList list = new GridByteArrayList(10); @@ -212,4 +219,4 @@ public void testRead() throws Exception { assert Arrays.equals(list.array(), arr); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/lang/GridFuncPerformanceTest.java b/modules/core/src/test/java/org/apache/ignite/lang/GridFuncPerformanceTest.java index b7c2262c46f12..f8c33a4d93f4a 100644 --- a/modules/core/src/test/java/org/apache/ignite/lang/GridFuncPerformanceTest.java +++ b/modules/core/src/test/java/org/apache/ignite/lang/GridFuncPerformanceTest.java @@ -39,6 +39,7 @@ public GridFuncPerformanceTest() { /** * */ + @Test public void testTransformingIteratorPerformance() { // Warmup. testBody(); @@ -98,4 +99,4 @@ private long testBody() { return duration; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/lang/GridMetadataAwareAdapterLoadTest.java b/modules/core/src/test/java/org/apache/ignite/lang/GridMetadataAwareAdapterLoadTest.java index f411f31a37dab..d9c29673f3c9b 100644 --- a/modules/core/src/test/java/org/apache/ignite/lang/GridMetadataAwareAdapterLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/lang/GridMetadataAwareAdapterLoadTest.java @@ -40,6 +40,7 @@ public GridMetadataAwareAdapterLoadTest() { * * @throws Exception */ + @Test public void test() throws Exception { String[] dic = new String[1_000_000]; diff --git a/modules/core/src/test/java/org/apache/ignite/lang/GridMetadataAwareAdapterSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/GridMetadataAwareAdapterSelfTest.java index f202fa97c8542..481415e485dad 100644 --- a/modules/core/src/test/java/org/apache/ignite/lang/GridMetadataAwareAdapterSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/lang/GridMetadataAwareAdapterSelfTest.java @@ -36,6 +36,7 @@ public GridMetadataAwareAdapterSelfTest() { * Junit. */ @SuppressWarnings({"AssertWithSideEffects"}) + @Test public void test() { GridMetadataAwareAdapter ma = new GridMetadataAwareAdapter(); diff --git a/modules/core/src/test/java/org/apache/ignite/lang/GridSetWrapperSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/GridSetWrapperSelfTest.java index 7cddf27c056b5..8043f9c7cc544 100644 --- a/modules/core/src/test/java/org/apache/ignite/lang/GridSetWrapperSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/lang/GridSetWrapperSelfTest.java @@ -35,11 +35,13 @@ public class GridSetWrapperSelfTest extends GridCommonAbstractTest { /** @throws Exception If failed. */ + @Test public void testEmptySet() throws Exception { checkCollectionEmptiness(new GridSetWrapper<>(new HashMap())); } /** @throws Exception If failed. */ + @Test public void testMultipleValuesSet() throws Exception { Set set = new GridSetWrapper<>(new HashMap()); @@ -76,6 +78,7 @@ public void testMultipleValuesSet() throws Exception { } /** @throws Exception If failed. */ + @Test public void testSetRemove() throws Exception { Collection set = new GridSetWrapper<>(new HashMap()); @@ -117,6 +120,7 @@ public void testSetRemove() throws Exception { } /** @throws Exception If failed. */ + @Test public void testSetRemoveAll() throws Exception { Collection set = new GridSetWrapper<>(new HashMap()); @@ -138,6 +142,7 @@ public void testSetRemoveAll() throws Exception { } /** @throws Exception If failed. */ + @Test public void testSetClear() throws Exception { Collection set = new GridSetWrapper<>(new HashMap()); @@ -156,6 +161,7 @@ public void testSetClear() throws Exception { } /** @throws Exception If failed. */ + @Test public void testIterator() throws Exception { Set set = new GridSetWrapper<>(new HashMap()); @@ -227,4 +233,4 @@ private void checkCollectionEmptiness(Collection c) throws Exception { info("Caught expected exception: " + e); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/lang/GridTupleSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/GridTupleSelfTest.java index 77be70c229cea..23509a1354197 100644 --- a/modules/core/src/test/java/org/apache/ignite/lang/GridTupleSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/lang/GridTupleSelfTest.java @@ -41,6 +41,7 @@ public GridTupleSelfTest() { /** * JUnit. */ + @Test public void testGridTupleAsIterable() { String str = "A test string"; @@ -71,6 +72,7 @@ public void testGridTupleAsIterable() { /** * JUnit. */ + @Test public void testGridTuple2AsIterable() { String str1 = "A test string 1"; String str2 = "A test string 2"; @@ -103,6 +105,7 @@ public void testGridTuple2AsIterable() { /** * JUnit. */ + @Test public void testGridTuple2AsMap() { String str1 = "A test string 1"; String str2 = "A test string 2"; @@ -141,6 +144,7 @@ public void testGridTuple2AsMap() { /** * JUnit. */ + @Test public void testGridTuple3AsIterable() { String str1 = "A test string 1"; String str2 = "A test string 2"; diff --git a/modules/core/src/test/java/org/apache/ignite/lang/GridXSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/GridXSelfTest.java index 8fd6df638668d..d16279ceec759 100644 --- a/modules/core/src/test/java/org/apache/ignite/lang/GridXSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/lang/GridXSelfTest.java @@ -33,6 +33,7 @@ public class GridXSelfTest extends GridCommonAbstractTest { /** * */ + @Test public void testHasCause() { ConnectException conEx = new ConnectException(); @@ -55,6 +56,7 @@ public void testHasCause() { /** * Tests string presentation of given time. */ + @Test public void testTimeSpan() { assertEquals(X.timeSpan2DHMSM(86400001L), "1 day, 00:00:00.001"); @@ -68,6 +70,7 @@ public void testTimeSpan() { /** * */ + @Test public void testShallowClone() { // Single not cloneable object Object obj = new Object(); @@ -117,6 +120,7 @@ public void testShallowClone() { * */ @SuppressWarnings({"StringEquality"}) + @Test public void testDeepCloner() { // Single not cloneable object Object obj = new Object(); @@ -272,4 +276,4 @@ private static class TestCycledChild extends TestCycled { @SuppressWarnings({"unused"}) private final TestCycled anotherCycle = this; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/lang/IgniteUuidSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/IgniteUuidSelfTest.java index a3d82cbeb88cd..9b821a12a271d 100644 --- a/modules/core/src/test/java/org/apache/ignite/lang/IgniteUuidSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/lang/IgniteUuidSelfTest.java @@ -42,6 +42,7 @@ public class IgniteUuidSelfTest extends GridCommonAbstractTest { /** * JUnit. */ + @Test public void testToString() { IgniteUuid id1 = IgniteUuid.randomUuid(); @@ -73,6 +74,7 @@ public void testToString() { /** * JUnit. */ + @Test public void testGridUuid() { IgniteUuid id1 = IgniteUuid.randomUuid(); IgniteUuid id2 = IgniteUuid.randomUuid(); @@ -95,6 +97,7 @@ public void testGridUuid() { /** * JUnit. */ + @Test public void testGridUuidPerformance() { long start = System.currentTimeMillis(); @@ -121,6 +124,7 @@ public void testGridUuidPerformance() { * * @throws Exception If failed. */ + @Test public void testSerializationPerformance() throws Exception { UuidBean[] uids = new UuidBean[NUM]; @@ -330,4 +334,4 @@ private UuidBean(UUID uid) { /** {@inheritDoc} */ @Override public String toString() { return S.toString(UuidBean.class, this); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridBoundedConcurrentLinkedHashMapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridBoundedConcurrentLinkedHashMapSelfTest.java index 8ce7ae37038f9..39aca792a4a1f 100644 --- a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridBoundedConcurrentLinkedHashMapSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridBoundedConcurrentLinkedHashMapSelfTest.java @@ -32,6 +32,7 @@ public class GridBoundedConcurrentLinkedHashMapSelfTest extends GridCommonAbstra /** * @throws Exception If failed. */ + @Test public void testBound() throws Exception { Map map = new GridBoundedConcurrentLinkedHashMap<>(MAX); diff --git a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridBoundedConcurrentOrderedMapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridBoundedConcurrentOrderedMapSelfTest.java index 05ba4959caf4e..1e1c261bc719a 100644 --- a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridBoundedConcurrentOrderedMapSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridBoundedConcurrentOrderedMapSelfTest.java @@ -32,6 +32,7 @@ public class GridBoundedConcurrentOrderedMapSelfTest extends GridCommonAbstractT /** * */ + @Test public void testEvictionSingleElement() { SortedMap m = new GridBoundedConcurrentOrderedMap<>(1); @@ -52,6 +53,7 @@ public void testEvictionSingleElement() { /** * */ + @Test public void testEvictionListener() { GridBoundedConcurrentOrderedMap m = new GridBoundedConcurrentOrderedMap<>(1); @@ -78,4 +80,4 @@ public void testEvictionListener() { assertEquals(10, m.lastKey().intValue()); assertEquals(10, evicted.get()); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridBoundedPriorityQueueSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridBoundedPriorityQueueSelfTest.java index bcaecc4adcd10..31b4994584db4 100644 --- a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridBoundedPriorityQueueSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridBoundedPriorityQueueSelfTest.java @@ -45,6 +45,7 @@ public class GridBoundedPriorityQueueSelfTest extends GridCommonAbstractTest { /** * Test eviction in bounded priority queue. */ + @Test public void testEviction() { GridBoundedPriorityQueue queue = new GridBoundedPriorityQueue<>(3, CMP); diff --git a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridCircularBufferPerformanceTest.java b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridCircularBufferPerformanceTest.java index c0fc4864472b9..4d2b7d37bebf4 100644 --- a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridCircularBufferPerformanceTest.java +++ b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridCircularBufferPerformanceTest.java @@ -35,6 +35,7 @@ public class GridCircularBufferPerformanceTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testThroughput() throws Exception { int size = 256 * 1024; @@ -74,6 +75,7 @@ public void testThroughput() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDequeueThroughput() throws Exception { final FastSizeDeque buf = new FastSizeDeque<>(new ConcurrentLinkedDeque<>()); @@ -117,6 +119,7 @@ public void testDequeueThroughput() throws Exception { /** * @throws Exception If failed. */ + @Test public void testArrayBlockingQueueThroughput() throws Exception { final int size = 256 * 1024; @@ -158,6 +161,7 @@ public void testArrayBlockingQueueThroughput() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAdderThroughput() throws Exception { final int size = 256 * 1024; @@ -194,6 +198,7 @@ public void testAdderThroughput() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAtomicLongThroughput() throws Exception { final int size = 256 * 1024; @@ -226,4 +231,4 @@ public void testAtomicLongThroughput() throws Exception { info("Buffer: " + buf); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridCircularBufferSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridCircularBufferSelfTest.java index 50d351b30cd28..9e73ff6bf94db 100644 --- a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridCircularBufferSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridCircularBufferSelfTest.java @@ -31,6 +31,7 @@ public class GridCircularBufferSelfTest extends GridCommonAbstractTest { /** * */ + @Test public void testCreation() { try { GridCircularBuffer buf = new GridCircularBuffer<>(-2); @@ -73,6 +74,7 @@ public void testCreation() { /** * @throws Exception If failed. */ + @Test public void testSingleThreaded() throws Exception { int size = 8; int iterCnt = size * 10; @@ -107,6 +109,7 @@ public void testSingleThreaded() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMutliThreaded() throws Exception { int size = 32 * 1024; @@ -135,6 +138,7 @@ public void testMutliThreaded() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMutliThreaded2() throws Exception { int size = 256 * 1024; @@ -173,4 +177,4 @@ public void testMutliThreaded2() throws Exception { info("Buffer: " + buf); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridConcurrentLinkedHashMapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridConcurrentLinkedHashMapSelfTest.java index 7bcbd07b3becf..e1c586bc92001 100644 --- a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridConcurrentLinkedHashMapSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridConcurrentLinkedHashMapSelfTest.java @@ -47,6 +47,7 @@ public class GridConcurrentLinkedHashMapSelfTest extends GridCommonAbstractTest /** * */ + @Test public void testInsertionOrder() { testOrder(false); } @@ -54,6 +55,7 @@ public void testInsertionOrder() { /** * */ + @Test public void testInsertionOrderWithUpdate() { testOrder(true); } @@ -61,6 +63,7 @@ public void testInsertionOrderWithUpdate() { /** * */ + @Test public void testEvictionInsert() { final int mapSize = 1000; @@ -159,6 +162,7 @@ private void testOrder(boolean update) { * Tests iterator when concurrent modifications remove and add the same keys to the map. * */ + @Test public void testIteratorDuplicates() { Map tst = new ConcurrentLinkedHashMap<>(); @@ -187,6 +191,7 @@ public void testIteratorDuplicates() { /** * @throws Exception If failed. */ + @Test public void testRehash() throws Exception { Map map = new ConcurrentLinkedHashMap<>(10); @@ -204,6 +209,7 @@ public void testRehash() throws Exception { /** * */ + @Test public void testDescendingMethods() { ConcurrentLinkedHashMap tst = new ConcurrentLinkedHashMap<>(); @@ -273,6 +279,7 @@ public void testDescendingMethods() { /** * */ + @Test public void testIterationInPerSegmentModes() { checkIteration(PER_SEGMENT_Q); checkIteration(PER_SEGMENT_Q_OPTIMIZED_RMV); diff --git a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridConcurrentWeakHashSetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridConcurrentWeakHashSetSelfTest.java index 42a6a711af0ae..9612b958a50ad 100644 --- a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridConcurrentWeakHashSetSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridConcurrentWeakHashSetSelfTest.java @@ -43,6 +43,7 @@ public class GridConcurrentWeakHashSetSelfTest extends GridCommonAbstractTest { /** * @throws Exception Thrown if test failed. */ + @Test public void testA() throws Exception { Collection set = new GridConcurrentWeakHashSet<>(); @@ -129,6 +130,7 @@ public void testA() throws Exception { * @throws Exception Thrown if test failed. */ @SuppressWarnings({"UnusedAssignment"}) + @Test public void testB() throws Exception { Collection set = new GridConcurrentWeakHashSet<>(); @@ -198,6 +200,7 @@ public void testB() throws Exception { /** * @throws Exception Thrown if test failed. */ + @Test public void testC() throws Exception { final Collection set = new GridConcurrentWeakHashSet<>(); @@ -243,6 +246,7 @@ public void testC() throws Exception { /** * @throws Exception Thrown if test failed. */ + @Test public void testD() throws Exception { final Collection set = new GridConcurrentWeakHashSet<>(); @@ -395,4 +399,4 @@ private SampleBean(int num) { return S.toString(SampleBean.class, this); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridConsistentHashSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridConsistentHashSelfTest.java index c44d91bc38226..e8558be3ccd17 100644 --- a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridConsistentHashSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridConsistentHashSelfTest.java @@ -102,6 +102,7 @@ private void clean(GridConsistentHash hash) { * * @throws Exception In case of any exception. */ + @Test public void testCollisions() throws Exception { Map> map = new HashMap<>(); @@ -153,6 +154,7 @@ public void testCollisions() throws Exception { * * @throws Exception In case of any exception. */ + @Test public void testTreeSetRestrictions() throws Exception { // Constructs hash without explicit node's comparator. GridConsistentHash hash = new GridConsistentHash<>(); @@ -186,6 +188,7 @@ public void testTreeSetRestrictions() throws Exception { /** * */ + @Test public void testOneNode() { GridConsistentHash hash = new GridConsistentHash<>(); @@ -203,6 +206,7 @@ public void testOneNode() { /** * */ + @Test public void testHistory() { for (int i = NODES; i-- > 0; ) { GridConsistentHash hash = new GridConsistentHash<>(); @@ -337,4 +341,4 @@ private String[] keys(int cnt) { return keys; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridLeanIdentitySetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridLeanIdentitySetSelfTest.java index 0cfe0c8f296c5..a6e4fd7ce4614 100644 --- a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridLeanIdentitySetSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridLeanIdentitySetSelfTest.java @@ -32,6 +32,7 @@ public class GridLeanIdentitySetSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testAddSizeContainsClear() throws Exception { Set set = new GridLeanIdentitySet<>(); @@ -59,4 +60,4 @@ public void testAddSizeContainsClear() throws Exception { assert set.isEmpty(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridLeanMapPerformanceTest.java b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridLeanMapPerformanceTest.java index d9ff27c224835..8d31fe01c4193 100644 --- a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridLeanMapPerformanceTest.java +++ b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridLeanMapPerformanceTest.java @@ -34,6 +34,7 @@ public class GridLeanMapPerformanceTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPerformance() throws Exception { long avgDur = 0; @@ -80,4 +81,4 @@ private void iterate(Map map) throws Exception { for (Integer v : map.values()); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridLeanMapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridLeanMapSelfTest.java index 887d05a285f72..f9906c3e78ddb 100644 --- a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridLeanMapSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridLeanMapSelfTest.java @@ -36,6 +36,7 @@ public class GridLeanMapSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testDefaultMap() throws Exception { Map map = new GridLeanMap<>(); @@ -102,6 +103,7 @@ public void testDefaultMap() throws Exception { * * @throws Exception If failed. */ + @Test public void testEmptyMap() throws Exception { Map map = new GridLeanMap<>(0); @@ -168,6 +170,7 @@ public void testEmptyMap() throws Exception { * * @throws Exception If failed. */ + @Test public void testOneEntryMap() throws Exception { Map map = new GridLeanMap<>(0); @@ -223,6 +226,7 @@ public void testOneEntryMap() throws Exception { * * @throws Exception If failed. */ + @Test public void testMapPutSameKey() throws Exception { Map map = new GridLeanMap<>(0); @@ -241,6 +245,7 @@ public void testMapPutSameKey() throws Exception { * * @throws Exception If failed. */ + @Test public void testMultipleEntriesMap() throws Exception { Map map = new GridLeanMap<>(0); @@ -332,6 +337,7 @@ public void testMultipleEntriesMap() throws Exception { * * @throws Exception If failed. */ + @Test public void testMapRemove() throws Exception { Map map = new GridLeanMap<>(0); @@ -386,6 +392,7 @@ public void testMapRemove() throws Exception { * * @throws Exception If failed. */ + @Test public void testMapClear() throws Exception { Map map = new GridLeanMap<>(); @@ -407,6 +414,7 @@ public void testMapClear() throws Exception { * * @throws Exception If failed. */ + @Test public void testEntrySet() throws Exception { Map map = new GridLeanMap<>(); @@ -459,6 +467,7 @@ public void testEntrySet() throws Exception { * * @throws Exception If failed. */ + @Test public void testWithInitSize1() throws Exception { // Batch mode. Map map = new GridLeanMap<>(4); @@ -527,6 +536,7 @@ public void testWithInitSize1() throws Exception { * * @throws Exception If failed. */ + @Test public void testWithInitSize2() throws Exception { // Batch mode. Map map = new GridLeanMap<>(10); @@ -656,4 +666,4 @@ else if (map.size() == 5) else checkImpl(map, "LeanHashMap"); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridListSetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridListSetSelfTest.java index 6dbff65569aac..18a7b060837b7 100644 --- a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridListSetSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridListSetSelfTest.java @@ -34,6 +34,7 @@ public class GridListSetSelfTest extends GridCommonAbstractTest { /** * */ + @Test public void testUnsorted() { GridListSet set = new GridListSet<>(); @@ -91,6 +92,7 @@ public void testUnsorted() { /** * */ + @Test public void testSortedNotStrict() { GridListSet set = new GridListSet<>(new Comparator() { @Override public int compare(V1 o1, V1 o2) { @@ -153,6 +155,7 @@ public void testSortedNotStrict() { /** * */ + @Test public void testSortedStrict() { List vals = new ArrayList<>(); @@ -286,4 +289,4 @@ private V2(int val, int other) { return S.toString(V2.class, this, super.toString()); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridStripedLockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridStripedLockSelfTest.java index f6fb545769740..7e87db895afd5 100644 --- a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridStripedLockSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridStripedLockSelfTest.java @@ -54,6 +54,7 @@ public class GridStripedLockSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testIntLocking() throws Exception { GridTestUtils.runMultiThreaded(new Runnable() { @Override public void run() { @@ -87,6 +88,7 @@ public void testIntLocking() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLongLocking() throws Exception { GridTestUtils.runMultiThreaded(new Runnable() { @Override public void run() { @@ -120,6 +122,7 @@ public void testLongLocking() throws Exception { /** * @throws Exception If failed. */ + @Test public void testObjectLocking() throws Exception { GridTestUtils.runMultiThreaded(new Runnable() { @Override public void run() { @@ -197,4 +200,4 @@ private Iterable testObjects(final int cnt) { } }; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/lang/utils/IgniteOffheapReadWriteLockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/utils/IgniteOffheapReadWriteLockSelfTest.java index c5ebe6a771bd0..78114f4fe43d0 100644 --- a/modules/core/src/test/java/org/apache/ignite/lang/utils/IgniteOffheapReadWriteLockSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/lang/utils/IgniteOffheapReadWriteLockSelfTest.java @@ -44,6 +44,7 @@ public class IgniteOffheapReadWriteLockSelfTest extends GridCommonAbstractTest { /** * @throws Exception if failed. */ + @Test public void testConcurrentUpdatesSingleLock() throws Exception { final int numPairs = 100; final Pair[] data = new Pair[numPairs]; @@ -139,6 +140,7 @@ public void testConcurrentUpdatesSingleLock() throws Exception { /** * @throws Exception if failed. */ + @Test public void testConcurrentUpdatesMultipleLocks() throws Exception { final int numPairs = 100; final Pair[] data = new Pair[numPairs]; @@ -225,6 +227,7 @@ public void testConcurrentUpdatesMultipleLocks() throws Exception { /** * @throws Exception if failed. */ + @Test public void testLockUpgradeMultipleLocks() throws Exception { final int numPairs = 100; final Pair[] data = new Pair[numPairs]; @@ -312,6 +315,7 @@ public void testLockUpgradeMultipleLocks() throws Exception { /** * @throws Exception if failed. */ + @Test public void testTagIdUpdateWait() throws Exception { checkTagIdUpdate(true); } @@ -319,6 +323,7 @@ public void testTagIdUpdateWait() throws Exception { /** * @throws Exception if failed. */ + @Test public void testTagIdUpdateContinuous() throws Exception { checkTagIdUpdate(false); } diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/GridCacheMultiNodeLoadTest.java b/modules/core/src/test/java/org/apache/ignite/loadtests/GridCacheMultiNodeLoadTest.java index 35c3405cdd51b..12e1b6470d312 100644 --- a/modules/core/src/test/java/org/apache/ignite/loadtests/GridCacheMultiNodeLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/loadtests/GridCacheMultiNodeLoadTest.java @@ -97,7 +97,8 @@ public class GridCacheMultiNodeLoadTest extends GridCommonAbstractTest { /** * @throws Exception If test failed. */ + @Test public void testMany() throws Exception { ignite1.compute().execute(GridCacheLoadPopulationTask.class, null); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheWriteBehindStoreLoadTest.java b/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheWriteBehindStoreLoadTest.java index e4c4b2558e331..16230a9522c6c 100644 --- a/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheWriteBehindStoreLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheWriteBehindStoreLoadTest.java @@ -125,6 +125,7 @@ protected CacheMode cacheMode() { /** * @throws Exception If failed. */ + @Test public void testLoadCacheSequentialKeys() throws Exception { rndKeys = false; @@ -136,6 +137,7 @@ public void testLoadCacheSequentialKeys() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLoadCacheRandomKeys() throws Exception { rndKeys = true; @@ -198,4 +200,4 @@ private void loadCache() throws Exception { @Override protected long getTestTimeout() { return 0; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/communication/GridIoManagerBenchmark0.java b/modules/core/src/test/java/org/apache/ignite/loadtests/communication/GridIoManagerBenchmark0.java index 68fff45b120b6..7a1c68deea340 100644 --- a/modules/core/src/test/java/org/apache/ignite/loadtests/communication/GridIoManagerBenchmark0.java +++ b/modules/core/src/test/java/org/apache/ignite/loadtests/communication/GridIoManagerBenchmark0.java @@ -103,6 +103,7 @@ private static String generateTestString(int len) { /** * @throws Exception If failed. */ + @Test public void testThroughput() throws Exception { final IgniteKernal sndKernal = (IgniteKernal)grid(0); final IgniteKernal rcvKernal = (IgniteKernal)grid(1); @@ -198,6 +199,7 @@ public void testThroughput() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLatency() throws Exception { final IgniteKernal sndKernal = (IgniteKernal)grid(0); final IgniteKernal rcvKernal = (IgniteKernal)grid(1); @@ -293,6 +295,7 @@ public void testLatency() throws Exception { /** * @throws Exception If failed. */ + @Test public void testVariableLoad() throws Exception { final IgniteKernal sndKernal = (IgniteKernal)grid(0); final IgniteKernal rcvKernal = (IgniteKernal)grid(1); @@ -466,4 +469,4 @@ private CommunicationSpi getCommunication() { @Override protected long getTestTimeout() { return TEST_TIMEOUT + 60 * 1000; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/communication/GridTcpCommunicationBenchmark.java b/modules/core/src/test/java/org/apache/ignite/loadtests/communication/GridTcpCommunicationBenchmark.java index b62094977c3ce..8f4779cb0fb51 100644 --- a/modules/core/src/test/java/org/apache/ignite/loadtests/communication/GridTcpCommunicationBenchmark.java +++ b/modules/core/src/test/java/org/apache/ignite/loadtests/communication/GridTcpCommunicationBenchmark.java @@ -132,7 +132,8 @@ // * @throws Exception If failed. // */ // @SuppressWarnings("deprecation") -// public void testThroughput() throws Exception { +// @Test + public void testThroughput() throws Exception { // assert spis.size() == 2; // assert nodes.size() == 2; // @@ -246,7 +247,8 @@ // * @throws Exception If failed. // */ // @SuppressWarnings("deprecation") -// public void testLatency() throws Exception { +// @Test + public void testLatency() throws Exception { // assert spis.size() == 2; // assert nodes.size() == 2; // @@ -373,7 +375,8 @@ // * @throws Exception If failed. // */ // @SuppressWarnings("deprecation") -// public void testVariableLoad() throws Exception { +// @Test + public void testVariableLoad() throws Exception { // assert spis.size() == 2; // assert nodes.size() == 2; // @@ -583,4 +586,4 @@ // @Override protected long getTestTimeout() { // return TEST_TIMEOUT + 60 * 1000; // } -//} \ No newline at end of file +//} diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/datastructures/GridCachePartitionedAtomicLongLoadTest.java b/modules/core/src/test/java/org/apache/ignite/loadtests/datastructures/GridCachePartitionedAtomicLongLoadTest.java index 30172724e7378..a656fa7c297db 100644 --- a/modules/core/src/test/java/org/apache/ignite/loadtests/datastructures/GridCachePartitionedAtomicLongLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/loadtests/datastructures/GridCachePartitionedAtomicLongLoadTest.java @@ -96,6 +96,7 @@ public class GridCachePartitionedAtomicLongLoadTest extends GridCommonAbstractTe /** * @throws Exception If failed. */ + @Test public void testLoad() throws Exception { startGrid(); @@ -139,4 +140,4 @@ private class AtomicCallable implements Callable { return true; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/direct/multisplit/GridMultiSplitsLoadTest.java b/modules/core/src/test/java/org/apache/ignite/loadtests/direct/multisplit/GridMultiSplitsLoadTest.java index b6910b3599ebf..84fee1ad6598a 100644 --- a/modules/core/src/test/java/org/apache/ignite/loadtests/direct/multisplit/GridMultiSplitsLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/loadtests/direct/multisplit/GridMultiSplitsLoadTest.java @@ -87,6 +87,7 @@ private int getThreadCount() { * * @throws Exception If task execution failed. */ + @Test public void testLoad() throws Exception { final Ignite ignite = G.ignite(getTestIgniteInstanceName()); diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/direct/multisplit/GridMultiSplitsRedeployLoadTest.java b/modules/core/src/test/java/org/apache/ignite/loadtests/direct/multisplit/GridMultiSplitsRedeployLoadTest.java index 46dc5bdbdfa88..c77b6e0941b71 100644 --- a/modules/core/src/test/java/org/apache/ignite/loadtests/direct/multisplit/GridMultiSplitsRedeployLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/loadtests/direct/multisplit/GridMultiSplitsRedeployLoadTest.java @@ -74,6 +74,7 @@ private int getThreadCount() { * * @throws Exception If task execution failed. */ + @Test public void testLoad() throws Exception { final Ignite ignite = G.ignite(getTestIgniteInstanceName()); diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/direct/newnodes/GridSingleSplitsNewNodesAbstractLoadTest.java b/modules/core/src/test/java/org/apache/ignite/loadtests/direct/newnodes/GridSingleSplitsNewNodesAbstractLoadTest.java index 54d62c2fd7e7a..41cf05dc0746b 100644 --- a/modules/core/src/test/java/org/apache/ignite/loadtests/direct/newnodes/GridSingleSplitsNewNodesAbstractLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/loadtests/direct/newnodes/GridSingleSplitsNewNodesAbstractLoadTest.java @@ -87,6 +87,7 @@ protected int getNodeCount() { * * @throws Exception If task execution failed. */ + @Test public void testLoad() throws Exception { final Ignite ignite = startGrid(getTestIgniteInstanceName()); diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/direct/redeploy/GridSingleSplitsRedeployLoadTest.java b/modules/core/src/test/java/org/apache/ignite/loadtests/direct/redeploy/GridSingleSplitsRedeployLoadTest.java index 057a1c82a3601..abec9c011a104 100644 --- a/modules/core/src/test/java/org/apache/ignite/loadtests/direct/redeploy/GridSingleSplitsRedeployLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/loadtests/direct/redeploy/GridSingleSplitsRedeployLoadTest.java @@ -91,6 +91,7 @@ private int getThreadCount() { * * @throws Exception If task execution failed. */ + @Test public void testLoad() throws Exception { final Ignite ignite = G.ignite(getTestIgniteInstanceName()); diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/direct/session/GridSessionLoadTest.java b/modules/core/src/test/java/org/apache/ignite/loadtests/direct/session/GridSessionLoadTest.java index adc47cd26ae0b..74cff11535474 100644 --- a/modules/core/src/test/java/org/apache/ignite/loadtests/direct/session/GridSessionLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/loadtests/direct/session/GridSessionLoadTest.java @@ -59,6 +59,7 @@ private int getThreadCount() { /** * @throws Exception If failed. */ + @Test public void testSessionLoad() throws Exception { final Ignite ignite = G.ignite(getTestIgniteInstanceName()); diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/direct/stealing/GridStealingLoadTest.java b/modules/core/src/test/java/org/apache/ignite/loadtests/direct/stealing/GridStealingLoadTest.java index cbc2ea070462f..fca7577d63579 100644 --- a/modules/core/src/test/java/org/apache/ignite/loadtests/direct/stealing/GridStealingLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/loadtests/direct/stealing/GridStealingLoadTest.java @@ -86,6 +86,7 @@ private int getThreadCount() { /** * @throws Exception If failed. */ + @Test public void testStealingLoad() throws Exception { final Ignite ignite = grid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridHashMapLoadTest.java b/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridHashMapLoadTest.java index 7d4f90e3c93e2..20bd1ce68d6f3 100644 --- a/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridHashMapLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridHashMapLoadTest.java @@ -37,6 +37,7 @@ public class GridHashMapLoadTest extends GridCommonAbstractTest { /** * */ + @Test public void testHashMapLoad() { Map map = new HashMap<>(5 * 1024 * 1024); @@ -53,6 +54,7 @@ public void testHashMapLoad() { /** * */ + @Test public void testConcurrentHashMapLoad() { Map map = new ConcurrentHashMap<>(5 * 1024 * 1024); @@ -69,6 +71,7 @@ public void testConcurrentHashMapLoad() { /** * @throws Exception If failed. */ + @Test public void testMapEntry() throws Exception { Map map = new HashMap<>(5 * 1024 * 1024); diff --git a/modules/core/src/test/java/org/apache/ignite/logger/java/JavaLoggerTest.java b/modules/core/src/test/java/org/apache/ignite/logger/java/JavaLoggerTest.java index d9ec810d32586..286be5e508a00 100644 --- a/modules/core/src/test/java/org/apache/ignite/logger/java/JavaLoggerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/logger/java/JavaLoggerTest.java @@ -36,6 +36,7 @@ public class JavaLoggerTest extends TestCase { /** * @throws Exception If failed. */ + @Test public void testLogInitialize() throws Exception { log = new JavaLogger(); @@ -65,4 +66,4 @@ public void testLogInitialize() throws Exception { // Ensure we don't get pattern, only actual file name is allowed here. assert !log.fileName().contains("%"); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/marshaller/DynamicProxySerializationMultiJvmSelfTest.java b/modules/core/src/test/java/org/apache/ignite/marshaller/DynamicProxySerializationMultiJvmSelfTest.java index cf4213b738a29..28dca068cf91a 100644 --- a/modules/core/src/test/java/org/apache/ignite/marshaller/DynamicProxySerializationMultiJvmSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/marshaller/DynamicProxySerializationMultiJvmSelfTest.java @@ -57,6 +57,7 @@ public class DynamicProxySerializationMultiJvmSelfTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + @Test public void testBinaryMarshaller() throws Exception { marshFactory = new Callable() { @Override public Marshaller call() throws Exception { @@ -70,6 +71,7 @@ public void testBinaryMarshaller() throws Exception { /** * @throws Exception If failed. */ + @Test public void testToBinary() throws Exception { marshFactory = new Callable() { @Override public Marshaller call() throws Exception { @@ -89,6 +91,7 @@ public void testToBinary() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBinaryField() throws Exception { marshFactory = new Callable() { @Override public Marshaller call() throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerAbstractTest.java index 05a8924d6186e..3ac10f26035bd 100644 --- a/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerAbstractTest.java @@ -157,6 +157,7 @@ protected GridMarshallerAbstractTest() { /** * @throws Exception If failed. */ + @Test public void testDefaultCache() throws Exception { IgniteCache cache = grid().cache(DEFAULT_CACHE_NAME); @@ -187,6 +188,7 @@ public void testDefaultCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNamedCache() throws Exception { IgniteCache cache = grid().cache(CACHE_NAME); @@ -219,6 +221,7 @@ public void testNamedCache() throws Exception { * * @throws Exception If test failed. */ + @Test public void testMarshalling() throws Exception { GridMarshallerTestBean inBean = newTestBean(new Object()); @@ -246,6 +249,7 @@ public void testMarshalling() throws Exception { * * @throws Exception If test failed. */ + @Test public void testMarshallingAnonymousClassInstance() throws Exception { final Ignite g = grid(); @@ -283,6 +287,7 @@ public void testMarshallingAnonymousClassInstance() throws Exception { * * @throws Exception If test failed. */ + @Test public void testMarshallingLocalClassInstance() throws Exception { /** * Local class. @@ -320,6 +325,7 @@ class LocalRunnable implements Runnable, Serializable { * * @throws Exception If test failed. */ + @Test public void testMarshallingNestedClassInstance() throws Exception { GridMarshallerTestBean inBean = newTestBean(new NestedClass()); @@ -347,6 +353,7 @@ public void testMarshallingNestedClassInstance() throws Exception { * * @throws Exception If test failed. */ + @Test public void testMarshallingStaticNestedClassInstance() throws Exception { GridMarshallerTestBean inBean = newTestBean(new StaticNestedClass()); @@ -374,6 +381,7 @@ public void testMarshallingStaticNestedClassInstance() throws Exception { * * @throws Exception If test failed. */ + @Test public void testMarshallingNullObject() throws Exception { GridMarshallerTestBean inBean = newTestBean(null); @@ -397,6 +405,7 @@ public void testMarshallingNullObject() throws Exception { * @throws IgniteCheckedException If marshalling failed. */ @SuppressWarnings({"ZeroLengthArrayAllocation"}) + @Test public void testMarshallingArrayOfPrimitives() throws IgniteCheckedException { char[] inChars = "vasya".toCharArray(); @@ -429,6 +438,7 @@ public void testMarshallingArrayOfPrimitives() throws IgniteCheckedException { * * @throws Exception If test failed. */ + @Test public void testExternalClassesMarshalling() throws Exception { ClassLoader tstClsLdr = new GridTestClassLoader( Collections.singletonMap("org/apache/ignite/p2p/p2p.properties", "resource=loaded"), @@ -452,6 +462,7 @@ public void testExternalClassesMarshalling() throws Exception { * * @throws Exception If test failed. */ + @Test public void testGridKernalMarshalling() throws Exception { GridMarshallerTestBean inBean = newTestBean(grid()); @@ -477,6 +488,7 @@ public void testGridKernalMarshalling() throws Exception { * * @throws Exception If test failed. */ + @Test public void testSubgridMarshalling() throws Exception { final Ignite ignite = grid(); @@ -507,6 +519,7 @@ public void testSubgridMarshalling() throws Exception { * * @throws Exception If test failed. */ + @Test public void testLoggerMarshalling() throws Exception { GridMarshallerTestBean inBean = newTestBean(grid().log()); @@ -532,6 +545,7 @@ public void testLoggerMarshalling() throws Exception { * @throws Exception If test failed. */ @SuppressWarnings("unchecked") + @Test public void testNodeLocalMarshalling() throws Exception { ConcurrentMap loc = grid().cluster().nodeLocalMap(); @@ -568,6 +582,7 @@ public void testNodeLocalMarshalling() throws Exception { * * @throws Exception If test failed. */ + @Test public void testExecutorServiceMarshalling() throws Exception { ExecutorService inSrvc = grid().executorService(); @@ -599,6 +614,7 @@ public void testExecutorServiceMarshalling() throws Exception { * * @throws Exception If test failed. */ + @Test public void testKernalContext() throws Exception { GridMarshallerTestBean inBean = newTestBean(GridKernalTestUtils.context(grid())); @@ -621,6 +637,7 @@ public void testKernalContext() throws Exception { /** * @throws Exception If failed. */ + @Test public void testScheduler() throws Exception { IgniteScheduler scheduler = grid().scheduler(); @@ -653,6 +670,7 @@ public void testScheduler() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCompute() throws Exception { IgniteConfiguration cfg = optimize(getConfiguration("g1")); @@ -693,6 +711,7 @@ public void testCompute() throws Exception { /** * @throws Exception If failed. */ + @Test public void testEvents() throws Exception { IgniteConfiguration cfg = optimize(getConfiguration("g1")); @@ -735,6 +754,7 @@ public void testEvents() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMessaging() throws Exception { IgniteConfiguration cfg = optimize(getConfiguration("g1")); @@ -771,6 +791,7 @@ public void testMessaging() throws Exception { /** * @throws Exception If failed. */ + @Test public void testServices() throws Exception { IgniteConfiguration cfg = optimize(getConfiguration("g1")); @@ -878,6 +899,7 @@ private static class StaticNestedClass implements Serializable { /** * @throws Exception If failed. */ + @Test public void testReadArray() throws Exception { byte[] arr = new byte[10]; @@ -894,6 +916,7 @@ public void testReadArray() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReadFully() throws Exception { byte[] arr = new byte[10]; @@ -952,4 +975,4 @@ private ReadArrayTestClass(byte[] arr, boolean fully) { in.read(arr); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerMappingConsistencyTest.java b/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerMappingConsistencyTest.java index ba39e366e9f85..2ec1993356767 100644 --- a/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerMappingConsistencyTest.java +++ b/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerMappingConsistencyTest.java @@ -101,6 +101,7 @@ private void clearWorkDir() throws IOException { * * @throws Exception If failed. */ + @Test public void testMappingsPersistedOnJoin() throws Exception { Ignite g1 = startGrid(1); Ignite g2 = startGrid(2); @@ -140,6 +141,7 @@ public void testMappingsPersistedOnJoin() throws Exception { * * @throws Exception If failed. */ + @Test public void testPersistedMappingsSharedOnJoin() throws Exception { Ignite g1 = startGrid(1); startGrid(2); diff --git a/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerPerformanceTest.java b/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerPerformanceTest.java index c4e29c5ddfa9a..31e87b9051e3e 100644 --- a/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerPerformanceTest.java +++ b/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerPerformanceTest.java @@ -64,6 +64,7 @@ public class GridMarshallerPerformanceTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testSerialization() throws Exception { final ByteArrayOutputStream out = new ByteArrayOutputStream(); @@ -112,6 +113,7 @@ public void testSerialization() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGridMarshaller() throws Exception { final GridTuple tuple = new GridTuple<>(); @@ -135,6 +137,7 @@ public void testGridMarshaller() throws Exception { /** * @throws Exception If failed. */ + @Test public void testByteBuffer() throws Exception { final ByteBuffer buf = ByteBuffer.allocate(1024); @@ -160,6 +163,7 @@ public void testByteBuffer() throws Exception { /** * @throws Exception If failed. */ + @Test public void testKryo() throws Exception { final Kryo kryo = new Kryo(); @@ -524,4 +528,4 @@ static TestObject read(ByteBuffer buf) { list.equals(obj.list) && map.equals(obj.map); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerContextSelfTest.java b/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerContextSelfTest.java index da474df82365e..9b96b9948a31f 100644 --- a/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerContextSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerContextSelfTest.java @@ -71,6 +71,7 @@ public class MarshallerContextSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClassName() throws Exception { MarshallerContextImpl marshCtx = new MarshallerContextImpl(null, null); @@ -96,6 +97,7 @@ public void testClassName() throws Exception { * * @throws Exception If failed. */ + @Test public void testMultiplatformMappingsCollecting() throws Exception { String nonJavaClassName = "random.platform.Mapping"; @@ -132,6 +134,7 @@ public void testMultiplatformMappingsCollecting() throws Exception { * * @throws Exception If failed. */ + @Test public void testMultiplatformMappingsDistributing() throws Exception { String nonJavaClassName = "random.platform.Mapping"; @@ -155,6 +158,7 @@ public void testMultiplatformMappingsDistributing() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOnUpdated() throws Exception { File workDir = U.resolveWorkDirectory(U.defaultWorkDirectory(), "marshaller", false); MarshallerContextImpl ctx = new MarshallerContextImpl(null, null); @@ -187,6 +191,7 @@ public void testOnUpdated() throws Exception { * Tests that there is a null value inserted in allCaches list * if platform ids passed to marshaller cache were not sequential (like 0, 2). */ + @Test public void testCacheStructure0() throws Exception { MarshallerContextImpl ctx = new MarshallerContextImpl(null, null); @@ -220,6 +225,7 @@ public void testCacheStructure0() throws Exception { * Tests that there are no null values in allCaches list * if platform ids passed to marshaller context were sequential. */ + @Test public void testCacheStructure1() throws Exception { MarshallerContextImpl ctx = new MarshallerContextImpl(null, null); diff --git a/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerEnumDeadlockMultiJvmTest.java b/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerEnumDeadlockMultiJvmTest.java index 7042c03221d5f..0ce556ed513b6 100644 --- a/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerEnumDeadlockMultiJvmTest.java +++ b/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerEnumDeadlockMultiJvmTest.java @@ -44,6 +44,7 @@ public class MarshallerEnumDeadlockMultiJvmTest extends GridCommonAbstractTest { } /** */ + @Test public void testJdkMarshaller() throws Exception { marshFactory = new JdkMarshallerFactory(); @@ -51,6 +52,7 @@ public void testJdkMarshaller() throws Exception { } /** */ + @Test public void testOptimizedMarshaller() throws Exception { marshFactory = new OptimizedMarshallerFactory(); @@ -58,6 +60,7 @@ public void testOptimizedMarshaller() throws Exception { } /** */ + @Test public void testBinaryMarshaller() throws Exception { marshFactory = new BinaryMarshallerFactory(); diff --git a/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingNoPeerClassLoadingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingNoPeerClassLoadingSelfTest.java index 4338947de5658..56ad98dc5a762 100644 --- a/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingNoPeerClassLoadingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingNoPeerClassLoadingSelfTest.java @@ -52,7 +52,8 @@ public class GridMessagingNoPeerClassLoadingSelfTest extends GridMessagingSelfTe * * @throws Exception If error occurs. */ - @Override public void testSendMessageWithExternalClassLoader() throws Exception { + @Override @Test + public void testSendMessageWithExternalClassLoader() throws Exception { URL[] urls = new URL[] { new URL(GridTestProperties.getProperty("p2p.uri.cls")) }; ClassLoader extLdr = new URLClassLoader(urls); @@ -92,4 +93,4 @@ unmarshal it (peer class loading is disabled.) */ assertFalse(rcvLatch.await(3, TimeUnit.SECONDS)); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingSelfTest.java index 1b8aac661e928..5d567599ff8df 100644 --- a/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingSelfTest.java @@ -213,6 +213,7 @@ public TestMessage() { * * @throws Exception If error occurs. */ + @Test public void testSendReceiveMessage() throws Exception { final Collection rcvMsgs = new GridConcurrentHashSet<>(); @@ -262,6 +263,7 @@ public void testSendReceiveMessage() throws Exception { * @throws Exception If error occurs. */ @SuppressWarnings("TooBroadScope") + @Test public void testStopLocalListen() throws Exception { final AtomicInteger msgCnt1 = new AtomicInteger(); @@ -374,6 +376,7 @@ public void testStopLocalListen() throws Exception { * * @throws Exception If error occurs. */ + @Test public void testSendReceiveMessageWithStringTopic() throws Exception { final Collection rcvMsgs = new GridConcurrentHashSet<>(); @@ -497,6 +500,7 @@ public void testSendReceiveMessageWithStringTopic() throws Exception { * * @throws Exception If error occurs. */ + @Test public void testSendReceiveMessageWithEnumTopic() throws Exception { final Collection rcvMsgs = new GridConcurrentHashSet<>(); @@ -621,6 +625,7 @@ public void testSendReceiveMessageWithEnumTopic() throws Exception { * * @throws Exception If error occurs. */ + @Test public void testRemoteListen() throws Exception { final Collection rcvMsgs = new GridConcurrentHashSet<>(); @@ -658,6 +663,7 @@ public void testRemoteListen() throws Exception { * @throws Exception If failed. */ @SuppressWarnings("TooBroadScope") + @Test public void testStopRemoteListen() throws Exception { final AtomicInteger msgCnt1 = new AtomicInteger(); @@ -751,6 +757,7 @@ public void testStopRemoteListen() throws Exception { * * @throws Exception If error occurs. */ + @Test public void testRemoteListenOrderedMessages() throws Exception { List msgs = Arrays.asList( new TestMessage(MSG_1), @@ -804,6 +811,7 @@ public void testRemoteListenOrderedMessages() throws Exception { * * @throws Exception If error occurs. */ + @Test public void testRemoteListenWithIntTopic() throws Exception { final Collection rcvMsgs = new GridConcurrentHashSet<>(); @@ -943,6 +951,7 @@ public void testRemoteListenWithIntTopic() throws Exception { * * @throws Exception If error occurs. */ + @Test public void testSendMessageWithExternalClassLoader() throws Exception { URL[] urls = new URL[] {new URL(GridTestProperties.getProperty("p2p.uri.cls"))}; @@ -987,6 +996,7 @@ public void testSendMessageWithExternalClassLoader() throws Exception { * * @throws Exception If failed. */ + @Test public void testNullMessages() throws Exception { assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -1024,6 +1034,7 @@ public void testNullMessages() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAsyncOld() throws Exception { final AtomicInteger msgCnt = new AtomicInteger(); @@ -1136,6 +1147,7 @@ public void testAsyncOld() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAsync() throws Exception { final AtomicInteger msgCnt = new AtomicInteger(); @@ -1212,6 +1224,7 @@ public void testAsync() throws Exception { * * @throws Exception If an error occurred. */ + @Test public void testRemoteListenForOldest() throws Exception { remoteListenForOldest(ignite1); diff --git a/modules/core/src/test/java/org/apache/ignite/messaging/IgniteMessagingSendAsyncTest.java b/modules/core/src/test/java/org/apache/ignite/messaging/IgniteMessagingSendAsyncTest.java index d51a5dd7c60e4..eb25d3660b143 100644 --- a/modules/core/src/test/java/org/apache/ignite/messaging/IgniteMessagingSendAsyncTest.java +++ b/modules/core/src/test/java/org/apache/ignite/messaging/IgniteMessagingSendAsyncTest.java @@ -75,6 +75,7 @@ public class IgniteMessagingSendAsyncTest extends GridCommonAbstractTest impleme * * @throws Exception If failed. */ + @Test public void testSendDefaultMode() throws Exception { Ignite ignite1 = startGrid(1); @@ -91,6 +92,7 @@ public void testSendDefaultMode() throws Exception { * * @throws Exception If failed. */ + @Test public void testSendAsyncMode() throws Exception { Ignite ignite1 = startGrid(1); @@ -107,6 +109,7 @@ public void testSendAsyncMode() throws Exception { * * @throws Exception If failed. */ + @Test public void testSendDefaultMode2Nodes() throws Exception { Ignite ignite1 = startGrid(1); Ignite ignite2 = startGrid(2); @@ -124,6 +127,7 @@ public void testSendDefaultMode2Nodes() throws Exception { * * @throws Exception If failed. */ + @Test public void testSendAsyncMode2Node() throws Exception { Ignite ignite1 = startGrid(1); Ignite ignite2 = startGrid(2); @@ -141,6 +145,7 @@ public void testSendAsyncMode2Node() throws Exception { * * @throws Exception If failed. */ + @Test public void testSendOrderedDefaultMode() throws Exception { Ignite ignite1 = startGrid(1); @@ -159,6 +164,7 @@ public void testSendOrderedDefaultMode() throws Exception { * * @throws Exception If failed. */ + @Test public void testSendOrderedDefaultMode2Node() throws Exception { Ignite ignite1 = startGrid(1); Ignite ignite2 = startGrid(2); @@ -176,6 +182,7 @@ public void testSendOrderedDefaultMode2Node() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSendOrderedDefaultModeMultiThreads() throws Exception { Ignite ignite = startGrid(1); @@ -185,6 +192,7 @@ public void testSendOrderedDefaultModeMultiThreads() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSendOrderedDefaultModeMultiThreadsWith2Node() throws Exception { Ignite ignite1 = startGrid(1); Ignite ignite2 = startGrid(2); diff --git a/modules/core/src/test/java/org/apache/ignite/messaging/IgniteMessagingWithClientTest.java b/modules/core/src/test/java/org/apache/ignite/messaging/IgniteMessagingWithClientTest.java index b96728fe822a8..3645828c6eeec 100644 --- a/modules/core/src/test/java/org/apache/ignite/messaging/IgniteMessagingWithClientTest.java +++ b/modules/core/src/test/java/org/apache/ignite/messaging/IgniteMessagingWithClientTest.java @@ -77,6 +77,7 @@ private enum TOPIC { /** * @throws Exception If failed. */ + @Test public void testMessageSendWithClientJoin() throws Exception { startGrid(0); @@ -162,4 +163,4 @@ private static class RemoteListener implements IgniteBiPredicate { return true; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/DeploymentClassLoaderCallableTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/DeploymentClassLoaderCallableTest.java index 9c0e4462f7970..68df5b4a9a29e 100644 --- a/modules/core/src/test/java/org/apache/ignite/p2p/DeploymentClassLoaderCallableTest.java +++ b/modules/core/src/test/java/org/apache/ignite/p2p/DeploymentClassLoaderCallableTest.java @@ -47,6 +47,7 @@ public class DeploymentClassLoaderCallableTest extends GridCommonAbstractTest { /** * @throws Exception if failed. */ + @Test public void testDeploymentFromSecondAndThird() throws Exception { try { startGrid(1); @@ -67,6 +68,7 @@ public void testDeploymentFromSecondAndThird() throws Exception { /** * @throws Exception if failed. */ + @Test public void testDeploymentFromEach() throws Exception { try { final Ignite ignite1 = startGrid(1); @@ -87,6 +89,7 @@ public void testDeploymentFromEach() throws Exception { /** * @throws Exception if failed. */ + @Test public void testDeploymentFromOne() throws Exception { try { startGrid(1); diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/GridMultinodeRedeployContinuousModeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/GridMultinodeRedeployContinuousModeSelfTest.java index 865fff4b2917c..8ae208af48e18 100644 --- a/modules/core/src/test/java/org/apache/ignite/p2p/GridMultinodeRedeployContinuousModeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/p2p/GridMultinodeRedeployContinuousModeSelfTest.java @@ -31,7 +31,8 @@ public class GridMultinodeRedeployContinuousModeSelfTest extends GridAbstractMul * * @throws Throwable if error occur. */ + @Test public void testContinuousMode() throws Throwable { processTest(CONTINUOUS); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/GridMultinodeRedeployIsolatedModeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/GridMultinodeRedeployIsolatedModeSelfTest.java index 25cb8affad57b..d3a3d2f78fbef 100644 --- a/modules/core/src/test/java/org/apache/ignite/p2p/GridMultinodeRedeployIsolatedModeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/p2p/GridMultinodeRedeployIsolatedModeSelfTest.java @@ -31,7 +31,8 @@ public class GridMultinodeRedeployIsolatedModeSelfTest extends GridAbstractMulti * * @throws Throwable if error occur. */ + @Test public void testIsolatedMode() throws Throwable { processTest(ISOLATED); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/GridMultinodeRedeployPrivateModeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/GridMultinodeRedeployPrivateModeSelfTest.java index 708e62d6c71b7..ad74251232039 100644 --- a/modules/core/src/test/java/org/apache/ignite/p2p/GridMultinodeRedeployPrivateModeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/p2p/GridMultinodeRedeployPrivateModeSelfTest.java @@ -31,7 +31,8 @@ public class GridMultinodeRedeployPrivateModeSelfTest extends GridAbstractMultin * * @throws Throwable if error occur. */ + @Test public void testPrivateMode() throws Throwable { processTest(PRIVATE); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/GridMultinodeRedeploySharedModeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/GridMultinodeRedeploySharedModeSelfTest.java index 93df50b54aff8..19c69f18743b5 100644 --- a/modules/core/src/test/java/org/apache/ignite/p2p/GridMultinodeRedeploySharedModeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/p2p/GridMultinodeRedeploySharedModeSelfTest.java @@ -31,7 +31,8 @@ public class GridMultinodeRedeploySharedModeSelfTest extends GridAbstractMultino * * @throws Throwable if error occur. */ + @Test public void testSharedMode() throws Throwable { processTest(SHARED); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PClassLoadingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PClassLoadingSelfTest.java index 1e9358732a288..b902a33224a29 100644 --- a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PClassLoadingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PClassLoadingSelfTest.java @@ -61,6 +61,7 @@ public GridP2PClassLoadingSelfTest() { * @throws Exception If failed. */ @SuppressWarnings({"ConstantConditions"}) + @Test public void testClassLoading() throws Exception { ComputeTask task = (ComputeTask)tstClsLdr.loadClass(GridP2PTestTask.class.getName()).newInstance(); @@ -159,4 +160,4 @@ private static class TestGridNode extends GridMetadataAwareAdapter implements Cl return id().hashCode(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PContinuousDeploymentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PContinuousDeploymentSelfTest.java index 28dab3fe5374b..c8832487c717b 100644 --- a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PContinuousDeploymentSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PContinuousDeploymentSelfTest.java @@ -114,6 +114,7 @@ protected CacheConfiguration cacheConfiguration() throws Exception { * @throws Exception If failed. */ @SuppressWarnings("unchecked") + @Test public void testDeployment() throws Exception { startGridsMultiThreaded(GRID_CNT); @@ -139,6 +140,7 @@ public void testDeployment() throws Exception { * * @throws Exception If failed. */ + @Test public void testServerJoinWithP2PClassDeployedInCluster() throws Exception { startGrids(GRID_CNT); @@ -176,4 +178,4 @@ public void testServerJoinWithP2PClassDeployedInCluster() throws Exception { awaitPartitionMapExchange(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PDifferentClassLoaderSelfTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PDifferentClassLoaderSelfTest.java index bf32060003210..a9656bd8698fa 100644 --- a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PDifferentClassLoaderSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PDifferentClassLoaderSelfTest.java @@ -125,6 +125,7 @@ private void processTest(boolean isSameTask, boolean expectEquals) throws Except * * @throws Exception if error occur. */ + @Test public void testPrivateMode() throws Exception { depMode = DeploymentMode.PRIVATE; @@ -136,6 +137,7 @@ public void testPrivateMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testIsolatedMode() throws Exception { depMode = DeploymentMode.ISOLATED; @@ -147,6 +149,7 @@ public void testIsolatedMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testContinuousMode() throws Exception { depMode = DeploymentMode.CONTINUOUS; @@ -158,6 +161,7 @@ public void testContinuousMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testSharedMode() throws Exception { depMode = DeploymentMode.SHARED; @@ -169,6 +173,7 @@ public void testSharedMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testRedeployPrivateMode() throws Exception { depMode = DeploymentMode.PRIVATE; @@ -180,6 +185,7 @@ public void testRedeployPrivateMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testRedeployIsolatedMode() throws Exception { depMode = DeploymentMode.ISOLATED; @@ -191,6 +197,7 @@ public void testRedeployIsolatedMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testRedeployContinuousMode() throws Exception { depMode = DeploymentMode.CONTINUOUS; @@ -202,6 +209,7 @@ public void testRedeployContinuousMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testRedeploySharedMode() throws Exception { depMode = DeploymentMode.SHARED; @@ -221,4 +229,4 @@ private boolean isNotSame(int[] m1, int[] m2) { return m1[0] != m2[0] && m1[1] != m2[1]; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PDoubleDeploymentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PDoubleDeploymentSelfTest.java index f384090da289a..bca2bd2d681e5 100644 --- a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PDoubleDeploymentSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PDoubleDeploymentSelfTest.java @@ -114,6 +114,7 @@ private void processTestBothNodesDeploy(DeploymentMode depMode) throws Exception /** * @throws Exception if error occur. */ + @Test public void testPrivateMode() throws Exception { processTestBothNodesDeploy(DeploymentMode.PRIVATE); } @@ -121,6 +122,7 @@ public void testPrivateMode() throws Exception { /** * @throws Exception if error occur. */ + @Test public void testIsolatedMode() throws Exception { processTestBothNodesDeploy(DeploymentMode.ISOLATED); } @@ -128,6 +130,7 @@ public void testIsolatedMode() throws Exception { /** * @throws Exception if error occur. */ + @Test public void testContinuousMode() throws Exception { processTestBothNodesDeploy(DeploymentMode.CONTINUOUS); } @@ -135,7 +138,8 @@ public void testContinuousMode() throws Exception { /** * @throws Exception if error occur. */ + @Test public void testSharedMode() throws Exception { processTestBothNodesDeploy(DeploymentMode.SHARED); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PHotRedeploymentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PHotRedeploymentSelfTest.java index 6b06d437d22c2..063a73a8ab8bf 100644 --- a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PHotRedeploymentSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PHotRedeploymentSelfTest.java @@ -164,6 +164,7 @@ private void processTestClassLoaderHotRedeployment(DeploymentMode depMode) throw * * @throws Exception if error occur. */ + @Test public void testSameClassLoaderIsolatedMode() throws Exception { processTestHotRedeployment(DeploymentMode.PRIVATE); } @@ -173,6 +174,7 @@ public void testSameClassLoaderIsolatedMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testSameClassLoaderIsolatedClassLoaderMode() throws Exception { processTestHotRedeployment(DeploymentMode.ISOLATED); } @@ -182,6 +184,7 @@ public void testSameClassLoaderIsolatedClassLoaderMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testSameClassLoaderContinuousMode() throws Exception { processTestHotRedeployment(DeploymentMode.CONTINUOUS); } @@ -191,6 +194,7 @@ public void testSameClassLoaderContinuousMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testSameClassLoaderSharedMode() throws Exception { processTestHotRedeployment(DeploymentMode.SHARED); } @@ -200,6 +204,7 @@ public void testSameClassLoaderSharedMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testNewClassLoaderHotRedeploymentPrivateMode() throws Exception { processTestClassLoaderHotRedeployment(DeploymentMode.PRIVATE); } @@ -209,6 +214,7 @@ public void testNewClassLoaderHotRedeploymentPrivateMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testNewClassLoaderHotRedeploymentIsolatedMode() throws Exception { processTestClassLoaderHotRedeployment(DeploymentMode.ISOLATED); } @@ -218,6 +224,7 @@ public void testNewClassLoaderHotRedeploymentIsolatedMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testNewClassLoaderHotRedeploymentContinuousMode() throws Exception { processTestClassLoaderHotRedeployment(DeploymentMode.CONTINUOUS); } @@ -227,7 +234,8 @@ public void testNewClassLoaderHotRedeploymentContinuousMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testNewClassLoaderHotRedeploymentSharedMode() throws Exception { processTestClassLoaderHotRedeployment(DeploymentMode.SHARED); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PJobClassLoaderSelfTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PJobClassLoaderSelfTest.java index 0120a31e066a2..a74e8b25a2386 100644 --- a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PJobClassLoaderSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PJobClassLoaderSelfTest.java @@ -74,6 +74,7 @@ private void processTest(DeploymentMode depMode) throws Exception { * * @throws Exception if error occur. */ + @Test public void testPrivateMode() throws Exception { processTest(DeploymentMode.PRIVATE); } @@ -83,6 +84,7 @@ public void testPrivateMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testIsolatedMode() throws Exception { processTest(DeploymentMode.ISOLATED); } @@ -92,6 +94,7 @@ public void testIsolatedMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testContinuousMode() throws Exception { processTest(DeploymentMode.CONTINUOUS); } @@ -101,6 +104,7 @@ public void testContinuousMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testSharedMode() throws Exception { processTest(DeploymentMode.SHARED); } @@ -144,4 +148,4 @@ public Serializable execute() { return null; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PLocalDeploymentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PLocalDeploymentSelfTest.java index ca2aeb6df3e30..e8f2f02de6e05 100644 --- a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PLocalDeploymentSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PLocalDeploymentSelfTest.java @@ -105,6 +105,7 @@ private void processSharedModeTest(DeploymentMode depMode) throws Exception { * @throws Exception if error occur. */ @SuppressWarnings({"unchecked"}) + @Test public void testLocalDeployment() throws Exception { depMode = DeploymentMode.PRIVATE; @@ -182,6 +183,7 @@ private void processIsolatedModeTest(DeploymentMode depMode) throws Exception { * * @throws Exception if error occur. */ + @Test public void testPrivateMode() throws Exception { processIsolatedModeTest(DeploymentMode.PRIVATE); } @@ -191,6 +193,7 @@ public void testPrivateMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testIsolatedMode() throws Exception { processIsolatedModeTest(DeploymentMode.ISOLATED); } @@ -200,6 +203,7 @@ public void testIsolatedMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testContinuousMode() throws Exception { processSharedModeTest(DeploymentMode.CONTINUOUS); } @@ -209,6 +213,7 @@ public void testContinuousMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testSharedMode() throws Exception { processSharedModeTest(DeploymentMode.SHARED); } @@ -216,6 +221,7 @@ public void testSharedMode() throws Exception { /** * Tests concurrent deployment using delegating classloader for the task. */ + @Test public void testConcurrentDeploymentWithDelegatingClassloader() throws Exception { depMode = DeploymentMode.SHARED; @@ -368,4 +374,4 @@ public static class DeployementTestJob extends ComputeJobAdapter { } } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PMissedResourceCacheSizeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PMissedResourceCacheSizeSelfTest.java index a00fbdbc80d45..38e1346a916d6 100644 --- a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PMissedResourceCacheSizeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PMissedResourceCacheSizeSelfTest.java @@ -227,6 +227,7 @@ private void processSize0Test(DeploymentMode depMode) throws Exception { * * @throws Exception if error occur. */ + @Test public void testSize0PrivateMode() throws Exception { processSize0Test(DeploymentMode.PRIVATE); } @@ -236,6 +237,7 @@ public void testSize0PrivateMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testSize0IsolatedMode() throws Exception { processSize0Test(DeploymentMode.ISOLATED); } @@ -245,6 +247,7 @@ public void testSize0IsolatedMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testSize0ContinuousMode() throws Exception { processSize0Test(DeploymentMode.CONTINUOUS); } @@ -254,6 +257,7 @@ public void testSize0ContinuousMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testSize0SharedMode() throws Exception { processSize0Test(DeploymentMode.SHARED); } @@ -262,6 +266,7 @@ public void testSize0SharedMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testSize2PrivateMode() throws Exception { // processSize2Test(GridDeploymentMode.PRIVATE); } @@ -271,6 +276,7 @@ public void testSize2PrivateMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testSize2IsolatedMode() throws Exception { // processSize2Test(GridDeploymentMode.ISOLATED); } @@ -280,6 +286,7 @@ public void testSize2IsolatedMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testSize2ContinuousMode() throws Exception { // processSize2Test(GridDeploymentMode.CONTINUOUS); } @@ -289,7 +296,8 @@ public void testSize2ContinuousMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testSize2SharedMode() throws Exception { // processSize2Test(GridDeploymentMode.SHARED); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PNodeLeftSelfTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PNodeLeftSelfTest.java index bc0d787dfe3c0..fe1dddd4c53ff 100644 --- a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PNodeLeftSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PNodeLeftSelfTest.java @@ -105,6 +105,7 @@ private void processTest(boolean isExpectUndeploy) throws Exception { * * @throws Exception if error occur. */ + @Test public void testContinuousMode() throws Exception { depMode = DeploymentMode.CONTINUOUS; @@ -116,9 +117,10 @@ public void testContinuousMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testSharedMode() throws Exception { depMode = DeploymentMode.SHARED; processTest(true); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PRecursionTaskSelfTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PRecursionTaskSelfTest.java index a35409d5db825..f15a724894523 100644 --- a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PRecursionTaskSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PRecursionTaskSelfTest.java @@ -85,6 +85,7 @@ private void processTest(DeploymentMode depMode) throws Exception { * * @throws Exception if error occur. */ + @Test public void testPrivateMode() throws Exception { processTest(DeploymentMode.PRIVATE); } @@ -94,6 +95,7 @@ public void testPrivateMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testIsolatedMode() throws Exception { processTest(DeploymentMode.ISOLATED); } @@ -103,6 +105,7 @@ public void testIsolatedMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testContinuousMode() throws Exception { processTest(DeploymentMode.CONTINUOUS); } @@ -112,6 +115,7 @@ public void testContinuousMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testSharedMode() throws Exception { processTest(DeploymentMode.SHARED); } diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PRemoteClassLoadersSelfTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PRemoteClassLoadersSelfTest.java index 623c962dcf2af..34c174781254f 100644 --- a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PRemoteClassLoadersSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PRemoteClassLoadersSelfTest.java @@ -178,6 +178,7 @@ Collections.EMPTY_MAP, getClass().getClassLoader(), * * @throws Exception if error occur. */ + @Test public void testSameClassLoaderPrivateMode() throws Exception { processTestSameRemoteClassLoader(DeploymentMode.PRIVATE); } @@ -187,6 +188,7 @@ public void testSameClassLoaderPrivateMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testSameClassLoaderIsolatedMode() throws Exception { processTestSameRemoteClassLoader(DeploymentMode.ISOLATED); } @@ -196,6 +198,7 @@ public void testSameClassLoaderIsolatedMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testDifferentClassLoaderPrivateMode() throws Exception { processTestDifferentRemoteClassLoader(DeploymentMode.PRIVATE); } @@ -205,6 +208,7 @@ public void testDifferentClassLoaderPrivateMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testDifferentClassLoaderIsolatedMode() throws Exception { processTestDifferentRemoteClassLoader(DeploymentMode.ISOLATED); } @@ -289,4 +293,4 @@ public static class GridP2PRemoteTestTask extends ComputeTaskAdapter 0 : "Result of execution is: " + res + " for more information see GridP2PTestJob"; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PTimeoutSelfTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PTimeoutSelfTest.java index 56aab0eedeb64..1d2e9ab41ea6e 100644 --- a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PTimeoutSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PTimeoutSelfTest.java @@ -138,6 +138,7 @@ private void processFilterTest(DeploymentMode depMode) throws Exception { * * @throws Exception if error occur. */ + @Test public void testPrivateMode() throws Exception { processTest(DeploymentMode.PRIVATE); } @@ -147,6 +148,7 @@ public void testPrivateMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testIsolatedMode() throws Exception { processTest(DeploymentMode.ISOLATED); } @@ -156,6 +158,7 @@ public void testIsolatedMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testContinuousMode() throws Exception { processTest(DeploymentMode.CONTINUOUS); } @@ -165,6 +168,7 @@ public void testContinuousMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testSharedMode() throws Exception { processTest(DeploymentMode.SHARED); } @@ -174,6 +178,7 @@ public void testSharedMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testFilterPrivateMode() throws Exception { processFilterTest(DeploymentMode.PRIVATE); } @@ -183,6 +188,7 @@ public void testFilterPrivateMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testFilterIsolatedMode() throws Exception { processFilterTest(DeploymentMode.ISOLATED); } @@ -192,6 +198,7 @@ public void testFilterIsolatedMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testFilterContinuousMode() throws Exception { processFilterTest(DeploymentMode.CONTINUOUS); } @@ -201,7 +208,8 @@ public void testFilterContinuousMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testFilterSharedMode() throws Exception { processFilterTest(DeploymentMode.SHARED); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PUndeploySelfTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PUndeploySelfTest.java index 4eae06479d5dd..1c89ef0186755 100644 --- a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PUndeploySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PUndeploySelfTest.java @@ -171,6 +171,7 @@ private void processTestUndeployP2PTasks(DeploymentMode depMode) throws Exceptio * * @throws Exception if error occur. */ + @Test public void testUndeployLocalPrivateMode() throws Exception { processTestUndeployLocalTasks(DeploymentMode.PRIVATE); } @@ -180,6 +181,7 @@ public void testUndeployLocalPrivateMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testUndeployLocalIsolatedMode() throws Exception { processTestUndeployLocalTasks(DeploymentMode.ISOLATED); } @@ -189,6 +191,7 @@ public void testUndeployLocalIsolatedMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testUndeployLocalContinuousMode() throws Exception { processTestUndeployLocalTasks(DeploymentMode.CONTINUOUS); } @@ -198,6 +201,7 @@ public void testUndeployLocalContinuousMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testUndeployLocalSharedMode() throws Exception { processTestUndeployLocalTasks(DeploymentMode.SHARED); } @@ -207,6 +211,7 @@ public void testUndeployLocalSharedMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testUndeployP2PPrivateMode() throws Exception { processTestUndeployP2PTasks(DeploymentMode.PRIVATE); } @@ -216,6 +221,7 @@ public void testUndeployP2PPrivateMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testUndeployP2PIsolatedMode() throws Exception { processTestUndeployP2PTasks(DeploymentMode.ISOLATED); } @@ -225,6 +231,7 @@ public void testUndeployP2PIsolatedMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testUndeployP2PContinuousMode() throws Exception { processTestUndeployP2PTasks(DeploymentMode.CONTINUOUS); } @@ -234,7 +241,8 @@ public void testUndeployP2PContinuousMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testUndeployP2PSharedMode() throws Exception { processTestUndeployP2PTasks(DeploymentMode.SHARED); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/P2PScanQueryUndeployTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/P2PScanQueryUndeployTest.java index 73ce917d12cd6..9ca24b7912c96 100644 --- a/modules/core/src/test/java/org/apache/ignite/p2p/P2PScanQueryUndeployTest.java +++ b/modules/core/src/test/java/org/apache/ignite/p2p/P2PScanQueryUndeployTest.java @@ -108,6 +108,7 @@ public class P2PScanQueryUndeployTest extends GridCommonAbstractTest { * * @throws Exception if test failed. */ + @Test public void testAfterClientDisconnect() throws Exception { ClassLoader extClsLdr = new GridTestExternalClassLoader(new URL[] {new URL(GridTestProperties.getProperty("p2p.uri.cls"))}); diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/P2PStreamingClassLoaderTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/P2PStreamingClassLoaderTest.java index a5418132369d7..b1267bc1d4bbf 100644 --- a/modules/core/src/test/java/org/apache/ignite/p2p/P2PStreamingClassLoaderTest.java +++ b/modules/core/src/test/java/org/apache/ignite/p2p/P2PStreamingClassLoaderTest.java @@ -91,6 +91,7 @@ private void processTest() throws Exception { * * @throws Exception if error occur. */ + @Test public void testPrivateMode() throws Exception { depMode = DeploymentMode.PRIVATE; @@ -102,6 +103,7 @@ public void testPrivateMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testContinuousMode() throws Exception { depMode = DeploymentMode.CONTINUOUS; @@ -113,6 +115,7 @@ public void testContinuousMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testSharedMode() throws Exception { depMode = DeploymentMode.SHARED; diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/SharedDeploymentTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/SharedDeploymentTest.java index cc0340e6c2bb8..911cacb6f8111 100644 --- a/modules/core/src/test/java/org/apache/ignite/p2p/SharedDeploymentTest.java +++ b/modules/core/src/test/java/org/apache/ignite/p2p/SharedDeploymentTest.java @@ -50,6 +50,7 @@ public class SharedDeploymentTest extends GridCommonAbstractTest { /** * @throws Exception if failed. */ + @Test public void testDeploymentFromSecondAndThird() throws Exception { try { startGrid(1); diff --git a/modules/core/src/test/java/org/apache/ignite/platform/PlatformDefaultJavaObjectFactorySelfTest.java b/modules/core/src/test/java/org/apache/ignite/platform/PlatformDefaultJavaObjectFactorySelfTest.java index ad935dffd2145..eeff2e1b29207 100644 --- a/modules/core/src/test/java/org/apache/ignite/platform/PlatformDefaultJavaObjectFactorySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/platform/PlatformDefaultJavaObjectFactorySelfTest.java @@ -43,6 +43,7 @@ public class PlatformDefaultJavaObjectFactorySelfTest extends GridCommonAbstract /** * Test normal object creation. */ + @Test public void testNormal() { final PlatformDefaultJavaObjectFactory factory = new PlatformDefaultJavaObjectFactory(); @@ -76,6 +77,7 @@ public void testNormal() { /** * Test object creation with boxed property. */ + @Test public void testBoxedProperty() { final PlatformDefaultJavaObjectFactory factory = new PlatformDefaultJavaObjectFactory(); @@ -89,6 +91,7 @@ public void testBoxedProperty() { /** * Test object creation without properties. */ + @Test public void testNoProperties() { final PlatformDefaultJavaObjectFactory factory = new PlatformDefaultJavaObjectFactory(); @@ -102,6 +105,7 @@ public void testNoProperties() { /** * Test object creation with invalid property name. */ + @Test public void testInvalidPropertyName() { final PlatformDefaultJavaObjectFactory factory = new PlatformDefaultJavaObjectFactory(); @@ -117,6 +121,7 @@ public void testInvalidPropertyName() { /** * Test object creation with invalid property value. */ + @Test public void testInvalidPropertyValue() { final PlatformDefaultJavaObjectFactory factory = new PlatformDefaultJavaObjectFactory(); @@ -132,6 +137,7 @@ public void testInvalidPropertyValue() { /** * Test object creation without default constructor. */ + @Test public void testNoDefaultConstructor() { final PlatformDefaultJavaObjectFactory factory = new PlatformDefaultJavaObjectFactory(); @@ -147,6 +153,7 @@ public void testNoDefaultConstructor() { /** * Test object creation with null class name. */ + @Test public void testNullClassName() { final PlatformDefaultJavaObjectFactory factory = new PlatformDefaultJavaObjectFactory(); @@ -170,6 +177,7 @@ public void testNullClassName() { /** * Test object creation with invalid class name. */ + @Test public void testInvalidClassName() { final PlatformDefaultJavaObjectFactory factory = new PlatformDefaultJavaObjectFactory(); diff --git a/modules/core/src/test/java/org/apache/ignite/platform/PlatformJavaObjectFactoryProxySelfTest.java b/modules/core/src/test/java/org/apache/ignite/platform/PlatformJavaObjectFactoryProxySelfTest.java index 5153d49c1ef9a..9e1ec89da04f0 100644 --- a/modules/core/src/test/java/org/apache/ignite/platform/PlatformJavaObjectFactoryProxySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/platform/PlatformJavaObjectFactoryProxySelfTest.java @@ -63,6 +63,7 @@ public class PlatformJavaObjectFactoryProxySelfTest extends GridCommonAbstractTe /** * Test normal object creation using default factory. */ + @Test public void testDefaultFactoryNormal() { Map props = new HashMap<>(); @@ -95,6 +96,7 @@ public void testDefaultFactoryNormal() { /** * Test normal object creation using custom factory. */ + @Test public void testCustomFactoryNormal() { Map props = new HashMap<>(); @@ -129,6 +131,7 @@ public void testCustomFactoryNormal() { /** * Test object creation with boxed property. */ + @Test public void testCustomFactoryBoxedProperty() { PlatformJavaObjectFactoryProxy proxy = proxyForCustom(NO_DFLT_CTOR_FACTORY_CLS_NAME, Collections.singletonMap("fIntBoxed", (Object)1)); @@ -141,6 +144,7 @@ public void testCustomFactoryBoxedProperty() { /** * Test object creation without properties. */ + @Test public void testCustomFactoryNoProperties() { PlatformJavaObjectFactoryProxy proxy = proxyForCustom(NO_DFLT_CTOR_FACTORY_CLS_NAME, Collections.emptyMap()); @@ -153,6 +157,7 @@ public void testCustomFactoryNoProperties() { /** * Test object creation with invalid property name. */ + @Test public void testCustomFactoryInvalidPropertyName() { final PlatformJavaObjectFactoryProxy proxy = proxyForCustom(NO_DFLT_CTOR_FACTORY_CLS_NAME, Collections.singletonMap("invalid", (Object)1)); @@ -167,6 +172,7 @@ public void testCustomFactoryInvalidPropertyName() { /** * Test object creation with invalid property value. */ + @Test public void testCustomFactoryInvalidPropertyValue() { final PlatformJavaObjectFactoryProxy proxy = proxyForCustom(NO_DFLT_CTOR_FACTORY_CLS_NAME, Collections.singletonMap("fInt", (Object)1L)); @@ -181,6 +187,7 @@ public void testCustomFactoryInvalidPropertyValue() { /** * Test object creation with null class name. */ + @Test public void testCustomFactoryNullClassName() { GridTestUtils.assertThrows(null, new Callable() { @Override public Object call() throws Exception { @@ -198,6 +205,7 @@ public void testCustomFactoryNullClassName() { /** * Test object creation with invalid class name. */ + @Test public void testCustomFactoryInvalidClassName() { GridTestUtils.assertThrows(null, new Callable() { @Override public Object call() throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/plugin/security/SecurityPermissionSetBuilderTest.java b/modules/core/src/test/java/org/apache/ignite/plugin/security/SecurityPermissionSetBuilderTest.java index bf37ae5264b11..dc6776a0c7731 100644 --- a/modules/core/src/test/java/org/apache/ignite/plugin/security/SecurityPermissionSetBuilderTest.java +++ b/modules/core/src/test/java/org/apache/ignite/plugin/security/SecurityPermissionSetBuilderTest.java @@ -47,6 +47,7 @@ public class SecurityPermissionSetBuilderTest extends GridCommonAbstractTest { /** */ @SuppressWarnings({"ThrowableNotThrown"}) + @Test public void testPermissionBuilder() { SecurityBasicPermissionSet exp = new SecurityBasicPermissionSet(); diff --git a/modules/core/src/test/java/org/apache/ignite/services/ServiceThreadPoolSelfTest.java b/modules/core/src/test/java/org/apache/ignite/services/ServiceThreadPoolSelfTest.java index 40efdfaa91d4f..9c2c3a330170e 100644 --- a/modules/core/src/test/java/org/apache/ignite/services/ServiceThreadPoolSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/services/ServiceThreadPoolSelfTest.java @@ -49,6 +49,7 @@ public class ServiceThreadPoolSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testDefaultPoolSize() throws Exception { Ignite ignite = startGrid("grid", new IgniteConfiguration()); @@ -61,6 +62,7 @@ public void testDefaultPoolSize() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInheritedPoolSize() throws Exception { Ignite ignite = startGrid("grid", new IgniteConfiguration().setPublicThreadPoolSize(42)); @@ -73,6 +75,7 @@ public void testInheritedPoolSize() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCustomPoolSize() throws Exception { Ignite ignite = startGrid("grid", new IgniteConfiguration().setServiceThreadPoolSize(42)); @@ -85,6 +88,7 @@ public void testCustomPoolSize() throws Exception { /** * @throws Exception If failed. */ + @Test public void testExecution() throws Exception { startGrid(0); // Server. diff --git a/modules/core/src/test/java/org/apache/ignite/session/GridSessionCancelSiblingsFromFutureSelfTest.java b/modules/core/src/test/java/org/apache/ignite/session/GridSessionCancelSiblingsFromFutureSelfTest.java index 21bd113422689..14a804ee07c05 100644 --- a/modules/core/src/test/java/org/apache/ignite/session/GridSessionCancelSiblingsFromFutureSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/session/GridSessionCancelSiblingsFromFutureSelfTest.java @@ -94,6 +94,7 @@ public GridSessionCancelSiblingsFromFutureSelfTest() { /** * @throws Exception if failed */ + @Test public void testCancelSiblings() throws Exception { refreshInitialData(); @@ -104,6 +105,7 @@ public void testCancelSiblings() throws Exception { /** * @throws Exception if failed */ + @Test public void testMultiThreaded() throws Exception { refreshInitialData(); @@ -283,4 +285,4 @@ private static class GridTaskSessionTestTask extends ComputeTaskSplitAdapter { return results.get(0).getData(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/session/GridSessionJobWaitTaskAttributeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/session/GridSessionJobWaitTaskAttributeSelfTest.java index f93e991a23e8c..a21cb0ee945d2 100644 --- a/modules/core/src/test/java/org/apache/ignite/session/GridSessionJobWaitTaskAttributeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/session/GridSessionJobWaitTaskAttributeSelfTest.java @@ -78,6 +78,7 @@ public GridSessionJobWaitTaskAttributeSelfTest() { /** * @throws Exception if failed. */ + @Test public void testSetAttribute() throws Exception { for (int i = 0; i < EXEC_COUNT; i++) checkTask(i); @@ -86,6 +87,7 @@ public void testSetAttribute() throws Exception { /** * @throws Exception if failed. */ + @Test public void testMultiThreaded() throws Exception { final GridThreadSerialNumber sNum = new GridThreadSerialNumber(); @@ -220,4 +222,4 @@ private static class GridTaskSessionTestTask extends ComputeTaskSplitAdapter getAttributes() { return attrs; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/session/GridSessionSetTaskAttributeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/session/GridSessionSetTaskAttributeSelfTest.java index 497623cf5e783..380943cd3ea47 100644 --- a/modules/core/src/test/java/org/apache/ignite/session/GridSessionSetTaskAttributeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/session/GridSessionSetTaskAttributeSelfTest.java @@ -59,6 +59,7 @@ public GridSessionSetTaskAttributeSelfTest() { /** * @throws Exception if failed. */ + @Test public void testSetAttribute() throws Exception { Ignite ignite = G.ignite(getTestIgniteInstanceName()); @@ -71,6 +72,7 @@ public void testSetAttribute() throws Exception { /** * @throws Exception if failed. */ + @Test public void testMultiThreaded() throws Exception { Ignite ignite = G.ignite(getTestIgniteInstanceName()); @@ -199,4 +201,4 @@ private static class GridTaskSessionTestTask extends ComputeTaskSplitAdapter data = grid().cache(DEFAULT_CACHE_NAME); IgniteCache cp = grid().cache(CP_CACHE); @@ -101,4 +102,4 @@ public void testSecondCachePutRemove() throws Exception { assertEquals("1", cp.get(1)); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/spi/checkpoint/jdbc/JdbcCheckpointSpiConfigSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/checkpoint/jdbc/JdbcCheckpointSpiConfigSelfTest.java index 1affc9cb64ae3..fd13a91acef2b 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/checkpoint/jdbc/JdbcCheckpointSpiConfigSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/checkpoint/jdbc/JdbcCheckpointSpiConfigSelfTest.java @@ -37,6 +37,7 @@ public class JdbcCheckpointSpiConfigSelfTest extends GridSpiAbstractConfigTest()); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/spi/checkpoint/sharedfs/GridSharedFsCheckpointSpiMultiThreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/checkpoint/sharedfs/GridSharedFsCheckpointSpiMultiThreadedSelfTest.java index 85c19bcd6e789..1f991582168b6 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/checkpoint/sharedfs/GridSharedFsCheckpointSpiMultiThreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/checkpoint/sharedfs/GridSharedFsCheckpointSpiMultiThreadedSelfTest.java @@ -65,6 +65,7 @@ public Collection getDirectoryPaths() { * * @throws Exception If failed. */ + @Test public void testSpi() throws Exception { final AtomicInteger writeFinished = new AtomicInteger(); @@ -198,4 +199,4 @@ void deleteFolder(File f) { @Override protected void afterTestsStopped() throws Exception { deleteFolder(new File(U.getIgniteHome(), PATH)); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/spi/checkpoint/sharedfs/GridSharedFsCheckpointSpiMultipleDirectoriesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/checkpoint/sharedfs/GridSharedFsCheckpointSpiMultipleDirectoriesSelfTest.java index 2eea7c16d5dd5..d0ca9b4fd1d2d 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/checkpoint/sharedfs/GridSharedFsCheckpointSpiMultipleDirectoriesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/checkpoint/sharedfs/GridSharedFsCheckpointSpiMultipleDirectoriesSelfTest.java @@ -59,6 +59,7 @@ public Collection getDirectoryPaths() { /** * @throws Exception If failed. */ + @Test public void testMultipleSharedDirectories() throws Exception { String data = "Test check point data."; @@ -117,4 +118,4 @@ public void testMultipleSharedDirectories() throws Exception { assert error : "Check point should not be saved."; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/spi/collision/fifoqueue/GridFifoQueueCollisionSpiConfigSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/collision/fifoqueue/GridFifoQueueCollisionSpiConfigSelfTest.java index 5b5cdb201a6ad..8c49de7621ba8 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/collision/fifoqueue/GridFifoQueueCollisionSpiConfigSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/collision/fifoqueue/GridFifoQueueCollisionSpiConfigSelfTest.java @@ -28,8 +28,9 @@ public class GridFifoQueueCollisionSpiConfigSelfTest extends GridSpiAbstractConf /** * @throws Exception If failed. */ + @Test public void testNegativeConfig() throws Exception { checkNegativeSpiProperty(new FifoQueueCollisionSpi(), "parallelJobsNumber", 0); checkNegativeSpiProperty(new FifoQueueCollisionSpi(), "waitingJobsNumber", -1); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/spi/collision/fifoqueue/GridFifoQueueCollisionSpiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/collision/fifoqueue/GridFifoQueueCollisionSpiSelfTest.java index 1195bcb69e9f1..1a5682868b95b 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/collision/fifoqueue/GridFifoQueueCollisionSpiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/collision/fifoqueue/GridFifoQueueCollisionSpiSelfTest.java @@ -35,6 +35,7 @@ public class GridFifoQueueCollisionSpiSelfTest extends GridSpiAbstractTest waitCtxs = Collections.emptyList(); @@ -162,6 +163,7 @@ public void testSameAttribute() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testEmptyRemoteAttribute() throws Exception { List waitCtxs = Collections.emptyList(); @@ -189,6 +191,7 @@ public void testEmptyRemoteAttribute() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testEmptyLocalAttribute() throws Exception { // Collision SPI does not allow to send more than 1 message in a // certain period of time (see getMessageExpireTime() method). @@ -221,6 +224,7 @@ public void testEmptyLocalAttribute() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testDiffAttribute() throws Exception { List waitCtxs = Collections.emptyList(); @@ -254,6 +258,7 @@ public void testDiffAttribute() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testBothEmptyAttribute() throws Exception { // Collision SPI does not allow to send more than 1 message in a // certain period of time (see getMessageExpireTime() method). @@ -281,6 +286,7 @@ public void testBothEmptyAttribute() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testIsStealingOff() throws Exception { // Collision SPI does not allow to send more than 1 message in a // certain period of time (see getMessageExpireTime() method). @@ -309,6 +315,7 @@ public void testIsStealingOff() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testIsStealingOn() throws Exception { // Collision SPI does not allow to send more than 1 message in a // certain period of time (see getMessageExpireTime() method). @@ -333,4 +340,4 @@ public void testIsStealingOn() throws Exception { // Message should not be sent to remote node because stealing is on assert msg != null; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/spi/collision/jobstealing/GridJobStealingCollisionSpiConfigSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/collision/jobstealing/GridJobStealingCollisionSpiConfigSelfTest.java index 177275451b37b..54e02ffb50a5e 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/collision/jobstealing/GridJobStealingCollisionSpiConfigSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/collision/jobstealing/GridJobStealingCollisionSpiConfigSelfTest.java @@ -28,10 +28,11 @@ public class GridJobStealingCollisionSpiConfigSelfTest extends GridSpiAbstractCo /** * @throws Exception If failed. */ + @Test public void testNegativeConfig() throws Exception { checkNegativeSpiProperty(new JobStealingCollisionSpi(), "messageExpireTime", 0); checkNegativeSpiProperty(new JobStealingCollisionSpi(), "waitJobsThreshold", -1); checkNegativeSpiProperty(new JobStealingCollisionSpi(), "activeJobsThreshold", -1); checkNegativeSpiProperty(new JobStealingCollisionSpi(), "maximumStealingAttempts", 0); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/spi/collision/jobstealing/GridJobStealingCollisionSpiCustomTopologySelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/collision/jobstealing/GridJobStealingCollisionSpiCustomTopologySelfTest.java index 2b88dbb9db807..0a45b273a9d88 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/collision/jobstealing/GridJobStealingCollisionSpiCustomTopologySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/collision/jobstealing/GridJobStealingCollisionSpiCustomTopologySelfTest.java @@ -125,6 +125,7 @@ private void checkNoAction(GridTestCollisionJobContext ctx) { /** * @throws Exception If test failed. */ + @Test public void testThiefNodeNotInTopology() throws Exception { List waitCtxs = new ArrayList<>(2); @@ -177,4 +178,4 @@ private GridTestTaskSession createTaskSession(final ClusterNode node) { } }; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/spi/collision/jobstealing/GridJobStealingCollisionSpiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/collision/jobstealing/GridJobStealingCollisionSpiSelfTest.java index 05e0cee707687..47076ffa0a234 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/collision/jobstealing/GridJobStealingCollisionSpiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/collision/jobstealing/GridJobStealingCollisionSpiSelfTest.java @@ -148,6 +148,7 @@ private void checkNoAction(GridTestCollisionJobContext ctx) { /** * @throws Exception If test failed. */ + @Test public void testTwoPassiveJobs() throws Exception { final List waitCtxs = new ArrayList<>(2); final List activeCtxs = new ArrayList<>(1); @@ -184,6 +185,7 @@ public void testTwoPassiveJobs() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testOnePassiveOneActiveJobs() throws Exception { List waitCtxs = new ArrayList<>(1); @@ -217,6 +219,7 @@ public void testOnePassiveOneActiveJobs() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testMultiplePassiveOneActive() throws Exception { List waitCtxs = new ArrayList<>(2); @@ -254,6 +257,7 @@ public void testMultiplePassiveOneActive() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testMultiplePassiveZeroActive() throws Exception { final List waitCtxs = new ArrayList<>(2); final List activeCtxs = new ArrayList<>(2); @@ -309,6 +313,7 @@ public GridTestTaskSession createTaskSession() { /** * @throws Exception If test failed. */ + @Test public void testOnePassiveZeroActive() throws Exception { List waitCtxs = new ArrayList<>(1); @@ -335,6 +340,7 @@ public void testOnePassiveZeroActive() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testZeroPassiveOneActive() throws Exception { Collection empty = Collections.emptyList(); @@ -362,6 +368,7 @@ public void testZeroPassiveOneActive() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testZeroPassiveZeroActive() throws Exception { Collection empty = Collections.emptyList(); @@ -383,6 +390,7 @@ public void testZeroPassiveZeroActive() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testMaxHopsExceeded() throws Exception { Collection waitCtxs = new ArrayList<>(2); @@ -424,4 +432,4 @@ public void testMaxHopsExceeded() throws Exception { assert msg == null; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/spi/collision/priorityqueue/GridPriorityQueueCollisionSpiConfigSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/collision/priorityqueue/GridPriorityQueueCollisionSpiConfigSelfTest.java index a303da89dd7d9..9f1873f92a66d 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/collision/priorityqueue/GridPriorityQueueCollisionSpiConfigSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/collision/priorityqueue/GridPriorityQueueCollisionSpiConfigSelfTest.java @@ -29,6 +29,7 @@ public class GridPriorityQueueCollisionSpiConfigSelfTest /** * @throws Exception If failed. */ + @Test public void testNegativeConfig() throws Exception { checkNegativeSpiProperty(new PriorityQueueCollisionSpi(), "parallelJobsNumber", 0); checkNegativeSpiProperty(new PriorityQueueCollisionSpi(), "waitingJobsNumber", -1); @@ -36,4 +37,4 @@ public void testNegativeConfig() throws Exception { checkNegativeSpiProperty(new PriorityQueueCollisionSpi(), "priorityAttributeKey", null); checkNegativeSpiProperty(new PriorityQueueCollisionSpi(), "jobPriorityAttributeKey", null); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/spi/collision/priorityqueue/GridPriorityQueueCollisionSpiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/collision/priorityqueue/GridPriorityQueueCollisionSpiSelfTest.java index 6ecf5cf715be0..158ac0d0e816d 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/collision/priorityqueue/GridPriorityQueueCollisionSpiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/collision/priorityqueue/GridPriorityQueueCollisionSpiSelfTest.java @@ -49,6 +49,7 @@ public class GridPriorityQueueCollisionSpiSelfTest extends GridSpiAbstractTest

    activeJobs = makeContextList(null); List passiveJobs = makeContextList(null); @@ -115,6 +117,7 @@ public void testCollision() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCollision0() throws Exception { List activeJobs = makeContextList(null); List passiveJobs = makeContextList(null); @@ -137,6 +140,7 @@ public void testCollision0() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCollision1() throws Exception { List activeJobs = makeContextList(null); List passiveJobs = makeContextList(null); @@ -175,6 +179,7 @@ public void testCollision1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCollision2() throws Exception { List activeJobs = makeContextList(null); List passiveJobs = makeContextList(null); @@ -197,6 +202,7 @@ public void testCollision2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCollision3() throws Exception { List activeJobs = makeContextList(null); List passiveJobs = makeContextList(null); @@ -219,6 +225,7 @@ public void testCollision3() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCollisionEmpty() throws Exception { Collection activeJobs = new ArrayList<>(); Collection passiveJobs = new ArrayList<>(); @@ -232,6 +239,7 @@ public void testCollisionEmpty() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCollisionWithoutPriorityAttribute() throws Exception { List activeJobs = makeContextList(null); List passiveJobs = makeContextList(null); @@ -278,6 +286,7 @@ public void testCollisionWithoutPriorityAttribute() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCollisionWithWrongPriorityAttribute() throws Exception { List activeJobs = makeContextList(null); List passiveJobs = makeContextList(null); @@ -334,6 +343,7 @@ public void testCollisionWithWrongPriorityAttribute() throws Exception { * @throws Exception If failed. */ @SuppressWarnings({"TooBroadScope"}) + @Test public void testCollision4() throws Exception { List activeJobs = makeContextList(null, false); List passiveJobs = makeContextList(null, false); @@ -379,6 +389,7 @@ public void testCollision4() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCollision5() throws Exception { List activeJobs = makeContextList(null, false); List passiveJobs = makeContextList(null, false); @@ -438,4 +449,4 @@ private List makeContextList(@Nullable String attrKey, bool private List makeContextList(@Nullable String attrKey) { return makeContextList(attrKey, true); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/GridAbstractCommunicationSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/GridAbstractCommunicationSelfTest.java index cec63dfd6b69d..dee8d3c6538c8 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/GridAbstractCommunicationSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/GridAbstractCommunicationSelfTest.java @@ -151,6 +151,7 @@ protected GridAbstractCommunicationSelfTest() { /** * @throws Exception If failed. */ + @Test public void testSendToOneNode() throws Exception { info(">>> Starting send to one node test. <<<"); @@ -193,6 +194,7 @@ public void testSendToOneNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSendToManyNodes() throws Exception { msgDestMap.clear(); @@ -377,4 +379,4 @@ private void startSpis() throws Exception { for (IgniteTestResources rsrcs : spiRsrcs) rsrcs.stopThreads(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/GridCacheMessageSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/GridCacheMessageSelfTest.java index 8ddfd440b7ac7..a2eca3053f980 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/GridCacheMessageSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/GridCacheMessageSelfTest.java @@ -137,6 +137,7 @@ public class GridCacheMessageSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testSendMessage() throws Exception { try { startGridsMultiThreaded(2); @@ -151,6 +152,7 @@ public void testSendMessage() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSendBadMessage() throws Exception { try { startGrids(2); diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridCacheDhtLockBackupSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridCacheDhtLockBackupSelfTest.java index ee1f180c9013e..9ab76774caf8f 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridCacheDhtLockBackupSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridCacheDhtLockBackupSelfTest.java @@ -102,6 +102,7 @@ protected CacheConfiguration cacheConfiguration() { /** * @throws Exception If test failed. */ + @Test public void testLock() throws Exception { final int kv = 1; diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiAbstractTest.java index e89a4c828fb75..d6ada9a334992 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiAbstractTest.java @@ -82,7 +82,8 @@ protected GridTcpCommunicationSpiAbstractTest(boolean useShmem) { } /** {@inheritDoc} */ - @Override public void testSendToManyNodes() throws Exception { + @Override @Test + public void testSendToManyNodes() throws Exception { super.testSendToManyNodes(); // Test idle clients remove. @@ -98,6 +99,7 @@ protected GridTcpCommunicationSpiAbstractTest(boolean useShmem) { /** * */ + @Test public void testCheckConnection1() { for (int i = 0; i < 100; i++) { for (Map.Entry> entry : spis.entrySet()) { @@ -120,6 +122,7 @@ public void testCheckConnection1() { /** * @throws Exception If failed. */ + @Test public void testCheckConnection2() throws Exception { final int THREADS = spis.size(); @@ -193,4 +196,4 @@ public void testCheckConnection2() throws Exception { fail("Failed to wait when clients are closed."); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiConcurrentConnectSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiConcurrentConnectSelfTest.java index 901301677975c..cf5c9b6925c3e 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiConcurrentConnectSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiConcurrentConnectSelfTest.java @@ -160,6 +160,7 @@ private static class MessageListener implements CommunicationListener { /** * @throws Exception If failed. */ + @Test public void testTwoThreads() throws Exception { concurrentConnect(2, 10, ITERS, false, false); } @@ -167,6 +168,7 @@ public void testTwoThreads() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultithreaded() throws Exception { int threads = Runtime.getRuntime().availableProcessors() * 5; @@ -176,6 +178,7 @@ public void testMultithreaded() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultithreaded_10Connections() throws Exception { connectionsPerNode = 10; @@ -185,6 +188,7 @@ public void testMultithreaded_10Connections() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultithreaded_NoPairedConnections() throws Exception { pairedConnections = false; @@ -194,6 +198,7 @@ public void testMultithreaded_NoPairedConnections() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultithreaded_10ConnectionsNoPaired() throws Exception { pairedConnections = false; connectionsPerNode = 10; @@ -204,6 +209,7 @@ public void testMultithreaded_10ConnectionsNoPaired() throws Exception { /** * @throws Exception If failed. */ + @Test public void testWithLoad() throws Exception { int threads = Runtime.getRuntime().availableProcessors() * 5; @@ -213,6 +219,7 @@ public void testWithLoad() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRandomSleep() throws Exception { concurrentConnect(4, 1, ITERS, true, false); } diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiConfigSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiConfigSelfTest.java index 7bea716929148..ad5b9e30385fb 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiConfigSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiConfigSelfTest.java @@ -31,6 +31,7 @@ public class GridTcpCommunicationSpiConfigSelfTest extends GridSpiAbstractConfig /** * @throws Exception If failed. */ + @Test public void testNegativeConfig() throws Exception { checkNegativeSpiProperty(new TcpCommunicationSpi(), "localPort", 1023); checkNegativeSpiProperty(new TcpCommunicationSpi(), "localPort", 65636); @@ -55,6 +56,7 @@ public void testNegativeConfig() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLocalPortRange() throws Exception { IgniteConfiguration cfg = getConfiguration(); diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiLanLoadTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiLanLoadTest.java index 0585b3d0941b7..ee89bd6648812 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiLanLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiLanLoadTest.java @@ -138,6 +138,7 @@ public int remoteMessageCount() { /** * @throws Exception If failed. */ + @Test public void testRunReceiver() throws Exception { info(">>> Starting receiving SPI. <<<"); @@ -153,6 +154,7 @@ public void testRunReceiver() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRunSender() throws Exception { reject = true; diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiMultithreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiMultithreadedSelfTest.java index 86a110953e6bc..5f27c3f97b613 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiMultithreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiMultithreadedSelfTest.java @@ -192,6 +192,7 @@ public int remoteMessageCount() { /** * @throws Exception If failed. */ + @Test public void testSendToRandomNodesMultithreaded() throws Exception { info(">>> Starting send to random nodes multithreaded test. <<<"); @@ -277,6 +278,7 @@ public void testSendToRandomNodesMultithreaded() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFlowSend() throws Exception { reject = true; @@ -387,6 +389,7 @@ public void testFlowSend() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPassThroughPerformance() throws Exception { reject = true; diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoveryAckSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoveryAckSelfTest.java index 16ad2c8673bc7..a81be67a346e3 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoveryAckSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoveryAckSelfTest.java @@ -121,6 +121,7 @@ private class TestListener implements CommunicationListener { /** * @throws Exception If failed. */ + @Test public void testAckOnIdle() throws Exception { checkAck(10, 2000, 9); } @@ -128,6 +129,7 @@ public void testAckOnIdle() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAckOnCount() throws Exception { checkAck(10, 60_000, 10); } @@ -238,6 +240,7 @@ private void checkAck(int ackCnt, int idleTimeout, int msgPerIter) throws Except /** * @throws Exception If failed. */ + @Test public void testQueueOverflow() throws Exception { for (int i = 0; i < 3; i++) { try { @@ -498,4 +501,4 @@ private void stopSpis() throws Exception { nodes.clear(); spiRsrcs.clear(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoveryFailureDetectionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoveryFailureDetectionSelfTest.java index b1aa11902ca10..e8c9c22002df6 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoveryFailureDetectionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoveryFailureDetectionSelfTest.java @@ -46,10 +46,11 @@ public class GridTcpCommunicationSpiRecoveryFailureDetectionSelfTest extends Gri /** * @throws Exception if failed. */ + @Test public void testFailureDetectionEnabled() throws Exception { for (TcpCommunicationSpi spi: spis) { assertTrue(spi.failureDetectionTimeoutEnabled()); assertTrue(spi.failureDetectionTimeout() == IgniteConfiguration.DFLT_FAILURE_DETECTION_TIMEOUT); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoverySelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoverySelfTest.java index 27f7fa3e35e95..96f482f3cd22b 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoverySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoverySelfTest.java @@ -197,6 +197,7 @@ protected long awaitForSocketWriteTimeout() { /** * @throws Exception If failed. */ + @Test public void testBlockListener() throws Exception { // Test listener throws exception and stops selector thread, so must restart SPI. for (int i = 0; i < ITERS; i++) { @@ -285,6 +286,7 @@ private void checkBlockListener() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBlockRead1() throws Exception { createSpis(); @@ -403,6 +405,7 @@ public void testBlockRead1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBlockRead2() throws Exception { createSpis(); @@ -538,6 +541,7 @@ public void testBlockRead2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBlockRead3() throws Exception { createSpis(); diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiTcpFailureDetectionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiTcpFailureDetectionSelfTest.java index 17601717caf55..d9cf75f7a8137 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiTcpFailureDetectionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiTcpFailureDetectionSelfTest.java @@ -63,6 +63,7 @@ public class GridTcpCommunicationSpiTcpFailureDetectionSelfTest extends GridTcpC /** * @throws Exception if failed. */ + @Test public void testFailureDetectionEnabled() throws Exception { assertTrue(spis[0].failureDetectionTimeoutEnabled()); assertTrue(spis[0].failureDetectionTimeout() == IgniteConfiguration.DFLT_FAILURE_DETECTION_TIMEOUT); @@ -72,4 +73,4 @@ public void testFailureDetectionEnabled() throws Exception { assertEquals(0, spis[i].failureDetectionTimeout()); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/IgniteTcpCommunicationRecoveryAckClosureSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/IgniteTcpCommunicationRecoveryAckClosureSelfTest.java index 5bee7563d9a58..aba130dabfa95 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/IgniteTcpCommunicationRecoveryAckClosureSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/IgniteTcpCommunicationRecoveryAckClosureSelfTest.java @@ -123,6 +123,7 @@ private class TestListener implements CommunicationListener { /** * @throws Exception If failed. */ + @Test public void testAckOnIdle() throws Exception { checkAck(10, 2000, 9); } @@ -130,6 +131,7 @@ public void testAckOnIdle() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAckOnCount() throws Exception { checkAck(10, 60_000, 10); } @@ -257,6 +259,7 @@ private void checkAck(int ackCnt, int idleTimeout, int msgPerIter) throws Except /** * @throws Exception If failed. */ + @Test public void testQueueOverflow() throws Exception { for (int i = 0; i < 3; i++) { try { @@ -549,4 +552,4 @@ private void stopSpis() throws Exception { nodes.clear(); spiRsrcs.clear(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiDropNodesTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiDropNodesTest.java index 08cf1f7305f66..b7cb7546b6d73 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiDropNodesTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiDropNodesTest.java @@ -111,6 +111,7 @@ public class TcpCommunicationSpiDropNodesTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testOneNode() throws Exception { pred = new IgniteBiPredicate() { @Override public boolean apply(ClusterNode locNode, ClusterNode rmtNode) { @@ -187,6 +188,7 @@ public boolean apply(Event event) { /** * @throws Exception If failed. */ + @Test public void testTwoNodesEachOther() throws Exception { pred = new IgniteBiPredicate() { @Override public boolean apply(ClusterNode locNode, ClusterNode rmtNode) { diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiFaultyClientTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiFaultyClientTest.java index 505d7a5116860..8901ae879eba5 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiFaultyClientTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiFaultyClientTest.java @@ -122,6 +122,7 @@ public class TcpCommunicationSpiFaultyClientTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testNoServerOnHost() throws Exception { testFailClient(null); } @@ -129,6 +130,7 @@ public void testNoServerOnHost() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNotAcceptedConnection() throws Exception { testFailClient(new FakeServer()); } diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiHalfOpenedConnectionTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiHalfOpenedConnectionTest.java index 3e10f942c4459..6681ee4155748 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiHalfOpenedConnectionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiHalfOpenedConnectionTest.java @@ -66,6 +66,7 @@ public class TcpCommunicationSpiHalfOpenedConnectionTest extends GridCommonAbstr /** * @throws Exception If failed. */ + @Test public void testReconnect() throws Exception { pairedConnections = false; @@ -75,6 +76,7 @@ public void testReconnect() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReconnectPaired() throws Exception { pairedConnections = true; diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiSkipMessageSendTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiSkipMessageSendTest.java index 2c17f957e27fb..0be4b3c855b63 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiSkipMessageSendTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiSkipMessageSendTest.java @@ -105,6 +105,7 @@ public class TcpCommunicationSpiSkipMessageSendTest extends GridCommonAbstractTe /** * @throws Exception If failed. */ + @Test public void testClientSegmented() throws Exception { startGrid("server"); diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationStatisticsTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationStatisticsTest.java index b2c6cbb4d0e1c..2288d5f335a5e 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationStatisticsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationStatisticsTest.java @@ -134,6 +134,7 @@ private TcpCommunicationSpiMBean mbean(int nodeIdx) throws MalformedObjectNameEx * @throws Exception If failed. */ @SuppressWarnings("ConstantConditions") + @Test public void testStatistics() throws Exception { startGrids(2); diff --git a/modules/core/src/test/java/org/apache/ignite/spi/deployment/local/GridLocalDeploymentSpiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/deployment/local/GridLocalDeploymentSpiSelfTest.java index 14833640606de..1a0702780b2b0 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/deployment/local/GridLocalDeploymentSpiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/deployment/local/GridLocalDeploymentSpiSelfTest.java @@ -87,6 +87,7 @@ private void checkUndeployed(Class> taskCls) { * @throws Exception If failed. */ @SuppressWarnings({"TooBroadScope"}) + @Test public void testDeploy() throws Exception { String taskName = "GridDeploymentTestTask"; @@ -114,6 +115,7 @@ public void testDeploy() throws Exception { * @throws Exception If failed. */ @SuppressWarnings({"TooBroadScope"}) + @Test public void testRedeploy() throws Exception { String taskName = "GridDeploymentTestTask"; diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoveryRandomStartStopTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoveryRandomStartStopTest.java index 27cffe976b6bf..93065e1d52e49 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoveryRandomStartStopTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoveryRandomStartStopTest.java @@ -151,6 +151,7 @@ private class Waiter extends Thread { * @throws Exception If failed. */ @SuppressWarnings({"BusyWait"}) + @Test public void testDiscovery() throws Exception { Random rand = new Random(); @@ -214,4 +215,4 @@ private void toggleState() throws Exception { return attrs; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoverySelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoverySelfTest.java index c21e52d32e246..234197686f728 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoverySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoverySelfTest.java @@ -90,6 +90,7 @@ protected AbstractDiscoverySelfTest() { * @throws Exception If failed. */ @SuppressWarnings({"UnconditionalWait"}) + @Test public void testDiscovery() throws Exception { assert spis.size() > 1; assert spiStartTime > 0; @@ -179,6 +180,7 @@ public boolean isMetricsUpdated() { * @throws Exception If failed. */ @SuppressWarnings({"UnconditionalWait"}) + @Test public void testMetrics() throws Exception { Collection listeners = new ArrayList<>(); @@ -231,6 +233,7 @@ public void testMetrics() throws Exception { * * @throws Exception If test failed. */ + @Test public void testLocalMetricsUpdate() throws Exception { AtomicInteger[] locUpdCnts = new AtomicInteger[getSpiCount()]; @@ -290,6 +293,7 @@ private boolean isContainsNodeId(Iterable nodes, UUID nodeId) { /** * Checks that physical address of local node is equal to local.ip property. */ + @Test public void testLocalNode() { for (DiscoverySpi spi : spis) { ClusterNode loc = spi.getLocalNode(); @@ -303,6 +307,7 @@ public void testLocalNode() { /** * Check that "test.node.prop" is present on all nodes. */ + @Test public void testNodeAttributes() { for (DiscoverySpi spi : spis) { assert !spi.getRemoteNodes().isEmpty() : "No remote nodes found in Spi."; @@ -338,6 +343,7 @@ else if (!"true".equals(attr)) { /** * Checks that each spi can pings all other. */ + @Test public void testPing() { for (DiscoverySpi spi : spis) { for (IgniteTestResources rscrs : spiRsrcs) { @@ -356,6 +362,7 @@ public void testPing() { * * @throws Exception If failed. */ + @Test public void testNodeSerialize() throws Exception { for (DiscoverySpi spi : spis) { ClusterNode node = spi.getLocalNode(); @@ -553,4 +560,4 @@ private static class NullOutputStream extends OutputStream { // No-op } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoveryTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoveryTest.java index 352ebe6a89159..1e39f26cc5859 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoveryTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoveryTest.java @@ -125,6 +125,7 @@ private class DiscoveryListener implements GridLocalEventListener { /** * @throws Exception If failed. */ + @Test public void testDiscovery() throws Exception { GridLocalEventListener discoLsnr = new DiscoveryListener(); @@ -152,4 +153,4 @@ public void testDiscovery() throws Exception { return attrs; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/AuthenticationRestartTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/AuthenticationRestartTest.java index cf1836ad0af75..cbb53a2939a98 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/AuthenticationRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/AuthenticationRestartTest.java @@ -62,6 +62,7 @@ public class AuthenticationRestartTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClientReconnect() throws Exception { stopGrid("server"); diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/ClusterMetricsSnapshotSerializeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/ClusterMetricsSnapshotSerializeSelfTest.java index 25de2c74b1d3b..a9765212536f7 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/ClusterMetricsSnapshotSerializeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/ClusterMetricsSnapshotSerializeSelfTest.java @@ -47,6 +47,7 @@ public ClusterMetricsSnapshotSerializeSelfTest() { } /** */ + @Test public void testMetricsSize() { byte[] data = new byte[ClusterMetricsSnapshot.METRICS_SIZE]; @@ -62,6 +63,7 @@ public void testMetricsSize() { } /** */ + @Test public void testSerialization() { byte[] data = new byte[ClusterMetricsSnapshot.METRICS_SIZE]; @@ -83,6 +85,7 @@ public void testSerialization() { /** * Checks compatibility with old serialized metrics. */ + @Test public void testMetricsCompatibility() { ClusterMetrics metrics = ClusterMetricsSnapshot.deserialize(METRICS_V1, 0); diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/FilterDataForClientNodeDiscoveryTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/FilterDataForClientNodeDiscoveryTest.java index 9a45d2d68d5be..2b6ea0266c649 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/FilterDataForClientNodeDiscoveryTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/FilterDataForClientNodeDiscoveryTest.java @@ -56,6 +56,7 @@ public class FilterDataForClientNodeDiscoveryTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testDataBag() throws Exception { startGrid(configuration(0, false)); startGrid(configuration(1, false)); @@ -73,6 +74,7 @@ public void testDataBag() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDiscoveryServerOnlyCustomMessage() throws Exception { startGrid(configuration(0, false)); startGrid(configuration(1, false)); @@ -216,4 +218,4 @@ private static class MessageForServer implements DiscoveryServerOnlyCustomMessag return null; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/IgniteDiscoveryCacheReuseSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/IgniteDiscoveryCacheReuseSelfTest.java index 75bcbb1db73ef..75d33488acb2b 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/IgniteDiscoveryCacheReuseSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/IgniteDiscoveryCacheReuseSelfTest.java @@ -60,6 +60,7 @@ public class IgniteDiscoveryCacheReuseSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testDiscoCacheReuseOnNodeJoin() throws Exception { startGridsMultiThreaded(2); @@ -109,4 +110,4 @@ private void assertDiscoCacheReuse(AffinityTopologyVersion v1, AffinityTopologyV assertEquals("Discovery caches are not equal", alives1, alives2); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/LongClientConnectToClusterTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/LongClientConnectToClusterTest.java index a079926cff7ca..5f71d36086a48 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/LongClientConnectToClusterTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/LongClientConnectToClusterTest.java @@ -83,6 +83,7 @@ public class LongClientConnectToClusterTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testClientConnectToCluster() throws Exception { clientMetricsUpdateCnt = 0; diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/DiscoveryUnmarshalVulnerabilityTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/DiscoveryUnmarshalVulnerabilityTest.java index 448c9af9223cd..29cf2c468cde7 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/DiscoveryUnmarshalVulnerabilityTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/DiscoveryUnmarshalVulnerabilityTest.java @@ -61,6 +61,7 @@ public class DiscoveryUnmarshalVulnerabilityTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testNoLists() throws Exception { testExploit(true); } @@ -68,6 +69,7 @@ public void testNoLists() throws Exception { /** * @throws Exception If failed. */ + @Test public void testWhiteListIncluded() throws Exception { String path = U.resolveIgnitePath("modules/core/src/test/config/class_list_exploit_included.txt").getPath(); @@ -79,6 +81,7 @@ public void testWhiteListIncluded() throws Exception { /** * @throws Exception If failed. */ + @Test public void testWhiteListExcluded() throws Exception { String path = U.resolveIgnitePath("modules/core/src/test/config/class_list_exploit_excluded.txt").getPath(); @@ -90,6 +93,7 @@ public void testWhiteListExcluded() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBlackListIncluded() throws Exception { String path = U.resolveIgnitePath("modules/core/src/test/config/class_list_exploit_included.txt").getPath(); @@ -101,6 +105,7 @@ public void testBlackListIncluded() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBlackListExcluded() throws Exception { String path = U.resolveIgnitePath("modules/core/src/test/config/class_list_exploit_excluded.txt").getPath(); @@ -112,6 +117,7 @@ public void testBlackListExcluded() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBothListIncluded() throws Exception { String path = U.resolveIgnitePath("modules/core/src/test/config/class_list_exploit_included.txt").getPath(); diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/IgniteClientConnectTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/IgniteClientConnectTest.java index 2ed55a1fcc4df..a5cba43b50e44 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/IgniteClientConnectTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/IgniteClientConnectTest.java @@ -94,6 +94,7 @@ public class IgniteClientConnectTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testClientConnectToBigTopology() throws Exception { Ignite ignite = startGrids(3); @@ -160,4 +161,4 @@ TcpDiscoveryImpl discovery() { return impl; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/IgniteClientReconnectMassiveShutdownTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/IgniteClientReconnectMassiveShutdownTest.java index 6bd2a45343aed..a192a1e9a50b7 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/IgniteClientReconnectMassiveShutdownTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/IgniteClientReconnectMassiveShutdownTest.java @@ -95,6 +95,7 @@ public class IgniteClientReconnectMassiveShutdownTest extends GridCommonAbstract /** * @throws Exception If any error occurs. */ + @Test public void testMassiveServersShutdown1() throws Exception { massiveServersShutdown(StopType.FAIL_EVENT); } @@ -102,6 +103,7 @@ public void testMassiveServersShutdown1() throws Exception { /** * @throws Exception If any error occurs. */ + @Test public void testMassiveServersShutdown2() throws Exception { massiveServersShutdown(StopType.SIMULATE_FAIL); } @@ -109,6 +111,7 @@ public void testMassiveServersShutdown2() throws Exception { /** * @throws Exception If any error occurs. */ + @Test public void testMassiveServersShutdown3() throws Exception { massiveServersShutdown(StopType.CLOSE); } diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoveryMarshallerCheckSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoveryMarshallerCheckSelfTest.java index f14e0b1cf70ce..37ac8446badf6 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoveryMarshallerCheckSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoveryMarshallerCheckSelfTest.java @@ -82,6 +82,7 @@ public class TcpClientDiscoveryMarshallerCheckSelfTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + @Test public void testMarshallerInConsistency() throws Exception { startGrid(0); @@ -101,6 +102,7 @@ public void testMarshallerInConsistency() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInconsistentCompactFooterSingle() throws Exception { clientServerInconsistentConfigFail(false, 1, 1); } @@ -108,6 +110,7 @@ public void testInconsistentCompactFooterSingle() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInconsistentCompactFooterMulti() throws Exception { clientServerInconsistentConfigFail(true, 2, 10); } diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiCoordinatorChangeTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiCoordinatorChangeTest.java index 0939e6323ca4b..7735907cfa70e 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiCoordinatorChangeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiCoordinatorChangeTest.java @@ -44,6 +44,7 @@ public class TcpClientDiscoverySpiCoordinatorChangeTest extends GridCommonAbstra * * @throws Exception If test fails. */ + @Test public void testClientNotFailed() throws Exception { TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiFailureTimeoutSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiFailureTimeoutSelfTest.java index e878b98020d71..d60ff7a73ec50 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiFailureTimeoutSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiFailureTimeoutSelfTest.java @@ -110,6 +110,7 @@ public class TcpClientDiscoverySpiFailureTimeoutSelfTest extends TcpClientDiscov /** * @throws Exception in case of error. */ + @Test public void testFailureDetectionTimeoutEnabled() throws Exception { startServerNodes(1); startClientNodes(1); @@ -130,6 +131,7 @@ public void testFailureDetectionTimeoutEnabled() throws Exception { /** * @throws Exception in case of error. */ + @Test public void testFailureTimeoutWorkabilityAvgTimeout() throws Exception { failureThreshold = 3000; @@ -144,6 +146,7 @@ public void testFailureTimeoutWorkabilityAvgTimeout() throws Exception { /** * @throws Exception in case of error. */ + @Test public void testFailureTimeoutWorkabilitySmallTimeout() throws Exception { failureThreshold = 500; @@ -160,6 +163,7 @@ public void testFailureTimeoutWorkabilitySmallTimeout() throws Exception { * * @throws Exception in case of error. */ + @Test public void testFailureTimeoutServerClient() throws Exception { failureThreshold = 3000; clientFailureDetectionTimeout = 2000; @@ -213,6 +217,7 @@ public void testFailureTimeoutServerClient() throws Exception { * * @throws Exception in case of error. */ + @Test public void testFailureTimeout3Server() throws Exception { failureThreshold = 1000; clientFailureDetectionTimeout = 10000; @@ -319,6 +324,7 @@ private void checkFailureThresholdWorkability() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientReconnectOnCoordinatorRouterFail1() throws Exception { clientReconnectOnCoordinatorRouterFail(1); } @@ -326,6 +332,7 @@ public void testClientReconnectOnCoordinatorRouterFail1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientReconnectOnCoordinatorRouterFail2() throws Exception { clientReconnectOnCoordinatorRouterFail(2); } diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiMulticastTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiMulticastTest.java index e19b121aebdb7..d797bcfeab998 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiMulticastTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiMulticastTest.java @@ -95,6 +95,7 @@ public class TcpClientDiscoverySpiMulticastTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClientStartsFirst() throws Exception { IgniteInternalFuture fut = GridTestUtils.runAsync(new Callable() { @Override public Ignite call() throws Exception { @@ -149,6 +150,7 @@ else if (evt.type() == EVT_CLIENT_NODE_RECONNECTED) { /** * @throws Exception If failed. */ + @Test public void testJoinWithMulticast() throws Exception { joinWithMulticast(); } @@ -156,6 +158,7 @@ public void testJoinWithMulticast() throws Exception { /** * @throws Exception If failed. */ + @Test public void testJoinWithMulticastForceServer() throws Exception { forceSrv = true; @@ -218,4 +221,4 @@ private void assertSpi(Ignite ignite, boolean client) { else assertFalse(addrSnds.isEmpty()); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiSelfTest.java index c85e94e6c3889..a9ae80f38f991 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiSelfTest.java @@ -299,6 +299,7 @@ protected long failureDetectionTimeout() { /** * @throws Exception If failed. */ + @Test public void testJoinTimeout() throws Exception { clientIpFinder = new TcpDiscoveryVmIpFinder(); joinTimeout = 1000; @@ -320,6 +321,7 @@ public void testJoinTimeout() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientToClientPing() throws Exception { startGrid("server-p1"); Ignite c1 = startGrid("client-p1"); @@ -335,6 +337,7 @@ public void testClientToClientPing() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientNodeJoin() throws Exception { startServerNodes(3); startClientNodes(3); @@ -357,6 +360,7 @@ public void testClientNodeJoin() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientNodeLeave() throws Exception { startServerNodes(3); startClientNodes(3); @@ -379,6 +383,7 @@ public void testClientNodeLeave() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientNodeFail() throws Exception { startServerNodes(3); startClientNodes(3); @@ -401,6 +406,7 @@ public void testClientNodeFail() throws Exception { /** * @throws Exception If failed. */ + @Test public void testServerNodeJoin() throws Exception { startServerNodes(3); startClientNodes(3); @@ -423,6 +429,7 @@ public void testServerNodeJoin() throws Exception { /** * @throws Exception If failed. */ + @Test public void testServerNodeLeave() throws Exception { startServerNodes(3); startClientNodes(3); @@ -445,6 +452,7 @@ public void testServerNodeLeave() throws Exception { /** * @throws Exception If failed. */ + @Test public void testServerNodeFail() throws Exception { startServerNodes(3); startClientNodes(3); @@ -469,6 +477,7 @@ public void testServerNodeFail() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPing() throws Exception { startServerNodes(2); startClientNodes(1); @@ -487,6 +496,7 @@ public void testPing() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPingFailedNodeFromClient() throws Exception { startServerNodes(2); startClientNodes(1); @@ -518,6 +528,7 @@ public void testPingFailedNodeFromClient() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPingFailedClientNode() throws Exception { startServerNodes(2); startClientNodes(1); @@ -547,6 +558,7 @@ public void testPingFailedClientNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientReconnectOnRouterFail() throws Exception { clientsPerSrv = 1; @@ -575,6 +587,7 @@ public void testClientReconnectOnRouterFail() throws Exception { * * @throws Exception If failed. */ + @Test public void testClientReconnectOnRouterSuspend() throws Exception { reconnectAfterSuspend(false); } @@ -584,6 +597,7 @@ public void testClientReconnectOnRouterSuspend() throws Exception { * * @throws Exception If failed. */ + @Test public void testClientReconnectOnRouterSuspendTopologyChange() throws Exception { clientFailureDetectionTimeout = 20_000; @@ -665,6 +679,7 @@ private void reconnectAfterSuspend(boolean changeTop) throws Exception { /** * @throws Exception if failed. */ + @Test public void testClientReconnectHistoryMissingOnRouter() throws Exception { clientFailureDetectionTimeout = 60000; netTimeout = 60000; @@ -712,6 +727,7 @@ public void testClientReconnectHistoryMissingOnRouter() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReconnectAfterPause() throws Exception { startServerNodes(2); startClientNodes(1); @@ -740,6 +756,7 @@ public void testReconnectAfterPause() throws Exception { /** * @throws Exception if failed. */ + @Test public void testReconnectAfterMassiveTopologyChange() throws Exception { clientIpFinder = IP_FINDER; @@ -790,6 +807,7 @@ public void testReconnectAfterMassiveTopologyChange() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientReconnectOnNetworkProblem() throws Exception { clientsPerSrv = 1; @@ -815,6 +833,7 @@ public void testClientReconnectOnNetworkProblem() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientReconnectOneServerOneClient() throws Exception { clientsPerSrv = 1; @@ -840,6 +859,7 @@ public void testClientReconnectOneServerOneClient() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientReconnectTopologyChange1() throws Exception { clientFailureDetectionTimeout = 100000; @@ -884,6 +904,7 @@ public void testClientReconnectTopologyChange1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientReconnectTopologyChange2() throws Exception { clientFailureDetectionTimeout = 100000; @@ -928,6 +949,7 @@ public void testClientReconnectTopologyChange2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetMissedMessagesOnReconnect() throws Exception { clientsPerSrv = 1; @@ -965,6 +987,7 @@ public void testGetMissedMessagesOnReconnect() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientSegmentation() throws Exception { clientsPerSrv = 1; @@ -1014,6 +1037,7 @@ public void testClientSegmentation() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientNodeJoinOneServer() throws Exception { startServerNodes(1); @@ -1031,6 +1055,7 @@ public void testClientNodeJoinOneServer() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientNodeLeaveOneServer() throws Exception { startServerNodes(1); startClientNodes(1); @@ -1053,6 +1078,7 @@ public void testClientNodeLeaveOneServer() throws Exception { * * @throws Exception If failed. */ + @Test public void testClientNodeFailOneServer() throws Exception { startServerNodes(1); startClientNodes(1); @@ -1073,6 +1099,7 @@ public void testClientNodeFailOneServer() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientAndRouterFail() throws Exception { startServerNodes(2); startClientNodes(2); @@ -1105,6 +1132,7 @@ public void testClientAndRouterFail() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMetrics() throws Exception { startServerNodes(3); startClientNodes(3); @@ -1165,6 +1193,7 @@ private boolean checkMetrics(int srvCnt, int clientCnt, int execJobsCnt) { /** * @throws Exception If failed. */ + @Test public void testDataExchangeFromServer() throws Exception { testDataExchange("server-0"); } @@ -1172,6 +1201,7 @@ public void testDataExchangeFromServer() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDataExchangeFromClient() throws Exception { testDataExchange("client-0"); } @@ -1216,6 +1246,7 @@ private void testDataExchange(String masterName) throws Exception { /** * @throws Exception If failed. */ + @Test public void testDataExchangeFromServer2() throws Exception { startServerNodes(2); @@ -1246,6 +1277,7 @@ public void testDataExchangeFromServer2() throws Exception { /** * @throws Exception If any error occurs. */ + @Test public void testDuplicateId() throws Exception { startServerNodes(2); @@ -1267,6 +1299,7 @@ public void testDuplicateId() throws Exception { /** * @throws Exception If any error occurs. */ + @Test public void testTimeoutWaitingNodeAddedMessage() throws Exception { longSockTimeouts = true; @@ -1310,6 +1343,7 @@ public void testTimeoutWaitingNodeAddedMessage() throws Exception { /** * @throws Exception If any error occurs. */ + @Test public void testGridStartTime() throws Exception { startServerNodes(2); @@ -1332,6 +1366,7 @@ public void testGridStartTime() throws Exception { /** * @throws Exception If failed. */ + @Test public void testJoinError() throws Exception { startServerNodes(1); @@ -1349,6 +1384,7 @@ public void testJoinError() throws Exception { /** * @throws Exception If failed. */ + @Test public void testJoinError2() throws Exception { startServerNodes(1); @@ -1367,6 +1403,7 @@ public void testJoinError2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testJoinError3() throws Exception { startServerNodes(1); @@ -1384,6 +1421,7 @@ public void testJoinError3() throws Exception { /** * @throws Exception If failed. */ + @Test public void testJoinErrorMissedAddFinishedMessage1() throws Exception { missedAddFinishedMessage(true); } @@ -1391,6 +1429,7 @@ public void testJoinErrorMissedAddFinishedMessage1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testJoinErrorMissedAddFinishedMessage2() throws Exception { missedAddFinishedMessage(false); } @@ -1449,6 +1488,7 @@ private void missedAddFinishedMessage(boolean singleSrv) throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientMessageWorkerStartSingleServer() throws Exception { clientMessageWorkerStart(1, 1); } @@ -1456,6 +1496,7 @@ public void testClientMessageWorkerStartSingleServer() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientMessageWorkerStartTwoServers1() throws Exception { clientMessageWorkerStart(2, 1); } @@ -1463,6 +1504,7 @@ public void testClientMessageWorkerStartTwoServers1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientMessageWorkerStartTwoServers2() throws Exception { clientMessageWorkerStart(2, 2); } @@ -1527,6 +1569,7 @@ private void clientMessageWorkerStart(int srvs, int connectTo) throws Exception /** * @throws Exception If failed. */ + @Test public void testJoinMutlithreaded() throws Exception { startServerNodes(1); @@ -1550,6 +1593,7 @@ public void testJoinMutlithreaded() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReconnectAfterFail() throws Exception { reconnectAfterFail(false); } @@ -1557,6 +1601,7 @@ public void testReconnectAfterFail() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReconnectAfterFailTopologyChanged() throws Exception { reconnectAfterFail(true); } @@ -1678,6 +1723,7 @@ else if (evt.type() == EVT_CLIENT_NODE_RECONNECTED) { /** * @throws Exception If failed. */ + @Test public void testReconnectAfterFailConcurrentJoin() throws Exception { startServerNodes(1); @@ -1750,6 +1796,7 @@ else if (evt.type() == EVT_CLIENT_NODE_RECONNECTED) { /** * @throws Exception If failed. */ + @Test public void testClientFailReconnectDisabled() throws Exception { reconnectDisabled = true; @@ -1791,6 +1838,7 @@ public void testClientFailReconnectDisabled() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReconnectSegmentedAfterJoinTimeoutServerFailed() throws Exception { reconnectSegmentedAfterJoinTimeout(true); } @@ -1798,6 +1846,7 @@ public void testReconnectSegmentedAfterJoinTimeoutServerFailed() throws Exceptio /** * @throws Exception If failed. */ + @Test public void testReconnectSegmentedAfterJoinTimeoutNetworkError() throws Exception { reconnectSegmentedAfterJoinTimeout(false); } @@ -1898,6 +1947,7 @@ else if (evt.type() == EVT_NODE_SEGMENTED) { /** * @throws Exception If failed. */ + @Test public void testReconnectClusterRestart() throws Exception { netTimeout = 3000; joinTimeout = 60_000; @@ -1970,6 +2020,7 @@ else if (evt.type() == EVT_CLIENT_NODE_RECONNECTED) { /** * @throws Exception If failed. */ + @Test public void testDisconnectAfterNetworkTimeout() throws Exception { netTimeout = 5000; joinTimeout = 60_000; @@ -2055,6 +2106,7 @@ else if (evt.type() == EVT_CLIENT_NODE_RECONNECTED) { /** * @throws Exception If failed. */ + @Test public void testForceClientReconnect() throws Exception { startServerNodes(1); diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoveryUnresolvedHostTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoveryUnresolvedHostTest.java index 4dc1604bd389f..ee8bb6d55557d 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoveryUnresolvedHostTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoveryUnresolvedHostTest.java @@ -58,6 +58,7 @@ public class TcpClientDiscoveryUnresolvedHostTest extends GridCommonAbstractTest * * @throws Exception in case of error. */ + @Test public void test() throws Exception { try { startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryClientSuspensionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryClientSuspensionSelfTest.java index a519d25d4114f..0196b11098faf 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryClientSuspensionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryClientSuspensionSelfTest.java @@ -73,6 +73,7 @@ public class TcpDiscoveryClientSuspensionSelfTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testOneServer() throws Exception { doTestClientSuspension(1); } @@ -80,6 +81,7 @@ public void testOneServer() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTwoServers() throws Exception { doTestClientSuspension(2); } @@ -87,6 +89,7 @@ public void testTwoServers() throws Exception { /** * @throws Exception If failed. */ + @Test public void testThreeServers() throws Exception { doTestClientSuspension(3); } diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryConcurrentStartTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryConcurrentStartTest.java index a66fe71f2aa8c..18780ab594c65 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryConcurrentStartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryConcurrentStartTest.java @@ -65,6 +65,7 @@ public class TcpDiscoveryConcurrentStartTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testConcurrentStart() throws Exception { for (int i = 0; i < 10; i++) { try { @@ -79,6 +80,7 @@ public void testConcurrentStart() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConcurrentStartClients() throws Exception { for (int i = 0; i < 20; i++) { try { @@ -108,4 +110,4 @@ public void testConcurrentStartClients() throws Exception { } } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryMarshallerCheckSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryMarshallerCheckSelfTest.java index 696225c495d5c..ad2925f7a24fe 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryMarshallerCheckSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryMarshallerCheckSelfTest.java @@ -72,6 +72,7 @@ public class TcpDiscoveryMarshallerCheckSelfTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testMarshallerInConsistency() throws Exception { sameMarsh = false; @@ -93,10 +94,11 @@ public void testMarshallerInConsistency() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMarshallerConsistency() throws Exception { sameMarsh = true; startGrid(1); startGrid(2); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryMultiThreadedTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryMultiThreadedTest.java index 99dd5aa8b4ec7..b87df6d7fc474 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryMultiThreadedTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryMultiThreadedTest.java @@ -172,6 +172,7 @@ public TcpDiscoveryMultiThreadedTest() throws Exception { /** * @throws Exception If any error occurs. */ + @Test public void testMultiThreadedClientsRestart() throws Exception { final AtomicBoolean done = new AtomicBoolean(); @@ -220,6 +221,7 @@ public void testMultiThreadedClientsRestart() throws Exception { /** * @throws Exception If any error occurs. */ + @Test public void testMultiThreadedClientsServersRestart() throws Throwable { fail("https://issues.apache.org/jira/browse/IGNITE-1123"); @@ -229,6 +231,7 @@ public void testMultiThreadedClientsServersRestart() throws Throwable { /** * @throws Exception If any error occurs. */ + @Test public void testMultiThreadedServersRestart() throws Throwable { fail("https://issues.apache.org/jira/browse/IGNITE-1123"); @@ -426,6 +429,7 @@ else if (X.hasCause(e, ClusterTopologyCheckedException.class)) /** * @throws Exception If any error occurs. */ + @Test public void testTopologyVersion() throws Exception { clientFlagGlobal = false; @@ -450,6 +454,7 @@ public void testTopologyVersion() throws Exception { /** * @throws Exception If any error occurs. */ + @Test public void testMultipleStartOnCoordinatorStop() throws Exception{ for (int k = 0; k < 3; k++) { log.info("Iteration: " + k); @@ -499,6 +504,7 @@ public void testMultipleStartOnCoordinatorStop() throws Exception{ /** * @throws Exception If failed. */ + @Test public void testCustomEventOnJoinCoordinatorStop() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10198"); @@ -597,6 +603,7 @@ public void testCustomEventOnJoinCoordinatorStop() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientContinuousQueryCoordinatorStop() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10198"); @@ -668,6 +675,7 @@ public void testClientContinuousQueryCoordinatorStop() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCustomEventNodeRestart() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10249"); diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryNodeAttributesUpdateOnReconnectTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryNodeAttributesUpdateOnReconnectTest.java index 56dc4ece5f4fc..089874d74f9a6 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryNodeAttributesUpdateOnReconnectTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryNodeAttributesUpdateOnReconnectTest.java @@ -85,6 +85,7 @@ public class TcpDiscoveryNodeAttributesUpdateOnReconnectTest extends GridCommonA /** * @throws Exception If failed. */ + @Test public void testReconnect() throws Exception { Ignite srv = startGrid("server"); diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryNodeConfigConsistentIdSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryNodeConfigConsistentIdSelfTest.java index 3f80746edac8a..e313afa71d4bb 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryNodeConfigConsistentIdSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryNodeConfigConsistentIdSelfTest.java @@ -56,6 +56,7 @@ public class TcpDiscoveryNodeConfigConsistentIdSelfTest extends GridCommonAbstra /** * @throws Exception If failed. */ + @Test public void testConsistentId() throws Exception { Object id0 = grid(0).localNode().consistentId(); Serializable id1 = grid(0).configuration().getConsistentId(); @@ -72,4 +73,4 @@ public void testConsistentId() throws Exception { assertEquals(id0, grid(0).localNode().consistentId()); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryNodeConsistentIdSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryNodeConsistentIdSelfTest.java index b9d7682df5129..c95651d580038 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryNodeConsistentIdSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryNodeConsistentIdSelfTest.java @@ -55,6 +55,7 @@ public class TcpDiscoveryNodeConsistentIdSelfTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testConsistentId() throws Exception { Object id0 = grid(0).localNode().consistentId(); @@ -77,4 +78,4 @@ public void testConsistentId() throws Exception { private int getDiscoveryPort(Ignite ignite) { return ((TcpDiscoveryNode) ignite.cluster().localNode()).discoveryPort(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryPendingMessageDeliveryTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryPendingMessageDeliveryTest.java index 5c1b5fea70a63..7bee6f692c211 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryPendingMessageDeliveryTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryPendingMessageDeliveryTest.java @@ -84,6 +84,7 @@ else if (igniteInstanceName.startsWith("listener")) /** * @throws Exception If failed. */ + @Test public void testPendingMessagesOverflow() throws Exception { Ignite coord = startGrid("coordinator"); TcpDiscoverySpi coordDisco = (TcpDiscoverySpi)coord.configuration().getDiscoverySpi(); @@ -139,6 +140,7 @@ public void testPendingMessagesOverflow() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCustomMessageInSingletonCluster() throws Exception { Ignite coord = startGrid("coordinator"); TcpDiscoverySpi coordDisco = (TcpDiscoverySpi)coord.configuration().getDiscoverySpi(); diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryRestartTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryRestartTest.java index 96ac260d28049..837e52863757c 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryRestartTest.java @@ -83,6 +83,7 @@ public class TcpDiscoveryRestartTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRestart() throws Exception { err = new AtomicReference<>(); @@ -211,4 +212,4 @@ void checkEvents(final UUID nodeId) throws Exception { assertTrue("No left event: " + nodeId, leftIds.contains(nodeId)); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySegmentationPolicyTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySegmentationPolicyTest.java index 4c66d2463ab55..003f7e8d33f27 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySegmentationPolicyTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySegmentationPolicyTest.java @@ -59,6 +59,7 @@ public class TcpDiscoverySegmentationPolicyTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testStopOnSegmentation() throws Exception { startGrids(NODES_CNT); diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySelfTest.java index 32df795f41778..c46315028a0ea 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySelfTest.java @@ -245,6 +245,7 @@ else if (igniteInstanceName.contains("testNodeShutdownOnRingMessageWorkerFailure /** * @throws Exception If any error occurs. */ + @Test public void testSingleNodeStartStop() throws Exception { try { startGrid(1); @@ -257,6 +258,7 @@ public void testSingleNodeStartStop() throws Exception { /** * @throws Exception If any error occurs. */ + @Test public void testThreeNodesStartStop() throws Exception { try { IgniteEx ignite1 = startGrid(1); @@ -309,6 +311,7 @@ public void testThreeNodesStartStop() throws Exception { /** * @throws Exception If any errors occur. */ + @Test public void testNodeConnectMessageSize() throws Exception { try { Ignite g1 = startGrid(1); @@ -340,6 +343,7 @@ public void testNodeConnectMessageSize() throws Exception { /** * @throws Exception If any error occurs. */ + @Test public void testPing() throws Exception { try { startGrid(1); @@ -370,6 +374,7 @@ public void testPing() throws Exception { /** * @throws Exception If any error occurs. */ + @Test public void testFailureDetectionOnNodePing1() throws Exception { try { Ignite g1 = startGrid("testFailureDetectionOnNodePingCoordinator"); @@ -386,6 +391,7 @@ public void testFailureDetectionOnNodePing1() throws Exception { /** * @throws Exception If any error occurs. */ + @Test public void testFailureDetectionOnNodePing2() throws Exception { try { startGrid("testFailureDetectionOnNodePingCoordinator"); @@ -402,6 +408,7 @@ public void testFailureDetectionOnNodePing2() throws Exception { /** * @throws Exception If any error occurs. */ + @Test public void testFailureDetectionOnNodePing3() throws Exception { try { Ignite g1 = startGrid("testFailureDetectionOnNodePingCoordinator"); @@ -451,6 +458,7 @@ private void testFailureDetectionOnNodePing(Ignite pingingNode, Ignite failedNod /** * @throws Exception If any error occurs. */ + @Test public void testPingInterruptedOnNodeFailed() throws Exception { try { final Ignite pingingNode = startGrid("testPingInterruptedOnNodeFailedPingingNode"); @@ -528,6 +536,7 @@ public void testPingInterruptedOnNodeFailed() throws Exception { /** * @throws Exception If any error occurs. */ + @Test public void testPingInterruptedOnNodeLeft() throws Exception { try { final Ignite pingingNode = startGrid("testPingInterruptedOnNodeFailedPingingNode"); @@ -583,6 +592,7 @@ public void testPingInterruptedOnNodeLeft() throws Exception { /** * @throws Exception If any error occurs. */ + @Test public void testNodeAdded() throws Exception { try { final Ignite g1 = startGrid(1); @@ -624,6 +634,7 @@ public void testNodeAdded() throws Exception { /** * @throws Exception If any error occurs. */ + @Test public void testOrdinaryNodeLeave() throws Exception { try { Ignite g1 = startGrid(1); @@ -659,6 +670,7 @@ public void testOrdinaryNodeLeave() throws Exception { /** * @throws Exception If any error occurs. */ + @Test public void testCoordinatorNodeLeave() throws Exception { try { startGrid(1); @@ -703,6 +715,7 @@ public void testCoordinatorNodeLeave() throws Exception { /** * @throws Exception If any error occurs. */ + @Test public void testOrdinaryNodeFailure() throws Exception { try { Ignite g1 = startGrid(1); @@ -737,6 +750,7 @@ public void testOrdinaryNodeFailure() throws Exception { /** * @throws Exception If any error occurs. */ + @Test public void testCoordinatorNodeFailure() throws Exception { try { Ignite g1 = startGrid(1); @@ -766,6 +780,7 @@ public void testCoordinatorNodeFailure() throws Exception { /** * @throws Exception If any error occurs. */ + @Test public void testMetricsSending() throws Exception { final AtomicBoolean stopping = new AtomicBoolean(); @@ -855,6 +870,7 @@ else if (id.equals(g2.cluster().localNode().id())) /** * @throws Exception If any error occurs. */ + @Test public void testFailBeforeNodeAddedSent() throws Exception { try { Ignite g1 = startGrid(1); @@ -900,6 +916,7 @@ else if (evt.type() == EVT_NODE_FAILED) /** * @throws Exception If any error occurs. */ + @Test public void testFailBeforeNodeLeftSent() throws Exception { try { startGrid(1); @@ -941,6 +958,7 @@ public void testFailBeforeNodeLeftSent() throws Exception { /** * @throws Exception If any error occurs. */ + @Test public void testIpFinderCleaning() throws Exception { try { ipFinder.registerAddresses(Arrays.asList(new InetSocketAddress("1.1.1.1", 1024), @@ -988,6 +1006,7 @@ public void testIpFinderCleaning() throws Exception { /** * @throws Exception If any error occurs. */ + @Test public void testNonSharedIpFinder() throws Exception { try { GridTestUtils.runMultiThreadedAsync(new Callable() { @@ -1011,6 +1030,7 @@ public void testNonSharedIpFinder() throws Exception { /** * @throws Exception If any error occurs. */ + @Test public void testMulticastIpFinder() throws Exception { try { for (int i = 0; i < 5; i++) { @@ -1043,6 +1063,7 @@ public void testMulticastIpFinder() throws Exception { /** * @throws Exception If any error occurs. */ + @Test public void testInvalidAddressIpFinder() throws Exception { ipFinder.setShared(false); @@ -1069,6 +1090,7 @@ public void testInvalidAddressIpFinder() throws Exception { /** * @throws Exception If any error occurs. */ + @Test public void testJoinTimeout() throws Exception { try { // This start will fail as expected. @@ -1090,6 +1112,7 @@ public void testJoinTimeout() throws Exception { /** * @throws Exception If any error occurs. */ + @Test public void testJoinTimeoutForIpFinder() throws Exception { try { // This start will fail as expected. @@ -1124,6 +1147,7 @@ public void testJoinTimeoutForIpFinder() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDirtyIpFinder() throws Exception { try { // Dirty IP finder @@ -1143,6 +1167,7 @@ public void testDirtyIpFinder() throws Exception { /** * @throws Exception If any error occurs. */ + @Test public void testDuplicateId() throws Exception { try { // Random ID. @@ -1174,6 +1199,7 @@ public void testDuplicateId() throws Exception { /** * @throws Exception If any error occurs. */ + @Test public void testLoopbackProblemFirstNodeOnLoopback() throws Exception { // On Windows and Mac machines two nodes can reside on the same port // (if one node has localHost="127.0.0.1" and another has localHost="0.0.0.0"). @@ -1206,6 +1232,7 @@ public void testLoopbackProblemFirstNodeOnLoopback() throws Exception { /** * @throws Exception If any error occurs. */ + @Test public void testLoopbackProblemSecondNodeOnLoopback() throws Exception { if (U.isWindows() || U.isMacOs()) return; @@ -1235,6 +1262,7 @@ public void testLoopbackProblemSecondNodeOnLoopback() throws Exception { /** * @throws Exception If any error occurs. */ + @Test public void testGridStartTime() throws Exception { try { startGridsMultiThreaded(5); @@ -1281,6 +1309,7 @@ public void testGridStartTime() throws Exception { /** * @throws Exception If failed */ + @Test public void testCustomEventRace1_1() throws Exception { try { customEventRace1(true, false); @@ -1293,6 +1322,7 @@ public void testCustomEventRace1_1() throws Exception { /** * @throws Exception If failed */ + @Test public void testCustomEventRace1_2() throws Exception { try { customEventRace1(false, false); @@ -1305,6 +1335,7 @@ public void testCustomEventRace1_2() throws Exception { /** * @throws Exception If failed */ + @Test public void testCustomEventRace1_3() throws Exception { try { customEventRace1(true, true); @@ -1406,6 +1437,7 @@ private void customEventRace1(final boolean cacheStartFrom1, boolean stopCrd) th /** * @throws Exception If failed */ + @Test public void testCustomEventCoordinatorFailure1() throws Exception { try { customEventCoordinatorFailure(true); @@ -1418,6 +1450,7 @@ public void testCustomEventCoordinatorFailure1() throws Exception { /** * @throws Exception If failed */ + @Test public void testCustomEventCoordinatorFailure2() throws Exception { try { customEventCoordinatorFailure(false); @@ -1430,6 +1463,7 @@ public void testCustomEventCoordinatorFailure2() throws Exception { /** * @throws Exception If failed */ + @Test public void testNodeShutdownOnRingMessageWorkerFailure() throws Exception { try { final TestMessageWorkerFailureSpi1 spi0 = new TestMessageWorkerFailureSpi1( @@ -1480,6 +1514,7 @@ public void testNodeShutdownOnRingMessageWorkerFailure() throws Exception { /** * @throws Exception If failed */ + @Test public void testNoRingMessageWorkerAbnormalFailureOnSegmentation() throws Exception { try { TestMessageWorkerFailureSpi1 spi1 = new TestMessageWorkerFailureSpi1( @@ -1563,6 +1598,7 @@ public void testNoRingMessageWorkerAbnormalFailureOnSegmentation() throws Except /** * @throws Exception If failed */ + @Test public void testNodeShutdownOnRingMessageWorkerStartNotFinished() throws Exception { try { Ignite ignite0 = startGrid(0); @@ -1672,6 +1708,7 @@ private void customEventCoordinatorFailure(boolean twoNodes) throws Exception { * * @throws Exception If failed. */ + @Test public void testFailedNodes1() throws Exception { try { final int FAIL_ORDER = 3; @@ -1716,6 +1753,7 @@ public void testFailedNodes1() throws Exception { * * @throws Exception If failed. */ + @Test public void testFailedNodes2() throws Exception { try { final int FAIL_ORDER = 3; @@ -1760,6 +1798,7 @@ public void testFailedNodes2() throws Exception { * * @throws Exception If failed. */ + @Test public void testFailedNodes3() throws Exception { try { nodeSpi.set(createFailedNodeSpi(-1)); @@ -1793,6 +1832,7 @@ public void testFailedNodes3() throws Exception { * * @throws Exception If failed. */ + @Test public void testFailedNodes4() throws Exception { try { final int FAIL_ORDER = 3; @@ -1836,6 +1876,7 @@ public void testFailedNodes4() throws Exception { * * @throws Exception If failed. */ + @Test public void testFailedNodes5() throws Exception { try { ThreadLocalRandom rnd = ThreadLocalRandom.current(); @@ -1892,6 +1933,7 @@ public void testFailedNodes5() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCustomEventAckNotSend() throws Exception { try { TestCustomerEventAckSpi spi0 = new TestCustomerEventAckSpi(); @@ -1920,6 +1962,7 @@ public void testCustomEventAckNotSend() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDiscoveryEventsDiscard() throws Exception { try { TestEventDiscardSpi spi = new TestEventDiscardSpi(); @@ -1954,6 +1997,7 @@ public void testDiscoveryEventsDiscard() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNoExtraNodeFailedMessage() throws Exception { try { final int NODES = 10; @@ -2002,6 +2046,7 @@ public void testNoExtraNodeFailedMessage() throws Exception { /** * Test verifies Ignite nodes don't exchange system types on discovery phase but only user types. */ + @Test public void testSystemMarshallerTypesFilteredOut() throws Exception { try { nodeSpi.set(new TestTcpDiscoveryMarshallerDataSpi()); @@ -2035,6 +2080,7 @@ public void testSystemMarshallerTypesFilteredOut() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDuplicatedDiscoveryDataRemoved() throws Exception { try { TestDiscoveryDataDuplicateSpi.checkNodeAdded = false; @@ -2092,6 +2138,7 @@ public void testDuplicatedDiscoveryDataRemoved() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFailedNodeRestoreConnection() throws Exception { try { TestRestoreConnectedSpi.startTest = false; diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySnapshotHistoryTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySnapshotHistoryTest.java index b55473ca80d80..ff7ed4f316c61 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySnapshotHistoryTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySnapshotHistoryTest.java @@ -52,6 +52,7 @@ public class TcpDiscoverySnapshotHistoryTest extends GridCommonAbstractTest { /** * @throws Exception If any error occurs. */ + @Test public void testHistorySupported() throws Exception { try { final Ignite g = startGrid(); @@ -72,6 +73,7 @@ public void testHistorySupported() throws Exception { /** * @throws Exception If any error occurs. */ + @Test public void testSettingNewTopologyHistorySize() throws Exception { try { final Ignite g = startGrid(); @@ -96,6 +98,7 @@ public void testSettingNewTopologyHistorySize() throws Exception { /** * @throws Exception If any error occurs. */ + @Test public void testNodeAdded() throws Exception { try { // Add grid #1 @@ -129,6 +132,7 @@ public void testNodeAdded() throws Exception { /** * @throws Exception If any error occurs. */ + @Test public void testNodeAddedAndRemoved() throws Exception { try { // Add grid #1 @@ -174,4 +178,4 @@ private static void assertTopVer(long expTopVer, Ignite... ignites) { for (Ignite g : ignites) assertEquals("Grid has wrong topology version.", expTopVer, g.cluster().topologyVersion()); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiConfigSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiConfigSelfTest.java index ea1bb27db088a..1c53c6c06462d 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiConfigSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiConfigSelfTest.java @@ -30,6 +30,7 @@ public class TcpDiscoverySpiConfigSelfTest extends GridSpiAbstractConfigTest { EncryptionSpi encSpi = new KeystoreEncryptionSpi(); @@ -41,6 +42,7 @@ public void testCantStartWithEmptyParam() throws Exception { } /** @throws Exception If failed. */ + @Test public void testCantStartWithoutPassword() throws Exception { GridTestUtils.assertThrowsWithCause(() -> { KeystoreEncryptionSpi encSpi = new KeystoreEncryptionSpi(); @@ -52,6 +54,7 @@ public void testCantStartWithoutPassword() throws Exception { } /** @throws Exception If failed. */ + @Test public void testCantStartKeystoreDoesntExists() throws Exception { GridTestUtils.assertThrowsWithCause(() -> { KeystoreEncryptionSpi encSpi = new KeystoreEncryptionSpi(); @@ -64,11 +67,12 @@ public void testCantStartKeystoreDoesntExists() throws Exception { } /** @throws Exception If failed. */ + @Test public void testEncryptDecrypt() throws Exception { EncryptionSpi encSpi = spi(); KeystoreEncryptionKey k = GridTestUtils.getFieldValue(encSpi, "masterKey"); - + assertNotNull(k); assertNotNull(k.key()); @@ -79,7 +83,7 @@ public void testEncryptDecrypt() throws Exception { assertNotNull(cipherText); assertEquals(encSpi.encryptedSize(plainText.length), cipherText.length); - + byte[] decryptedText = encSpi.decrypt(cipherText, k); assertNotNull(decryptedText); @@ -89,9 +93,10 @@ public void testEncryptDecrypt() throws Exception { } /** @throws Exception If failed. */ + @Test public void testKeyEncryptDecrypt() throws Exception { EncryptionSpi encSpi = spi(); - + KeystoreEncryptionKey k = (KeystoreEncryptionKey)encSpi.create(); assertNotNull(k); diff --git a/modules/core/src/test/java/org/apache/ignite/spi/eventstorage/memory/GridMemoryEventStorageMultiThreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/eventstorage/memory/GridMemoryEventStorageMultiThreadedSelfTest.java index f4395e8cccbb9..e8d1bf1a235ce 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/eventstorage/memory/GridMemoryEventStorageMultiThreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/eventstorage/memory/GridMemoryEventStorageMultiThreadedSelfTest.java @@ -34,6 +34,7 @@ public class GridMemoryEventStorageMultiThreadedSelfTest extends GridSpiAbstract /** * @throws Exception If test failed */ + @Test public void testMultiThreaded() throws Exception { GridTestUtils.runMultiThreaded(new Callable() { @Override public Object call() throws Exception { @@ -50,4 +51,4 @@ public void testMultiThreaded() throws Exception { assert evts.size() <= 10000 : "Incorrect number of events: " + evts.size(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/spi/eventstorage/memory/GridMemoryEventStorageSpiConfigSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/eventstorage/memory/GridMemoryEventStorageSpiConfigSelfTest.java index 3c82ffdb0c317..e45a1312589a0 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/eventstorage/memory/GridMemoryEventStorageSpiConfigSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/eventstorage/memory/GridMemoryEventStorageSpiConfigSelfTest.java @@ -28,8 +28,9 @@ public class GridMemoryEventStorageSpiConfigSelfTest extends GridSpiAbstractConf /** * @throws Exception If failed. */ + @Test public void testNegativeConfig() throws Exception { checkNegativeSpiProperty(new MemoryEventStorageSpi(), "expireCount", 0); checkNegativeSpiProperty(new MemoryEventStorageSpi(), "expireAgeMs", 0); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/spi/eventstorage/memory/GridMemoryEventStorageSpiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/eventstorage/memory/GridMemoryEventStorageSpiSelfTest.java index c8f530a024e0e..7d38482862620 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/eventstorage/memory/GridMemoryEventStorageSpiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/eventstorage/memory/GridMemoryEventStorageSpiSelfTest.java @@ -55,6 +55,7 @@ public long getExpireAgeMs() { /** * @throws Exception If failed. */ + @Test public void testMemoryEventStorage() throws Exception { MemoryEventStorageSpi spi = getSpi(); @@ -101,6 +102,7 @@ public void testMemoryEventStorage() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFilter() throws Exception { MemoryEventStorageSpi spi = getSpi(); diff --git a/modules/core/src/test/java/org/apache/ignite/spi/failover/always/GridAlwaysFailoverSpiConfigSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/failover/always/GridAlwaysFailoverSpiConfigSelfTest.java index 20d2fda21fb1b..9eafacb8f25a7 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/failover/always/GridAlwaysFailoverSpiConfigSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/failover/always/GridAlwaysFailoverSpiConfigSelfTest.java @@ -28,7 +28,8 @@ public class GridAlwaysFailoverSpiConfigSelfTest extends GridSpiAbstractConfigTe /** * @throws Exception If failed. */ + @Test public void testNegativeConfig() throws Exception { checkNegativeSpiProperty(new AlwaysFailoverSpi(), "maximumFailoverAttempts", -1); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/spi/failover/always/GridAlwaysFailoverSpiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/failover/always/GridAlwaysFailoverSpiSelfTest.java index 6a37299a2efe0..0e1c6888175c9 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/failover/always/GridAlwaysFailoverSpiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/failover/always/GridAlwaysFailoverSpiSelfTest.java @@ -40,6 +40,7 @@ public class GridAlwaysFailoverSpiSelfTest extends GridSpiAbstractTest nodes = new ArrayList<>(); @@ -46,4 +47,4 @@ public void testAlwaysNull() throws Exception { assert getSpi().failover(new GridFailoverTestContext(new GridTestTaskSession(), new GridTestJobResult(node)), nodes) == null; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/adaptive/GridAdaptiveLoadBalancingSpiConfigSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/adaptive/GridAdaptiveLoadBalancingSpiConfigSelfTest.java index 7bbd2cb55abd1..3f6b57efa8f38 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/adaptive/GridAdaptiveLoadBalancingSpiConfigSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/adaptive/GridAdaptiveLoadBalancingSpiConfigSelfTest.java @@ -29,7 +29,8 @@ public class GridAdaptiveLoadBalancingSpiConfigSelfTest /** * @throws Exception If failed. */ + @Test public void testNegativeConfig() throws Exception { checkNegativeSpiProperty(new AdaptiveLoadBalancingSpi(), "loadProbe", null); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/adaptive/GridAdaptiveLoadBalancingSpiMultipleNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/adaptive/GridAdaptiveLoadBalancingSpiMultipleNodeSelfTest.java index 77dd26aac880c..f9517016cc5b6 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/adaptive/GridAdaptiveLoadBalancingSpiMultipleNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/adaptive/GridAdaptiveLoadBalancingSpiMultipleNodeSelfTest.java @@ -72,6 +72,7 @@ public AdaptiveLoadProbe getLoadProbe() { /** * @throws Exception If failed. */ + @Test public void testWeights() throws Exception { // Seal it. List nodes = new ArrayList<>(getSpiContext().remoteNodes()); @@ -99,4 +100,4 @@ public void testWeights() throws Exception { ", cnts[i+1]=" + cnts[i + 1] + ']'; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/adaptive/GridAdaptiveLoadBalancingSpiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/adaptive/GridAdaptiveLoadBalancingSpiSelfTest.java index 3a377497c82d6..2b568be2cb0d4 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/adaptive/GridAdaptiveLoadBalancingSpiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/adaptive/GridAdaptiveLoadBalancingSpiSelfTest.java @@ -65,6 +65,7 @@ public AdaptiveLoadProbe getLoadProbe() { * @throws Exception If failed. */ @SuppressWarnings({"ObjectEquality"}) + @Test public void testSingleNodeZeroWeight() throws Exception { GridTestNode node = (GridTestNode)getSpiContext().nodes().iterator().next(); @@ -90,6 +91,7 @@ public void testSingleNodeZeroWeight() throws Exception { * @throws Exception If failed. */ @SuppressWarnings({"ObjectEquality"}) + @Test public void testSingleNodeSameSession() throws Exception { GridTestNode node = (GridTestNode)getSpiContext().nodes().iterator().next(); @@ -115,6 +117,7 @@ public void testSingleNodeSameSession() throws Exception { * @throws Exception If failed. */ @SuppressWarnings({"ObjectEquality"}) + @Test public void testSingleNodeDifferentSession() throws Exception { GridTestNode node = (GridTestNode)getSpiContext().nodes().iterator().next(); @@ -135,4 +138,4 @@ public void testSingleNodeDifferentSession() throws Exception { assert pick1 == pick2; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/internal/GridInternalTasksLoadBalancingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/internal/GridInternalTasksLoadBalancingSelfTest.java index 26f4a3b98c828..ef333e16cf1e8 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/internal/GridInternalTasksLoadBalancingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/internal/GridInternalTasksLoadBalancingSelfTest.java @@ -82,6 +82,7 @@ public class GridInternalTasksLoadBalancingSelfTest extends GridCommonAbstractTe * * @throws Exception In case of error. */ + @Test public void testInternalTaskBalancing() throws Exception { customLoadBalancer = true; @@ -113,6 +114,7 @@ public void testInternalTaskBalancing() throws Exception { * * @throws Exception In case of error. */ + @Test public void testInternalTaskDefaultBalancing() throws Exception { customLoadBalancer = false; diff --git a/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/roundrobin/GridRoundRobinLoadBalancingNotPerTaskMultithreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/roundrobin/GridRoundRobinLoadBalancingNotPerTaskMultithreadedSelfTest.java index 79b1db46ae28a..fab985a31cb9f 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/roundrobin/GridRoundRobinLoadBalancingNotPerTaskMultithreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/roundrobin/GridRoundRobinLoadBalancingNotPerTaskMultithreadedSelfTest.java @@ -73,6 +73,7 @@ public boolean getPerTask() { * * @throws Exception If failed. */ + @Test public void testMultipleTaskSessionsMultithreaded() throws Exception { final RoundRobinLoadBalancingSpi spi = getSpi(); @@ -126,4 +127,4 @@ public void testMultipleTaskSessionsMultithreaded() throws Exception { } }, THREAD_CNT, "balancer-test-worker"); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/roundrobin/GridRoundRobinLoadBalancingSpiLocalNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/roundrobin/GridRoundRobinLoadBalancingSpiLocalNodeSelfTest.java index 9fd0e6ea9672a..c9dca88e10882 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/roundrobin/GridRoundRobinLoadBalancingSpiLocalNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/roundrobin/GridRoundRobinLoadBalancingSpiLocalNodeSelfTest.java @@ -35,6 +35,7 @@ public class GridRoundRobinLoadBalancingSpiLocalNodeSelfTest extends * @throws Exception If failed. */ @SuppressWarnings({"ObjectEquality"}) + @Test public void testLocalNode() throws Exception { assert getDiscoverySpi().getRemoteNodes().isEmpty(); @@ -51,4 +52,4 @@ public void testLocalNode() throws Exception { assert node == locNode; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/roundrobin/GridRoundRobinLoadBalancingSpiMultipleNodesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/roundrobin/GridRoundRobinLoadBalancingSpiMultipleNodesSelfTest.java index 4eaba9b46ee99..ed0052da38a6b 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/roundrobin/GridRoundRobinLoadBalancingSpiMultipleNodesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/roundrobin/GridRoundRobinLoadBalancingSpiMultipleNodesSelfTest.java @@ -60,6 +60,7 @@ public class GridRoundRobinLoadBalancingSpiMultipleNodesSelfTest * @throws Exception If test failed. */ @SuppressWarnings({"ObjectEquality"}) + @Test public void testMultipleNodes() throws Exception { List allNodes = (List)getSpiContext().nodes(); @@ -89,6 +90,7 @@ public void testMultipleNodes() throws Exception { * @throws Exception If test failed. */ @SuppressWarnings({"ObjectEquality"}) + @Test public void testMultipleTasks() throws Exception { ComputeTaskSession ses1 = new GridTestTaskSession(IgniteUuid.randomUuid()); ComputeTaskSession ses2 = new GridTestTaskSession(IgniteUuid.randomUuid()); @@ -135,4 +137,4 @@ public void testMultipleTasks() throws Exception { getSpiContext().triggerEvent(new TaskEvent( null, null, EVT_TASK_FAILED, ses2.getId(), null, null, false, null)); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/roundrobin/GridRoundRobinLoadBalancingSpiNotPerTaskSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/roundrobin/GridRoundRobinLoadBalancingSpiNotPerTaskSelfTest.java index 90f04bdacd140..52aea0cd16ef8 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/roundrobin/GridRoundRobinLoadBalancingSpiNotPerTaskSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/roundrobin/GridRoundRobinLoadBalancingSpiNotPerTaskSelfTest.java @@ -70,6 +70,7 @@ public boolean getPerTask() { /** * @throws Exception If test failed. */ + @Test public void testMultipleNodes() throws Exception { List allNodes = (List)getSpiContext().nodes(); @@ -85,6 +86,7 @@ public void testMultipleNodes() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testMultipleTaskSessions() throws Exception { ComputeTaskSession ses1 = new GridTestTaskSession(IgniteUuid.randomUuid()); ComputeTaskSession ses2 = new GridTestTaskSession(IgniteUuid.randomUuid()); @@ -106,6 +108,7 @@ public void testMultipleTaskSessions() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testBalancingOneNode() throws Exception { ComputeTaskSession ses = new GridTestTaskSession(); @@ -120,6 +123,7 @@ public void testBalancingOneNode() throws Exception { } /** */ + @Test public void testNodeNotInTopology() throws Exception { ComputeTaskSession ses = new GridTestTaskSession(); @@ -134,4 +138,4 @@ public void testNodeNotInTopology() throws Exception { assertTrue(e.getMessage().contains("Task topology does not have alive nodes")); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/roundrobin/GridRoundRobinLoadBalancingSpiTopologyChangeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/roundrobin/GridRoundRobinLoadBalancingSpiTopologyChangeSelfTest.java index 3159e04c68093..b0ecef55bcc32 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/roundrobin/GridRoundRobinLoadBalancingSpiTopologyChangeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/roundrobin/GridRoundRobinLoadBalancingSpiTopologyChangeSelfTest.java @@ -57,6 +57,7 @@ public class GridRoundRobinLoadBalancingSpiTopologyChangeSelfTest /** * @throws Exception If failed. */ + @Test public void testTopologyChange() throws Exception { ComputeTaskSession ses = new GridTestTaskSession(IgniteUuid.randomUuid()); @@ -107,4 +108,4 @@ public void testTopologyChange() throws Exception { checkCyclicBalancing(getSpi(), allNodes, orderedNodes, ses); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/weightedrandom/GridWeightedRandomLoadBalancingSpiConfigSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/weightedrandom/GridWeightedRandomLoadBalancingSpiConfigSelfTest.java index 2ed7813b81511..61ef23961834d 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/weightedrandom/GridWeightedRandomLoadBalancingSpiConfigSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/weightedrandom/GridWeightedRandomLoadBalancingSpiConfigSelfTest.java @@ -29,7 +29,8 @@ public class GridWeightedRandomLoadBalancingSpiConfigSelfTest extends /** * @throws Exception If failed. */ + @Test public void testNegativeConfig() throws Exception { checkNegativeSpiProperty(new WeightedRandomLoadBalancingSpi(), "nodeWeight", 0); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/weightedrandom/GridWeightedRandomLoadBalancingSpiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/weightedrandom/GridWeightedRandomLoadBalancingSpiSelfTest.java index 3c1e95756208f..290274e6ee16b 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/weightedrandom/GridWeightedRandomLoadBalancingSpiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/weightedrandom/GridWeightedRandomLoadBalancingSpiSelfTest.java @@ -38,6 +38,7 @@ public class GridWeightedRandomLoadBalancingSpiSelfTest extends * @throws Exception If failed. */ @SuppressWarnings({"ObjectEquality"}) + @Test public void testSingleNode() throws Exception { List nodes = Collections.singletonList((ClusterNode)new GridTestNode(UUID.randomUUID())); @@ -54,6 +55,7 @@ public void testSingleNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultipleNodes() throws Exception { List nodes = new ArrayList<>(); @@ -68,4 +70,4 @@ public void testMultipleNodes() throws Exception { assert node != null; assert nodes.contains(node); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/weightedrandom/GridWeightedRandomLoadBalancingSpiWeightedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/weightedrandom/GridWeightedRandomLoadBalancingSpiWeightedSelfTest.java index 2a83d6fdd7801..1bc47ccdfcf85 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/weightedrandom/GridWeightedRandomLoadBalancingSpiWeightedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/weightedrandom/GridWeightedRandomLoadBalancingSpiWeightedSelfTest.java @@ -51,6 +51,7 @@ public boolean getUseWeights() { /** * @throws Exception If test failed. */ + @Test public void testWeights() throws Exception { List nodes = new ArrayList<>(); @@ -85,4 +86,4 @@ public void testWeights() throws Exception { info("Node counts: " + Arrays.toString(cnts)); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/startup/cmdline/GridCommandLineLoaderTest.java b/modules/core/src/test/java/org/apache/ignite/startup/cmdline/GridCommandLineLoaderTest.java index 612479bb94642..1034c35a0b660 100644 --- a/modules/core/src/test/java/org/apache/ignite/startup/cmdline/GridCommandLineLoaderTest.java +++ b/modules/core/src/test/java/org/apache/ignite/startup/cmdline/GridCommandLineLoaderTest.java @@ -44,6 +44,7 @@ public class GridCommandLineLoaderTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testLoader() throws Exception { String path = U.getIgniteHome() + GRID_CFG_PATH; diff --git a/modules/core/src/test/java/org/apache/ignite/startup/cmdline/GridCommandLineTransformerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/startup/cmdline/GridCommandLineTransformerSelfTest.java index 6fa0b0929e7d0..f98cc262889fa 100644 --- a/modules/core/src/test/java/org/apache/ignite/startup/cmdline/GridCommandLineTransformerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/startup/cmdline/GridCommandLineTransformerSelfTest.java @@ -28,6 +28,7 @@ public class GridCommandLineTransformerSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testTransformIfNoArguments() throws Exception { assertEquals( "\"INTERACTIVE=0\" \"QUIET=-DIGNITE_QUIET=true\" \"NO_PAUSE=0\" " + @@ -38,6 +39,7 @@ public void testTransformIfNoArguments() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTransformIfArgumentIsnull() throws Exception { GridTestUtils.assertThrows(log, new Callable() { @SuppressWarnings("NullArgumentToVariableArgMethod") @@ -53,6 +55,7 @@ public void testTransformIfArgumentIsnull() throws Exception { * * @throws Exception If failed. */ + @Test public void testTransformIfUnsupportedOptions() throws Exception { GridTestUtils.assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -64,6 +67,7 @@ public void testTransformIfUnsupportedOptions() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTransformIfUnsupportedJvmOptions() throws Exception { GridTestUtils.assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -87,6 +91,7 @@ public void testTransformIfUnsupportedJvmOptions() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTransformIfSeveralArgumentsWithoutDashPrefix() throws Exception { GridTestUtils.assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -98,6 +103,7 @@ public void testTransformIfSeveralArgumentsWithoutDashPrefix() throws Exception /** * @throws Exception If failed. */ + @Test public void testTransformIfOnlyPathToConfigSpecified() throws Exception { assertEquals( "\"INTERACTIVE=0\" \"QUIET=-DIGNITE_QUIET=true\" \"NO_PAUSE=0\" \"NO_JMX=0\" " + @@ -108,6 +114,7 @@ public void testTransformIfOnlyPathToConfigSpecified() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTransformIfAllSupportedArguments() throws Exception { assertEquals( "\"INTERACTIVE=1\" \"QUIET=-DIGNITE_QUIET=false\" \"NO_PAUSE=1\" \"NO_JMX=1\" " + @@ -116,4 +123,4 @@ public void testTransformIfAllSupportedArguments() throws Exception { CommandLineTransformer.transform("-i", "-np", "-v", "-J-Xmx1g", "-J-Xms1m", "-nojmx", "\"c:\\path to\\русский каталог\"")); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/startup/properties/NotStringSystemPropertyTest.java b/modules/core/src/test/java/org/apache/ignite/startup/properties/NotStringSystemPropertyTest.java index 5e108a6e02f70..b321d168c513f 100644 --- a/modules/core/src/test/java/org/apache/ignite/startup/properties/NotStringSystemPropertyTest.java +++ b/modules/core/src/test/java/org/apache/ignite/startup/properties/NotStringSystemPropertyTest.java @@ -38,6 +38,7 @@ public class NotStringSystemPropertyTest extends GridCommonAbstractTest { /** * @throws Exception If fail. */ + @Test public void testGridStart() throws Exception { Some some = new Some(0, "prop"); diff --git a/modules/core/src/test/java/org/apache/ignite/startup/servlet/GridServletLoaderTest.java b/modules/core/src/test/java/org/apache/ignite/startup/servlet/GridServletLoaderTest.java index 4ce89a20a98c8..a13349c3bfe96 100644 --- a/modules/core/src/test/java/org/apache/ignite/startup/servlet/GridServletLoaderTest.java +++ b/modules/core/src/test/java/org/apache/ignite/startup/servlet/GridServletLoaderTest.java @@ -68,6 +68,7 @@ public class GridServletLoaderTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testLoader() throws Exception { JMXConnector jmx = null; @@ -173,4 +174,4 @@ private static JMXConnector getJMXConnector(String host, int port) throws IOExce // Wait for 5 minutes. return 5 * 60 * 1000; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/stream/socket/SocketStreamerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/stream/socket/SocketStreamerSelfTest.java index b82484fb2ba00..c5f0550a874d1 100644 --- a/modules/core/src/test/java/org/apache/ignite/stream/socket/SocketStreamerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/stream/socket/SocketStreamerSelfTest.java @@ -103,6 +103,7 @@ public class SocketStreamerSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testSizeBasedDefaultConverter() throws Exception { test(null, null, new Runnable() { @Override public void run() { @@ -131,6 +132,7 @@ public void testSizeBasedDefaultConverter() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultipleEntriesFromOneMessage() throws Exception { test(null, null, new Runnable() { @Override public void run() { @@ -162,6 +164,7 @@ public void testMultipleEntriesFromOneMessage() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSizeBasedCustomConverter() throws Exception { SocketMessageConverter converter = new SocketMessageConverter() { @Override public Message convert(byte[] msg) { @@ -201,6 +204,7 @@ public void testSizeBasedCustomConverter() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDelimiterBasedDefaultConverter() throws Exception { test(null, DELIM, new Runnable() { @Override public void run() { @@ -226,6 +230,7 @@ public void testDelimiterBasedDefaultConverter() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDelimiterBasedCustomConverter() throws Exception { SocketMessageConverter converter = new SocketMessageConverter() { @Override public Message convert(byte[] msg) { @@ -263,8 +268,8 @@ public void testDelimiterBasedCustomConverter() throws Exception { * @param converter Converter. * @param r Runnable.. */ - private void test(@Nullable SocketMessageConverter converter, - @Nullable byte[] delim, + private void test(@Nullable SocketMessageConverter converter, + @Nullable byte[] delim, Runnable r, boolean oneMessagePerTuple) throws Exception { SocketStreamer sockStmr = null; @@ -389,4 +394,4 @@ private static class Message implements Serializable { this.values = values; } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/stream/socket/SocketStreamerUnmarshalVulnerabilityTest.java b/modules/core/src/test/java/org/apache/ignite/stream/socket/SocketStreamerUnmarshalVulnerabilityTest.java index dadc5b6f31c19..6a0d18fd29bba 100644 --- a/modules/core/src/test/java/org/apache/ignite/stream/socket/SocketStreamerUnmarshalVulnerabilityTest.java +++ b/modules/core/src/test/java/org/apache/ignite/stream/socket/SocketStreamerUnmarshalVulnerabilityTest.java @@ -83,6 +83,7 @@ public class SocketStreamerUnmarshalVulnerabilityTest extends GridCommonAbstract /** * @throws Exception If failed. */ + @Test public void testNoLists() throws Exception { testExploit(true); } @@ -90,6 +91,7 @@ public void testNoLists() throws Exception { /** * @throws Exception If failed. */ + @Test public void testWhiteListIncluded() throws Exception { String path = U.resolveIgnitePath("modules/core/src/test/config/class_list_exploit_included.txt").getPath(); @@ -101,6 +103,7 @@ public void testWhiteListIncluded() throws Exception { /** * @throws Exception If failed. */ + @Test public void testWhiteListExcluded() throws Exception { String path = U.resolveIgnitePath("modules/core/src/test/config/class_list_exploit_excluded.txt").getPath(); @@ -112,6 +115,7 @@ public void testWhiteListExcluded() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBlackListIncluded() throws Exception { String path = U.resolveIgnitePath("modules/core/src/test/config/class_list_exploit_included.txt").getPath(); @@ -123,6 +127,7 @@ public void testBlackListIncluded() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBlackListExcluded() throws Exception { String path = U.resolveIgnitePath("modules/core/src/test/config/class_list_exploit_excluded.txt").getPath(); @@ -134,6 +139,7 @@ public void testBlackListExcluded() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBothListIncluded() throws Exception { String path = U.resolveIgnitePath("modules/core/src/test/config/class_list_exploit_included.txt").getPath(); diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/assertions/AlwaysAssertion.java b/modules/core/src/test/java/org/apache/ignite/testframework/assertions/AlwaysAssertion.java index f786d4dfda858..ce5e5390d7138 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/assertions/AlwaysAssertion.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/assertions/AlwaysAssertion.java @@ -23,7 +23,8 @@ public class AlwaysAssertion implements Assertion { public static final Assertion INSTANCE = new AlwaysAssertion(); /** {@inheritDoc} */ - @Override public void test() throws AssertionError { + @Override @Test + public void test() throws AssertionError { // No-op. } } diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/assertions/Assertion.java b/modules/core/src/test/java/org/apache/ignite/testframework/assertions/Assertion.java index 4799d88f1aecf..af76ad89921c6 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/assertions/Assertion.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/assertions/Assertion.java @@ -27,5 +27,6 @@ public interface Assertion { * * @throws AssertionError if the condition was not satisfied. */ + @Test public void test() throws AssertionError; } diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/cache/GridAbstractCacheStoreSelfTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/cache/GridAbstractCacheStoreSelfTest.java index 22d93763abf8f..6a3a63df9c24e 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/cache/GridAbstractCacheStoreSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/cache/GridAbstractCacheStoreSelfTest.java @@ -72,6 +72,7 @@ protected GridAbstractCacheStoreSelfTest() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStore() throws Exception { // Create dummy transaction Transaction tx = new DummyTx(); @@ -105,6 +106,7 @@ public void testStore() throws Exception { /** * @throws IgniteCheckedException if failed. */ + @Test public void testRollback() throws IgniteCheckedException { Transaction tx = new DummyTx(); @@ -190,6 +192,7 @@ public void testRollback() throws IgniteCheckedException { /** * @throws IgniteCheckedException if failed. */ + @Test public void testAllOpsWithTXNoCommit() throws IgniteCheckedException { doTestAllOps(new DummyTx(), false); } @@ -197,6 +200,7 @@ public void testAllOpsWithTXNoCommit() throws IgniteCheckedException { /** * @throws IgniteCheckedException if failed. */ + @Test public void testAllOpsWithTXCommit() throws IgniteCheckedException { doTestAllOps(new DummyTx(), true); } @@ -204,6 +208,7 @@ public void testAllOpsWithTXCommit() throws IgniteCheckedException { /** * @throws IgniteCheckedException if failed. */ + @Test public void testAllOpsWithoutTX() throws IgniteCheckedException { doTestAllOps(null, false); } @@ -306,6 +311,7 @@ private void doTestAllOps(@Nullable Transaction tx, boolean commit) { /** * @throws Exception If failed. */ + @Test public void testSimpleMultithreading() throws Exception { final Random rnd = new Random(); diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridAbstractLifecycleAwareSelfTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridAbstractLifecycleAwareSelfTest.java index 35c0b069b1d14..43a5a3b314c34 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridAbstractLifecycleAwareSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridAbstractLifecycleAwareSelfTest.java @@ -107,6 +107,7 @@ protected void afterGridStart(Ignite ignite) { /** * @throws Exception If failed. */ + @Test public void testLifecycleAware() throws Exception { Ignite ignite = startGrid(); @@ -131,4 +132,4 @@ public void testLifecycleAware() throws Exception { lifecycleAwares.clear(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/test/ConfigVariationsTestSuiteBuilderTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/test/ConfigVariationsTestSuiteBuilderTest.java index 93f0168bd3573..cd4357e8e69da 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/test/ConfigVariationsTestSuiteBuilderTest.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/test/ConfigVariationsTestSuiteBuilderTest.java @@ -33,6 +33,7 @@ public class ConfigVariationsTestSuiteBuilderTest extends TestCase { /** * @throws Exception If failed. */ + @Test public void testDefaults() throws Exception { TestSuite dfltSuite = new ConfigVariationsTestSuiteBuilder("testSuite", NoopTest.class).build(); @@ -59,6 +60,7 @@ public void testDefaults() throws Exception { * @throws Exception If failed. */ @SuppressWarnings("serial") + @Test public void testIgniteConfigFilter() throws Exception { TestSuite dfltSuite = new ConfigVariationsTestSuiteBuilder("testSuite", NoopTest.class).build(); @@ -79,6 +81,7 @@ public void testIgniteConfigFilter() throws Exception { * @throws Exception If failed. */ @SuppressWarnings("serial") + @Test public void testCacheConfigFilter() throws Exception { TestSuite dfltSuite = new ConfigVariationsTestSuiteBuilder("testSuite", NoopTest.class) .withBasicCacheParams() @@ -105,7 +108,8 @@ private static class NoopTest extends IgniteConfigVariationsAbstractTest { /** * @throws Exception If failed. */ - public void test1() throws Exception { + @Test + public void test1() throws Exception { // No-op. } } diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/test/ListeningTestLoggerTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/test/ListeningTestLoggerTest.java index 8043f7e8922a3..fdcde7190c242 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/test/ListeningTestLoggerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/test/ListeningTestLoggerTest.java @@ -53,6 +53,7 @@ public class ListeningTestLoggerTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testIgniteVersionLogging() throws Exception { int gridCnt = 4; @@ -72,6 +73,7 @@ public void testIgniteVersionLogging() throws Exception { /** * Checks that re-register works fine. */ + @Test public void testUnregister() { String msg = "catch me"; @@ -107,6 +109,7 @@ public void testUnregister() { /** * Ensures that listener will be re-registered only once. */ + @Test public void testRegister() { AtomicInteger cntr = new AtomicInteger(); @@ -123,6 +126,7 @@ public void testRegister() { /** * Checks basic API. */ + @Test public void testBasicApi() { LogListener lsnr = LogListener.matches(Pattern.compile("a[a-z]+")) .andMatches("Exception message.").andMatches(".java:").build(); @@ -141,6 +145,7 @@ public void testBasicApi() { /** * Checks blank lines matching. */ + @Test public void testEmptyLine() { LogListener emptyLineLsnr = LogListener.matches("").build(); @@ -152,6 +157,7 @@ public void testEmptyLine() { } /** */ + @Test public void testPredicateExceptions() { LogListener lsnr = LogListener.matches(msg -> { assertFalse(msg.contains("Target")); @@ -182,6 +188,7 @@ public void testPredicateExceptions() { /** * Validates listener range definition. */ + @Test public void testRange() { String msg = "range"; @@ -211,6 +218,7 @@ public void testRange() { /** * Checks that substring was not found in the log messages. */ + @Test public void testNotPresent() { String msg = "vacuum"; @@ -230,6 +238,7 @@ public void testNotPresent() { /** * Checks that the substring is found at least twice. */ + @Test public void testAtLeast() { String msg = "at least"; @@ -249,6 +258,7 @@ public void testAtLeast() { /** * Checks that the substring is found no more than twice. */ + @Test public void testAtMost() { String msg = "at most"; @@ -271,6 +281,7 @@ public void testAtMost() { /** * Checks that only last value is taken into account. */ + @Test public void testMultiRange() { String msg = "multi range"; @@ -304,6 +315,7 @@ public void testMultiRange() { /** * Checks that matches are counted for each message. */ + @Test public void testMatchesPerMessage() { LogListener lsnr = LogListener.matches("aa").times(4).build(); @@ -337,6 +349,7 @@ public void testMatchesPerMessage() { * * @throws Exception If failed. */ + @Test public void testMultithreaded() throws Exception { int iterCnt = 50_000; int threadCnt = 6; @@ -371,6 +384,7 @@ public void testMultithreaded() throws Exception { /** * Check "echo" logger. */ + @Test public void testEchoLogger() { IgniteLogger echo = new StringLogger(); @@ -420,4 +434,4 @@ private static class StringLogger extends NullLogger { return buf.toString(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/test/ParametersTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/test/ParametersTest.java index 7d94bb2297caa..ecd6fe4b3e2b3 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/test/ParametersTest.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/test/ParametersTest.java @@ -35,6 +35,7 @@ public class ParametersTest extends TestCase { /** * @throws Exception If failed. */ + @Test public void testEnumVariations() throws Exception { ConfigParameter[] modes = Parameters.enumParameters("setCacheMode", CacheMode.class); @@ -60,6 +61,7 @@ public void testEnumVariations() throws Exception { /** * @throws Exception If failed. */ + @Test public void testEnumVariationsWithNull() throws Exception { ConfigParameter[] cfgParam = Parameters.enumParameters(true, "setCacheMode", CacheMode.class); diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/test/VariationsIteratorTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/test/VariationsIteratorTest.java index 0e0118bf4c0ff..36b70b2dbb4df 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/test/VariationsIteratorTest.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/test/VariationsIteratorTest.java @@ -30,6 +30,7 @@ public class VariationsIteratorTest extends TestCase { /** * @throws Exception If failed. */ + @Test public void test1() throws Exception { Object[][] arr = new Object[][] { {0, 1}, @@ -43,6 +44,7 @@ public void test1() throws Exception { /** * @throws Exception If failed. */ + @Test public void test2() throws Exception { Object[][] arr = new Object[][] { {0}, @@ -57,6 +59,7 @@ public void test2() throws Exception { /** * @throws Exception If failed. */ + @Test public void test3() throws Exception { Object[][] arr = new Object[][] { {0, 1, 2, 3, 4, 5}, @@ -71,6 +74,7 @@ public void test3() throws Exception { /** * @throws Exception If failed. */ + @Test public void test4() throws Exception { Object[][] arr = new Object[][]{ {0,1,2}, @@ -88,6 +92,7 @@ public void test4() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSimple() throws Exception { Object[][] arr = new Object[][] { {0}, @@ -99,6 +104,7 @@ public void testSimple() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSimple2() throws Exception { Object[][] arr = new Object[][] { {0}, diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite.java index 930706d497b45..8cbf7a23c21ea 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite.java @@ -96,7 +96,8 @@ public static class MvccIgniteCacheTxPeekModesTest extends IgniteCacheTxPeekMode } /** {@inheritDoc} */ - @Override public void testLocalEntries() throws Exception { + @Override @Test + public void testLocalEntries() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10167"); super.testLocalEntries(); @@ -111,7 +112,8 @@ public static class MvccIgniteCacheTxReplicatedPeekModesTest extends IgniteCache } /** {@inheritDoc} */ - @Override public void testLocalEntries() throws Exception { + @Override @Test + public void testLocalEntries() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10167"); super.testLocalEntries(); diff --git a/modules/core/src/test/java/org/apache/ignite/thread/GridThreadPoolExecutorServiceSelfTest.java b/modules/core/src/test/java/org/apache/ignite/thread/GridThreadPoolExecutorServiceSelfTest.java index dce6328775ef8..b2cba486146db 100644 --- a/modules/core/src/test/java/org/apache/ignite/thread/GridThreadPoolExecutorServiceSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/thread/GridThreadPoolExecutorServiceSelfTest.java @@ -42,6 +42,7 @@ public class GridThreadPoolExecutorServiceSelfTest extends GridCommonAbstractTes /** * @throws Exception If failed. */ + @Test public void testSingleThreadExecutor() throws Exception { ExecutorService exec = Executors.newSingleThreadExecutor(); @@ -63,6 +64,7 @@ public void testSingleThreadExecutor() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSingleGridThreadExecutor() throws Exception { ExecutorService exec = Executors.newSingleThreadExecutor(new IgniteThreadFactory("gridName", "testThread")); @@ -84,6 +86,7 @@ public void testSingleGridThreadExecutor() throws Exception { /** * @throws ExecutionException If failed. */ + @Test public void testGridThreadPoolExecutor() throws Exception { IgniteThreadPoolExecutor exec = new IgniteThreadPoolExecutor("", "", 1, 1, 0, new LinkedBlockingQueue()); @@ -100,6 +103,7 @@ public void testGridThreadPoolExecutor() throws Exception { /** * @throws ExecutionException If failed. */ + @Test public void testGridThreadPoolExecutorRejection() throws Exception { IgniteThreadPoolExecutor exec = new IgniteThreadPoolExecutor("", "", 1, 1, 0, new LinkedBlockingQueue()); @@ -113,6 +117,7 @@ public void testGridThreadPoolExecutorRejection() throws Exception { /** * @throws ExecutionException If failed. */ + @Test public void testGridThreadPoolExecutorPrestartCoreThreads() throws Exception { final AtomicInteger curPoolSize = new AtomicInteger(); @@ -190,4 +195,4 @@ private final class TestRunnable implements Runnable { } } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/thread/GridThreadTest.java b/modules/core/src/test/java/org/apache/ignite/thread/GridThreadTest.java index 56741f6d65b9e..85d4b17456bb5 100644 --- a/modules/core/src/test/java/org/apache/ignite/thread/GridThreadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/thread/GridThreadTest.java @@ -33,6 +33,7 @@ public class GridThreadTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testAssertion() throws Exception { Collection ts = new ArrayList<>(); @@ -50,4 +51,4 @@ public void testAssertion() throws Exception { for (IgniteThread t : ts) t.join(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/thread/IgniteThreadPoolSizeTest.java b/modules/core/src/test/java/org/apache/ignite/thread/IgniteThreadPoolSizeTest.java index f8ea38a2e6a57..675682a8cf090 100644 --- a/modules/core/src/test/java/org/apache/ignite/thread/IgniteThreadPoolSizeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/thread/IgniteThreadPoolSizeTest.java @@ -39,6 +39,7 @@ private IgniteConfiguration configuration() { /** * @throws Exception If failed. */ + @Test public void testAsyncCallbackPoolSize() throws Exception { testWrongPoolSize(configuration().setAsyncCallbackPoolSize(WRONG_VALUE)); } @@ -46,6 +47,7 @@ public void testAsyncCallbackPoolSize() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIgfsThreadPoolSize() throws Exception { testWrongPoolSize(configuration().setIgfsThreadPoolSize(WRONG_VALUE)); } @@ -53,6 +55,7 @@ public void testIgfsThreadPoolSize() throws Exception { /** * @throws Exception If failed. */ + @Test public void testManagementThreadPoolSize() throws Exception { testWrongPoolSize(configuration().setManagementThreadPoolSize(WRONG_VALUE)); } @@ -60,6 +63,7 @@ public void testManagementThreadPoolSize() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPeerClassLoadingThreadPoolSize() throws Exception { testWrongPoolSize(configuration().setPeerClassLoadingThreadPoolSize(WRONG_VALUE)); } @@ -67,6 +71,7 @@ public void testPeerClassLoadingThreadPoolSize() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPublicThreadPoolSize() throws Exception { testWrongPoolSize(configuration().setPublicThreadPoolSize(WRONG_VALUE)); } @@ -74,6 +79,7 @@ public void testPublicThreadPoolSize() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRebalanceThreadPoolSize() throws Exception { testWrongPoolSize(configuration().setRebalanceThreadPoolSize(WRONG_VALUE)); } @@ -81,6 +87,7 @@ public void testRebalanceThreadPoolSize() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSystemThreadPoolSize() throws Exception { testWrongPoolSize(configuration().setSystemThreadPoolSize(WRONG_VALUE)); } @@ -88,6 +95,7 @@ public void testSystemThreadPoolSize() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUtilityCachePoolSize() throws Exception { testWrongPoolSize(configuration().setUtilityCachePoolSize(WRONG_VALUE)); } @@ -95,6 +103,7 @@ public void testUtilityCachePoolSize() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConnectorThreadPoolSize() throws Exception { final IgniteConfiguration cfg = configuration(); diff --git a/modules/core/src/test/java/org/apache/ignite/util/AttributeNodeFilterSelfTest.java b/modules/core/src/test/java/org/apache/ignite/util/AttributeNodeFilterSelfTest.java index 580835ccf2d3b..4cdb465fa13cb 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/AttributeNodeFilterSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/AttributeNodeFilterSelfTest.java @@ -68,6 +68,7 @@ public class AttributeNodeFilterSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testSingleAttribute() throws Exception { IgnitePredicate filter = new AttributeNodeFilter("attr", "value"); @@ -82,6 +83,7 @@ public void testSingleAttribute() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSingleAttributeNullValue() throws Exception { IgnitePredicate filter = new AttributeNodeFilter("attr", null); @@ -95,6 +97,7 @@ public void testSingleAttributeNullValue() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultipleAttributes() throws Exception { IgnitePredicate filter = new AttributeNodeFilter(F.asMap("attr1", "value1", "attr2", "value2")); @@ -111,6 +114,7 @@ public void testMultipleAttributes() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultipleAttributesNullValues() throws Exception { IgnitePredicate filter = new AttributeNodeFilter(F.asMap("attr1", null, "attr2", null)); @@ -126,6 +130,7 @@ public void testMultipleAttributesNullValues() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClusterGroup() throws Exception { Ignite group1 = startGridsMultiThreaded(3); @@ -146,6 +151,7 @@ public void testClusterGroup() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheFilter() throws Exception { Ignite group1 = startGridsMultiThreaded(3); diff --git a/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerSslTest.java b/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerSslTest.java index 59155e5b3713a..89a8ba0e6597e 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerSslTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerSslTest.java @@ -69,6 +69,7 @@ public class GridCommandHandlerSslTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testActivate() throws Exception { Ignite ignite = startGrids(1); diff --git a/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java b/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java index 6edde596e6da3..ebc1770e4d1bc 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java @@ -209,6 +209,7 @@ protected void injectTestSystemOut() { * * @throws Exception If failed. */ + @Test public void testActivate() throws Exception { Ignite ignite = startGrids(1); @@ -273,6 +274,7 @@ protected int execute(CommandHandler hnd, String... args) { * * @throws Exception If failed. */ + @Test public void testDeactivate() throws Exception { Ignite ignite = startGrids(1); @@ -292,6 +294,7 @@ public void testDeactivate() throws Exception { * * @throws Exception If failed. */ + @Test public void testState() throws Exception { Ignite ignite = startGrids(1); @@ -309,6 +312,7 @@ public void testState() throws Exception { * * @throws Exception If failed. */ + @Test public void testBaselineCollect() throws Exception { Ignite ignite = startGrids(1); @@ -345,6 +349,7 @@ private String consistentIds(Ignite... ignites) { * * @throws Exception If failed. */ + @Test public void testBaselineAdd() throws Exception { Ignite ignite = startGrids(1); @@ -365,6 +370,7 @@ public void testBaselineAdd() throws Exception { * * @throws Exception If failed. */ + @Test public void testBaselineRemove() throws Exception { Ignite ignite = startGrids(1); Ignite other = startGrid("nodeToStop"); @@ -388,6 +394,7 @@ public void testBaselineRemove() throws Exception { * * @throws Exception If failed. */ + @Test public void testBaselineSet() throws Exception { Ignite ignite = startGrids(1); @@ -409,6 +416,7 @@ public void testBaselineSet() throws Exception { * * @throws Exception If failed. */ + @Test public void testBaselineVersion() throws Exception { Ignite ignite = startGrids(1); @@ -430,6 +438,7 @@ public void testBaselineVersion() throws Exception { * * @throws Exception If failed. */ + @Test public void testActiveTransactions() throws Exception { Ignite ignite = startGridsMultiThreaded(2); @@ -589,6 +598,7 @@ else if (entry.getKey().equals(node2)) { /** * */ + @Test public void testKillHangingLocalTransactions() throws Exception { Ignite ignite = startGridsMultiThreaded(2); @@ -658,6 +668,7 @@ public void testKillHangingLocalTransactions() throws Exception { /** * Simulate uncommitted backup transactions and test rolling back using utility. */ + @Test public void testKillHangingRemoteTransactions() throws Exception { final int cnt = 3; @@ -836,6 +847,7 @@ public void testKillHangingRemoteTransactions() throws Exception { * * @throws Exception If failed. */ + @Test public void testBaselineAddOnNotActiveCluster() throws Exception { Ignite ignite = startGrid(1); @@ -862,6 +874,7 @@ public void testBaselineAddOnNotActiveCluster() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheHelp() throws Exception { Ignite ignite = startGrids(1); @@ -880,6 +893,7 @@ public void testCacheHelp() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheIdleVerify() throws Exception { Ignite ignite = startGrids(2); @@ -913,6 +927,7 @@ public void testCacheIdleVerify() throws Exception { * * @throws Exception If failed. */ + @Test public void testCacheIdleVerifyTwoConflictTypes() throws Exception { IgniteEx ignite = (IgniteEx)startGrids(2); @@ -950,6 +965,7 @@ public void testCacheIdleVerifyTwoConflictTypes() throws Exception { * * @throws Exception If failed. */ + @Test public void testCacheIdleVerifyDump() throws Exception { IgniteEx ignite = (IgniteEx)startGrids(3); @@ -1036,6 +1052,7 @@ private void assertSort(int expectedPartsCount, String output) { * * @throws Exception If failed. */ + @Test public void testCacheIdleVerifyDumpForCorruptedData() throws Exception { IgniteEx ignite = (IgniteEx)startGrids(3); @@ -1084,6 +1101,7 @@ public void testCacheIdleVerifyDumpForCorruptedData() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheIdleVerifyMovingParts() throws Exception { IgniteEx ignite = (IgniteEx)startGrids(2); @@ -1118,6 +1136,7 @@ public void testCacheIdleVerifyMovingParts() throws Exception { /** * */ + @Test public void testCacheContention() throws Exception { int cnt = 10; @@ -1191,6 +1210,7 @@ public void testCacheContention() throws Exception { /** * */ + @Test public void testCacheSequence() throws Exception { Ignite ignite = startGrid(); @@ -1215,6 +1235,7 @@ public void testCacheSequence() throws Exception { /** * */ + @Test public void testCacheGroups() throws Exception { Ignite ignite = startGrid(); @@ -1239,6 +1260,7 @@ public void testCacheGroups() throws Exception { /** * */ + @Test public void testCacheAffinity() throws Exception { Ignite ignite = startGrid(); @@ -1263,36 +1285,43 @@ public void testCacheAffinity() throws Exception { } /** */ + @Test public void testCacheConfigNoOutputFormat() throws Exception { testCacheConfig(null, 1, 1); } /** */ + @Test public void testCacheConfigSingleLineOutputFormatSingleNodeSignleCache() throws Exception { testCacheConfigSingleLineOutputFormat(1, 1); } /** */ + @Test public void testCacheConfigSingleLineOutputFormatTwoNodeSignleCache() throws Exception { testCacheConfigSingleLineOutputFormat(2, 1); } /** */ + @Test public void testCacheConfigSingleLineOutputFormatTwoNodeManyCaches() throws Exception { testCacheConfigSingleLineOutputFormat(2, 100); } /** */ + @Test public void testCacheConfigMultiLineOutputFormatSingleNodeSingleCache() throws Exception { testCacheConfigMultiLineOutputFormat(1, 1); } /** */ + @Test public void testCacheConfigMultiLineOutputFormatTwoNodeSingleCache() throws Exception { testCacheConfigMultiLineOutputFormat(2, 1); } /** */ + @Test public void testCacheConfigMultiLineOutputFormatTwoNodeManyCaches() throws Exception { testCacheConfigMultiLineOutputFormat(2, 100); } @@ -1365,6 +1394,7 @@ else if (outputFormat == MULTI_LINE) { /** * */ + @Test public void testCacheDistribution() throws Exception { Ignite ignite = startGrids(2); @@ -1415,6 +1445,7 @@ public void testCacheDistribution() throws Exception { /** * */ + @Test public void testCacheResetLostPartitions() throws Exception { Ignite ignite = startGrids(2); @@ -1470,6 +1501,7 @@ private Map generate(int from, int cnt) { * * @throws Exception if failed. */ + @Test public void testUnusedWalPrint() throws Exception { Ignite ignite = startGrids(2); @@ -1503,6 +1535,7 @@ public void testUnusedWalPrint() throws Exception { * * @throws Exception if failed. */ + @Test public void testUnusedWalDelete() throws Exception { Ignite ignite = startGrids(2); diff --git a/modules/core/src/test/java/org/apache/ignite/util/GridConcurrentLinkedDequeMultiThreadedTest.java b/modules/core/src/test/java/org/apache/ignite/util/GridConcurrentLinkedDequeMultiThreadedTest.java index 83cb20987b683..a7e6b7a248b8e 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/GridConcurrentLinkedDequeMultiThreadedTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/GridConcurrentLinkedDequeMultiThreadedTest.java @@ -36,6 +36,7 @@ public class GridConcurrentLinkedDequeMultiThreadedTest extends GridCommonAbstra /** * @throws Exception If failed. */ + @Test public void testQueueMultiThreaded() throws Exception { final AtomicBoolean done = new AtomicBoolean(); diff --git a/modules/core/src/test/java/org/apache/ignite/util/GridConcurrentLinkedDequeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/util/GridConcurrentLinkedDequeSelfTest.java index f695f75f90dce..6d99306e708ab 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/GridConcurrentLinkedDequeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/GridConcurrentLinkedDequeSelfTest.java @@ -30,6 +30,7 @@ public class GridConcurrentLinkedDequeSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPoll() throws Exception { ConcurrentLinkedDeque8 deque = new ConcurrentLinkedDeque8<>(); @@ -66,6 +67,7 @@ public void testPoll() throws Exception { /** * */ + @Test public void testUnlink() { ConcurrentLinkedDeque8 deque = new ConcurrentLinkedDeque8<>(); @@ -116,6 +118,7 @@ public void testUnlink() { /** * */ + @Test public void testEmptyDeque() { ConcurrentLinkedDeque8 deque = new ConcurrentLinkedDeque8<>(); @@ -175,6 +178,7 @@ private void checkSize(ConcurrentLinkedDeque8 q, int expSize) { /** * */ + @Test public void testUnlinkWithIterator() { ConcurrentLinkedDeque8 q = new ConcurrentLinkedDeque8<>(); @@ -211,6 +215,7 @@ public void testUnlinkWithIterator() { /** * */ + @Test public void testUnlinkLastWithIterator() { ConcurrentLinkedDeque8 q = new ConcurrentLinkedDeque8<>(); @@ -230,4 +235,4 @@ public void testUnlinkLastWithIterator() { assertFalse(it.hasNext()); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/util/GridConcurrentLinkedHashMapMultiThreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/util/GridConcurrentLinkedHashMapMultiThreadedSelfTest.java index 9fe2690d1d1f1..db0c4230e5419 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/GridConcurrentLinkedHashMapMultiThreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/GridConcurrentLinkedHashMapMultiThreadedSelfTest.java @@ -46,6 +46,7 @@ public class GridConcurrentLinkedHashMapMultiThreadedSelfTest extends GridCommon /** * @throws Exception If failed. */ + @Test public void testPut() throws Exception { info(">>> Test grid concurrent linked hash map..."); @@ -64,6 +65,7 @@ public void testPut() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutPerSegment() throws Exception { info(">>> Test grid concurrent linked hash map..."); @@ -81,6 +83,7 @@ public void testPutPerSegment() throws Exception { /** * @throws Exception If failed. */ + @Test public void testEvict() throws Exception { info(">>> Test grid concurrent linked hash map..."); @@ -143,6 +146,7 @@ public void testEvict() throws Exception { /** * @throws Exception If failed. */ + @Test public void testEvictPerSegment() throws Exception { info(">>> Test grid concurrent linked hash map..."); @@ -205,6 +209,7 @@ public void testEvictPerSegment() throws Exception { /** * @throws Exception If failed. */ + @Test public void testEvictPerSegmentOptimizedRemoves() throws Exception { info(">>> Test grid concurrent linked hash map..."); @@ -323,6 +328,7 @@ private Map> putMultiThreaded(final ConcurrentMap>> Test grid concurrent linked hash map iterator..."); diff --git a/modules/core/src/test/java/org/apache/ignite/util/GridIntListSelfTest.java b/modules/core/src/test/java/org/apache/ignite/util/GridIntListSelfTest.java index cc48fa8610942..19c7c2dde016e 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/GridIntListSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/GridIntListSelfTest.java @@ -30,6 +30,7 @@ public class GridIntListSelfTest extends TestCase { * @throws Exception If failed. */ @SuppressWarnings("ZeroLengthArrayAllocation") + @Test public void testCopyWithout() throws Exception { assertCopy( new GridIntList(new int[] {}), @@ -67,6 +68,7 @@ public void testCopyWithout() throws Exception { /** * */ + @Test public void testTruncate() { GridIntList list = asList(1, 2, 3, 4, 5, 6, 7, 8); @@ -108,6 +110,7 @@ private void assertCopy(GridIntList lst, GridIntList rmv) { /** * */ + @Test public void testRemove() { GridIntList list = asList(1, 2, 3, 4, 5, 6); @@ -130,6 +133,7 @@ public void testRemove() { /** * */ + @Test public void testSort() { assertEquals(new GridIntList(), new GridIntList().sort()); assertEquals(asList(1), asList(1).sort()); diff --git a/modules/core/src/test/java/org/apache/ignite/util/GridInternalTaskUnusedWalSegmentsTest.java b/modules/core/src/test/java/org/apache/ignite/util/GridInternalTaskUnusedWalSegmentsTest.java index a39b0c26fa723..5ffa69c93dcd7 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/GridInternalTaskUnusedWalSegmentsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/GridInternalTaskUnusedWalSegmentsTest.java @@ -96,6 +96,7 @@ public class GridInternalTaskUnusedWalSegmentsTest extends GridCommonAbstractTes * * @throws Exception if failed. */ + @Test public void testCorrectnessOfDeletionTaskSegments() throws Exception { try { IgniteEx ig0 = (IgniteEx)startGrids(4); diff --git a/modules/core/src/test/java/org/apache/ignite/util/GridLogThrottleTest.java b/modules/core/src/test/java/org/apache/ignite/util/GridLogThrottleTest.java index 37fa558a65add..e06423ba68040 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/GridLogThrottleTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/GridLogThrottleTest.java @@ -42,6 +42,7 @@ public GridLogThrottleTest() { * * @throws Exception If any error occurs. */ + @Test public void testThrottle() throws Exception { LT.throttleTimeout(1000); diff --git a/modules/core/src/test/java/org/apache/ignite/util/GridLongListSelfTest.java b/modules/core/src/test/java/org/apache/ignite/util/GridLongListSelfTest.java index 8849a3d2727d0..362fb2f167b6c 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/GridLongListSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/GridLongListSelfTest.java @@ -30,6 +30,7 @@ public class GridLongListSelfTest extends TestCase { * @throws Exception If failed. */ @SuppressWarnings("ZeroLengthArrayAllocation") + @Test public void testCopyWithout() throws Exception { assertCopy( new GridLongList(new long[] {}), @@ -67,6 +68,7 @@ public void testCopyWithout() throws Exception { /** * */ + @Test public void testTruncate() { GridLongList list = asList(1, 2, 3, 4, 5, 6, 7, 8); @@ -108,6 +110,7 @@ private void assertCopy(GridLongList lst, GridLongList rmv) { /** * */ + @Test public void testRemove() { GridLongList list = asList(1,2,3,4,5,6); @@ -130,6 +133,7 @@ public void testRemove() { /** * */ + @Test public void testSort() { assertEquals(new GridLongList(), new GridLongList().sort()); assertEquals(asList(1), asList(1).sort()); @@ -154,6 +158,7 @@ public void testSort() { /** * */ + @Test public void testArray() { GridLongList list = new GridLongList(); @@ -173,4 +178,4 @@ public void testArray() { assertEquals(1L, array[0]); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/util/GridMessageCollectionTest.java b/modules/core/src/test/java/org/apache/ignite/util/GridMessageCollectionTest.java index 13538817ee797..7ed7cf7f971c2 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/GridMessageCollectionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/GridMessageCollectionTest.java @@ -58,6 +58,7 @@ protected MessageReader reader(MessageFactory msgFactory, byte proto) { /** * */ + @Test public void testMarshal() { UUIDCollectionMessage um0 = UUIDCollectionMessage.of(); UUIDCollectionMessage um1 = UUIDCollectionMessage.of(randomUUID()); diff --git a/modules/core/src/test/java/org/apache/ignite/util/GridPartitionMapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/util/GridPartitionMapSelfTest.java index 9068e829072c3..b8828772069b6 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/GridPartitionMapSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/GridPartitionMapSelfTest.java @@ -35,6 +35,7 @@ @GridCommonTest(group = "Utils") public class GridPartitionMapSelfTest extends GridCommonAbstractTest { /** */ + @Test public void testPartitionStateMap() { GridPartitionStateMap map = initMap(new GridPartitionStateMap()); @@ -92,6 +93,7 @@ public void testPartitionStateMap() { } /** */ + @Test public void testEqualsAndHashCode() { GridPartitionStateMap map1 = initMap(new GridPartitionStateMap()); @@ -109,6 +111,7 @@ public void testEqualsAndHashCode() { /** * */ + @Test public void testCopy() { GridPartitionStateMap map1 = initMap(new GridPartitionStateMap()); @@ -134,6 +137,7 @@ public void testCopy() { /** * */ + @Test public void testCopyNoActive() { GridPartitionStateMap map2 = new GridPartitionStateMap(); @@ -150,6 +154,7 @@ public void testCopyNoActive() { /** * Tests that entries from {@link Iterator#next()} remain unaltered. */ + @Test public void testIteratorNext() { GridPartitionStateMap map = new GridPartitionStateMap(); @@ -182,6 +187,7 @@ public void testIteratorNext() { /** * Tests {@link GridDhtPartitionState} compatibility with {@link TreeMap} on random operations. */ + @Test public void testOnRandomOperations() { ThreadLocalRandom rnd = ThreadLocalRandom.current(); diff --git a/modules/core/src/test/java/org/apache/ignite/util/GridQueueSelfTest.java b/modules/core/src/test/java/org/apache/ignite/util/GridQueueSelfTest.java index 6a323776393e1..0aadeb4500d62 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/GridQueueSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/GridQueueSelfTest.java @@ -30,6 +30,7 @@ public class GridQueueSelfTest extends GridCommonAbstractTest { /** * */ + @Test public void testQueue() { GridQueue q = new GridQueue<>(); for (char c = 'a'; c <= 'z'; c++) @@ -69,4 +70,4 @@ public void testQueue() { assert q.isEmpty(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/util/GridRandomSelfTest.java b/modules/core/src/test/java/org/apache/ignite/util/GridRandomSelfTest.java index 005da6cf7bdce..0a99c8db52999 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/GridRandomSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/GridRandomSelfTest.java @@ -28,6 +28,7 @@ public class GridRandomSelfTest extends GridCommonAbstractTest { /** */ + @Test public void testRandom() { for (int i = 0; i < 100; i++) { long seed = ThreadLocalRandom.current().nextLong(); diff --git a/modules/core/src/test/java/org/apache/ignite/util/GridSnapshotLockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/util/GridSnapshotLockSelfTest.java index 97fa060aca4f3..57c1201e25e93 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/GridSnapshotLockSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/GridSnapshotLockSelfTest.java @@ -34,6 +34,7 @@ public class GridSnapshotLockSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testSyncConsistent() throws Exception { final AtomicBoolean stop = new AtomicBoolean(); @@ -110,4 +111,4 @@ public void testSyncConsistent() throws Exception { fut1.get(); fut2.get(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/util/GridSpinReadWriteLockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/util/GridSpinReadWriteLockSelfTest.java index a1040401f8764..102370c519333 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/GridSpinReadWriteLockSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/GridSpinReadWriteLockSelfTest.java @@ -36,6 +36,7 @@ public GridSpinReadWriteLockSelfTest() { /** * @throws Exception If any error occurs. */ + @Test public void testWriteLockReentry() throws Exception { GridSpinReadWriteLock lock = new GridSpinReadWriteLock(); @@ -51,6 +52,7 @@ public void testWriteLockReentry() throws Exception { /** * @throws Exception If any error occurs. */ + @Test public void testReadLockReentry() throws Exception { final GridSpinReadWriteLock lock = new GridSpinReadWriteLock(); @@ -93,6 +95,7 @@ public void testReadLockReentry() throws Exception { /** * @throws Exception If any error occurs. */ + @Test public void testLockDowngrade() throws Exception { GridSpinReadWriteLock lock = new GridSpinReadWriteLock(); @@ -124,6 +127,7 @@ public void testLockDowngrade() throws Exception { /** * @throws Exception If any error occurs. */ + @Test public void testMonitorState() throws Exception { GridSpinReadWriteLock lock = new GridSpinReadWriteLock(); @@ -141,4 +145,4 @@ public void testMonitorState() throws Exception { info("Caught expected exception: " + e); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/util/GridStringBuilderFactorySelfTest.java b/modules/core/src/test/java/org/apache/ignite/util/GridStringBuilderFactorySelfTest.java index e3639cad7907b..1ab60b9437356 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/GridStringBuilderFactorySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/GridStringBuilderFactorySelfTest.java @@ -35,6 +35,7 @@ public GridStringBuilderFactorySelfTest() { /** * Tests string builder factory. */ + @Test public void testStringBuilderFactory() { SB b1 = GridStringBuilderFactory.acquire(); @@ -70,4 +71,4 @@ public void testStringBuilderFactory() { assert b3.length() == 0; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/util/GridTopologyHeapSizeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/util/GridTopologyHeapSizeSelfTest.java index c8e4619e6dc40..0fd855a839e45 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/GridTopologyHeapSizeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/GridTopologyHeapSizeSelfTest.java @@ -55,6 +55,7 @@ public class GridTopologyHeapSizeSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testTopologyHeapSizeInOneJvm() throws Exception { try { ClusterNode node1 = startGrid(1).cluster().node(); @@ -72,6 +73,7 @@ public void testTopologyHeapSizeInOneJvm() throws Exception { } /** */ + @Test public void testTopologyHeapSizeForNodesWithDifferentPids() { GridTestNode node1 = getNode("123456789ABC", 1000); GridTestNode node2 = getNode("123456789ABC", 1001); @@ -85,6 +87,7 @@ public void testTopologyHeapSizeForNodesWithDifferentPids() { } /** */ + @Test public void testTopologyHeapSizeForNodesWithDifferentMacs() { GridTestNode node1 = getNode("123456789ABC", 1000); GridTestNode node2 = getNode("CBA987654321", 1000); @@ -117,4 +120,4 @@ private GridTestNode getNode(String mac, int pid) { return node; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/util/GridTransientTest.java b/modules/core/src/test/java/org/apache/ignite/util/GridTransientTest.java index 9614d20a7680e..30fd2271ff917 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/GridTransientTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/GridTransientTest.java @@ -49,6 +49,7 @@ public GridTransientTest() { /** * @throws Exception If failed. */ + @Test public void testTransientSerialization() throws Exception { GridTransientTest objSrc = new GridTransientTest(); @@ -70,4 +71,4 @@ public void testTransientSerialization() throws Exception { assertEquals(objDest.data1, null); assertEquals(objDest.data2, VALUE); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/util/mbeans/GridMBeanBaselineTest.java b/modules/core/src/test/java/org/apache/ignite/util/mbeans/GridMBeanBaselineTest.java index 31c012c8b2a49..3b2a4cacecdcc 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/mbeans/GridMBeanBaselineTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/mbeans/GridMBeanBaselineTest.java @@ -71,6 +71,7 @@ public class GridMBeanBaselineTest extends GridCommonAbstractTest { * * @throws Exception Thrown if test fails. */ + @Test public void testIgniteKernalNodeInBaselineTest() throws Exception { try { IgniteEx ignite0 = (IgniteEx)startGrids(NODES); diff --git a/modules/core/src/test/java/org/apache/ignite/util/mbeans/GridMBeanDisableSelfTest.java b/modules/core/src/test/java/org/apache/ignite/util/mbeans/GridMBeanDisableSelfTest.java index 356c05a2700d1..d111412ae5c6b 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/mbeans/GridMBeanDisableSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/mbeans/GridMBeanDisableSelfTest.java @@ -51,6 +51,7 @@ public class GridMBeanDisableSelfTest extends GridCommonAbstractTest { * * @throws Exception Thrown if test fails. */ + @Test public void testCorrectMBeanInfo() throws Exception { // Node should start and stopped with no errors. try (final Ignite ignite = startGrid(0)) { @@ -84,6 +85,7 @@ public void testCorrectMBeanInfo() throws Exception { } /** Check that a cache can be started when MBeans are disabled. */ + @Test public void testCacheStart() throws Exception { try ( Ignite ignite = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/util/mbeans/GridMBeanExoticNamesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/util/mbeans/GridMBeanExoticNamesSelfTest.java index 3b79f24b1a2b0..8722b6bd97c08 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/mbeans/GridMBeanExoticNamesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/mbeans/GridMBeanExoticNamesSelfTest.java @@ -28,11 +28,13 @@ */ public class GridMBeanExoticNamesSelfTest extends GridCommonAbstractTest { /** Test registration of a bean with special characters in group name. */ + @Test public void testGroupWithSpecialSymbols() throws Exception { checkMBeanRegistration("dummy!@#$^&*()?\\grp", "dummy"); } /** Test registration of a bean with special characters in name. */ + @Test public void testNameWithSpecialSymbols() throws Exception { checkMBeanRegistration("dummygrp", "dum!@#$^&*()?\\my"); } @@ -67,4 +69,4 @@ private static class DummyMBeanImpl implements DummyMBean { // No op. } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/util/mbeans/GridMBeanSelfTest.java b/modules/core/src/test/java/org/apache/ignite/util/mbeans/GridMBeanSelfTest.java index 4e329f9fc9437..4a62102e8bef2 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/mbeans/GridMBeanSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/mbeans/GridMBeanSelfTest.java @@ -39,6 +39,7 @@ public class GridMBeanSelfTest extends GridCommonAbstractTest { * * @throws Exception Thrown if test fails. */ + @Test public void testCorrectMBeanInfo() throws Exception { StandardMBean mbean = new IgniteStandardMXBean(new GridMBeanImplementation(), GridMBeanInterface.class); @@ -85,6 +86,7 @@ public void testCorrectMBeanInfo() throws Exception { * * @throws Exception Thrown if test fails. */ + @Test public void testMissedNameMBeanInfo() throws Exception { try { StandardMBean mbean = new IgniteStandardMXBean(new GridMBeanImplementation(), GridMBeanInterfaceBad.class); @@ -103,6 +105,7 @@ public void testMissedNameMBeanInfo() throws Exception { * * @throws Exception Thrown if test fails. */ + @Test public void testMissedDescriptionMBeanInfo() throws Exception { try { StandardMBean mbean = new IgniteStandardMXBean(new GridMBeanImplementation(), @@ -122,6 +125,7 @@ public void testMissedDescriptionMBeanInfo() throws Exception { * * @throws Exception Thrown if test fails. */ + @Test public void testEmptyDescriptionMBeanInfo() throws Exception { try { StandardMBean mbean = new IgniteStandardMXBean(new GridMBeanImplementation(), @@ -141,6 +145,7 @@ public void testEmptyDescriptionMBeanInfo() throws Exception { * * @throws Exception Thrown if test fails. */ + @Test public void testEmptyNameMBeanInfo() throws Exception { try { StandardMBean mbean = new IgniteStandardMXBean(new GridMBeanImplementation(), @@ -160,6 +165,7 @@ public void testEmptyNameMBeanInfo() throws Exception { * * @throws Exception Thrown if test fails. */ + @Test public void testIgniteKernalReturnsValidMBeanInfo() throws Exception { try { IgniteEx igniteCrd = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/util/mbeans/WorkersControlMXBeanTest.java b/modules/core/src/test/java/org/apache/ignite/util/mbeans/WorkersControlMXBeanTest.java index cb30906371f81..815f885b38d9d 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/mbeans/WorkersControlMXBeanTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/mbeans/WorkersControlMXBeanTest.java @@ -1,98 +1,100 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You 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.apache.ignite.util.mbeans; - -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import org.apache.ignite.internal.worker.WorkersControlMXBeanImpl; -import org.apache.ignite.mxbean.WorkersControlMXBean; -import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; - -/** - * {@link WorkersControlMXBean} test. - */ -public class WorkersControlMXBeanTest extends GridCommonAbstractTest { - /** Test thread name. */ - private static final String TEST_THREAD_NAME = "test-thread"; - - /** - * @throws Exception Thrown if test fails. - */ - public void testStopThreadByUniqueName() throws Exception { - WorkersControlMXBean workersCtrlMXBean = new WorkersControlMXBeanImpl(null); - - Thread t = startTestThread(); - - assertTrue(workersCtrlMXBean.stopThreadByUniqueName(TEST_THREAD_NAME)); - - t.join(500); - - assertFalse(workersCtrlMXBean.stopThreadByUniqueName(TEST_THREAD_NAME)); - - Thread t1 = startTestThread(); - Thread t2 = startTestThread(); - - assertFalse(workersCtrlMXBean.stopThreadByUniqueName(TEST_THREAD_NAME)); - - t1.stop(); - t2.stop(); - } - - /** - * @throws Exception Thrown if test fails. - */ - public void testStopThreadById() throws Exception { - WorkersControlMXBean workersCtrlMXBean = new WorkersControlMXBeanImpl(null); - - Thread t1 = startTestThread(); - Thread t2 = startTestThread(); - - assertTrue(workersCtrlMXBean.stopThreadById(t1.getId())); - assertTrue(workersCtrlMXBean.stopThreadById(t2.getId())); - - t1.join(500); - t2.join(500); - - assertFalse(workersCtrlMXBean.stopThreadById(t1.getId())); - assertFalse(workersCtrlMXBean.stopThreadById(t2.getId())); - } - - /** - * @return Started thread. - */ - private static Thread startTestThread() throws InterruptedException { - final CountDownLatch latch = new CountDownLatch(1); - - Thread t = new Thread(TEST_THREAD_NAME) { - @Override public void run() { - latch.countDown(); - - for (;;) - ; - } - }; - - t.start(); - - assertTrue(latch.await(500, TimeUnit.MILLISECONDS)); - - assertTrue(t.isAlive()); - - return t; - } -} +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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.apache.ignite.util.mbeans; + +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; +import org.apache.ignite.internal.worker.WorkersControlMXBeanImpl; +import org.apache.ignite.mxbean.WorkersControlMXBean; +import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; + +/** + * {@link WorkersControlMXBean} test. + */ +public class WorkersControlMXBeanTest extends GridCommonAbstractTest { + /** Test thread name. */ + private static final String TEST_THREAD_NAME = "test-thread"; + + /** + * @throws Exception Thrown if test fails. + */ + @Test + public void testStopThreadByUniqueName() throws Exception { + WorkersControlMXBean workersCtrlMXBean = new WorkersControlMXBeanImpl(null); + + Thread t = startTestThread(); + + assertTrue(workersCtrlMXBean.stopThreadByUniqueName(TEST_THREAD_NAME)); + + t.join(500); + + assertFalse(workersCtrlMXBean.stopThreadByUniqueName(TEST_THREAD_NAME)); + + Thread t1 = startTestThread(); + Thread t2 = startTestThread(); + + assertFalse(workersCtrlMXBean.stopThreadByUniqueName(TEST_THREAD_NAME)); + + t1.stop(); + t2.stop(); + } + + /** + * @throws Exception Thrown if test fails. + */ + @Test + public void testStopThreadById() throws Exception { + WorkersControlMXBean workersCtrlMXBean = new WorkersControlMXBeanImpl(null); + + Thread t1 = startTestThread(); + Thread t2 = startTestThread(); + + assertTrue(workersCtrlMXBean.stopThreadById(t1.getId())); + assertTrue(workersCtrlMXBean.stopThreadById(t2.getId())); + + t1.join(500); + t2.join(500); + + assertFalse(workersCtrlMXBean.stopThreadById(t1.getId())); + assertFalse(workersCtrlMXBean.stopThreadById(t2.getId())); + } + + /** + * @return Started thread. + */ + private static Thread startTestThread() throws InterruptedException { + final CountDownLatch latch = new CountDownLatch(1); + + Thread t = new Thread(TEST_THREAD_NAME) { + @Override public void run() { + latch.countDown(); + + for (;;) + ; + } + }; + + t.start(); + + assertTrue(latch.await(500, TimeUnit.MILLISECONDS)); + + assertTrue(t.isAlive()); + + return t; + } +} From a72e24ea010fd7333b7425c349e3de1373aed0fc Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Mon, 3 Dec 2018 03:24:34 +0300 Subject: [PATCH 002/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview --- .../cache/IgniteCacheEntryProcessorSequentialCallTest.java | 4 ++++ .../org/apache/ignite/cache/IgniteWarmupClosureSelfTest.java | 4 ++++ .../java/org/apache/ignite/cache/LargeEntryUpdateTest.java | 4 ++++ .../java/org/apache/ignite/cache/ResetLostPartitionTest.java | 4 ++++ .../cache/affinity/AbstractAffinityFunctionSelfTest.java | 4 ++++ .../ignite/cache/affinity/AffinityClientNodeSelfTest.java | 4 ++++ .../cache/affinity/AffinityDistributionLoggingTest.java | 4 ++++ .../AffinityFunctionBackupFilterAbstractSelfTest.java | 4 ++++ .../AffinityFunctionExcludeNeighborsAbstractSelfTest.java | 4 ++++ .../ignite/cache/affinity/AffinityHistoryCleanupTest.java | 4 ++++ .../cache/affinity/local/LocalAffinityFunctionTest.java | 4 ++++ ...eStoreListenerRWThroughDisabledTransactionalCacheTest.java | 4 ++++ .../ignite/cache/store/CacheStoreReadFromBackupTest.java | 4 ++++ .../store/CacheStoreSessionListenerAbstractSelfTest.java | 4 ++++ .../store/CacheStoreSessionListenerLifecycleSelfTest.java | 4 ++++ ...reSessionListenerReadWriteThroughDisabledAbstractTest.java | 4 ++++ .../CacheStoreSessionListenerWriteBehindEnabledTest.java | 4 ++++ .../apache/ignite/cache/store/CacheStoreWriteErrorTest.java | 4 ++++ .../ignite/cache/store/GridCacheBalancingStoreSelfTest.java | 4 ++++ .../cache/store/GridCacheLoadOnlyStoreAdapterSelfTest.java | 4 ++++ .../org/apache/ignite/cache/store/GridStoreLoadCacheTest.java | 4 ++++ .../cache/store/IgniteCacheExpiryStoreLoadSelfTest.java | 4 ++++ .../ignite/cache/store/StoreResourceInjectionSelfTest.java | 4 ++++ .../cache/store/jdbc/CacheJdbcPojoStoreAbstractSelfTest.java | 4 ++++ .../jdbc/CacheJdbcPojoStoreBinaryMarshallerSelfTest.java | 4 ++++ .../ignite/cache/store/jdbc/CacheJdbcPojoStoreTest.java | 4 ++++ .../jdbc/CacheJdbcStoreAbstractMultithreadedSelfTest.java | 4 ++++ .../jdbc/GridCacheJdbcBlobStoreMultithreadedSelfTest.java | 4 ++++ .../cache/store/jdbc/JdbcTypesDefaultTransformerTest.java | 4 ++++ 29 files changed, 116 insertions(+) diff --git a/modules/core/src/test/java/org/apache/ignite/cache/IgniteCacheEntryProcessorSequentialCallTest.java b/modules/core/src/test/java/org/apache/ignite/cache/IgniteCacheEntryProcessorSequentialCallTest.java index 38a8ef76e0969..111c89c67985c 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/IgniteCacheEntryProcessorSequentialCallTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/IgniteCacheEntryProcessorSequentialCallTest.java @@ -31,9 +31,13 @@ import javax.cache.processor.EntryProcessorException; import javax.cache.processor.MutableEntry; import org.apache.ignite.transactions.TransactionOptimisticException; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** */ +@RunWith(JUnit4.class) public class IgniteCacheEntryProcessorSequentialCallTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/cache/IgniteWarmupClosureSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/IgniteWarmupClosureSelfTest.java index 9101a1b92397d..38dae8276d773 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/IgniteWarmupClosureSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/IgniteWarmupClosureSelfTest.java @@ -24,10 +24,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.startup.BasicWarmupClosure; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteWarmupClosureSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/cache/LargeEntryUpdateTest.java b/modules/core/src/test/java/org/apache/ignite/cache/LargeEntryUpdateTest.java index b464a92c99bab..e842a10165f51 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/LargeEntryUpdateTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/LargeEntryUpdateTest.java @@ -31,10 +31,14 @@ import org.apache.ignite.lang.IgniteRunnable; import org.apache.ignite.resources.IgniteInstanceResource; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class LargeEntryUpdateTest extends GridCommonAbstractTest { /** */ private static final int THREAD_COUNT = 10; diff --git a/modules/core/src/test/java/org/apache/ignite/cache/ResetLostPartitionTest.java b/modules/core/src/test/java/org/apache/ignite/cache/ResetLostPartitionTest.java index 653dc169cc912..75f7264138239 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/ResetLostPartitionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/ResetLostPartitionTest.java @@ -37,6 +37,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState.LOST; import static org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState.OWNING; @@ -45,6 +48,7 @@ /** * */ +@RunWith(JUnit4.class) public class ResetLostPartitionTest extends GridCommonAbstractTest { /** Ip finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/cache/affinity/AbstractAffinityFunctionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/affinity/AbstractAffinityFunctionSelfTest.java index 1ee800fd8b4d8..d11609ee54d9f 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/affinity/AbstractAffinityFunctionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/affinity/AbstractAffinityFunctionSelfTest.java @@ -32,10 +32,14 @@ import org.apache.ignite.internal.processors.affinity.GridAffinityFunctionContextImpl; import org.apache.ignite.testframework.GridTestNode; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public abstract class AbstractAffinityFunctionSelfTest extends GridCommonAbstractTest { /** MAC prefix. */ private static final String MAC_PREF = "MAC"; diff --git a/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityClientNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityClientNodeSelfTest.java index 25a0c04203701..fddebd1093411 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityClientNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityClientNodeSelfTest.java @@ -31,12 +31,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.REPLICATED; /** * */ +@RunWith(JUnit4.class) public class AffinityClientNodeSelfTest extends GridCommonAbstractTest { /** */ protected static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityDistributionLoggingTest.java b/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityDistributionLoggingTest.java index 2e67039137f17..60ddfd48165cf 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityDistributionLoggingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityDistributionLoggingTest.java @@ -35,6 +35,9 @@ import org.apache.ignite.testframework.GridStringLogger; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_PART_DISTRIBUTION_WARN_THRESHOLD; import static org.apache.ignite.internal.IgniteNodeAttributes.ATTR_IGNITE_INSTANCE_NAME; @@ -46,6 +49,7 @@ * * @see EvenDistributionAffinityFunction */ +@RunWith(JUnit4.class) public class AffinityDistributionLoggingTest extends GridCommonAbstractTest { /** Pattern to test. */ private static final String LOG_MESSAGE_PREFIX = "Local node affinity assignment distribution is not ideal "; diff --git a/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityFunctionBackupFilterAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityFunctionBackupFilterAbstractSelfTest.java index f81a4cd25221f..909b741666a04 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityFunctionBackupFilterAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityFunctionBackupFilterAbstractSelfTest.java @@ -34,6 +34,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -42,6 +45,7 @@ /** * Base tests of {@link AffinityFunction} implementations with user provided backup filter. */ +@RunWith(JUnit4.class) public abstract class AffinityFunctionBackupFilterAbstractSelfTest extends GridCommonAbstractTest { /** Ip finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityFunctionExcludeNeighborsAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityFunctionExcludeNeighborsAbstractSelfTest.java index d4d24a78dbec7..a13cf5af8e1b3 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityFunctionExcludeNeighborsAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityFunctionExcludeNeighborsAbstractSelfTest.java @@ -35,6 +35,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheRebalanceMode.NONE; @@ -42,6 +45,7 @@ /** * Partitioned affinity test. */ +@RunWith(JUnit4.class) public abstract class AffinityFunctionExcludeNeighborsAbstractSelfTest extends GridCommonAbstractTest { /** Number of backups. */ private int backups = 2; diff --git a/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityHistoryCleanupTest.java b/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityHistoryCleanupTest.java index c8b7d389ed975..ff7f105d510df 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityHistoryCleanupTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityHistoryCleanupTest.java @@ -36,10 +36,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class AffinityHistoryCleanupTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/cache/affinity/local/LocalAffinityFunctionTest.java b/modules/core/src/test/java/org/apache/ignite/cache/affinity/local/LocalAffinityFunctionTest.java index fc4a238dff342..e83b96baa3753 100755 --- a/modules/core/src/test/java/org/apache/ignite/cache/affinity/local/LocalAffinityFunctionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/affinity/local/LocalAffinityFunctionTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for local affinity function. */ +@RunWith(JUnit4.class) public class LocalAffinityFunctionTest extends GridCommonAbstractTest { /** */ protected static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreListenerRWThroughDisabledTransactionalCacheTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreListenerRWThroughDisabledTransactionalCacheTest.java index 9a6aaf9f0349d..e5dbd6a3f9bff 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreListenerRWThroughDisabledTransactionalCacheTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreListenerRWThroughDisabledTransactionalCacheTest.java @@ -23,6 +23,9 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC; @@ -35,6 +38,7 @@ * This class tests that redundant calls of {@link CacheStoreSessionListener#onSessionStart(CacheStoreSession)} * and {@link CacheStoreSessionListener#onSessionEnd(CacheStoreSession, boolean)} are not executed. */ +@RunWith(JUnit4.class) public class CacheStoreListenerRWThroughDisabledTransactionalCacheTest extends CacheStoreSessionListenerReadWriteThroughDisabledAbstractTest { /** {@inheritDoc} */ @Override protected CacheAtomicityMode atomicityMode() { diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreReadFromBackupTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreReadFromBackupTest.java index 6f33034595eb7..8ee347cdae687 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreReadFromBackupTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreReadFromBackupTest.java @@ -33,6 +33,9 @@ import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.lang.IgniteBiInClosure; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -44,6 +47,7 @@ * Checks that once value is read from store, it will be loaded in * backups as well. */ +@RunWith(JUnit4.class) public class CacheStoreReadFromBackupTest extends GridCommonAbstractTest { /** */ public static final String CACHE_NAME = "cache"; diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerAbstractSelfTest.java index 7a04d87f7fd9e..01cecaf15b1d4 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerAbstractSelfTest.java @@ -36,10 +36,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for store session listeners. */ +@RunWith(JUnit4.class) public abstract class CacheStoreSessionListenerAbstractSelfTest extends GridCommonAbstractTest implements Serializable { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerLifecycleSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerLifecycleSelfTest.java index b7f46c38e7d2a..940c67078a1ac 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerLifecycleSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerLifecycleSelfTest.java @@ -36,12 +36,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; /** * Store session listeners test. */ +@RunWith(JUnit4.class) public class CacheStoreSessionListenerLifecycleSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerReadWriteThroughDisabledAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerReadWriteThroughDisabledAbstractTest.java index 8681e31a3a6b7..70f6a9fef301e 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerReadWriteThroughDisabledAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerReadWriteThroughDisabledAbstractTest.java @@ -39,11 +39,15 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.internal.processors.cache.GridCacheAbstractSelfTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * This class tests that redundant calls of {@link CacheStoreSessionListener#onSessionStart(CacheStoreSession)} * and {@link CacheStoreSessionListener#onSessionEnd(CacheStoreSession, boolean)} are not executed. */ +@RunWith(JUnit4.class) public abstract class CacheStoreSessionListenerReadWriteThroughDisabledAbstractTest extends GridCacheAbstractSelfTest { /** {@inheritDoc} */ @Override protected int gridCount() { diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerWriteBehindEnabledTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerWriteBehindEnabledTest.java index 07b80cbe31005..863f7b8c4e65e 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerWriteBehindEnabledTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerWriteBehindEnabledTest.java @@ -44,12 +44,16 @@ import org.apache.ignite.internal.processors.cache.store.GridCacheWriteBehindStore; import org.apache.ignite.resources.CacheStoreSessionResource; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * This class tests that calls of {@link CacheStoreSessionListener#onSessionStart(CacheStoreSession)} * and {@link CacheStoreSessionListener#onSessionEnd(CacheStoreSession, boolean)} are executed from * {@link GridCacheWriteBehindStore} only. */ +@RunWith(JUnit4.class) public class CacheStoreSessionListenerWriteBehindEnabledTest extends GridCacheAbstractSelfTest { /** */ protected static final int CNT = 100; diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreWriteErrorTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreWriteErrorTest.java index 7104f5330c944..ec6c72bc528f2 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreWriteErrorTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreWriteErrorTest.java @@ -32,10 +32,14 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * This class tests handling exceptions from {@link CacheStore#write(Cache.Entry)}. */ +@RunWith(JUnit4.class) public class CacheStoreWriteErrorTest extends GridCommonAbstractTest { /** */ public static final String CACHE_NAME = "cache"; diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/GridCacheBalancingStoreSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/GridCacheBalancingStoreSelfTest.java index e9146c3adcf34..067399e6fb5cb 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/GridCacheBalancingStoreSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/GridCacheBalancingStoreSelfTest.java @@ -43,10 +43,14 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Store test. */ +@RunWith(JUnit4.class) public class GridCacheBalancingStoreSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/GridCacheLoadOnlyStoreAdapterSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/GridCacheLoadOnlyStoreAdapterSelfTest.java index cdb7659e4a977..1ab621c19185b 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/GridCacheLoadOnlyStoreAdapterSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/GridCacheLoadOnlyStoreAdapterSelfTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.internal.util.typedef.T2; import org.apache.ignite.lang.IgniteBiTuple; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class GridCacheLoadOnlyStoreAdapterSelfTest extends GridCacheAbstractSelfTest { /** Expected loadAll arguments, hardcoded on call site for convenience. */ private static final Integer[] EXP_ARGS = {1, 2, 3}; diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/GridStoreLoadCacheTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/GridStoreLoadCacheTest.java index 0523980b166a0..2292d30574b7c 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/GridStoreLoadCacheTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/GridStoreLoadCacheTest.java @@ -31,11 +31,15 @@ import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.lang.IgniteBiInClosure; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test checks that local cacheLoad task never blocks remote * cacheLoad. */ +@RunWith(JUnit4.class) public class GridStoreLoadCacheTest extends GridCommonAbstractTest { /** Barrier. */ private static final CyclicBarrier BARRIER = new CyclicBarrier(3); diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/IgniteCacheExpiryStoreLoadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/IgniteCacheExpiryStoreLoadSelfTest.java index 6c6060108f75d..22d9211bfc1f5 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/IgniteCacheExpiryStoreLoadSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/IgniteCacheExpiryStoreLoadSelfTest.java @@ -39,6 +39,9 @@ import org.apache.ignite.lang.IgniteBiInClosure; import org.apache.ignite.testframework.GridTestUtils; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -46,6 +49,7 @@ /** * Test check that cache values removes from cache on expiry. */ +@RunWith(JUnit4.class) public class IgniteCacheExpiryStoreLoadSelfTest extends GridCacheAbstractSelfTest { /** Expected time to live in milliseconds. */ private static final int TIME_TO_LIVE = 1000; diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/StoreResourceInjectionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/StoreResourceInjectionSelfTest.java index 735e2d1acbf82..2ec4f50ea9389 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/StoreResourceInjectionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/StoreResourceInjectionSelfTest.java @@ -25,10 +25,14 @@ import org.apache.ignite.testframework.junits.common.*; import javax.cache.configuration.*; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test resource injection. */ +@RunWith(JUnit4.class) public class StoreResourceInjectionSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreAbstractSelfTest.java index e0701d5fa5ed7..a3f78324d43ee 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreAbstractSelfTest.java @@ -42,6 +42,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -50,6 +53,7 @@ /** * Class for {@link CacheJdbcPojoStore} tests. */ +@RunWith(JUnit4.class) public abstract class CacheJdbcPojoStoreAbstractSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreBinaryMarshallerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreBinaryMarshallerSelfTest.java index 4e532684c774b..b95ed24b111f7 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreBinaryMarshallerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreBinaryMarshallerSelfTest.java @@ -19,10 +19,14 @@ import org.apache.ignite.marshaller.Marshaller; import org.apache.ignite.internal.binary.BinaryMarshaller; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for {@link CacheJdbcPojoStore} with binary marshaller. */ +@RunWith(JUnit4.class) public class CacheJdbcPojoStoreBinaryMarshallerSelfTest extends CacheJdbcPojoStoreAbstractSelfTest { /** {@inheritDoc} */ @Override protected Marshaller marshaller(){ diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreTest.java index 990ecf5e71df0..f2db5dfaa5c55 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreTest.java @@ -50,10 +50,14 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.cache.GridAbstractCacheStoreSelfTest; import org.h2.jdbcx.JdbcConnectionPool; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Class for {@code PojoCacheStore} tests. */ +@RunWith(JUnit4.class) public class CacheJdbcPojoStoreTest extends GridAbstractCacheStoreSelfTest> { /** DB connection URL. */ private static final String DFLT_CONN_URL = "jdbc:h2:mem:autoCacheStore;DB_CLOSE_DELAY=-1"; diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcStoreAbstractMultithreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcStoreAbstractMultithreadedSelfTest.java index 3861de3bb9d5c..298e5a4b044d8 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcStoreAbstractMultithreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcStoreAbstractMultithreadedSelfTest.java @@ -48,6 +48,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.springframework.beans.BeansException; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.context.support.GenericApplicationContext; @@ -61,6 +64,7 @@ /** * */ +@RunWith(JUnit4.class) public abstract class CacheJdbcStoreAbstractMultithreadedSelfTest extends GridCommonAbstractTest { /** Default config with mapping. */ diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/GridCacheJdbcBlobStoreMultithreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/GridCacheJdbcBlobStoreMultithreadedSelfTest.java index c12d683aff57c..a58a65a9a1322 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/GridCacheJdbcBlobStoreMultithreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/GridCacheJdbcBlobStoreMultithreadedSelfTest.java @@ -42,6 +42,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -52,6 +55,7 @@ /** * */ +@RunWith(JUnit4.class) public class GridCacheJdbcBlobStoreMultithreadedSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/JdbcTypesDefaultTransformerTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/JdbcTypesDefaultTransformerTest.java index 0f7cc839648e1..a1d5690c8c3fb 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/JdbcTypesDefaultTransformerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/JdbcTypesDefaultTransformerTest.java @@ -28,10 +28,14 @@ import java.sql.Timestamp; import java.util.UUID; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for {@link JdbcTypesDefaultTransformer}. */ +@RunWith(JUnit4.class) public class JdbcTypesDefaultTransformerTest extends GridCommonAbstractTest { /** * @throws Exception If failed. From eeeba1cc2f9d9dc02065c19c7c1079008bf73e00 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Mon, 3 Dec 2018 03:26:13 +0300 Subject: [PATCH 003/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview --- .../test/java/org/apache/ignite/client/SslParametersTest.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/core/src/test/java/org/apache/ignite/client/SslParametersTest.java b/modules/core/src/test/java/org/apache/ignite/client/SslParametersTest.java index dd9511d996ace..132f0d8b027d5 100644 --- a/modules/core/src/test/java/org/apache/ignite/client/SslParametersTest.java +++ b/modules/core/src/test/java/org/apache/ignite/client/SslParametersTest.java @@ -27,10 +27,14 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests cases when node connects to cluster with different set of cipher suites. */ +@RunWith(JUnit4.class) public class SslParametersTest extends GridCommonAbstractTest { public static final String TEST_CACHE_NAME = "TEST"; From 9304b5f31ef712708be7d04b68a963d8bf4b050d Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Mon, 3 Dec 2018 03:29:51 +0300 Subject: [PATCH 004/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview --- .../apache/ignite/failure/FailureHandlerTriggeredTest.java | 4 ++++ .../ignite/failure/FailureHandlingConfigurationTest.java | 4 ++++ .../org/apache/ignite/failure/IoomFailureHandlerTest.java | 4 ++++ .../java/org/apache/ignite/failure/OomFailureHandlerTest.java | 4 ++++ .../org/apache/ignite/failure/StopNodeFailureHandlerTest.java | 4 ++++ .../ignite/failure/StopNodeOrHaltFailureHandlerTest.java | 4 ++++ .../org/apache/ignite/failure/SystemWorkersBlockingTest.java | 4 ++++ .../apache/ignite/failure/SystemWorkersTerminationTest.java | 4 ++++ 8 files changed, 32 insertions(+) diff --git a/modules/core/src/test/java/org/apache/ignite/failure/FailureHandlerTriggeredTest.java b/modules/core/src/test/java/org/apache/ignite/failure/FailureHandlerTriggeredTest.java index 035ce0179e996..79a2116b9ad0d 100644 --- a/modules/core/src/test/java/org/apache/ignite/failure/FailureHandlerTriggeredTest.java +++ b/modules/core/src/test/java/org/apache/ignite/failure/FailureHandlerTriggeredTest.java @@ -29,10 +29,14 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test of triggering of failure handler. */ +@RunWith(JUnit4.class) public class FailureHandlerTriggeredTest extends GridCommonAbstractTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/failure/FailureHandlingConfigurationTest.java b/modules/core/src/test/java/org/apache/ignite/failure/FailureHandlingConfigurationTest.java index 728fbfe70b038..b7a9f1dc54263 100644 --- a/modules/core/src/test/java/org/apache/ignite/failure/FailureHandlingConfigurationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/failure/FailureHandlingConfigurationTest.java @@ -33,6 +33,9 @@ import org.apache.ignite.internal.worker.WorkersRegistry; import org.apache.ignite.mxbean.FailureHandlingMxBean; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_CHECKPOINT_READ_LOCK_TIMEOUT; import static org.apache.ignite.IgniteSystemProperties.IGNITE_SYSTEM_WORKER_BLOCKED_TIMEOUT; @@ -40,6 +43,7 @@ /** * Tests configuration parameters related to failure handling. */ +@RunWith(JUnit4.class) public class FailureHandlingConfigurationTest extends GridCommonAbstractTest { /** */ private Long checkpointReadLockTimeout; diff --git a/modules/core/src/test/java/org/apache/ignite/failure/IoomFailureHandlerTest.java b/modules/core/src/test/java/org/apache/ignite/failure/IoomFailureHandlerTest.java index c73a99f8cd98b..c2f5935d2f38f 100644 --- a/modules/core/src/test/java/org/apache/ignite/failure/IoomFailureHandlerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/failure/IoomFailureHandlerTest.java @@ -28,10 +28,14 @@ import org.apache.ignite.internal.mem.IgniteOutOfMemoryException; import org.apache.ignite.internal.util.typedef.X; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * IgniteOutOfMemoryError failure handler test. */ +@RunWith(JUnit4.class) public class IoomFailureHandlerTest extends AbstractFailureHandlerTest { /** Offheap size for memory policy. */ private static final int SIZE = 10 * 1024 * 1024; diff --git a/modules/core/src/test/java/org/apache/ignite/failure/OomFailureHandlerTest.java b/modules/core/src/test/java/org/apache/ignite/failure/OomFailureHandlerTest.java index eb6fa3233d433..243316a887a5d 100644 --- a/modules/core/src/test/java/org/apache/ignite/failure/OomFailureHandlerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/failure/OomFailureHandlerTest.java @@ -36,10 +36,14 @@ import org.apache.ignite.services.Service; import org.apache.ignite.services.ServiceContext; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Out of memory error failure handler test. */ +@RunWith(JUnit4.class) public class OomFailureHandlerTest extends AbstractFailureHandlerTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/failure/StopNodeFailureHandlerTest.java b/modules/core/src/test/java/org/apache/ignite/failure/StopNodeFailureHandlerTest.java index fb249fbc51e43..c6f13f791dd10 100644 --- a/modules/core/src/test/java/org/apache/ignite/failure/StopNodeFailureHandlerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/failure/StopNodeFailureHandlerTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.internal.IgnitionEx; import org.apache.ignite.internal.util.typedef.PE; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * {@link StopNodeFailureHandler} tests. */ +@RunWith(JUnit4.class) public class StopNodeFailureHandlerTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected FailureHandler getFailureHandler(String igniteInstanceName) { diff --git a/modules/core/src/test/java/org/apache/ignite/failure/StopNodeOrHaltFailureHandlerTest.java b/modules/core/src/test/java/org/apache/ignite/failure/StopNodeOrHaltFailureHandlerTest.java index e9f9b54fc1870..86af2a38a0a42 100644 --- a/modules/core/src/test/java/org/apache/ignite/failure/StopNodeOrHaltFailureHandlerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/failure/StopNodeOrHaltFailureHandlerTest.java @@ -28,10 +28,14 @@ import org.apache.ignite.resources.IgniteInstanceResource; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.multijvm.IgniteProcessProxy; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * {@link StopNodeOrHaltFailureHandler} tests. */ +@RunWith(JUnit4.class) public class StopNodeOrHaltFailureHandlerTest extends GridCommonAbstractTest { /** Number of grids started for tests. */ public static final int NODES_CNT = 3; diff --git a/modules/core/src/test/java/org/apache/ignite/failure/SystemWorkersBlockingTest.java b/modules/core/src/test/java/org/apache/ignite/failure/SystemWorkersBlockingTest.java index 72d42bb0af28c..a228126410754 100644 --- a/modules/core/src/test/java/org/apache/ignite/failure/SystemWorkersBlockingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/failure/SystemWorkersBlockingTest.java @@ -25,10 +25,14 @@ import org.apache.ignite.internal.util.worker.GridWorker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.thread.IgniteThread; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests the handling of long blocking operations in system-critical workers. */ +@RunWith(JUnit4.class) public class SystemWorkersBlockingTest extends GridCommonAbstractTest { /** Handler latch. */ private static volatile CountDownLatch hndLatch; diff --git a/modules/core/src/test/java/org/apache/ignite/failure/SystemWorkersTerminationTest.java b/modules/core/src/test/java/org/apache/ignite/failure/SystemWorkersTerminationTest.java index 31fd9d4c4a147..9dadff6ec4fdd 100644 --- a/modules/core/src/test/java/org/apache/ignite/failure/SystemWorkersTerminationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/failure/SystemWorkersTerminationTest.java @@ -28,10 +28,14 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.thread.IgniteThread; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests system critical workers termination. */ +@RunWith(JUnit4.class) public class SystemWorkersTerminationTest extends GridCommonAbstractTest { /** */ private static volatile String failureHndThreadName; From 7eaf7a0252fb347f19d192859c410c3c29f7c4b6 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Mon, 3 Dec 2018 03:39:54 +0300 Subject: [PATCH 005/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview --- .../apache/ignite/igfs/IgfsEventsAbstractSelfTest.java | 4 ++++ .../org/apache/ignite/igfs/IgfsFragmentizerSelfTest.java | 4 ++++ .../ignite/igfs/IgfsFragmentizerTopologySelfTest.java | 4 ++++ .../java/org/apache/ignite/igfs/IgfsPathSelfTest.java | 4 ++++ .../communication/GridTcpCommunicationBenchmark.java | 9 +++------ 5 files changed, 19 insertions(+), 6 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/igfs/IgfsEventsAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/igfs/IgfsEventsAbstractSelfTest.java index 0d984e324f529..33a610fa215f9 100644 --- a/modules/core/src/test/java/org/apache/ignite/igfs/IgfsEventsAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/igfs/IgfsEventsAbstractSelfTest.java @@ -38,6 +38,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -63,6 +66,7 @@ /** * Tests events, generated by {@link org.apache.ignite.IgniteFileSystem} implementation. */ +@RunWith(JUnit4.class) public abstract class IgfsEventsAbstractSelfTest extends GridCommonAbstractTest { /** IGFS. */ private static IgfsImpl igfs; diff --git a/modules/core/src/test/java/org/apache/ignite/igfs/IgfsFragmentizerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/igfs/IgfsFragmentizerSelfTest.java index 962b1bba33d6f..1d2425236f5f5 100644 --- a/modules/core/src/test/java/org/apache/ignite/igfs/IgfsFragmentizerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/igfs/IgfsFragmentizerSelfTest.java @@ -28,10 +28,14 @@ import org.apache.ignite.internal.util.typedef.CA; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests fragmentizer work. */ +@RunWith(JUnit4.class) public class IgfsFragmentizerSelfTest extends IgfsFragmentizerAbstractSelfTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/igfs/IgfsFragmentizerTopologySelfTest.java b/modules/core/src/test/java/org/apache/ignite/igfs/IgfsFragmentizerTopologySelfTest.java index 8b10416b8979d..ffed70d701c2f 100644 --- a/modules/core/src/test/java/org/apache/ignite/igfs/IgfsFragmentizerTopologySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/igfs/IgfsFragmentizerTopologySelfTest.java @@ -18,10 +18,14 @@ package org.apache.ignite.igfs; import org.apache.ignite.IgniteFileSystem; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests coordinator transfer from one node to other. */ +@RunWith(JUnit4.class) public class IgfsFragmentizerTopologySelfTest extends IgfsFragmentizerAbstractSelfTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/igfs/IgfsPathSelfTest.java b/modules/core/src/test/java/org/apache/ignite/igfs/IgfsPathSelfTest.java index 346c88d261017..b1033666a222b 100644 --- a/modules/core/src/test/java/org/apache/ignite/igfs/IgfsPathSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/igfs/IgfsPathSelfTest.java @@ -28,10 +28,14 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * {@link IgfsPath} self test. */ +@RunWith(JUnit4.class) public class IgfsPathSelfTest extends GridCommonAbstractTest { /** Marshaller to test {@link Externalizable} interface. */ private final Marshaller marshaller; diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/communication/GridTcpCommunicationBenchmark.java b/modules/core/src/test/java/org/apache/ignite/loadtests/communication/GridTcpCommunicationBenchmark.java index 8f4779cb0fb51..b94cccad4c61e 100644 --- a/modules/core/src/test/java/org/apache/ignite/loadtests/communication/GridTcpCommunicationBenchmark.java +++ b/modules/core/src/test/java/org/apache/ignite/loadtests/communication/GridTcpCommunicationBenchmark.java @@ -132,8 +132,7 @@ // * @throws Exception If failed. // */ // @SuppressWarnings("deprecation") -// @Test - public void testThroughput() throws Exception { +// public void testThroughput() throws Exception { // assert spis.size() == 2; // assert nodes.size() == 2; // @@ -247,8 +246,7 @@ public void testThroughput() throws Exception { // * @throws Exception If failed. // */ // @SuppressWarnings("deprecation") -// @Test - public void testLatency() throws Exception { +// public void testLatency() throws Exception { // assert spis.size() == 2; // assert nodes.size() == 2; // @@ -375,8 +373,7 @@ public void testLatency() throws Exception { // * @throws Exception If failed. // */ // @SuppressWarnings("deprecation") -// @Test - public void testVariableLoad() throws Exception { +// public void testVariableLoad() throws Exception { // assert spis.size() == 2; // assert nodes.size() == 2; // From eaee42ebf611c1617993177d6466e81399c3ebdc Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Mon, 3 Dec 2018 03:48:56 +0300 Subject: [PATCH 006/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview --- .../internal/binary/BinaryArrayIdentityResolverSelfTest.java | 4 ++++ .../ignite/internal/binary/BinaryBasicIdMapperSelfTest.java | 4 ++++ .../ignite/internal/binary/BinaryBasicNameMapperSelfTest.java | 4 ++++ .../binary/BinaryConfigurationConsistencySelfTest.java | 4 ++++ .../binary/BinaryConfigurationCustomSerializerSelfTest.java | 4 ++++ .../apache/ignite/internal/binary/BinaryEnumsSelfTest.java | 4 ++++ .../ignite/internal/binary/BinaryFieldExtractionSelfTest.java | 4 ++++ .../ignite/internal/binary/BinaryFieldsAbstractSelfTest.java | 4 ++++ .../internal/binary/BinaryFooterOffsetsAbstractSelfTest.java | 4 ++++ .../ignite/internal/binary/BinaryMarshallerSelfTest.java | 4 ++++ .../binary/BinaryObjectBuilderAdditionalSelfTest.java | 4 ++++ .../binary/BinaryObjectBuilderDefaultMappersSelfTest.java | 4 ++++ .../ignite/internal/binary/BinaryObjectExceptionSelfTest.java | 4 ++++ .../ignite/internal/binary/BinaryObjectToStringSelfTest.java | 4 ++++ .../internal/binary/BinaryObjectTypeCompatibilityTest.java | 4 ++++ .../binary/BinarySerialiedFieldComparatorSelfTest.java | 4 ++++ .../internal/binary/BinarySimpleNameTestPropertySelfTest.java | 4 ++++ .../org/apache/ignite/internal/binary/BinaryTreeSelfTest.java | 4 ++++ .../ignite/internal/binary/GridBinaryAffinityKeySelfTest.java | 4 ++++ .../binary/GridBinaryMarshallerCtxDisabledSelfTest.java | 4 ++++ .../ignite/internal/binary/GridBinaryWildcardsSelfTest.java | 4 ++++ .../GridDefaultBinaryMappersBinaryMetaDataSelfTest.java | 4 ++++ .../binary/streams/AbstractBinaryStreamByteOrderSelfTest.java | 4 ++++ .../binary/streams/BinaryAbstractOutputStreamTest.java | 4 ++++ 24 files changed, 96 insertions(+) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryArrayIdentityResolverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryArrayIdentityResolverSelfTest.java index 859625d825ea4..a3aabcac488cb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryArrayIdentityResolverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryArrayIdentityResolverSelfTest.java @@ -34,12 +34,16 @@ import java.util.ArrayList; import java.util.List; import java.util.Set; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.junit.Assert.assertNotEquals; /** * Array identity resolver self test. */ +@RunWith(JUnit4.class) public class BinaryArrayIdentityResolverSelfTest extends GridCommonAbstractTest { /** Pointers to release. */ private final Set ptrs = new GridConcurrentHashSet<>(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryBasicIdMapperSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryBasicIdMapperSelfTest.java index 95cf84b5c8609..f0b6213d4a32a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryBasicIdMapperSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryBasicIdMapperSelfTest.java @@ -20,10 +20,14 @@ import org.apache.ignite.binary.BinaryBasicIdMapper; import org.apache.ignite.internal.binary.test.GridBinaryTestClass1; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class BinaryBasicIdMapperSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryBasicNameMapperSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryBasicNameMapperSelfTest.java index 1e7b27140d1e3..f2c94fec11af6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryBasicNameMapperSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryBasicNameMapperSelfTest.java @@ -20,10 +20,14 @@ import org.apache.ignite.binary.BinaryBasicNameMapper; import org.apache.ignite.internal.binary.test.GridBinaryTestClass1; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class BinaryBasicNameMapperSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryConfigurationConsistencySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryConfigurationConsistencySelfTest.java index 69625b688734e..b7d81c4155260 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryConfigurationConsistencySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryConfigurationConsistencySelfTest.java @@ -30,12 +30,16 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_SKIP_CONFIGURATION_CONSISTENCY_CHECK; /** * Tests a check of binary configuration consistency. */ +@RunWith(JUnit4.class) public class BinaryConfigurationConsistencySelfTest extends GridCommonAbstractTest { /** */ private BinaryConfiguration binaryCfg; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryConfigurationCustomSerializerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryConfigurationCustomSerializerSelfTest.java index 856994da6ff48..32e0b527e4910 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryConfigurationCustomSerializerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryConfigurationCustomSerializerSelfTest.java @@ -38,10 +38,14 @@ import org.apache.ignite.internal.visor.node.VisorNodePingTask; import org.apache.ignite.internal.visor.node.VisorNodePingTaskArg; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests that node will start with custom binary serializer and thin client will connect to such node. */ +@RunWith(JUnit4.class) public class BinaryConfigurationCustomSerializerSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryEnumsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryEnumsSelfTest.java index 8655b9ae0f7af..c896efa66dbc1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryEnumsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryEnumsSelfTest.java @@ -39,11 +39,15 @@ import org.apache.ignite.marshaller.Marshaller; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Contains tests for binary enums. */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class BinaryEnumsSelfTest extends GridCommonAbstractTest { /** Cache name. */ private static String CACHE_NAME = "cache"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryFieldExtractionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryFieldExtractionSelfTest.java index c406a20ada168..6a2f612642c9d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryFieldExtractionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryFieldExtractionSelfTest.java @@ -27,10 +27,14 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.marshaller.MarshallerContextTestImpl; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class BinaryFieldExtractionSelfTest extends GridCommonAbstractTest { /** * Create marshaller. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryFieldsAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryFieldsAbstractSelfTest.java index eeba763556ab6..0ebaa6cd4f6bc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryFieldsAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryFieldsAbstractSelfTest.java @@ -33,10 +33,14 @@ import java.util.Arrays; import java.util.Date; import java.util.UUID; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Contains tests for binary object fields. */ +@RunWith(JUnit4.class) public abstract class BinaryFieldsAbstractSelfTest extends GridCommonAbstractTest { /** Marshaller. */ protected BinaryMarshaller dfltMarsh; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryFooterOffsetsAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryFooterOffsetsAbstractSelfTest.java index 20d10c19a3546..f3e40c59ff287 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryFooterOffsetsAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryFooterOffsetsAbstractSelfTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.logger.NullLogger; import org.apache.ignite.marshaller.MarshallerContextTestImpl; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Contains tests for compact offsets. */ +@RunWith(JUnit4.class) public abstract class BinaryFooterOffsetsAbstractSelfTest extends GridCommonAbstractTest { /** 2 pow 8. */ private static int POW_8 = 1 << 8; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryMarshallerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryMarshallerSelfTest.java index 1128d17e5d35c..eaca668365fe2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryMarshallerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryMarshallerSelfTest.java @@ -96,6 +96,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.nio.charset.StandardCharsets.UTF_8; import static org.apache.ignite.internal.binary.streams.BinaryMemoryAllocator.INSTANCE; @@ -106,6 +109,7 @@ * Binary marshaller tests. */ @SuppressWarnings({"OverlyStrongTypeCast", "ConstantConditions"}) +@RunWith(JUnit4.class) public class BinaryMarshallerSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectBuilderAdditionalSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectBuilderAdditionalSelfTest.java index 8ec8c2b368e54..5a405439d04bb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectBuilderAdditionalSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectBuilderAdditionalSelfTest.java @@ -69,6 +69,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -76,6 +79,7 @@ /** * */ +@RunWith(JUnit4.class) public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectBuilderDefaultMappersSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectBuilderDefaultMappersSelfTest.java index f3dd8af5a0acd..382687c1ff49b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectBuilderDefaultMappersSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectBuilderDefaultMappersSelfTest.java @@ -46,12 +46,16 @@ import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.util.GridUnsafe.BIG_ENDIAN; /** * Binary builder test. */ +@RunWith(JUnit4.class) public class BinaryObjectBuilderDefaultMappersSelfTest extends GridCommonAbstractTest { /** */ private static IgniteConfiguration cfg; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectExceptionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectExceptionSelfTest.java index 6462aff7b1c30..4d2d719f3a59e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectExceptionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectExceptionSelfTest.java @@ -35,10 +35,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * BinaryObjectExceptionSelfTest */ +@RunWith(JUnit4.class) public class BinaryObjectExceptionSelfTest extends GridCommonAbstractTest { /** */ private static final String TEST_KEY = "test_key"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectToStringSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectToStringSelfTest.java index e252baeb8548f..deb20e31d73f9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectToStringSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectToStringSelfTest.java @@ -27,10 +27,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for {@code BinaryObject.toString()}. */ +@RunWith(JUnit4.class) public class BinaryObjectToStringSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectTypeCompatibilityTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectTypeCompatibilityTest.java index 240dcad926202..423c3d16fcf09 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectTypeCompatibilityTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectTypeCompatibilityTest.java @@ -41,10 +41,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class BinaryObjectTypeCompatibilityTest extends GridCommonAbstractTest { /** Ip finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinarySerialiedFieldComparatorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinarySerialiedFieldComparatorSelfTest.java index f7d3b47fac1d3..d01fd8b761d06 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinarySerialiedFieldComparatorSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinarySerialiedFieldComparatorSelfTest.java @@ -30,10 +30,14 @@ import java.util.Set; import java.util.UUID; import java.util.concurrent.atomic.AtomicInteger; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Unit tests for serialized field comparer. */ +@RunWith(JUnit4.class) public class BinarySerialiedFieldComparatorSelfTest extends GridCommonAbstractTest { /** Type counter. */ private static final AtomicInteger TYPE_CTR = new AtomicInteger(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinarySimpleNameTestPropertySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinarySimpleNameTestPropertySelfTest.java index a7057b9cbf2a0..d02fb95d63c6f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinarySimpleNameTestPropertySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinarySimpleNameTestPropertySelfTest.java @@ -24,6 +24,9 @@ import org.apache.ignite.marshaller.jdk.JdkMarshaller; import org.apache.ignite.testframework.config.GridTestProperties; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.testframework.config.GridTestProperties.BINARY_MARSHALLER_USE_SIMPLE_NAME_MAPPER; import static org.apache.ignite.testframework.config.GridTestProperties.MARSH_CLASS_NAME; @@ -31,6 +34,7 @@ /** * Tests testing framewrok, epecially BINARY_MARSHALLER_USE_SIMPLE_NAME_MAPPER test property. */ +@RunWith(JUnit4.class) public class BinarySimpleNameTestPropertySelfTest extends GridCommonAbstractTest { /** * flag for facade disabled test. As we use binary marshaller by default al diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryTreeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryTreeSelfTest.java index 3229118f15e86..4d9e3544ff5a4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryTreeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryTreeSelfTest.java @@ -33,10 +33,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for TreeMap and TreeSet structures. */ +@RunWith(JUnit4.class) public class BinaryTreeSelfTest extends GridCommonAbstractTest { /** Data structure size. */ private static final int SIZE = 100; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryAffinityKeySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryAffinityKeySelfTest.java index 256e8e10f888b..97e0fddc666f9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryAffinityKeySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryAffinityKeySelfTest.java @@ -40,12 +40,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** * Test for binary object affinity key. */ +@RunWith(JUnit4.class) public class GridBinaryAffinityKeySelfTest extends GridCommonAbstractTest { /** */ private static final AtomicReference nodeId = new AtomicReference<>(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryMarshallerCtxDisabledSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryMarshallerCtxDisabledSelfTest.java index cc53039c98f95..ac0fa000ceef2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryMarshallerCtxDisabledSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryMarshallerCtxDisabledSelfTest.java @@ -34,10 +34,14 @@ import org.apache.ignite.marshaller.MarshallerContext; import org.apache.ignite.marshaller.jdk.JdkMarshaller; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class GridBinaryMarshallerCtxDisabledSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryWildcardsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryWildcardsSelfTest.java index 31e1f0e78fd33..c37887011c941 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryWildcardsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryWildcardsSelfTest.java @@ -37,10 +37,14 @@ import org.apache.ignite.logger.NullLogger; import org.apache.ignite.marshaller.MarshallerContextTestImpl; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Wildcards test. */ +@RunWith(JUnit4.class) public class GridBinaryWildcardsSelfTest extends GridCommonAbstractTest { /** */ public static final String CLASS1_FULL_NAME = GridBinaryTestClass1.class.getName(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/GridDefaultBinaryMappersBinaryMetaDataSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/GridDefaultBinaryMappersBinaryMetaDataSelfTest.java index 6f316c1dccaa2..2b31d3a29205d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/GridDefaultBinaryMappersBinaryMetaDataSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/GridDefaultBinaryMappersBinaryMetaDataSelfTest.java @@ -37,10 +37,14 @@ import org.apache.ignite.binary.BinaryReader; import org.apache.ignite.binary.BinaryWriter; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Binary meta data test. */ +@RunWith(JUnit4.class) public class GridDefaultBinaryMappersBinaryMetaDataSelfTest extends GridCommonAbstractTest { /** */ private static IgniteConfiguration cfg; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/streams/AbstractBinaryStreamByteOrderSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/streams/AbstractBinaryStreamByteOrderSelfTest.java index 10f8a9ded2f35..e857ef2ea785c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/streams/AbstractBinaryStreamByteOrderSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/streams/AbstractBinaryStreamByteOrderSelfTest.java @@ -20,6 +20,9 @@ import java.util.Random; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.GridTestIoUtils.getCharByByteLE; import static org.apache.ignite.GridTestIoUtils.getDoubleByByteLE; @@ -31,6 +34,7 @@ /** * Binary input/output streams byte order sanity tests. */ +@RunWith(JUnit4.class) public abstract class AbstractBinaryStreamByteOrderSelfTest extends GridCommonAbstractTest { /** Array length. */ protected static final int ARR_LEN = 16; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/streams/BinaryAbstractOutputStreamTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/streams/BinaryAbstractOutputStreamTest.java index ed70cb6606b58..7ee9c74211a31 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/streams/BinaryAbstractOutputStreamTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/streams/BinaryAbstractOutputStreamTest.java @@ -18,10 +18,14 @@ package org.apache.ignite.internal.binary.streams; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class BinaryAbstractOutputStreamTest extends GridCommonAbstractTest { /** * From 62738a3820d4057a9c34ad8b2c6e85959ebfc67e Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Mon, 3 Dec 2018 03:57:00 +0300 Subject: [PATCH 007/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview --- .../internal/commandline/CommandHandlerParsingTest.java | 4 ++++ .../v2/DirectByteBufferStreamImplV2ByteOrderSelfTest.java | 4 ++++ .../internal/encryption/EncryptedCacheBigEntryTest.java | 4 ++++ .../ignite/internal/encryption/EncryptedCacheCreateTest.java | 4 ++++ .../ignite/internal/encryption/EncryptedCacheDestroyTest.java | 4 ++++ .../internal/encryption/EncryptedCacheGroupCreateTest.java | 4 ++++ .../internal/encryption/EncryptedCacheNodeJoinTest.java | 4 ++++ .../encryption/EncryptedCachePreconfiguredRestartTest.java | 4 ++++ .../ignite/internal/encryption/EncryptedCacheRestartTest.java | 4 ++++ .../managers/GridManagerLocalMessageListenerSelfTest.java | 4 ++++ .../managers/GridManagerMxBeanIllegalArgumentHandleTest.java | 4 ++++ .../ignite/internal/managers/GridManagerStopSelfTest.java | 4 ++++ .../ignite/internal/managers/GridNoopManagerSelfTest.java | 4 ++++ .../internal/managers/IgniteDiagnosticMessagesTest.java | 4 ++++ .../managers/checkpoint/GridCheckpointManagerSelfTest.java | 4 ++++ .../managers/checkpoint/GridCheckpointTaskSelfTest.java | 4 ++++ .../GridCommunicationManagerListenersSelfTest.java | 4 ++++ .../communication/GridCommunicationSendMessageSelfTest.java | 4 ++++ .../managers/communication/GridIoManagerSelfTest.java | 4 ++++ .../communication/IgniteCommunicationBalanceTest.java | 4 ++++ .../managers/communication/IgniteIoTestMessagesTest.java | 4 ++++ .../communication/IgniteVariousConnectionNumberTest.java | 4 ++++ .../deployment/GridDeploymentManagerStopSelfTest.java | 4 ++++ .../deployment/GridDeploymentMessageCountSelfTest.java | 4 ++++ .../discovery/GridDiscoveryManagerAliveCacheSelfTest.java | 4 ++++ .../discovery/GridDiscoveryManagerAttributesSelfTest.java | 4 ++++ .../managers/discovery/IgniteTopologyPrintFormatSelfTest.java | 4 ++++ .../managers/events/GridEventStorageManagerSelfTest.java | 4 ++++ 28 files changed, 112 insertions(+) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/commandline/CommandHandlerParsingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/commandline/CommandHandlerParsingTest.java index 473a222e49870..261856bcdabfa 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/commandline/CommandHandlerParsingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/commandline/CommandHandlerParsingTest.java @@ -27,6 +27,9 @@ import org.apache.ignite.internal.visor.tx.VisorTxProjection; import org.apache.ignite.internal.visor.tx.VisorTxSortOrder; import org.apache.ignite.internal.visor.tx.VisorTxTaskArg; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.Arrays.asList; import static org.apache.ignite.IgniteSystemProperties.IGNITE_ENABLE_EXPERIMENTAL_COMMAND; @@ -43,6 +46,7 @@ /** * Tests Command Handler parsing arguments. */ +@RunWith(JUnit4.class) public class CommandHandlerParsingTest extends TestCase { /** {@inheritDoc} */ @Override protected void setUp() throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/direct/stream/v2/DirectByteBufferStreamImplV2ByteOrderSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/direct/stream/v2/DirectByteBufferStreamImplV2ByteOrderSelfTest.java index 4ad50d88cbfbb..5f4efbe45db8d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/direct/stream/v2/DirectByteBufferStreamImplV2ByteOrderSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/direct/stream/v2/DirectByteBufferStreamImplV2ByteOrderSelfTest.java @@ -29,6 +29,9 @@ import org.apache.ignite.plugin.extensions.communication.Message; import org.apache.ignite.plugin.extensions.communication.MessageFactory; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.GridTestIoUtils.getCharByByteLE; import static org.apache.ignite.GridTestIoUtils.getDoubleByByteLE; @@ -41,6 +44,7 @@ /** * {@link DirectByteBufferStreamImplV2} byte order sanity tests. */ +@RunWith(JUnit4.class) public class DirectByteBufferStreamImplV2ByteOrderSelfTest extends TestCase { /** Array length. */ private static final int ARR_LEN = 16; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheBigEntryTest.java b/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheBigEntryTest.java index d370c46c7de5b..a72e93e8b2f63 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheBigEntryTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheBigEntryTest.java @@ -27,12 +27,16 @@ import org.apache.ignite.spi.encryption.keystore.KeystoreEncryptionKey; import org.apache.ignite.testframework.GridTestUtils; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * Tests to check encryption of entry bigger then page size. */ +@RunWith(JUnit4.class) public class EncryptedCacheBigEntryTest extends AbstractEncryptionTest { /** {@inheritDoc} */ @Override protected void afterTestsStopped() throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheCreateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheCreateTest.java index 9d5fbcb9b0aad..33a5636056017 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheCreateTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheCreateTest.java @@ -33,8 +33,12 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.spi.encryption.keystore.KeystoreEncryptionKey; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** */ +@RunWith(JUnit4.class) public class EncryptedCacheCreateTest extends AbstractEncryptionTest { /** Non-persistent data region name. */ private static final String NO_PERSISTENCE_REGION = "no-persistence-region"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheDestroyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheDestroyTest.java index bab4a3eae6973..cfbe642bc5e4b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheDestroyTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheDestroyTest.java @@ -23,11 +23,15 @@ import org.apache.ignite.internal.util.typedef.T2; import org.apache.ignite.internal.util.typedef.internal.CU; import org.apache.ignite.spi.encryption.keystore.KeystoreEncryptionKey; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.managers.encryption.GridEncryptionManager.ENCRYPTION_KEY_PREFIX; /** */ +@RunWith(JUnit4.class) public class EncryptedCacheDestroyTest extends AbstractEncryptionTest { /** {@inheritDoc} */ @Override protected void afterTest() throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheGroupCreateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheGroupCreateTest.java index aaaaa21cbf2bf..6a7bf83bdb9ca 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheGroupCreateTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheGroupCreateTest.java @@ -25,9 +25,13 @@ import org.apache.ignite.internal.util.typedef.internal.CU; import org.apache.ignite.spi.encryption.keystore.KeystoreEncryptionKey; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** */ +@RunWith(JUnit4.class) public class EncryptedCacheGroupCreateTest extends AbstractEncryptionTest { /** */ public static final String ENCRYPTED_GROUP = "encrypted-group"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheNodeJoinTest.java b/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheNodeJoinTest.java index 07fbd1c38892e..cca156aea426f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheNodeJoinTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheNodeJoinTest.java @@ -23,11 +23,15 @@ import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.util.IgniteUtils; import org.apache.ignite.spi.encryption.keystore.KeystoreEncryptionSpi; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.testframework.GridTestUtils.assertThrowsWithCause; /** */ +@RunWith(JUnit4.class) public class EncryptedCacheNodeJoinTest extends AbstractEncryptionTest { /** */ private static final String GRID_2 = "grid-2"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCachePreconfiguredRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCachePreconfiguredRestartTest.java index 5b53f1bea6f15..85d6ee88ac044 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCachePreconfiguredRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCachePreconfiguredRestartTest.java @@ -22,8 +22,12 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.IgniteEx; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** */ +@RunWith(JUnit4.class) public class EncryptedCachePreconfiguredRestartTest extends EncryptedCacheRestartTest { /** */ private boolean differentCachesOnNodes; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheRestartTest.java index f5b7b10b223aa..638fc53320652 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCacheRestartTest.java @@ -21,8 +21,12 @@ import org.apache.ignite.internal.util.typedef.T2; import org.apache.ignite.internal.util.typedef.internal.CU; import org.apache.ignite.spi.encryption.keystore.KeystoreEncryptionKey; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** */ +@RunWith(JUnit4.class) public class EncryptedCacheRestartTest extends AbstractEncryptionTest { /** {@inheritDoc} */ @Override protected void afterTestsStopped() throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerLocalMessageListenerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerLocalMessageListenerSelfTest.java index 92b66e7cf17ce..a4ed6d3c2e35f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerLocalMessageListenerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerLocalMessageListenerSelfTest.java @@ -37,6 +37,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.NANOSECONDS; @@ -45,6 +48,7 @@ /** * Test Managers to add and remove local message listener. */ +@RunWith(JUnit4.class) public class GridManagerLocalMessageListenerSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerMxBeanIllegalArgumentHandleTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerMxBeanIllegalArgumentHandleTest.java index 1ad8c253d0769..d1c2254a18edb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerMxBeanIllegalArgumentHandleTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerMxBeanIllegalArgumentHandleTest.java @@ -28,6 +28,9 @@ import org.apache.ignite.internal.managers.discovery.GridDiscoveryManager; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.mockito.Mockito; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; @@ -39,6 +42,7 @@ * * Test modifies static final field, used only for development */ +@RunWith(JUnit4.class) public class GridManagerMxBeanIllegalArgumentHandleTest extends TestCase { /** Original value of {@link GridDiscoveryManager#mem} to be restored after test */ private Object mxBeanToRestore; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerStopSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerStopSelfTest.java index 0feee2118bf4f..531cc9e695bc3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerStopSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerStopSelfTest.java @@ -46,11 +46,15 @@ import org.apache.ignite.spi.loadbalancing.roundrobin.RoundRobinLoadBalancingSpi; import org.apache.ignite.testframework.junits.GridTestKernalContext; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Managers stop test. * */ +@RunWith(JUnit4.class) public class GridManagerStopSelfTest extends GridCommonAbstractTest { /** Kernal context. */ private GridTestKernalContext ctx; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/GridNoopManagerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/GridNoopManagerSelfTest.java index 2670c68e9eb62..4146c2eba6999 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/GridNoopManagerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/GridNoopManagerSelfTest.java @@ -27,10 +27,14 @@ import org.apache.ignite.testframework.junits.GridTestKernalContext; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests manager with {@link org.apache.ignite.spi.IgniteSpiNoop} SPI's. */ +@RunWith(JUnit4.class) public class GridNoopManagerSelfTest extends GridCommonAbstractTest { /** * diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/IgniteDiagnosticMessagesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/IgniteDiagnosticMessagesTest.java index be5b432f12610..f136ab916d5ac 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/IgniteDiagnosticMessagesTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/IgniteDiagnosticMessagesTest.java @@ -52,6 +52,9 @@ import org.apache.ignite.testframework.LogListener; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_LONG_OPERATIONS_DUMP_TIMEOUT; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -65,6 +68,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteDiagnosticMessagesTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/checkpoint/GridCheckpointManagerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/checkpoint/GridCheckpointManagerSelfTest.java index ef7aaf9257097..beb3ce26daae6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/checkpoint/GridCheckpointManagerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/checkpoint/GridCheckpointManagerSelfTest.java @@ -18,11 +18,15 @@ package org.apache.ignite.internal.managers.checkpoint; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @GridCommonTest(group = "Checkpoint Manager") +@RunWith(JUnit4.class) public class GridCheckpointManagerSelfTest extends GridCheckpointManagerAbstractSelfTest { /** * @throws Exception Thrown if any exception occurs. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/checkpoint/GridCheckpointTaskSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/checkpoint/GridCheckpointTaskSelfTest.java index 1653fadc2b298..dade965943cd3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/checkpoint/GridCheckpointTaskSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/checkpoint/GridCheckpointTaskSelfTest.java @@ -42,6 +42,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.REPLICATED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -49,6 +52,7 @@ /** * Checkpoint tests. */ +@RunWith(JUnit4.class) public class GridCheckpointTaskSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridCommunicationManagerListenersSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridCommunicationManagerListenersSelfTest.java index 9412a653b4688..fb5e2921fd9d0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridCommunicationManagerListenersSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridCommunicationManagerListenersSelfTest.java @@ -33,11 +33,15 @@ import org.apache.ignite.resources.IgniteInstanceResource; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Grid communication manager self test. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridCommunicationManagerListenersSelfTest extends GridCommonAbstractTest { /** */ public GridCommunicationManagerListenersSelfTest() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridCommunicationSendMessageSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridCommunicationSendMessageSelfTest.java index 7c0e9fb9576b6..d1cc425dc938d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridCommunicationSendMessageSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridCommunicationSendMessageSelfTest.java @@ -30,6 +30,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.NANOSECONDS; @@ -38,6 +41,7 @@ /** * Send message test. */ +@RunWith(JUnit4.class) public class GridCommunicationSendMessageSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridIoManagerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridIoManagerSelfTest.java index 8cac3bf5b61a9..84017f7e398b9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridIoManagerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridIoManagerSelfTest.java @@ -37,6 +37,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.GridTestKernalContext; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.mockito.ArgumentMatcher; import org.mockito.Mockito; @@ -50,6 +53,7 @@ /** * Test for {@link GridIoManager}. */ +@RunWith(JUnit4.class) public class GridIoManagerSelfTest extends GridCommonAbstractTest { /** Grid test context. */ private GridTestKernalContext ctx; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/IgniteCommunicationBalanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/IgniteCommunicationBalanceTest.java index 7aed3ef99ab9c..00e8964eb193f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/IgniteCommunicationBalanceTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/IgniteCommunicationBalanceTest.java @@ -41,10 +41,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteCommunicationBalanceTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/IgniteIoTestMessagesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/IgniteIoTestMessagesTest.java index b21865585b557..931f9f86e8424 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/IgniteIoTestMessagesTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/IgniteIoTestMessagesTest.java @@ -28,10 +28,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteIoTestMessagesTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/IgniteVariousConnectionNumberTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/IgniteVariousConnectionNumberTest.java index e41e6a1514809..1141736d22d64 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/IgniteVariousConnectionNumberTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/IgniteVariousConnectionNumberTest.java @@ -33,6 +33,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.REPLICATED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -40,6 +43,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteVariousConnectionNumberTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/GridDeploymentManagerStopSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/GridDeploymentManagerStopSelfTest.java index 1c4e893ba257c..71aabb1a092b9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/GridDeploymentManagerStopSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/GridDeploymentManagerStopSelfTest.java @@ -30,11 +30,15 @@ import org.apache.ignite.testframework.junits.GridTestKernalContext; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Grid deployment manager stop test. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridDeploymentManagerStopSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/GridDeploymentMessageCountSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/GridDeploymentMessageCountSelfTest.java index 1f096ca5a6b00..d59d041df8b7e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/GridDeploymentMessageCountSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/GridDeploymentMessageCountSelfTest.java @@ -36,6 +36,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.REPLICATED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -43,6 +46,7 @@ /** * Tests message count for different deployment scenarios. */ +@RunWith(JUnit4.class) public class GridDeploymentMessageCountSelfTest extends GridCommonAbstractTest { /** VM ip finder for TCP discovery. */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManagerAliveCacheSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManagerAliveCacheSelfTest.java index 857e4044ff43e..6f6c26da6e2d7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManagerAliveCacheSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManagerAliveCacheSelfTest.java @@ -35,6 +35,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; @@ -43,6 +46,7 @@ /** * */ +@RunWith(JUnit4.class) public class GridDiscoveryManagerAliveCacheSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManagerAttributesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManagerAttributesSelfTest.java index 8d56bfd118cb2..7b9f552af017f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManagerAttributesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManagerAttributesSelfTest.java @@ -30,6 +30,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_BINARY_MARSHALLER_USE_STRING_SERIALIZATION_VER_2; import static org.apache.ignite.IgniteSystemProperties.IGNITE_OPTIMIZED_MARSHALLER_USE_DEFAULT_SUID; @@ -40,6 +43,7 @@ /** * Tests for node attributes consistency checks. */ +@RunWith(JUnit4.class) public abstract class GridDiscoveryManagerAttributesSelfTest extends GridCommonAbstractTest { /** */ private static final String PREFER_IPV4 = "java.net.preferIPv4Stack"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/IgniteTopologyPrintFormatSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/IgniteTopologyPrintFormatSelfTest.java index cfa2ee6d4d2df..353f1634aa99a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/IgniteTopologyPrintFormatSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/IgniteTopologyPrintFormatSelfTest.java @@ -33,10 +33,14 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.logger.GridTestLog4jLogger; import org.apache.log4j.Level; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteTopologyPrintFormatSelfTest extends GridCommonAbstractTest { /** */ public static final String TOPOLOGY_SNAPSHOT = "Topology snapshot"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/events/GridEventStorageManagerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/events/GridEventStorageManagerSelfTest.java index 14c01de577cf2..9103e6cc2396d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/events/GridEventStorageManagerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/events/GridEventStorageManagerSelfTest.java @@ -28,12 +28,16 @@ import org.apache.ignite.lang.IgniteFutureTimeoutException; import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVTS_ALL; /** * Tests for {@link GridEventStorageManager}. */ +@RunWith(JUnit4.class) public class GridEventStorageManagerSelfTest extends GridCommonAbstractTest { /** * From afb495f9e97e6e15b0c4c29f6d57dd2bbd569f1c Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Mon, 3 Dec 2018 11:39:38 +0300 Subject: [PATCH 008/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview --- .../optimized/OptimizedMarshallerEnumSelfTest.java | 4 ++++ .../optimized/OptimizedMarshallerNodeFailoverTest.java | 4 ++++ .../marshaller/optimized/OptimizedMarshallerSelfTest.java | 4 ++++ ...OptimizedMarshallerSerialPersistentFieldsSelfTest.java | 4 ++++ .../marshaller/optimized/OptimizedMarshallerTest.java | 4 ++++ .../optimized/OptimizedObjectStreamSelfTest.java | 4 ++++ .../ignite/internal/pagemem/impl/PageIdUtilsSelfTest.java | 4 ++++ .../internal/pagemem/impl/PageMemoryNoLoadSelfTest.java | 4 ++++ .../affinity/GridAffinityProcessorAbstractSelfTest.java | 4 ++++ .../affinity/GridAffinityProcessorMemoryLeakTest.java | 4 ++++ .../Authentication1kUsersNodeRestartTest.java | 4 ++++ .../AuthenticationConfigurationClusterTest.java | 4 ++++ .../AuthenticationOnNotActiveClusterTest.java | 4 ++++ .../AuthenticationProcessorNPEOnStartTest.java | 4 ++++ .../AuthenticationProcessorNodeRestartTest.java | 4 ++++ .../authentication/AuthenticationProcessorSelfTest.java | 4 ++++ .../GridCacheBinaryObjectUserClassloaderSelfTest.java | 4 ++++ ...idCacheBinaryObjectsAbstractMultiThreadedSelfTest.java | 4 +++- .../binary/GridCacheBinaryObjectsAbstractSelfTest.java | 4 ++++ .../binary/GridCacheBinaryStoreAbstractSelfTest.java | 4 ++++ ...dCacheClientNodeBinaryObjectMetadataMultinodeTest.java | 4 ++++ .../GridCacheClientNodeBinaryObjectMetadataTest.java | 4 ++++ .../datastreaming/GridDataStreamerImplSelfTest.java | 4 ++++ .../context/IgniteCacheAbstractExecutionContextTest.java | 4 ++++ .../IgniteCountDownLatchAbstractSelfTest.java | 4 ++++ .../datastructures/IgniteDataStructureUniqueNameTest.java | 4 ++++ .../datastructures/IgniteDataStructureWithJobTest.java | 4 ++++ .../IgniteExchangeLatchManagerCoordinatorFailTest.java | 4 ++++ .../cache/datastructures/IgniteLockAbstractSelfTest.java | 4 ++++ .../datastructures/IgniteSemaphoreAbstractSelfTest.java | 4 ++++ .../datastructures/IgniteSequenceInternalCleanupTest.java | 4 ++++ .../SemaphoreFailoverNoWaitingAcquirerTest.java | 4 ++++ .../SemaphoreFailoverSafeReleasePermitsTest.java | 4 ++++ .../local/IgniteLocalCountDownLatchSelfTest.java | 8 ++++++-- .../datastructures/local/IgniteLocalLockSelfTest.java | 8 ++++++-- .../local/IgniteLocalSemaphoreSelfTest.java | 8 ++++++-- .../GridCachePartitionedSetFailoverSelfTest.java | 8 ++++++-- .../partitioned/IgnitePartitionedQueueNoBackupsTest.java | 4 ++++ .../IgnitePartitionedSetNoBackupsSelfTest.java | 4 ++++ 39 files changed, 163 insertions(+), 9 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerEnumSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerEnumSelfTest.java index 5325587a09391..e9f0e8d57a912 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerEnumSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerEnumSelfTest.java @@ -25,10 +25,14 @@ import org.apache.ignite.marshaller.MarshallerContextTestImpl; import org.apache.ignite.testframework.junits.GridTestKernalContext; import org.apache.ignite.testframework.junits.logger.GridTestLog4jLogger; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class OptimizedMarshallerEnumSelfTest extends TestCase { private String igniteHome = System.getProperty("user.dir"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerNodeFailoverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerNodeFailoverTest.java index b2d1244ee8cd1..d80ec79ad3c33 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerNodeFailoverTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerNodeFailoverTest.java @@ -35,6 +35,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -42,6 +45,7 @@ /** * */ +@RunWith(JUnit4.class) public class OptimizedMarshallerNodeFailoverTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerSelfTest.java index 0f1bd0e8732c9..92696bbfecc3f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerSelfTest.java @@ -29,11 +29,15 @@ import org.apache.ignite.marshaller.Marshaller; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Optimized marshaller self test. */ @GridCommonTest(group = "Marshaller") +@RunWith(JUnit4.class) public class OptimizedMarshallerSelfTest extends GridMarshallerAbstractTest { /** {@inheritDoc} */ @Override protected Marshaller marshaller() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerSerialPersistentFieldsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerSerialPersistentFieldsSelfTest.java index defb804001a88..560884cf5b01e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerSerialPersistentFieldsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerSerialPersistentFieldsSelfTest.java @@ -25,10 +25,14 @@ import org.apache.ignite.internal.marshaller.optimized.OptimizedMarshaller; import org.apache.ignite.marshaller.GridMarshallerAbstractTest; import org.apache.ignite.marshaller.Marshaller; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test that Optimized Marshaller works with classes with serialPersistentFields. */ +@RunWith(JUnit4.class) public class OptimizedMarshallerSerialPersistentFieldsSelfTest extends GridMarshallerAbstractTest { /** {@inheritDoc} */ @Override protected Marshaller marshaller() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerTest.java b/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerTest.java index dbbd82ebd1b01..8aaeb4daebe91 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerTest.java @@ -45,10 +45,14 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class OptimizedMarshallerTest extends GridCommonAbstractTest { /** * @return Marshaller. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedObjectStreamSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedObjectStreamSelfTest.java index a88e11d0dac46..ed2d8004ba14a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedObjectStreamSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedObjectStreamSelfTest.java @@ -68,12 +68,16 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.junit.Assert.assertArrayEquals; /** * Test for optimized object streams. */ +@RunWith(JUnit4.class) public class OptimizedObjectStreamSelfTest extends GridCommonAbstractTest { /** */ private static final MarshallerContext CTX = new MarshallerContextTestImpl(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/pagemem/impl/PageIdUtilsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/pagemem/impl/PageIdUtilsSelfTest.java index 215459235523e..9b6d0b0b8d9a2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/pagemem/impl/PageIdUtilsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/pagemem/impl/PageIdUtilsSelfTest.java @@ -22,10 +22,14 @@ import org.apache.ignite.internal.pagemem.PageIdUtils; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class PageIdUtilsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/pagemem/impl/PageMemoryNoLoadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/pagemem/impl/PageMemoryNoLoadSelfTest.java index 05b037146cb88..68581dc7d2172 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/pagemem/impl/PageMemoryNoLoadSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/pagemem/impl/PageMemoryNoLoadSelfTest.java @@ -37,10 +37,14 @@ import org.apache.ignite.internal.processors.cache.persistence.tree.io.PageIO; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class PageMemoryNoLoadSelfTest extends GridCommonAbstractTest { /** */ protected static final int PAGE_SIZE = 8 * 1024; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessorAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessorAbstractSelfTest.java index 38adf21be075b..1ce1e24ce73bf 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessorAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessorAbstractSelfTest.java @@ -32,6 +32,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -39,6 +42,7 @@ * Tests for {@link GridAffinityProcessor}. */ @GridCommonTest(group = "Affinity Processor") +@RunWith(JUnit4.class) public abstract class GridAffinityProcessorAbstractSelfTest extends GridCommonAbstractTest { /** Number of grids started for tests. Should not be less than 2. */ private static final int NODES_CNT = 3; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessorMemoryLeakTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessorMemoryLeakTest.java index a83d5a9d5151f..1fc90baa58488 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessorMemoryLeakTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessorMemoryLeakTest.java @@ -31,6 +31,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_AFFINITY_HISTORY_SIZE; import static org.apache.ignite.IgniteSystemProperties.getInteger; @@ -39,6 +42,7 @@ * Tests for {@link GridAffinityProcessor}. */ @GridCommonTest(group = "Affinity Processor") +@RunWith(JUnit4.class) public class GridAffinityProcessorMemoryLeakTest extends GridCommonAbstractTest { /** Max value for affinity history size name. Should be the same as in GridAffinityAssignmentCache.MAX_HIST_SIZE */ private final int MAX_HIST_SIZE = getInteger(IGNITE_AFFINITY_HISTORY_SIZE, 500); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/Authentication1kUsersNodeRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/Authentication1kUsersNodeRestartTest.java index 27deed4fc0afa..802934f62307b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/Authentication1kUsersNodeRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/Authentication1kUsersNodeRestartTest.java @@ -29,10 +29,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for {@link IgniteAuthenticationProcessor} on unstable topology. */ +@RunWith(JUnit4.class) public class Authentication1kUsersNodeRestartTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/AuthenticationConfigurationClusterTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/AuthenticationConfigurationClusterTest.java index 14bc63288b332..2fe7fc75d1a2a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/AuthenticationConfigurationClusterTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/AuthenticationConfigurationClusterTest.java @@ -29,10 +29,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for disabled {@link IgniteAuthenticationProcessor}. */ +@RunWith(JUnit4.class) public class AuthenticationConfigurationClusterTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/AuthenticationOnNotActiveClusterTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/AuthenticationOnNotActiveClusterTest.java index c0c39c3436acd..67c9d92fd4eac 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/AuthenticationOnNotActiveClusterTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/AuthenticationOnNotActiveClusterTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for {@link IgniteAuthenticationProcessor}. */ +@RunWith(JUnit4.class) public class AuthenticationOnNotActiveClusterTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/AuthenticationProcessorNPEOnStartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/AuthenticationProcessorNPEOnStartTest.java index 45986f4b35479..0de27674c6291 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/AuthenticationProcessorNPEOnStartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/AuthenticationProcessorNPEOnStartTest.java @@ -27,10 +27,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for NPE on start node simultaneous. */ +@RunWith(JUnit4.class) public class AuthenticationProcessorNPEOnStartTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/AuthenticationProcessorNodeRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/AuthenticationProcessorNodeRestartTest.java index 73aab6353c011..05ec21382239f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/AuthenticationProcessorNodeRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/AuthenticationProcessorNodeRestartTest.java @@ -30,10 +30,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for {@link IgniteAuthenticationProcessor} on unstable topology. */ +@RunWith(JUnit4.class) public class AuthenticationProcessorNodeRestartTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/AuthenticationProcessorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/AuthenticationProcessorSelfTest.java index bc1fafaa34a99..f81979b414bd7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/AuthenticationProcessorSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/AuthenticationProcessorSelfTest.java @@ -33,10 +33,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for {@link IgniteAuthenticationProcessor}. */ +@RunWith(JUnit4.class) public class AuthenticationProcessorSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectUserClassloaderSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectUserClassloaderSelfTest.java index 2866fac38505f..0ae5de8eeee56 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectUserClassloaderSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectUserClassloaderSelfTest.java @@ -36,6 +36,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.REPLICATED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -43,6 +46,7 @@ /** * */ +@RunWith(JUnit4.class) public class GridCacheBinaryObjectUserClassloaderSelfTest extends GridCommonAbstractTest { /** */ private static volatile boolean customBinaryConf = false; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractMultiThreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractMultiThreadedSelfTest.java index 45f3130819489..c2da089f2f2e3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractMultiThreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractMultiThreadedSelfTest.java @@ -45,6 +45,7 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.PRIMARY_SYNC; @@ -124,7 +125,8 @@ protected int gridCount() { /** * @throws Exception If failed. */ - @SuppressWarnings("BusyWait") @Test + @SuppressWarnings("BusyWait") + @Test public void testGetPut() throws Exception { final AtomicBoolean flag = new AtomicBoolean(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractSelfTest.java index 157ec97e24b47..c618f19dd8b12 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractSelfTest.java @@ -77,6 +77,9 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -87,6 +90,7 @@ /** * Test for binary objects stored in cache. */ +@RunWith(JUnit4.class) public abstract class GridCacheBinaryObjectsAbstractSelfTest extends GridCommonAbstractTest { /** */ public static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryStoreAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryStoreAbstractSelfTest.java index fe918e5b8dbe3..5ffc2cce12911 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryStoreAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryStoreAbstractSelfTest.java @@ -37,10 +37,14 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; import java.util.concurrent.ConcurrentHashMap; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for cache store with binary. */ +@RunWith(JUnit4.class) public abstract class GridCacheBinaryStoreAbstractSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheClientNodeBinaryObjectMetadataMultinodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheClientNodeBinaryObjectMetadataMultinodeTest.java index 86b662316dbe0..eed10cb372295 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheClientNodeBinaryObjectMetadataMultinodeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheClientNodeBinaryObjectMetadataMultinodeTest.java @@ -42,12 +42,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * */ +@RunWith(JUnit4.class) public class GridCacheClientNodeBinaryObjectMetadataMultinodeTest extends GridCommonAbstractTest { /** */ protected static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheClientNodeBinaryObjectMetadataTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheClientNodeBinaryObjectMetadataTest.java index f8baf00a55c4c..3215713ef89e4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheClientNodeBinaryObjectMetadataTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheClientNodeBinaryObjectMetadataTest.java @@ -32,12 +32,16 @@ import org.apache.ignite.internal.processors.cache.GridCacheAbstractSelfTest; import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; /** * */ +@RunWith(JUnit4.class) public class GridCacheClientNodeBinaryObjectMetadataTest extends GridCacheAbstractSelfTest { /** {@inheritDoc} */ @Override protected int gridCount() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/datastreaming/GridDataStreamerImplSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/datastreaming/GridDataStreamerImplSelfTest.java index e4956066a652b..dd30bd1d47eed 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/datastreaming/GridDataStreamerImplSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/datastreaming/GridDataStreamerImplSelfTest.java @@ -41,6 +41,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -48,6 +51,7 @@ /** * Tests for {@code IgniteDataStreamerImpl}. */ +@RunWith(JUnit4.class) public class GridDataStreamerImplSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCacheAbstractExecutionContextTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCacheAbstractExecutionContextTest.java index 5e4415bfe07f7..2f96c9f1b2a17 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCacheAbstractExecutionContextTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCacheAbstractExecutionContextTest.java @@ -25,10 +25,14 @@ import org.apache.ignite.internal.processors.cache.IgniteCacheAbstractTest; import org.apache.ignite.testframework.GridTestExternalClassLoader; import org.apache.ignite.testframework.config.GridTestProperties; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public abstract class IgniteCacheAbstractExecutionContextTest extends IgniteCacheAbstractTest { /** */ public static final String TEST_VALUE = "org.apache.ignite.tests.p2p.CacheDeploymentTestValue"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCountDownLatchAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCountDownLatchAbstractSelfTest.java index bd3f0a8e130ea..7cbf3ccb42a7d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCountDownLatchAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCountDownLatchAbstractSelfTest.java @@ -48,6 +48,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.transactions.Transaction; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.MINUTES; @@ -58,6 +61,7 @@ /** * Cache count down latch self test. */ +@RunWith(JUnit4.class) public abstract class IgniteCountDownLatchAbstractSelfTest extends IgniteAtomicsAbstractTest implements Externalizable { /** */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteDataStructureUniqueNameTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteDataStructureUniqueNameTest.java index 310ca3f1d9545..fa32d698e8c17 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteDataStructureUniqueNameTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteDataStructureUniqueNameTest.java @@ -41,6 +41,9 @@ import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.lang.IgniteUuid; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -48,6 +51,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteDataStructureUniqueNameTest extends IgniteCollectionAbstractTest { /** {@inheritDoc} */ @Override protected int gridCount() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteDataStructureWithJobTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteDataStructureWithJobTest.java index da5018e13e0ec..72c987811a3bb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteDataStructureWithJobTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteDataStructureWithJobTest.java @@ -32,10 +32,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteDataStructureWithJobTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteExchangeLatchManagerCoordinatorFailTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteExchangeLatchManagerCoordinatorFailTest.java index f47c040e37433..9aa1fc62ca276 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteExchangeLatchManagerCoordinatorFailTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteExchangeLatchManagerCoordinatorFailTest.java @@ -31,10 +31,14 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for {@link ExchangeLatchManager} functionality when latch coordinator is failed. */ +@RunWith(JUnit4.class) public class IgniteExchangeLatchManagerCoordinatorFailTest extends GridCommonAbstractTest { /** */ private static final String LATCH_NAME = "test"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteLockAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteLockAbstractSelfTest.java index 2562c3efd6a96..0052183540a40 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteLockAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteLockAbstractSelfTest.java @@ -58,7 +58,10 @@ import org.apache.ignite.transactions.Transaction; import org.jetbrains.annotations.Nullable; import org.junit.Rule; +import org.junit.Test; import org.junit.rules.ExpectedException; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MICROSECONDS; import static java.util.concurrent.TimeUnit.MILLISECONDS; @@ -70,6 +73,7 @@ /** * Cache reentrant lock self test. */ +@RunWith(JUnit4.class) public abstract class IgniteLockAbstractSelfTest extends IgniteAtomicsAbstractTest implements Externalizable { /** */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteSemaphoreAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteSemaphoreAbstractSelfTest.java index 77c99c1f5f262..8ddabb7e459a2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteSemaphoreAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteSemaphoreAbstractSelfTest.java @@ -47,7 +47,10 @@ import org.apache.ignite.transactions.Transaction; import org.jetbrains.annotations.Nullable; import org.junit.Rule; +import org.junit.Test; import org.junit.rules.ExpectedException; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MICROSECONDS; import static java.util.concurrent.TimeUnit.MILLISECONDS; @@ -59,6 +62,7 @@ /** * Cache semaphore self test. */ +@RunWith(JUnit4.class) public abstract class IgniteSemaphoreAbstractSelfTest extends IgniteAtomicsAbstractTest implements Externalizable { /** */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteSequenceInternalCleanupTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteSequenceInternalCleanupTest.java index 94481b9387a0a..46cb0957b7f6f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteSequenceInternalCleanupTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteSequenceInternalCleanupTest.java @@ -30,12 +30,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** */ +@RunWith(JUnit4.class) public class IgniteSequenceInternalCleanupTest extends GridCommonAbstractTest { /** */ public static final int GRIDS_CNT = 5; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/SemaphoreFailoverNoWaitingAcquirerTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/SemaphoreFailoverNoWaitingAcquirerTest.java index 884efaece3ea0..c76762f9f700a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/SemaphoreFailoverNoWaitingAcquirerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/SemaphoreFailoverNoWaitingAcquirerTest.java @@ -27,6 +27,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import java.util.concurrent.TimeUnit; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -42,6 +45,7 @@ * * */ +@RunWith(JUnit4.class) public class SemaphoreFailoverNoWaitingAcquirerTest extends GridCommonAbstractTest { /** */ protected static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/SemaphoreFailoverSafeReleasePermitsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/SemaphoreFailoverSafeReleasePermitsTest.java index 7e63867356acc..cbcf471516b75 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/SemaphoreFailoverSafeReleasePermitsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/SemaphoreFailoverSafeReleasePermitsTest.java @@ -27,6 +27,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -34,6 +37,7 @@ /** * */ +@RunWith(JUnit4.class) public class SemaphoreFailoverSafeReleasePermitsTest extends GridCommonAbstractTest { /** */ protected static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/IgniteLocalCountDownLatchSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/IgniteLocalCountDownLatchSelfTest.java index 6f1d255833db6..d39cf5d3111ae 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/IgniteLocalCountDownLatchSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/IgniteLocalCountDownLatchSelfTest.java @@ -24,6 +24,9 @@ import org.apache.ignite.internal.processors.cache.datastructures.IgniteCountDownLatchAbstractSelfTest; import org.apache.ignite.testframework.GridTestUtils; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MINUTES; import static java.util.concurrent.TimeUnit.SECONDS; @@ -32,6 +35,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteLocalCountDownLatchSelfTest extends IgniteCountDownLatchAbstractSelfTest { /** {@inheritDoc} */ @Override protected CacheMode atomicsCacheMode() { @@ -44,8 +48,8 @@ public class IgniteLocalCountDownLatchSelfTest extends IgniteCountDownLatchAbstr } /** {@inheritDoc} */ - @Override @Test - public void testLatch() throws Exception { + @Test + @Override public void testLatch() throws Exception { // Test main functionality. IgniteCountDownLatch latch = grid(0).countDownLatch("latch", 2, false, true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/IgniteLocalLockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/IgniteLocalLockSelfTest.java index 550dab659cd78..b3f1a9d9a6380 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/IgniteLocalLockSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/IgniteLocalLockSelfTest.java @@ -24,6 +24,9 @@ import org.apache.ignite.internal.processors.cache.datastructures.IgniteLockAbstractSelfTest; import org.apache.ignite.testframework.GridTestUtils; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MINUTES; import static org.apache.ignite.cache.CacheMode.LOCAL; @@ -31,6 +34,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteLocalLockSelfTest extends IgniteLockAbstractSelfTest { /** {@inheritDoc} */ @Override protected CacheMode atomicsCacheMode() { @@ -43,8 +47,8 @@ public class IgniteLocalLockSelfTest extends IgniteLockAbstractSelfTest { } /** {@inheritDoc} */ - @Override @Test - public void testReentrantLock() throws Exception { + @Test + @Override public void testReentrantLock() throws Exception { // Test main functionality. IgniteLock lock = grid(0).reentrantLock("lock", true, false, true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/IgniteLocalSemaphoreSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/IgniteLocalSemaphoreSelfTest.java index 31900b7ae51e9..2af67e0d8ab14 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/IgniteLocalSemaphoreSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/IgniteLocalSemaphoreSelfTest.java @@ -24,6 +24,9 @@ import org.apache.ignite.internal.processors.cache.datastructures.IgniteSemaphoreAbstractSelfTest; import org.apache.ignite.testframework.GridTestUtils; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MINUTES; import static org.apache.ignite.cache.CacheMode.LOCAL; @@ -31,6 +34,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteLocalSemaphoreSelfTest extends IgniteSemaphoreAbstractSelfTest { /** {@inheritDoc} */ @Override protected CacheMode atomicsCacheMode() { @@ -43,8 +47,8 @@ public class IgniteLocalSemaphoreSelfTest extends IgniteSemaphoreAbstractSelfTes } /** {@inheritDoc} */ - @Override @Test - public void testSemaphore() throws Exception { + @Test + @Override public void testSemaphore() throws Exception { // Test main functionality. IgniteSemaphore semaphore = grid(0).semaphore("semaphore", -2, false, true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedSetFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedSetFailoverSelfTest.java index e0b2bc3044bd6..a37944dc77c53 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedSetFailoverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedSetFailoverSelfTest.java @@ -19,20 +19,24 @@ import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.internal.processors.cache.datastructures.GridCacheSetFailoverAbstractSelfTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; /** * Set failover tests. */ +@RunWith(JUnit4.class) public class GridCachePartitionedSetFailoverSelfTest extends GridCacheSetFailoverAbstractSelfTest { /** {@inheritDoc} */ @Override protected CacheAtomicityMode collectionCacheAtomicityMode() { return TRANSACTIONAL; } - @Override @Test - public void testNodeRestart(){ + @Test + @Override public void testNodeRestart(){ fail("https://issues.apache.org/jira/browse/IGNITE-1593"); } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/IgnitePartitionedQueueNoBackupsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/IgnitePartitionedQueueNoBackupsTest.java index 682c16f14eb31..bb68bbfc9eb0d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/IgnitePartitionedQueueNoBackupsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/IgnitePartitionedQueueNoBackupsTest.java @@ -28,6 +28,9 @@ import org.apache.ignite.internal.processors.cache.GridCacheContext; import org.apache.ignite.internal.processors.cache.GridCacheMapEntry; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -35,6 +38,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgnitePartitionedQueueNoBackupsTest extends GridCachePartitionedQueueApiSelfTest { /** {@inheritDoc} */ @Override protected CacheMode collectionCacheMode() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/IgnitePartitionedSetNoBackupsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/IgnitePartitionedSetNoBackupsSelfTest.java index 27ff0858b0451..1c8618d1e2cc6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/IgnitePartitionedSetNoBackupsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/IgnitePartitionedSetNoBackupsSelfTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.internal.processors.cache.GridCacheContext; import org.apache.ignite.internal.processors.cache.GridCacheMapEntry; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgnitePartitionedSetNoBackupsSelfTest extends GridCachePartitionedSetSelfTest { /** {@inheritDoc} */ @Override protected CollectionConfiguration collectionConfiguration() { From 3b56b742b52a516a4244d2a07635a99d9abeba18 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Mon, 3 Dec 2018 12:06:45 +0300 Subject: [PATCH 009/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview --- .../IgniteCrossCacheTxStoreSelfTest.java | 4 +++ .../IgniteMvccTxTimeoutAbstractTest.java | 4 +++ .../IgniteOptimisticTxSuspendResumeTest.java | 4 +++ .../IgnitePessimisticTxSuspendResumeTest.java | 4 +++ .../IgniteRejectConnectOnNodeStopTest.java | 4 +++ .../IgniteTxCachePrimarySyncTest.java | 4 +++ ...SynchronizationModesMultithreadedTest.java | 4 +++ .../IgniteTxConcurrentRemoveObjectsTest.java | 4 +++ ...eTxConsistencyRestartAbstractSelfTest.java | 4 +++ .../distributed/IgniteTxGetAfterStopTest.java | 4 +++ ...riginatingNodeFailureAbstractSelfTest.java | 4 +++ ...riginatingNodeFailureAbstractSelfTest.java | 4 +++ .../IgniteTxPreloadAbstractTest.java | 4 +++ .../IgniteTxRemoveTimeoutObjectsTest.java | 4 +++ .../IgniteTxTimeoutAbstractTest.java | 4 +++ .../IgniteCachePutRetryAbstractSelfTest.java | 25 +++++++++++-------- ...iteCachePutRetryTransactionalSelfTest.java | 17 +++++++------ .../dht/IgniteCacheStartWithLoadTest.java | 4 +++ .../IgniteCacheTxRecoveryRollbackTest.java | 4 +++ .../dht/IgniteCrossCacheTxSelfTest.java | 4 +++ .../dht/NotMappedPartitionInTxTest.java | 4 +++ .../dht/TxRecoveryStoreEnabledTest.java | 4 +++ .../GridPartitionedBackupLoadSelfTest.java | 4 +++ .../near/IgniteCacheNearOnlyTxTest.java | 4 +++ .../IgniteCacheNearReadCommittedTest.java | 4 +++ .../near/IgniteCacheNearTxRollbackTest.java | 4 +++ .../NearCacheMultithreadedUpdateTest.java | 4 +++ .../near/NearCachePutAllMultinodeTest.java | 4 +++ .../near/NearCacheSyncUpdateTest.java | 4 +++ .../near/NoneRebalanceModeSelfTest.java | 4 +++ .../CacheManualRebalancingTest.java | 4 +++ .../rebalancing/CacheNodeSafeAssertion.java | 3 +-- ...ngDelayedPartitionMapExchangeSelfTest.java | 4 +++ .../GridCacheRebalancingAsyncSelfTest.java | 4 +++ .../GridCacheRebalancingCancelTest.java | 4 +++ .../GridCacheRebalancingOrderingTest.java | 4 +++ ...CacheRebalancingPartitionCountersTest.java | 4 +++ ...eRebalancingPartitionDistributionTest.java | 5 +++- ...GridCacheRebalancingSyncCheckDataTest.java | 4 +++ .../GridCacheRebalancingSyncSelfTest.java | 4 +++ ...ebalancingUnmarshallingFailedSelfTest.java | 4 +++ ...CacheRebalancingWithAsyncClearingTest.java | 4 +++ ...ridCacheSyncReplicatedPreloadSelfTest.java | 4 +++ .../GridReplicatedTxPreloadTest.java | 8 ++++-- .../IgniteCacheSyncRebalanceModeSelfTest.java | 4 +++ 45 files changed, 195 insertions(+), 23 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCrossCacheTxStoreSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCrossCacheTxStoreSelfTest.java index 08ec24a8157e5..11abc41724c8a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCrossCacheTxStoreSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCrossCacheTxStoreSelfTest.java @@ -40,10 +40,14 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteCrossCacheTxStoreSelfTest extends GridCommonAbstractTest { /** */ private static Map firstStores = new ConcurrentHashMap<>(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteMvccTxTimeoutAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteMvccTxTimeoutAbstractTest.java index 26bb87015ac31..16f84c2df1ccd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteMvccTxTimeoutAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteMvccTxTimeoutAbstractTest.java @@ -31,6 +31,9 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.apache.ignite.transactions.TransactionTimeoutException; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ; @@ -38,6 +41,7 @@ /** * Simple cache test. */ +@RunWith(JUnit4.class) public class IgniteMvccTxTimeoutAbstractTest extends GridCommonAbstractTest { /** Random number generator. */ private static final Random RAND = new Random(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteOptimisticTxSuspendResumeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteOptimisticTxSuspendResumeTest.java index d5e461069de7a..9530194ee0792 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteOptimisticTxSuspendResumeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteOptimisticTxSuspendResumeTest.java @@ -44,6 +44,9 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionIsolation; import org.apache.ignite.transactions.TransactionTimeoutException; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -58,6 +61,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteOptimisticTxSuspendResumeTest extends GridCommonAbstractTest { /** Transaction timeout. */ private static final long TX_TIMEOUT = 200; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgnitePessimisticTxSuspendResumeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgnitePessimisticTxSuspendResumeTest.java index cd373741dbe24..81ec3fe4ca18b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgnitePessimisticTxSuspendResumeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgnitePessimisticTxSuspendResumeTest.java @@ -29,12 +29,16 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** * */ +@RunWith(JUnit4.class) public class IgnitePessimisticTxSuspendResumeTest extends GridCommonAbstractTest { /** * Creates new cache configuration. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteRejectConnectOnNodeStopTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteRejectConnectOnNodeStopTest.java index acd289d402846..a354ffafe214b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteRejectConnectOnNodeStopTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteRejectConnectOnNodeStopTest.java @@ -35,12 +35,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MINUTES; /** * Sanity test to check that node starts to reject connections when stop procedure started. */ +@RunWith(JUnit4.class) public class IgniteRejectConnectOnNodeStopTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxCachePrimarySyncTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxCachePrimarySyncTest.java index 525f17ff1125c..e629298f55ffc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxCachePrimarySyncTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxCachePrimarySyncTest.java @@ -63,6 +63,9 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_ASYNC; @@ -72,6 +75,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteTxCachePrimarySyncTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxCacheWriteSynchronizationModesMultithreadedTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxCacheWriteSynchronizationModesMultithreadedTest.java index 5581418b686d5..344ee96fc8103 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxCacheWriteSynchronizationModesMultithreadedTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxCacheWriteSynchronizationModesMultithreadedTest.java @@ -53,6 +53,9 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionOptimisticException; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_ASYNC; @@ -66,6 +69,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteTxCacheWriteSynchronizationModesMultithreadedTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxConcurrentRemoveObjectsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxConcurrentRemoveObjectsTest.java index 6d20d4148f6f2..e0654c8fbe5c6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxConcurrentRemoveObjectsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxConcurrentRemoveObjectsTest.java @@ -36,6 +36,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_CACHE_REMOVED_ENTRIES_TTL; import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC; @@ -44,6 +47,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteTxConcurrentRemoveObjectsTest extends GridCommonAbstractTest { /** Cache partitions. */ private static final int CACHE_PARTITIONS = 16; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxConsistencyRestartAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxConsistencyRestartAbstractSelfTest.java index df0925d369f3e..390b2aa0a2d5d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxConsistencyRestartAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxConsistencyRestartAbstractSelfTest.java @@ -38,6 +38,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; @@ -48,6 +51,7 @@ /** * */ +@RunWith(JUnit4.class) public abstract class IgniteTxConsistencyRestartAbstractSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxGetAfterStopTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxGetAfterStopTest.java index f3c57cd69a2e8..0236ad2224a55 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxGetAfterStopTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxGetAfterStopTest.java @@ -24,6 +24,9 @@ import org.apache.ignite.internal.processors.cache.IgniteCacheAbstractTest; import org.apache.ignite.transactions.Transaction; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -32,6 +35,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteTxGetAfterStopTest extends IgniteCacheAbstractTest { /** */ private CacheMode cacheMode; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxOriginatingNodeFailureAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxOriginatingNodeFailureAbstractSelfTest.java index c3ff589a27ab9..b1276917fc038 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxOriginatingNodeFailureAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxOriginatingNodeFailureAbstractSelfTest.java @@ -48,12 +48,16 @@ import org.apache.ignite.spi.IgniteSpiException; import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC; /** * Abstract test for originating node failure. */ +@RunWith(JUnit4.class) public abstract class IgniteTxOriginatingNodeFailureAbstractSelfTest extends GridCacheAbstractSelfTest { /** */ protected static final int GRID_CNT = 5; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest.java index 504209ce45c89..5fbe8b115276e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest.java @@ -61,6 +61,9 @@ import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; @@ -68,6 +71,7 @@ /** * Abstract test for originating node failure. */ +@RunWith(JUnit4.class) public abstract class IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest extends GridCacheAbstractSelfTest { /** */ protected static final int GRID_CNT = 5; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxPreloadAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxPreloadAbstractTest.java index f836787eb4dea..ccc426c77ef4f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxPreloadAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxPreloadAbstractTest.java @@ -36,6 +36,9 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheRebalanceMode.ASYNC; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -45,6 +48,7 @@ /** * Tests transaction during cache preloading. */ +@RunWith(JUnit4.class) public abstract class IgniteTxPreloadAbstractTest extends GridCacheAbstractSelfTest { /** */ private static final int GRID_CNT = 6; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxRemoveTimeoutObjectsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxRemoveTimeoutObjectsTest.java index 359faa6ad4efe..b186b45e983e1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxRemoveTimeoutObjectsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxRemoveTimeoutObjectsTest.java @@ -35,6 +35,9 @@ import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionTimeoutException; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; import static org.apache.ignite.transactions.TransactionIsolation.SERIALIZABLE; @@ -42,6 +45,7 @@ /** * Test correctness of rollback a transaction with timeout during the grid stop. */ +@RunWith(JUnit4.class) public class IgniteTxRemoveTimeoutObjectsTest extends GridCacheAbstractSelfTest { /** */ private static final int PUT_CNT = 1000; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxTimeoutAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxTimeoutAbstractTest.java index 446295b1ef226..326a1745da5ee 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxTimeoutAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxTimeoutAbstractTest.java @@ -31,6 +31,9 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.apache.ignite.transactions.TransactionTimeoutException; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; @@ -41,6 +44,7 @@ /** * Simple cache test. */ +@RunWith(JUnit4.class) public class IgniteTxTimeoutAbstractTest extends GridCommonAbstractTest { /** Random number generator. */ private static final Random RAND = new Random(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAbstractSelfTest.java index 8e8af6cd0ba8c..bede56f165ed5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAbstractSelfTest.java @@ -56,6 +56,8 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -64,6 +66,7 @@ /** * */ +@RunWith(JUnit4.class) public abstract class IgniteCachePutRetryAbstractSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -169,7 +172,7 @@ protected CacheConfiguration cacheConfiguration(boolean evict, boolean store) th /** * @throws Exception If failed. */ - @Test + @org.junit.Test public void testPut() throws Exception { checkRetry(Test.PUT, false, false); } @@ -177,7 +180,7 @@ public void testPut() throws Exception { /** * @throws Exception If failed. */ - @Test + @org.junit.Test public void testGetAndPut() throws Exception { checkRetry(Test.GET_AND_PUT, false, false); } @@ -185,7 +188,7 @@ public void testGetAndPut() throws Exception { /** * @throws Exception If failed. */ - @Test + @org.junit.Test public void testPutStoreEnabled() throws Exception { checkRetry(Test.PUT, false, true); } @@ -193,7 +196,7 @@ public void testPutStoreEnabled() throws Exception { /** * @throws Exception If failed. */ - @Test + @org.junit.Test public void testPutAll() throws Exception { checkRetry(Test.PUT_ALL, false, false); } @@ -201,7 +204,7 @@ public void testPutAll() throws Exception { /** * @throws Exception If failed. */ - @Test + @org.junit.Test public void testPutAsync() throws Exception { checkRetry(Test.PUT_ASYNC, false, false); } @@ -209,7 +212,7 @@ public void testPutAsync() throws Exception { /** * @throws Exception If failed. */ - @Test + @org.junit.Test public void testPutAsyncStoreEnabled() throws Exception { checkRetry(Test.PUT_ASYNC, false, true); } @@ -217,7 +220,7 @@ public void testPutAsyncStoreEnabled() throws Exception { /** * @throws Exception If failed. */ - @Test + @org.junit.Test public void testInvoke() throws Exception { checkRetry(Test.INVOKE, false, false); } @@ -225,7 +228,7 @@ public void testInvoke() throws Exception { /** * @throws Exception If failed. */ - @Test + @org.junit.Test public void testInvokeAll() throws Exception { checkRetry(Test.INVOKE_ALL, false, false); } @@ -233,7 +236,7 @@ public void testInvokeAll() throws Exception { /** * @throws Exception If failed. */ - @Test + @org.junit.Test public void testInvokeAllEvict() throws Exception { checkRetry(Test.INVOKE_ALL, true, false); } @@ -477,7 +480,7 @@ private void checkNoAtomicFutures() throws Exception { /** * @throws Exception If failed. */ - @Test + @org.junit.Test public void testFailsWithNoRetries() throws Exception { checkFailsWithNoRetries(false); } @@ -485,7 +488,7 @@ public void testFailsWithNoRetries() throws Exception { /** * @throws Exception If failed. */ - @Test + @org.junit.Test public void testFailsWithNoRetriesAsync() throws Exception { checkFailsWithNoRetries(true); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryTransactionalSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryTransactionalSelfTest.java index 737109c823c7a..8c7f859334093 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryTransactionalSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryTransactionalSelfTest.java @@ -34,6 +34,8 @@ import org.apache.ignite.cache.CacheEntryProcessor; import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.internal.util.typedef.internal.U; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.testframework.GridTestUtils.runAsync; @@ -42,6 +44,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCachePutRetryTransactionalSelfTest extends IgniteCachePutRetryAbstractSelfTest { /** */ private static final int FACTOR = 1000; @@ -54,7 +57,7 @@ public class IgniteCachePutRetryTransactionalSelfTest extends IgniteCachePutRetr /** * @throws Exception If failed. */ - @Test + @org.junit.Test public void testAtomicLongRetries() throws Exception { final AtomicBoolean finished = new AtomicBoolean(); @@ -92,7 +95,7 @@ public void testAtomicLongRetries() throws Exception { /** * @throws Exception If failed. */ - @Test + @org.junit.Test public void testExplicitTransactionRetriesSingleValue() throws Exception { checkRetry(Test.TX_PUT, false, false); } @@ -100,7 +103,7 @@ public void testExplicitTransactionRetriesSingleValue() throws Exception { /** * @throws Exception If failed. */ - @Test + @org.junit.Test public void testExplicitTransactionRetriesSingleValueStoreEnabled() throws Exception { checkRetry(Test.TX_PUT, false, true); } @@ -108,7 +111,7 @@ public void testExplicitTransactionRetriesSingleValueStoreEnabled() throws Excep /** * @throws Exception If failed. */ - @Test + @org.junit.Test public void testExplicitTransactionRetries() throws Exception { explicitTransactionRetries(false, false); } @@ -116,7 +119,7 @@ public void testExplicitTransactionRetries() throws Exception { /** * @throws Exception If failed. */ - @Test + @org.junit.Test public void testExplicitTransactionRetriesStoreEnabled() throws Exception { explicitTransactionRetries(false, true); } @@ -124,7 +127,7 @@ public void testExplicitTransactionRetriesStoreEnabled() throws Exception { /** * @throws Exception If failed. */ - @Test + @org.junit.Test public void testExplicitTransactionRetriesEvictionEnabled() throws Exception { explicitTransactionRetries(true, false); } @@ -208,7 +211,7 @@ public void explicitTransactionRetries(boolean evict, boolean store) throws Exce /** * @throws Exception If failed. */ - @Test + @org.junit.Test public void testOriginatingNodeFailureForcesOnePhaseCommitDataCleanup() throws Exception { ignite(0).createCache(cacheConfiguration(false, false)); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheStartWithLoadTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheStartWithLoadTest.java index cda238bf14222..10d0781c325ca 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheStartWithLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheStartWithLoadTest.java @@ -39,10 +39,14 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteCacheStartWithLoadTest extends GridCommonAbstractTest { /** */ static final String CACHE_NAME = "tx_repl"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheTxRecoveryRollbackTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheTxRecoveryRollbackTest.java index eed53276587cb..538af7fc8412c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheTxRecoveryRollbackTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheTxRecoveryRollbackTest.java @@ -56,6 +56,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheRebalanceMode.ASYNC; @@ -67,6 +70,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheTxRecoveryRollbackTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCrossCacheTxSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCrossCacheTxSelfTest.java index 8b0a144976c2a..2e13eb6c428b2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCrossCacheTxSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCrossCacheTxSelfTest.java @@ -33,6 +33,9 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -45,6 +48,7 @@ /** * Tests specific combinations of cross-cache transactions. */ +@RunWith(JUnit4.class) public class IgniteCrossCacheTxSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/NotMappedPartitionInTxTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/NotMappedPartitionInTxTest.java index 05c87c9329f63..0bad828931db9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/NotMappedPartitionInTxTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/NotMappedPartitionInTxTest.java @@ -39,6 +39,9 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; @@ -49,6 +52,7 @@ /** */ @SuppressWarnings({"unchecked", "ThrowableNotThrown"}) +@RunWith(JUnit4.class) public class NotMappedPartitionInTxTest extends GridCommonAbstractTest { /** Cache. */ private static final String CACHE = "testCache"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/TxRecoveryStoreEnabledTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/TxRecoveryStoreEnabledTest.java index 9e2ef8d248e9f..d4e9395197908 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/TxRecoveryStoreEnabledTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/TxRecoveryStoreEnabledTest.java @@ -43,6 +43,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; @@ -51,6 +54,7 @@ /** * */ +@RunWith(JUnit4.class) public class TxRecoveryStoreEnabledTest extends GridCommonAbstractTest { /** Nodes count. */ private static final int NODES_CNT = 2; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridPartitionedBackupLoadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridPartitionedBackupLoadSelfTest.java index 57c5e1c5fc07e..fd9a5bb9dd00c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridPartitionedBackupLoadSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridPartitionedBackupLoadSelfTest.java @@ -29,6 +29,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -36,6 +39,7 @@ /** * Test that persistent store is not used when loading invalidated entry from backup node. */ +@RunWith(JUnit4.class) public class GridPartitionedBackupLoadSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearOnlyTxTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearOnlyTxTest.java index 1eb6c1c411976..7ffdf3329d6ff 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearOnlyTxTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearOnlyTxTest.java @@ -30,6 +30,9 @@ import org.apache.ignite.internal.processors.cache.IgniteCacheAbstractTest; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC; @@ -39,6 +42,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheNearOnlyTxTest extends IgniteCacheAbstractTest { /** {@inheritDoc} */ @Override protected int gridCount() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearReadCommittedTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearReadCommittedTest.java index 2707028016517..efdbbd77bbd41 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearReadCommittedTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearReadCommittedTest.java @@ -23,6 +23,9 @@ import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.internal.processors.cache.GridCacheAbstractSelfTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; @@ -32,6 +35,7 @@ * */ @SuppressWarnings("RedundantMethodOverride") +@RunWith(JUnit4.class) public class IgniteCacheNearReadCommittedTest extends GridCacheAbstractSelfTest { /** {@inheritDoc} */ @Override protected int gridCount() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearTxRollbackTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearTxRollbackTest.java index e8d6d9ccd0a4a..27e27818d62ba 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearTxRollbackTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearTxRollbackTest.java @@ -34,6 +34,9 @@ import org.apache.ignite.plugin.extensions.communication.Message; import org.apache.ignite.spi.IgniteSpiException; import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -41,6 +44,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheNearTxRollbackTest extends IgniteCacheAbstractTest { /** {@inheritDoc} */ @Override protected int gridCount() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NearCacheMultithreadedUpdateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NearCacheMultithreadedUpdateTest.java index 41830a7577c8d..dd31cdd78bb4c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NearCacheMultithreadedUpdateTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NearCacheMultithreadedUpdateTest.java @@ -32,6 +32,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -40,6 +43,7 @@ /** * */ +@RunWith(JUnit4.class) public class NearCacheMultithreadedUpdateTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NearCachePutAllMultinodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NearCachePutAllMultinodeTest.java index 4159fe29a67f3..4d4f7ace53d72 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NearCachePutAllMultinodeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NearCachePutAllMultinodeTest.java @@ -35,6 +35,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -44,6 +47,7 @@ /** * */ +@RunWith(JUnit4.class) public class NearCachePutAllMultinodeTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NearCacheSyncUpdateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NearCacheSyncUpdateTest.java index 25700157c3f7c..a1a2a2895ff74 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NearCacheSyncUpdateTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NearCacheSyncUpdateTest.java @@ -31,6 +31,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -41,6 +44,7 @@ /** * */ +@RunWith(JUnit4.class) public class NearCacheSyncUpdateTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NoneRebalanceModeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NoneRebalanceModeSelfTest.java index 19cd3c609bb4a..d46a6fde62ddc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NoneRebalanceModeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NoneRebalanceModeSelfTest.java @@ -22,6 +22,9 @@ import org.apache.ignite.internal.IgniteKernal; import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtLocalPartition; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheRebalanceMode.NONE; import static org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState.OWNING; @@ -29,6 +32,7 @@ /** * Test none rebalance mode. */ +@RunWith(JUnit4.class) public class NoneRebalanceModeSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/CacheManualRebalancingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/CacheManualRebalancingTest.java index fcf5f355462e7..a42ed6f50f9b5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/CacheManualRebalancingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/CacheManualRebalancingTest.java @@ -35,12 +35,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheRebalanceMode.ASYNC; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** */ +@RunWith(JUnit4.class) public class CacheManualRebalancingTest extends GridCommonAbstractTest { /** */ private static final String MYCACHE = "mycache"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/CacheNodeSafeAssertion.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/CacheNodeSafeAssertion.java index 752fc0971b27d..bf6b63fa7639e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/CacheNodeSafeAssertion.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/CacheNodeSafeAssertion.java @@ -56,8 +56,7 @@ protected Ignite ignite() { } /** {@inheritDoc} */ - @Override @Test - public void test() throws AssertionError { + @Override public void test() throws AssertionError { Affinity affinity = ignite.affinity(cacheName); int partCnt = affinity.partitions(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRabalancingDelayedPartitionMapExchangeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRabalancingDelayedPartitionMapExchangeSelfTest.java index 4ab4003f243ea..1f2827d8f62d3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRabalancingDelayedPartitionMapExchangeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRabalancingDelayedPartitionMapExchangeSelfTest.java @@ -40,10 +40,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class GridCacheRabalancingDelayedPartitionMapExchangeSelfTest extends GridCommonAbstractTest { /** */ protected static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingAsyncSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingAsyncSelfTest.java index 52bb6ac27b8d6..15830fdecc68a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingAsyncSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingAsyncSelfTest.java @@ -25,10 +25,14 @@ import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionDemander; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.spi.discovery.tcp.TestTcpDiscoverySpi; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class GridCacheRebalancingAsyncSelfTest extends GridCacheRebalancingSyncSelfTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingCancelTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingCancelTest.java index 2ee5a44236427..eb12817e06a48 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingCancelTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingCancelTest.java @@ -35,10 +35,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test cases for checking cancellation rebalancing process if some events occurs. */ +@RunWith(JUnit4.class) public class GridCacheRebalancingCancelTest extends GridCommonAbstractTest { /** */ private static final String DHT_PARTITIONED_CACHE = "cacheP"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingOrderingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingOrderingTest.java index 3965f73913926..ea3784a389ab0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingOrderingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingOrderingTest.java @@ -59,6 +59,9 @@ import org.apache.ignite.services.ServiceContext; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -102,6 +105,7 @@ * * */ +@RunWith(JUnit4.class) public class GridCacheRebalancingOrderingTest extends GridCommonAbstractTest { /** {@link Random} for test key generation. */ private static final Random RANDOM = new Random(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionCountersTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionCountersTest.java index 26cb20e803763..e95db50c3df9a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionCountersTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionCountersTest.java @@ -37,10 +37,14 @@ import org.apache.ignite.internal.util.typedef.internal.CU; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class GridCacheRebalancingPartitionCountersTest extends GridCommonAbstractTest { /** */ private static final String CACHE_NAME = "cache"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionDistributionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionDistributionTest.java index 9712616989d5d..871764a74af62 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionDistributionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionDistributionTest.java @@ -33,11 +33,14 @@ import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.testframework.assertions.Assertion; import org.apache.ignite.testframework.junits.common.GridRollingRestartAbstractTest; - +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test the behavior of the partition rebalancing during a rolling restart. */ +@RunWith(JUnit4.class) public class GridCacheRebalancingPartitionDistributionTest extends GridRollingRestartAbstractTest { /** The maximum allowable deviation from a perfect distribution. */ private static final double MAX_DEVIATION = 0.20; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingSyncCheckDataTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingSyncCheckDataTest.java index 99ece5dfc78b4..88bed63f114df 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingSyncCheckDataTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingSyncCheckDataTest.java @@ -28,6 +28,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.REPLICATED; import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; @@ -35,6 +38,7 @@ /** * */ +@RunWith(JUnit4.class) public class GridCacheRebalancingSyncCheckDataTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingSyncSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingSyncSelfTest.java index 653f7d65de742..849efc56ff7d3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingSyncSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingSyncSelfTest.java @@ -60,6 +60,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.GridTestUtils.SF; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.LOCAL; import static org.apache.ignite.cache.CacheRebalanceMode.NONE; @@ -67,6 +70,7 @@ /** * */ +@RunWith(JUnit4.class) public class GridCacheRebalancingSyncSelfTest extends GridCommonAbstractTest { /** */ protected static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingUnmarshallingFailedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingUnmarshallingFailedSelfTest.java index 9bc47e664dbd4..d5b7281e2e36c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingUnmarshallingFailedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingUnmarshallingFailedSelfTest.java @@ -33,10 +33,14 @@ import org.apache.ignite.testframework.config.GridTestProperties; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.thread.IgniteThread; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class GridCacheRebalancingUnmarshallingFailedSelfTest extends GridCommonAbstractTest { /** */ protected static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingWithAsyncClearingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingWithAsyncClearingTest.java index 1f6d6963efe36..4093c11dfbe17 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingWithAsyncClearingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingWithAsyncClearingTest.java @@ -38,10 +38,14 @@ import org.apache.ignite.testframework.GridTestUtils.SF; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class GridCacheRebalancingWithAsyncClearingTest extends GridCommonAbstractTest { /** */ private static final String CACHE_NAME = "cache"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheSyncReplicatedPreloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheSyncReplicatedPreloadSelfTest.java index 566703285cd2d..239948ad2ec1e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheSyncReplicatedPreloadSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheSyncReplicatedPreloadSelfTest.java @@ -28,6 +28,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.REPLICATED; import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; @@ -37,6 +40,7 @@ /** * Multithreaded tests for replicated cache preloader. */ +@RunWith(JUnit4.class) public class GridCacheSyncReplicatedPreloadSelfTest extends GridCommonAbstractTest { /** */ private TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridReplicatedTxPreloadTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridReplicatedTxPreloadTest.java index 49874a1c15d5d..98d86fd6290c8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridReplicatedTxPreloadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridReplicatedTxPreloadTest.java @@ -20,12 +20,16 @@ import org.apache.ignite.cache.CacheMode; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.processors.cache.distributed.IgniteTxPreloadAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.REPLICATED; /** * Tests cache transaction during preloading. */ +@RunWith(JUnit4.class) public class GridReplicatedTxPreloadTest extends IgniteTxPreloadAbstractTest { /** {@inheritDoc} */ @Override protected CacheMode cacheMode() { @@ -38,8 +42,8 @@ public class GridReplicatedTxPreloadTest extends IgniteTxPreloadAbstractTest { } /** {@inheritDoc} */ - @Override @Test - public void testLocalTxPreloadingOptimistic() throws Exception { + @Test + @Override public void testLocalTxPreloadingOptimistic() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-1755"); } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheSyncRebalanceModeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheSyncRebalanceModeSelfTest.java index db03d272e8665..2caf38fa3c675 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheSyncRebalanceModeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheSyncRebalanceModeSelfTest.java @@ -27,10 +27,14 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteCacheSyncRebalanceModeSelfTest extends GridCommonAbstractTest { /** Entry count. */ public static final int CNT = 100_000; From 3835772a72a99882f9d6cd2557001c9db94ed416 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Mon, 3 Dec 2018 12:31:45 +0300 Subject: [PATCH 010/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview --- .../GridCacheConcurrentEvictionConsistencySelfTest.java | 4 ++++ .../eviction/GridCacheConcurrentEvictionsSelfTest.java | 4 ++++ .../eviction/GridCacheEmptyEntriesAbstractSelfTest.java | 4 ++++ .../eviction/GridCacheEmptyEntriesLocalSelfTest.java | 8 ++++++-- .../GridCacheEmptyEntriesPartitionedSelfTest.java | 8 ++++++-- .../eviction/GridCacheEvictableEntryEqualsSelfTest.java | 4 ++++ .../cache/eviction/GridCacheEvictionFilterSelfTest.java | 4 ++++ .../eviction/GridCacheEvictionLockUnlockSelfTest.java | 4 ++++ .../cache/eviction/GridCacheEvictionTouchSelfTest.java | 4 ++++ .../paged/PageEvictionPagesRecyclingAndReusingTest.java | 4 ++++ .../cache/eviction/paged/PageEvictionReadThroughTest.java | 4 ++++ .../cache/eviction/paged/PageEvictionTouchOrderTest.java | 4 ++++ .../paged/PageEvictionWithRebalanceAbstractTest.java | 4 ++++ .../sorted/SortedEvictionPolicyPerformanceTest.java | 4 ++++ .../cache/expiry/IgniteCacheExpiryPolicyAbstractTest.java | 4 ++++ .../IgniteCacheExpiryPolicyWithStoreAbstractTest.java | 4 ++++ .../cache/expiry/IgniteCacheLargeValueExpireTest.java | 4 ++++ .../IgniteCacheOnlyOneTtlCleanupThreadExistsTest.java | 4 ++++ .../expiry/IgniteCacheTxExpiryPolicyWithStoreTest.java | 8 ++++++-- .../cache/integration/IgniteCacheLoadAllAbstractTest.java | 4 ++++ .../integration/IgniteCacheLoaderWriterAbstractTest.java | 4 ++++ .../IgniteCacheNoLoadPreviousValueAbstractTest.java | 4 ++++ .../cache/integration/IgniteCacheTxStoreSessionTest.java | 4 ++++ .../local/GridCacheLocalByteArrayValuesSelfTest.java | 4 ++++ .../cache/local/GridCacheLocalLoadAllSelfTest.java | 4 ++++ .../cache/local/GridCacheLocalLockSelfTest.java | 4 ++++ .../cache/local/GridCacheLocalMultithreadedSelfTest.java | 4 ++++ .../cache/local/GridCacheLocalTxTimeoutSelfTest.java | 4 ++++ ...GridCacheAtomicNearEnabledMultiJvmFullApiSelfTest.java | 8 ++++++-- ...ridCacheReplicatedNearOnlyMultiJvmFullApiSelfTest.java | 8 ++++++-- .../cache/mvcc/CacheMvccClusterRestartTest.java | 4 ++++ .../cache/mvcc/CacheMvccConfigurationValidationTest.java | 4 ++++ .../CacheMvccIteratorWithConcurrentTransactionTest.java | 4 ++++ ...acheMvccLocalEntriesWithConcurrentTransactionTest.java | 4 ++++ .../cache/mvcc/CacheMvccOperationChecksTest.java | 4 ++++ .../mvcc/CacheMvccPartitionedCoordinatorFailoverTest.java | 4 ++++ .../cache/mvcc/CacheMvccProcessorLazyStartTest.java | 4 ++++ .../processors/cache/mvcc/CacheMvccProcessorTest.java | 4 ++++ .../cache/mvcc/CacheMvccRemoteTxOnNearNodeStartTest.java | 4 ++++ .../CacheMvccScanQueryWithConcurrentTransactionTest.java | 4 ++++ .../mvcc/CacheMvccSizeWithConcurrentTransactionTest.java | 4 ++++ .../processors/cache/mvcc/CacheMvccTransactionsTest.java | 4 ++++ .../processors/cache/mvcc/CacheMvccTxFailoverTest.java | 4 ++++ .../processors/cache/mvcc/CacheMvccVacuumTest.java | 4 ++++ .../internal/processors/cache/mvcc/MvccCachePeekTest.java | 4 ++++ .../processors/cache/mvcc/MvccUnsupportedTxModesTest.java | 4 ++++ 46 files changed, 194 insertions(+), 10 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionConsistencySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionConsistencySelfTest.java index b392644c075f0..1c95d93953f3e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionConsistencySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionConsistencySelfTest.java @@ -40,6 +40,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.LOCAL; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -49,6 +52,7 @@ /** * */ +@RunWith(JUnit4.class) public class GridCacheConcurrentEvictionConsistencySelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionsSelfTest.java index 5a41fd5b03da8..95faafcb9a24b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionsSelfTest.java @@ -34,6 +34,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils.SF; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.LOCAL; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -44,6 +47,7 @@ /** * */ +@RunWith(JUnit4.class) public class GridCacheConcurrentEvictionsSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesAbstractSelfTest.java index 939a93f14580f..496cee31d7c9d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesAbstractSelfTest.java @@ -39,12 +39,16 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; /** * Tests that cache handles {@code setAllowEmptyEntries} flag correctly. */ +@RunWith(JUnit4.class) public abstract class GridCacheEmptyEntriesAbstractSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesLocalSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesLocalSelfTest.java index 4f15f69908dfc..ebf808b8fe7a1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesLocalSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesLocalSelfTest.java @@ -19,10 +19,14 @@ import org.apache.ignite.Ignite; import org.apache.ignite.cache.CacheMode; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class GridCacheEmptyEntriesLocalSelfTest extends GridCacheEmptyEntriesAbstractSelfTest { /** {@inheritDoc} */ @Override protected Ignite startGrids() throws Exception { @@ -35,8 +39,8 @@ public class GridCacheEmptyEntriesLocalSelfTest extends GridCacheEmptyEntriesAbs } /** {@inheritDoc} */ - @Override @Test - public void testFifo() throws Exception { + @Test + @Override public void testFifo() throws Exception { super.testFifo(); } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesPartitionedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesPartitionedSelfTest.java index 0053aa5721615..11ca9eb875b69 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesPartitionedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesPartitionedSelfTest.java @@ -19,10 +19,14 @@ import org.apache.ignite.Ignite; import org.apache.ignite.cache.CacheMode; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test allow empty entries flag on partitioned cache. */ +@RunWith(JUnit4.class) public class GridCacheEmptyEntriesPartitionedSelfTest extends GridCacheEmptyEntriesAbstractSelfTest { /** {@inheritDoc} */ @Override protected Ignite startGrids() throws Exception { @@ -35,8 +39,8 @@ public class GridCacheEmptyEntriesPartitionedSelfTest extends GridCacheEmptyEntr } /** {@inheritDoc} */ - @Override @Test - public void testFifo() throws Exception { + @Test + @Override public void testFifo() throws Exception { super.testFifo(); } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictableEntryEqualsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictableEntryEqualsSelfTest.java index ed941dbae679a..ec00f6ebc08b0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictableEntryEqualsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictableEntryEqualsSelfTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.cache.eviction.EvictionPolicy; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for EvictableEntry.equals(). */ +@RunWith(JUnit4.class) public class GridCacheEvictableEntryEqualsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionFilterSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionFilterSelfTest.java index 5baf8cf726a30..7b9b11886e373 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionFilterSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionFilterSelfTest.java @@ -36,6 +36,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.LOCAL; @@ -46,6 +49,7 @@ /** * Base class for eviction tests. */ +@RunWith(JUnit4.class) public class GridCacheEvictionFilterSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionLockUnlockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionLockUnlockSelfTest.java index b8a47bf7c27ec..94068bfda1d31 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionLockUnlockSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionLockUnlockSelfTest.java @@ -34,6 +34,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.SECONDS; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -45,6 +48,7 @@ /** * */ +@RunWith(JUnit4.class) public class GridCacheEvictionLockUnlockSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionTouchSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionTouchSelfTest.java index 28df7aeabf418..b0e778e53f691 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionTouchSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionTouchSelfTest.java @@ -42,6 +42,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.REPLICATED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -51,6 +54,7 @@ /** * */ +@RunWith(JUnit4.class) public class GridCacheEvictionTouchSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionPagesRecyclingAndReusingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionPagesRecyclingAndReusingTest.java index 15be9d8d31f51..5a0dc45dea47d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionPagesRecyclingAndReusingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionPagesRecyclingAndReusingTest.java @@ -28,10 +28,14 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.processors.cache.persistence.tree.reuse.ReuseList; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class PageEvictionPagesRecyclingAndReusingTest extends PageEvictionAbstractTest { /** Test timeout. */ private static final long TEST_TIMEOUT = 10 * 60 * 1000; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionReadThroughTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionReadThroughTest.java index 2a9251f451bd6..cc78faeb62a36 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionReadThroughTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionReadThroughTest.java @@ -29,10 +29,14 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.DataPageEvictionMode; import org.apache.ignite.configuration.IgniteConfiguration; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class PageEvictionReadThroughTest extends PageEvictionAbstractTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionTouchOrderTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionTouchOrderTest.java index 3309e4d003b27..36f081ce6100b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionTouchOrderTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionTouchOrderTest.java @@ -23,10 +23,14 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.DataPageEvictionMode; import org.apache.ignite.configuration.IgniteConfiguration; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class PageEvictionTouchOrderTest extends PageEvictionAbstractTest { /** Test entries number. */ private static final int SAFE_ENTRIES = 1000; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionWithRebalanceAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionWithRebalanceAbstractTest.java index 519184b70bf4e..0b4e3a6e2786b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionWithRebalanceAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionWithRebalanceAbstractTest.java @@ -23,10 +23,14 @@ import org.apache.ignite.cache.CachePeekMode; import org.apache.ignite.cache.CacheWriteSynchronizationMode; import org.apache.ignite.configuration.CacheConfiguration; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public abstract class PageEvictionWithRebalanceAbstractTest extends PageEvictionAbstractTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/sorted/SortedEvictionPolicyPerformanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/sorted/SortedEvictionPolicyPerformanceTest.java index 94fa1ea2c4fb5..554bbbeffe63b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/sorted/SortedEvictionPolicyPerformanceTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/sorted/SortedEvictionPolicyPerformanceTest.java @@ -30,10 +30,14 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * {@link SortedEvictionPolicy} performance test. */ +@RunWith(JUnit4.class) public class SortedEvictionPolicyPerformanceTest extends GridCommonAbstractTest { /** Threads. */ private static final int THREADS = 8; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyAbstractTest.java index 518ed388d619b..9baba8e17de35 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyAbstractTest.java @@ -58,6 +58,9 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -70,6 +73,7 @@ /** * */ +@RunWith(JUnit4.class) public abstract class IgniteCacheExpiryPolicyAbstractTest extends IgniteCacheAbstractTest { /** */ private static final long TTL_FOR_EXPIRE = 500L; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyWithStoreAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyWithStoreAbstractTest.java index 234ce81fc0ad2..6a74b0fd44af2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyWithStoreAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyWithStoreAbstractTest.java @@ -45,10 +45,14 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public abstract class IgniteCacheExpiryPolicyWithStoreAbstractTest extends IgniteCacheAbstractTest { /** {@inheritDoc} */ @Override protected NearCacheConfiguration nearConfiguration() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheLargeValueExpireTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheLargeValueExpireTest.java index 41df474e2ab51..f6c3147a07a84 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheLargeValueExpireTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheLargeValueExpireTest.java @@ -34,10 +34,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteCacheLargeValueExpireTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheOnlyOneTtlCleanupThreadExistsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheOnlyOneTtlCleanupThreadExistsTest.java index faaf6e44c9c5d..0c2ef8aee458c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheOnlyOneTtlCleanupThreadExistsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheOnlyOneTtlCleanupThreadExistsTest.java @@ -21,11 +21,15 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Checks that one and only one Ttl cleanup worker thread must exists, and only * if at least one cache with set 'eagerTtl' flag exists. */ +@RunWith(JUnit4.class) public class IgniteCacheOnlyOneTtlCleanupThreadExistsTest extends GridCommonAbstractTest { /** */ private static final String CACHE_NAME1 = "cache-1"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxExpiryPolicyWithStoreTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxExpiryPolicyWithStoreTest.java index 32c6f8d4d9c7e..f795ec92365b6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxExpiryPolicyWithStoreTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxExpiryPolicyWithStoreTest.java @@ -21,6 +21,9 @@ import org.apache.ignite.cache.CacheMode; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -28,6 +31,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheTxExpiryPolicyWithStoreTest extends IgniteCacheExpiryPolicyWithStoreAbstractTest { /** {@inheritDoc} */ @Override protected int gridCount() { @@ -45,8 +49,8 @@ public class IgniteCacheTxExpiryPolicyWithStoreTest extends IgniteCacheExpiryPol } /** {@inheritDoc} */ - @Override @Test - public void testGetReadThrough() throws Exception { + @Test + @Override public void testGetReadThrough() throws Exception { super.testGetReadThrough(); getReadThrough(false, TransactionConcurrency.OPTIMISTIC, TransactionIsolation.READ_COMMITTED); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheLoadAllAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheLoadAllAbstractTest.java index c9cd4cd551a02..1ff46de8903a9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheLoadAllAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheLoadAllAbstractTest.java @@ -35,10 +35,14 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.internal.processors.cache.IgniteCacheAbstractTest; import java.util.concurrent.ConcurrentHashMap; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for {@link Cache#loadAll(Set, boolean, CompletionListener)}. */ +@RunWith(JUnit4.class) public abstract class IgniteCacheLoadAllAbstractTest extends IgniteCacheAbstractTest { /** */ private volatile boolean writeThrough = true; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheLoaderWriterAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheLoaderWriterAbstractTest.java index 540fe67709a97..c36844ad1b9f6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheLoaderWriterAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheLoaderWriterAbstractTest.java @@ -38,10 +38,14 @@ import org.apache.ignite.internal.processors.cache.IgniteCacheAbstractTest; import org.apache.ignite.lifecycle.LifecycleAware; import org.apache.ignite.resources.IgniteInstanceResource; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public abstract class IgniteCacheLoaderWriterAbstractTest extends IgniteCacheAbstractTest { /** */ private static AtomicInteger ldrCallCnt = new AtomicInteger(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheNoLoadPreviousValueAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheNoLoadPreviousValueAbstractTest.java index 19fbf7dfcd791..835d05eff76fb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheNoLoadPreviousValueAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheNoLoadPreviousValueAbstractTest.java @@ -31,6 +31,9 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -38,6 +41,7 @@ /** * Test for configuration property {@link CacheConfiguration#isLoadPreviousValue()}. */ +@RunWith(JUnit4.class) public abstract class IgniteCacheNoLoadPreviousValueAbstractTest extends IgniteCacheAbstractTest { /** */ private Integer lastKey = 0; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionTest.java index b6e1190adec81..13708dca3b6e3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionTest.java @@ -28,6 +28,9 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -37,6 +40,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheTxStoreSessionTest extends IgniteCacheStoreSessionAbstractTest { /** {@inheritDoc} */ @Override protected int gridCount() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalByteArrayValuesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalByteArrayValuesSelfTest.java index 9bed0651588ae..1ceae7a2d3113 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalByteArrayValuesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalByteArrayValuesSelfTest.java @@ -30,6 +30,9 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.LOCAL; @@ -41,6 +44,7 @@ /** * Byte values test for LOCAL cache. */ +@RunWith(JUnit4.class) public class GridCacheLocalByteArrayValuesSelfTest extends GridCacheAbstractByteArrayValuesSelfTest { /** Grid. */ private static Ignite ignite; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalLoadAllSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalLoadAllSelfTest.java index b8b43ae18a6bb..638a49f848e68 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalLoadAllSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalLoadAllSelfTest.java @@ -29,12 +29,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.LOCAL; /** * Load-All self test. */ +@RunWith(JUnit4.class) public class GridCacheLocalLoadAllSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override public void setUp() throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalLockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalLockSelfTest.java index fd560b7028771..4bd013ef1a244 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalLockSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalLockSelfTest.java @@ -31,12 +31,16 @@ import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.LOCAL; /** * Test cases for multi-threaded tests. */ +@RunWith(JUnit4.class) public class GridCacheLocalLockSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override public void setUp() throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalMultithreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalMultithreadedSelfTest.java index 2e58c92f49891..f5b659acdabe3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalMultithreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalMultithreadedSelfTest.java @@ -36,12 +36,16 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.LOCAL; /** * Multithreaded local cache locking test. */ +@RunWith(JUnit4.class) public class GridCacheLocalMultithreadedSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override public void setUp() throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxTimeoutSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxTimeoutSelfTest.java index d33cb4be98c2e..e7297e91b0e9a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxTimeoutSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxTimeoutSelfTest.java @@ -31,6 +31,9 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.apache.ignite.transactions.TransactionTimeoutException; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.LOCAL; import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC; @@ -42,6 +45,7 @@ /** * */ +@RunWith(JUnit4.class) public class GridCacheLocalTxTimeoutSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override public void setUp() throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicNearEnabledMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicNearEnabledMultiJvmFullApiSelfTest.java index 18ac7304ca474..a72f80c811504 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicNearEnabledMultiJvmFullApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicNearEnabledMultiJvmFullApiSelfTest.java @@ -18,10 +18,14 @@ package org.apache.ignite.internal.processors.cache.multijvm; import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicNearEnabledMultiNodeFullApiSelfTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Multi-JVM tests. */ +@RunWith(JUnit4.class) public class GridCacheAtomicNearEnabledMultiJvmFullApiSelfTest extends GridCacheAtomicNearEnabledMultiNodeFullApiSelfTest { /** {@inheritDoc} */ @@ -30,8 +34,8 @@ public class GridCacheAtomicNearEnabledMultiJvmFullApiSelfTest extends } /** {@inheritDoc} */ - @Override @Test - public void testPutAllPutAll() throws Exception { + @Test + @Override public void testPutAllPutAll() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-1112"); } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheReplicatedNearOnlyMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheReplicatedNearOnlyMultiJvmFullApiSelfTest.java index 6b360af4666ba..6e0eba29ee9c5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheReplicatedNearOnlyMultiJvmFullApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheReplicatedNearOnlyMultiJvmFullApiSelfTest.java @@ -18,10 +18,14 @@ package org.apache.ignite.internal.processors.cache.multijvm; import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCacheReplicatedNearOnlyMultiNodeFullApiSelfTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Multi-JVM tests. */ +@RunWith(JUnit4.class) public class GridCacheReplicatedNearOnlyMultiJvmFullApiSelfTest extends GridCacheReplicatedNearOnlyMultiNodeFullApiSelfTest { /** {@inheritDoc} */ @@ -30,8 +34,8 @@ public class GridCacheReplicatedNearOnlyMultiJvmFullApiSelfTest extends } /** {@inheritDoc} */ - @Override @Test - public void testNearDhtKeySize() throws Exception { + @Test + @Override public void testNearDhtKeySize() throws Exception { if (isMultiJvm()) fail("https://issues.apache.org/jira/browse/IGNITE-648"); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccClusterRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccClusterRestartTest.java index 4c23f8dea44ff..d83734af1a291 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccClusterRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccClusterRestartTest.java @@ -32,6 +32,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -41,6 +44,7 @@ /** * */ +@RunWith(JUnit4.class) public class CacheMvccClusterRestartTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccConfigurationValidationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccConfigurationValidationTest.java index d4cef71ca478e..9c53588cb07aa 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccConfigurationValidationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccConfigurationValidationTest.java @@ -43,6 +43,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -53,6 +56,7 @@ * */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class CacheMvccConfigurationValidationTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccIteratorWithConcurrentTransactionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccIteratorWithConcurrentTransactionTest.java index 1af1a9dfbb7bc..db5e151c26d3e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccIteratorWithConcurrentTransactionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccIteratorWithConcurrentTransactionTest.java @@ -25,10 +25,14 @@ import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.util.lang.IgniteClosure2X; import org.apache.ignite.internal.util.typedef.internal.U; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class CacheMvccIteratorWithConcurrentTransactionTest extends CacheMvccAbstractFeatureTest { /** * @throws Exception if failed. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccLocalEntriesWithConcurrentTransactionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccLocalEntriesWithConcurrentTransactionTest.java index 4add41526b59f..0040093db9c31 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccLocalEntriesWithConcurrentTransactionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccLocalEntriesWithConcurrentTransactionTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.cache.CachePeekMode; import org.apache.ignite.internal.util.lang.IgniteClosure2X; import org.apache.ignite.internal.util.typedef.internal.U; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class CacheMvccLocalEntriesWithConcurrentTransactionTest extends CacheMvccAbstractFeatureTest { /** * @throws Exception if failed. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccOperationChecksTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccOperationChecksTest.java index 1939c48cb4f9e..e9b1fd6d5c731 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccOperationChecksTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccOperationChecksTest.java @@ -32,6 +32,9 @@ import org.apache.ignite.lang.IgniteBiPredicate; import org.apache.ignite.lang.IgniteFuture; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -39,6 +42,7 @@ /** * */ +@RunWith(JUnit4.class) public class CacheMvccOperationChecksTest extends CacheMvccAbstractTest { /** Empty Class[]. */ private static final Class[] E = new Class[]{}; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccPartitionedCoordinatorFailoverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccPartitionedCoordinatorFailoverTest.java index 7b6f4da5217b9..c8b4677c313f2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccPartitionedCoordinatorFailoverTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccPartitionedCoordinatorFailoverTest.java @@ -21,6 +21,9 @@ import org.apache.ignite.IgniteCache; import org.apache.ignite.cache.CacheMode; import org.apache.ignite.configuration.CacheConfiguration; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; import static org.apache.ignite.internal.processors.cache.mvcc.CacheMvccAbstractTest.ReadMode.GET; @@ -32,6 +35,7 @@ /** * Coordinator failover test for partitioned caches. */ +@RunWith(JUnit4.class) public class CacheMvccPartitionedCoordinatorFailoverTest extends CacheMvccAbstractCoordinatorFailoverTest { /** {@inheritDoc} */ @Override protected CacheMode cacheMode() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccProcessorLazyStartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccProcessorLazyStartTest.java index 5147cfbb856d6..00439b5acc9c6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccProcessorLazyStartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccProcessorLazyStartTest.java @@ -23,11 +23,15 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.IgniteEx; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for a lazy MVCC processor start. */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class CacheMvccProcessorLazyStartTest extends CacheMvccAbstractTest { /** {@inheritDoc} */ @Override protected CacheMode cacheMode() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccProcessorTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccProcessorTest.java index d6430e1491e94..657bc964875e1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccProcessorTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccProcessorTest.java @@ -22,12 +22,16 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.processors.cache.mvcc.txlog.TxState; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** * */ +@RunWith(JUnit4.class) public class CacheMvccProcessorTest extends CacheMvccAbstractTest { /** {@inheritDoc} */ @Override protected CacheMode cacheMode() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccRemoteTxOnNearNodeStartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccRemoteTxOnNearNodeStartTest.java index 1016a9d239598..20ca8da19c7fa 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccRemoteTxOnNearNodeStartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccRemoteTxOnNearNodeStartTest.java @@ -25,11 +25,15 @@ import org.apache.ignite.cache.affinity.Affinity; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ; /** */ +@RunWith(JUnit4.class) public class CacheMvccRemoteTxOnNearNodeStartTest extends CacheMvccAbstractTest { /** {@inheritDoc} */ @Override protected CacheMode cacheMode() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccScanQueryWithConcurrentTransactionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccScanQueryWithConcurrentTransactionTest.java index 62defed189b7b..f618b3ffbad17 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccScanQueryWithConcurrentTransactionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccScanQueryWithConcurrentTransactionTest.java @@ -28,10 +28,14 @@ import org.apache.ignite.internal.util.lang.IgniteClosure2X; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.lang.IgniteBiPredicate; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class CacheMvccScanQueryWithConcurrentTransactionTest extends CacheMvccAbstractFeatureTest { /** * @throws Exception if failed. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSizeWithConcurrentTransactionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSizeWithConcurrentTransactionTest.java index 90f0407059570..54de75552cec3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSizeWithConcurrentTransactionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSizeWithConcurrentTransactionTest.java @@ -21,10 +21,14 @@ import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.util.lang.IgniteClosure2X; import org.apache.ignite.internal.util.typedef.internal.U; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class CacheMvccSizeWithConcurrentTransactionTest extends CacheMvccAbstractFeatureTest { /** * @throws Exception if failed. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTransactionsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTransactionsTest.java index c8e999b7d7feb..c2d89c4b125ea 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTransactionsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTransactionsTest.java @@ -93,6 +93,9 @@ import org.apache.ignite.transactions.TransactionIsolation; import org.jetbrains.annotations.Nullable; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -109,6 +112,7 @@ * TODO IGNITE-6739: test with cache groups. */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class CacheMvccTransactionsTest extends CacheMvccAbstractTest { /** {@inheritDoc} */ @Override protected CacheMode cacheMode() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTxFailoverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTxFailoverTest.java index 3f3a659ff9602..ba7b3c1117e54 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTxFailoverTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTxFailoverTest.java @@ -40,10 +40,14 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Check Tx state recovery from WAL. */ +@RunWith(JUnit4.class) public class CacheMvccTxFailoverTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryVmIpFinder FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccVacuumTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccVacuumTest.java index 0a9c67f857f16..29bb6e7a7f693 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccVacuumTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccVacuumTest.java @@ -25,12 +25,16 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.util.worker.GridWorker; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** * Vacuum test. */ +@RunWith(JUnit4.class) public class CacheMvccVacuumTest extends CacheMvccAbstractTest { /** {@inheritDoc} */ @Override protected CacheMode cacheMode() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccCachePeekTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccCachePeekTest.java index c086452d7a559..7bcce6affd38e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccCachePeekTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccCachePeekTest.java @@ -26,12 +26,16 @@ import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ; /** */ +@RunWith(JUnit4.class) public class MvccCachePeekTest extends CacheMvccAbstractTest { /** */ private interface ThrowingRunnable { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccUnsupportedTxModesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccUnsupportedTxModesTest.java index 34e4f7bb95557..dc1f2cb53541c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccUnsupportedTxModesTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccUnsupportedTxModesTest.java @@ -28,6 +28,9 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionException; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.Collections.singleton; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT; @@ -38,6 +41,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.SERIALIZABLE; /** */ +@RunWith(JUnit4.class) public class MvccUnsupportedTxModesTest extends GridCommonAbstractTest { /** */ private static IgniteCache cache; From ac6be2c4e07748f34da5d83ce3e9f20786ead2fc Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Mon, 3 Dec 2018 13:46:59 +0300 Subject: [PATCH 011/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview --- .../persistence/db/CheckpointBufferDeadlockTest.java | 4 ++++ .../cache/persistence/db/IgniteLogicalRecoveryTest.java | 4 ++++ .../cache/persistence/db/IgnitePdsCacheRestoreTest.java | 4 ++++ .../db/IgnitePdsCacheWalDisabledOnRebalancingTest.java | 4 ++++ .../persistence/db/IgnitePdsDataRegionMetricsTest.java | 4 ++++ .../db/IgnitePdsMultiNodePutGetRestartTest.java | 4 ++++ .../db/IgnitePdsPageEvictionDuringPartitionClearTest.java | 4 ++++ .../cache/persistence/db/IgnitePdsPageEvictionTest.java | 4 ++++ .../persistence/db/IgnitePdsPartitionPreloadTest.java | 4 ++++ .../db/IgnitePdsRebalancingOnNotStableTopologyTest.java | 4 ++++ .../persistence/db/IgnitePdsReserveWalSegmentsTest.java | 4 ++++ .../persistence/db/IgnitePdsTransactionsHangTest.java | 4 ++++ .../persistence/db/IgnitePdsWholeClusterRestartTest.java | 4 ++++ .../cache/persistence/db/IgnitePdsWithTtlTest.java | 4 ++++ .../db/SlowHistoricalRebalanceSmallHistoryTest.java | 4 ++++ .../db/file/IgnitePdsDiskErrorsRecoveringTest.java | 4 ++++ .../db/file/IgnitePdsNoActualWalHistoryTest.java | 4 ++++ .../persistence/db/file/IgnitePdsPageReplacementTest.java | 4 ++++ .../db/file/IgnitePdsThreadInterruptionTest.java | 4 ++++ .../db/filename/IgniteUidAsConsistentIdMigrationTest.java | 4 ++++ .../db/wal/FsyncWalRolloverDoesNotBlockTest.java | 4 ++++ .../db/wal/IgniteNodeStoppedDuringDisableWALTest.java | 4 ++++ ...iteWALTailIsReachedDuringIterationOverArchiveTest.java | 4 ++++ .../persistence/db/wal/IgniteWalFlushFailoverTest.java | 4 ++++ .../IgniteWalFlushMultiNodeFailoverAbstractSelfTest.java | 1 + .../db/wal/IgniteWalFormatFileFailoverTest.java | 4 ++++ .../db/wal/IgniteWalHistoryReservationsTest.java | 4 ++++ .../db/wal/IgniteWalIteratorExceptionDuringReadTest.java | 4 ++++ .../db/wal/IgniteWalIteratorSwitchSegmentTest.java | 4 ++++ .../cache/persistence/db/wal/IgniteWalRebalanceTest.java | 4 ++++ .../persistence/db/wal/IgniteWalRecoveryPPCTest.java | 4 ++++ .../db/wal/IgniteWalRecoverySeveralRestartsTest.java | 4 ++++ .../db/wal/IgniteWalSerializerVersionTest.java | 4 ++++ .../cache/persistence/db/wal/WalCompactionTest.java | 4 ++++ .../db/wal/WalDeletionArchiveAbstractTest.java | 4 ++++ .../processors/cache/persistence/db/wal/WalPathsTest.java | 4 ++++ .../db/wal/WalRecoveryTxLogicalRecordsTest.java | 4 ++++ .../persistence/db/wal/WalRolloverRecordLoggingTest.java | 5 +++++ .../cache/persistence/db/wal/WalRolloverTypesTest.java | 4 ++++ .../wal/crc/IgniteAbstractWalIteratorInvalidCrcTest.java | 4 ++++ .../persistence/db/wal/crc/IgniteDataIntegrityTests.java | 4 ++++ .../db/wal/crc/IgnitePureJavaCrcCompatibility.java | 4 ++++ .../db/wal/crc/IgniteReplayWalIteratorInvalidCrcTest.java | 8 ++++++-- .../persistence/db/wal/reader/IgniteWalReaderTest.java | 4 ++++ 44 files changed, 176 insertions(+), 2 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/CheckpointBufferDeadlockTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/CheckpointBufferDeadlockTest.java index f1cb82bd18114..c96ec5075e58c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/CheckpointBufferDeadlockTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/CheckpointBufferDeadlockTest.java @@ -59,10 +59,14 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.logger.GridTestLog4jLogger; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class CheckpointBufferDeadlockTest extends GridCommonAbstractTest { /** Ip finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgniteLogicalRecoveryTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgniteLogicalRecoveryTest.java index b8aaa96797117..c62942001a3cf 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgniteLogicalRecoveryTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgniteLogicalRecoveryTest.java @@ -64,10 +64,14 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * A set of tests that check correctness of logical recovery performed during node start. */ +@RunWith(JUnit4.class) public class IgniteLogicalRecoveryTest extends GridCommonAbstractTest { /** */ private static final int[] EVTS_DISABLED = {}; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsCacheRestoreTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsCacheRestoreTest.java index 086a86ca35f7f..c341452616e51 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsCacheRestoreTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsCacheRestoreTest.java @@ -29,12 +29,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * */ +@RunWith(JUnit4.class) public class IgnitePdsCacheRestoreTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsCacheWalDisabledOnRebalancingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsCacheWalDisabledOnRebalancingTest.java index 12e673f11f378..0ecde09998b8b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsCacheWalDisabledOnRebalancingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsCacheWalDisabledOnRebalancingTest.java @@ -44,6 +44,9 @@ import org.apache.ignite.plugin.extensions.communication.Message; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager.DFLT_STORE_DIR; @@ -51,6 +54,7 @@ * Test scenarios with rebalancing, IGNITE_DISABLE_WAL_DURING_REBALANCING optimization and topology changes * such as client nodes join/leave, server nodes from BLT leave/join, server nodes out of BLT join/leave. */ +@RunWith(JUnit4.class) public class IgnitePdsCacheWalDisabledOnRebalancingTest extends GridCommonAbstractTest { /** Block message predicate to set to Communication SPI in node configuration. */ private IgniteBiPredicate blockMessagePredicate; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsDataRegionMetricsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsDataRegionMetricsTest.java index 9be1627ea3ac5..19214147da6c7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsDataRegionMetricsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsDataRegionMetricsTest.java @@ -48,6 +48,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.nio.file.Files.newDirectoryStream; import static org.apache.ignite.configuration.DataStorageConfiguration.DFLT_DATA_REG_DEFAULT_NAME; @@ -55,6 +58,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgnitePdsDataRegionMetricsTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsMultiNodePutGetRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsMultiNodePutGetRestartTest.java index 4923a48664e27..29740d9e9b588 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsMultiNodePutGetRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsMultiNodePutGetRestartTest.java @@ -41,10 +41,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgnitePdsMultiNodePutGetRestartTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsPageEvictionDuringPartitionClearTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsPageEvictionDuringPartitionClearTest.java index 7d7c52074794e..5091d981cbe40 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsPageEvictionDuringPartitionClearTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsPageEvictionDuringPartitionClearTest.java @@ -35,10 +35,14 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgnitePdsPageEvictionDuringPartitionClearTest extends GridCommonAbstractTest { /** */ public static final String CACHE_NAME = "cache"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsPageEvictionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsPageEvictionTest.java index 3a1f29a05b7dc..8534231054e55 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsPageEvictionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsPageEvictionTest.java @@ -37,10 +37,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgnitePdsPageEvictionTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsPartitionPreloadTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsPartitionPreloadTest.java index 6e0137d868f13..fef4d4b6bd4e0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsPartitionPreloadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsPartitionPreloadTest.java @@ -41,6 +41,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -49,6 +52,7 @@ /** * Test partition preload for varios cache modes. */ +@RunWith(JUnit4.class) public class IgnitePdsPartitionPreloadTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsRebalancingOnNotStableTopologyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsRebalancingOnNotStableTopologyTest.java index bfe9d7da880d8..4fd2b7994cce2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsRebalancingOnNotStableTopologyTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsRebalancingOnNotStableTopologyTest.java @@ -35,6 +35,9 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.multijvm.IgniteProcessProxy; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * We start writing to unstable cluster. @@ -42,6 +45,7 @@ * There will be entries in WAL which belongs to evicted partitions. * We should ignore them (not throw exceptions). This point is tested. */ +@RunWith(JUnit4.class) public class IgnitePdsRebalancingOnNotStableTopologyTest extends GridCommonAbstractTest { /** Checkpoint frequency. */ private static final long CHECKPOINT_FREQUENCY = 2_000_000; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsReserveWalSegmentsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsReserveWalSegmentsTest.java index 80d3ba7cbb7e1..2853a521c0098 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsReserveWalSegmentsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsReserveWalSegmentsTest.java @@ -33,12 +33,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_PDS_MAX_CHECKPOINT_MEMORY_HISTORY_SIZE; /** * Test correctness of truncating unused WAL segments. */ +@RunWith(JUnit4.class) public class IgnitePdsReserveWalSegmentsTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsTransactionsHangTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsTransactionsHangTest.java index a4923345f7497..72eeb965a560f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsTransactionsHangTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsTransactionsHangTest.java @@ -46,6 +46,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ; @@ -53,6 +56,7 @@ /** * Checks that transactions don't hang during checkpoint creation. */ +@RunWith(JUnit4.class) public class IgnitePdsTransactionsHangTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsWholeClusterRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsWholeClusterRestartTest.java index e1b12f487e65c..919888afc6925 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsWholeClusterRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsWholeClusterRestartTest.java @@ -33,10 +33,14 @@ import org.apache.ignite.configuration.WALMode; import org.apache.ignite.spi.checkpoint.noop.NoopCheckpointSpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgnitePdsWholeClusterRestartTest extends GridCommonAbstractTest { /** */ private static final int GRID_CNT = 5; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsWithTtlTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsWithTtlTest.java index 4316ef69caa51..a14fd420e73c7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsWithTtlTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsWithTtlTest.java @@ -42,10 +42,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test TTL worker with persistence enabled */ +@RunWith(JUnit4.class) public class IgnitePdsWithTtlTest extends GridCommonAbstractTest { /** */ public static final String CACHE_NAME = "expirableCache"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/SlowHistoricalRebalanceSmallHistoryTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/SlowHistoricalRebalanceSmallHistoryTest.java index 6859b43785406..744b5324e8d56 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/SlowHistoricalRebalanceSmallHistoryTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/SlowHistoricalRebalanceSmallHistoryTest.java @@ -43,10 +43,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class SlowHistoricalRebalanceSmallHistoryTest extends GridCommonAbstractTest { /** Ip finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsDiskErrorsRecoveringTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsDiskErrorsRecoveringTest.java index c675331e3e0a3..837637fd9a0fb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsDiskErrorsRecoveringTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsDiskErrorsRecoveringTest.java @@ -50,12 +50,16 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_WAL_MMAP; /** * Tests node recovering after disk errors during interaction with persistent storage. */ +@RunWith(JUnit4.class) public class IgnitePdsDiskErrorsRecoveringTest extends GridCommonAbstractTest { /** */ private static final int PAGE_SIZE = DataStorageConfiguration.DFLT_PAGE_SIZE; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsNoActualWalHistoryTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsNoActualWalHistoryTest.java index 31d1f5d80c3e3..41e027e6c6712 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsNoActualWalHistoryTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsNoActualWalHistoryTest.java @@ -36,10 +36,14 @@ import org.apache.ignite.internal.util.typedef.X; import org.apache.ignite.internal.util.typedef.internal.S; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgnitePdsNoActualWalHistoryTest extends GridCommonAbstractTest { /** Cache name. */ private static final String CACHE_NAME = "cache"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsPageReplacementTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsPageReplacementTest.java index 43f60756c7619..7be0625237717 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsPageReplacementTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsPageReplacementTest.java @@ -40,11 +40,15 @@ import org.apache.ignite.internal.util.typedef.internal.CU; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for page replacement (rotation with disk) process with enabled persistence. * A lot of reader threads tries to acquire page and checkpointer threads write data. */ +@RunWith(JUnit4.class) public class IgnitePdsPageReplacementTest extends GridCommonAbstractTest { /** */ private static final int NUMBER_OF_SEGMENTS = 64; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsThreadInterruptionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsThreadInterruptionTest.java index c24dd51d53af9..4b7db7dd4d546 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsThreadInterruptionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsThreadInterruptionTest.java @@ -30,10 +30,14 @@ import org.apache.ignite.configuration.WALMode; import org.apache.ignite.internal.processors.cache.persistence.file.AsyncFileIOFactory; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test what interruptions of writing threads do not affect PDS. */ +@RunWith(JUnit4.class) public class IgnitePdsThreadInterruptionTest extends GridCommonAbstractTest { /** */ private static final int PAGE_SIZE = 1 << 12; // 4096 diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/filename/IgniteUidAsConsistentIdMigrationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/filename/IgniteUidAsConsistentIdMigrationTest.java index ed321b60ec183..b3e36c9e1c543 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/filename/IgniteUidAsConsistentIdMigrationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/filename/IgniteUidAsConsistentIdMigrationTest.java @@ -36,6 +36,9 @@ import org.apache.ignite.testframework.GridStringLogger; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_CONSISTENT_ID_BY_HOST_WITHOUT_PORT; import static org.apache.ignite.IgniteSystemProperties.IGNITE_DATA_STORAGE_FOLDER_BY_CONSISTENT_ID; @@ -44,6 +47,7 @@ /** * Test for new and old style persistent storage folders generation */ +@RunWith(JUnit4.class) public class IgniteUidAsConsistentIdMigrationTest extends GridCommonAbstractTest { /** Cache name for test. */ public static final String CACHE_NAME = "dummy"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/FsyncWalRolloverDoesNotBlockTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/FsyncWalRolloverDoesNotBlockTest.java index b885fa3bd873e..5bfb648454999 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/FsyncWalRolloverDoesNotBlockTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/FsyncWalRolloverDoesNotBlockTest.java @@ -26,11 +26,15 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.configuration.DataStorageConfiguration.DFLT_WAL_PATH; import static org.apache.ignite.configuration.WALMode.FSYNC; /** */ +@RunWith(JUnit4.class) public class FsyncWalRolloverDoesNotBlockTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteNodeStoppedDuringDisableWALTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteNodeStoppedDuringDisableWALTest.java index cefffcee4883b..f6dbdd3229b06 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteNodeStoppedDuringDisableWALTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteNodeStoppedDuringDisableWALTest.java @@ -43,6 +43,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.nio.file.FileVisitResult.CONTINUE; import static java.nio.file.Files.walkFileTree; @@ -57,6 +60,7 @@ /*** * */ +@RunWith(JUnit4.class) public class IgniteNodeStoppedDuringDisableWALTest extends GridCommonAbstractTest { /** */ public static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWALTailIsReachedDuringIterationOverArchiveTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWALTailIsReachedDuringIterationOverArchiveTest.java index 802db50df43ba..c00e4e0d57002 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWALTailIsReachedDuringIterationOverArchiveTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWALTailIsReachedDuringIterationOverArchiveTest.java @@ -49,6 +49,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.nio.ByteBuffer.allocate; import static java.nio.file.StandardOpenOption.WRITE; @@ -57,6 +60,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteWALTailIsReachedDuringIterationOverArchiveTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalFlushFailoverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalFlushFailoverTest.java index c0e426506839f..d3988d2a3b3fb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalFlushFailoverTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalFlushFailoverTest.java @@ -43,10 +43,14 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteWalFlushFailoverTest extends GridCommonAbstractTest { /** */ private static final String TEST_CACHE = "testCache"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalFlushMultiNodeFailoverAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalFlushMultiNodeFailoverAbstractSelfTest.java index c9cf203c3d527..cf0d5397a4cf0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalFlushMultiNodeFailoverAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalFlushMultiNodeFailoverAbstractSelfTest.java @@ -47,6 +47,7 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; /** * Tests error recovery while node flushing diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalFormatFileFailoverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalFormatFileFailoverTest.java index 64eb410cd99ce..617ec9a2c6f4f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalFormatFileFailoverTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalFormatFileFailoverTest.java @@ -41,10 +41,14 @@ import org.apache.ignite.internal.util.typedef.X; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteWalFormatFileFailoverTest extends GridCommonAbstractTest { /** */ private static final String TEST_CACHE = "testCache"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalHistoryReservationsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalHistoryReservationsTest.java index 2544aae233793..8ac10b29b3898 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalHistoryReservationsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalHistoryReservationsTest.java @@ -40,12 +40,16 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_PDS_WAL_REBALANCE_THRESHOLD; /** * */ +@RunWith(JUnit4.class) public class IgniteWalHistoryReservationsTest extends GridCommonAbstractTest { /** */ private volatile boolean client; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalIteratorExceptionDuringReadTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalIteratorExceptionDuringReadTest.java index 9174720354ad0..9e01c781e3819 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalIteratorExceptionDuringReadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalIteratorExceptionDuringReadTest.java @@ -39,10 +39,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteWalIteratorExceptionDuringReadTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalIteratorSwitchSegmentTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalIteratorSwitchSegmentTest.java index 62357f71b1f60..001f77cac7e19 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalIteratorSwitchSegmentTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalIteratorSwitchSegmentTest.java @@ -61,6 +61,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.pagemem.wal.record.WALRecord.RecordType.METASTORE_DATA_RECORD; import static org.apache.ignite.internal.processors.cache.persistence.wal.serializer.RecordV1Serializer.HEADER_RECORD_SIZE; @@ -70,6 +73,7 @@ /*** * Test check correct switch segment if in the tail of segment have garbage. */ +@RunWith(JUnit4.class) public class IgniteWalIteratorSwitchSegmentTest extends GridCommonAbstractTest { /** Segment file size. */ private static final int SEGMENT_SIZE = 1024 * 1024; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRebalanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRebalanceTest.java index edf757ddc0192..ab34b0f00ad41 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRebalanceTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRebalanceTest.java @@ -63,12 +63,16 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_PDS_WAL_REBALANCE_THRESHOLD; /** * Historical WAL rebalance base test. */ +@RunWith(JUnit4.class) public class IgniteWalRebalanceTest extends GridCommonAbstractTest { /** Cache name. */ private static final String CACHE_NAME = "cache"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoveryPPCTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoveryPPCTest.java index 55b22d43b35d9..f5675ecf4683a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoveryPPCTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoveryPPCTest.java @@ -31,10 +31,14 @@ import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.util.typedef.internal.S; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteWalRecoveryPPCTest extends GridCommonAbstractTest { /** */ private boolean fork; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoverySeveralRestartsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoverySeveralRestartsTest.java index 84375095d3026..cb2ea1d1e95dd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoverySeveralRestartsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoverySeveralRestartsTest.java @@ -37,10 +37,14 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteWalRecoverySeveralRestartsTest extends GridCommonAbstractTest { /** */ public static final int PAGE_SIZE = 1024; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalSerializerVersionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalSerializerVersionTest.java index 16edab1ea9273..e0404154a3e46 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalSerializerVersionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalSerializerVersionTest.java @@ -48,6 +48,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_WAL_SERIALIZER_VERSION; import static org.apache.ignite.transactions.TransactionState.PREPARED; @@ -55,6 +58,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteWalSerializerVersionTest extends GridCommonAbstractTest { /** Ip finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalCompactionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalCompactionTest.java index a0ebe3a7e14cc..213acd2cfd4b2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalCompactionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalCompactionTest.java @@ -41,10 +41,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class WalCompactionTest extends GridCommonAbstractTest { /** Ip finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalDeletionArchiveAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalDeletionArchiveAbstractTest.java index 5690c9f2a01e8..c2296e583f8fe 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalDeletionArchiveAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalDeletionArchiveAbstractTest.java @@ -34,12 +34,16 @@ import org.apache.ignite.internal.processors.cache.persistence.wal.FileDescriptor; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_PDS_MAX_CHECKPOINT_MEMORY_HISTORY_SIZE; /** * */ +@RunWith(JUnit4.class) public abstract class WalDeletionArchiveAbstractTest extends GridCommonAbstractTest { /** */ public static final String CACHE_NAME = "SomeCache"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalPathsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalPathsTest.java index be59889d2dd7a..d64953e578c41 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalPathsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalPathsTest.java @@ -23,8 +23,12 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** Tests equal paths to WAL storage and WAL archive. */ +@RunWith(JUnit4.class) public class WalPathsTest extends GridCommonAbstractTest { /** WalPath and WalArchivePath. */ private File walDir; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRecoveryTxLogicalRecordsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRecoveryTxLogicalRecordsTest.java index 8e1e416ef4da5..9837ce6f1d6d9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRecoveryTxLogicalRecordsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRecoveryTxLogicalRecordsTest.java @@ -65,10 +65,14 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class WalRecoveryTxLogicalRecordsTest extends GridCommonAbstractTest { /** Cache name. */ private static final String CACHE_NAME = "cache"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRolloverRecordLoggingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRolloverRecordLoggingTest.java index e1a4d8151e87e..d5ccb3b4d0dde 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRolloverRecordLoggingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRolloverRecordLoggingTest.java @@ -39,9 +39,14 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + /** * */ +@RunWith(JUnit4.class) public abstract class WalRolloverRecordLoggingTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRolloverTypesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRolloverTypesTest.java index 7b9a38bb4141e..984802ad635d5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRolloverTypesTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRolloverTypesTest.java @@ -37,6 +37,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.configuration.DataStorageConfiguration.DFLT_WAL_ARCHIVE_PATH; import static org.apache.ignite.configuration.DataStorageConfiguration.DFLT_WAL_PATH; @@ -49,6 +52,7 @@ /** * */ +@RunWith(JUnit4.class) public class WalRolloverTypesTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteAbstractWalIteratorInvalidCrcTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteAbstractWalIteratorInvalidCrcTest.java index 1f3dc88104630..4a5e284e01dc3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteAbstractWalIteratorInvalidCrcTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteAbstractWalIteratorInvalidCrcTest.java @@ -51,6 +51,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.nio.ByteBuffer.allocate; import static java.nio.file.StandardOpenOption.WRITE; @@ -59,6 +62,7 @@ /** * */ +@RunWith(JUnit4.class) public abstract class IgniteAbstractWalIteratorInvalidCrcTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryVmIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteDataIntegrityTests.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteDataIntegrityTests.java index 72899f872f222..a9ac6a229440f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteDataIntegrityTests.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteDataIntegrityTests.java @@ -32,10 +32,14 @@ import org.apache.ignite.internal.processors.cache.persistence.wal.io.FileInput; import org.apache.ignite.internal.processors.cache.persistence.wal.io.SimpleFileInput; import org.apache.ignite.internal.processors.cache.persistence.wal.crc.IgniteDataIntegrityViolationException; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteDataIntegrityTests extends TestCase { /** File input. */ private SimpleFileInput fileInput; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgnitePureJavaCrcCompatibility.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgnitePureJavaCrcCompatibility.java index 2702ceed829f2..1f882c95f8282 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgnitePureJavaCrcCompatibility.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgnitePureJavaCrcCompatibility.java @@ -23,10 +23,14 @@ import java.nio.ByteBuffer; import java.util.concurrent.ThreadLocalRandom; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * PureJavaCrc32 previous crc algo realization vs java.util.zip.crc32 test. */ +@RunWith(JUnit4.class) public class IgnitePureJavaCrcCompatibility extends TestCase { /** * Test crc algo equality results. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteReplayWalIteratorInvalidCrcTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteReplayWalIteratorInvalidCrcTest.java index 7bcf73c275eef..0fbc7777134bf 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteReplayWalIteratorInvalidCrcTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteReplayWalIteratorInvalidCrcTest.java @@ -22,10 +22,14 @@ import org.apache.ignite.internal.pagemem.wal.IgniteWriteAheadLogManager; import org.apache.ignite.internal.pagemem.wal.WALIterator; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteReplayWalIteratorInvalidCrcTest extends IgniteAbstractWalIteratorInvalidCrcTest { /** {@inheritDoc} */ @NotNull @Override protected WALMode getWalMode() { @@ -49,7 +53,7 @@ public class IgniteReplayWalIteratorInvalidCrcTest extends IgniteAbstractWalIter * {@inheritDoc} * Case is not relevant to the replay iterator. */ - @Override @Test - public void testNotTailCorruptedPtr() { + @Test + @Override public void testNotTailCorruptedPtr() { } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/reader/IgniteWalReaderTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/reader/IgniteWalReaderTest.java index 545df062ad687..9dfd23288834d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/reader/IgniteWalReaderTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/reader/IgniteWalReaderTest.java @@ -84,6 +84,9 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.Arrays.fill; import static org.apache.ignite.events.EventType.EVT_WAL_SEGMENT_ARCHIVED; @@ -98,6 +101,7 @@ /** * Test suite for WAL segments reader and event generator. */ +@RunWith(JUnit4.class) public class IgniteWalReaderTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); From 9f663a9c857f76fcb0e56c194cc2d6ec10f6888b Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Mon, 3 Dec 2018 14:13:26 +0300 Subject: [PATCH 012/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview --- ...aselineAffinityTopologyActivationTest.java | 4 ++ .../IgniteDataStorageMetricsSelfTest.java | 4 ++ ...PdsBinaryMetadataOnClusterRestartTest.java | 4 ++ .../IgnitePdsBinarySortObjectFieldsTest.java | 4 ++ ...itePdsCacheAssignmentNodeRestartsTest.java | 4 ++ ...ConfigurationFileConsistencyCheckTest.java | 4 ++ ...eObjectBinaryProcessorOnDiscoveryTest.java | 4 ++ ...IgnitePdsCacheRebalancingAbstractTest.java | 4 ++ .../IgnitePdsCorruptedIndexTest.java | 4 ++ .../IgnitePdsCorruptedStoreTest.java | 4 ++ .../IgnitePdsDestroyCacheTest.java | 4 ++ ...PdsDestroyCacheWithoutCheckpointsTest.java | 4 ++ .../IgnitePdsDynamicCacheTest.java | 4 ++ ...IgnitePdsExchangeDuringCheckpointTest.java | 4 ++ ...rshallerMappingRestoreOnNodeStartTest.java | 4 ++ .../persistence/IgnitePdsPageSizesTest.java | 4 ++ .../IgnitePdsPartitionFilesDestroyTest.java | 4 ++ .../IgnitePdsPartitionsStateRecoveryTest.java | 4 ++ ...itePdsRecoveryAfterFileCorruptionTest.java | 4 ++ .../IgnitePdsRemoveDuringRebalancingTest.java | 4 ++ .../IgnitePdsTaskCancelingTest.java | 4 ++ .../IgnitePdsTxCacheRebalancingTest.java | 4 ++ .../IgnitePersistentStoreCacheGroupsTest.java | 4 ++ ...nitePersistentStoreDataStructuresTest.java | 4 ++ ...RebalanceScheduleResendPartitionsTest.java | 4 ++ ...ngeDuringRebalanceOnNonNodeAssignTest.java | 4 ++ ...alModeChangeDuringRebalancingSelfTest.java | 4 ++ .../MemoryPolicyInitializationTest.java | 4 ++ ...ersistenceDirectoryWarningLoggingTest.java | 4 ++ .../persistence/file/FileDownloaderTest.java | 4 ++ .../IgniteMetaStorageBasicTest.java | 4 ++ .../pagemem/FillFactorMetricTest.java | 4 ++ .../pagemem/PageIdDistributionTest.java | 4 ++ .../pagemem/PageMemoryImplNoLoadTest.java | 8 +++- .../pagemem/PageMemoryImplTest.java | 4 ++ .../pagemem/PageMemoryNoStoreLeakTest.java | 4 ++ .../PagesWriteThrottleSandboxTest.java | 4 ++ .../pagemem/PagesWriteThrottleSmokeTest.java | 4 ++ .../IgniteChangeGlobalStateCacheTest.java | 4 ++ ...niteChangeGlobalStateDataStreamerTest.java | 4 ++ ...iteChangeGlobalStateDataStructureTest.java | 4 ++ .../IgniteChangeGlobalStateFailOverTest.java | 4 ++ .../IgniteChangeGlobalStateServiceTest.java | 4 ++ .../IgniteChangeGlobalStateTest.java | 4 ++ ...IgniteNoParrallelClusterIsAllowedTest.java | 4 ++ .../IgniteStandByClusterTest.java | 4 ++ .../join/JoinActiveNodeToActiveCluster.java | 44 ++++++++++--------- .../join/JoinActiveNodeToInActiveCluster.java | 44 ++++++++++--------- .../join/JoinInActiveNodeToActiveCluster.java | 44 ++++++++++--------- .../JoinInActiveNodeToInActiveCluster.java | 44 ++++++++++--------- ...iveNodeToActiveClusterWithPersistence.java | 20 +++++---- .../IgniteStandByClientReconnectTest.java | 4 ++ ...tandByClientReconnectToNewClusterTest.java | 4 ++ .../tree/io/TrackingPageIOTest.java | 4 ++ .../wal/SegmentedRingByteBufferTest.java | 4 ++ .../wal/aware/SegmentAwareTest.java | 4 ++ .../StandaloneWalRecordsIteratorTest.java | 4 ++ 57 files changed, 318 insertions(+), 90 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgniteBaselineAffinityTopologyActivationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgniteBaselineAffinityTopologyActivationTest.java index 637ee08557d33..35e71fbe9c4d3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgniteBaselineAffinityTopologyActivationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgniteBaselineAffinityTopologyActivationTest.java @@ -54,12 +54,16 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** * */ +@RunWith(JUnit4.class) public class IgniteBaselineAffinityTopologyActivationTest extends GridCommonAbstractTest { /** */ private String consId; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgniteDataStorageMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgniteDataStorageMetricsSelfTest.java index b66d6739d822a..68151655a85a3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgniteDataStorageMetricsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgniteDataStorageMetricsSelfTest.java @@ -40,6 +40,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -48,6 +51,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteDataStorageMetricsSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsBinaryMetadataOnClusterRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsBinaryMetadataOnClusterRestartTest.java index d935465649200..98d675196273e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsBinaryMetadataOnClusterRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsBinaryMetadataOnClusterRestartTest.java @@ -42,10 +42,14 @@ import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgnitePdsBinaryMetadataOnClusterRestartTest extends GridCommonAbstractTest { /** */ private static final String CACHE_NAME = "cache1"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsBinarySortObjectFieldsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsBinarySortObjectFieldsTest.java index cde234bf5833b..a2e21e36e293a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsBinarySortObjectFieldsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsBinarySortObjectFieldsTest.java @@ -28,10 +28,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgnitePdsBinarySortObjectFieldsTest extends GridCommonAbstractTest { /** */ private static final String CACHE_NAME = "ignitePdsBinarySortObjectFieldsTestCache"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCacheAssignmentNodeRestartsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCacheAssignmentNodeRestartsTest.java index 008318e762ede..f095dc02483b7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCacheAssignmentNodeRestartsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCacheAssignmentNodeRestartsTest.java @@ -46,6 +46,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -55,6 +58,7 @@ /** * The test validates assignment after nodes restart with enabled persistence. */ +@RunWith(JUnit4.class) public class IgnitePdsCacheAssignmentNodeRestartsTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCacheConfigurationFileConsistencyCheckTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCacheConfigurationFileConsistencyCheckTest.java index 79558f35d4a75..c42273246e068 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCacheConfigurationFileConsistencyCheckTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCacheConfigurationFileConsistencyCheckTest.java @@ -44,6 +44,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager.CACHE_DATA_FILENAME; import static org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager.CACHE_DATA_TMP_FILENAME; @@ -51,6 +54,7 @@ /** * Tests that ignite can start when caches' configurations with same name in different groups stored. */ +@RunWith(JUnit4.class) public class IgnitePdsCacheConfigurationFileConsistencyCheckTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCacheObjectBinaryProcessorOnDiscoveryTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCacheObjectBinaryProcessorOnDiscoveryTest.java index 3c652278f2f72..dd0ba1a7dde8a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCacheObjectBinaryProcessorOnDiscoveryTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCacheObjectBinaryProcessorOnDiscoveryTest.java @@ -31,10 +31,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgnitePdsCacheObjectBinaryProcessorOnDiscoveryTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCacheRebalancingAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCacheRebalancingAbstractTest.java index 02f85b8c266b2..319e0fc61b8e2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCacheRebalancingAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCacheRebalancingAbstractTest.java @@ -60,12 +60,16 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.testframework.GridTestUtils.runMultiThreadedAsync; /** * Test for rebalancing and persistence integration. */ +@RunWith(JUnit4.class) public abstract class IgnitePdsCacheRebalancingAbstractTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCorruptedIndexTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCorruptedIndexTest.java index 78f9d80eb452c..6f3c9e58a6b37 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCorruptedIndexTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCorruptedIndexTest.java @@ -48,10 +48,14 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.multijvm.IgniteProcessProxy; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test to reproduce corrupted indexes problem after partition file eviction and truncation. */ +@RunWith(JUnit4.class) public class IgnitePdsCorruptedIndexTest extends GridCommonAbstractTest { /** Cache name. */ private static final String CACHE = "cache"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCorruptedStoreTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCorruptedStoreTest.java index 8df0865143b7a..916c1a8c2cf94 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCorruptedStoreTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCorruptedStoreTest.java @@ -53,6 +53,9 @@ import org.apache.ignite.lang.IgniteBiClosure; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_PDS_SKIP_CRC; import static org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager.DFLT_STORE_DIR; @@ -61,6 +64,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgnitePdsCorruptedStoreTest extends GridCommonAbstractTest { /** */ private static final String CACHE_NAME1 = "cache1"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsDestroyCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsDestroyCacheTest.java index 08f443efb592d..06e3a6a3b77c1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsDestroyCacheTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsDestroyCacheTest.java @@ -18,10 +18,14 @@ package org.apache.ignite.internal.processors.cache.persistence; import org.apache.ignite.Ignite; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test correct clean up cache configuration data after destroying cache. */ +@RunWith(JUnit4.class) public class IgnitePdsDestroyCacheTest extends IgnitePdsDestroyCacheAbstractTest { /** * Test destroy non grouped caches. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsDestroyCacheWithoutCheckpointsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsDestroyCacheWithoutCheckpointsTest.java index 92969a1330e2f..8042a767c2373 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsDestroyCacheWithoutCheckpointsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsDestroyCacheWithoutCheckpointsTest.java @@ -21,10 +21,14 @@ import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.util.typedef.G; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Check that cluster survives after destroy caches abruptly with disabled checkpoints. */ +@RunWith(JUnit4.class) public class IgnitePdsDestroyCacheWithoutCheckpointsTest extends IgnitePdsDestroyCacheAbstractTest { /** * {@inheritDoc} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsDynamicCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsDynamicCacheTest.java index efaf8c0946bd1..52adb02d1d22a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsDynamicCacheTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsDynamicCacheTest.java @@ -33,10 +33,14 @@ import org.apache.ignite.configuration.WALMode; import org.apache.ignite.internal.processors.database.IgniteDbDynamicCacheSelfTest; import org.apache.ignite.internal.util.typedef.internal.U; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgnitePdsDynamicCacheTest extends IgniteDbDynamicCacheSelfTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsExchangeDuringCheckpointTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsExchangeDuringCheckpointTest.java index 04d47f9bd6b09..e90354e83dbe4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsExchangeDuringCheckpointTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsExchangeDuringCheckpointTest.java @@ -28,10 +28,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgnitePdsExchangeDuringCheckpointTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsMarshallerMappingRestoreOnNodeStartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsMarshallerMappingRestoreOnNodeStartTest.java index aea1296ffab6d..c8c8aafcd304b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsMarshallerMappingRestoreOnNodeStartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsMarshallerMappingRestoreOnNodeStartTest.java @@ -27,10 +27,14 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgnitePdsMarshallerMappingRestoreOnNodeStartTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsPageSizesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsPageSizesTest.java index e2c3e79aea5bc..6c3a2756a87f6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsPageSizesTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsPageSizesTest.java @@ -32,12 +32,16 @@ import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_DEFAULT_DISK_PAGE_COMPRESSION; /** * */ +@RunWith(JUnit4.class) public class IgnitePdsPageSizesTest extends GridCommonAbstractTest { /** Cache name. */ private final String cacheName = "cache"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsPartitionFilesDestroyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsPartitionFilesDestroyTest.java index 173014ec4117a..1d1a03f8062a5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsPartitionFilesDestroyTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsPartitionFilesDestroyTest.java @@ -45,12 +45,16 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager.DFLT_STORE_DIR; /** * Test class to check that partition files after eviction are destroyed correctly on next checkpoint or crash recovery. */ +@RunWith(JUnit4.class) public class IgnitePdsPartitionFilesDestroyTest extends GridCommonAbstractTest { /** Cache name. */ private static final String CACHE = "cache"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsPartitionsStateRecoveryTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsPartitionsStateRecoveryTest.java index 7f95a778c1777..2eafdc1728fca 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsPartitionsStateRecoveryTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsPartitionsStateRecoveryTest.java @@ -31,10 +31,14 @@ import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionTopology; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgnitePdsPartitionsStateRecoveryTest extends GridCommonAbstractTest { /** Cache name. */ private static final String CACHE = "cache"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsRecoveryAfterFileCorruptionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsRecoveryAfterFileCorruptionTest.java index 29274fb040b90..b769edab019d9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsRecoveryAfterFileCorruptionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsRecoveryAfterFileCorruptionTest.java @@ -52,10 +52,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * This test generates WAL & Page Store with N pages, then rewrites pages with zeroes and tries to acquire all pages. */ +@RunWith(JUnit4.class) public class IgnitePdsRecoveryAfterFileCorruptionTest extends GridCommonAbstractTest { /** Ip finder. */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsRemoveDuringRebalancingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsRemoveDuringRebalancingTest.java index 6687641ffc377..e27b94f9a8aa6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsRemoveDuringRebalancingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsRemoveDuringRebalancingTest.java @@ -38,12 +38,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager.DFLT_STORE_DIR; /** * */ +@RunWith(JUnit4.class) public class IgnitePdsRemoveDuringRebalancingTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsTaskCancelingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsTaskCancelingTest.java index b908bc85abd03..be80f89a95d9d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsTaskCancelingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsTaskCancelingTest.java @@ -52,10 +52,14 @@ import org.apache.ignite.resources.IgniteInstanceResource; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test handle of task canceling with PDS enabled. */ +@RunWith(JUnit4.class) public class IgnitePdsTaskCancelingTest extends GridCommonAbstractTest { /** Slow file IO enabled. */ private static final AtomicBoolean slowFileIoEnabled = new AtomicBoolean(false); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsTxCacheRebalancingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsTxCacheRebalancingTest.java index a11e37cbbc554..ebaf168d43985 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsTxCacheRebalancingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsTxCacheRebalancingTest.java @@ -23,10 +23,14 @@ import org.apache.ignite.cache.CacheWriteSynchronizationMode; import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction; import org.apache.ignite.configuration.CacheConfiguration; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgnitePdsTxCacheRebalancingTest extends IgnitePdsCacheRebalancingAbstractTest { /** {@inheritDoc} */ @Override protected CacheConfiguration cacheConfiguration(String cacheName) { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePersistentStoreCacheGroupsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePersistentStoreCacheGroupsTest.java index ccbcf3846bdba..a755f0f5a1bd9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePersistentStoreCacheGroupsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePersistentStoreCacheGroupsTest.java @@ -48,6 +48,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -57,6 +60,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgnitePersistentStoreCacheGroupsTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePersistentStoreDataStructuresTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePersistentStoreDataStructuresTest.java index 8c7d1fe2f797b..a74c4692837cc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePersistentStoreDataStructuresTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePersistentStoreDataStructuresTest.java @@ -39,10 +39,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgnitePersistentStoreDataStructuresTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgniteRebalanceScheduleResendPartitionsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgniteRebalanceScheduleResendPartitionsTest.java index 7ef51bcb92d95..4966da4dc2a69 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgniteRebalanceScheduleResendPartitionsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgniteRebalanceScheduleResendPartitionsTest.java @@ -48,12 +48,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.testframework.GridTestUtils.runAsync; /** * */ +@RunWith(JUnit4.class) public class IgniteRebalanceScheduleResendPartitionsTest extends GridCommonAbstractTest { /** */ public static final TcpDiscoveryVmIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/LocalWacModeNoChangeDuringRebalanceOnNonNodeAssignTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/LocalWacModeNoChangeDuringRebalanceOnNonNodeAssignTest.java index 8308fa15c634a..5b288330313a3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/LocalWacModeNoChangeDuringRebalanceOnNonNodeAssignTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/LocalWacModeNoChangeDuringRebalanceOnNonNodeAssignTest.java @@ -37,6 +37,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.lang.String.valueOf; import static org.apache.ignite.IgniteSystemProperties.IGNITE_DISABLE_WAL_DURING_REBALANCING; @@ -47,6 +50,7 @@ /** * */ +@RunWith(JUnit4.class) public class LocalWacModeNoChangeDuringRebalanceOnNonNodeAssignTest extends GridCommonAbstractTest { /** */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/LocalWalModeChangeDuringRebalancingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/LocalWalModeChangeDuringRebalancingSelfTest.java index 57d4fadc3cd22..e8585cec9eb0d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/LocalWalModeChangeDuringRebalancingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/LocalWalModeChangeDuringRebalancingSelfTest.java @@ -53,12 +53,16 @@ import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.testframework.GridTestUtils.waitForCondition; /** * */ +@RunWith(JUnit4.class) public class LocalWalModeChangeDuringRebalancingSelfTest extends GridCommonAbstractTest { /** */ private static boolean disableWalDuringRebalancing = true; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/MemoryPolicyInitializationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/MemoryPolicyInitializationTest.java index 093fcdb7ee07c..82def5c4f072e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/MemoryPolicyInitializationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/MemoryPolicyInitializationTest.java @@ -27,12 +27,16 @@ import org.apache.ignite.internal.processors.cache.IgniteCacheProxy; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.configuration.MemoryConfiguration.DFLT_MEM_PLC_DEFAULT_NAME; /** * */ +@RunWith(JUnit4.class) public class MemoryPolicyInitializationTest extends GridCommonAbstractTest { /** */ private static final String CUSTOM_NON_DEFAULT_MEM_PLC_NAME = "custom_mem_plc"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/PersistenceDirectoryWarningLoggingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/PersistenceDirectoryWarningLoggingTest.java index 8467030f43ef3..2de83c2380c12 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/PersistenceDirectoryWarningLoggingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/PersistenceDirectoryWarningLoggingTest.java @@ -21,10 +21,14 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.testframework.GridStringLogger; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests that warning is logged when persistence store directory equals {@code System.getProperty("java.io.tmpdir")}. */ +@RunWith(JUnit4.class) public class PersistenceDirectoryWarningLoggingTest extends GridCommonAbstractTest { /** Warning message to test. */ private static final String WARN_MSG_PREFIX = "Persistence store directory is in the temp " + diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/file/FileDownloaderTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/file/FileDownloaderTest.java index d2fb572e0ac7a..b5c11bef768a3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/file/FileDownloaderTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/file/FileDownloaderTest.java @@ -28,6 +28,9 @@ import org.apache.ignite.internal.util.future.GridFutureAdapter; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.testframework.GridTestUtils.runAsync; import static org.junit.Assert.*; @@ -35,6 +38,7 @@ /** * FileDownloader test */ +@RunWith(JUnit4.class) public class FileDownloaderTest extends GridCommonAbstractTest { /** */ private static final Path DOWNLOADER_PATH = new File("download").toPath(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/metastorage/IgniteMetaStorageBasicTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/metastorage/IgniteMetaStorageBasicTest.java index 652a917d374c8..a27354b8fdbb0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/metastorage/IgniteMetaStorageBasicTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/metastorage/IgniteMetaStorageBasicTest.java @@ -33,10 +33,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Single place to add for basic MetaStorage tests. */ +@RunWith(JUnit4.class) public class IgniteMetaStorageBasicTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/FillFactorMetricTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/FillFactorMetricTest.java index b6c5a7620bdbd..368dccd659bf9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/FillFactorMetricTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/FillFactorMetricTest.java @@ -33,10 +33,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for fillFactor metrics. */ +@RunWith(JUnit4.class) public class FillFactorMetricTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryVmIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageIdDistributionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageIdDistributionTest.java index db4d762502d89..5ad2f5b463835 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageIdDistributionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageIdDistributionTest.java @@ -34,10 +34,14 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.logger.java.JavaLogger; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class PageIdDistributionTest extends GridCommonAbstractTest { /** */ private static final int[] CACHE_IDS = new int[] { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImplNoLoadTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImplNoLoadTest.java index 6b64d188fb770..1190899496f6b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImplNoLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImplNoLoadTest.java @@ -38,11 +38,15 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.spi.encryption.noop.NoopEncryptionSpi; import org.apache.ignite.testframework.junits.GridTestKernalContext; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.mockito.Mockito; /** * */ +@RunWith(JUnit4.class) public class PageMemoryImplNoLoadTest extends PageMemoryNoLoadSelfTest { /** * @return Page memory implementation. @@ -112,8 +116,8 @@ public class PageMemoryImplNoLoadTest extends PageMemoryNoLoadSelfTest { } /** {@inheritDoc} */ - @Override @Test - public void testPageHandleDeallocation() throws Exception { + @Test + @Override public void testPageHandleDeallocation() throws Exception { // No-op. } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImplTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImplTest.java index b4791bab8b7c3..7591dd74b2111 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImplTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImplTest.java @@ -53,6 +53,9 @@ import org.apache.ignite.testframework.junits.GridTestKernalContext; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.logger.GridTestLog4jLogger; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.mockito.Mockito; import static org.apache.ignite.internal.processors.cache.persistence.pagemem.PageMemoryImpl.CHECKPOINT_POOL_OVERFLOW_ERROR_MSG; @@ -60,6 +63,7 @@ /** * */ +@RunWith(JUnit4.class) public class PageMemoryImplTest extends GridCommonAbstractTest { /** Mb. */ private static final long MB = 1024 * 1024; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryNoStoreLeakTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryNoStoreLeakTest.java index ec911dc1fc251..fdd47c1656f5f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryNoStoreLeakTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryNoStoreLeakTest.java @@ -25,6 +25,9 @@ import org.apache.ignite.internal.processors.cache.persistence.DataRegionMetricsImpl; import org.apache.ignite.internal.util.typedef.internal.D; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Base scenario for memory leak: @@ -33,6 +36,7 @@ * 3. IgniteCacheDatabaseSharedManager started and onActive called here. Memory allocated; * 4. Call active(true) again. Activation successfull, non heap memory leak introduced; */ +@RunWith(JUnit4.class) public class PageMemoryNoStoreLeakTest extends GridCommonAbstractTest { /** */ private static final int PAGE_SIZE = 4 * 1024; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PagesWriteThrottleSandboxTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PagesWriteThrottleSandboxTest.java index 07909f5194e27..9a1bac7c4bda1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PagesWriteThrottleSandboxTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PagesWriteThrottleSandboxTest.java @@ -43,12 +43,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test to visualize and debug {@link PagesWriteThrottle}. * Prints puts/gets rate, number of dirty pages, pages written in current checkpoint and pages in checkpoint buffer. * Not intended to be part of any test suite. */ +@RunWith(JUnit4.class) public class PagesWriteThrottleSandboxTest extends GridCommonAbstractTest { /** Ip finder. */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PagesWriteThrottleSmokeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PagesWriteThrottleSmokeTest.java index 1970f3a62d29e..843911b5da2e7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PagesWriteThrottleSmokeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PagesWriteThrottleSmokeTest.java @@ -49,10 +49,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class PagesWriteThrottleSmokeTest extends GridCommonAbstractTest { /** Ip finder. */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateCacheTest.java index c0656c0a64765..13517ef49e21d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateCacheTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateCacheTest.java @@ -23,10 +23,14 @@ import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.processors.cache.GridCacheProcessor; import org.apache.ignite.internal.util.typedef.F; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteChangeGlobalStateCacheTest extends IgniteChangeGlobalStateAbstractTest { /** * diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateDataStreamerTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateDataStreamerTest.java index a43e0d34ca94b..dd0bb0982c7e9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateDataStreamerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateDataStreamerTest.java @@ -20,10 +20,14 @@ import org.apache.ignite.Ignite; import org.apache.ignite.IgniteCache; import org.apache.ignite.IgniteDataStreamer; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteChangeGlobalStateDataStreamerTest extends IgniteChangeGlobalStateAbstractTest { /** {@inheritDoc} */ @Override protected int backUpNodes() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateDataStructureTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateDataStructureTest.java index f3ff41c4b304a..ef0f18fc922be 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateDataStructureTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateDataStructureTest.java @@ -27,12 +27,16 @@ import org.apache.ignite.internal.processors.cache.GridCacheProcessor; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.internal.U; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.testframework.GridTestUtils.runAsync; /** * */ +@RunWith(JUnit4.class) public class IgniteChangeGlobalStateDataStructureTest extends IgniteChangeGlobalStateAbstractTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateFailOverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateFailOverTest.java index 9ebc3a0e8dd4b..9a7acf8f31cc0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateFailOverTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateFailOverTest.java @@ -26,6 +26,9 @@ import org.apache.ignite.IgniteCache; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.internal.IgniteInternalFuture; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.lang.Thread.sleep; import static org.apache.ignite.testframework.GridTestUtils.runAsync; @@ -33,6 +36,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteChangeGlobalStateFailOverTest extends IgniteChangeGlobalStateAbstractTest { /** {@inheritDoc} */ @Override protected int primaryNodes() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateServiceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateServiceTest.java index 3e5c66f022ca4..e2b1476dc95d0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateServiceTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateServiceTest.java @@ -25,10 +25,14 @@ import org.apache.ignite.services.ServiceConfiguration; import org.apache.ignite.services.ServiceContext; import org.apache.ignite.services.ServiceDescriptor; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteChangeGlobalStateServiceTest extends IgniteChangeGlobalStateAbstractTest { /** {@inheritDoc} */ @Override protected int backUpClientNodes() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateTest.java index fea4b5b5f9804..ca5a6890b882c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateTest.java @@ -31,6 +31,9 @@ import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.internal.processors.cache.GridCacheProcessor; import org.apache.ignite.internal.util.typedef.F; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.testframework.GridTestUtils.assertThrows; import static org.apache.ignite.testframework.GridTestUtils.runAsync; @@ -38,6 +41,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteChangeGlobalStateTest extends IgniteChangeGlobalStateAbstractTest { /** * @throws Exception if fail. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteNoParrallelClusterIsAllowedTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteNoParrallelClusterIsAllowedTest.java index 286b009868e0a..53b33513a9999 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteNoParrallelClusterIsAllowedTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteNoParrallelClusterIsAllowedTest.java @@ -21,10 +21,14 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteNoParrallelClusterIsAllowedTest extends IgniteChangeGlobalStateAbstractTest { /** */ private static final TcpDiscoveryIpFinder vmIpFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteStandByClusterTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteStandByClusterTest.java index 625cff049b493..85d107864eef2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteStandByClusterTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteStandByClusterTest.java @@ -52,10 +52,14 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteStandByClusterTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder vmIpFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/JoinActiveNodeToActiveCluster.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/JoinActiveNodeToActiveCluster.java index 781de1dfc4bbd..628316cfc128d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/JoinActiveNodeToActiveCluster.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/JoinActiveNodeToActiveCluster.java @@ -24,10 +24,14 @@ import org.apache.ignite.internal.processors.cache.GridCacheAdapter; import org.apache.ignite.internal.util.typedef.internal.CU; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class JoinActiveNodeToActiveCluster extends AbstractNodeJoinTemplate { /** {@inheritDoc} */ @Override public JoinNodeTestPlanBuilder withOutConfigurationTemplate() throws Exception { @@ -193,68 +197,68 @@ public class JoinActiveNodeToActiveCluster extends AbstractNodeJoinTemplate { // Server node join. /** {@inheritDoc} */ - @Override @Test - public void testJoinWithOutConfiguration() throws Exception { + @Test + @Override public void testJoinWithOutConfiguration() throws Exception { withOutConfigurationTemplate().execute(); } /** {@inheritDoc} */ - @Override @Test - public void testStaticCacheConfigurationOnJoin() throws Exception { + @Test + @Override public void testStaticCacheConfigurationOnJoin() throws Exception { staticCacheConfigurationOnJoinTemplate().execute(); } /** {@inheritDoc} */ - @Override @Test - public void testStaticCacheConfigurationInCluster() throws Exception { + @Test + @Override public void testStaticCacheConfigurationInCluster() throws Exception { staticCacheConfigurationInClusterTemplate().execute(); } /** {@inheritDoc} */ - @Override @Test - public void testStaticCacheConfigurationSameOnBoth() throws Exception { + @Test + @Override public void testStaticCacheConfigurationSameOnBoth() throws Exception { staticCacheConfigurationSameOnBothTemplate().execute(); } /** {@inheritDoc} */ - @Override @Test - public void testStaticCacheConfigurationDifferentOnBoth() throws Exception { + @Test + @Override public void testStaticCacheConfigurationDifferentOnBoth() throws Exception { staticCacheConfigurationDifferentOnBothTemplate().execute(); } // Client node join. /** {@inheritDoc} */ - @Override @Test - public void testJoinClientWithOutConfiguration() throws Exception { + @Test + @Override public void testJoinClientWithOutConfiguration() throws Exception { joinClientWithOutConfigurationTemplate().execute(); } /** {@inheritDoc} */ - @Override @Test - public void testJoinClientStaticCacheConfigurationOnJoin() throws Exception { + @Test + @Override public void testJoinClientStaticCacheConfigurationOnJoin() throws Exception { joinClientStaticCacheConfigurationOnJoinTemplate().execute(); } /** {@inheritDoc} */ - @Override @Test - public void testJoinClientStaticCacheConfigurationInCluster() throws Exception { + @Test + @Override public void testJoinClientStaticCacheConfigurationInCluster() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-5518"); joinClientStaticCacheConfigurationInClusterTemplate().execute(); } /** {@inheritDoc} */ - @Override @Test - public void testJoinClientStaticCacheConfigurationSameOnBoth() throws Exception { + @Test + @Override public void testJoinClientStaticCacheConfigurationSameOnBoth() throws Exception { joinClientStaticCacheConfigurationSameOnBothTemplate().execute(); } /** * */ - @Override @Test - public void testJoinClientStaticCacheConfigurationDifferentOnBoth() throws Exception { + @Test + @Override public void testJoinClientStaticCacheConfigurationDifferentOnBoth() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-5518"); joinClientStaticCacheConfigurationDifferentOnBothTemplate().execute(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/JoinActiveNodeToInActiveCluster.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/JoinActiveNodeToInActiveCluster.java index 828e072039730..db762a86fc43e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/JoinActiveNodeToInActiveCluster.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/JoinActiveNodeToInActiveCluster.java @@ -18,10 +18,14 @@ package org.apache.ignite.internal.processors.cache.persistence.standbycluster.join; import org.apache.ignite.internal.processors.cache.persistence.standbycluster.AbstractNodeJoinTemplate; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class JoinActiveNodeToInActiveCluster extends AbstractNodeJoinTemplate { /** {@inheritDoc} */ @Override public JoinNodeTestPlanBuilder withOutConfigurationTemplate() throws Exception { @@ -153,66 +157,66 @@ public class JoinActiveNodeToInActiveCluster extends AbstractNodeJoinTemplate { // Server node join. /** {@inheritDoc} */ - @Override @Test - public void testJoinWithOutConfiguration() throws Exception { + @Test + @Override public void testJoinWithOutConfiguration() throws Exception { withOutConfigurationTemplate().execute(); } /** {@inheritDoc} */ - @Override @Test - public void testStaticCacheConfigurationOnJoin() throws Exception { + @Test + @Override public void testStaticCacheConfigurationOnJoin() throws Exception { staticCacheConfigurationOnJoinTemplate().execute(); } /** {@inheritDoc} */ - @Override @Test - public void testStaticCacheConfigurationInCluster() throws Exception { + @Test + @Override public void testStaticCacheConfigurationInCluster() throws Exception { staticCacheConfigurationInClusterTemplate().execute(); } /** {@inheritDoc} */ - @Override @Test - public void testStaticCacheConfigurationSameOnBoth() throws Exception { + @Test + @Override public void testStaticCacheConfigurationSameOnBoth() throws Exception { staticCacheConfigurationSameOnBothTemplate().execute(); } /** {@inheritDoc} */ - @Override @Test - public void testStaticCacheConfigurationDifferentOnBoth() throws Exception { + @Test + @Override public void testStaticCacheConfigurationDifferentOnBoth() throws Exception { staticCacheConfigurationDifferentOnBothTemplate().execute(); } // Client node join. /** {@inheritDoc} */ - @Override @Test - public void testJoinClientWithOutConfiguration() throws Exception { + @Test + @Override public void testJoinClientWithOutConfiguration() throws Exception { joinClientWithOutConfigurationTemplate().execute(); } /** {@inheritDoc} */ - @Override @Test - public void testJoinClientStaticCacheConfigurationOnJoin() throws Exception { + @Test + @Override public void testJoinClientStaticCacheConfigurationOnJoin() throws Exception { joinClientStaticCacheConfigurationOnJoinTemplate().execute(); } /** {@inheritDoc} */ - @Override @Test - public void testJoinClientStaticCacheConfigurationInCluster() throws Exception { + @Test + @Override public void testJoinClientStaticCacheConfigurationInCluster() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-5518"); joinClientStaticCacheConfigurationInClusterTemplate().execute(); } /** {@inheritDoc} */ - @Override @Test - public void testJoinClientStaticCacheConfigurationSameOnBoth() throws Exception { + @Test + @Override public void testJoinClientStaticCacheConfigurationSameOnBoth() throws Exception { joinClientStaticCacheConfigurationSameOnBothTemplate().execute(); } /** {@inheritDoc} */ - @Override @Test - public void testJoinClientStaticCacheConfigurationDifferentOnBoth() throws Exception { + @Test + @Override public void testJoinClientStaticCacheConfigurationDifferentOnBoth() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-5518"); joinClientStaticCacheConfigurationDifferentOnBothTemplate().execute(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/JoinInActiveNodeToActiveCluster.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/JoinInActiveNodeToActiveCluster.java index fa741aba81017..2ed470fbd38c3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/JoinInActiveNodeToActiveCluster.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/JoinInActiveNodeToActiveCluster.java @@ -24,10 +24,14 @@ import org.apache.ignite.internal.processors.cache.GridCacheAdapter; import org.apache.ignite.internal.util.typedef.internal.CU; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class JoinInActiveNodeToActiveCluster extends AbstractNodeJoinTemplate { /** {@inheritDoc} */ @Override public JoinNodeTestPlanBuilder withOutConfigurationTemplate() throws Exception { @@ -192,64 +196,64 @@ public class JoinInActiveNodeToActiveCluster extends AbstractNodeJoinTemplate { // Server node join. /** {@inheritDoc} */ - @Override @Test - public void testJoinWithOutConfiguration() throws Exception { + @Test + @Override public void testJoinWithOutConfiguration() throws Exception { withOutConfigurationTemplate().execute(); } /** {@inheritDoc} */ - @Override @Test - public void testStaticCacheConfigurationOnJoin() throws Exception { + @Test + @Override public void testStaticCacheConfigurationOnJoin() throws Exception { staticCacheConfigurationOnJoinTemplate().execute(); } /** {@inheritDoc} */ - @Override @Test - public void testStaticCacheConfigurationInCluster() throws Exception { + @Test + @Override public void testStaticCacheConfigurationInCluster() throws Exception { staticCacheConfigurationInClusterTemplate().execute(); } /** {@inheritDoc} */ - @Override @Test - public void testStaticCacheConfigurationSameOnBoth() throws Exception { + @Test + @Override public void testStaticCacheConfigurationSameOnBoth() throws Exception { staticCacheConfigurationSameOnBothTemplate().execute(); } /** {@inheritDoc} */ - @Override @Test - public void testStaticCacheConfigurationDifferentOnBoth() throws Exception { + @Test + @Override public void testStaticCacheConfigurationDifferentOnBoth() throws Exception { staticCacheConfigurationDifferentOnBothTemplate().execute(); } // Client node join. /** {@inheritDoc} */ - @Override @Test - public void testJoinClientWithOutConfiguration() throws Exception { + @Test + @Override public void testJoinClientWithOutConfiguration() throws Exception { joinClientWithOutConfigurationTemplate().execute(); } /** {@inheritDoc} */ - @Override @Test - public void testJoinClientStaticCacheConfigurationOnJoin() throws Exception { + @Test + @Override public void testJoinClientStaticCacheConfigurationOnJoin() throws Exception { joinClientStaticCacheConfigurationOnJoinTemplate().execute(); } /** {@inheritDoc} */ - @Override @Test - public void testJoinClientStaticCacheConfigurationInCluster() throws Exception { + @Test + @Override public void testJoinClientStaticCacheConfigurationInCluster() throws Exception { joinClientStaticCacheConfigurationInClusterTemplate().execute(); } /** {@inheritDoc} */ - @Override @Test - public void testJoinClientStaticCacheConfigurationSameOnBoth() throws Exception { + @Test + @Override public void testJoinClientStaticCacheConfigurationSameOnBoth() throws Exception { joinClientStaticCacheConfigurationSameOnBothTemplate().execute(); } /** {@inheritDoc} */ - @Override @Test - public void testJoinClientStaticCacheConfigurationDifferentOnBoth() throws Exception { + @Test + @Override public void testJoinClientStaticCacheConfigurationDifferentOnBoth() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-5518"); joinClientStaticCacheConfigurationDifferentOnBothTemplate().execute(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/JoinInActiveNodeToInActiveCluster.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/JoinInActiveNodeToInActiveCluster.java index a6e79bef7fc46..d77564d61a614 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/JoinInActiveNodeToInActiveCluster.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/JoinInActiveNodeToInActiveCluster.java @@ -18,10 +18,14 @@ package org.apache.ignite.internal.processors.cache.persistence.standbycluster.join; import org.apache.ignite.internal.processors.cache.persistence.standbycluster.AbstractNodeJoinTemplate; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class JoinInActiveNodeToInActiveCluster extends AbstractNodeJoinTemplate { /** {@inheritDoc} */ @Override public JoinNodeTestPlanBuilder withOutConfigurationTemplate() throws Exception { @@ -153,66 +157,66 @@ public class JoinInActiveNodeToInActiveCluster extends AbstractNodeJoinTemplate // Server node join. /** {@inheritDoc} */ - @Override @Test - public void testJoinWithOutConfiguration() throws Exception { + @Test + @Override public void testJoinWithOutConfiguration() throws Exception { withOutConfigurationTemplate().execute(); } /** {@inheritDoc} */ - @Override @Test - public void testStaticCacheConfigurationOnJoin() throws Exception { + @Test + @Override public void testStaticCacheConfigurationOnJoin() throws Exception { staticCacheConfigurationOnJoinTemplate().execute(); } /** {@inheritDoc} */ - @Override @Test - public void testStaticCacheConfigurationInCluster() throws Exception { + @Test + @Override public void testStaticCacheConfigurationInCluster() throws Exception { staticCacheConfigurationInClusterTemplate().execute(); } /** {@inheritDoc} */ - @Override @Test - public void testStaticCacheConfigurationSameOnBoth() throws Exception { + @Test + @Override public void testStaticCacheConfigurationSameOnBoth() throws Exception { staticCacheConfigurationSameOnBothTemplate().execute(); } /** {@inheritDoc} */ - @Override @Test - public void testStaticCacheConfigurationDifferentOnBoth() throws Exception { + @Test + @Override public void testStaticCacheConfigurationDifferentOnBoth() throws Exception { staticCacheConfigurationDifferentOnBothTemplate().execute(); } // Client node join. /** {@inheritDoc} */ - @Override @Test - public void testJoinClientWithOutConfiguration() throws Exception { + @Test + @Override public void testJoinClientWithOutConfiguration() throws Exception { joinClientWithOutConfigurationTemplate().execute(); } /** {@inheritDoc} */ - @Override @Test - public void testJoinClientStaticCacheConfigurationOnJoin() throws Exception { + @Test + @Override public void testJoinClientStaticCacheConfigurationOnJoin() throws Exception { joinClientStaticCacheConfigurationOnJoinTemplate().execute(); } /** {@inheritDoc} */ - @Override @Test - public void testJoinClientStaticCacheConfigurationInCluster() throws Exception { + @Test + @Override public void testJoinClientStaticCacheConfigurationInCluster() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-5518"); joinClientStaticCacheConfigurationInClusterTemplate().execute(); } /** {@inheritDoc} */ - @Override @Test - public void testJoinClientStaticCacheConfigurationSameOnBoth() throws Exception { + @Test + @Override public void testJoinClientStaticCacheConfigurationSameOnBoth() throws Exception { joinClientStaticCacheConfigurationSameOnBothTemplate().execute(); } /** {@inheritDoc} */ - @Override @Test - public void testJoinClientStaticCacheConfigurationDifferentOnBoth() throws Exception { + @Test + @Override public void testJoinClientStaticCacheConfigurationDifferentOnBoth() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-5518"); joinClientStaticCacheConfigurationDifferentOnBothTemplate().execute(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/persistence/JoinActiveNodeToActiveClusterWithPersistence.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/persistence/JoinActiveNodeToActiveClusterWithPersistence.java index b41e6e6094e53..cd655809ab2f5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/persistence/JoinActiveNodeToActiveClusterWithPersistence.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/persistence/JoinActiveNodeToActiveClusterWithPersistence.java @@ -20,10 +20,14 @@ import org.apache.ignite.internal.processors.cache.persistence.standbycluster.join.JoinActiveNodeToActiveCluster; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.processors.cache.persistence.standbycluster.AbstractNodeJoinTemplate; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class JoinActiveNodeToActiveClusterWithPersistence extends JoinActiveNodeToActiveCluster { /** {@inheritDoc} */ @Override protected IgniteConfiguration cfg(String name) throws Exception { @@ -67,26 +71,26 @@ private AbstractNodeJoinTemplate.JoinNodeTestPlanBuilder persistent(AbstractNode } /** {@inheritDoc} */ - @Override @Test - public void testJoinWithOutConfiguration() throws Exception { + @Test + @Override public void testJoinWithOutConfiguration() throws Exception { withOutConfigurationTemplate().execute(); } /** {@inheritDoc} */ - @Override @Test - public void testJoinClientWithOutConfiguration() throws Exception { + @Test + @Override public void testJoinClientWithOutConfiguration() throws Exception { joinClientWithOutConfigurationTemplate().execute(); } /** {@inheritDoc} */ - @Override @Test - public void testJoinClientStaticCacheConfigurationDifferentOnBoth() throws Exception { + @Test + @Override public void testJoinClientStaticCacheConfigurationDifferentOnBoth() throws Exception { staticCacheConfigurationDifferentOnBothTemplate().execute(); } /** {@inheritDoc} */ - @Override @Test - public void testJoinClientStaticCacheConfigurationInCluster() throws Exception { + @Test + @Override public void testJoinClientStaticCacheConfigurationInCluster() throws Exception { staticCacheConfigurationInClusterTemplate().execute(); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/reconnect/IgniteStandByClientReconnectTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/reconnect/IgniteStandByClientReconnectTest.java index 720f6074a8392..28bcbb16b68b1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/reconnect/IgniteStandByClientReconnectTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/reconnect/IgniteStandByClientReconnectTest.java @@ -19,10 +19,14 @@ import java.util.concurrent.CountDownLatch; import org.apache.ignite.internal.IgniteEx; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteStandByClientReconnectTest extends IgniteAbstractStandByClientReconnectTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/reconnect/IgniteStandByClientReconnectToNewClusterTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/reconnect/IgniteStandByClientReconnectToNewClusterTest.java index 710756197911b..a9abff134fbe5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/reconnect/IgniteStandByClientReconnectToNewClusterTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/reconnect/IgniteStandByClientReconnectToNewClusterTest.java @@ -22,10 +22,14 @@ import java.util.Set; import java.util.concurrent.CountDownLatch; import org.apache.ignite.internal.IgniteEx; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteStandByClientReconnectToNewClusterTest extends IgniteAbstractStandByClientReconnectTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/tree/io/TrackingPageIOTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/tree/io/TrackingPageIOTest.java index 82e1866b88741..c4fb28d80543d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/tree/io/TrackingPageIOTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/tree/io/TrackingPageIOTest.java @@ -31,10 +31,14 @@ import org.apache.ignite.internal.processors.cache.persistence.snapshot.TrackingPageIsCorruptedException; import org.apache.ignite.internal.util.GridUnsafe; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class TrackingPageIOTest extends TestCase { /** Page size. */ public static final int PAGE_SIZE = 4096; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/SegmentedRingByteBufferTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/SegmentedRingByteBufferTest.java index 883d19cd65750..032a357e6ea70 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/SegmentedRingByteBufferTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/SegmentedRingByteBufferTest.java @@ -39,6 +39,9 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.processors.cache.persistence.wal.SegmentedRingByteBuffer.BufferMode.DIRECT; import static org.apache.ignite.internal.processors.cache.persistence.wal.SegmentedRingByteBuffer.BufferMode.ONHEAP; @@ -46,6 +49,7 @@ /** * */ +@RunWith(JUnit4.class) public class SegmentedRingByteBufferTest extends GridCommonAbstractTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentAwareTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentAwareTest.java index dbae64e891e21..381cf40e33903 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentAwareTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentAwareTest.java @@ -23,6 +23,9 @@ import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.internal.IgniteInterruptedCheckedException; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; @@ -30,6 +33,7 @@ /** * Test for {@link SegmentAware}. */ +@RunWith(JUnit4.class) public class SegmentAwareTest extends TestCase { /** diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/reader/StandaloneWalRecordsIteratorTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/reader/StandaloneWalRecordsIteratorTest.java index ce8a112c3e9dc..1f06b7d564254 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/reader/StandaloneWalRecordsIteratorTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/reader/StandaloneWalRecordsIteratorTest.java @@ -49,12 +49,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.processors.cache.persistence.wal.reader.IgniteWalIteratorFactory.IteratorParametersBuilder; /** * The test check, that StandaloneWalRecordsIterator correctly close file descriptors associated with WAL files. */ +@RunWith(JUnit4.class) public class StandaloneWalRecordsIteratorTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); From e2eae3201a88c3d9800b9964ce9ca4096ed3d85f Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Mon, 3 Dec 2018 14:31:35 +0300 Subject: [PATCH 013/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview --- .../cache/query/CacheScanQueryFailoverTest.java | 4 ++++ .../query/GridCacheQueryTransformerSelfTest.java | 4 ++++ .../cache/query/GridCircularQueueTest.java | 4 ++++ .../IgniteCacheQueryCacheDestroySelfTest.java | 4 ++++ .../cache/query/IndexingSpiQuerySelfTest.java | 4 ++++ .../cache/query/IndexingSpiQueryTxSelfTest.java | 4 ++++ .../ScanQueryOffheapExpiryPolicySelfTest.java | 4 ++++ .../continuous/CacheContinuousBatchAckTest.java | 4 ++++ ...ntinuousQueryAsyncFailoverMvccTxSelfTest.java | 16 ++++++++++------ ...heContinuousQueryAsyncFilterListenerTest.java | 4 ++++ ...inuousQueryConcurrentPartitionUpdateTest.java | 4 ++++ .../CacheContinuousQueryCounterAbstractTest.java | 4 ++++ .../CacheContinuousQueryEventBufferTest.java | 4 ++++ ...CacheContinuousQueryExecuteInPrimaryTest.java | 4 ++++ ...ousQueryFactoryFilterRandomOperationTest.java | 4 ++++ ...eContinuousQueryFailoverAbstractSelfTest.java | 4 ++++ ...cheContinuousQueryFailoverMvccTxSelfTest.java | 16 ++++++++++------ .../CacheContinuousQueryLostPartitionTest.java | 4 ++++ ...ContinuousQueryOperationFromCallbackTest.java | 4 ++++ .../CacheContinuousQueryOperationP2PTest.java | 4 ++++ .../CacheContinuousQueryOrderingEventTest.java | 4 ++++ ...CacheContinuousQueryRandomOperationsTest.java | 4 ++++ .../CacheContinuousQueryVariationsTest.java | 4 ++++ ...tinuousWithTransformerReplicatedSelfTest.java | 4 ++++ ...heEntryProcessorExternalizableFailedTest.java | 4 ++++ .../CacheEntryProcessorNonSerializableTest.java | 4 ++++ .../CacheKeepBinaryIterationNearEnabledTest.java | 14 +++++++++----- ...CacheKeepBinaryIterationStoreEnabledTest.java | 12 ++++++++---- .../continuous/CacheKeepBinaryIterationTest.java | 4 ++++ .../ClientReconnectContinuousQueryTest.java | 4 ++++ .../GridCacheContinuousQueryAtomicSelfTest.java | 8 ++++++-- .../GridCacheContinuousQueryConcurrentTest.java | 4 ++++ ...heContinuousQueryMultiNodesFilteringTest.java | 4 ++++ ...idCacheContinuousQueryNodesFilteringTest.java | 4 ++++ ...heContinuousQueryPartitionedOnlySelfTest.java | 8 ++++++-- ...idCacheContinuousQueryReplicatedSelfTest.java | 4 ++++ ...heContinuousQueryReplicatedTxOneNodeTest.java | 4 ++++ .../GridCacheContinuousQueryTxSelfTest.java | 8 ++++++-- ...gniteCacheContinuousQueryBackupQueueTest.java | 4 ++++ ...eCacheContinuousQueryClientReconnectTest.java | 4 ++++ .../IgniteCacheContinuousQueryClientTest.java | 4 ++++ ...teCacheContinuousQueryImmutableEntryTest.java | 4 ++++ ...iteCacheContinuousQueryNoUnsubscribeTest.java | 4 ++++ .../IgniteCacheContinuousQueryReconnectTest.java | 4 ++++ 44 files changed, 203 insertions(+), 27 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/CacheScanQueryFailoverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/CacheScanQueryFailoverTest.java index 61708c11a5d7e..f5f13e4c161fe 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/CacheScanQueryFailoverTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/CacheScanQueryFailoverTest.java @@ -32,6 +32,9 @@ import org.apache.ignite.lang.IgniteClosure; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.LOCAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -39,6 +42,7 @@ /** * ScanQuery failover test. Tests scenario where user supplied closures throw unhandled errors. */ +@RunWith(JUnit4.class) public class CacheScanQueryFailoverTest extends GridCommonAbstractTest { /** */ private static final String LOCAL_CACHE_NAME = "local"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryTransformerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryTransformerSelfTest.java index 938084d7b4cef..2626b330bc2dc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryTransformerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryTransformerSelfTest.java @@ -45,10 +45,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for scan query with transformer. */ +@RunWith(JUnit4.class) public class GridCacheQueryTransformerSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCircularQueueTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCircularQueueTest.java index 17188ef5cd1dc..e7449be7d17b7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCircularQueueTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCircularQueueTest.java @@ -20,9 +20,13 @@ import java.util.ArrayDeque; import org.apache.ignite.internal.util.GridRandom; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** */ +@RunWith(JUnit4.class) public class GridCircularQueueTest extends GridCommonAbstractTest { /** * diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/IgniteCacheQueryCacheDestroySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/IgniteCacheQueryCacheDestroySelfTest.java index 0e790e71744a0..d97ad29f80fc0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/IgniteCacheQueryCacheDestroySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/IgniteCacheQueryCacheDestroySelfTest.java @@ -37,10 +37,14 @@ import org.apache.ignite.lang.IgniteBiPredicate; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * The test for the destruction of the cache during the execution of the query */ +@RunWith(JUnit4.class) public class IgniteCacheQueryCacheDestroySelfTest extends GridCommonAbstractTest { /** */ private static final String CACHE_NAME = "cache"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/IndexingSpiQuerySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/IndexingSpiQuerySelfTest.java index 5f8491f11cfef..31e2253a76ba9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/IndexingSpiQuerySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/IndexingSpiQuerySelfTest.java @@ -52,10 +52,14 @@ import org.apache.ignite.transactions.TransactionState; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Indexing Spi query only test */ +@RunWith(JUnit4.class) public class IndexingSpiQuerySelfTest extends GridCommonAbstractTest { private IndexingSpi indexingSpi; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/IndexingSpiQueryTxSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/IndexingSpiQueryTxSelfTest.java index e93655bdbd57d..2c369895b66e0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/IndexingSpiQueryTxSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/IndexingSpiQueryTxSelfTest.java @@ -40,10 +40,14 @@ import org.apache.ignite.transactions.TransactionIsolation; import org.apache.ignite.transactions.TransactionState; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Indexing Spi transactional query test */ +@RunWith(JUnit4.class) public class IndexingSpiQueryTxSelfTest extends GridCacheAbstractSelfTest { /** {@inheritDoc} */ @Override protected int gridCount() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/ScanQueryOffheapExpiryPolicySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/ScanQueryOffheapExpiryPolicySelfTest.java index c106e42b6c1cf..83d82966e0aaf 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/ScanQueryOffheapExpiryPolicySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/ScanQueryOffheapExpiryPolicySelfTest.java @@ -29,6 +29,9 @@ import javax.cache.expiry.CreatedExpiryPolicy; import javax.cache.expiry.Duration; import java.util.concurrent.TimeUnit; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CachePeekMode.OFFHEAP; import static org.apache.ignite.cache.CachePeekMode.ONHEAP; @@ -36,6 +39,7 @@ /** * */ +@RunWith(JUnit4.class) public class ScanQueryOffheapExpiryPolicySelfTest extends GridCommonAbstractTest { /** Nodes count. */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousBatchAckTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousBatchAckTest.java index 919ca7fe9e7e8..779b160bf6285 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousBatchAckTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousBatchAckTest.java @@ -41,6 +41,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -53,6 +56,7 @@ /** * Continuous queries tests. */ +@RunWith(JUnit4.class) public class CacheContinuousBatchAckTest extends GridCommonAbstractTest implements Serializable { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFailoverMvccTxSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFailoverMvccTxSelfTest.java index 896fef9685d3f..ab5bb42360c92 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFailoverMvccTxSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFailoverMvccTxSelfTest.java @@ -18,6 +18,9 @@ import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.cache.CacheMode; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -25,6 +28,7 @@ /** * */ +@RunWith(JUnit4.class) public class CacheContinuousQueryAsyncFailoverMvccTxSelfTest extends CacheContinuousQueryFailoverAbstractSelfTest { /** {@inheritDoc} */ @Override protected CacheMode cacheMode() { @@ -42,20 +46,20 @@ public class CacheContinuousQueryAsyncFailoverMvccTxSelfTest extends CacheConti } /** {@inheritDoc} */ - @Override @Test - public void testBackupQueueEvict() throws Exception { + @Test + @Override public void testBackupQueueEvict() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-7311"); } /** {@inheritDoc} */ - @Override @Test - public void testLeftPrimaryAndBackupNodes() throws Exception { + @Test + @Override public void testLeftPrimaryAndBackupNodes() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10047"); } /** {@inheritDoc} */ - @Override @Test - public void testFailoverStartStopBackup() throws Exception { + @Test + @Override public void testFailoverStartStopBackup() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10391"); } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFilterListenerTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFilterListenerTest.java index b47a91328cb58..393652c28992b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFilterListenerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFilterListenerTest.java @@ -53,6 +53,9 @@ import org.apache.ignite.spi.eventstorage.memory.MemoryEventStorageSpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.SECONDS; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; @@ -67,6 +70,7 @@ /** * */ +@RunWith(JUnit4.class) public class CacheContinuousQueryAsyncFilterListenerTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryConcurrentPartitionUpdateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryConcurrentPartitionUpdateTest.java index 7ef15113b2f05..fdb2180f8b513 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryConcurrentPartitionUpdateTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryConcurrentPartitionUpdateTest.java @@ -45,6 +45,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -56,6 +59,7 @@ /** * */ +@RunWith(JUnit4.class) public class CacheContinuousQueryConcurrentPartitionUpdateTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryCounterAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryCounterAbstractTest.java index 165116fafb6fc..3c190e44fbacb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryCounterAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryCounterAbstractTest.java @@ -53,6 +53,9 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.util.concurrent.ConcurrentHashMap; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -63,6 +66,7 @@ /** * Continuous queries counter tests. */ +@RunWith(JUnit4.class) public abstract class CacheContinuousQueryCounterAbstractTest extends GridCommonAbstractTest implements Serializable { /** */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryEventBufferTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryEventBufferTest.java index 0615a2f852c22..c86ac65a81f81 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryEventBufferTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryEventBufferTest.java @@ -28,11 +28,15 @@ import javax.cache.event.EventType; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class CacheContinuousQueryEventBufferTest extends GridCommonAbstractTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryExecuteInPrimaryTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryExecuteInPrimaryTest.java index 55b3938482246..58f4f2caabf53 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryExecuteInPrimaryTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryExecuteInPrimaryTest.java @@ -46,6 +46,9 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; @@ -59,6 +62,7 @@ /** * Continuous queries execute in primary node tests. */ +@RunWith(JUnit4.class) public class CacheContinuousQueryExecuteInPrimaryTest extends GridCommonAbstractTest implements Serializable { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFactoryFilterRandomOperationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFactoryFilterRandomOperationTest.java index 1abd5c3988203..e0dcf2e6ce555 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFactoryFilterRandomOperationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFactoryFilterRandomOperationTest.java @@ -58,6 +58,9 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.SECONDS; @@ -75,6 +78,7 @@ /** * */ +@RunWith(JUnit4.class) public class CacheContinuousQueryFactoryFilterRandomOperationTest extends CacheContinuousQueryRandomOperationsTest { /** */ private static final int NODES = 5; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAbstractSelfTest.java index 30d54074549cb..abe6e9d45a6a7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAbstractSelfTest.java @@ -106,6 +106,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionRollbackException; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.MINUTES; @@ -119,6 +122,7 @@ /** * */ +@RunWith(JUnit4.class) public abstract class CacheContinuousQueryFailoverAbstractSelfTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverMvccTxSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverMvccTxSelfTest.java index 03592dd056e4e..64073a9389655 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverMvccTxSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverMvccTxSelfTest.java @@ -18,6 +18,9 @@ import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.cache.CacheMode; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -25,6 +28,7 @@ /** * */ +@RunWith(JUnit4.class) public class CacheContinuousQueryFailoverMvccTxSelfTest extends CacheContinuousQueryFailoverAbstractSelfTest { /** {@inheritDoc} */ @Override protected CacheMode cacheMode() { @@ -37,20 +41,20 @@ public class CacheContinuousQueryFailoverMvccTxSelfTest extends CacheContinuousQ } /** {@inheritDoc} */ - @Override @Test - public void testBackupQueueEvict() throws Exception { + @Test + @Override public void testBackupQueueEvict() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-7311"); } /** {@inheritDoc} */ - @Override @Test - public void testLeftPrimaryAndBackupNodes() throws Exception { + @Test + @Override public void testLeftPrimaryAndBackupNodes() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10047"); } /** {@inheritDoc} */ - @Override @Test - public void testFailoverStartStopBackup() throws Exception { + @Test + @Override public void testFailoverStartStopBackup() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10391"); } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryLostPartitionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryLostPartitionTest.java index 8f24fc06a1762..c040332872d7e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryLostPartitionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryLostPartitionTest.java @@ -34,6 +34,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static javax.cache.configuration.FactoryBuilder.factoryOf; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; @@ -46,6 +49,7 @@ /** * Test from https://issues.apache.org/jira/browse/IGNITE-2384. */ +@RunWith(JUnit4.class) public class CacheContinuousQueryLostPartitionTest extends GridCommonAbstractTest { /** */ public static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOperationFromCallbackTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOperationFromCallbackTest.java index 9ddac4cf6f365..3f8e34ff1d820 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOperationFromCallbackTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOperationFromCallbackTest.java @@ -60,6 +60,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -71,6 +74,7 @@ /** * */ +@RunWith(JUnit4.class) public class CacheContinuousQueryOperationFromCallbackTest extends GridCommonAbstractTest { /** */ public static final int KEYS = 10; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOperationP2PTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOperationP2PTest.java index f7f109b552c6c..7ec7ad2d480b5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOperationP2PTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOperationP2PTest.java @@ -39,6 +39,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -50,6 +53,7 @@ /** * */ +@RunWith(JUnit4.class) public class CacheContinuousQueryOperationP2PTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOrderingEventTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOrderingEventTest.java index 35a4bb3704ca0..c8acff18397b3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOrderingEventTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOrderingEventTest.java @@ -59,6 +59,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -73,6 +76,7 @@ /** * */ +@RunWith(JUnit4.class) public class CacheContinuousQueryOrderingEventTest extends GridCommonAbstractTest { /** */ public static final int LISTENER_CNT = 3; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryRandomOperationsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryRandomOperationsTest.java index 0ca978bc55a97..7a73579896c10 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryRandomOperationsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryRandomOperationsTest.java @@ -76,6 +76,9 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.SECONDS; @@ -99,6 +102,7 @@ /** * */ +@RunWith(JUnit4.class) public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryVariationsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryVariationsTest.java index 2fe7fe55839ef..44d51d013142e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryVariationsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryVariationsTest.java @@ -65,6 +65,9 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.SECONDS; @@ -80,6 +83,7 @@ /** * */ +@RunWith(JUnit4.class) public class CacheContinuousQueryVariationsTest extends IgniteCacheConfigVariationsAbstractTest { /** */ private static final int ITERATION_CNT = 20; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousWithTransformerReplicatedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousWithTransformerReplicatedSelfTest.java index 21038538616e8..5c831267f244e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousWithTransformerReplicatedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousWithTransformerReplicatedSelfTest.java @@ -47,11 +47,15 @@ import org.apache.ignite.lang.IgniteClosure; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; /** */ +@RunWith(JUnit4.class) public class CacheContinuousWithTransformerReplicatedSelfTest extends GridCommonAbstractTest { /** */ private static final int DFLT_ENTRY_CNT = 10; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheEntryProcessorExternalizableFailedTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheEntryProcessorExternalizableFailedTest.java index cb13d9ed0ecd6..c20a0ff89d4cc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheEntryProcessorExternalizableFailedTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheEntryProcessorExternalizableFailedTest.java @@ -43,6 +43,9 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -56,6 +59,7 @@ /** * */ +@RunWith(JUnit4.class) public class CacheEntryProcessorExternalizableFailedTest extends GridCommonAbstractTest { /** */ private static final int EXPECTED_VALUE = 42; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheEntryProcessorNonSerializableTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheEntryProcessorNonSerializableTest.java index 750a5a90ebadc..761f725aeb1c8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheEntryProcessorNonSerializableTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheEntryProcessorNonSerializableTest.java @@ -40,6 +40,9 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -53,6 +56,7 @@ /** * */ +@RunWith(JUnit4.class) public class CacheEntryProcessorNonSerializableTest extends GridCommonAbstractTest { /** */ private static final int EXPECTED_VALUE = 42; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationNearEnabledTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationNearEnabledTest.java index 83138bcca8cdf..b3a0a45806abd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationNearEnabledTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationNearEnabledTest.java @@ -21,10 +21,14 @@ import org.apache.ignite.cache.CacheMode; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.NearCacheConfiguration; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class CacheKeepBinaryIterationNearEnabledTest extends CacheKeepBinaryIterationTest { /** {@inheritDoc} */ @Override protected CacheConfiguration cacheConfiguration( @@ -40,14 +44,14 @@ public class CacheKeepBinaryIterationNearEnabledTest extends CacheKeepBinaryIter } /** {@inheritDoc} */ - @Override @Test - public void testMvccTxOnHeap() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-7187"); + @Test + @Override public void testMvccTxOnHeap() throws Exception { + fail("https://issues.apache.org/jira/browse/IGNITE-7187"); } /** {@inheritDoc} */ - @Override @Test - public void testMvccTxOnHeapLocalEntries() throws Exception { + @Test + @Override public void testMvccTxOnHeapLocalEntries() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-7187"); } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationStoreEnabledTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationStoreEnabledTest.java index 347b9fa961812..af1f582afcf21 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationStoreEnabledTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationStoreEnabledTest.java @@ -24,10 +24,14 @@ import org.apache.ignite.cache.CacheWriteSynchronizationMode; import org.apache.ignite.cache.store.CacheStoreAdapter; import org.apache.ignite.configuration.CacheConfiguration; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class CacheKeepBinaryIterationStoreEnabledTest extends CacheKeepBinaryIterationTest { /** Cache store. */ private static TestStore store = new TestStore(); @@ -51,14 +55,14 @@ public class CacheKeepBinaryIterationStoreEnabledTest extends CacheKeepBinaryIte } /** {@inheritDoc} */ - @Override @Test - public void testMvccTxOnHeap() throws Exception { + @Test + @Override public void testMvccTxOnHeap() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-8582"); } /** {@inheritDoc} */ - @Override @Test - public void testMvccTxOnHeapLocalEntries() throws Exception { + @Test + @Override public void testMvccTxOnHeapLocalEntries() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-8582"); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationTest.java index 7e80d75c0761e..6fd429bc3a4fa 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationTest.java @@ -37,6 +37,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.config.GridTestProperties; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -47,6 +50,7 @@ /** * */ +@RunWith(JUnit4.class) public class CacheKeepBinaryIterationTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/ClientReconnectContinuousQueryTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/ClientReconnectContinuousQueryTest.java index aa1e03bea485b..bbdbb1e1f2399 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/ClientReconnectContinuousQueryTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/ClientReconnectContinuousQueryTest.java @@ -38,10 +38,14 @@ import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class ClientReconnectContinuousQueryTest extends GridCommonAbstractTest { /** Client index. */ private static final int CLIENT_IDX = 1; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAtomicSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAtomicSelfTest.java index f8e06b56fd55b..bb397b418b559 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAtomicSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAtomicSelfTest.java @@ -19,12 +19,16 @@ import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.configuration.NearCacheConfiguration; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; /** * Continuous queries tests for atomic cache. */ +@RunWith(JUnit4.class) public class GridCacheContinuousQueryAtomicSelfTest extends GridCacheContinuousQueryPartitionedSelfTest { /** {@inheritDoc} */ @Override protected CacheAtomicityMode atomicityMode() { @@ -37,8 +41,8 @@ public class GridCacheContinuousQueryAtomicSelfTest extends GridCacheContinuousQ } /** {@inheritDoc} */ - @Override @Test - public void testInternalKey() throws Exception { + @Test + @Override public void testInternalKey() throws Exception { // No-op. } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryConcurrentTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryConcurrentTest.java index 798de0dda453d..1d6d6cc598b29 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryConcurrentTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryConcurrentTest.java @@ -53,6 +53,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.Executors.newSingleThreadExecutor; import static java.util.concurrent.TimeUnit.MINUTES; @@ -62,6 +65,7 @@ * */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class GridCacheContinuousQueryConcurrentTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryMultiNodesFilteringTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryMultiNodesFilteringTest.java index 6a3518ee079ad..663a66c383dd4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryMultiNodesFilteringTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryMultiNodesFilteringTest.java @@ -55,6 +55,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -63,6 +66,7 @@ /** */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class GridCacheContinuousQueryMultiNodesFilteringTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryNodesFilteringTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryNodesFilteringTest.java index 41f7eeb1cce8b..519b674b7d8fd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryNodesFilteringTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryNodesFilteringTest.java @@ -36,9 +36,13 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridStringLogger; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** */ @SuppressWarnings("unused") +@RunWith(JUnit4.class) public class GridCacheContinuousQueryNodesFilteringTest extends GridCommonAbstractTest implements Serializable { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryPartitionedOnlySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryPartitionedOnlySelfTest.java index 79664f3ca1443..fe282a845aaeb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryPartitionedOnlySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryPartitionedOnlySelfTest.java @@ -19,12 +19,16 @@ import org.apache.ignite.cache.CacheMode; import org.apache.ignite.configuration.NearCacheConfiguration; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** * Continuous queries tests for partitioned cache. */ +@RunWith(JUnit4.class) public class GridCacheContinuousQueryPartitionedOnlySelfTest extends GridCacheContinuousQueryAbstractSelfTest { /** {@inheritDoc} */ @Override protected NearCacheConfiguration nearConfiguration() { @@ -42,8 +46,8 @@ public class GridCacheContinuousQueryPartitionedOnlySelfTest extends GridCacheCo } /** {@inheritDoc} */ - @Override @Test - public void testInternalKey() throws Exception { + @Test + @Override public void testInternalKey() throws Exception { // Disabled since data structures are not allowed in partitioned only mode. } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryReplicatedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryReplicatedSelfTest.java index 39f7e82144eff..b4043b0b2c3ed 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryReplicatedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryReplicatedSelfTest.java @@ -27,6 +27,9 @@ import org.apache.ignite.cache.CacheMode; import org.apache.ignite.cache.query.ContinuousQuery; import org.apache.ignite.cache.query.QueryCursor; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -34,6 +37,7 @@ /** * Continuous queries tests for replicated cache. */ +@RunWith(JUnit4.class) public class GridCacheContinuousQueryReplicatedSelfTest extends GridCacheContinuousQueryAbstractSelfTest { /** {@inheritDoc} */ @Override protected CacheMode cacheMode() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryReplicatedTxOneNodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryReplicatedTxOneNodeTest.java index 4e769b4ec0c9c..98fadcf86fad1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryReplicatedTxOneNodeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryReplicatedTxOneNodeTest.java @@ -36,10 +36,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for replicated cache with one node. */ +@RunWith(JUnit4.class) public class GridCacheContinuousQueryReplicatedTxOneNodeTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryTxSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryTxSelfTest.java index c9529203d3648..84b006c82ddf2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryTxSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryTxSelfTest.java @@ -20,12 +20,16 @@ import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.cache.CacheMode; import org.apache.ignite.configuration.NearCacheConfiguration; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; /** * Continuous queries tests for atomic cache. */ +@RunWith(JUnit4.class) public class GridCacheContinuousQueryTxSelfTest extends GridCacheContinuousQueryPartitionedSelfTest { /** {@inheritDoc} */ @Override protected CacheAtomicityMode atomicityMode() { @@ -43,8 +47,8 @@ public class GridCacheContinuousQueryTxSelfTest extends GridCacheContinuousQuery } /** {@inheritDoc} */ - @Override @Test - public void testInternalKey() throws Exception { + @Test + @Override public void testInternalKey() throws Exception { // No-op. } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryBackupQueueTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryBackupQueueTest.java index 824fec9fc86df..9be79da38ac6e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryBackupQueueTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryBackupQueueTest.java @@ -44,6 +44,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -52,6 +55,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheContinuousQueryBackupQueueTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryClientReconnectTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryClientReconnectTest.java index 3a76cf4ba14eb..f8613964de114 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryClientReconnectTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryClientReconnectTest.java @@ -30,6 +30,9 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.IgniteClientReconnectAbstractTest; import org.apache.ignite.resources.LoggerResource; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.SECONDS; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; @@ -39,6 +42,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheContinuousQueryClientReconnectTest extends IgniteClientReconnectAbstractTest { /** {@inheritDoc} */ @Override protected int serverCount() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryClientTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryClientTest.java index 663747cbc20f3..ba5163856926c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryClientTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryClientTest.java @@ -37,6 +37,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.SECONDS; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; @@ -46,6 +49,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheContinuousQueryClientTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryImmutableEntryTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryImmutableEntryTest.java index e77dd5e565598..0dc62bd68f559 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryImmutableEntryTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryImmutableEntryTest.java @@ -40,6 +40,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -48,6 +51,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheContinuousQueryImmutableEntryTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryNoUnsubscribeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryNoUnsubscribeTest.java index 2ab5bb6b101f3..0b6bd4cd1bb42 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryNoUnsubscribeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryNoUnsubscribeTest.java @@ -31,10 +31,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteCacheContinuousQueryNoUnsubscribeTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryReconnectTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryReconnectTest.java index 9bf6e50329d42..b0bb3654734d1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryReconnectTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryReconnectTest.java @@ -32,6 +32,9 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -40,6 +43,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheContinuousQueryReconnectTest extends GridCommonAbstractTest implements Serializable { /** */ private static final AtomicInteger cnt = new AtomicInteger(); From f9ccc80de28fb2fc64c96d695f5f906a8cd9a946 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Mon, 3 Dec 2018 15:40:21 +0300 Subject: [PATCH 014/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview --- .../distributed/Cache64kPartitionsTest.java | 4 + .../CacheAbstractRestartSelfTest.java | 4 + .../distributed/CacheAffinityEarlyTest.java | 4 + ...heAsyncOperationsFailoverAbstractTest.java | 4 + .../distributed/CacheAsyncOperationsTest.java | 4 + ...acheAtomicPrimarySyncBackPressureTest.java | 4 + .../CacheBaselineTopologyTest.java | 4 + .../distributed/CacheBlockOnGetAllTest.java | 132 +++++++++--------- .../CacheBlockOnReadAbstractTest.java | 4 + .../distributed/CacheBlockOnScanTest.java | 52 +++---- .../CacheBlockOnSingleGetTest.java | 132 +++++++++--------- .../CacheClientsConcurrentStartTest.java | 4 + ...GridCacheWriteBehindStoreAbstractTest.java | 4 + ...WriteBehindStoreMultithreadedSelfTest.java | 4 + ...hindStorePartitionedMultiNodeSelfTest.java | 4 + .../GridCacheWriteBehindStoreSelfTest.java | 4 + ...gniteCacheWriteBehindNoUpdateSelfTest.java | 4 + ...cheClientWriteBehindStoreAbstractTest.java | 4 + ...ientWriteBehindStoreNonCoalescingTest.java | 4 + .../AtomicOperationsInTxTest.java | 4 + .../transactions/DepthFirstSearchTest.java | 4 + ...tegrityWithPrimaryIndexCorruptionTest.java | 4 + ...ionIntegrityWithSystemWorkerDeathTest.java | 4 + .../TxDataConsistencyOnCommitFailureTest.java | 4 + .../transactions/TxDeadlockCauseTest.java | 4 + ...adlockDetectionMessageMarshallingTest.java | 4 + .../TxDeadlockDetectionNoHangsTest.java | 4 + .../transactions/TxDeadlockDetectionTest.java | 4 + ...xDeadlockDetectionUnmasrhalErrorsTest.java | 4 + .../cache/transactions/TxLabelTest.java | 4 + .../TxMultiCacheAsyncOpsTest.java | 4 + .../transactions/TxOnCachesStartTest.java | 4 + ...misticDeadlockDetectionCrossCacheTest.java | 4 + .../TxOptimisticDeadlockDetectionTest.java | 4 + .../TxOptimisticOnPartitionExchangeTest.java | 4 + ...timisticPrepareOnUnstableTopologyTest.java | 4 + ...misticDeadlockDetectionCrossCacheTest.java | 4 + .../TxPessimisticDeadlockDetectionTest.java | 4 + .../transactions/TxRollbackAsyncTest.java | 4 + .../TxRollbackOnIncorrectParamsTest.java | 4 + ...TxRollbackOnTimeoutOnePhaseCommitTest.java | 4 + .../transactions/TxRollbackOnTimeoutTest.java | 4 + .../TxRollbackOnTopologyChangeTest.java | 4 + .../transactions/TxStateChangeEventTest.java | 4 + ...thSmallTimeoutAndContentionOneKeyTest.java | 4 + 45 files changed, 332 insertions(+), 152 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/Cache64kPartitionsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/Cache64kPartitionsTest.java index fafcee9c37249..078c5737dae0a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/Cache64kPartitionsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/Cache64kPartitionsTest.java @@ -24,10 +24,14 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.configuration.WALMode; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class Cache64kPartitionsTest extends GridCommonAbstractTest { /** */ private boolean persistenceEnabled; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAbstractRestartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAbstractRestartSelfTest.java index 56cc7936b3ea8..61d96bc71339b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAbstractRestartSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAbstractRestartSelfTest.java @@ -32,10 +32,14 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Abstract restart test. */ +@RunWith(JUnit4.class) public abstract class CacheAbstractRestartSelfTest extends IgniteCacheAbstractTest { /** */ private volatile CountDownLatch cacheCheckedLatch = new CountDownLatch(1); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAffinityEarlyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAffinityEarlyTest.java index 3b917231ee4ae..ad55fdd08cac5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAffinityEarlyTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAffinityEarlyTest.java @@ -34,10 +34,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class CacheAffinityEarlyTest extends GridCommonAbstractTest { /** Grid count. */ private static int GRID_CNT = 8; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAsyncOperationsFailoverAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAsyncOperationsFailoverAbstractTest.java index 1f028fb89807f..9b62c35a0b535 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAsyncOperationsFailoverAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAsyncOperationsFailoverAbstractTest.java @@ -39,12 +39,16 @@ import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi; import org.apache.ignite.testframework.GridTestUtils; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** * */ +@RunWith(JUnit4.class) public abstract class CacheAsyncOperationsFailoverAbstractTest extends GridCacheAbstractSelfTest { /** */ private static final int NODE_CNT = 4; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAsyncOperationsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAsyncOperationsTest.java index 18c4b85ecacf9..d6933ff03aac8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAsyncOperationsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAsyncOperationsTest.java @@ -34,6 +34,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -44,6 +47,7 @@ /** * */ +@RunWith(JUnit4.class) public class CacheAsyncOperationsTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAtomicPrimarySyncBackPressureTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAtomicPrimarySyncBackPressureTest.java index d9676ae67c249..053400177a8b2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAtomicPrimarySyncBackPressureTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAtomicPrimarySyncBackPressureTest.java @@ -34,12 +34,16 @@ import org.apache.ignite.spi.IgniteSpiException; import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Checks that back-pressure control restricts uncontrolled growing * of backup message queue. This means, if queue too big - any reads * will be stopped until received acks from backup nodes. */ +@RunWith(JUnit4.class) public class CacheAtomicPrimarySyncBackPressureTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBaselineTopologyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBaselineTopologyTest.java index f77490e94413d..2d4b3b3087ace 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBaselineTopologyTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBaselineTopologyTest.java @@ -56,6 +56,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -64,6 +67,7 @@ /** * */ +@RunWith(JUnit4.class) public class CacheBaselineTopologyTest extends GridCommonAbstractTest { /** */ private static final String CACHE_NAME = "cache"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnGetAllTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnGetAllTest.java index 26a7e1afb76c1..dd301b13417a1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnGetAllTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnGetAllTest.java @@ -21,6 +21,9 @@ import java.util.Random; import java.util.Set; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -30,6 +33,7 @@ /** * */ +@RunWith(JUnit4.class) public class CacheBlockOnGetAllTest extends CacheBlockOnReadAbstractTest { /** {@inheritDoc} */ @@ -52,225 +56,225 @@ public class CacheBlockOnGetAllTest extends CacheBlockOnReadAbstractTest { /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = PARTITIONED) - @Override @Test - public void testStopBaselineAtomicPartitioned() { + @Test + @Override public void testStopBaselineAtomicPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9915"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = REPLICATED) - @Override @Test - public void testStopBaselineAtomicReplicated() { + @Test + @Override public void testStopBaselineAtomicReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9915"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) - @Override @Test - public void testStopBaselineTransactionalPartitioned() { + @Test + @Override public void testStopBaselineTransactionalPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9915"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) - @Override @Test - public void testStopBaselineTransactionalReplicated() { + @Test + @Override public void testStopBaselineTransactionalReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9915"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = PARTITIONED) - @Override @Test - public void testCreateCacheAtomicPartitioned() { + @Test + @Override public void testCreateCacheAtomicPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = REPLICATED) - @Override @Test - public void testCreateCacheAtomicReplicated() { + @Test + @Override public void testCreateCacheAtomicReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) - @Override @Test - public void testCreateCacheTransactionalPartitioned() { + @Test + @Override public void testCreateCacheTransactionalPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) - @Override @Test - public void testCreateCacheTransactionalReplicated() { + @Test + @Override public void testCreateCacheTransactionalReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = PARTITIONED) - @Override @Test - public void testDestroyCacheAtomicPartitioned() { + @Test + @Override public void testDestroyCacheAtomicPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = REPLICATED) - @Override @Test - public void testDestroyCacheAtomicReplicated() { + @Test + @Override public void testDestroyCacheAtomicReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) - @Override @Test - public void testDestroyCacheTransactionalPartitioned() { + @Test + @Override public void testDestroyCacheTransactionalPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) - @Override @Test - public void testDestroyCacheTransactionalReplicated() { + @Test + @Override public void testDestroyCacheTransactionalReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = PARTITIONED) - @Override @Test - public void testStartServerAtomicPartitioned() { + @Test + @Override public void testStartServerAtomicPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = REPLICATED) - @Override @Test - public void testStartServerAtomicReplicated() { + @Test + @Override public void testStartServerAtomicReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) - @Override @Test - public void testStartServerTransactionalPartitioned() { + @Test + @Override public void testStartServerTransactionalPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) - @Override @Test - public void testStartServerTransactionalReplicated() { + @Test + @Override public void testStartServerTransactionalReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = PARTITIONED) - @Override @Test - public void testStopServerAtomicPartitioned() { + @Test + @Override public void testStopServerAtomicPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = REPLICATED) - @Override @Test - public void testStopServerAtomicReplicated() { + @Test + @Override public void testStopServerAtomicReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) - @Override @Test - public void testStopServerTransactionalPartitioned() { + @Test + @Override public void testStopServerTransactionalPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) - @Override @Test - public void testStopServerTransactionalReplicated() { + @Test + @Override public void testStopServerTransactionalReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = PARTITIONED) - @Override @Test - public void testUpdateBaselineTopologyAtomicPartitioned() { + @Test + @Override public void testUpdateBaselineTopologyAtomicPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = REPLICATED) - @Override @Test - public void testUpdateBaselineTopologyAtomicReplicated() { + @Test + @Override public void testUpdateBaselineTopologyAtomicReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) - @Override @Test - public void testUpdateBaselineTopologyTransactionalPartitioned() { + @Test + @Override public void testUpdateBaselineTopologyTransactionalPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) - @Override @Test - public void testUpdateBaselineTopologyTransactionalReplicated() { + @Test + @Override public void testUpdateBaselineTopologyTransactionalReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = PARTITIONED) - @Override @Test - public void testStartClientAtomicPartitioned() { + @Test + @Override public void testStartClientAtomicPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9987"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = REPLICATED) - @Override @Test - public void testStartClientAtomicReplicated() { + @Test + @Override public void testStartClientAtomicReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9987"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) - @Override @Test - public void testStartClientTransactionalPartitioned() { + @Test + @Override public void testStartClientTransactionalPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9987"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) - @Override @Test - public void testStartClientTransactionalReplicated() { + @Test + @Override public void testStartClientTransactionalReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9987"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = PARTITIONED) - @Override @Test - public void testStopClientAtomicPartitioned() { + @Test + @Override public void testStopClientAtomicPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9987"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = REPLICATED) - @Override @Test - public void testStopClientAtomicReplicated() { + @Test + @Override public void testStopClientAtomicReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9987"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) - @Override @Test - public void testStopClientTransactionalPartitioned() { + @Test + @Override public void testStopClientTransactionalPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9987"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) - @Override @Test - public void testStopClientTransactionalReplicated() { + @Test + @Override public void testStopClientTransactionalReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9987"); } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnReadAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnReadAbstractTest.java index d8ba26c565dd2..297d2d29c4a94 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnReadAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnReadAbstractTest.java @@ -79,6 +79,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -88,6 +91,7 @@ /** * */ +@RunWith(JUnit4.class) public abstract class CacheBlockOnReadAbstractTest extends GridCommonAbstractTest { /** Default cache entries count. */ private static final int DFLT_CACHE_ENTRIES_CNT = 2 * 1024; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnScanTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnScanTest.java index 9cc21262b459e..2b0289b3e8149 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnScanTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnScanTest.java @@ -21,6 +21,9 @@ import java.util.Random; import org.apache.ignite.cache.query.ScanQuery; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -30,6 +33,7 @@ /** * */ +@RunWith(JUnit4.class) public class CacheBlockOnScanTest extends CacheBlockOnReadAbstractTest { /** {@inheritDoc} */ @@ -49,85 +53,85 @@ public class CacheBlockOnScanTest extends CacheBlockOnReadAbstractTest { /** {@inheritDoc} */ @Params(baseline = 9, atomicityMode = ATOMIC, cacheMode = PARTITIONED, allowException = true) - @Override @Test - public void testStopBaselineAtomicPartitioned() throws Exception { + @Test + @Override public void testStopBaselineAtomicPartitioned() throws Exception { super.testStopBaselineAtomicPartitioned(); } /** {@inheritDoc} */ @Params(baseline = 9, atomicityMode = ATOMIC, cacheMode = REPLICATED, allowException = true) - @Override @Test - public void testStopBaselineAtomicReplicated() throws Exception { + @Test + @Override public void testStopBaselineAtomicReplicated() throws Exception { super.testStopBaselineAtomicReplicated(); } /** {@inheritDoc} */ @Params(baseline = 9, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED, allowException = true) - @Override @Test - public void testStopBaselineTransactionalPartitioned() throws Exception { + @Test + @Override public void testStopBaselineTransactionalPartitioned() throws Exception { super.testStopBaselineTransactionalPartitioned(); } /** {@inheritDoc} */ @Params(baseline = 9, atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED, allowException = true) - @Override @Test - public void testStopBaselineTransactionalReplicated() throws Exception { + @Test + @Override public void testStopBaselineTransactionalReplicated() throws Exception { super.testStopBaselineTransactionalReplicated(); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = REPLICATED) - @Override @Test - public void testStartClientAtomicReplicated() { + @Test + @Override public void testStartClientAtomicReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9987"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) - @Override @Test - public void testStartClientTransactionalReplicated() { + @Test + @Override public void testStartClientTransactionalReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9987"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = REPLICATED) - @Override @Test - public void testStopClientAtomicReplicated() { + @Test + @Override public void testStopClientAtomicReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9987"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) - @Override @Test - public void testStopClientTransactionalReplicated() { + @Test + @Override public void testStopClientTransactionalReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9987"); } /** {@inheritDoc} */ @Params(atomicityMode = ATOMIC, cacheMode = PARTITIONED) - @Override @Test - public void testStartClientAtomicPartitioned() throws Exception { + @Test + @Override public void testStartClientAtomicPartitioned() throws Exception { super.testStartClientTransactionalReplicated(); } /** {@inheritDoc} */ @Params(atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) - @Override @Test - public void testStartClientTransactionalPartitioned() throws Exception { + @Test + @Override public void testStartClientTransactionalPartitioned() throws Exception { super.testStartClientTransactionalReplicated(); } /** {@inheritDoc} */ @Params(atomicityMode = ATOMIC, cacheMode = PARTITIONED) - @Override @Test - public void testStopClientAtomicPartitioned() throws Exception { + @Test + @Override public void testStopClientAtomicPartitioned() throws Exception { super.testStopClientTransactionalReplicated(); } /** {@inheritDoc} */ @Params(atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) - @Override @Test - public void testStopClientTransactionalPartitioned() throws Exception { + @Test + @Override public void testStopClientTransactionalPartitioned() throws Exception { super.testStopClientTransactionalReplicated(); } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnSingleGetTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnSingleGetTest.java index 2e0f6fe79aa25..08c15b4e4442a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnSingleGetTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnSingleGetTest.java @@ -19,6 +19,9 @@ import java.util.Random; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -28,6 +31,7 @@ /** * */ +@RunWith(JUnit4.class) public class CacheBlockOnSingleGetTest extends CacheBlockOnReadAbstractTest { /** {@inheritDoc} */ @@ -46,225 +50,225 @@ public class CacheBlockOnSingleGetTest extends CacheBlockOnReadAbstractTest { /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = PARTITIONED) - @Override @Test - public void testStopBaselineAtomicPartitioned() { + @Test + @Override public void testStopBaselineAtomicPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9915"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = REPLICATED) - @Override @Test - public void testStopBaselineAtomicReplicated() { + @Test + @Override public void testStopBaselineAtomicReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9915"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) - @Override @Test - public void testStopBaselineTransactionalPartitioned() { + @Test + @Override public void testStopBaselineTransactionalPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9915"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) - @Override @Test - public void testStopBaselineTransactionalReplicated() { + @Test + @Override public void testStopBaselineTransactionalReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9915"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = PARTITIONED) - @Override @Test - public void testCreateCacheAtomicPartitioned() { + @Test + @Override public void testCreateCacheAtomicPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = REPLICATED) - @Override @Test - public void testCreateCacheAtomicReplicated() { + @Test + @Override public void testCreateCacheAtomicReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) - @Override @Test - public void testCreateCacheTransactionalPartitioned() { + @Test + @Override public void testCreateCacheTransactionalPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) - @Override @Test - public void testCreateCacheTransactionalReplicated() { + @Test + @Override public void testCreateCacheTransactionalReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = PARTITIONED) - @Override @Test - public void testDestroyCacheAtomicPartitioned() { + @Test + @Override public void testDestroyCacheAtomicPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = REPLICATED) - @Override @Test - public void testDestroyCacheAtomicReplicated() { + @Test + @Override public void testDestroyCacheAtomicReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) - @Override @Test - public void testDestroyCacheTransactionalPartitioned() { + @Test + @Override public void testDestroyCacheTransactionalPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) - @Override @Test - public void testDestroyCacheTransactionalReplicated() { + @Test + @Override public void testDestroyCacheTransactionalReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = PARTITIONED) - @Override @Test - public void testStartServerAtomicPartitioned() { + @Test + @Override public void testStartServerAtomicPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = REPLICATED) - @Override @Test - public void testStartServerAtomicReplicated() { + @Test + @Override public void testStartServerAtomicReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) - @Override @Test - public void testStartServerTransactionalPartitioned() { + @Test + @Override public void testStartServerTransactionalPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) - @Override @Test - public void testStartServerTransactionalReplicated() { + @Test + @Override public void testStartServerTransactionalReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = PARTITIONED) - @Override @Test - public void testStopServerAtomicPartitioned() { + @Test + @Override public void testStopServerAtomicPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = REPLICATED) - @Override @Test - public void testStopServerAtomicReplicated() { + @Test + @Override public void testStopServerAtomicReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) - @Override @Test - public void testStopServerTransactionalPartitioned() { + @Test + @Override public void testStopServerTransactionalPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) - @Override @Test - public void testStopServerTransactionalReplicated() { + @Test + @Override public void testStopServerTransactionalReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = PARTITIONED) - @Override @Test - public void testUpdateBaselineTopologyAtomicPartitioned() { + @Test + @Override public void testUpdateBaselineTopologyAtomicPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = REPLICATED) - @Override @Test - public void testUpdateBaselineTopologyAtomicReplicated() { + @Test + @Override public void testUpdateBaselineTopologyAtomicReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) - @Override @Test - public void testUpdateBaselineTopologyTransactionalPartitioned() { + @Test + @Override public void testUpdateBaselineTopologyTransactionalPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) - @Override @Test - public void testUpdateBaselineTopologyTransactionalReplicated() { + @Test + @Override public void testUpdateBaselineTopologyTransactionalReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9883"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = PARTITIONED) - @Override @Test - public void testStartClientAtomicPartitioned() { + @Test + @Override public void testStartClientAtomicPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9987"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = REPLICATED) - @Override @Test - public void testStartClientAtomicReplicated() { + @Test + @Override public void testStartClientAtomicReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9987"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) - @Override @Test - public void testStartClientTransactionalPartitioned() { + @Test + @Override public void testStartClientTransactionalPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9987"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) - @Override @Test - public void testStartClientTransactionalReplicated() { + @Test + @Override public void testStartClientTransactionalReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9987"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = PARTITIONED) - @Override @Test - public void testStopClientAtomicPartitioned() { + @Test + @Override public void testStopClientAtomicPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9987"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = REPLICATED) - @Override @Test - public void testStopClientAtomicReplicated() { + @Test + @Override public void testStopClientAtomicReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9987"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) - @Override @Test - public void testStopClientTransactionalPartitioned() { + @Test + @Override public void testStopClientTransactionalPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9987"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) - @Override @Test - public void testStopClientTransactionalReplicated() { + @Test + @Override public void testStopClientTransactionalReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-9987"); } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheClientsConcurrentStartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheClientsConcurrentStartTest.java index abed63286049e..13d5a0a18d8c0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheClientsConcurrentStartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheClientsConcurrentStartTest.java @@ -47,6 +47,9 @@ import java.util.UUID; import java.util.concurrent.ThreadLocalRandom; import java.util.concurrent.atomic.AtomicBoolean; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.*; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*; @@ -54,6 +57,7 @@ /** * */ +@RunWith(JUnit4.class) public class CacheClientsConcurrentStartTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStoreAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStoreAbstractTest.java index 785bdfc923826..7ac71262b7bbb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStoreAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStoreAbstractTest.java @@ -38,6 +38,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC; @@ -46,6 +49,7 @@ /** * Basic store test. */ +@RunWith(JUnit4.class) public abstract class GridCacheWriteBehindStoreAbstractTest extends GridCommonAbstractTest { /** Flush frequency. */ private static final int WRITE_FROM_BEHIND_FLUSH_FREQUENCY = 1000; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStoreMultithreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStoreMultithreadedSelfTest.java index 11865aaae0b2d..0820c5c8a46a7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStoreMultithreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStoreMultithreadedSelfTest.java @@ -23,10 +23,14 @@ import java.util.Set; import org.apache.ignite.internal.IgniteInterruptedCheckedException; import org.apache.ignite.internal.util.typedef.internal.U; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Multithreaded tests for {@link org.apache.ignite.internal.processors.cache.store.GridCacheWriteBehindStore}. */ +@RunWith(JUnit4.class) public class GridCacheWriteBehindStoreMultithreadedSelfTest extends GridCacheWriteBehindStoreAbstractSelfTest { /** * This test performs complex set of operations on store with coalescing from multiple threads. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStorePartitionedMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStorePartitionedMultiNodeSelfTest.java index 137f7605e247e..1ce2ba4fb6deb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStorePartitionedMultiNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStorePartitionedMultiNodeSelfTest.java @@ -38,6 +38,9 @@ import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; @@ -46,6 +49,7 @@ /** * Tests write-behind store with near and dht commit option. */ +@RunWith(JUnit4.class) public class GridCacheWriteBehindStorePartitionedMultiNodeSelfTest extends GridCommonAbstractTest { /** Grids to start. */ private static final int GRID_CNT = 5; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStoreSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStoreSelfTest.java index a765f23adfdd8..b242ac97d6023 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStoreSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStoreSelfTest.java @@ -29,10 +29,14 @@ import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.internal.U; import org.jsr166.ConcurrentLinkedHashMap; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * This class provides basic tests for {@link org.apache.ignite.internal.processors.cache.store.GridCacheWriteBehindStore}. */ +@RunWith(JUnit4.class) public class GridCacheWriteBehindStoreSelfTest extends GridCacheWriteBehindStoreAbstractSelfTest { /** * Tests correct store (with write coalescing) shutdown when underlying store fails. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/IgniteCacheWriteBehindNoUpdateSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/IgniteCacheWriteBehindNoUpdateSelfTest.java index 0366bfb68ed11..49acd92cb04b4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/IgniteCacheWriteBehindNoUpdateSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/IgniteCacheWriteBehindNoUpdateSelfTest.java @@ -39,10 +39,14 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteCacheWriteBehindNoUpdateSelfTest extends GridCommonAbstractTest { /** */ private static final String THROTTLES_CACHE_NAME = "test"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/IgnteCacheClientWriteBehindStoreAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/IgnteCacheClientWriteBehindStoreAbstractTest.java index 3c53cb167f189..57e97b4d40286 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/IgnteCacheClientWriteBehindStoreAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/IgnteCacheClientWriteBehindStoreAbstractTest.java @@ -29,10 +29,14 @@ import org.apache.ignite.internal.util.lang.GridAbsPredicate; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.MvccFeatureChecker; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests that write behind store is updated if client does not have store. */ +@RunWith(JUnit4.class) public abstract class IgnteCacheClientWriteBehindStoreAbstractTest extends IgniteCacheAbstractTest { /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/IgnteCacheClientWriteBehindStoreNonCoalescingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/IgnteCacheClientWriteBehindStoreNonCoalescingTest.java index 4a84db322699a..410db2f8028c1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/IgnteCacheClientWriteBehindStoreNonCoalescingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/IgnteCacheClientWriteBehindStoreNonCoalescingTest.java @@ -37,12 +37,16 @@ import org.apache.ignite.internal.processors.cache.IgniteCacheAbstractTest; import org.apache.ignite.lang.IgniteBiInClosure; import org.apache.ignite.lang.IgniteFuture; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; /** * This class provides non write coalescing tests for {@link org.apache.ignite.internal.processors.cache.store.GridCacheWriteBehindStore}. */ +@RunWith(JUnit4.class) public class IgnteCacheClientWriteBehindStoreNonCoalescingTest extends IgniteCacheAbstractTest { /** {@inheritDoc} */ @Override protected int gridCount() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/AtomicOperationsInTxTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/AtomicOperationsInTxTest.java index b808c82791ad7..e02ca25349719 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/AtomicOperationsInTxTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/AtomicOperationsInTxTest.java @@ -32,6 +32,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CachePeekMode.ALL; @@ -39,6 +42,7 @@ /** * Checks how operations under atomic cache works inside a transaction. */ +@RunWith(JUnit4.class) public class AtomicOperationsInTxTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/DepthFirstSearchTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/DepthFirstSearchTest.java index 3934ea88aee87..4fec1ab1a4063 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/DepthFirstSearchTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/DepthFirstSearchTest.java @@ -30,12 +30,16 @@ import org.apache.ignite.internal.processors.cache.version.GridCacheVersion; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.internal.U; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.processors.cache.transactions.TxDeadlockDetection.findCycle; /** * DFS test for search cycle in wait-for-graph. */ +@RunWith(JUnit4.class) public class DepthFirstSearchTest extends TestCase { /** Tx 1. */ private static final GridCacheVersion T1 = new GridCacheVersion(1, 0, 0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TransactionIntegrityWithPrimaryIndexCorruptionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TransactionIntegrityWithPrimaryIndexCorruptionTest.java index ba07d4cb71327..d5db116c2edd2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TransactionIntegrityWithPrimaryIndexCorruptionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TransactionIntegrityWithPrimaryIndexCorruptionTest.java @@ -34,12 +34,16 @@ import org.apache.ignite.internal.processors.cache.persistence.tree.util.PageHandler; import org.apache.ignite.internal.processors.cache.tree.SearchRow; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState.OWNING; /** * Test cases that check transaction data integrity after transaction commit failed. */ +@RunWith(JUnit4.class) public class TransactionIntegrityWithPrimaryIndexCorruptionTest extends AbstractTransactionIntergrityTest { /** Corruption enabled flag. */ private static volatile boolean corruptionEnabled; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TransactionIntegrityWithSystemWorkerDeathTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TransactionIntegrityWithSystemWorkerDeathTest.java index a65bd4539d797..a4dd7c0fbd16f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TransactionIntegrityWithSystemWorkerDeathTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TransactionIntegrityWithSystemWorkerDeathTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.internal.worker.WorkersControlMXBeanImpl; import org.apache.ignite.mxbean.WorkersControlMXBean; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class TransactionIntegrityWithSystemWorkerDeathTest extends AbstractTransactionIntergrityTest { /** {@inheritDoc}. */ @Override protected long getTestTimeout() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDataConsistencyOnCommitFailureTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDataConsistencyOnCommitFailureTest.java index f472102cb1518..4c88fad4a2dd3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDataConsistencyOnCommitFailureTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDataConsistencyOnCommitFailureTest.java @@ -38,6 +38,9 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.mockito.Mockito; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; @@ -45,6 +48,7 @@ /** * Tests data consistency if transaction is failed due to heuristic exception on originating node. */ +@RunWith(JUnit4.class) public class TxDataConsistencyOnCommitFailureTest extends GridCommonAbstractTest { /** */ public static final int KEY = 0; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockCauseTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockCauseTest.java index 2680d0778d30f..714154a9794c1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockCauseTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockCauseTest.java @@ -40,10 +40,14 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicReference; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class TxDeadlockCauseTest extends GridCommonAbstractTest { /** */ private CacheConfiguration ccfg; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionMessageMarshallingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionMessageMarshallingTest.java index 7fe9786d67bae..9d22d68e0ddf4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionMessageMarshallingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionMessageMarshallingTest.java @@ -33,10 +33,14 @@ import org.apache.ignite.internal.processors.cache.IgniteCacheProxy; import org.apache.ignite.internal.processors.cache.KeyCacheObject; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class TxDeadlockDetectionMessageMarshallingTest extends GridCommonAbstractTest { /** Topic. */ private static final String TOPIC = "mytopic"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionNoHangsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionNoHangsTest.java index ebd9e65c6bdcb..bffed6b57cc15 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionNoHangsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionNoHangsTest.java @@ -35,6 +35,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_TX_DEADLOCK_DETECTION_MAX_ITERS; import static org.apache.ignite.IgniteSystemProperties.IGNITE_TX_DEADLOCK_DETECTION_TIMEOUT; @@ -46,6 +49,7 @@ /** * */ +@RunWith(JUnit4.class) public class TxDeadlockDetectionNoHangsTest extends GridCommonAbstractTest { /** Nodes count. */ private static final int NODES_CNT = 3; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionTest.java index 41112a115e557..f9bd4879fefd7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionTest.java @@ -48,6 +48,9 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionDeadlockException; import org.apache.ignite.transactions.TransactionTimeoutException; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.util.typedef.X.hasCause; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; @@ -56,6 +59,7 @@ /** * */ +@RunWith(JUnit4.class) public class TxDeadlockDetectionTest extends GridCommonAbstractTest { /** Nodes count. */ private static final int NODES_CNT = 3; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionUnmasrhalErrorsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionUnmasrhalErrorsTest.java index 6711c6a62cc9c..5b5dddb61a2b9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionUnmasrhalErrorsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionUnmasrhalErrorsTest.java @@ -38,6 +38,9 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionDeadlockException; import org.apache.ignite.transactions.TransactionTimeoutException; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.util.typedef.X.hasCause; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; @@ -47,6 +50,7 @@ /** * */ +@RunWith(JUnit4.class) public class TxDeadlockDetectionUnmasrhalErrorsTest extends GridCommonAbstractTest { /** Nodes count. */ private static final int NODES_CNT = 2; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxLabelTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxLabelTest.java index 8d70c30c15ef0..516c08a0c203a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxLabelTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxLabelTest.java @@ -20,10 +20,14 @@ import org.apache.ignite.Ignite; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests transaction labels. */ +@RunWith(JUnit4.class) public class TxLabelTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxMultiCacheAsyncOpsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxMultiCacheAsyncOpsTest.java index 4030d3869920d..cca0bee251c14 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxMultiCacheAsyncOpsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxMultiCacheAsyncOpsTest.java @@ -26,6 +26,9 @@ import org.apache.ignite.lang.IgniteFuture; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -33,6 +36,7 @@ /** * */ +@RunWith(JUnit4.class) public class TxMultiCacheAsyncOpsTest extends GridCommonAbstractTest { /** Grid count. */ public static final int GRID_COUNT = 3; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOnCachesStartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOnCachesStartTest.java index dd138bb5c0034..5f0ca1f2086cd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOnCachesStartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOnCachesStartTest.java @@ -34,12 +34,16 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests transactions closes correctly while other caches start and stop. * Tests possible {@link NullPointerException} in {@link TransactionProxyImpl#leave} due to race while * {@link org.apache.ignite.internal.processors.cache.GridCacheTtlManager} initializes (IGNITE-7972). */ +@RunWith(JUnit4.class) public class TxOnCachesStartTest extends GridCommonAbstractTest { /** */ private static int NUM_CACHES = 100; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticDeadlockDetectionCrossCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticDeadlockDetectionCrossCacheTest.java index 96759f758cef5..680e69b9e294b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticDeadlockDetectionCrossCacheTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticDeadlockDetectionCrossCacheTest.java @@ -39,6 +39,9 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionDeadlockException; import org.apache.ignite.transactions.TransactionTimeoutException; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.util.typedef.X.hasCause; import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC; @@ -47,6 +50,7 @@ /** * */ +@RunWith(JUnit4.class) public class TxOptimisticDeadlockDetectionCrossCacheTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @SuppressWarnings("unchecked") diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticDeadlockDetectionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticDeadlockDetectionTest.java index 595cb21ab1a4f..04c27c33c7264 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticDeadlockDetectionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticDeadlockDetectionTest.java @@ -57,6 +57,9 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionDeadlockException; import org.apache.ignite.transactions.TransactionTimeoutException; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -69,6 +72,7 @@ /** * */ +@RunWith(JUnit4.class) public class TxOptimisticDeadlockDetectionTest extends AbstractDeadlockDetectionTest { /** Ip finder. */ private static final TcpDiscoveryVmIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticOnPartitionExchangeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticOnPartitionExchangeTest.java index 9b353242965c1..9be8c7d139362 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticOnPartitionExchangeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticOnPartitionExchangeTest.java @@ -50,6 +50,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -65,6 +68,7 @@ /** * */ +@RunWith(JUnit4.class) public class TxOptimisticOnPartitionExchangeTest extends GridCommonAbstractTest { /** Nodes count. */ private static final int NODES_CNT = 3; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticPrepareOnUnstableTopologyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticPrepareOnUnstableTopologyTest.java index 3d94801b9fa9d..551d75eccd96a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticPrepareOnUnstableTopologyTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticPrepareOnUnstableTopologyTest.java @@ -38,6 +38,9 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -46,6 +49,7 @@ /** * Tests optimistic prepare on unstable topology. */ +@RunWith(JUnit4.class) public class TxOptimisticPrepareOnUnstableTopologyTest extends GridCommonAbstractTest { /** */ public static final String CACHE_NAME = "part_cache"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxPessimisticDeadlockDetectionCrossCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxPessimisticDeadlockDetectionCrossCacheTest.java index c9f06df59c80b..5a397556e993b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxPessimisticDeadlockDetectionCrossCacheTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxPessimisticDeadlockDetectionCrossCacheTest.java @@ -37,6 +37,9 @@ import org.apache.ignite.transactions.TransactionDeadlockException; import org.apache.ignite.transactions.TransactionTimeoutException; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.util.typedef.X.hasCause; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; @@ -45,6 +48,7 @@ /** * */ +@RunWith(JUnit4.class) public class TxPessimisticDeadlockDetectionCrossCacheTest extends GridCommonAbstractTest { /** Nodes count. */ private static final int NODES_CNT = 2; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxPessimisticDeadlockDetectionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxPessimisticDeadlockDetectionTest.java index 06da617348058..507f9c07b9cd2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxPessimisticDeadlockDetectionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxPessimisticDeadlockDetectionTest.java @@ -48,6 +48,9 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionDeadlockException; import org.apache.ignite.transactions.TransactionTimeoutException; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.LOCAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -61,6 +64,7 @@ /** * Tests deadlock detection for pessimistic transactions. */ +@RunWith(JUnit4.class) public class TxPessimisticDeadlockDetectionTest extends AbstractDeadlockDetectionTest { /** Cache name. */ private static final String CACHE_NAME = "cache"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackAsyncTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackAsyncTest.java index 08541c771ace5..77837ee0aafda 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackAsyncTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackAsyncTest.java @@ -87,6 +87,9 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.apache.ignite.transactions.TransactionRollbackException; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.lang.Thread.interrupted; import static java.lang.Thread.yield; @@ -105,6 +108,7 @@ /** * Tests an ability to async rollback near transactions. */ +@RunWith(JUnit4.class) public class TxRollbackAsyncTest extends GridCommonAbstractTest { /** */ public static final int DURATION = SF.applyLB(60_000, 5_000); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnIncorrectParamsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnIncorrectParamsTest.java index 91b32d405a86b..1dc1987f95f19 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnIncorrectParamsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnIncorrectParamsTest.java @@ -33,12 +33,16 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_TX_STARTED; /** * Tests transaction rollback on incorrect tx params. */ +@RunWith(JUnit4.class) public class TxRollbackOnIncorrectParamsTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTimeoutOnePhaseCommitTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTimeoutOnePhaseCommitTest.java index 3298b10cefa52..78c40cfe1358c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTimeoutOnePhaseCommitTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTimeoutOnePhaseCommitTest.java @@ -37,6 +37,9 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionTimeoutException; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -48,6 +51,7 @@ /** * Tests rollback on timeout scenarios for one-phase commit protocol. */ +@RunWith(JUnit4.class) public class TxRollbackOnTimeoutOnePhaseCommitTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryVmIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTimeoutTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTimeoutTest.java index c1c2d7b209c86..f9d9c0e1e7d5f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTimeoutTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTimeoutTest.java @@ -64,6 +64,9 @@ import org.apache.ignite.transactions.TransactionDeadlockException; import org.apache.ignite.transactions.TransactionIsolation; import org.apache.ignite.transactions.TransactionTimeoutException; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.lang.Thread.sleep; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -78,6 +81,7 @@ /** * Tests an ability to eagerly rollback timed out transactions. */ +@RunWith(JUnit4.class) public class TxRollbackOnTimeoutTest extends GridCommonAbstractTest { /** */ private static final long DURATION = SF.apply(60 * 1000); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTopologyChangeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTopologyChangeTest.java index 69dc4644861db..929b92a73ea98 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTopologyChangeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTopologyChangeTest.java @@ -36,6 +36,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.lang.Thread.yield; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -46,6 +49,7 @@ /** * Tests an ability to rollback transactions on topology change. */ +@RunWith(JUnit4.class) public class TxRollbackOnTopologyChangeTest extends GridCommonAbstractTest { /** */ public static final int ROLLBACK_TIMEOUT = 500; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxStateChangeEventTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxStateChangeEventTest.java index 41f0d3d8fa480..c09569b149a60 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxStateChangeEventTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxStateChangeEventTest.java @@ -34,6 +34,9 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.apache.ignite.transactions.TransactionState; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVTS_TX; import static org.apache.ignite.events.EventType.EVT_TX_COMMITTED; @@ -45,6 +48,7 @@ /** * Tests transaction state change event. */ +@RunWith(JUnit4.class) public class TxStateChangeEventTest extends GridCommonAbstractTest { /** Label. */ private final String lb = "testLabel"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxWithSmallTimeoutAndContentionOneKeyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxWithSmallTimeoutAndContentionOneKeyTest.java index cc39805def78b..048871f699640 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxWithSmallTimeoutAndContentionOneKeyTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxWithSmallTimeoutAndContentionOneKeyTest.java @@ -44,6 +44,9 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.testframework.GridTestUtils.runAsync; import static org.apache.ignite.testframework.GridTestUtils.runMultiThreadedAsync; @@ -56,6 +59,7 @@ /** * */ +@RunWith(JUnit4.class) public class TxWithSmallTimeoutAndContentionOneKeyTest extends GridCommonAbstractTest { /** */ public static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); From 3eadd0abf6f58a0a3d8fe8464bb08879d412bca1 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Mon, 3 Dec 2018 16:33:00 +0300 Subject: [PATCH 015/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview --- .../processors/cache/IgniteCacheTxNearPeekModesTest.java | 5 +++++ .../processors/cache/IgniteCacheTxPeekModesTest.java | 4 ++++ .../processors/cache/IgniteCacheTxPreloadNoWriteTest.java | 4 ++++ .../processors/cache/IgniteCachingProviderSelfTest.java | 4 ++++ .../cache/IgniteClientAffinityAssignmentSelfTest.java | 4 ++++ .../cache/IgniteClientCacheInitializationFailTest.java | 4 ++++ .../processors/cache/IgniteClientCacheStartFailoverTest.java | 4 ++++ .../cache/IgniteClusterActivateDeactivateTest.java | 4 ++++ .../IgniteClusterActivateDeactivateTestWithPersistence.java | 4 ++++ .../cache/IgniteDaemonNodeMarshallerCacheTest.java | 4 ++++ .../processors/cache/IgniteDynamicCacheAndNodeStop.java | 4 ++++ .../processors/cache/IgniteDynamicCacheFilterTest.java | 4 ++++ .../processors/cache/IgniteDynamicCacheMultinodeTest.java | 4 ++++ .../IgniteDynamicCacheStartCoordinatorFailoverTest.java | 4 ++++ .../cache/IgniteDynamicCacheStartNoExchangeTimeoutTest.java | 4 ++++ .../processors/cache/IgniteDynamicCacheStartSelfTest.java | 4 ++++ .../cache/IgniteDynamicCacheStartStopConcurrentTest.java | 4 ++++ .../cache/IgniteDynamicCacheWithConfigStartSelfTest.java | 4 ++++ .../cache/IgniteDynamicClientCacheStartSelfTest.java | 4 ++++ .../processors/cache/IgniteExchangeFutureHistoryTest.java | 4 ++++ .../cache/IgniteGetNonPlainKeyReadThroughSelfTest.java | 4 ++++ .../cache/IgniteIncompleteCacheObjectSelfTest.java | 4 ++++ .../processors/cache/IgniteInternalCacheTypesTest.java | 4 ++++ .../cache/IgniteMarshallerCacheClassNameConflictTest.java | 4 ++++ ...IgniteMarshallerCacheClientRequestsMappingOnMissTest.java | 4 ++++ .../cache/IgniteMarshallerCacheConcurrentReadWriteTest.java | 4 ++++ .../processors/cache/IgniteMarshallerCacheFSRestoreTest.java | 4 ++++ .../cache/IgniteMvccTxMultiThreadedAbstractTest.java | 4 ++++ .../cache/IgniteMvccTxSingleThreadedAbstractTest.java | 4 ++++ .../processors/cache/IgniteNearClientCacheCloseTest.java | 4 ++++ .../processors/cache/IgniteOnePhaseCommitInvokeTest.java | 4 ++++ .../cache/IgniteOnePhaseCommitNearReadersTest.java | 4 ++++ .../processors/cache/IgniteOnePhaseCommitNearSelfTest.java | 4 ++++ .../processors/cache/IgniteOutOfMemoryPropagationTest.java | 4 ++++ .../processors/cache/IgnitePutAllLargeBatchSelfTest.java | 4 ++++ .../IgnitePutAllUpdateNonPreloadedPartitionSelfTest.java | 4 ++++ .../cache/IgniteStartCacheInTransactionSelfTest.java | 4 ++++ .../processors/cache/IgniteStaticCacheStartSelfTest.java | 4 ++++ .../processors/cache/IgniteSystemCacheOnClientTest.java | 4 ++++ .../cache/IgniteTopologyValidatorAbstractCacheTest.java | 4 ++++ .../IgniteTopologyValidatorAbstractTxCacheGroupsTest.java | 4 ++++ .../cache/IgniteTopologyValidatorAbstractTxCacheTest.java | 4 ++++ .../IgniteTopologyValidatorCacheGroupsAbstractTest.java | 4 ++++ .../cache/IgniteTopologyValidatorGridSplitCacheTest.java | 4 ++++ .../processors/cache/IgniteTxConcurrentGetAbstractTest.java | 4 ++++ .../processors/cache/IgniteTxConfigCacheSelfTest.java | 4 ++++ .../processors/cache/IgniteTxExceptionAbstractSelfTest.java | 4 ++++ .../processors/cache/IgniteTxMultiNodeAbstractTest.java | 4 ++++ .../processors/cache/IgniteTxMultiThreadedAbstractTest.java | 4 ++++ .../processors/cache/IgniteTxReentryAbstractSelfTest.java | 4 ++++ .../processors/cache/IgniteTxSingleThreadedAbstractTest.java | 4 ++++ .../cache/IgniteTxStoreExceptionAbstractSelfTest.java | 4 ++++ .../cache/InterceptorCacheConfigVariationsFullApiTest.java | 4 ++++ .../cache/MarshallerCacheJobRunNodeRestartTest.java | 4 ++++ .../processors/cache/MemoryPolicyConfigValidationTest.java | 4 ++++ .../cache/NonAffinityCoordinatorDynamicStartStopTest.java | 4 ++++ .../cache/OffheapCacheMetricsForClusterGroupSelfTest.java | 4 ++++ .../cache/PartitionsExchangeCoordinatorFailoverTest.java | 4 ++++ .../PartitionsExchangeOnDiscoveryHistoryOverflowTest.java | 4 ++++ .../cache/SetTxTimeoutOnPartitionMapExchangeTest.java | 4 ++++ .../processors/cache/WalModeChangeAbstractSelfTest.java | 4 ++++ .../processors/cache/WalModeChangeAdvancedSelfTest.java | 4 ++++ .../processors/cache/WithKeepBinaryCacheFullApiTest.java | 4 ++++ 63 files changed, 253 insertions(+) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxNearPeekModesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxNearPeekModesTest.java index 9af02a6376fd8..047358bf9e54a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxNearPeekModesTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxNearPeekModesTest.java @@ -17,9 +17,14 @@ package org.apache.ignite.internal.processors.cache; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + /** * Tests peek modes with near tx cache. */ +@RunWith(JUnit4.class) public class IgniteCacheTxNearPeekModesTest extends IgniteCacheTxPeekModesTest { /** {@inheritDoc} */ @Override protected boolean hasNearCache() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxPeekModesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxPeekModesTest.java index ccf3ce0b46cd6..c648cad5ec126 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxPeekModesTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxPeekModesTest.java @@ -19,6 +19,9 @@ import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.cache.CacheMode; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -26,6 +29,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheTxPeekModesTest extends IgniteCachePeekModesAbstractTest { /** {@inheritDoc} */ @Override protected int gridCount() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxPreloadNoWriteTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxPreloadNoWriteTest.java index b73ed7cf1a866..44034e18ae93a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxPreloadNoWriteTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxPreloadNoWriteTest.java @@ -30,6 +30,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -41,6 +44,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheTxPreloadNoWriteTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachingProviderSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachingProviderSelfTest.java index 564ac296f0db5..67f16b0d8d2da 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachingProviderSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachingProviderSelfTest.java @@ -28,10 +28,14 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.configuration.NearCacheConfiguration; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteCachingProviderSelfTest extends IgniteCacheAbstractTest { /** {@inheritDoc} */ @Override protected int gridCount() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientAffinityAssignmentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientAffinityAssignmentSelfTest.java index 12c80e3fa34ca..8f0199dffbdb4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientAffinityAssignmentSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientAffinityAssignmentSelfTest.java @@ -33,10 +33,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests affinity assignment for different affinity types. */ +@RunWith(JUnit4.class) public class IgniteClientAffinityAssignmentSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientCacheInitializationFailTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientCacheInitializationFailTest.java index b18c283328b4a..d4d6474ded7bf 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientCacheInitializationFailTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientCacheInitializationFailTest.java @@ -63,11 +63,15 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test checks whether cache initialization error on client side * doesn't causes hangs and doesn't impact other caches. */ +@RunWith(JUnit4.class) public class IgniteClientCacheInitializationFailTest extends GridCommonAbstractTest { /** Failed cache name. */ private static final String CACHE_NAME = "cache"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientCacheStartFailoverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientCacheStartFailoverTest.java index ea7d6f32ea76f..de18c442508df 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientCacheStartFailoverTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientCacheStartFailoverTest.java @@ -53,6 +53,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -62,6 +65,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteClientCacheStartFailoverTest extends GridCommonAbstractTest { /** */ protected static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClusterActivateDeactivateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClusterActivateDeactivateTest.java index 8f1df3d295e64..2a46918344adc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClusterActivateDeactivateTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClusterActivateDeactivateTest.java @@ -55,6 +55,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -63,6 +66,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteClusterActivateDeactivateTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClusterActivateDeactivateTestWithPersistence.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClusterActivateDeactivateTestWithPersistence.java index 723658ef0536f..292a66701d7e7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClusterActivateDeactivateTestWithPersistence.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClusterActivateDeactivateTestWithPersistence.java @@ -41,10 +41,14 @@ import org.apache.ignite.internal.util.typedef.internal.CU; import org.apache.ignite.testframework.GridTestUtils; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteClusterActivateDeactivateTestWithPersistence extends IgniteClusterActivateDeactivateTest { /** {@inheritDoc} */ @Override protected boolean persistenceEnabled() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDaemonNodeMarshallerCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDaemonNodeMarshallerCacheTest.java index a8679801bb8ad..f0647247a58ba 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDaemonNodeMarshallerCacheTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDaemonNodeMarshallerCacheTest.java @@ -28,6 +28,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.REPLICATED; import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; @@ -36,6 +39,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteDaemonNodeMarshallerCacheTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheAndNodeStop.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheAndNodeStop.java index 0ad765daa36b4..ec78c5e0a7f89 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheAndNodeStop.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheAndNodeStop.java @@ -27,10 +27,14 @@ import org.apache.ignite.testframework.junits.common.*; import java.util.concurrent.*; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteDynamicCacheAndNodeStop extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheFilterTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheFilterTest.java index db75f2cfe7bed..e742abf2ef4b2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheFilterTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheFilterTest.java @@ -29,6 +29,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.REPLICATED; import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; @@ -37,6 +40,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteDynamicCacheFilterTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheMultinodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheMultinodeTest.java index bde0838d4a880..1a3782147e03c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheMultinodeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheMultinodeTest.java @@ -31,6 +31,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -38,6 +41,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteDynamicCacheMultinodeTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartCoordinatorFailoverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartCoordinatorFailoverTest.java index 50cb03926f247..586506c1ebc8b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartCoordinatorFailoverTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartCoordinatorFailoverTest.java @@ -45,7 +45,11 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; +@RunWith(JUnit4.class) public class IgniteDynamicCacheStartCoordinatorFailoverTest extends GridCommonAbstractTest { /** Default IP finder for single-JVM cloud grid. */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartNoExchangeTimeoutTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartNoExchangeTimeoutTest.java index 8f28a3364ba88..66ab92d6b2744 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartNoExchangeTimeoutTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartNoExchangeTimeoutTest.java @@ -42,6 +42,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -50,6 +53,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteDynamicCacheStartNoExchangeTimeoutTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java index 281c986078bef..bdcd5b3cf985d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java @@ -54,11 +54,15 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for dynamic cache start. */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartStopConcurrentTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartStopConcurrentTest.java index 60322d009f594..9988b728fb3a4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartStopConcurrentTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartStopConcurrentTest.java @@ -29,10 +29,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteDynamicCacheStartStopConcurrentTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheWithConfigStartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheWithConfigStartSelfTest.java index ce6a72127ae61..86a852c347772 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheWithConfigStartSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheWithConfigStartSelfTest.java @@ -24,10 +24,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteDynamicCacheWithConfigStartSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicClientCacheStartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicClientCacheStartSelfTest.java index b7b12ca8ee68c..495752c723b2a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicClientCacheStartSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicClientCacheStartSelfTest.java @@ -43,6 +43,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.*; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -52,6 +55,7 @@ /** * Tests that cache specified in configuration start on client nodes. */ +@RunWith(JUnit4.class) public class IgniteDynamicClientCacheStartSelfTest extends GridCommonAbstractTest { /** */ protected static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteExchangeFutureHistoryTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteExchangeFutureHistoryTest.java index e4dbc4a823bb2..7e5e17848e713 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteExchangeFutureHistoryTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteExchangeFutureHistoryTest.java @@ -25,10 +25,14 @@ import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.internal.IgniteKernal; import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Checks that top value at {@link GridCachePartitionExchangeManager#exchangeFutures()} is the newest one. */ +@RunWith(JUnit4.class) public class IgniteExchangeFutureHistoryTest extends IgniteCacheAbstractTest { /** {@inheritDoc} */ @Override protected int gridCount() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteGetNonPlainKeyReadThroughSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteGetNonPlainKeyReadThroughSelfTest.java index b05aed48f6239..e6202de6f8684 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteGetNonPlainKeyReadThroughSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteGetNonPlainKeyReadThroughSelfTest.java @@ -35,10 +35,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests read through for non-{@link BinaryUtils#BINARY_CLS} keys. */ +@RunWith(JUnit4.class) public class IgniteGetNonPlainKeyReadThroughSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteIncompleteCacheObjectSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteIncompleteCacheObjectSelfTest.java index 442ca48fd7a95..cdfb8a359613c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteIncompleteCacheObjectSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteIncompleteCacheObjectSelfTest.java @@ -26,10 +26,14 @@ import java.nio.ByteBuffer; import java.util.concurrent.ThreadLocalRandom; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Simple test for arbitrary CacheObject reading/writing. */ +@RunWith(JUnit4.class) public class IgniteIncompleteCacheObjectSelfTest extends GridCommonAbstractTest { /** * Test case when requested data cut on cache object header. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteInternalCacheTypesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteInternalCacheTypesTest.java index eb917886457d7..f07020cf86b8b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteInternalCacheTypesTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteInternalCacheTypesTest.java @@ -28,6 +28,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.managers.communication.GridIoPolicy.SYSTEM_POOL; import static org.apache.ignite.internal.managers.communication.GridIoPolicy.UTILITY_CACHE_POOL; @@ -35,6 +38,7 @@ /** * Sanity test for cache types. */ +@RunWith(JUnit4.class) public class IgniteInternalCacheTypesTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheClassNameConflictTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheClassNameConflictTest.java index 97689d3d08b5b..56fd4d3cb6f4f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheClassNameConflictTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheClassNameConflictTest.java @@ -40,6 +40,9 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.REPLICATED; import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; @@ -53,6 +56,7 @@ * and {@link org.apache.ignite.internal.processors.marshaller.MappingProposedMessage} is sent * with not-null conflictingClsName field. */ +@RunWith(JUnit4.class) public class IgniteMarshallerCacheClassNameConflictTest extends GridCommonAbstractTest { /** */ private volatile boolean bbClsRejected; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheClientRequestsMappingOnMissTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheClientRequestsMappingOnMissTest.java index 8bf129146a0af..da287a7020515 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheClientRequestsMappingOnMissTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheClientRequestsMappingOnMissTest.java @@ -41,6 +41,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.REPLICATED; import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; @@ -49,6 +52,7 @@ /** * Tests for client requesting missing mappings from server nodes with and without server nodes failures. */ +@RunWith(JUnit4.class) public class IgniteMarshallerCacheClientRequestsMappingOnMissTest extends GridCommonAbstractTest { /** * Need to point client node to a different working directory diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheConcurrentReadWriteTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheConcurrentReadWriteTest.java index 8afaa0377b2bc..ca0b8b18488ab 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheConcurrentReadWriteTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheConcurrentReadWriteTest.java @@ -32,6 +32,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.REPLICATED; import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; @@ -40,6 +43,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteMarshallerCacheConcurrentReadWriteTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheFSRestoreTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheFSRestoreTest.java index cd407694e4036..15560d32e9b72 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheFSRestoreTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheFSRestoreTest.java @@ -44,10 +44,14 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteMarshallerCacheFSRestoreTest extends GridCommonAbstractTest { /** */ private volatile boolean isDuplicateObserved = true; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMvccTxMultiThreadedAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMvccTxMultiThreadedAbstractTest.java index 13c6c5e0ad2d0..6eb59d15b59a8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMvccTxMultiThreadedAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMvccTxMultiThreadedAbstractTest.java @@ -25,6 +25,9 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ; @@ -32,6 +35,7 @@ /** * Tests for local transactions. */ +@RunWith(JUnit4.class) public abstract class IgniteMvccTxMultiThreadedAbstractTest extends IgniteTxAbstractTest { /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMvccTxSingleThreadedAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMvccTxSingleThreadedAbstractTest.java index eef8d6aeafe0b..51e96e120ee75 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMvccTxSingleThreadedAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMvccTxSingleThreadedAbstractTest.java @@ -18,6 +18,9 @@ package org.apache.ignite.internal.processors.cache; import org.apache.ignite.IgniteCheckedException; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ; @@ -25,6 +28,7 @@ /** * Tests for local transactions. */ +@RunWith(JUnit4.class) public abstract class IgniteMvccTxSingleThreadedAbstractTest extends IgniteTxAbstractTest { /** * @throws IgniteCheckedException If test failed. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteNearClientCacheCloseTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteNearClientCacheCloseTest.java index beac7de0183ed..0bc91836da411 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteNearClientCacheCloseTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteNearClientCacheCloseTest.java @@ -39,6 +39,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -48,6 +51,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteNearClientCacheCloseTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteOnePhaseCommitInvokeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteOnePhaseCommitInvokeTest.java index ddd1d83c249ff..e5345676fd88c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteOnePhaseCommitInvokeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteOnePhaseCommitInvokeTest.java @@ -37,6 +37,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheRebalanceMode.ASYNC; @@ -45,6 +48,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteOnePhaseCommitInvokeTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteOnePhaseCommitNearReadersTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteOnePhaseCommitNearReadersTest.java index 26d07076ca56d..b4e293747bd36 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteOnePhaseCommitNearReadersTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteOnePhaseCommitNearReadersTest.java @@ -35,6 +35,9 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.apache.ignite.transactions.TransactionRollbackException; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -43,6 +46,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteOnePhaseCommitNearReadersTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteOnePhaseCommitNearSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteOnePhaseCommitNearSelfTest.java index f29c27907af25..542ca53c7bddd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteOnePhaseCommitNearSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteOnePhaseCommitNearSelfTest.java @@ -40,6 +40,9 @@ import java.util.*; import java.util.concurrent.*; import java.util.concurrent.atomic.*; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.transactions.TransactionConcurrency.*; import static org.apache.ignite.transactions.TransactionIsolation.*; @@ -47,6 +50,7 @@ /** * Checks one-phase commit scenarios. */ +@RunWith(JUnit4.class) public class IgniteOnePhaseCommitNearSelfTest extends GridCommonAbstractTest { /** Grid count. */ private static final int GRID_CNT = 4; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteOutOfMemoryPropagationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteOutOfMemoryPropagationTest.java index f844170b169d0..bc988ec09bc07 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteOutOfMemoryPropagationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteOutOfMemoryPropagationTest.java @@ -37,10 +37,14 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteOutOfMemoryPropagationTest extends GridCommonAbstractTest { /** */ public static final int NODES = 3; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgnitePutAllLargeBatchSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgnitePutAllLargeBatchSelfTest.java index e1297371c6dc5..2f8d04a3762cf 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgnitePutAllLargeBatchSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgnitePutAllLargeBatchSelfTest.java @@ -34,6 +34,9 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC; @@ -42,6 +45,7 @@ /** * Tests putAll method with large number of keys. */ +@RunWith(JUnit4.class) public class IgnitePutAllLargeBatchSelfTest extends GridCommonAbstractTest { /** Grid count. */ private static final int GRID_CNT = 4; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgnitePutAllUpdateNonPreloadedPartitionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgnitePutAllUpdateNonPreloadedPartitionSelfTest.java index aff53effb8013..a462fff7a83d1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgnitePutAllUpdateNonPreloadedPartitionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgnitePutAllUpdateNonPreloadedPartitionSelfTest.java @@ -27,6 +27,9 @@ import org.apache.ignite.internal.processors.cache.distributed.near.GridNearCacheAdapter; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC; import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ; @@ -34,6 +37,7 @@ /** * Tests . */ +@RunWith(JUnit4.class) public class IgnitePutAllUpdateNonPreloadedPartitionSelfTest extends GridCommonAbstractTest { /** Grid count. */ private static final int GRID_CNT = 4; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteStartCacheInTransactionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteStartCacheInTransactionSelfTest.java index cfa3de74e8786..2bf61675c463a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteStartCacheInTransactionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteStartCacheInTransactionSelfTest.java @@ -32,6 +32,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; @@ -40,6 +43,7 @@ /** * Check starting cache in transaction. */ +@RunWith(JUnit4.class) public class IgniteStartCacheInTransactionSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteStaticCacheStartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteStaticCacheStartSelfTest.java index b2e8df80ee7fd..75a924e89fa56 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteStaticCacheStartSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteStaticCacheStartSelfTest.java @@ -25,10 +25,14 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests cache deploy on topology from static configuration. */ +@RunWith(JUnit4.class) public class IgniteStaticCacheStartSelfTest extends GridCommonAbstractTest { /** */ private static final String CACHE_NAME = "TestCache"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteSystemCacheOnClientTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteSystemCacheOnClientTest.java index 70c866a6bdf8f..133398354f396 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteSystemCacheOnClientTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteSystemCacheOnClientTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteSystemCacheOnClientTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorAbstractCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorAbstractCacheTest.java index e8bd55770c422..b264da366b017 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorAbstractCacheTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorAbstractCacheTest.java @@ -31,10 +31,14 @@ import org.apache.ignite.configuration.TopologyValidator; import org.apache.ignite.internal.util.typedef.G; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Topology validator test. */ +@RunWith(JUnit4.class) public abstract class IgniteTopologyValidatorAbstractCacheTest extends IgniteCacheAbstractTest implements Serializable { /** key-value used at test. */ private static String KEY_VAL = "1"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorAbstractTxCacheGroupsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorAbstractTxCacheGroupsTest.java index 73e297660ac3f..52110a836d2e7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorAbstractTxCacheGroupsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorAbstractTxCacheGroupsTest.java @@ -20,6 +20,9 @@ import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC; @@ -29,6 +32,7 @@ /** * Topology validator test */ +@RunWith(JUnit4.class) public abstract class IgniteTopologyValidatorAbstractTxCacheGroupsTest extends IgniteTopologyValidatorCacheGroupsAbstractTest { /** {@inheritDoc} */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorAbstractTxCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorAbstractTxCacheTest.java index adaa64b1c607f..d543aec948e34 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorAbstractTxCacheTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorAbstractTxCacheTest.java @@ -20,6 +20,9 @@ import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC; @@ -29,6 +32,7 @@ /** * Topology validator test */ +@RunWith(JUnit4.class) public abstract class IgniteTopologyValidatorAbstractTxCacheTest extends IgniteTopologyValidatorAbstractCacheTest { /** {@inheritDoc} */ @Override protected CacheAtomicityMode atomicityMode() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorCacheGroupsAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorCacheGroupsAbstractTest.java index 7879f912fc4a3..7315db7b98ffd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorCacheGroupsAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorCacheGroupsAbstractTest.java @@ -23,10 +23,14 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.configuration.TopologyValidator; import org.apache.ignite.internal.util.typedef.F; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public abstract class IgniteTopologyValidatorCacheGroupsAbstractTest extends IgniteTopologyValidatorAbstractCacheTest { /** group name 1. */ protected static final String GROUP_1 = "group1"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorGridSplitCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorGridSplitCacheTest.java index 7eef27642c9ef..aeba64cf978fc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorGridSplitCacheTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorGridSplitCacheTest.java @@ -42,6 +42,9 @@ import org.apache.ignite.resources.LoggerResource; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.PRIMARY_SYNC; @@ -52,6 +55,7 @@ * #DC_NODE_ATTR}. If only nodes from single DC are left in topology, grid is moved into inoperative state until special * activator node'll enter a topology, enabling grid operations. */ +@RunWith(JUnit4.class) public class IgniteTopologyValidatorGridSplitCacheTest extends IgniteCacheTopologySplitAbstractTest { /** */ private static final String DC_NODE_ATTR = "dc"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxConcurrentGetAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxConcurrentGetAbstractTest.java index 6b1e623637cee..24ad582ed4103 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxConcurrentGetAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxConcurrentGetAbstractTest.java @@ -29,6 +29,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ; @@ -36,6 +39,7 @@ /** * Checks multithreaded put/get cache operations on one node. */ +@RunWith(JUnit4.class) public abstract class IgniteTxConcurrentGetAbstractTest extends GridCommonAbstractTest { /** Debug flag. */ private static final boolean DEBUG = false; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxConfigCacheSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxConfigCacheSelfTest.java index 2582edcb74c48..a1a7387be0d61 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxConfigCacheSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxConfigCacheSelfTest.java @@ -47,6 +47,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionTimeoutException; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; @@ -55,6 +58,7 @@ /** * Test checks that grid transaction configuration doesn't influence system caches. */ +@RunWith(JUnit4.class) public class IgniteTxConfigCacheSelfTest extends GridCommonAbstractTest { /** Ip finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxExceptionAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxExceptionAbstractSelfTest.java index ad28b7d08eb31..63cb2ae272917 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxExceptionAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxExceptionAbstractSelfTest.java @@ -46,6 +46,9 @@ import org.apache.ignite.transactions.TransactionHeuristicException; import org.apache.ignite.transactions.TransactionIsolation; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.LOCAL; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -53,6 +56,7 @@ /** * Tests that transaction is invalidated in case of {@link IgniteTxHeuristicCheckedException}. */ +@RunWith(JUnit4.class) public abstract class IgniteTxExceptionAbstractSelfTest extends GridCacheAbstractSelfTest { /** */ private static final int PRIMARY = 0; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiNodeAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiNodeAbstractTest.java index 1e81e4e16c742..a4423a7797ce0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiNodeAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiNodeAbstractTest.java @@ -50,6 +50,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ; @@ -58,6 +61,7 @@ /** * Checks basic multi-node transactional operations. */ +@RunWith(JUnit4.class) public abstract class IgniteTxMultiNodeAbstractTest extends GridCommonAbstractTest { /** Debug flag. */ private static final boolean DEBUG = false; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiThreadedAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiThreadedAbstractTest.java index 482cb8ba80d93..1ce99ce1683ec 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiThreadedAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiThreadedAbstractTest.java @@ -34,6 +34,9 @@ import org.apache.ignite.transactions.TransactionIsolation; import org.apache.ignite.transactions.TransactionOptimisticException; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; @@ -44,6 +47,7 @@ /** * Tests for local transactions. */ +@RunWith(JUnit4.class) public abstract class IgniteTxMultiThreadedAbstractTest extends IgniteTxAbstractTest { /** * @return Thread count. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxReentryAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxReentryAbstractSelfTest.java index 32e721aa68d41..5cb13289fb5dd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxReentryAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxReentryAbstractSelfTest.java @@ -39,6 +39,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; @@ -47,6 +50,7 @@ /** * Tests reentry in pessimistic repeatable read tx. */ +@RunWith(JUnit4.class) public abstract class IgniteTxReentryAbstractSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxSingleThreadedAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxSingleThreadedAbstractTest.java index c49be2bafbb71..72ccb7b66d9f0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxSingleThreadedAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxSingleThreadedAbstractTest.java @@ -18,6 +18,9 @@ package org.apache.ignite.internal.processors.cache; import org.apache.ignite.IgniteCheckedException; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; @@ -28,6 +31,7 @@ /** * Tests for local transactions. */ +@RunWith(JUnit4.class) public abstract class IgniteTxSingleThreadedAbstractTest extends IgniteTxAbstractTest { /** * @throws IgniteCheckedException If test failed. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxStoreExceptionAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxStoreExceptionAbstractSelfTest.java index ca00907f3ee45..13ded6c4f29ec 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxStoreExceptionAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxStoreExceptionAbstractSelfTest.java @@ -42,6 +42,9 @@ import org.apache.ignite.transactions.TransactionIsolation; import org.apache.ignite.transactions.TransactionRollbackException; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.LOCAL; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -49,6 +52,7 @@ /** * Tests that transaction is invalidated in case of {@link IgniteTxHeuristicCheckedException}. */ +@RunWith(JUnit4.class) public abstract class IgniteTxStoreExceptionAbstractSelfTest extends GridCacheAbstractSelfTest { /** Index SPI throwing exception. */ private static TestStore store; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/InterceptorCacheConfigVariationsFullApiTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/InterceptorCacheConfigVariationsFullApiTest.java index 2eab9cda3a020..52f38dd3cf18c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/InterceptorCacheConfigVariationsFullApiTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/InterceptorCacheConfigVariationsFullApiTest.java @@ -23,11 +23,15 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.lang.IgniteBiTuple; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Full API cache test. */ @SuppressWarnings({"unchecked"}) +@RunWith(JUnit4.class) public class InterceptorCacheConfigVariationsFullApiTest extends IgniteCacheConfigVariationsFullApiTest { /** */ private static volatile boolean validate = true; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/MarshallerCacheJobRunNodeRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/MarshallerCacheJobRunNodeRestartTest.java index 8b2ee9ae823e9..688b3bc44dc89 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/MarshallerCacheJobRunNodeRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/MarshallerCacheJobRunNodeRestartTest.java @@ -30,10 +30,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class MarshallerCacheJobRunNodeRestartTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/MemoryPolicyConfigValidationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/MemoryPolicyConfigValidationTest.java index 1077e88730898..c73f6d6299d7f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/MemoryPolicyConfigValidationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/MemoryPolicyConfigValidationTest.java @@ -21,10 +21,14 @@ import org.apache.ignite.configuration.MemoryConfiguration; import org.apache.ignite.configuration.MemoryPolicyConfiguration; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class MemoryPolicyConfigValidationTest extends GridCommonAbstractTest { /** */ private static final String VALID_DEFAULT_MEM_PLC_NAME = "valid_dlft_mem_plc"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/NonAffinityCoordinatorDynamicStartStopTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/NonAffinityCoordinatorDynamicStartStopTest.java index 175193ff1ac9d..a94a3e75d0dd2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/NonAffinityCoordinatorDynamicStartStopTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/NonAffinityCoordinatorDynamicStartStopTest.java @@ -31,10 +31,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class NonAffinityCoordinatorDynamicStartStopTest extends GridCommonAbstractTest { /** Ip finder. */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/OffheapCacheMetricsForClusterGroupSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/OffheapCacheMetricsForClusterGroupSelfTest.java index 398cf7908714e..fd9729e8fdd29 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/OffheapCacheMetricsForClusterGroupSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/OffheapCacheMetricsForClusterGroupSelfTest.java @@ -25,12 +25,16 @@ import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import java.util.concurrent.CountDownLatch; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_NODE_METRICS_UPDATED; /** * Test for cluster wide offheap cache metrics. */ +@RunWith(JUnit4.class) public class OffheapCacheMetricsForClusterGroupSelfTest extends GridCommonAbstractTest { /** Grid count. */ private static final int GRID_CNT = 3; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/PartitionsExchangeCoordinatorFailoverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/PartitionsExchangeCoordinatorFailoverTest.java index 4ab6d93dff949..a001bd43466e5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/PartitionsExchangeCoordinatorFailoverTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/PartitionsExchangeCoordinatorFailoverTest.java @@ -35,10 +35,14 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Advanced coordinator failure scenarios during PME. */ +@RunWith(JUnit4.class) public class PartitionsExchangeCoordinatorFailoverTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/PartitionsExchangeOnDiscoveryHistoryOverflowTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/PartitionsExchangeOnDiscoveryHistoryOverflowTest.java index b328672384e76..1a3909091e6dd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/PartitionsExchangeOnDiscoveryHistoryOverflowTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/PartitionsExchangeOnDiscoveryHistoryOverflowTest.java @@ -32,6 +32,9 @@ import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.testframework.GridTestUtils; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_DISCOVERY_HISTORY_SIZE; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; @@ -44,6 +47,7 @@ /** * Test discovery history overflow. */ +@RunWith(JUnit4.class) public class PartitionsExchangeOnDiscoveryHistoryOverflowTest extends IgniteCacheAbstractTest { /** */ private static final int CACHES_COUNT = 30; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/SetTxTimeoutOnPartitionMapExchangeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/SetTxTimeoutOnPartitionMapExchangeTest.java index 3cbdad4e6f1bd..926978c2dd5dd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/SetTxTimeoutOnPartitionMapExchangeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/SetTxTimeoutOnPartitionMapExchangeTest.java @@ -49,6 +49,9 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionRollbackException; import org.apache.ignite.transactions.TransactionTimeoutException; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.util.typedef.X.hasCause; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; @@ -57,6 +60,7 @@ /** * */ +@RunWith(JUnit4.class) public class SetTxTimeoutOnPartitionMapExchangeTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WalModeChangeAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WalModeChangeAbstractSelfTest.java index d82c99cdb6c70..865ea9076a709 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WalModeChangeAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WalModeChangeAbstractSelfTest.java @@ -27,6 +27,9 @@ import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.util.lang.IgniteInClosureX; import org.apache.ignite.internal.util.typedef.internal.U; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -38,6 +41,7 @@ * Test dynamic WAL mode change. */ +@RunWith(JUnit4.class) public abstract class WalModeChangeAbstractSelfTest extends WalModeChangeCommonAbstractSelfTest { /** Whether coordinator node should be filtered out. */ private final boolean filterOnCrd; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WalModeChangeAdvancedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WalModeChangeAdvancedSelfTest.java index 1eb1baff14da1..2ef95247b46dc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WalModeChangeAdvancedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WalModeChangeAdvancedSelfTest.java @@ -30,6 +30,9 @@ import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.GridTestUtils.SF; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -38,6 +41,7 @@ * Concurrent and advanced tests for WAL state change. */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class WalModeChangeAdvancedSelfTest extends WalModeChangeCommonAbstractSelfTest { /** * Constructor. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WithKeepBinaryCacheFullApiTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WithKeepBinaryCacheFullApiTest.java index 7c03b2d4145f3..d95096232aea3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WithKeepBinaryCacheFullApiTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WithKeepBinaryCacheFullApiTest.java @@ -36,6 +36,9 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.testframework.junits.IgniteConfigVariationsAbstractTest.DataMode.PLANE_OBJECT; @@ -45,6 +48,7 @@ * */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class WithKeepBinaryCacheFullApiTest extends IgniteCacheConfigVariationsAbstractTest { /** */ protected static volatile boolean interceptorBinaryObjExp = true; From 28d9f854993cb99867803cfe0126cf723e071cc5 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Mon, 3 Dec 2018 16:54:52 +0300 Subject: [PATCH 016/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview --- .../GridClosureProcessorRemoteTest.java | 4 + .../closure/GridClosureProcessorSelfTest.java | 4 + .../closure/GridClosureSerializationTest.java | 4 + .../cluster/GridAddressResolverSelfTest.java | 4 + .../cluster/GridUpdateNotifierSelfTest.java | 4 + ...mputeJobExecutionErrorToLogManualTest.java | 4 + ...iteComputeConfigVariationsFullApiTest.java | 112 +++++++----------- ...teCustomExecutorConfigurationSelfTest.java | 4 + .../IgniteComputeCustomExecutorSelfTest.java | 4 + .../PublicThreadpoolStarvationTest.java | 4 + .../continuous/GridEventConsumeSelfTest.java | 4 + .../continuous/GridMessageListenSelfTest.java | 4 + .../IgniteNoCustomEventsOnNodeStart.java | 4 + .../database/BPlusTreeSelfTest.java | 4 + .../database/CacheFreeListImplSelfTest.java | 4 + .../database/DataRegionMetricsSelfTest.java | 4 + .../IgniteDbDynamicCacheSelfTest.java | 4 + .../IgniteDbMemoryLeakAbstractTest.java | 4 + .../database/IgniteDbPutGetAbstractTest.java | 4 + .../IgniteDbPutGetWithCacheStoreTest.java | 4 + .../IgniteDbSingleNodeTinyPutGetTest.java | 4 + .../database/IndexStorageSelfTest.java | 4 + .../SwapPathConstructionSelfTest.java | 4 + .../DataStreamProcessorMvccSelfTest.java | 4 + .../DataStreamProcessorSelfTest.java | 4 + ...lientReconnectAfterClusterRestartTest.java | 4 + .../DataStreamerImplSelfTest.java | 4 + .../DataStreamerMultiThreadedSelfTest.java | 4 + .../DataStreamerMultinodeCreateCacheTest.java | 4 + .../datastreamer/DataStreamerTimeoutTest.java | 4 + .../DataStreamerUpdateAfterLoadTest.java | 4 + .../IgniteDataStreamerPerformanceTest.java | 4 + 32 files changed, 164 insertions(+), 72 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureProcessorRemoteTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureProcessorRemoteTest.java index 73f1dba63eb7f..682d2e5a88511 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureProcessorRemoteTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureProcessorRemoteTest.java @@ -31,11 +31,15 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests execution of anonymous closures on remote nodes. */ @GridCommonTest(group = "Closure Processor") +@RunWith(JUnit4.class) public class GridClosureProcessorRemoteTest extends GridCommonAbstractTest { /** Number of grids started for tests. Should not be less than 2. */ public static final int NODES_CNT = 2; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureProcessorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureProcessorSelfTest.java index b6d4dd0dfa3a9..45289b61e1459 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureProcessorSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureProcessorSelfTest.java @@ -48,11 +48,15 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for {@link GridClosureProcessor}. */ @GridCommonTest(group = "Closure Processor") +@RunWith(JUnit4.class) public class GridClosureProcessorSelfTest extends GridCommonAbstractTest { /** Number of grids started for tests. Should not be less than 2. */ private static final int NODES_CNT = 2; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureSerializationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureSerializationTest.java index 701902afae4a0..84970d0fd5ca5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureSerializationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureSerializationTest.java @@ -31,10 +31,14 @@ import org.apache.ignite.resources.JobContextResource; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests handling of job result serialization error. */ +@RunWith(JUnit4.class) public class GridClosureSerializationTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(final String igniteInstanceName) throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cluster/GridAddressResolverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cluster/GridAddressResolverSelfTest.java index 9dc0958d345ee..d29f062b0be93 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cluster/GridAddressResolverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cluster/GridAddressResolverSelfTest.java @@ -30,11 +30,15 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Address Resolver test. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridAddressResolverSelfTest extends GridCommonAbstractTest { /** */ private final InetSocketAddress addr0 = new InetSocketAddress("test0.com", 5000); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cluster/GridUpdateNotifierSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cluster/GridUpdateNotifierSelfTest.java index 846c8eeb04847..c73dd27025a18 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cluster/GridUpdateNotifierSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cluster/GridUpdateNotifierSelfTest.java @@ -24,12 +24,16 @@ import org.apache.ignite.lang.IgniteProductVersion; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.mockito.Mockito; /** * Update notifier test. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridUpdateNotifierSelfTest extends GridCommonAbstractTest { /** */ private String updateStatusParams; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/GridComputeJobExecutionErrorToLogManualTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/GridComputeJobExecutionErrorToLogManualTest.java index 3935dfe330f20..5afb0e2b946cb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/GridComputeJobExecutionErrorToLogManualTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/GridComputeJobExecutionErrorToLogManualTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Manual test to reproduce IGNITE-4053 */ +@RunWith(JUnit4.class) public class GridComputeJobExecutionErrorToLogManualTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/IgniteComputeConfigVariationsFullApiTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/IgniteComputeConfigVariationsFullApiTest.java index 5da51ae05cdf2..7f8d7db17b75e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/IgniteComputeConfigVariationsFullApiTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/IgniteComputeConfigVariationsFullApiTest.java @@ -50,11 +50,15 @@ import org.apache.ignite.testframework.junits.IgniteConfigVariationsAbstractTest; import org.jetbrains.annotations.Nullable; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Full API compute test. */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class IgniteComputeConfigVariationsFullApiTest extends IgniteConfigVariationsAbstractTest { /** Max job count. */ private static final int MAX_JOB_COUNT = 10; @@ -180,8 +184,7 @@ protected void runTest(final Factory[] factories, final ComputeTest test) throws @Test public void testExecuteTaskClass() throws Exception { runTest(jobFactories, new ComputeTest() { - @Override @Test - public void test(Factory factory, Ignite ignite) throws Exception { + @Override public void test(Factory factory, Ignite ignite) throws Exception { // Begin with negative to check 'null' value in the test. final int[] i = {-1}; @@ -232,8 +235,7 @@ public void test(Factory factory, Ignite ignite) throws Exception { @Test public void testExecuteTask() throws Exception { runTest(jobFactories, new ComputeTest() { - @Override @Test - public void test(Factory factory, Ignite ignite) throws Exception { + @Override public void test(Factory factory, Ignite ignite) throws Exception { // Begin with negative to check 'null' value in the test. final int[] i = {-1}; @@ -257,8 +259,7 @@ public void test(Factory factory, Ignite ignite) throws Exception { @Test public void testExecuteTaskAsync() throws Exception { runTest(jobFactories, new ComputeTest() { - @Override @Test - public void test(Factory factory, Ignite ignite) throws Exception { + @Override public void test(Factory factory, Ignite ignite) throws Exception { // Begin with negative to check 'null' value in the test. final int[] i = {-1}; @@ -282,8 +283,7 @@ public void test(Factory factory, Ignite ignite) throws Exception { @Test public void testBroadcastClosure() throws Exception { runTest(closureFactories, new ComputeTest() { - @Override @Test - public void test(Factory factory, Ignite ignite) throws Exception { + @Override public void test(Factory factory, Ignite ignite) throws Exception { final Collection resultsAllNull = ignite.compute() .broadcast((IgniteClosure)factory.create(), null); @@ -307,8 +307,7 @@ public void test(Factory factory, Ignite ignite) throws Exception { @Test public void testBroadcastClosureAsync() throws Exception { runTest(closureFactories, new ComputeTest() { - @Override @Test - public void test(Factory factory, Ignite ignite) throws Exception { + @Override public void test(Factory factory, Ignite ignite) throws Exception { final Collection resultsAllNull = ignite.compute() .broadcast((IgniteClosure)factory.create(), null); @@ -332,8 +331,7 @@ public void test(Factory factory, Ignite ignite) throws Exception { @Test public void testBroadcastCallable() throws Exception { runTest(callableFactories, new ComputeTest() { - @Override @Test - public void test(Factory factory, Ignite ignite) throws Exception { + @Override public void test(Factory factory, Ignite ignite) throws Exception { EchoCallable job = (EchoCallable)factory.create(); job.setArg(null); @@ -363,8 +361,7 @@ public void test(Factory factory, Ignite ignite) throws Exception { @Test public void testBroadcastCallableAsync() throws Exception { runTest(callableFactories, new ComputeTest() { - @Override @Test - public void test(Factory factory, Ignite ignite) throws Exception { + @Override public void test(Factory factory, Ignite ignite) throws Exception { EchoCallable job = (EchoCallable)factory.create(); job.setArg(null); @@ -394,8 +391,7 @@ public void test(Factory factory, Ignite ignite) throws Exception { @Test public void testBroadcastRunnable() throws Exception { runTest(runnableFactories, new ComputeTest() { - @Override @Test - public void test(Factory factory, Ignite ignite) throws Exception { + @Override public void test(Factory factory, Ignite ignite) throws Exception { IgniteRunnable job = (IgniteRunnable)factory.create(); ignite.compute().broadcast(job); @@ -410,8 +406,7 @@ public void test(Factory factory, Ignite ignite) throws Exception { @Test public void testBroadcastRunnableAsync() throws Exception { runTest(runnableFactories, new ComputeTest() { - @Override @Test - public void test(Factory factory, Ignite ignite) throws Exception { + @Override public void test(Factory factory, Ignite ignite) throws Exception { IgniteRunnable job = (IgniteRunnable)factory.create(); IgniteFuture fut = ignite.compute().broadcastAsync(job); @@ -428,8 +423,7 @@ public void test(Factory factory, Ignite ignite) throws Exception { @Test public void testRun() throws Exception { runTest(runnableFactories, new ComputeTest() { - @Override @Test - public void test(Factory factory, Ignite ignite) throws Exception { + @Override public void test(Factory factory, Ignite ignite) throws Exception { IgniteRunnable job = (IgniteRunnable)factory.create(); ignite.compute().run(job); @@ -452,8 +446,7 @@ public void test(Factory factory, Ignite ignite) throws Exception { @Test public void testRunAsync() throws Exception { runTest(runnableFactories, new ComputeTest() { - @Override @Test - public void test(Factory factory, Ignite ignite) throws Exception { + @Override public void test(Factory factory, Ignite ignite) throws Exception { IgniteRunnable job = (IgniteRunnable)factory.create(); IgniteFuture fut0 = ignite.compute().runAsync(job); @@ -480,8 +473,7 @@ public void test(Factory factory, Ignite ignite) throws Exception { @Test public void testApplyAsync() throws Exception { runTest(closureFactories, new ComputeTest() { - @Override @Test - public void test(Factory factory, Ignite ignite) throws Exception { + @Override public void test(Factory factory, Ignite ignite) throws Exception { final IgniteCompute comp = ignite.compute(); Collection> futures = new ArrayList<>(MAX_JOB_COUNT); @@ -509,8 +501,7 @@ public void test(Factory factory, Ignite ignite) throws Exception { @Test public void testApply() throws Exception { runTest(closureFactories, new ComputeTest() { - @Override @Test - public void test(Factory factory, Ignite ignite) throws Exception { + @Override public void test(Factory factory, Ignite ignite) throws Exception { Collection results = new ArrayList<>(MAX_JOB_COUNT); for (int i = 0; i < MAX_JOB_COUNT; ++i) { @@ -530,8 +521,7 @@ public void test(Factory factory, Ignite ignite) throws Exception { @Test public void testApplyForCollection() throws Exception { runTest(closureFactories, new ComputeTest() { - @Override @Test - public void test(Factory factory, Ignite ignite) throws Exception { + @Override public void test(Factory factory, Ignite ignite) throws Exception { Collection params = new ArrayList<>(MAX_JOB_COUNT); for (int i = 0; i < MAX_JOB_COUNT; ++i) { @@ -557,8 +547,7 @@ public void test(Factory factory, Ignite ignite) throws Exception { @Test public void testApplyForCollectionAsync() throws Exception { runTest(closureFactories, new ComputeTest() { - @Override @Test - public void test(Factory factory, Ignite ignite) throws Exception { + @Override public void test(Factory factory, Ignite ignite) throws Exception { Collection params = new ArrayList<>(MAX_JOB_COUNT); for (int i = 0; i < MAX_JOB_COUNT; ++i) { @@ -585,8 +574,7 @@ public void test(Factory factory, Ignite ignite) throws Exception { @Test public void testApplyForCollectionWithReducer() throws Exception { runTest(closureFactories, new ComputeTest() { - @Override @Test - public void test(Factory factory, Ignite ignite) throws Exception { + @Override public void test(Factory factory, Ignite ignite) throws Exception { Collection params = new ArrayList<>(MAX_JOB_COUNT); for (int i = 0; i < MAX_JOB_COUNT; ++i) { @@ -622,8 +610,7 @@ public void test(Factory factory, Ignite ignite) throws Exception { @Test public void testApplyForCollectionWithReducerAsync() throws Exception { runTest(closureFactories, new ComputeTest() { - @Override @Test - public void test(Factory factory, Ignite ignite) throws Exception { + @Override public void test(Factory factory, Ignite ignite) throws Exception { Collection params = new ArrayList<>(MAX_JOB_COUNT); for (int i = 0; i < MAX_JOB_COUNT; ++i) { @@ -659,8 +646,7 @@ public void test(Factory factory, Ignite ignite) throws Exception { @Test public void testCallAsync() throws Exception { runTest(callableFactories, new ComputeTest() { - @Override @Test - public void test(Factory factory, Ignite ignite) throws Exception { + @Override public void test(Factory factory, Ignite ignite) throws Exception { final IgniteCompute comp = ignite.compute(); Collection> futures = new ArrayList<>(MAX_JOB_COUNT); @@ -689,8 +675,7 @@ public void test(Factory factory, Ignite ignite) throws Exception { @Test public void testCall() throws Exception { runTest(callableFactories, new ComputeTest() { - @Override @Test - public void test(Factory factory, Ignite ignite) throws Exception { + @Override public void test(Factory factory, Ignite ignite) throws Exception { Collection results = new ArrayList<>(MAX_JOB_COUNT); for (int i = 0; i < MAX_JOB_COUNT; ++i) { @@ -711,8 +696,7 @@ public void test(Factory factory, Ignite ignite) throws Exception { @Test public void testCallCollection() throws Exception { runTest(callableFactories, new ComputeTest() { - @Override @Test - public void test(Factory factory, Ignite ignite) throws Exception { + @Override public void test(Factory factory, Ignite ignite) throws Exception { Collection jobs = new ArrayList<>(MAX_JOB_COUNT); for (int i = 0; i < MAX_JOB_COUNT; ++i) { @@ -735,8 +719,7 @@ public void test(Factory factory, Ignite ignite) throws Exception { @Test public void testCallCollectionAsync() throws Exception { runTest(callableFactories, new ComputeTest() { - @Override @Test - public void test(Factory factory, Ignite ignite) throws Exception { + @Override public void test(Factory factory, Ignite ignite) throws Exception { Collection jobs = new ArrayList<>(MAX_JOB_COUNT); for (int i = 0; i < MAX_JOB_COUNT; ++i) { @@ -759,8 +742,7 @@ public void test(Factory factory, Ignite ignite) throws Exception { @Test public void testCallCollectionWithReducer() throws Exception { runTest(callableFactories, new ComputeTest() { - @Override @Test - public void test(Factory factory, Ignite ignite) throws Exception { + @Override public void test(Factory factory, Ignite ignite) throws Exception { Collection jobs = new ArrayList<>(MAX_JOB_COUNT); for (int i = 0; i < MAX_JOB_COUNT; ++i) { @@ -795,8 +777,7 @@ public void test(Factory factory, Ignite ignite) throws Exception { @Test public void testCallCollectionWithReducerAsync() throws Exception { runTest(callableFactories, new ComputeTest() { - @Override @Test - public void test(Factory factory, Ignite ignite) throws Exception { + @Override public void test(Factory factory, Ignite ignite) throws Exception { Collection jobs = new ArrayList<>(MAX_JOB_COUNT); for (int i = 0; i < MAX_JOB_COUNT; ++i) { @@ -831,8 +812,7 @@ public void test(Factory factory, Ignite ignite) throws Exception { @Test public void testAffinityCall() throws Exception { runTest(callableFactories, new ComputeTest() { - @Override @Test - public void test(Factory factory, Ignite ignite) throws Exception { + @Override public void test(Factory factory, Ignite ignite) throws Exception { ignite.getOrCreateCache(CACHE_NAME); final IgniteCompute comp = ignite.compute(); @@ -859,8 +839,7 @@ public void test(Factory factory, Ignite ignite) throws Exception { @Test public void testAffinityCallAsync() throws Exception { runTest(callableFactories, new ComputeTest() { - @Override @Test - public void test(Factory factory, Ignite ignite) throws Exception { + @Override public void test(Factory factory, Ignite ignite) throws Exception { ignite.getOrCreateCache(CACHE_NAME); final IgniteCompute comp = ignite.compute(); @@ -889,8 +868,7 @@ public void test(Factory factory, Ignite ignite) throws Exception { @Test public void testMultiCacheAffinityCall() throws Exception { runTest(callableFactories, new ComputeTest() { - @Override @Test - public void test(Factory factory, Ignite ignite) throws Exception { + @Override public void test(Factory factory, Ignite ignite) throws Exception { ignite.getOrCreateCache("test0"); ignite.getOrCreateCache("test1"); @@ -918,8 +896,7 @@ public void test(Factory factory, Ignite ignite) throws Exception { @Test public void testMultiCacheAffinityCallAsync() throws Exception { runTest(callableFactories, new ComputeTest() { - @Override @Test - public void test(Factory factory, Ignite ignite) throws Exception { + @Override public void test(Factory factory, Ignite ignite) throws Exception { ignite.getOrCreateCache("test0"); ignite.getOrCreateCache("test1"); @@ -949,8 +926,7 @@ public void test(Factory factory, Ignite ignite) throws Exception { @Test public void testMultiCacheByPartIdAffinityCall() throws Exception { runTest(callableFactories, new ComputeTest() { - @Override @Test - public void test(Factory factory, Ignite ignite) throws Exception { + @Override public void test(Factory factory, Ignite ignite) throws Exception { ignite.getOrCreateCache("test0"); ignite.getOrCreateCache("test1"); @@ -978,8 +954,7 @@ public void test(Factory factory, Ignite ignite) throws Exception { @Test public void testMultiCacheByPartIdAffinityCallAsync() throws Exception { runTest(callableFactories, new ComputeTest() { - @Override @Test - public void test(Factory factory, Ignite ignite) throws Exception { + @Override public void test(Factory factory, Ignite ignite) throws Exception { ignite.getOrCreateCache("test0"); ignite.getOrCreateCache("test1"); @@ -1009,8 +984,7 @@ public void test(Factory factory, Ignite ignite) throws Exception { @Test public void testAffinityRun() throws Exception { runTest(runnableFactories, new ComputeTest() { - @Override @Test - public void test(Factory factory, Ignite ignite) throws Exception { + @Override public void test(Factory factory, Ignite ignite) throws Exception { ignite.getOrCreateCache(CACHE_NAME); final IgniteCompute comp = ignite.compute(); @@ -1030,8 +1004,7 @@ public void test(Factory factory, Ignite ignite) throws Exception { @Test public void testAffinityRunAsync() throws Exception { runTest(runnableFactories, new ComputeTest() { - @Override @Test - public void test(Factory factory, Ignite ignite) throws Exception { + @Override public void test(Factory factory, Ignite ignite) throws Exception { ignite.getOrCreateCache(CACHE_NAME); final IgniteCompute comp = ignite.compute(); @@ -1053,8 +1026,7 @@ public void test(Factory factory, Ignite ignite) throws Exception { @Test public void testMultiCacheAffinityRun() throws Exception { runTest(runnableFactories, new ComputeTest() { - @Override @Test - public void test(Factory factory, Ignite ignite) throws Exception { + @Override public void test(Factory factory, Ignite ignite) throws Exception { ignite.getOrCreateCache("test0"); ignite.getOrCreateCache("test1"); @@ -1075,8 +1047,7 @@ public void test(Factory factory, Ignite ignite) throws Exception { @Test public void testMultiCacheAffinityRunAsync() throws Exception { runTest(runnableFactories, new ComputeTest() { - @Override @Test - public void test(Factory factory, Ignite ignite) throws Exception { + @Override public void test(Factory factory, Ignite ignite) throws Exception { ignite.getOrCreateCache("test0"); ignite.getOrCreateCache("test1"); @@ -1099,8 +1070,7 @@ public void test(Factory factory, Ignite ignite) throws Exception { @Test public void testMultiCacheByPartIdAffinityRun() throws Exception { runTest(runnableFactories, new ComputeTest() { - @Override @Test - public void test(Factory factory, Ignite ignite) throws Exception { + @Override public void test(Factory factory, Ignite ignite) throws Exception { ignite.getOrCreateCache("test0"); ignite.getOrCreateCache("test1"); @@ -1121,8 +1091,7 @@ public void test(Factory factory, Ignite ignite) throws Exception { @Test public void testMultiCacheByPartIdAffinityRunAsync() throws Exception { runTest(runnableFactories, new ComputeTest() { - @Override @Test - public void test(Factory factory, Ignite ignite) throws Exception { + @Override public void test(Factory factory, Ignite ignite) throws Exception { ignite.getOrCreateCache("test0"); ignite.getOrCreateCache("test1"); @@ -1145,8 +1114,7 @@ public void test(Factory factory, Ignite ignite) throws Exception { @Test public void testDeployExecuteByName() throws Exception { runTest(jobFactories, new ComputeTest() { - @Override @Test - public void test(Factory factory, Ignite ignite) throws Exception { + @Override public void test(Factory factory, Ignite ignite) throws Exception { final int[] i = {-1}; final IgniteCompute comp = ignite.compute(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/IgniteComputeCustomExecutorConfigurationSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/IgniteComputeCustomExecutorConfigurationSelfTest.java index de717f6e43374..b35b625381d12 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/IgniteComputeCustomExecutorConfigurationSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/IgniteComputeCustomExecutorConfigurationSelfTest.java @@ -25,10 +25,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests custom executor configuration. */ +@RunWith(JUnit4.class) public class IgniteComputeCustomExecutorConfigurationSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/IgniteComputeCustomExecutorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/IgniteComputeCustomExecutorSelfTest.java index 3c212601aa787..b59fdcfdb2024 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/IgniteComputeCustomExecutorSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/IgniteComputeCustomExecutorSelfTest.java @@ -36,12 +36,16 @@ import org.apache.ignite.lang.IgniteRunnable; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests custom executor named pools. * * https://issues.apache.org/jira/browse/IGNITE-4699 */ +@RunWith(JUnit4.class) public class IgniteComputeCustomExecutorSelfTest extends GridCommonAbstractTest { /** */ private static final int GRID_CNT = 2; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/PublicThreadpoolStarvationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/PublicThreadpoolStarvationTest.java index f123382b79112..c99b55a1c7b5c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/PublicThreadpoolStarvationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/PublicThreadpoolStarvationTest.java @@ -25,6 +25,9 @@ import org.apache.ignite.internal.processors.cache.GridCacheAbstractSelfTest; import org.apache.ignite.lang.IgniteRunnable; import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -33,6 +36,7 @@ * Test to validate https://issues.apache.org/jira/browse/IGNITE-4239 * Jobs hang when a lot of jobs calculate cache. */ +@RunWith(JUnit4.class) public class PublicThreadpoolStarvationTest extends GridCacheAbstractSelfTest { /** Cache size. */ private static final int CACHE_SIZE = 10; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridEventConsumeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridEventConsumeSelfTest.java index 72f2127d5f659..e5800bf638239 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridEventConsumeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridEventConsumeSelfTest.java @@ -53,6 +53,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.SECONDS; @@ -67,6 +70,7 @@ /** * Event consume test. */ +@RunWith(JUnit4.class) public class GridEventConsumeSelfTest extends GridCommonAbstractTest { /** */ private static final String PRJ_PRED_CLS_NAME = "org.apache.ignite.tests.p2p.GridEventConsumeProjectionPredicate"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridMessageListenSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridMessageListenSelfTest.java index ed397c4fcbe5a..7fd5eab17a665 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridMessageListenSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridMessageListenSelfTest.java @@ -40,12 +40,16 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.SECONDS; /** * Message listen test. */ +@RunWith(JUnit4.class) public class GridMessageListenSelfTest extends GridCommonAbstractTest { /** */ private static final int GRID_CNT = 3; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/IgniteNoCustomEventsOnNodeStart.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/IgniteNoCustomEventsOnNodeStart.java index 3b9c1c8c456cb..0e6f736a92eef 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/IgniteNoCustomEventsOnNodeStart.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/IgniteNoCustomEventsOnNodeStart.java @@ -25,10 +25,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Sanity test to verify there are no unnecessary messages on node start. */ +@RunWith(JUnit4.class) public class IgniteNoCustomEventsOnNodeStart extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/BPlusTreeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/BPlusTreeSelfTest.java index 7e2d8c076a73c..57a9715b5b408 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/BPlusTreeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/BPlusTreeSelfTest.java @@ -77,6 +77,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; import org.jsr166.ConcurrentLinkedHashMap; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.pagemem.PageIdUtils.effectivePageId; import static org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.rnd; @@ -86,6 +89,7 @@ /** */ +@RunWith(JUnit4.class) public class BPlusTreeSelfTest extends GridCommonAbstractTest { /** */ private static final short LONG_INNER_IO = 30000; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/CacheFreeListImplSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/CacheFreeListImplSelfTest.java index 4780123fa4cf9..2f78c566d7840 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/CacheFreeListImplSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/CacheFreeListImplSelfTest.java @@ -52,10 +52,14 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class CacheFreeListImplSelfTest extends GridCommonAbstractTest { /** */ private static final int CPUS = Runtime.getRuntime().availableProcessors(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/DataRegionMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/DataRegionMetricsSelfTest.java index 6381825209076..a62b89123f46c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/DataRegionMetricsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/DataRegionMetricsSelfTest.java @@ -23,12 +23,16 @@ import org.apache.ignite.internal.processors.cache.persistence.DataRegionMetricsImpl; import org.apache.ignite.internal.processors.cache.ratemetrics.HitRateMetrics; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.lang.Thread.sleep; /** * */ +@RunWith(JUnit4.class) public class DataRegionMetricsSelfTest extends GridCommonAbstractTest { /** */ private DataRegionMetricsImpl memMetrics; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbDynamicCacheSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbDynamicCacheSelfTest.java index a726a04e55c7e..3d8b5aaa1dac3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbDynamicCacheSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbDynamicCacheSelfTest.java @@ -30,10 +30,14 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteDbDynamicCacheSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbMemoryLeakAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbMemoryLeakAbstractTest.java index 166e58f4bc280..9047609c3f5c8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbMemoryLeakAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbMemoryLeakAbstractTest.java @@ -26,12 +26,16 @@ import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.processors.cache.IgniteCacheProxy; import org.apache.ignite.internal.processors.cache.persistence.DataStructure; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.getInteger; /** * Base class for memory leaks tests. */ +@RunWith(JUnit4.class) public abstract class IgniteDbMemoryLeakAbstractTest extends IgniteDbAbstractTest { /** */ private static final int CONCURRENCY_LEVEL = 16; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbPutGetAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbPutGetAbstractTest.java index 5a9557fcf8c81..9b370bd820a5e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbPutGetAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbPutGetAbstractTest.java @@ -46,10 +46,14 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.GridTestUtils.SF; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public abstract class IgniteDbPutGetAbstractTest extends IgniteDbAbstractTest { /** */ private static final int KEYS_COUNT = 20_000; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbPutGetWithCacheStoreTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbPutGetWithCacheStoreTest.java index 74ba710ffcdef..07015144fff25 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbPutGetWithCacheStoreTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbPutGetWithCacheStoreTest.java @@ -32,6 +32,9 @@ import org.apache.ignite.configuration.WALMode; import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -39,6 +42,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteDbPutGetWithCacheStoreTest extends GridCommonAbstractTest { /** */ private static Map storeMap = new ConcurrentHashMap<>(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbSingleNodeTinyPutGetTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbSingleNodeTinyPutGetTest.java index 982d82d24cd84..9812182687f86 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbSingleNodeTinyPutGetTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbSingleNodeTinyPutGetTest.java @@ -19,10 +19,14 @@ import org.apache.ignite.IgniteCache; import org.apache.ignite.internal.IgniteEx; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for */ +@RunWith(JUnit4.class) public class IgniteDbSingleNodeTinyPutGetTest extends IgniteDbSingleNodePutGetTest { /** {@inheritDoc} */ @Override protected boolean isLargePage() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IndexStorageSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IndexStorageSelfTest.java index a17a39880dd95..97cb8b2768014 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IndexStorageSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IndexStorageSelfTest.java @@ -35,10 +35,14 @@ import org.apache.ignite.internal.processors.cache.persistence.RootPage; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IndexStorageSelfTest extends GridCommonAbstractTest { /** Make sure page is small enough to trigger multiple pages in a linked list. */ private static final int PAGE_SIZE = 1024; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/SwapPathConstructionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/SwapPathConstructionSelfTest.java index ccd60bff70680..5872c3185e0db 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/SwapPathConstructionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/SwapPathConstructionSelfTest.java @@ -31,11 +31,15 @@ import org.apache.ignite.internal.processors.cache.persistence.DataRegion; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test verifies correct construction of swap file path {@link DataRegionConfiguration#setSwapPath(String)} * when absolute or relative paths are provided via configuration. */ +@RunWith(JUnit4.class) public class SwapPathConstructionSelfTest extends GridCommonAbstractTest { /** */ private DataStorageConfiguration memCfg; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorMvccSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorMvccSelfTest.java index e071716995f0d..560f9738e4838 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorMvccSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorMvccSelfTest.java @@ -20,12 +20,16 @@ import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT; /** * Check DataStreamer with Mvcc enabled. */ +@RunWith(JUnit4.class) public class DataStreamProcessorMvccSelfTest extends DataStreamProcessorSelfTest { /** {@inheritDoc} */ @SuppressWarnings("unchecked") diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorSelfTest.java index 7b06aa6f4f380..85c9af1e28181 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorSelfTest.java @@ -69,6 +69,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -82,6 +85,7 @@ /** * */ +@RunWith(JUnit4.class) public class DataStreamProcessorSelfTest extends GridCommonAbstractTest { /** */ private static ConcurrentHashMap storeMap; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerClientReconnectAfterClusterRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerClientReconnectAfterClusterRestartTest.java index 56e08a1535138..5dd5491de393e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerClientReconnectAfterClusterRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerClientReconnectAfterClusterRestartTest.java @@ -28,10 +28,14 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests DataStreamer reconnect behaviour when client nodes arrives at the same or different topVer than it left. */ +@RunWith(JUnit4.class) public class DataStreamerClientReconnectAfterClusterRestartTest extends GridCommonAbstractTest { /** */ public static final TcpDiscoveryVmIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImplSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImplSelfTest.java index 345499f2488e9..5439d685465b3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImplSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImplSelfTest.java @@ -59,6 +59,9 @@ import org.apache.log4j.Logger; import org.apache.log4j.SimpleLayout; import org.apache.log4j.WriterAppender; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -66,6 +69,7 @@ /** * Tests for {@code IgniteDataStreamerImpl}. */ +@RunWith(JUnit4.class) public class DataStreamerImplSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultiThreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultiThreadedSelfTest.java index 3226ff81d100b..2462d0cdcf3fb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultiThreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultiThreadedSelfTest.java @@ -34,12 +34,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** * Tests for DataStreamer. */ +@RunWith(JUnit4.class) public class DataStreamerMultiThreadedSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultinodeCreateCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultinodeCreateCacheTest.java index daf3160e493ee..dc4c680c3c738 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultinodeCreateCacheTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultinodeCreateCacheTest.java @@ -29,10 +29,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class DataStreamerMultinodeCreateCacheTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerTimeoutTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerTimeoutTest.java index d262113a57e10..f11f10db48772 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerTimeoutTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerTimeoutTest.java @@ -30,6 +30,9 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.stream.StreamReceiver; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -37,6 +40,7 @@ /** * Test timeout for Data streamer. */ +@RunWith(JUnit4.class) public class DataStreamerTimeoutTest extends GridCommonAbstractTest { /** Cache name. */ public static final String CACHE_NAME = "cacheName"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerUpdateAfterLoadTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerUpdateAfterLoadTest.java index 76fb6bbc787c6..52b4d19893e0d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerUpdateAfterLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerUpdateAfterLoadTest.java @@ -30,12 +30,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * */ +@RunWith(JUnit4.class) public class DataStreamerUpdateAfterLoadTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/IgniteDataStreamerPerformanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/IgniteDataStreamerPerformanceTest.java index 7db4049b1753c..b6bcec1d4f79b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/IgniteDataStreamerPerformanceTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/IgniteDataStreamerPerformanceTest.java @@ -29,6 +29,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -41,6 +44,7 @@ *

    * Disable assertions and give at least 2 GB heap to run this test. */ +@RunWith(JUnit4.class) public class IgniteDataStreamerPerformanceTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); From ed54719377f694d0111740c0bbd92dcf5294e6c6 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Mon, 3 Dec 2018 17:10:26 +0300 Subject: [PATCH 017/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview --- .../internal/processors/igfs/IgfsAbstractSelfTest.java | 4 ++++ .../internal/processors/igfs/IgfsAttributesSelfTest.java | 4 ++++ .../processors/igfs/IgfsBackupFailoverSelfTest.java | 4 ++++ .../IgfsBlockMessageSystemPoolStarvationSelfTest.java | 4 ++++ .../igfs/IgfsCachePerBlockLruEvictionPolicySelfTest.java | 4 ++++ .../internal/processors/igfs/IgfsCacheSelfTest.java | 4 ++++ .../internal/processors/igfs/IgfsDataManagerSelfTest.java | 4 ++++ .../processors/igfs/IgfsDualAbstractSelfTest.java | 4 ++++ .../internal/processors/igfs/IgfsFileInfoSelfTest.java | 4 ++++ .../internal/processors/igfs/IgfsFileMapSelfTest.java | 4 ++++ .../igfs/IgfsGroupDataBlockKeyMapperHashSelfTest.java | 4 ++++ .../IgfsLocalSecondaryFileSystemDualAbstractSelfTest.java | 4 ++++ .../igfs/IgfsLocalSecondaryFileSystemProxySelfTest.java | 4 ++++ .../internal/processors/igfs/IgfsMetaManagerSelfTest.java | 4 ++++ .../internal/processors/igfs/IgfsMetricsSelfTest.java | 4 ++++ .../processors/igfs/IgfsModeResolverSelfTest.java | 5 +++++ .../internal/processors/igfs/IgfsModesSelfTest.java | 4 ++++ .../internal/processors/igfs/IgfsOneClientNodeTest.java | 4 ++++ .../processors/igfs/IgfsPrimaryMultiNodeSelfTest.java | 5 +++++ .../IgfsPrimaryRelaxedConsistencyMultiNodeSelfTest.java | 8 ++++++-- .../internal/processors/igfs/IgfsProcessorSelfTest.java | 4 ++++ .../processors/igfs/IgfsProcessorValidationSelfTest.java | 4 ++++ .../igfs/IgfsSecondaryFileSystemInjectionSelfTest.java | 4 ++++ ...verManagerIpcEndpointRegistrationAbstractSelfTest.java | 4 ++++ ...nagerIpcEndpointRegistrationOnLinuxAndMacSelfTest.java | 4 ++++ ...erManagerIpcEndpointRegistrationOnWindowsSelfTest.java | 4 ++++ .../ignite/internal/processors/igfs/IgfsSizeSelfTest.java | 4 ++++ .../internal/processors/igfs/IgfsStartCacheTest.java | 4 ++++ .../internal/processors/igfs/IgfsStreamsSelfTest.java | 4 ++++ .../ignite/internal/processors/igfs/IgfsTaskSelfTest.java | 4 ++++ .../internal/processors/igfs/benchmark/IgfsBenchmark.java | 5 ----- .../split/IgfsByteDelimiterRecordResolverSelfTest.java | 4 ++++ .../igfs/split/IgfsFixedLengthRecordResolverSelfTest.java | 4 ++++ .../split/IgfsNewLineDelimiterRecordResolverSelfTest.java | 4 ++++ .../split/IgfsStringDelimiterRecordResolverSelfTest.java | 4 ++++ 35 files changed, 140 insertions(+), 7 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractSelfTest.java index 687de8a9f31fa..bfc259a82c931 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractSelfTest.java @@ -59,6 +59,9 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.igfs.IgfsMode.PRIMARY; import static org.apache.ignite.igfs.IgfsMode.PROXY; @@ -67,6 +70,7 @@ * Test fo regular igfs operations. */ @SuppressWarnings({"ConstantConditions"}) +@RunWith(JUnit4.class) public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { /** * Constructor. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAttributesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAttributesSelfTest.java index f4e4ad528d5ed..5ff9b0a6df920 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAttributesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAttributesSelfTest.java @@ -27,6 +27,9 @@ import java.util.HashMap; import java.util.Map; import org.apache.ignite.igfs.IgfsMode; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.igfs.IgfsMode.DUAL_SYNC; import static org.apache.ignite.igfs.IgfsMode.PRIMARY; @@ -35,6 +38,7 @@ /** * {@link IgfsAttributes} test case. */ +@RunWith(JUnit4.class) public class IgfsAttributesSelfTest extends IgfsCommonAbstractTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsBackupFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsBackupFailoverSelfTest.java index b1b76efc2cac3..1b3c6a21017cb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsBackupFailoverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsBackupFailoverSelfTest.java @@ -37,6 +37,9 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.GridTestUtils; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -53,6 +56,7 @@ * Tests IGFS behavioral guarantees if some nodes on the cluster are synchronously or asynchronously stopped. * The operations to check are read, write or both. */ +@RunWith(JUnit4.class) public class IgfsBackupFailoverSelfTest extends IgfsCommonAbstractTest { /** Directory. */ protected static final IgfsPath DIR = new IgfsPath("/dir"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsBlockMessageSystemPoolStarvationSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsBlockMessageSystemPoolStarvationSelfTest.java index bff20bdd1c73d..e3894e0f35716 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsBlockMessageSystemPoolStarvationSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsBlockMessageSystemPoolStarvationSelfTest.java @@ -41,6 +41,9 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -50,6 +53,7 @@ /** * Test to check for system pool starvation due to {@link IgfsBlocksMessage}. */ +@RunWith(JUnit4.class) public class IgfsBlockMessageSystemPoolStarvationSelfTest extends IgfsCommonAbstractTest { /** First node name. */ private static final String NODE_1_NAME = "node1"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCachePerBlockLruEvictionPolicySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCachePerBlockLruEvictionPolicySelfTest.java index 3d1400b01c2e5..f86a9f0111fe6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCachePerBlockLruEvictionPolicySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCachePerBlockLruEvictionPolicySelfTest.java @@ -44,6 +44,9 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -55,6 +58,7 @@ * Tests for IGFS per-block LR eviction policy. */ @SuppressWarnings({"ConstantConditions"}) +@RunWith(JUnit4.class) public class IgfsCachePerBlockLruEvictionPolicySelfTest extends IgfsCommonAbstractTest { /** Primary IGFS name. */ private static final String IGFS_PRIMARY = "igfs-primary"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCacheSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCacheSelfTest.java index 621bce1f4c301..2bb221630d7cc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCacheSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCacheSelfTest.java @@ -33,6 +33,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -41,6 +44,7 @@ /** * Tests ensuring that IGFS data and meta caches are not "visible" through public API. */ +@RunWith(JUnit4.class) public class IgfsCacheSelfTest extends IgfsCommonAbstractTest { /** Regular cache name. */ private static final String CACHE_NAME = "cache"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsDataManagerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsDataManagerSelfTest.java index 9cfecbbe92173..21f7194d57acd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsDataManagerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsDataManagerSelfTest.java @@ -45,6 +45,9 @@ import java.util.Collection; import java.util.Collections; import java.util.concurrent.Callable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -54,6 +57,7 @@ /** * {@link IgfsDataManager} test case. */ +@RunWith(JUnit4.class) public class IgfsDataManagerSelfTest extends IgfsCommonAbstractTest { /** Test IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsDualAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsDualAbstractSelfTest.java index bb90417a27138..e0a8cd8a7332e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsDualAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsDualAbstractSelfTest.java @@ -32,11 +32,15 @@ import java.util.Map; import java.util.concurrent.Callable; import java.util.concurrent.CyclicBarrier; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for IGFS working in mode when remote file system exists: DUAL_SYNC, DUAL_ASYNC. */ @SuppressWarnings("ConstantConditions") +@RunWith(JUnit4.class) public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { /** * Constructor. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsFileInfoSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsFileInfoSelfTest.java index d06903fa1c7cd..42c593c25e1f2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsFileInfoSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsFileInfoSelfTest.java @@ -25,10 +25,14 @@ import org.apache.ignite.marshaller.Marshaller; import org.apache.ignite.marshaller.MarshallerContextTestImpl; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * {@link IgfsEntryInfo} test case. */ +@RunWith(JUnit4.class) public class IgfsFileInfoSelfTest extends IgfsCommonAbstractTest { /** Marshaller to test {@link Externalizable} interface. */ private final Marshaller marshaller; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsFileMapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsFileMapSelfTest.java index 3822d823823a6..423decb707a2a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsFileMapSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsFileMapSelfTest.java @@ -24,6 +24,9 @@ import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.lang.IgniteUuid; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.processors.igfs.IgfsFileAffinityRange.RANGE_STATUS_INITIAL; import static org.apache.ignite.internal.processors.igfs.IgfsFileAffinityRange.RANGE_STATUS_MOVED; @@ -32,6 +35,7 @@ /** * File map self test. */ +@RunWith(JUnit4.class) public class IgfsFileMapSelfTest extends IgfsCommonAbstractTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsGroupDataBlockKeyMapperHashSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsGroupDataBlockKeyMapperHashSelfTest.java index d4be247a5ce7e..7bb0f0bfded42 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsGroupDataBlockKeyMapperHashSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsGroupDataBlockKeyMapperHashSelfTest.java @@ -21,10 +21,14 @@ import org.apache.ignite.igfs.IgfsGroupDataBlocksKeyMapper; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.lang.IgniteUuid; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for {@link org.apache.ignite.igfs.IgfsGroupDataBlocksKeyMapper} hash. */ +@RunWith(JUnit4.class) public class IgfsGroupDataBlockKeyMapperHashSelfTest extends IgfsCommonAbstractTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsLocalSecondaryFileSystemDualAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsLocalSecondaryFileSystemDualAbstractSelfTest.java index 28c82f4aa2935..971f3d09ff8d8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsLocalSecondaryFileSystemDualAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsLocalSecondaryFileSystemDualAbstractSelfTest.java @@ -35,10 +35,14 @@ import java.nio.file.Files; import java.util.Collection; import java.util.concurrent.atomic.AtomicLong; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Abstract test for Hadoop 1.0 file system stack. */ +@RunWith(JUnit4.class) public abstract class IgfsLocalSecondaryFileSystemDualAbstractSelfTest extends IgfsDualAbstractSelfTest { /** */ private static final String FS_WORK_DIR = U.getIgniteHome() + File.separatorChar + "work" diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsLocalSecondaryFileSystemProxySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsLocalSecondaryFileSystemProxySelfTest.java index 1eecabb2faa7f..4288455deb62d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsLocalSecondaryFileSystemProxySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsLocalSecondaryFileSystemProxySelfTest.java @@ -33,10 +33,14 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.lang.IgniteBiInClosure; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for PROXY mode with local FS is configured as a secondary. */ +@RunWith(JUnit4.class) public class IgfsLocalSecondaryFileSystemProxySelfTest extends IgfsProxySelfTest { /** Fs work directory. */ private static final String FS_WORK_DIR = U.getIgniteHome() + File.separatorChar + "work" diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManagerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManagerSelfTest.java index 3f7839d757a02..0b68d93a22d43 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManagerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManagerSelfTest.java @@ -38,6 +38,9 @@ import java.util.Map; import java.util.UUID; import java.util.concurrent.Callable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -50,6 +53,7 @@ /** * {@link IgfsMetaManager} test case. */ +@RunWith(JUnit4.class) public class IgfsMetaManagerSelfTest extends IgfsCommonAbstractTest { /** Test IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMetricsSelfTest.java index 45e5a8e679d4a..d3d064574da73 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMetricsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMetricsSelfTest.java @@ -38,6 +38,9 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -48,6 +51,7 @@ /** * Test for IGFS metrics. */ +@RunWith(JUnit4.class) public class IgfsMetricsSelfTest extends IgfsCommonAbstractTest { /** Primary IGFS name. */ private static final String IGFS_PRIMARY = "igfs-primary"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsModeResolverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsModeResolverSelfTest.java index 3422939314b21..92b509db80f87 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsModeResolverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsModeResolverSelfTest.java @@ -27,6 +27,10 @@ import org.apache.ignite.igfs.IgfsMode; import org.apache.ignite.igfs.IgfsPath; import org.apache.ignite.internal.util.typedef.T2; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + import static org.apache.ignite.igfs.IgfsMode.DUAL_ASYNC; import static org.apache.ignite.igfs.IgfsMode.DUAL_SYNC; import static org.apache.ignite.igfs.IgfsMode.PRIMARY; @@ -35,6 +39,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgfsModeResolverSelfTest extends TestCase { /** */ private IgfsModeResolver reslvr; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsModesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsModesSelfTest.java index 497b886c51637..135ffb3473213 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsModesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsModesSelfTest.java @@ -39,6 +39,9 @@ import org.apache.ignite.lang.IgniteBiTuple; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -51,6 +54,7 @@ /** * IGFS modes self test. */ +@RunWith(JUnit4.class) public class IgfsModesSelfTest extends IgfsCommonAbstractTest { /** Grid instance hosting primary IGFS. */ private IgniteEx grid; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsOneClientNodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsOneClientNodeTest.java index cf00f924aeb10..dfd70d6ec8273 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsOneClientNodeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsOneClientNodeTest.java @@ -30,6 +30,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -37,6 +40,7 @@ /** * Test for igfs with one node in client mode. */ +@RunWith(JUnit4.class) public class IgfsOneClientNodeTest extends GridCommonAbstractTest { /** Regular cache name. */ private static final String CACHE_NAME = "cache"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsPrimaryMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsPrimaryMultiNodeSelfTest.java index 87f3cb0bf6709..eb47a0c17fd77 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsPrimaryMultiNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsPrimaryMultiNodeSelfTest.java @@ -17,9 +17,14 @@ package org.apache.ignite.internal.processors.igfs; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + /** * Multinode test for PRIMARY mode. */ +@RunWith(JUnit4.class) public class IgfsPrimaryMultiNodeSelfTest extends IgfsPrimarySelfTest { /** {@inheritDoc} */ @Override protected int nodeCount() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsPrimaryRelaxedConsistencyMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsPrimaryRelaxedConsistencyMultiNodeSelfTest.java index e29b8ffcad596..a3f11a28a664f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsPrimaryRelaxedConsistencyMultiNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsPrimaryRelaxedConsistencyMultiNodeSelfTest.java @@ -17,18 +17,22 @@ package org.apache.ignite.internal.processors.igfs; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + /** * Tests for PRIMARY mode and relaxed consistency model. */ +@RunWith(JUnit4.class) public class IgfsPrimaryRelaxedConsistencyMultiNodeSelfTest extends IgfsPrimaryRelaxedConsistencySelfTest { /** {@inheritDoc} */ @Override protected int nodeCount() { return 4; } - @Override @Test - public void testCreateConsistencyMultithreaded() throws Exception { + @Override public void testCreateConsistencyMultithreaded() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-8823"); super.testCreateConsistencyMultithreaded(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsProcessorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsProcessorSelfTest.java index 6d868e355a23f..c8a74c8d117dd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsProcessorSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsProcessorSelfTest.java @@ -58,6 +58,9 @@ import java.util.Map; import java.util.concurrent.Callable; import java.util.concurrent.atomic.AtomicInteger; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.nio.charset.StandardCharsets.UTF_8; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -67,6 +70,7 @@ /** * Tests for {@link IgfsProcessor}. */ +@RunWith(JUnit4.class) public class IgfsProcessorSelfTest extends IgfsCommonAbstractTest { /** Test IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsProcessorValidationSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsProcessorValidationSelfTest.java index ff1887097f91d..a82e001a6702b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsProcessorValidationSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsProcessorValidationSelfTest.java @@ -36,6 +36,9 @@ import java.util.Arrays; import java.util.Collection; import java.util.Collections; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.igfs.IgfsMode.DUAL_ASYNC; @@ -50,6 +53,7 @@ *

    * Tests starting with "testRemote" are checking {@link IgfsProcessor#checkIgfsOnRemoteNode(org.apache.ignite.cluster.ClusterNode)}. */ +@RunWith(JUnit4.class) public class IgfsProcessorValidationSelfTest extends IgfsCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsSecondaryFileSystemInjectionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsSecondaryFileSystemInjectionSelfTest.java index c08809c8ab0aa..fb12e880bedd4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsSecondaryFileSystemInjectionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsSecondaryFileSystemInjectionSelfTest.java @@ -40,6 +40,9 @@ import org.apache.ignite.resources.LoggerResource; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -48,6 +51,7 @@ /** * Tests for resource injection to secondary file system. */ +@RunWith(JUnit4.class) public class IgfsSecondaryFileSystemInjectionSelfTest extends GridCommonAbstractTest { /** IGFS name. */ protected static final String IGFS_NAME = "igfs-test"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsServerManagerIpcEndpointRegistrationAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsServerManagerIpcEndpointRegistrationAbstractSelfTest.java index a24273e208b70..da431c58a8226 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsServerManagerIpcEndpointRegistrationAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsServerManagerIpcEndpointRegistrationAbstractSelfTest.java @@ -41,6 +41,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.configuration.FileSystemConfiguration.DFLT_MGMT_PORT; @@ -48,6 +51,7 @@ /** * Base test class for {@link IgfsServer} checking IPC endpoint registrations. */ +@RunWith(JUnit4.class) public abstract class IgfsServerManagerIpcEndpointRegistrationAbstractSelfTest extends IgfsCommonAbstractTest { /** IP finder. */ protected static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsServerManagerIpcEndpointRegistrationOnLinuxAndMacSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsServerManagerIpcEndpointRegistrationOnLinuxAndMacSelfTest.java index f964a49299b0f..2ec7a38ef6a66 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsServerManagerIpcEndpointRegistrationOnLinuxAndMacSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsServerManagerIpcEndpointRegistrationOnLinuxAndMacSelfTest.java @@ -22,11 +22,15 @@ import org.apache.ignite.igfs.IgfsIpcEndpointType; import org.apache.ignite.internal.util.typedef.G; import org.apache.ignite.internal.util.typedef.T2; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for {@link IgfsServer} that checks all IPC endpoint registration types * permitted for Linux and Mac OS. */ +@RunWith(JUnit4.class) public class IgfsServerManagerIpcEndpointRegistrationOnLinuxAndMacSelfTest extends IgfsServerManagerIpcEndpointRegistrationAbstractSelfTest { /** diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsServerManagerIpcEndpointRegistrationOnWindowsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsServerManagerIpcEndpointRegistrationOnWindowsSelfTest.java index d97bb401fb42f..0ac420dde422d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsServerManagerIpcEndpointRegistrationOnWindowsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsServerManagerIpcEndpointRegistrationOnWindowsSelfTest.java @@ -25,11 +25,15 @@ import org.apache.ignite.internal.util.ipc.shmem.IpcSharedMemoryServerEndpoint; import org.apache.ignite.internal.util.typedef.G; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for {@link IgfsServerManager} that checks shmem IPC endpoint registration * forbidden for Windows. */ +@RunWith(JUnit4.class) public class IgfsServerManagerIpcEndpointRegistrationOnWindowsSelfTest extends IgfsServerManagerIpcEndpointRegistrationAbstractSelfTest { /** diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsSizeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsSizeSelfTest.java index 5bfe79837d7bf..3b9b5a0d61af3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsSizeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsSizeSelfTest.java @@ -52,6 +52,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -61,6 +64,7 @@ /** * {@link IgfsAttributes} test case. */ +@RunWith(JUnit4.class) public class IgfsSizeSelfTest extends IgfsCommonAbstractTest { /** How many grids to start. */ private static final int GRID_CNT = 3; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsStartCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsStartCacheTest.java index 799879ce3b445..9c132657e7e4d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsStartCacheTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsStartCacheTest.java @@ -36,6 +36,9 @@ import java.io.BufferedWriter; import java.io.OutputStreamWriter; import java.util.concurrent.Callable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -47,6 +50,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgfsStartCacheTest extends IgfsCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsStreamsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsStreamsSelfTest.java index 8bf3f1f5d2581..cbdc6ef8b305f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsStreamsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsStreamsSelfTest.java @@ -52,6 +52,9 @@ import java.util.concurrent.Callable; import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.atomic.AtomicInteger; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -61,6 +64,7 @@ /** * Tests for IGFS streams content. */ +@RunWith(JUnit4.class) public class IgfsStreamsSelfTest extends IgfsCommonAbstractTest { /** Test IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsTaskSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsTaskSelfTest.java index 6c8aeec806103..27163d2ee4a8b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsTaskSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsTaskSelfTest.java @@ -50,6 +50,9 @@ import java.util.Collections; import java.util.List; import java.util.Random; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -60,6 +63,7 @@ /** * Tests for {@link IgfsTask}. */ +@RunWith(JUnit4.class) public class IgfsTaskSelfTest extends IgfsCommonAbstractTest { /** Predefined words dictionary. */ private static final String[] DICTIONARY = new String[] {"word0", "word1", "word2", "word3", "word4", "word5", diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/benchmark/IgfsBenchmark.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/benchmark/IgfsBenchmark.java index 5977695b0d907..f3bce8e4af5c8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/benchmark/IgfsBenchmark.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/benchmark/IgfsBenchmark.java @@ -482,7 +482,6 @@ private void recursePath(String parentPath, int depth, FileOperation operation) * * @param fs Filesystem. */ - @Test public void testReadFile(IgniteFileSystem fs) { try { recursePath(path, 1, new ReadFileOperation(fs, size)); @@ -497,7 +496,6 @@ public void testReadFile(IgniteFileSystem fs) { * * @param fs Filesystem. */ - @Test public void testWriteFile(IgniteFileSystem fs) { try { recursePath(path, 1, new WriteFileOperation(fs, size)); @@ -512,7 +510,6 @@ public void testWriteFile(IgniteFileSystem fs) { * * @param fs Filesystem. */ - @Test public void testDeleteFile(IgniteFileSystem fs) { try { recursePath(path, 1, new DeleteFileOperation(fs, 0)); @@ -527,7 +524,6 @@ public void testDeleteFile(IgniteFileSystem fs) { * * @param fs Filesystem. */ - @Test public void testInfoFile(IgniteFileSystem fs) { try { recursePath(path, 1, new InfoFileOperation(fs)); @@ -542,7 +538,6 @@ public void testInfoFile(IgniteFileSystem fs) { * * @param fs Filesystem. */ - @Test public void testListPathFile(IgniteFileSystem fs) { try { recursePath(path, 1, new ListPathFileOperation(fs)); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/split/IgfsByteDelimiterRecordResolverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/split/IgfsByteDelimiterRecordResolverSelfTest.java index faab90b681bd6..d2e78c9434231 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/split/IgfsByteDelimiterRecordResolverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/split/IgfsByteDelimiterRecordResolverSelfTest.java @@ -21,10 +21,14 @@ import org.apache.ignite.igfs.mapreduce.IgfsFileRange; import org.apache.ignite.igfs.mapreduce.records.IgfsByteDelimiterRecordResolver; import org.apache.ignite.internal.util.typedef.F; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Byte delimiter split resolver self test. */ +@RunWith(JUnit4.class) public class IgfsByteDelimiterRecordResolverSelfTest extends IgfsAbstractRecordResolverSelfTest { /** * Test split resolution when there are no delimiters in the file. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/split/IgfsFixedLengthRecordResolverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/split/IgfsFixedLengthRecordResolverSelfTest.java index 641319587f7b2..6e07f85905b84 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/split/IgfsFixedLengthRecordResolverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/split/IgfsFixedLengthRecordResolverSelfTest.java @@ -21,10 +21,14 @@ import org.apache.ignite.igfs.mapreduce.IgfsFileRange; import org.apache.ignite.igfs.mapreduce.records.IgfsFixedLengthRecordResolver; import org.apache.ignite.internal.util.typedef.F; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Fixed length split resolver self test. */ +@RunWith(JUnit4.class) public class IgfsFixedLengthRecordResolverSelfTest extends IgfsAbstractRecordResolverSelfTest { /** * Test split resolver. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/split/IgfsNewLineDelimiterRecordResolverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/split/IgfsNewLineDelimiterRecordResolverSelfTest.java index 40e00e1ccb524..8ea1afa46d3e3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/split/IgfsNewLineDelimiterRecordResolverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/split/IgfsNewLineDelimiterRecordResolverSelfTest.java @@ -21,6 +21,9 @@ import org.apache.ignite.igfs.mapreduce.IgfsFileRange; import org.apache.ignite.igfs.mapreduce.records.IgfsNewLineRecordResolver; import org.apache.ignite.internal.util.typedef.F; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.igfs.mapreduce.records.IgfsNewLineRecordResolver.SYM_CR; import static org.apache.ignite.igfs.mapreduce.records.IgfsNewLineRecordResolver.SYM_LF; @@ -28,6 +31,7 @@ /** * New line split resolver self test. */ +@RunWith(JUnit4.class) public class IgfsNewLineDelimiterRecordResolverSelfTest extends IgfsAbstractRecordResolverSelfTest { /** * Test new line delimtier record resovler. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/split/IgfsStringDelimiterRecordResolverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/split/IgfsStringDelimiterRecordResolverSelfTest.java index c7f39a5a135b5..6539e5b342d35 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/split/IgfsStringDelimiterRecordResolverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/split/IgfsStringDelimiterRecordResolverSelfTest.java @@ -23,10 +23,14 @@ import org.apache.ignite.igfs.mapreduce.records.IgfsByteDelimiterRecordResolver; import org.apache.ignite.igfs.mapreduce.records.IgfsStringDelimiterRecordResolver; import org.apache.ignite.internal.util.typedef.F; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * String delimiter split resolver self-test. */ +@RunWith(JUnit4.class) public class IgfsStringDelimiterRecordResolverSelfTest extends IgfsAbstractRecordResolverSelfTest { /** Charset used in tests. */ private static final Charset UTF8 = Charset.forName("UTF-8"); From fb97a8c23881d1d1c50423dcea6ac519a36c195a Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Mon, 3 Dec 2018 17:26:19 +0300 Subject: [PATCH 018/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview --- .../processors/GridCacheTxLoadFromStoreOnLockSelfTest.java | 4 ++++ .../jobmetrics/GridJobMetricsProcessorLoadTest.java | 4 ++++ .../messaging/IgniteMessagingConfigVariationFullApiTest.java | 4 ++++ .../processors/odbc/OdbcConfigurationValidationSelfTest.java | 4 ++++ .../internal/processors/odbc/OdbcEscapeSequenceSelfTest.java | 4 ++++ .../internal/processors/port/GridPortProcessorSelfTest.java | 4 ++++ .../rest/handlers/cache/GridCacheCommandHandlerSelfTest.java | 4 ++++ .../rest/handlers/log/GridLogCommandHandlerTest.java | 4 ++++ .../rest/handlers/query/GridQueryCommandHandlerTest.java | 4 ++++ .../rest/handlers/top/CacheTopologyCommandHandlerTest.java | 4 ++++ .../processors/service/ClosureServiceClientsNodesTest.java | 4 ++++ .../processors/service/GridServiceClientNodeTest.java | 4 ++++ .../service/GridServiceContinuousQueryRedeployTest.java | 4 ++++ .../service/GridServiceDeploymentCompoundFutureSelfTest.java | 4 ++++ .../GridServiceDeploymentExceptionPropagationTest.java | 4 ++++ .../processors/service/GridServicePackagePrivateSelfTest.java | 4 ++++ .../service/GridServiceProcessorAbstractSelfTest.java | 4 ++++ .../service/GridServiceProcessorBatchDeploySelfTest.java | 4 ++++ .../service/GridServiceProcessorMultiNodeConfigSelfTest.java | 4 ++++ .../service/GridServiceProcessorMultiNodeSelfTest.java | 4 ++++ .../processors/service/GridServiceProcessorProxySelfTest.java | 4 ++++ .../service/GridServiceProcessorSingleNodeSelfTest.java | 4 ++++ .../processors/service/GridServiceProcessorStopSelfTest.java | 4 ++++ .../service/GridServiceProxyClientReconnectSelfTest.java | 4 ++++ .../processors/service/GridServiceProxyNodeStopSelfTest.java | 4 ++++ .../processors/service/GridServiceReassignmentSelfTest.java | 4 ++++ .../processors/service/GridServiceSerializationSelfTest.java | 4 ++++ .../service/IgniteServiceConfigVariationsFullApiTest.java | 4 ++++ ...teServiceDeployment2ClassLoadersDefaultMarshallerTest.java | 4 ++++ ...iteServiceDeploymentClassLoadingDefaultMarshallerTest.java | 4 ++++ .../service/IgniteServiceDynamicCachesSelfTest.java | 4 ++++ .../service/IgniteServiceProxyTimeoutInitializedTest.java | 4 ++++ .../processors/service/IgniteServiceReassignmentTest.java | 4 ++++ .../processors/service/ServiceDeploymentOnActivationTest.java | 4 ++++ .../service/ServiceDeploymentOutsideBaselineTest.java | 4 ++++ .../processors/service/ServicePredicateAccessCacheTest.java | 4 ++++ .../processors/service/SystemCacheNotConfiguredTest.java | 4 ++++ 37 files changed, 148 insertions(+) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/GridCacheTxLoadFromStoreOnLockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/GridCacheTxLoadFromStoreOnLockSelfTest.java index 6e356111c50d5..bf64e51526075 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/GridCacheTxLoadFromStoreOnLockSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/GridCacheTxLoadFromStoreOnLockSelfTest.java @@ -37,10 +37,14 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class GridCacheTxLoadFromStoreOnLockSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/jobmetrics/GridJobMetricsProcessorLoadTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/jobmetrics/GridJobMetricsProcessorLoadTest.java index f4ade3e86993b..1fab2355a37f2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/jobmetrics/GridJobMetricsProcessorLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/jobmetrics/GridJobMetricsProcessorLoadTest.java @@ -21,10 +21,14 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.GridTestKernalContext; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Grid job metrics processor load test. */ +@RunWith(JUnit4.class) public class GridJobMetricsProcessorLoadTest extends GridCommonAbstractTest { /** */ private static final int THREADS_CNT = 10; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/messaging/IgniteMessagingConfigVariationFullApiTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/messaging/IgniteMessagingConfigVariationFullApiTest.java index afc2a3131d1bf..339c9f22eaf96 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/messaging/IgniteMessagingConfigVariationFullApiTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/messaging/IgniteMessagingConfigVariationFullApiTest.java @@ -27,10 +27,14 @@ import org.apache.ignite.cluster.ClusterGroup; import org.apache.ignite.lang.IgniteBiPredicate; import org.apache.ignite.testframework.junits.IgniteConfigVariationsAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * The test checks process messaging. */ +@RunWith(JUnit4.class) public class IgniteMessagingConfigVariationFullApiTest extends IgniteConfigVariationsAbstractTest { /** * Message topic. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/odbc/OdbcConfigurationValidationSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/odbc/OdbcConfigurationValidationSelfTest.java index d4abc1fba6836..6583ec4338155 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/odbc/OdbcConfigurationValidationSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/odbc/OdbcConfigurationValidationSelfTest.java @@ -27,11 +27,15 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * ODBC configuration validation tests. */ @SuppressWarnings("deprecation") +@RunWith(JUnit4.class) public class OdbcConfigurationValidationSelfTest extends GridCommonAbstractTest { /** Node index generator. */ private static final AtomicInteger NODE_IDX_GEN = new AtomicInteger(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/odbc/OdbcEscapeSequenceSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/odbc/OdbcEscapeSequenceSelfTest.java index cf82daee1a962..44c9e0ce99876 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/odbc/OdbcEscapeSequenceSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/odbc/OdbcEscapeSequenceSelfTest.java @@ -23,10 +23,14 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import java.util.concurrent.Callable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Escape sequence parser tests. */ +@RunWith(JUnit4.class) public class OdbcEscapeSequenceSelfTest extends GridCommonAbstractTest { /** * Test simple cases. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/port/GridPortProcessorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/port/GridPortProcessorSelfTest.java index b1f17e5aa62eb..5b6a2acb0da02 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/port/GridPortProcessorSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/port/GridPortProcessorSelfTest.java @@ -22,6 +22,9 @@ import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi; import org.apache.ignite.testframework.junits.GridTestKernalContext; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.spi.IgnitePortProtocol.TCP; import static org.apache.ignite.spi.IgnitePortProtocol.UDP; @@ -29,6 +32,7 @@ /** * */ +@RunWith(JUnit4.class) public class GridPortProcessorSelfTest extends GridCommonAbstractTest { /** */ private GridTestKernalContext ctx; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandlerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandlerSelfTest.java index f62a17f37a0ec..08ec39fe831d8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandlerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandlerSelfTest.java @@ -47,10 +47,14 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import javax.cache.processor.EntryProcessorException; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests command handler directly. */ +@RunWith(JUnit4.class) public class GridCacheCommandHandlerSelfTest extends GridCommonAbstractTest { /** * Constructor. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/log/GridLogCommandHandlerTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/log/GridLogCommandHandlerTest.java index f9ec7213eb8ae..bb31ce25c429c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/log/GridLogCommandHandlerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/log/GridLogCommandHandlerTest.java @@ -31,10 +31,14 @@ import org.apache.ignite.internal.processors.rest.request.GridRestLogRequest; import org.apache.ignite.testframework.junits.GridTestKernalContext; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * REST log command handler tests. */ +@RunWith(JUnit4.class) public class GridLogCommandHandlerTest extends GridCommonAbstractTest { /** */ private String igniteHome = System.getProperty("user.dir"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/query/GridQueryCommandHandlerTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/query/GridQueryCommandHandlerTest.java index 5d31bd2f1018c..0d8fe5c7a4d51 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/query/GridQueryCommandHandlerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/query/GridQueryCommandHandlerTest.java @@ -28,10 +28,14 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import java.util.Collection; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * REST query command handler tests. */ +@RunWith(JUnit4.class) public class GridQueryCommandHandlerTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/top/CacheTopologyCommandHandlerTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/top/CacheTopologyCommandHandlerTest.java index 0e8539c19fcc1..cebd96d1b8706 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/top/CacheTopologyCommandHandlerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/top/CacheTopologyCommandHandlerTest.java @@ -33,10 +33,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class CacheTopologyCommandHandlerTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration() throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/ClosureServiceClientsNodesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/ClosureServiceClientsNodesTest.java index e5ba62cc36b79..6f25f1b370a6a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/ClosureServiceClientsNodesTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/ClosureServiceClientsNodesTest.java @@ -41,10 +41,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test that compute and service run only on server nodes by default. */ +@RunWith(JUnit4.class) public class ClosureServiceClientsNodesTest extends GridCommonAbstractTest { /** Number of grids started for tests. */ private static final int NODES_CNT = 4; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceClientNodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceClientNodeTest.java index eada35ada7f16..d0474c51f1614 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceClientNodeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceClientNodeTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class GridServiceClientNodeTest extends GridCommonAbstractTest { /** */ protected static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceContinuousQueryRedeployTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceContinuousQueryRedeployTest.java index 7fe86d4f46026..e4157e2290fbf 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceContinuousQueryRedeployTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceContinuousQueryRedeployTest.java @@ -39,11 +39,15 @@ import org.apache.ignite.services.ServiceContext; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests whether concurrent service cancel and registering ContinuousQuery doesn't causes * service redeployment. */ +@RunWith(JUnit4.class) public class GridServiceContinuousQueryRedeployTest extends GridCommonAbstractTest { /** */ private static final String CACHE_NAME = "TEST_CACHE"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceDeploymentCompoundFutureSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceDeploymentCompoundFutureSelfTest.java index 26b9402c3fe41..f2563d2741717 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceDeploymentCompoundFutureSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceDeploymentCompoundFutureSelfTest.java @@ -28,8 +28,12 @@ import org.apache.ignite.services.ServiceConfiguration; import org.apache.ignite.services.ServiceDeploymentException; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** */ +@RunWith(JUnit4.class) public class GridServiceDeploymentCompoundFutureSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceDeploymentExceptionPropagationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceDeploymentExceptionPropagationTest.java index 6e76665ee6403..d5df8281325fb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceDeploymentExceptionPropagationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceDeploymentExceptionPropagationTest.java @@ -23,8 +23,12 @@ import org.apache.ignite.services.ServiceContext; import org.apache.ignite.testframework.GridStringLogger; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** */ +@RunWith(JUnit4.class) public class GridServiceDeploymentExceptionPropagationTest extends GridCommonAbstractTest { /** */ @SuppressWarnings("unused") diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServicePackagePrivateSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServicePackagePrivateSelfTest.java index 117fd1851fc80..c87b8de8b1558 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServicePackagePrivateSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServicePackagePrivateSelfTest.java @@ -22,10 +22,14 @@ import org.apache.ignite.internal.processors.service.inner.MyService; import org.apache.ignite.internal.processors.service.inner.MyServiceFactory; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for package-private service implementation. */ +@RunWith(JUnit4.class) public class GridServicePackagePrivateSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorAbstractSelfTest.java index d14608be34f1b..3d5a77bef84f9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorAbstractSelfTest.java @@ -47,11 +47,15 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for {@link GridAffinityProcessor}. */ @GridCommonTest(group = "Service Processor") +@RunWith(JUnit4.class) public abstract class GridServiceProcessorAbstractSelfTest extends GridCommonAbstractTest { /** Cache name. */ public static final String CACHE_NAME = "testServiceCache"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorBatchDeploySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorBatchDeploySelfTest.java index 9c64cbfd975a3..83d9b2b3e5e07 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorBatchDeploySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorBatchDeploySelfTest.java @@ -41,12 +41,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.testframework.GridTestUtils.runAsync; /** * Test for deployment of multiple configurations at a time. */ +@RunWith(JUnit4.class) public class GridServiceProcessorBatchDeploySelfTest extends GridCommonAbstractTest { /** Number of services to be deployed. */ private static final int NUM_SERVICES = 100; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorMultiNodeConfigSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorMultiNodeConfigSelfTest.java index a677fbc11db43..d328db2ba201f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorMultiNodeConfigSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorMultiNodeConfigSelfTest.java @@ -27,10 +27,14 @@ import org.apache.ignite.services.ServiceConfiguration; import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Single node services test. */ +@RunWith(JUnit4.class) public class GridServiceProcessorMultiNodeConfigSelfTest extends GridServiceProcessorAbstractSelfTest { /** Cluster singleton name. */ private static final String CLUSTER_SINGLE = "serviceConfigSingleton"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorMultiNodeSelfTest.java index e36f192286aa7..ed331fa18dea0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorMultiNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorMultiNodeSelfTest.java @@ -25,10 +25,14 @@ import org.apache.ignite.lang.IgniteFuture; import org.apache.ignite.services.Service; import org.apache.ignite.services.ServiceConfiguration; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Single node services test. */ +@RunWith(JUnit4.class) public class GridServiceProcessorMultiNodeSelfTest extends GridServiceProcessorAbstractSelfTest { /** {@inheritDoc} */ @Override protected int nodeCount() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorProxySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorProxySelfTest.java index fcf4bc4286810..b022622a74f45 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorProxySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorProxySelfTest.java @@ -28,10 +28,14 @@ import org.apache.ignite.services.Service; import org.apache.ignite.services.ServiceContext; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Service proxy test. */ +@RunWith(JUnit4.class) public class GridServiceProcessorProxySelfTest extends GridServiceProcessorAbstractSelfTest { /** {@inheritDoc} */ @Override protected int nodeCount() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorSingleNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorSingleNodeSelfTest.java index a51ff686a63ed..e2e5a5d62f318 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorSingleNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorSingleNodeSelfTest.java @@ -19,10 +19,14 @@ import org.apache.ignite.Ignite; import org.apache.ignite.IgniteException; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Single node services test. */ +@RunWith(JUnit4.class) public class GridServiceProcessorSingleNodeSelfTest extends GridServiceProcessorAbstractSelfTest { /** {@inheritDoc} */ @Override protected int nodeCount() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorStopSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorStopSelfTest.java index d18522c12e27b..d17b0150e29f9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorStopSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorStopSelfTest.java @@ -37,10 +37,14 @@ import org.apache.ignite.services.ServiceContext; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests that {@link GridServiceProcessor} completes deploy/undeploy futures during node stop. */ +@RunWith(JUnit4.class) public class GridServiceProcessorStopSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected void afterTest() throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProxyClientReconnectSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProxyClientReconnectSelfTest.java index 6f22bd832a188..823e1c3768ad0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProxyClientReconnectSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProxyClientReconnectSelfTest.java @@ -30,10 +30,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Service proxy test with client reconnect. */ +@RunWith(JUnit4.class) public class GridServiceProxyClientReconnectSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProxyNodeStopSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProxyNodeStopSelfTest.java index ada59b7cc0667..2f01662eda2ae 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProxyNodeStopSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProxyNodeStopSelfTest.java @@ -28,10 +28,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for service proxy after client node stopped. */ +@RunWith(JUnit4.class) public class GridServiceProxyNodeStopSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceReassignmentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceReassignmentSelfTest.java index c5bd9acbcb023..532728b290f1f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceReassignmentSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceReassignmentSelfTest.java @@ -30,10 +30,14 @@ import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests service reassignment. */ +@RunWith(JUnit4.class) public class GridServiceReassignmentSelfTest extends GridServiceProcessorAbstractSelfTest { /** */ private static final String SERVICE_NAME = "testService"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceSerializationSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceSerializationSelfTest.java index 03e08ca5aa379..66938152ea94f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceSerializationSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceSerializationSelfTest.java @@ -34,10 +34,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.thread.IgniteThread; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Service serialization test. */ +@RunWith(JUnit4.class) public class GridServiceSerializationSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceConfigVariationsFullApiTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceConfigVariationsFullApiTest.java index 6866fe2dda0aa..0ebee6e3b2fc2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceConfigVariationsFullApiTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceConfigVariationsFullApiTest.java @@ -39,10 +39,14 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.configvariations.Parameters; import org.apache.ignite.testframework.junits.IgniteConfigVariationsAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Full API services test. */ +@RunWith(JUnit4.class) public class IgniteServiceConfigVariationsFullApiTest extends IgniteConfigVariationsAbstractTest { /** Test service name. */ private static final String SERVICE_NAME = "testService"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDeployment2ClassLoadersDefaultMarshallerTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDeployment2ClassLoadersDefaultMarshallerTest.java index db66aaf787b2a..76738d7afae91 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDeployment2ClassLoadersDefaultMarshallerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDeployment2ClassLoadersDefaultMarshallerTest.java @@ -33,10 +33,14 @@ import org.apache.ignite.testframework.GridTestExternalClassLoader; import org.apache.ignite.testframework.config.GridTestProperties; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests that not all nodes in cluster need user's service definition (only nodes according to filter). */ +@RunWith(JUnit4.class) public class IgniteServiceDeployment2ClassLoadersDefaultMarshallerTest extends GridCommonAbstractTest { /** */ private static final String NOOP_SERVICE_CLS_NAME = "org.apache.ignite.tests.p2p.NoopService"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDeploymentClassLoadingDefaultMarshallerTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDeploymentClassLoadingDefaultMarshallerTest.java index 426f989733d02..be0450cb2ebfa 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDeploymentClassLoadingDefaultMarshallerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDeploymentClassLoadingDefaultMarshallerTest.java @@ -29,10 +29,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests that not all nodes in cluster need user's service definition (only nodes according to filter). */ +@RunWith(JUnit4.class) public class IgniteServiceDeploymentClassLoadingDefaultMarshallerTest extends GridCommonAbstractTest { /** */ private static final String NOOP_SERVICE_CLS_NAME = "org.apache.ignite.tests.p2p.NoopService"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDynamicCachesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDynamicCachesSelfTest.java index 2d161898ed37f..c33af400dac98 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDynamicCachesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDynamicCachesSelfTest.java @@ -31,10 +31,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteServiceDynamicCachesSelfTest extends GridCommonAbstractTest { /** */ private static final int GRID_CNT = 4; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceProxyTimeoutInitializedTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceProxyTimeoutInitializedTest.java index a4140104d39b3..480b7bef20aba 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceProxyTimeoutInitializedTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceProxyTimeoutInitializedTest.java @@ -42,10 +42,14 @@ import java.util.concurrent.Callable; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests service proxy timeouts. */ +@RunWith(JUnit4.class) public class IgniteServiceProxyTimeoutInitializedTest extends GridCommonAbstractTest { /** */ private static Service srvc; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceReassignmentTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceReassignmentTest.java index 394ad7f00aea6..56c07b3c40ddf 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceReassignmentTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceReassignmentTest.java @@ -38,10 +38,14 @@ import org.apache.ignite.testframework.GridStringLogger; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteServiceReassignmentTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/ServiceDeploymentOnActivationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/ServiceDeploymentOnActivationTest.java index 6800a24ab4663..f66c6126b03ee 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/ServiceDeploymentOnActivationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/ServiceDeploymentOnActivationTest.java @@ -32,8 +32,12 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** */ +@RunWith(JUnit4.class) public class ServiceDeploymentOnActivationTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/ServiceDeploymentOutsideBaselineTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/ServiceDeploymentOutsideBaselineTest.java index 0a3d74fb2ec3b..48690a387bd05 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/ServiceDeploymentOutsideBaselineTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/ServiceDeploymentOutsideBaselineTest.java @@ -37,8 +37,12 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** */ +@RunWith(JUnit4.class) public class ServiceDeploymentOutsideBaselineTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/ServicePredicateAccessCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/ServicePredicateAccessCacheTest.java index 06236e77c5c14..87b6808f5081f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/ServicePredicateAccessCacheTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/ServicePredicateAccessCacheTest.java @@ -36,6 +36,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -44,6 +47,7 @@ /** * */ +@RunWith(JUnit4.class) public class ServicePredicateAccessCacheTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/SystemCacheNotConfiguredTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/SystemCacheNotConfiguredTest.java index 1fd925138ebc5..f7f819546936e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/SystemCacheNotConfiguredTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/SystemCacheNotConfiguredTest.java @@ -29,10 +29,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests if system cache was started before deploying of service. */ +@RunWith(JUnit4.class) public class SystemCacheNotConfiguredTest extends GridCommonAbstractTest { /** */ private final ByteArrayOutputStream errContent = new ByteArrayOutputStream(); From 063f7ae0164924a775b4235ebd0f704017bc2c73 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Mon, 3 Dec 2018 17:45:00 +0300 Subject: [PATCH 019/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview --- .../internal/processors/cache/IgniteCacheGroupsTest.java | 1 + .../cache/distributed/IgniteCacheConnectionRecoveryTest.java | 4 ++++ .../integration/IgniteCacheNoReadThroughAbstractTest.java | 4 ++++ .../continuous/GridCacheContinuousQueryAbstractSelfTest.java | 4 ++++ .../ignite/internal/product/GridProductVersionSelfTest.java | 4 ++++ .../ignite/internal/sql/SqlParserBulkLoadSelfTest.java | 5 +++++ .../ignite/internal/sql/SqlParserCreateIndexSelfTest.java | 4 ++++ .../ignite/internal/sql/SqlParserDropIndexSelfTest.java | 4 ++++ .../ignite/internal/sql/SqlParserSetStreamingSelfTest.java | 4 ++++ .../internal/sql/SqlParserTransactionalKeywordsSelfTest.java | 4 ++++ .../apache/ignite/internal/sql/SqlParserUserSelfTest.java | 4 ++++ .../org/apache/ignite/internal/util/GridArraysSelfTest.java | 4 ++++ .../org/apache/ignite/internal/util/GridCleanerTest.java | 4 ++++ .../apache/ignite/internal/util/GridHandleTableSelfTest.java | 4 ++++ .../util/GridStartupWithUndefinedIgniteHomeSelfTest.java | 4 ++++ .../apache/ignite/internal/util/IgniteDevOnlyLogTest.java | 4 ++++ .../internal/util/IgniteExceptionRegistrySelfTest.java | 4 ++++ .../org/apache/ignite/internal/util/IgniteUtilsSelfTest.java | 4 ++++ .../org/apache/ignite/internal/util/StripedExecutorTest.java | 4 ++++ .../internal/util/future/GridCompoundFutureSelfTest.java | 4 ++++ .../internal/util/future/GridEmbeddedFutureSelfTest.java | 4 ++++ .../internal/util/future/GridFutureAdapterSelfTest.java | 4 ++++ .../ignite/internal/util/future/GridFutureQueueTest.java | 3 +-- .../ignite/internal/util/future/IgniteFutureImplTest.java | 4 ++++ .../util/future/nio/GridNioEmbeddedFutureSelfTest.java | 4 ++++ .../internal/util/future/nio/GridNioFutureSelfTest.java | 4 ++++ .../util/io/GridUnsafeDataInputOutputByteOrderSelfTest.java | 4 ++++ .../util/io/GridUnsafeDataOutputArraySizingSelfTest.java | 4 ++++ .../ipc/shmem/IpcSharedMemoryCrashDetectionSelfTest.java | 4 ++++ .../util/ipc/shmem/IpcSharedMemoryNativeLoaderSelfTest.java | 4 ++++ .../util/ipc/shmem/IpcSharedMemorySpaceSelfTest.java | 4 ++++ .../util/ipc/shmem/IpcSharedMemoryUtilsSelfTest.java | 4 ++++ .../internal/util/nio/GridNioDelimitedBufferSelfTest.java | 4 ++++ .../org/apache/ignite/internal/util/nio/GridNioSelfTest.java | 4 ++++ .../internal/util/nio/GridNioSessionMetaKeySelfTest.java | 4 ++++ .../apache/ignite/internal/util/nio/GridNioSslSelfTest.java | 4 ++++ .../apache/ignite/internal/util/nio/GridRoundTripTest.java | 4 ++++ .../util/nio/IgniteExceptionInNioWorkerSelfTest.java | 4 ++++ .../internal/util/nio/impl/GridNioFilterChainSelfTest.java | 4 ++++ .../util/offheap/GridOffHeapMapAbstractSelfTest.java | 4 ++++ .../util/offheap/GridOffHeapMapPerformanceAbstractTest.java | 4 ++++ .../offheap/GridOffHeapPartitionedMapAbstractSelfTest.java | 4 ++++ .../GridOffHeapPartitionedMapPerformanceAbstractTest.java | 4 ++++ .../util/offheap/unsafe/GridUnsafeMemorySelfTest.java | 4 ++++ .../util/offheap/unsafe/GridUnsafeStripedLruSefTest.java | 4 ++++ .../util/tostring/CircularStringBuilderSelfTest.java | 4 ++++ .../internal/util/tostring/GridToStringBuilderSelfTest.java | 4 ++++ .../internal/util/tostring/IncludeSensitiveAbstractTest.java | 4 ++++ 48 files changed, 187 insertions(+), 2 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheGroupsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheGroupsTest.java index 4cfc579c3c826..0463038bd5795 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheGroupsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheGroupsTest.java @@ -102,6 +102,7 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.jetbrains.annotations.Nullable; +import org.junit.Test; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheConnectionRecoveryTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheConnectionRecoveryTest.java index 11d3c31a4fd0f..144207ea5711d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheConnectionRecoveryTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheConnectionRecoveryTest.java @@ -40,6 +40,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.SECONDS; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; @@ -50,6 +53,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheConnectionRecoveryTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheNoReadThroughAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheNoReadThroughAbstractTest.java index 811a7e779ceae..49014a956aafd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheNoReadThroughAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheNoReadThroughAbstractTest.java @@ -37,6 +37,9 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -44,6 +47,7 @@ /** * Test for configuration property {@link CacheConfiguration#isReadThrough}. */ +@RunWith(JUnit4.class) public abstract class IgniteCacheNoReadThroughAbstractTest extends IgniteCacheAbstractTest { /** */ private Integer lastKey = 0; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java index 0f7103fc691b2..11757b6998d7c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java @@ -73,6 +73,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.SECONDS; @@ -91,6 +94,7 @@ /** * Continuous queries tests. */ +@RunWith(JUnit4.class) public abstract class GridCacheContinuousQueryAbstractSelfTest extends GridCommonAbstractTest implements Serializable { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/product/GridProductVersionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/product/GridProductVersionSelfTest.java index 02c274e9b8c04..58b3f97a39682 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/product/GridProductVersionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/product/GridProductVersionSelfTest.java @@ -19,6 +19,9 @@ import org.apache.ignite.lang.IgniteProductVersion; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.IgniteVersionUtils.BUILD_TSTAMP; import static org.apache.ignite.internal.IgniteVersionUtils.REV_HASH_STR; @@ -28,6 +31,7 @@ /** * Versions test. */ +@RunWith(JUnit4.class) public class GridProductVersionSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/sql/SqlParserBulkLoadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/sql/SqlParserBulkLoadSelfTest.java index d27b2b9409c38..60e489ed13d71 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/sql/SqlParserBulkLoadSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/sql/SqlParserBulkLoadSelfTest.java @@ -17,9 +17,14 @@ package org.apache.ignite.internal.sql; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + /** * Tests for SQL parser: COPY command. */ +@RunWith(JUnit4.class) public class SqlParserBulkLoadSelfTest extends SqlParserAbstractSelfTest { /** Tests for COPY command. */ @Test diff --git a/modules/core/src/test/java/org/apache/ignite/internal/sql/SqlParserCreateIndexSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/sql/SqlParserCreateIndexSelfTest.java index cf1cbf6a36dff..774a73bf01f98 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/sql/SqlParserCreateIndexSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/sql/SqlParserCreateIndexSelfTest.java @@ -26,6 +26,9 @@ import org.apache.ignite.internal.sql.command.SqlCreateIndexCommand; import org.apache.ignite.internal.sql.command.SqlIndexColumn; import org.apache.ignite.internal.util.typedef.F; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.sql.SqlKeyword.INLINE_SIZE; import static org.apache.ignite.internal.sql.SqlKeyword.PARALLEL; @@ -34,6 +37,7 @@ * Tests for SQL parser: CREATE INDEX. */ @SuppressWarnings({"UnusedReturnValue"}) +@RunWith(JUnit4.class) public class SqlParserCreateIndexSelfTest extends SqlParserAbstractSelfTest { /** Default properties */ private static final Map DEFAULT_PROPS = getProps(null, null); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/sql/SqlParserDropIndexSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/sql/SqlParserDropIndexSelfTest.java index b53ed7f0158b8..a6d668e26aad6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/sql/SqlParserDropIndexSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/sql/SqlParserDropIndexSelfTest.java @@ -18,10 +18,14 @@ package org.apache.ignite.internal.sql; import org.apache.ignite.internal.sql.command.SqlDropIndexCommand; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for SQL parser: CREATE INDEX. */ +@RunWith(JUnit4.class) public class SqlParserDropIndexSelfTest extends SqlParserAbstractSelfTest { /** * Tests for DROP INDEX command. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/sql/SqlParserSetStreamingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/sql/SqlParserSetStreamingSelfTest.java index 34868ca2481da..2b448ebcf8624 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/sql/SqlParserSetStreamingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/sql/SqlParserSetStreamingSelfTest.java @@ -19,10 +19,14 @@ import org.apache.ignite.internal.processors.query.QueryUtils; import org.apache.ignite.internal.sql.command.SqlSetStreamingCommand; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for SQL parser: SET STREAMING. */ +@RunWith(JUnit4.class) public class SqlParserSetStreamingSelfTest extends SqlParserAbstractSelfTest { /** * diff --git a/modules/core/src/test/java/org/apache/ignite/internal/sql/SqlParserTransactionalKeywordsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/sql/SqlParserTransactionalKeywordsSelfTest.java index 3d82c0ffafc7d..f2e12cfdaf7dd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/sql/SqlParserTransactionalKeywordsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/sql/SqlParserTransactionalKeywordsSelfTest.java @@ -21,10 +21,14 @@ import org.apache.ignite.internal.sql.command.SqlCommand; import org.apache.ignite.internal.sql.command.SqlCommitTransactionCommand; import org.apache.ignite.internal.sql.command.SqlRollbackTransactionCommand; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for processing of keywords BEGIN, COMMIT, ROLLBACK, START. */ +@RunWith(JUnit4.class) public class SqlParserTransactionalKeywordsSelfTest extends SqlParserAbstractSelfTest { /** * Test parsing of different forms of BEGIN/START. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/sql/SqlParserUserSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/sql/SqlParserUserSelfTest.java index c211c0ca76d6a..ec5b37d92c5b5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/sql/SqlParserUserSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/sql/SqlParserUserSelfTest.java @@ -20,11 +20,15 @@ import org.apache.ignite.internal.sql.command.SqlAlterUserCommand; import org.apache.ignite.internal.sql.command.SqlCreateUserCommand; import org.apache.ignite.internal.sql.command.SqlDropUserCommand; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for SQL parser: CREATE INDEX. */ @SuppressWarnings({"UnusedReturnValue"}) +@RunWith(JUnit4.class) public class SqlParserUserSelfTest extends SqlParserAbstractSelfTest { /** * Tests for CREATE USER command. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/GridArraysSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/GridArraysSelfTest.java index 897addc013ca7..7e032fb28de60 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/GridArraysSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/GridArraysSelfTest.java @@ -19,6 +19,9 @@ import java.util.Arrays; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.util.GridArrays.clearTail; import static org.apache.ignite.internal.util.GridArrays.remove; @@ -26,6 +29,7 @@ /** */ +@RunWith(JUnit4.class) public class GridArraysSelfTest extends GridCommonAbstractTest { /** */ private static final String[] EMPTY = {}; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/GridCleanerTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/GridCleanerTest.java index f9c00bf9fdce6..d6959edbfb1de 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/GridCleanerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/GridCleanerTest.java @@ -18,10 +18,14 @@ package org.apache.ignite.internal.util; import junit.framework.TestCase; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Grid cleaner tests. */ +@RunWith(JUnit4.class) public class GridCleanerTest extends TestCase { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/GridHandleTableSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/GridHandleTableSelfTest.java index 2c658f18df31d..ccbe84fd32c3c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/GridHandleTableSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/GridHandleTableSelfTest.java @@ -18,10 +18,14 @@ package org.apache.ignite.internal.util; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for {@link GridHandleTable}. */ +@RunWith(JUnit4.class) public class GridHandleTableSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/GridStartupWithUndefinedIgniteHomeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/GridStartupWithUndefinedIgniteHomeSelfTest.java index ef3a6d60f8f9d..53a3d0c767d32 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/GridStartupWithUndefinedIgniteHomeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/GridStartupWithUndefinedIgniteHomeSelfTest.java @@ -30,6 +30,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_HOME; import static org.apache.ignite.internal.util.IgniteUtils.nullifyHomeDirectory; @@ -42,6 +45,7 @@ * independent from {@link GridCommonAbstractTest} stuff. * 2. Do not replace native Java asserts with JUnit ones - test won't fall on TeamCity. */ +@RunWith(JUnit4.class) public class GridStartupWithUndefinedIgniteHomeSelfTest extends TestCase { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteDevOnlyLogTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteDevOnlyLogTest.java index 0c0bbe1f1c626..de3ba71cdd01e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteDevOnlyLogTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteDevOnlyLogTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.resources.IgniteInstanceResource; import org.apache.ignite.testframework.GridStringLogger; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Testing logging via {@link IgniteUtils#warnDevOnly(IgniteLogger, Object)}. */ +@RunWith(JUnit4.class) public class IgniteDevOnlyLogTest extends GridCommonAbstractTest { /** */ private List additionalArgs; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteExceptionRegistrySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteExceptionRegistrySelfTest.java index cb8524f6b527d..18aaded687335 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteExceptionRegistrySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteExceptionRegistrySelfTest.java @@ -24,11 +24,15 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @GridCommonTest(group = "Utils") +@RunWith(JUnit4.class) public class IgniteExceptionRegistrySelfTest extends GridCommonAbstractTest { /** */ private IgniteExceptionRegistry registry = IgniteExceptionRegistry.get(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteUtilsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteUtilsSelfTest.java index 84e590732125f..93b7586bd5f56 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteUtilsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteUtilsSelfTest.java @@ -77,6 +77,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonTest; import org.jetbrains.annotations.Nullable; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.Arrays.asList; import static org.junit.Assert.assertArrayEquals; @@ -85,6 +88,7 @@ * Grid utils tests. */ @GridCommonTest(group = "Utils") +@RunWith(JUnit4.class) public class IgniteUtilsSelfTest extends GridCommonAbstractTest { /** */ public static final int[] EMPTY = new int[0]; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/StripedExecutorTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/StripedExecutorTest.java index 41064e5436efb..0b4123a3bf652 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/StripedExecutorTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/StripedExecutorTest.java @@ -20,10 +20,14 @@ import org.apache.ignite.lang.IgniteInClosure; import org.apache.ignite.logger.java.JavaLogger; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class StripedExecutorTest extends GridCommonAbstractTest { /** */ private StripedExecutor stripedExecSvc; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/future/GridCompoundFutureSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/future/GridCompoundFutureSelfTest.java index 88c92e2b445fc..4d8756958ca46 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/future/GridCompoundFutureSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/future/GridCompoundFutureSelfTest.java @@ -25,10 +25,14 @@ import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.internal.util.typedef.internal.CU; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests compound future contracts. */ +@RunWith(JUnit4.class) public class GridCompoundFutureSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/future/GridEmbeddedFutureSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/future/GridEmbeddedFutureSelfTest.java index 4b01fdb42392f..4d3134935612c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/future/GridEmbeddedFutureSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/future/GridEmbeddedFutureSelfTest.java @@ -26,6 +26,9 @@ import org.apache.ignite.lang.IgniteBiClosure; import org.apache.ignite.testframework.junits.GridTestKernalContext; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.SECONDS; import static org.apache.ignite.configuration.CacheConfiguration.DFLT_MAX_CONCURRENT_ASYNC_OPS; @@ -33,6 +36,7 @@ /** * Tests grid embedded future use cases. */ +@RunWith(JUnit4.class) public class GridEmbeddedFutureSelfTest extends GridCommonAbstractTest { /** * Test kernal context. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/future/GridFutureAdapterSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/future/GridFutureAdapterSelfTest.java index 2c6f04624f0f8..e954afcc655aa 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/future/GridFutureAdapterSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/future/GridFutureAdapterSelfTest.java @@ -35,10 +35,14 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.GridTestKernalContext; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests grid future adapter use cases. */ +@RunWith(JUnit4.class) public class GridFutureAdapterSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/future/GridFutureQueueTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/future/GridFutureQueueTest.java index d8d58ca5f8949..0bc75ff00e478 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/future/GridFutureQueueTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/future/GridFutureQueueTest.java @@ -91,8 +91,7 @@ private static class QueueTest { * @param writers Number of writers threads. * @throws Exception If failed. */ - @Test - public void testQueue(long time, int writers) throws Exception { + public void testQueue(long time, int writers) throws Exception { System.out.println("Start test [writers=" + writers + ", time=" + time + "]"); Thread rdr = new Thread() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/future/IgniteFutureImplTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/future/IgniteFutureImplTest.java index 84eb4448d41c3..12f5bbe1c3b46 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/future/IgniteFutureImplTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/future/IgniteFutureImplTest.java @@ -37,10 +37,14 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteFutureImplTest extends GridCommonAbstractTest { /** Context thread name. */ private static final String CTX_THREAD_NAME = "test-async"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/future/nio/GridNioEmbeddedFutureSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/future/nio/GridNioEmbeddedFutureSelfTest.java index 6f193e4e05f3c..0b26d4f7c96f2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/future/nio/GridNioEmbeddedFutureSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/future/nio/GridNioEmbeddedFutureSelfTest.java @@ -20,12 +20,16 @@ import org.apache.ignite.internal.util.nio.GridNioEmbeddedFuture; import org.apache.ignite.internal.util.nio.GridNioFutureImpl; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.SECONDS; /** * Test for NIO embedded future. */ +@RunWith(JUnit4.class) public class GridNioEmbeddedFutureSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/future/nio/GridNioFutureSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/future/nio/GridNioFutureSelfTest.java index 2ba4342093a4f..86f19eb311eb5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/future/nio/GridNioFutureSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/future/nio/GridNioFutureSelfTest.java @@ -30,10 +30,14 @@ import org.apache.ignite.internal.util.typedef.CI1; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for NIO future. */ +@RunWith(JUnit4.class) public class GridNioFutureSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/io/GridUnsafeDataInputOutputByteOrderSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/io/GridUnsafeDataInputOutputByteOrderSelfTest.java index b0902e65c22e5..158fc98283466 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/io/GridUnsafeDataInputOutputByteOrderSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/io/GridUnsafeDataInputOutputByteOrderSelfTest.java @@ -20,6 +20,9 @@ import java.io.ByteArrayInputStream; import java.util.Random; import junit.framework.TestCase; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.GridTestIoUtils.getCharByByteLE; import static org.apache.ignite.GridTestIoUtils.getDoubleByByteLE; @@ -32,6 +35,7 @@ /** * Grid unsafe data input/output byte order sanity tests. */ +@RunWith(JUnit4.class) public class GridUnsafeDataInputOutputByteOrderSelfTest extends TestCase { /** Array length. */ private static final int ARR_LEN = 16; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/io/GridUnsafeDataOutputArraySizingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/io/GridUnsafeDataOutputArraySizingSelfTest.java index fd28d89c2d76a..42546204865dc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/io/GridUnsafeDataOutputArraySizingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/io/GridUnsafeDataOutputArraySizingSelfTest.java @@ -20,12 +20,16 @@ import org.apache.ignite.internal.util.lang.GridAbsPredicate; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_MARSHAL_BUFFERS_RECHECK; /** * Test for {@link GridUnsafeDataOutput}. */ +@RunWith(JUnit4.class) public class GridUnsafeDataOutputArraySizingSelfTest extends GridCommonAbstractTest { /** Small array. */ private static final byte[] SMALL = new byte[32]; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryCrashDetectionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryCrashDetectionSelfTest.java index 18051911bb238..4ed193738c19e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryCrashDetectionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryCrashDetectionSelfTest.java @@ -36,10 +36,14 @@ import org.apache.ignite.testframework.junits.IgniteTestResources; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test shared memory endpoints crash detection. */ +@RunWith(JUnit4.class) public class IpcSharedMemoryCrashDetectionSelfTest extends GridCommonAbstractTest { /** Timeout in ms between read/write attempts in busy-wait loops. */ public static final int RW_SLEEP_TIMEOUT = 50; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryNativeLoaderSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryNativeLoaderSelfTest.java index 7fbf76f2415f7..060d72d117eaa 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryNativeLoaderSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryNativeLoaderSelfTest.java @@ -24,10 +24,14 @@ import junit.framework.TestCase; import org.apache.ignite.internal.util.GridJavaProcess; import org.apache.ignite.internal.util.typedef.internal.U; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test shared memory native loader. */ +@RunWith(JUnit4.class) public class IpcSharedMemoryNativeLoaderSelfTest extends TestCase { /** diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemorySpaceSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemorySpaceSelfTest.java index 2fb7ee883bffa..7405da10723fc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemorySpaceSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemorySpaceSelfTest.java @@ -30,10 +30,14 @@ import org.apache.ignite.internal.util.lang.GridAbsPredicate; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IpcSharedMemorySpaceSelfTest extends GridCommonAbstractTest { /** */ public static final int DATA_LEN = 1024 * 1024; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryUtilsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryUtilsSelfTest.java index 28cc5a4005371..1b031e45be35f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryUtilsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryUtilsSelfTest.java @@ -21,10 +21,14 @@ import java.util.Collection; import org.apache.ignite.IgniteSystemProperties; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IpcSharedMemoryUtilsSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioDelimitedBufferSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioDelimitedBufferSelfTest.java index 5c321d785f2c1..a483f1ba285b5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioDelimitedBufferSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioDelimitedBufferSelfTest.java @@ -23,10 +23,14 @@ import java.util.List; import java.util.Random; import junit.framework.TestCase; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for {@link GridNioDelimitedBuffer}. */ +@RunWith(JUnit4.class) public class GridNioDelimitedBufferSelfTest extends TestCase { /** */ private static final String ASCII = "ASCII"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSelfTest.java index 572c98fd73fd8..d4065907db558 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSelfTest.java @@ -52,12 +52,16 @@ import org.apache.ignite.marshaller.Marshaller; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.SECONDS; /** * Tests for new NIO server. */ +@RunWith(JUnit4.class) public class GridNioSelfTest extends GridCommonAbstractTest { /** Message count in test without reconnect. */ private static final int MSG_CNT = 2000; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSessionMetaKeySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSessionMetaKeySelfTest.java index 428f21916806b..d825ae8c725e9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSessionMetaKeySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSessionMetaKeySelfTest.java @@ -22,10 +22,14 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for {@link GridNioSessionMetaKey}. */ +@RunWith(JUnit4.class) public class GridNioSessionMetaKeySelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSslSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSslSelfTest.java index d002a50fdb018..e8804eab44b31 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSslSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSslSelfTest.java @@ -24,10 +24,14 @@ import org.apache.ignite.internal.util.nio.ssl.GridNioSslFilter; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for new NIO server with SSL enabled. */ +@RunWith(JUnit4.class) public class GridNioSslSelfTest extends GridNioSelfTest { /** Test SSL context. */ private static SSLContext sslCtx; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridRoundTripTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridRoundTripTest.java index ab7f903ee7174..3d5b23ea04c1c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridRoundTripTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridRoundTripTest.java @@ -28,10 +28,14 @@ import java.util.Random; import junit.framework.TestCase; import org.apache.ignite.internal.util.typedef.internal.U; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests pure round trip time on network. */ +@RunWith(JUnit4.class) public class GridRoundTripTest extends TestCase { /** Communication port. */ public static final int PORT = 47600; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/nio/IgniteExceptionInNioWorkerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/nio/IgniteExceptionInNioWorkerSelfTest.java index cffbdfbc9c179..a5ba3c5e287f2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/nio/IgniteExceptionInNioWorkerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/nio/IgniteExceptionInNioWorkerSelfTest.java @@ -28,10 +28,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteExceptionInNioWorkerSelfTest extends GridCommonAbstractTest { /** */ private static final int GRID_CNT = 4; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/nio/impl/GridNioFilterChainSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/nio/impl/GridNioFilterChainSelfTest.java index da6ef730ef595..7563b334ef21f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/nio/impl/GridNioFilterChainSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/nio/impl/GridNioFilterChainSelfTest.java @@ -34,10 +34,14 @@ import org.apache.ignite.lang.IgniteInClosure; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests filter chain event processing. */ +@RunWith(JUnit4.class) public class GridNioFilterChainSelfTest extends GridCommonAbstractTest { /** Session opened event meta name. */ private static final int OPENED_META_NAME = 11; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/GridOffHeapMapAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/GridOffHeapMapAbstractSelfTest.java index 27377ca0644bb..6c9518ff86044 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/GridOffHeapMapAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/GridOffHeapMapAbstractSelfTest.java @@ -33,10 +33,14 @@ import org.apache.ignite.lang.IgniteBiTuple; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import java.util.concurrent.ConcurrentHashMap; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests off-heap map. */ +@RunWith(JUnit4.class) public abstract class GridOffHeapMapAbstractSelfTest extends GridCommonAbstractTest { /** Random. */ private static final Random RAND = new Random(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/GridOffHeapMapPerformanceAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/GridOffHeapMapPerformanceAbstractTest.java index ec3db2da72e52..c1bef7185c508 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/GridOffHeapMapPerformanceAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/GridOffHeapMapPerformanceAbstractTest.java @@ -23,10 +23,14 @@ import org.apache.ignite.internal.util.typedef.T3; import org.apache.ignite.internal.util.typedef.X; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests off-heap map. */ +@RunWith(JUnit4.class) public abstract class GridOffHeapMapPerformanceAbstractTest extends GridCommonAbstractTest { /** Random. */ private static final Random RAND = new Random(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/GridOffHeapPartitionedMapAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/GridOffHeapPartitionedMapAbstractSelfTest.java index 0e8bc5837c63e..241c6542b5699 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/GridOffHeapPartitionedMapAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/GridOffHeapPartitionedMapAbstractSelfTest.java @@ -33,10 +33,14 @@ import org.apache.ignite.internal.util.lang.GridTuple; import org.apache.ignite.lang.IgniteBiTuple; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests off-heap map. */ +@RunWith(JUnit4.class) public abstract class GridOffHeapPartitionedMapAbstractSelfTest extends GridCommonAbstractTest { /** Random. */ private static final Random RAND = new Random(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/GridOffHeapPartitionedMapPerformanceAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/GridOffHeapPartitionedMapPerformanceAbstractTest.java index 2fc5454a4293c..0a504a64916f4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/GridOffHeapPartitionedMapPerformanceAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/GridOffHeapPartitionedMapPerformanceAbstractTest.java @@ -29,11 +29,15 @@ import org.apache.ignite.internal.util.typedef.T3; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Performance test for partitioned offheap hash map. */ @SuppressWarnings({"unchecked", "NonThreadSafeLazyInitialization"}) +@RunWith(JUnit4.class) public abstract class GridOffHeapPartitionedMapPerformanceAbstractTest extends GridCommonAbstractTest { /** */ protected static final int LOAD_CNT = 256; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/unsafe/GridUnsafeMemorySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/unsafe/GridUnsafeMemorySelfTest.java index 0ab0c627b94f6..d2be2de0ebe30 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/unsafe/GridUnsafeMemorySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/unsafe/GridUnsafeMemorySelfTest.java @@ -23,10 +23,14 @@ import java.util.Collection; import org.apache.ignite.internal.util.GridUnsafe; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests unsafe memory. */ +@RunWith(JUnit4.class) public class GridUnsafeMemorySelfTest extends GridCommonAbstractTest { /** */ @Test diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/unsafe/GridUnsafeStripedLruSefTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/unsafe/GridUnsafeStripedLruSefTest.java index a8a3bfa04d7a3..57b7778a6e859 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/unsafe/GridUnsafeStripedLruSefTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/unsafe/GridUnsafeStripedLruSefTest.java @@ -21,11 +21,15 @@ import java.util.HashSet; import java.util.concurrent.atomic.AtomicInteger; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Striped LRU test. */ @SuppressWarnings("FieldCanBeLocal") +@RunWith(JUnit4.class) public class GridUnsafeStripedLruSefTest extends GridCommonAbstractTest { /** Number of stripes. */ private short stripes = 1; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/tostring/CircularStringBuilderSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/tostring/CircularStringBuilderSelfTest.java index 5546f0015a229..c90cec179e94d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/tostring/CircularStringBuilderSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/tostring/CircularStringBuilderSelfTest.java @@ -19,11 +19,15 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @GridCommonTest(group = "Utils") +@RunWith(JUnit4.class) public class CircularStringBuilderSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/tostring/GridToStringBuilderSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/tostring/GridToStringBuilderSelfTest.java index 521b3983616ef..fa00ba409f8f1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/tostring/GridToStringBuilderSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/tostring/GridToStringBuilderSelfTest.java @@ -37,6 +37,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_TO_STRING_COLLECTION_LIMIT; import static org.apache.ignite.IgniteSystemProperties.IGNITE_TO_STRING_MAX_LENGTH; @@ -46,6 +49,7 @@ * Tests for {@link GridToStringBuilder}. */ @GridCommonTest(group = "Utils") +@RunWith(JUnit4.class) public class GridToStringBuilderSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/tostring/IncludeSensitiveAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/tostring/IncludeSensitiveAbstractTest.java index a33bb4ce18bff..adacd772fba20 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/tostring/IncludeSensitiveAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/tostring/IncludeSensitiveAbstractTest.java @@ -25,10 +25,14 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.SensitiveInfoTestLoggerProxy; import org.apache.ignite.internal.processors.cache.GridCacheAbstractSelfTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for property {@link IgniteSystemProperties#IGNITE_TO_STRING_INCLUDE_SENSITIVE}. */ +@RunWith(JUnit4.class) public abstract class IncludeSensitiveAbstractTest extends GridCacheAbstractSelfTest { /** Number of test entries */ private static final int ENTRY_CNT = 10; From 17e86cb29c3f3accc65d464a0e0de4f4eac6a19e Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Mon, 3 Dec 2018 18:05:01 +0300 Subject: [PATCH 020/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview --- .../org/apache/ignite/internal/GridJobStealingSelfTest.java | 4 ++++ .../internal/GridJobStealingZeroActiveJobsSelfTest.java | 4 ++++ .../org/apache/ignite/internal/GridJobSubjectIdSelfTest.java | 4 ++++ .../internal/GridKernalConcurrentAccessStopSelfTest.java | 4 ++++ .../org/apache/ignite/internal/GridLifecycleBeanSelfTest.java | 4 ++++ .../org/apache/ignite/internal/GridListenActorSelfTest.java | 4 ++++ .../ignite/internal/GridLocalEventListenerSelfTest.java | 4 ++++ .../test/java/org/apache/ignite/internal/GridMBeansTest.java | 4 ++++ .../org/apache/ignite/internal/GridMultipleJobsSelfTest.java | 4 ++++ .../org/apache/ignite/internal/GridMultipleSpisSelfTest.java | 4 ++++ .../internal/GridMultipleVersionsDeploymentSelfTest.java | 4 ++++ .../ignite/internal/GridMultithreadedJobStealingSelfTest.java | 4 ++++ .../org/apache/ignite/internal/GridNodeFilterSelfTest.java | 4 ++++ .../org/apache/ignite/internal/GridNodeLocalSelfTest.java | 4 ++++ .../apache/ignite/internal/GridNodeMetricsLogSelfTest.java | 4 ++++ .../ignite/internal/GridNodeVisorAttributesSelfTest.java | 4 ++++ .../apache/ignite/internal/GridNonHistoryMetricsSelfTest.java | 4 ++++ .../ignite/internal/GridProjectionForCachesSelfTest.java | 4 ++++ .../GridProjectionLocalJobMultipleArgumentsSelfTest.java | 4 ++++ .../java/org/apache/ignite/internal/GridReduceSelfTest.java | 4 ++++ .../org/apache/ignite/internal/GridReleaseTypeSelfTest.java | 4 ++++ .../apache/ignite/internal/GridRuntimeExceptionSelfTest.java | 4 ++++ .../org/apache/ignite/internal/GridSameVmStartupSelfTest.java | 4 ++++ .../test/java/org/apache/ignite/internal/GridSelfTest.java | 4 ++++ .../org/apache/ignite/internal/GridSpiExceptionSelfTest.java | 4 ++++ .../org/apache/ignite/internal/GridStartStopSelfTest.java | 4 ++++ .../apache/ignite/internal/GridStopWithCancelSelfTest.java | 4 ++++ .../org/apache/ignite/internal/GridStopWithWaitSelfTest.java | 4 ++++ .../ignite/internal/GridTaskCancelSingleNodeSelfTest.java | 4 ++++ .../ignite/internal/GridTaskContinuousMapperSelfTest.java | 4 ++++ .../ignite/internal/GridTaskExecutionContextSelfTest.java | 4 ++++ .../org/apache/ignite/internal/GridTaskExecutionSelfTest.java | 4 ++++ .../ignite/internal/GridTaskFailoverAffinityRunTest.java | 4 ++++ .../org/apache/ignite/internal/GridTaskFailoverSelfTest.java | 4 ++++ .../ignite/internal/GridTaskFutureImplStopGridSelfTest.java | 4 ++++ .../ignite/internal/GridTaskInstanceExecutionSelfTest.java | 4 ++++ .../apache/ignite/internal/GridTaskInstantiationSelfTest.java | 4 ++++ .../org/apache/ignite/internal/GridTaskJobRejectSelfTest.java | 4 ++++ .../org/apache/ignite/internal/GridTaskListenerSelfTest.java | 4 ++++ .../org/apache/ignite/internal/GridTaskMapAsyncSelfTest.java | 4 ++++ .../ignite/internal/GridTaskNameAnnotationSelfTest.java | 4 ++++ .../apache/ignite/internal/GridTaskResultCacheSelfTest.java | 4 ++++ .../org/apache/ignite/internal/GridTaskTimeoutSelfTest.java | 4 ++++ .../ignite/internal/GridTopicExternalizableSelfTest.java | 4 ++++ .../java/org/apache/ignite/internal/GridVersionSelfTest.java | 4 ++++ .../IgniteClientConnectAfterCommunicationFailureTest.java | 4 ++++ .../internal/IgniteClientReconnectApiExceptionTest.java | 4 ++++ .../ignite/internal/IgniteClientReconnectAtomicsTest.java | 4 ++++ .../internal/IgniteClientReconnectBinaryContexTest.java | 4 ++++ .../ignite/internal/IgniteClientReconnectCacheTest.java | 4 ++++ .../ignite/internal/IgniteClientReconnectCollectionsTest.java | 4 ++++ .../ignite/internal/IgniteClientReconnectComputeTest.java | 4 ++++ .../IgniteClientReconnectContinuousProcessorTest.java | 4 ++++ .../ignite/internal/IgniteClientReconnectDelayedSpiTest.java | 4 ++++ .../internal/IgniteClientReconnectDiscoveryStateTest.java | 4 ++++ .../ignite/internal/IgniteClientReconnectFailoverTest.java | 4 ++++ .../ignite/internal/IgniteClientReconnectServicesTest.java | 4 ++++ .../apache/ignite/internal/IgniteClientReconnectStopTest.java | 4 ++++ .../ignite/internal/IgniteClientReconnectStreamerTest.java | 4 ++++ .../org/apache/ignite/internal/IgniteClientRejoinTest.java | 4 ++++ .../ignite/internal/IgniteComputeEmptyClusterGroupTest.java | 4 ++++ .../apache/ignite/internal/IgniteComputeJobOneThreadTest.java | 4 ++++ .../ignite/internal/IgniteComputeResultExceptionTest.java | 4 ++++ .../ignite/internal/IgniteComputeTopologyExceptionTest.java | 4 ++++ .../IgniteConcurrentEntryProcessorAccessStopTest.java | 4 ++++ .../IgniteConnectionConcurrentReserveAndRemoveTest.java | 4 ++++ .../ignite/internal/IgniteDiscoveryMassiveNodeFailTest.java | 4 ++++ .../org/apache/ignite/internal/IgniteExecutorServiceTest.java | 4 ++++ .../internal/IgniteExplicitImplicitDeploymentSelfTest.java | 4 ++++ .../apache/ignite/internal/IgniteInternalCacheRemoveTest.java | 4 ++++ .../ignite/internal/IgniteLocalNodeMapBeforeStartTest.java | 4 ++++ .../ignite/internal/IgniteReflectionFactorySelfTest.java | 4 ++++ .../IgniteRoundRobinErrorAfterClientReconnectTest.java | 4 ++++ .../ignite/internal/IgniteSlowClientDetectionSelfTest.java | 4 ++++ .../IgniteUpdateNotifierPerClusterSettingSelfTest.java | 4 ++++ .../org/apache/ignite/internal/LongJVMPauseDetectorTest.java | 4 ++++ .../ignite/internal/MarshallerContextLockingSelfTest.java | 4 ++++ .../apache/ignite/internal/MemoryLeaksOnRestartNodeTest.java | 4 ++++ .../java/org/apache/ignite/internal/TaskNodeRestartTest.java | 4 ++++ .../ignite/internal/TransactionMetricsMxBeanImplTest.java | 4 ++++ .../apache/ignite/internal/TransactionsMXBeanImplTest.java | 4 ++++ .../apache/ignite/internal/VisorManagementEventSelfTest.java | 4 ++++ 82 files changed, 328 insertions(+) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridJobStealingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridJobStealingSelfTest.java index c18652faa729e..f2879eff76346 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridJobStealingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridJobStealingSelfTest.java @@ -50,12 +50,16 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Job stealing test. */ @SuppressWarnings("unchecked") @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridJobStealingSelfTest extends GridCommonAbstractTest { /** Task execution timeout in milliseconds. */ private static final int TASK_EXEC_TIMEOUT_MS = 50000; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridJobStealingZeroActiveJobsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridJobStealingZeroActiveJobsSelfTest.java index 24a56a8b9e547..aee0e4893ad86 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridJobStealingZeroActiveJobsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridJobStealingZeroActiveJobsSelfTest.java @@ -39,11 +39,15 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Job stealing test. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridJobStealingZeroActiveJobsSelfTest extends GridCommonAbstractTest { /** */ private static Ignite ignite1; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridJobSubjectIdSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridJobSubjectIdSelfTest.java index 5d84c295c0911..354354bc7bf57 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridJobSubjectIdSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridJobSubjectIdSelfTest.java @@ -36,12 +36,16 @@ import org.apache.ignite.resources.TaskSessionResource; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.processors.task.GridTaskThreadContextKey.TC_SUBJ_ID; /** * Test job subject ID propagation. */ +@RunWith(JUnit4.class) public class GridJobSubjectIdSelfTest extends GridCommonAbstractTest { /** Job subject ID. */ private static volatile UUID taskSubjId; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridKernalConcurrentAccessStopSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridKernalConcurrentAccessStopSelfTest.java index 90c361c22887a..d797c1a83f177 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridKernalConcurrentAccessStopSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridKernalConcurrentAccessStopSelfTest.java @@ -20,6 +20,9 @@ import org.apache.ignite.events.Event; import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_NODE_FAILED; import static org.apache.ignite.events.EventType.EVT_NODE_JOINED; @@ -28,6 +31,7 @@ /** * Tests kernal stop while it is being accessed from asynchronous even listener. */ +@RunWith(JUnit4.class) public class GridKernalConcurrentAccessStopSelfTest extends GridCommonAbstractTest { /** Grid count. */ private static final int GRIDS = 2; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridLifecycleBeanSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridLifecycleBeanSelfTest.java index 1a97b687249d2..ed14ecff7b51b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridLifecycleBeanSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridLifecycleBeanSelfTest.java @@ -35,6 +35,9 @@ import org.apache.ignite.resources.IgniteInstanceResource; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.lifecycle.LifecycleEventType.AFTER_NODE_START; import static org.apache.ignite.lifecycle.LifecycleEventType.AFTER_NODE_STOP; @@ -45,6 +48,7 @@ * Lifecycle bean test. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridLifecycleBeanSelfTest extends GridCommonAbstractTest { /** */ private LifeCycleBaseBean bean; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridListenActorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridListenActorSelfTest.java index c2716f3b6cb61..04b9e423ac4f4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridListenActorSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridListenActorSelfTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.messaging.MessagingListenActor; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for {@link org.apache.ignite.messaging.MessagingListenActor}. */ +@RunWith(JUnit4.class) public class GridListenActorSelfTest extends GridCommonAbstractTest { /** */ private static final int MSG_QTY = 10; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridLocalEventListenerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridLocalEventListenerSelfTest.java index 5cbdc8cc74a1c..cd1be316dd667 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridLocalEventListenerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridLocalEventListenerSelfTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.events.EventType; import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test ensuring that event listeners are picked by started node. */ +@RunWith(JUnit4.class) public class GridLocalEventListenerSelfTest extends GridCommonAbstractTest { /** Whether event fired. */ private final CountDownLatch fired = new CountDownLatch(1); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridMBeansTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridMBeansTest.java index 4c52d0999c57c..48c5cb04b9129 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridMBeansTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridMBeansTest.java @@ -23,10 +23,14 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import javax.management.ObjectName; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for the standard JMX beans registered by the kernal. */ +@RunWith(JUnit4.class) public class GridMBeansTest extends GridCommonAbstractTest { /** Executor name for setExecutorConfiguration */ private static final String CUSTOM_EXECUTOR_0 = "Custom executor 0"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridMultipleJobsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridMultipleJobsSelfTest.java index ac07739dc43a8..6102c36e1cf70 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridMultipleJobsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridMultipleJobsSelfTest.java @@ -36,6 +36,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -43,6 +46,7 @@ * Tests multiple parallel jobs execution. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridMultipleJobsSelfTest extends GridCommonAbstractTest { /** */ private static final int LOG_MOD = 100; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridMultipleSpisSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridMultipleSpisSelfTest.java index f94fd47d4cefc..d894c0e208cb5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridMultipleSpisSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridMultipleSpisSelfTest.java @@ -42,11 +42,15 @@ import org.apache.ignite.spi.loadbalancing.roundrobin.RoundRobinLoadBalancingSpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Multiple SPIs test. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridMultipleSpisSelfTest extends GridCommonAbstractTest { /** */ private boolean isTaskFailoverCalled; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridMultipleVersionsDeploymentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridMultipleVersionsDeploymentSelfTest.java index d3452b2489d31..33bfb22ba86a9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridMultipleVersionsDeploymentSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridMultipleVersionsDeploymentSelfTest.java @@ -44,6 +44,9 @@ import org.apache.ignite.testframework.GridTestClassLoader; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.events.EventType.EVT_TASK_UNDEPLOYED; @@ -52,6 +55,7 @@ * */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridMultipleVersionsDeploymentSelfTest extends GridCommonAbstractTest { /** Excluded classes. */ private static final String[] EXCLUDE_CLASSES = new String[] { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridMultithreadedJobStealingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridMultithreadedJobStealingSelfTest.java index 7595fb1d2ee82..af494286da45b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridMultithreadedJobStealingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridMultithreadedJobStealingSelfTest.java @@ -47,11 +47,15 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Multithreaded job stealing test. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridMultithreadedJobStealingSelfTest extends GridCommonAbstractTest { /** */ private Ignite ignite; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridNodeFilterSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridNodeFilterSelfTest.java index 0863a7687f99d..c3a71f1c18d0f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridNodeFilterSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridNodeFilterSelfTest.java @@ -23,11 +23,15 @@ import org.apache.ignite.cluster.ClusterNode; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Node filter test. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridNodeFilterSelfTest extends GridCommonAbstractTest { /** Grid instance. */ private Ignite ignite; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridNodeLocalSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridNodeLocalSelfTest.java index 1e34ab3b434a7..07b4aa9125f10 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridNodeLocalSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridNodeLocalSelfTest.java @@ -26,11 +26,15 @@ import org.apache.ignite.mxbean.IgniteMXBean; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * This test will test node local storage. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridNodeLocalSelfTest extends GridCommonAbstractTest { /** Create test. */ public GridNodeLocalSelfTest() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridNodeMetricsLogSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridNodeMetricsLogSelfTest.java index 4dc9a6b69235e..8d9575f3cdcb0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridNodeMetricsLogSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridNodeMetricsLogSelfTest.java @@ -29,12 +29,16 @@ import org.apache.ignite.testframework.GridStringLogger; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Check logging local node metrics */ @SuppressWarnings({"ProhibitedExceptionDeclared"}) @GridCommonTest(group = "Kernal") +@RunWith(JUnit4.class) public class GridNodeMetricsLogSelfTest extends GridCommonAbstractTest { /** Executor name for setExecutorConfiguration */ private static final String CUSTOM_EXECUTOR_0 = "Custom executor 0"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridNodeVisorAttributesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridNodeVisorAttributesSelfTest.java index 79ba2a9a997bd..cdff29a13507b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridNodeVisorAttributesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridNodeVisorAttributesSelfTest.java @@ -21,10 +21,14 @@ import org.apache.ignite.Ignite; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Ensures that system properties required by Visor are always passed to node attributes. */ +@RunWith(JUnit4.class) public class GridNodeVisorAttributesSelfTest extends GridCommonAbstractTest { /** System properties required by Visor. */ private static final String[] SYSTEM_PROPS = new String[] { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridNonHistoryMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridNonHistoryMetricsSelfTest.java index 457d0e281bc6d..b224c18b8e660 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridNonHistoryMetricsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridNonHistoryMetricsSelfTest.java @@ -35,12 +35,16 @@ import org.apache.ignite.resources.LoggerResource; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_NODE_METRICS_UPDATED; /** * */ +@RunWith(JUnit4.class) public class GridNonHistoryMetricsSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionForCachesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionForCachesSelfTest.java index bf67e5daab98b..232caf67707d5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionForCachesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionForCachesSelfTest.java @@ -36,12 +36,16 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** * Tests for {@link ClusterGroup#forCacheNodes(String)} method. */ +@RunWith(JUnit4.class) public class GridProjectionForCachesSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionLocalJobMultipleArgumentsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionLocalJobMultipleArgumentsSelfTest.java index f8a6335457632..e7a0659c683e7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionLocalJobMultipleArgumentsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionLocalJobMultipleArgumentsSelfTest.java @@ -32,12 +32,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** * Tests for methods that run job locally with multiple arguments. */ +@RunWith(JUnit4.class) public class GridProjectionLocalJobMultipleArgumentsSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridReduceSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridReduceSelfTest.java index b6aaab3371dbd..45802619d62bd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridReduceSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridReduceSelfTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.lang.IgniteFuture; import org.apache.ignite.resources.LoggerResource; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test reduce with long operations. */ +@RunWith(JUnit4.class) public class GridReduceSelfTest extends GridCommonAbstractTest { /** Number of nodes in the grid. */ private static final int GRID_CNT = 3; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridReleaseTypeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridReleaseTypeSelfTest.java index 7acb8a07501c6..803f77f47fad1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridReleaseTypeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridReleaseTypeSelfTest.java @@ -27,10 +27,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test grids starting with non compatible release types. */ +@RunWith(JUnit4.class) public class GridReleaseTypeSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridRuntimeExceptionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridRuntimeExceptionSelfTest.java index 8030174762595..c5ad9ad594903 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridRuntimeExceptionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridRuntimeExceptionSelfTest.java @@ -40,6 +40,9 @@ import org.apache.ignite.resources.LoggerResource; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_TASK_FAILED; @@ -48,6 +51,7 @@ */ @SuppressWarnings({"ProhibitedExceptionDeclared"}) @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridRuntimeExceptionSelfTest extends GridCommonAbstractTest { /** */ private enum FailType { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridSameVmStartupSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridSameVmStartupSelfTest.java index 23277eb2bd782..9b7cdfcb930f7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridSameVmStartupSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridSameVmStartupSelfTest.java @@ -29,6 +29,9 @@ import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVTS_DISCOVERY; import static org.apache.ignite.events.EventType.EVT_NODE_FAILED; @@ -40,6 +43,7 @@ * events while stopping one them. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridSameVmStartupSelfTest extends GridCommonAbstractTest { /** * diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridSelfTest.java index 9c226f26f9b97..07ebe72374488 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridSelfTest.java @@ -29,11 +29,15 @@ import org.apache.ignite.messaging.MessagingListenActor; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for {@link org.apache.ignite.IgniteCluster}. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridSelfTest extends ClusterGroupAbstractTest { /** Nodes count. */ private static final int NODES_CNT = 4; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridSpiExceptionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridSpiExceptionSelfTest.java index 5466498b5871a..beef7a0d38f6d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridSpiExceptionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridSpiExceptionSelfTest.java @@ -36,11 +36,15 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests exceptions that are thrown by event storage and deployment spi. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridSpiExceptionSelfTest extends GridCommonAbstractTest { /** */ private static final String TEST_MSG = "Test exception message"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridStartStopSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridStartStopSelfTest.java index a1e47c42d7354..1f664f7531735 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridStartStopSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridStartStopSelfTest.java @@ -34,6 +34,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.SECONDS; import static org.apache.ignite.IgniteSystemProperties.IGNITE_OVERRIDE_MCAST_GRP; @@ -46,6 +49,7 @@ */ @SuppressWarnings({"InstanceofCatchParameter"}) @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridStartStopSelfTest extends GridCommonAbstractTest { /** */ public static final int COUNT = 1; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridStopWithCancelSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridStopWithCancelSelfTest.java index 22f08896dbcfb..e621d88acd2ef 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridStopWithCancelSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridStopWithCancelSelfTest.java @@ -33,11 +33,15 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests grid stop with jobs canceling. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridStopWithCancelSelfTest extends GridCommonAbstractTest { /** */ private static CountDownLatch cnt; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridStopWithWaitSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridStopWithWaitSelfTest.java index 1609e52455800..bb3e5825df576 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridStopWithWaitSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridStopWithWaitSelfTest.java @@ -48,11 +48,15 @@ import org.apache.ignite.spi.failover.always.AlwaysFailoverSpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests waiting for unfinished tasks while stopping the grid. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridStopWithWaitSelfTest extends GridCommonAbstractTest { /** Initial node that job has been mapped to. */ private static final AtomicReference nodeRef = new AtomicReference<>(null); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridTaskCancelSingleNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridTaskCancelSingleNodeSelfTest.java index 01eaa507b7400..22bfc7b0d4066 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridTaskCancelSingleNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridTaskCancelSingleNodeSelfTest.java @@ -38,6 +38,9 @@ import org.apache.ignite.resources.LoggerResource; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_JOB_CANCELLED; import static org.apache.ignite.events.EventType.EVT_JOB_FINISHED; @@ -47,6 +50,7 @@ /** * Test for task cancellation issue. */ +@RunWith(JUnit4.class) public class GridTaskCancelSingleNodeSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridTaskContinuousMapperSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridTaskContinuousMapperSelfTest.java index dbb313f3c80ed..c80a75fdeecb6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridTaskContinuousMapperSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridTaskContinuousMapperSelfTest.java @@ -38,11 +38,15 @@ import org.apache.ignite.resources.TaskContinuousMapperResource; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * {@link org.apache.ignite.compute.ComputeTaskContinuousMapper} test. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridTaskContinuousMapperSelfTest extends GridCommonAbstractTest { /** * @throws Exception If test failed. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridTaskExecutionContextSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridTaskExecutionContextSelfTest.java index 53c1a3b6a2e3c..2f8ce1da6290b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridTaskExecutionContextSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridTaskExecutionContextSelfTest.java @@ -35,10 +35,14 @@ import org.apache.ignite.resources.TaskSessionResource; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for {@code GridProjection.withXXX(..)} methods. */ +@RunWith(JUnit4.class) public class GridTaskExecutionContextSelfTest extends GridCommonAbstractTest { /** */ private static final AtomicInteger CNT = new AtomicInteger(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridTaskExecutionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridTaskExecutionSelfTest.java index 2c2d1d76dfa45..465a15d854e76 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridTaskExecutionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridTaskExecutionSelfTest.java @@ -33,11 +33,15 @@ import org.apache.ignite.resources.JobContextResource; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Task execution test. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridTaskExecutionSelfTest extends GridCommonAbstractTest { /** Grid instance. */ private Ignite ignite; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridTaskFailoverAffinityRunTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridTaskFailoverAffinityRunTest.java index 35b48c066bea5..f1354b541ae26 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridTaskFailoverAffinityRunTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridTaskFailoverAffinityRunTest.java @@ -33,6 +33,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -41,6 +44,7 @@ /** * */ +@RunWith(JUnit4.class) public class GridTaskFailoverAffinityRunTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridTaskFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridTaskFailoverSelfTest.java index db57c3a41db42..101c5adb634b2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridTaskFailoverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridTaskFailoverSelfTest.java @@ -32,11 +32,15 @@ import org.apache.ignite.resources.LoggerResource; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for task failover. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridTaskFailoverSelfTest extends GridCommonAbstractTest { /** Don't change it value. */ public static final int SPLIT_COUNT = 2; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridTaskFutureImplStopGridSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridTaskFutureImplStopGridSelfTest.java index a644155f292cc..33661ec376cd8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridTaskFutureImplStopGridSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridTaskFutureImplStopGridSelfTest.java @@ -38,11 +38,15 @@ import org.apache.ignite.resources.LoggerResource; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for task future when grid stops. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridTaskFutureImplStopGridSelfTest extends GridCommonAbstractTest { /** */ private static final int WAIT_TIME = 5000; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridTaskInstanceExecutionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridTaskInstanceExecutionSelfTest.java index 508b0ea6be6a3..4bda43105d477 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridTaskInstanceExecutionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridTaskInstanceExecutionSelfTest.java @@ -30,12 +30,16 @@ import org.apache.ignite.resources.LoggerResource; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Task instance execution test. */ @SuppressWarnings("PublicInnerClass") @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridTaskInstanceExecutionSelfTest extends GridCommonAbstractTest { /** */ private static Object testState; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridTaskInstantiationSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridTaskInstantiationSelfTest.java index e155162a70975..1e9b2b75de7fd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridTaskInstantiationSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridTaskInstantiationSelfTest.java @@ -32,12 +32,16 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests instantiation of various task types (defined as private inner class, without default constructor, non-public * default constructor). */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridTaskInstantiationSelfTest extends GridCommonAbstractTest { /** * Constructor. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridTaskJobRejectSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridTaskJobRejectSelfTest.java index 56bbf156b8f28..e5bc96694d08c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridTaskJobRejectSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridTaskJobRejectSelfTest.java @@ -35,6 +35,9 @@ import org.apache.ignite.spi.collision.fifoqueue.FifoQueueCollisionSpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.SECONDS; import static org.apache.ignite.events.EventType.EVTS_JOB_EXECUTION; @@ -47,6 +50,7 @@ /** * Test that rejected job is not failed over. */ +@RunWith(JUnit4.class) public class GridTaskJobRejectSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridTaskListenerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridTaskListenerSelfTest.java index a25140ac2a168..3505c4a2ff138 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridTaskListenerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridTaskListenerSelfTest.java @@ -34,11 +34,15 @@ import org.apache.ignite.lang.IgniteInClosure; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * This test checks that GridTaskListener is only called once per task. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridTaskListenerSelfTest extends GridCommonAbstractTest { /** */ public GridTaskListenerSelfTest() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridTaskMapAsyncSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridTaskMapAsyncSelfTest.java index 25aab1e2d4993..aa1135654dc4d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridTaskMapAsyncSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridTaskMapAsyncSelfTest.java @@ -36,11 +36,15 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridTaskMapAsyncSelfTest extends GridCommonAbstractTest { /** * diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridTaskNameAnnotationSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridTaskNameAnnotationSelfTest.java index 9d4bd58b19dbf..e46437105bf21 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridTaskNameAnnotationSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridTaskNameAnnotationSelfTest.java @@ -32,12 +32,16 @@ import org.apache.ignite.resources.TaskSessionResource; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.compute.ComputeJobResultPolicy.WAIT; /** * Tests for {@link org.apache.ignite.compute.ComputeTaskName} annotation. */ +@RunWith(JUnit4.class) public class GridTaskNameAnnotationSelfTest extends GridCommonAbstractTest { /** Task name. */ private static final String TASK_NAME = "test-task"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridTaskResultCacheSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridTaskResultCacheSelfTest.java index 2b56560ab34b5..cc5b7723f475d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridTaskResultCacheSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridTaskResultCacheSelfTest.java @@ -31,11 +31,15 @@ import org.apache.ignite.internal.util.typedef.G; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridTaskResultCacheSelfTest extends GridCommonAbstractTest { /** * diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridTaskTimeoutSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridTaskTimeoutSelfTest.java index e488f3d9a1b28..760d0a8e17b95 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridTaskTimeoutSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridTaskTimeoutSelfTest.java @@ -41,6 +41,9 @@ import org.apache.ignite.resources.LoggerResource; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_TASK_TIMEDOUT; @@ -48,6 +51,7 @@ * */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridTaskTimeoutSelfTest extends GridCommonAbstractTest { /** Number of jobs each task spawns. */ private static final int SPLIT_COUNT = 1; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridTopicExternalizableSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridTopicExternalizableSelfTest.java index a44115a2df30b..303f28075627d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridTopicExternalizableSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridTopicExternalizableSelfTest.java @@ -23,10 +23,14 @@ import org.apache.ignite.IgniteExternalizableAbstractTest; import org.apache.ignite.lang.IgniteUuid; import org.apache.ignite.marshaller.Marshaller; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Grid topic externalization test. */ +@RunWith(JUnit4.class) public class GridTopicExternalizableSelfTest extends IgniteExternalizableAbstractTest { /** */ private static final IgniteUuid A_GRID_UUID = IgniteUuid.randomUuid(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridVersionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridVersionSelfTest.java index b1d245cbe6389..396414cc98646 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridVersionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridVersionSelfTest.java @@ -21,12 +21,16 @@ import org.apache.ignite.lang.IgniteProductVersion; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_UPDATE_NOTIFIER; /** * Tests version methods. */ +@RunWith(JUnit4.class) public class GridVersionSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientConnectAfterCommunicationFailureTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientConnectAfterCommunicationFailureTest.java index 6dea13e11a908..4ae4c56da7910 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientConnectAfterCommunicationFailureTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientConnectAfterCommunicationFailureTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.internal.util.nio.GridCommunicationClient; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests client to be able restore connection to cluster on subsequent attempts after communication problems. */ +@RunWith(JUnit4.class) public class IgniteClientConnectAfterCommunicationFailureTest extends GridCommonAbstractTest { /** {@inheritDoc} */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectApiExceptionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectApiExceptionTest.java index 5fd57859f5b7a..e964ebb57e5e0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectApiExceptionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectApiExceptionTest.java @@ -54,6 +54,9 @@ import org.apache.ignite.resources.IgniteInstanceResource; import org.apache.ignite.spi.discovery.DiscoverySpi; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.SECONDS; import static org.apache.ignite.events.EventType.EVT_CLIENT_NODE_DISCONNECTED; @@ -62,6 +65,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteClientReconnectApiExceptionTest extends IgniteClientReconnectAbstractTest { /** Cache key for test put and invoke operation after reconnect */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectAtomicsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectAtomicsTest.java index 6f2dd6c196623..e786c31dac80e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectAtomicsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectAtomicsTest.java @@ -33,10 +33,14 @@ import org.apache.ignite.internal.processors.cache.distributed.near.GridNearLockResponse; import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxPrepareResponse; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteClientReconnectAtomicsTest extends IgniteClientReconnectAbstractTest { /** {@inheritDoc} */ @Override protected int serverCount() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectBinaryContexTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectBinaryContexTest.java index f068e232559d5..f7740fa217be1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectBinaryContexTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectBinaryContexTest.java @@ -25,10 +25,14 @@ import org.apache.ignite.cache.CacheMode; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteClientReconnectBinaryContexTest extends IgniteClientReconnectAbstractTest { /** {@inheritDoc} */ @Override protected int serverCount() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectCacheTest.java index 6d4e6c64ca31c..fb3530702ffb0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectCacheTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectCacheTest.java @@ -74,6 +74,9 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.apache.ignite.transactions.TransactionRollbackException; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; @@ -93,6 +96,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteClientReconnectCacheTest extends IgniteClientReconnectAbstractTest { /** */ private static final int SRV_CNT = 3; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectCollectionsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectCollectionsTest.java index 65a2c8361ecce..5ca64bcf0f90c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectCollectionsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectCollectionsTest.java @@ -29,6 +29,9 @@ import org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicUpdateResponse; import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxPrepareResponse; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -37,6 +40,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteClientReconnectCollectionsTest extends IgniteClientReconnectAbstractTest { /** */ private static final CollectionConfiguration TX_CFGS = new CollectionConfiguration(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectComputeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectComputeTest.java index 2d076f57738d6..2dcb580cdc687 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectComputeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectComputeTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.lang.IgniteCallable; import org.apache.ignite.lang.IgniteClosure; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteClientReconnectComputeTest extends IgniteClientReconnectAbstractTest { /** {@inheritDoc} */ @Override protected int serverCount() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectContinuousProcessorTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectContinuousProcessorTest.java index 2df067542fbb4..3e80a3f50c43c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectContinuousProcessorTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectContinuousProcessorTest.java @@ -33,6 +33,9 @@ import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.lang.IgniteRunnable; import org.apache.ignite.resources.IgniteInstanceResource; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.events.EventType.EVT_CLIENT_NODE_RECONNECTED; @@ -40,6 +43,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteClientReconnectContinuousProcessorTest extends IgniteClientReconnectAbstractTest { /** */ private static volatile CountDownLatch latch; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectDelayedSpiTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectDelayedSpiTest.java index cb1bc66957a63..8c70cec1e96ee 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectDelayedSpiTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectDelayedSpiTest.java @@ -30,11 +30,15 @@ import org.apache.ignite.lang.IgniteBiPredicate; import org.apache.ignite.plugin.extensions.communication.Message; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test cases for emulation of delayed messages sending with {@link TestRecordingCommunicationSpi} for blocking and * resending messages at the moment we need it. */ +@RunWith(JUnit4.class) public class IgniteClientReconnectDelayedSpiTest extends IgniteClientReconnectAbstractTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectDiscoveryStateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectDiscoveryStateTest.java index 62b6bf32c1f0b..d002667632255 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectDiscoveryStateTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectDiscoveryStateTest.java @@ -28,6 +28,9 @@ import org.apache.ignite.lang.IgniteFuture; import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.spi.discovery.DiscoverySpi; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_CLIENT_NODE_DISCONNECTED; import static org.apache.ignite.events.EventType.EVT_CLIENT_NODE_RECONNECTED; @@ -35,6 +38,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteClientReconnectDiscoveryStateTest extends IgniteClientReconnectAbstractTest { /** {@inheritDoc} */ @Override protected int serverCount() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectFailoverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectFailoverTest.java index 5c5542e08cb9a..dd652ddf29e17 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectFailoverTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectFailoverTest.java @@ -34,6 +34,9 @@ import org.apache.ignite.lang.IgniteCallable; import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -43,6 +46,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteClientReconnectFailoverTest extends IgniteClientReconnectFailoverAbstractTest { /** */ protected static final String ATOMIC_CACHE = "ATOMIC_CACHE"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectServicesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectServicesTest.java index 60a01bc483ca9..98803e0f18888 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectServicesTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectServicesTest.java @@ -30,10 +30,14 @@ import org.apache.ignite.services.Service; import org.apache.ignite.services.ServiceContext; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteClientReconnectServicesTest extends IgniteClientReconnectAbstractTest { /** {@inheritDoc} */ @Override protected int serverCount() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectStopTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectStopTest.java index 56431178221b7..f83b5d80c94ff 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectStopTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectStopTest.java @@ -27,6 +27,9 @@ import org.apache.ignite.lang.IgniteFuture; import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.spi.discovery.DiscoverySpi; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_CLIENT_NODE_DISCONNECTED; import static org.apache.ignite.events.EventType.EVT_CLIENT_NODE_RECONNECTED; @@ -34,6 +37,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteClientReconnectStopTest extends IgniteClientReconnectAbstractTest { /** {@inheritDoc} */ @Override protected int serverCount() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectStreamerTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectStreamerTest.java index 252a54029bd6f..88a38b64b790f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectStreamerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectStreamerTest.java @@ -29,6 +29,9 @@ import org.apache.ignite.internal.processors.datastreamer.DataStreamerResponse; import org.apache.ignite.internal.util.lang.GridAbsPredicate; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -36,6 +39,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteClientReconnectStreamerTest extends IgniteClientReconnectAbstractTest { /** */ public static final String CACHE_NAME = "streamer"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientRejoinTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientRejoinTest.java index 1acec842af293..53fd4eb44b1fa 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientRejoinTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientRejoinTest.java @@ -49,10 +49,14 @@ import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryAbstractMessage; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests client to be able restore connection to cluster if coordination is not available. */ +@RunWith(JUnit4.class) public class IgniteClientRejoinTest extends GridCommonAbstractTest { /** Block. */ private volatile boolean block; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteComputeEmptyClusterGroupTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteComputeEmptyClusterGroupTest.java index 9f0cb9bf6be17..ea7f9ec6ac3d8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteComputeEmptyClusterGroupTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteComputeEmptyClusterGroupTest.java @@ -33,12 +33,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** * */ +@RunWith(JUnit4.class) public class IgniteComputeEmptyClusterGroupTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteComputeJobOneThreadTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteComputeJobOneThreadTest.java index 16b1996d20a1e..8d1b44437539b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteComputeJobOneThreadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteComputeJobOneThreadTest.java @@ -23,10 +23,14 @@ import org.apache.ignite.lang.IgniteRunnable; import org.apache.ignite.spi.collision.fifoqueue.FifoQueueCollisionSpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test of absence of gaps between jobs in compute */ +@RunWith(JUnit4.class) public class IgniteComputeJobOneThreadTest extends GridCommonAbstractTest { @Override protected IgniteConfiguration getConfiguration(String name) throws Exception { FifoQueueCollisionSpi colSpi = new FifoQueueCollisionSpi(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteComputeResultExceptionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteComputeResultExceptionTest.java index 3a783cc71ac26..59a476cc178b7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteComputeResultExceptionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteComputeResultExceptionTest.java @@ -31,11 +31,15 @@ import org.apache.ignite.compute.ComputeTaskFuture; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Testing that if {@link ComputeTask#result(ComputeJobResult, List)} throws an {@link IgniteException} * then that exception is thrown as the execution result. */ +@RunWith(JUnit4.class) public class IgniteComputeResultExceptionTest extends GridCommonAbstractTest { /** */ @Test diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteComputeTopologyExceptionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteComputeTopologyExceptionTest.java index f6eb74f79ac68..583b9e42a4293 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteComputeTopologyExceptionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteComputeTopologyExceptionTest.java @@ -26,12 +26,16 @@ import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.lang.IgniteCallable; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.GridClosureCallMode.BALANCE; /** * */ +@RunWith(JUnit4.class) public class IgniteComputeTopologyExceptionTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteConcurrentEntryProcessorAccessStopTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteConcurrentEntryProcessorAccessStopTest.java index b210ea00ed7da..ac2e1e8d52364 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteConcurrentEntryProcessorAccessStopTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteConcurrentEntryProcessorAccessStopTest.java @@ -23,10 +23,14 @@ import org.apache.ignite.IgniteCache; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests node stop while it is being accessed from EntryProcessor. */ +@RunWith(JUnit4.class) public class IgniteConcurrentEntryProcessorAccessStopTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteConnectionConcurrentReserveAndRemoveTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteConnectionConcurrentReserveAndRemoveTest.java index c8a50c0635fdd..ec58c1efcca93 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteConnectionConcurrentReserveAndRemoveTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteConnectionConcurrentReserveAndRemoveTest.java @@ -35,9 +35,13 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** */ +@RunWith(JUnit4.class) public class IgniteConnectionConcurrentReserveAndRemoveTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteDiscoveryMassiveNodeFailTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteDiscoveryMassiveNodeFailTest.java index c5a3651f1bff1..50b771bc7f9dd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteDiscoveryMassiveNodeFailTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteDiscoveryMassiveNodeFailTest.java @@ -38,12 +38,16 @@ import org.apache.ignite.spi.discovery.tcp.internal.TcpDiscoveryNode; import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryAbstractMessage; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests checks case when one node is unable to connect to next in a ring, * but those nodes are not experiencing any connectivity troubles between * each other. */ +@RunWith(JUnit4.class) public class IgniteDiscoveryMassiveNodeFailTest extends GridCommonAbstractTest { /** */ private static final int FAILURE_DETECTION_TIMEOUT = 5_000; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteExecutorServiceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteExecutorServiceTest.java index 3593a08fe9d55..c7b0cf83b2237 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteExecutorServiceTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteExecutorServiceTest.java @@ -32,11 +32,15 @@ import org.apache.ignite.resources.IgniteInstanceResource; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Grid distributed executor test. */ @GridCommonTest(group = "Thread Tests") +@RunWith(JUnit4.class) public class IgniteExecutorServiceTest extends GridCommonAbstractTest { /** */ public IgniteExecutorServiceTest() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteExplicitImplicitDeploymentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteExplicitImplicitDeploymentSelfTest.java index bc702be889994..c39e7250d1993 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteExplicitImplicitDeploymentSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteExplicitImplicitDeploymentSelfTest.java @@ -46,11 +46,15 @@ import org.apache.ignite.testframework.GridTestClassLoader; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class IgniteExplicitImplicitDeploymentSelfTest extends GridCommonAbstractTest { /** */ public IgniteExplicitImplicitDeploymentSelfTest() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteInternalCacheRemoveTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteInternalCacheRemoveTest.java index 19ac5dd73caaf..9ea04bc7dbefe 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteInternalCacheRemoveTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteInternalCacheRemoveTest.java @@ -19,10 +19,14 @@ import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.processors.cache.GridCacheAbstractSelfTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteInternalCacheRemoveTest extends GridCacheAbstractSelfTest { /** {@inheritDoc} */ @Override protected int gridCount() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteLocalNodeMapBeforeStartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteLocalNodeMapBeforeStartTest.java index 040417040bea1..e331bfb9b7a44 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteLocalNodeMapBeforeStartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteLocalNodeMapBeforeStartTest.java @@ -26,6 +26,9 @@ import org.apache.ignite.lifecycle.LifecycleEventType; import org.apache.ignite.resources.IgniteInstanceResource; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.lifecycle.LifecycleEventType.AFTER_NODE_START; import static org.apache.ignite.lifecycle.LifecycleEventType.AFTER_NODE_STOP; @@ -35,6 +38,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteLocalNodeMapBeforeStartTest extends GridCommonAbstractTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteReflectionFactorySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteReflectionFactorySelfTest.java index e317722725276..ebe3da791148c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteReflectionFactorySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteReflectionFactorySelfTest.java @@ -22,10 +22,14 @@ import java.util.Map; import junit.framework.TestCase; import org.apache.ignite.configuration.IgniteReflectionFactory; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for {@link IgniteReflectionFactory} class. */ +@RunWith(JUnit4.class) public class IgniteReflectionFactorySelfTest extends TestCase { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteRoundRobinErrorAfterClientReconnectTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteRoundRobinErrorAfterClientReconnectTest.java index c82fb0d44b502..b1ebbfea16fcb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteRoundRobinErrorAfterClientReconnectTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteRoundRobinErrorAfterClientReconnectTest.java @@ -25,10 +25,14 @@ import org.apache.ignite.lang.IgniteClosure; import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test to reproduce IGNITE-4060. */ +@RunWith(JUnit4.class) public class IgniteRoundRobinErrorAfterClientReconnectTest extends GridCommonAbstractTest { /** Server index. */ private static final int SRV_IDX = 0; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteSlowClientDetectionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteSlowClientDetectionSelfTest.java index 3e7ed6520a2d0..58f956248d039 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteSlowClientDetectionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteSlowClientDetectionSelfTest.java @@ -41,12 +41,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; /** * */ +@RunWith(JUnit4.class) public class IgniteSlowClientDetectionSelfTest extends GridCommonAbstractTest { /** */ public static final String PARTITIONED = "partitioned"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteUpdateNotifierPerClusterSettingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteUpdateNotifierPerClusterSettingSelfTest.java index f47c4a63e04f8..0187925df279d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteUpdateNotifierPerClusterSettingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteUpdateNotifierPerClusterSettingSelfTest.java @@ -26,9 +26,13 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** */ +@RunWith(JUnit4.class) public class IgniteUpdateNotifierPerClusterSettingSelfTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/LongJVMPauseDetectorTest.java b/modules/core/src/test/java/org/apache/ignite/internal/LongJVMPauseDetectorTest.java index 3a200b1ce1ffb..34a58e69ffc7f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/LongJVMPauseDetectorTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/LongJVMPauseDetectorTest.java @@ -20,10 +20,14 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.testframework.GridStringLogger; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests if LongJVMPauseDetector starts properly. */ +@RunWith(JUnit4.class) public class LongJVMPauseDetectorTest extends GridCommonAbstractTest { /** */ private GridStringLogger strLog; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/MarshallerContextLockingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/MarshallerContextLockingSelfTest.java index 7ac948b2ea62e..1f153064b6683 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/MarshallerContextLockingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/MarshallerContextLockingSelfTest.java @@ -35,12 +35,16 @@ import org.apache.ignite.testframework.junits.GridTestKernalContext; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.logger.GridTestLog4jLogger; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.MarshallerPlatformIds.JAVA_ID; /** * Test marshaller context. */ +@RunWith(JUnit4.class) public class MarshallerContextLockingSelfTest extends GridCommonAbstractTest { /** Inner logger. */ private InnerLogger innerLog; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/MemoryLeaksOnRestartNodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/MemoryLeaksOnRestartNodeTest.java index b8420d063cdac..88fc226e2d479 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/MemoryLeaksOnRestartNodeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/MemoryLeaksOnRestartNodeTest.java @@ -24,10 +24,14 @@ import org.apache.ignite.internal.util.GridDebug; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests leaks on node restart with enabled persistence. */ +@RunWith(JUnit4.class) public class MemoryLeaksOnRestartNodeTest extends GridCommonAbstractTest { /** Heap dump file name. */ private static final String HEAP_DUMP_FILE_NAME = "test.hprof"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/TaskNodeRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/TaskNodeRestartTest.java index 765db8a938443..4e8a6341d3253 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/TaskNodeRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/TaskNodeRestartTest.java @@ -43,10 +43,14 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class TaskNodeRestartTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/TransactionMetricsMxBeanImplTest.java b/modules/core/src/test/java/org/apache/ignite/internal/TransactionMetricsMxBeanImplTest.java index c4d41fdee4857..14cfade63a345 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/TransactionMetricsMxBeanImplTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/TransactionMetricsMxBeanImplTest.java @@ -37,6 +37,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -46,6 +49,7 @@ /** * */ +@RunWith(JUnit4.class) public class TransactionMetricsMxBeanImplTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/TransactionsMXBeanImplTest.java b/modules/core/src/test/java/org/apache/ignite/internal/TransactionsMXBeanImplTest.java index cda697010366c..fe6576c3f495e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/TransactionsMXBeanImplTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/TransactionsMXBeanImplTest.java @@ -31,6 +31,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -38,6 +41,7 @@ /** * */ +@RunWith(JUnit4.class) public class TransactionsMXBeanImplTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/VisorManagementEventSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/VisorManagementEventSelfTest.java index 643c6b393e91f..3ebb79aebf074 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/VisorManagementEventSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/VisorManagementEventSelfTest.java @@ -33,12 +33,16 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_MANAGEMENT_TASK_STARTED;; /** * */ +@RunWith(JUnit4.class) public class VisorManagementEventSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { From 339cca95c36d0e6e738d1b90b14819b3bb57a145 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Mon, 3 Dec 2018 18:16:39 +0300 Subject: [PATCH 021/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview --- .../src/test/java/org/apache/ignite/jvmtest/FileIOTest.java | 4 ++++ .../test/java/org/apache/ignite/jvmtest/FileLocksTest.java | 4 ++++ .../java/org/apache/ignite/jvmtest/LinkedHashMapTest.java | 4 ++++ .../java/org/apache/ignite/jvmtest/NetworkFailureTest.java | 4 ++++ .../ignite/jvmtest/QueueSizeCounterMultiThreadedTest.java | 4 ++++ .../apache/ignite/jvmtest/ReadWriteLockMultiThreadedTest.java | 4 ++++ .../src/test/java/org/apache/ignite/jvmtest/RegExpTest.java | 4 ++++ .../apache/ignite/jvmtest/ServerSocketMultiThreadedTest.java | 4 ++++ .../org/apache/ignite/lang/GridByteArrayListSelfTest.java | 4 ++++ .../java/org/apache/ignite/lang/GridFuncPerformanceTest.java | 4 ++++ .../apache/ignite/lang/GridMetadataAwareAdapterLoadTest.java | 4 ++++ .../apache/ignite/lang/GridMetadataAwareAdapterSelfTest.java | 4 ++++ .../java/org/apache/ignite/lang/GridSetWrapperSelfTest.java | 4 ++++ .../test/java/org/apache/ignite/lang/GridTupleSelfTest.java | 4 ++++ .../src/test/java/org/apache/ignite/lang/GridXSelfTest.java | 4 ++++ .../test/java/org/apache/ignite/lang/IgniteUuidSelfTest.java | 4 ++++ .../utils/GridBoundedConcurrentLinkedHashMapSelfTest.java | 4 ++++ .../lang/utils/GridBoundedConcurrentOrderedMapSelfTest.java | 4 ++++ .../ignite/lang/utils/GridBoundedPriorityQueueSelfTest.java | 4 ++++ .../ignite/lang/utils/GridCircularBufferPerformanceTest.java | 4 ++++ .../apache/ignite/lang/utils/GridCircularBufferSelfTest.java | 4 ++++ .../lang/utils/GridConcurrentLinkedHashMapSelfTest.java | 4 ++++ .../ignite/lang/utils/GridConcurrentWeakHashSetSelfTest.java | 4 ++++ .../apache/ignite/lang/utils/GridConsistentHashSelfTest.java | 4 ++++ .../apache/ignite/lang/utils/GridLeanIdentitySetSelfTest.java | 4 ++++ .../apache/ignite/lang/utils/GridLeanMapPerformanceTest.java | 4 ++++ .../org/apache/ignite/lang/utils/GridLeanMapSelfTest.java | 4 ++++ .../org/apache/ignite/lang/utils/GridListSetSelfTest.java | 4 ++++ .../org/apache/ignite/lang/utils/GridStripedLockSelfTest.java | 4 ++++ .../ignite/lang/utils/IgniteOffheapReadWriteLockSelfTest.java | 4 ++++ 30 files changed, 120 insertions(+) diff --git a/modules/core/src/test/java/org/apache/ignite/jvmtest/FileIOTest.java b/modules/core/src/test/java/org/apache/ignite/jvmtest/FileIOTest.java index 8932c04479905..a2f7e8ff181c3 100644 --- a/modules/core/src/test/java/org/apache/ignite/jvmtest/FileIOTest.java +++ b/modules/core/src/test/java/org/apache/ignite/jvmtest/FileIOTest.java @@ -24,10 +24,14 @@ import junit.framework.TestCase; import org.apache.ignite.internal.util.typedef.X; import org.apache.ignite.internal.util.typedef.internal.U; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Java file IO test. */ +@RunWith(JUnit4.class) public class FileIOTest extends TestCase { /** File path. */ private static final String FILE_PATH = "/test-java-file.tmp"; diff --git a/modules/core/src/test/java/org/apache/ignite/jvmtest/FileLocksTest.java b/modules/core/src/test/java/org/apache/ignite/jvmtest/FileLocksTest.java index c1bbc50f182ce..01d359822e25e 100644 --- a/modules/core/src/test/java/org/apache/ignite/jvmtest/FileLocksTest.java +++ b/modules/core/src/test/java/org/apache/ignite/jvmtest/FileLocksTest.java @@ -22,10 +22,14 @@ import java.nio.channels.FileLock; import javax.swing.JOptionPane; import junit.framework.TestCase; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Java file locks test. */ +@RunWith(JUnit4.class) public class FileLocksTest extends TestCase { /** File path (on Windows file will be created under the root directory of the current drive). */ private static final String LOCK_FILE_PATH = "/test-java-file-lock-tmp.bin"; diff --git a/modules/core/src/test/java/org/apache/ignite/jvmtest/LinkedHashMapTest.java b/modules/core/src/test/java/org/apache/ignite/jvmtest/LinkedHashMapTest.java index 305494a42917e..8155ab5c7feea 100644 --- a/modules/core/src/test/java/org/apache/ignite/jvmtest/LinkedHashMapTest.java +++ b/modules/core/src/test/java/org/apache/ignite/jvmtest/LinkedHashMapTest.java @@ -21,10 +21,14 @@ import java.util.Map; import junit.framework.TestCase; import org.apache.ignite.internal.util.typedef.X; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for {@link LinkedHashMap}. */ +@RunWith(JUnit4.class) public class LinkedHashMapTest extends TestCase { /** @throws Exception If failed. */ @Test diff --git a/modules/core/src/test/java/org/apache/ignite/jvmtest/NetworkFailureTest.java b/modules/core/src/test/java/org/apache/ignite/jvmtest/NetworkFailureTest.java index 7e865eaf4e0d7..486265a2dcd7e 100644 --- a/modules/core/src/test/java/org/apache/ignite/jvmtest/NetworkFailureTest.java +++ b/modules/core/src/test/java/org/apache/ignite/jvmtest/NetworkFailureTest.java @@ -32,10 +32,14 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.GridTestUtils; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class NetworkFailureTest extends TestCase { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/jvmtest/QueueSizeCounterMultiThreadedTest.java b/modules/core/src/test/java/org/apache/ignite/jvmtest/QueueSizeCounterMultiThreadedTest.java index fd9ad2516e93e..4db09ea57d0c3 100644 --- a/modules/core/src/test/java/org/apache/ignite/jvmtest/QueueSizeCounterMultiThreadedTest.java +++ b/modules/core/src/test/java/org/apache/ignite/jvmtest/QueueSizeCounterMultiThreadedTest.java @@ -28,10 +28,14 @@ import org.apache.ignite.internal.util.typedef.X; import org.apache.ignite.testframework.GridTestUtils; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test to check strange assertion in eviction manager. */ +@RunWith(JUnit4.class) public class QueueSizeCounterMultiThreadedTest extends TestCase { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/jvmtest/ReadWriteLockMultiThreadedTest.java b/modules/core/src/test/java/org/apache/ignite/jvmtest/ReadWriteLockMultiThreadedTest.java index ca0993e5e464a..f89d84697c35c 100644 --- a/modules/core/src/test/java/org/apache/ignite/jvmtest/ReadWriteLockMultiThreadedTest.java +++ b/modules/core/src/test/java/org/apache/ignite/jvmtest/ReadWriteLockMultiThreadedTest.java @@ -25,10 +25,14 @@ import org.apache.ignite.internal.util.typedef.X; import org.apache.ignite.testframework.GridTestUtils; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * JDK read write lock test. */ +@RunWith(JUnit4.class) public class ReadWriteLockMultiThreadedTest extends TestCase { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/jvmtest/RegExpTest.java b/modules/core/src/test/java/org/apache/ignite/jvmtest/RegExpTest.java index 4e0d5c51aa129..6d90611c5b02c 100644 --- a/modules/core/src/test/java/org/apache/ignite/jvmtest/RegExpTest.java +++ b/modules/core/src/test/java/org/apache/ignite/jvmtest/RegExpTest.java @@ -22,10 +22,14 @@ import junit.framework.TestCase; import org.apache.ignite.internal.util.typedef.X; import org.apache.ignite.internal.util.typedef.internal.U; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Java reg exp test. */ +@RunWith(JUnit4.class) public class RegExpTest extends TestCase { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/jvmtest/ServerSocketMultiThreadedTest.java b/modules/core/src/test/java/org/apache/ignite/jvmtest/ServerSocketMultiThreadedTest.java index 8b6a676d83769..1aee5f1f8ae30 100644 --- a/modules/core/src/test/java/org/apache/ignite/jvmtest/ServerSocketMultiThreadedTest.java +++ b/modules/core/src/test/java/org/apache/ignite/jvmtest/ServerSocketMultiThreadedTest.java @@ -29,6 +29,9 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.GridTestUtils; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Java server socket test. @@ -37,6 +40,7 @@ * BindException or SocketException may be thrown. Purpose of this test is * to find some explanation to that. */ +@RunWith(JUnit4.class) public class ServerSocketMultiThreadedTest extends TestCase { /** */ private static final int THREADS_CNT = 10; diff --git a/modules/core/src/test/java/org/apache/ignite/lang/GridByteArrayListSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/GridByteArrayListSelfTest.java index 8f42a54ce9e22..f99277ce845cf 100644 --- a/modules/core/src/test/java/org/apache/ignite/lang/GridByteArrayListSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/lang/GridByteArrayListSelfTest.java @@ -25,11 +25,15 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @GridCommonTest(group = "Lang") +@RunWith(JUnit4.class) public class GridByteArrayListSelfTest extends GridCommonAbstractTest { /** * diff --git a/modules/core/src/test/java/org/apache/ignite/lang/GridFuncPerformanceTest.java b/modules/core/src/test/java/org/apache/ignite/lang/GridFuncPerformanceTest.java index f8c33a4d93f4a..1d688db981a64 100644 --- a/modules/core/src/test/java/org/apache/ignite/lang/GridFuncPerformanceTest.java +++ b/modules/core/src/test/java/org/apache/ignite/lang/GridFuncPerformanceTest.java @@ -23,11 +23,15 @@ import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * GridFunc performance test. */ @GridCommonTest(group = "Lang") +@RunWith(JUnit4.class) public class GridFuncPerformanceTest extends GridCommonAbstractTest { /** * Creates test. diff --git a/modules/core/src/test/java/org/apache/ignite/lang/GridMetadataAwareAdapterLoadTest.java b/modules/core/src/test/java/org/apache/ignite/lang/GridMetadataAwareAdapterLoadTest.java index d9c29673f3c9b..bc4c55e86a1a5 100644 --- a/modules/core/src/test/java/org/apache/ignite/lang/GridMetadataAwareAdapterLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/lang/GridMetadataAwareAdapterLoadTest.java @@ -22,11 +22,15 @@ import org.apache.ignite.internal.processors.cache.eviction.GridCacheMockEntry; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Check how much memory and time required to fill 1_000_000 entries with meta. * Do not include this test to suits. */ +@RunWith(JUnit4.class) public class GridMetadataAwareAdapterLoadTest extends GridCommonAbstractTest { /** Creates test. */ public GridMetadataAwareAdapterLoadTest() { diff --git a/modules/core/src/test/java/org/apache/ignite/lang/GridMetadataAwareAdapterSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/GridMetadataAwareAdapterSelfTest.java index 481415e485dad..b38be9817e30a 100644 --- a/modules/core/src/test/java/org/apache/ignite/lang/GridMetadataAwareAdapterSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/lang/GridMetadataAwareAdapterSelfTest.java @@ -21,11 +21,15 @@ import org.apache.ignite.internal.util.lang.GridMetadataAwareAdapter; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @GridCommonTest(group = "Lang") +@RunWith(JUnit4.class) public class GridMetadataAwareAdapterSelfTest extends GridCommonAbstractTest { /** Creates test. */ public GridMetadataAwareAdapterSelfTest() { diff --git a/modules/core/src/test/java/org/apache/ignite/lang/GridSetWrapperSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/GridSetWrapperSelfTest.java index 8043f9c7cc544..be662dae6bb1b 100644 --- a/modules/core/src/test/java/org/apache/ignite/lang/GridSetWrapperSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/lang/GridSetWrapperSelfTest.java @@ -27,11 +27,15 @@ import org.apache.ignite.internal.util.IgniteUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Set wrapper test. */ @GridCommonTest(group = "Lang") +@RunWith(JUnit4.class) public class GridSetWrapperSelfTest extends GridCommonAbstractTest { /** @throws Exception If failed. */ diff --git a/modules/core/src/test/java/org/apache/ignite/lang/GridTupleSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/GridTupleSelfTest.java index 23509a1354197..ae67a4db9f01d 100644 --- a/modules/core/src/test/java/org/apache/ignite/lang/GridTupleSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/lang/GridTupleSelfTest.java @@ -27,11 +27,15 @@ import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @GridCommonTest(group = "Lang") +@RunWith(JUnit4.class) public class GridTupleSelfTest extends GridCommonAbstractTest { /** Creates test. */ public GridTupleSelfTest() { diff --git a/modules/core/src/test/java/org/apache/ignite/lang/GridXSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/GridXSelfTest.java index d16279ceec759..952f0b325c806 100644 --- a/modules/core/src/test/java/org/apache/ignite/lang/GridXSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/lang/GridXSelfTest.java @@ -24,11 +24,15 @@ import org.apache.ignite.internal.util.typedef.X; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for {@link X}. */ @GridCommonTest(group = "Lang") +@RunWith(JUnit4.class) public class GridXSelfTest extends GridCommonAbstractTest { /** * diff --git a/modules/core/src/test/java/org/apache/ignite/lang/IgniteUuidSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/IgniteUuidSelfTest.java index 9b821a12a271d..4091e1b679cfb 100644 --- a/modules/core/src/test/java/org/apache/ignite/lang/IgniteUuidSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/lang/IgniteUuidSelfTest.java @@ -30,11 +30,15 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for {@link org.apache.ignite.lang.IgniteUuid}. */ @GridCommonTest(group = "Lang") +@RunWith(JUnit4.class) public class IgniteUuidSelfTest extends GridCommonAbstractTest { /** Sample size. */ private static final int NUM = 100000; diff --git a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridBoundedConcurrentLinkedHashMapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridBoundedConcurrentLinkedHashMapSelfTest.java index 39aca792a4a1f..acfd481408a55 100644 --- a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridBoundedConcurrentLinkedHashMapSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridBoundedConcurrentLinkedHashMapSelfTest.java @@ -21,10 +21,14 @@ import java.util.Map; import org.apache.ignite.internal.util.GridBoundedConcurrentLinkedHashMap; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for {@link GridBoundedConcurrentLinkedHashMap}. */ +@RunWith(JUnit4.class) public class GridBoundedConcurrentLinkedHashMapSelfTest extends GridCommonAbstractTest { /** Bound. */ private static final int MAX = 3; diff --git a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridBoundedConcurrentOrderedMapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridBoundedConcurrentOrderedMapSelfTest.java index 1e1c261bc719a..2c33ccf9f9a19 100644 --- a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridBoundedConcurrentOrderedMapSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridBoundedConcurrentOrderedMapSelfTest.java @@ -23,11 +23,15 @@ import org.apache.ignite.internal.util.typedef.CI2; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for {@link GridBoundedConcurrentOrderedMap}. */ @GridCommonTest(group = "Lang") +@RunWith(JUnit4.class) public class GridBoundedConcurrentOrderedMapSelfTest extends GridCommonAbstractTest { /** * diff --git a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridBoundedPriorityQueueSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridBoundedPriorityQueueSelfTest.java index 31b4994584db4..489a14fdd94a7 100644 --- a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridBoundedPriorityQueueSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridBoundedPriorityQueueSelfTest.java @@ -26,11 +26,15 @@ import org.apache.ignite.internal.util.GridBoundedPriorityQueue; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for {@link GridBoundedPriorityQueue}. */ @GridCommonTest(group = "Lang") +@RunWith(JUnit4.class) public class GridBoundedPriorityQueueSelfTest extends GridCommonAbstractTest { /** Queue items comparator. */ private static final Comparator CMP = new Comparator() { diff --git a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridCircularBufferPerformanceTest.java b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridCircularBufferPerformanceTest.java index 4d2b7d37bebf4..7e510d5397c76 100644 --- a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridCircularBufferPerformanceTest.java +++ b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridCircularBufferPerformanceTest.java @@ -27,10 +27,14 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.util.deque.FastSizeDeque; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class GridCircularBufferPerformanceTest extends GridCommonAbstractTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridCircularBufferSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridCircularBufferSelfTest.java index 9e73ff6bf94db..93e98481b3bee 100644 --- a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridCircularBufferSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridCircularBufferSelfTest.java @@ -23,10 +23,14 @@ import java.util.concurrent.atomic.AtomicInteger; import org.apache.ignite.internal.util.GridCircularBuffer; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class GridCircularBufferSelfTest extends GridCommonAbstractTest { /** * diff --git a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridConcurrentLinkedHashMapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridConcurrentLinkedHashMapSelfTest.java index e1c586bc92001..98524dcdf832f 100644 --- a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridConcurrentLinkedHashMapSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridConcurrentLinkedHashMapSelfTest.java @@ -27,6 +27,9 @@ import java.util.concurrent.ThreadLocalRandom; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jsr166.ConcurrentLinkedHashMap; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.jsr166.ConcurrentLinkedHashMap.QueuePolicy.PER_SEGMENT_Q; import static org.jsr166.ConcurrentLinkedHashMap.QueuePolicy.PER_SEGMENT_Q_OPTIMIZED_RMV; @@ -34,6 +37,7 @@ /** * This class tests basic contracts of {@code ConcurrentLinkedHashMap}. */ +@RunWith(JUnit4.class) public class GridConcurrentLinkedHashMapSelfTest extends GridCommonAbstractTest { /** */ private static final int KEYS_UPPER_BOUND = 1000; diff --git a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridConcurrentWeakHashSetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridConcurrentWeakHashSetSelfTest.java index 9612b958a50ad..8316e5a8e3d57 100644 --- a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridConcurrentWeakHashSetSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridConcurrentWeakHashSetSelfTest.java @@ -28,11 +28,15 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for {@link GridConcurrentWeakHashSet}. */ @GridCommonTest(group = "Lang") +@RunWith(JUnit4.class) public class GridConcurrentWeakHashSetSelfTest extends GridCommonAbstractTest { /** Time to wait after {@link System#gc} method call. */ private static final long WAIT_TIME = 3000; diff --git a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridConsistentHashSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridConsistentHashSelfTest.java index e8558be3ccd17..c727f9c50705a 100644 --- a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridConsistentHashSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridConsistentHashSelfTest.java @@ -32,11 +32,15 @@ import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Consistent hash test. */ @GridCommonTest(group = "Lang") +@RunWith(JUnit4.class) public class GridConsistentHashSelfTest extends GridCommonAbstractTest { /** */ private static final int NODES = 20; diff --git a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridLeanIdentitySetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridLeanIdentitySetSelfTest.java index a6e4fd7ce4614..b0643e2456c41 100644 --- a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridLeanIdentitySetSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridLeanIdentitySetSelfTest.java @@ -21,11 +21,15 @@ import org.apache.ignite.internal.util.GridLeanIdentitySet; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for {@link org.apache.ignite.internal.util.GridLeanMap}. */ @GridCommonTest(group = "Lang") +@RunWith(JUnit4.class) public class GridLeanIdentitySetSelfTest extends GridCommonAbstractTest { /** * JUnit. diff --git a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridLeanMapPerformanceTest.java b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridLeanMapPerformanceTest.java index 8d31fe01c4193..f6fb99a792183 100644 --- a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridLeanMapPerformanceTest.java +++ b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridLeanMapPerformanceTest.java @@ -20,10 +20,14 @@ import java.util.Map; import org.apache.ignite.internal.util.GridLeanMap; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Performance test for {@link GridLeanMap}. */ +@RunWith(JUnit4.class) public class GridLeanMapPerformanceTest extends GridCommonAbstractTest { /** */ private static final int RUN_CNT = 5; diff --git a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridLeanMapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridLeanMapSelfTest.java index f9906c3e78ddb..4dddf47f3687b 100644 --- a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridLeanMapSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridLeanMapSelfTest.java @@ -25,11 +25,15 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for {@link GridLeanMap}. */ @GridCommonTest(group = "Lang") +@RunWith(JUnit4.class) public class GridLeanMapSelfTest extends GridCommonAbstractTest { /** * JUnit. diff --git a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridListSetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridListSetSelfTest.java index 18a7b060837b7..f7a93cc51ba74 100644 --- a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridListSetSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridListSetSelfTest.java @@ -25,11 +25,15 @@ import org.apache.ignite.internal.util.typedef.internal.S; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for {@link GridListSet}. */ @GridCommonTest(group = "Lang") +@RunWith(JUnit4.class) public class GridListSetSelfTest extends GridCommonAbstractTest { /** * diff --git a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridStripedLockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridStripedLockSelfTest.java index 7e87db895afd5..14d546565fa74 100644 --- a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridStripedLockSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridStripedLockSelfTest.java @@ -24,10 +24,14 @@ import org.apache.ignite.internal.util.GridStripedLock; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class GridStripedLockSelfTest extends GridCommonAbstractTest { /** */ private static final int STRIPE_COUNT = 16; diff --git a/modules/core/src/test/java/org/apache/ignite/lang/utils/IgniteOffheapReadWriteLockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/utils/IgniteOffheapReadWriteLockSelfTest.java index 78114f4fe43d0..91c353dc24045 100644 --- a/modules/core/src/test/java/org/apache/ignite/lang/utils/IgniteOffheapReadWriteLockSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/lang/utils/IgniteOffheapReadWriteLockSelfTest.java @@ -29,11 +29,15 @@ import java.util.concurrent.ThreadLocalRandom; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @SuppressWarnings("BusyWait") +@RunWith(JUnit4.class) public class IgniteOffheapReadWriteLockSelfTest extends GridCommonAbstractTest { /** */ private static final int TAG_0 = 1; From 0d6e815009e625e9104d055cfd6e9dbd88c2625b Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Mon, 3 Dec 2018 19:14:32 +0300 Subject: [PATCH 022/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview --- .../apache/ignite/loadtests/GridCacheMultiNodeLoadTest.java | 4 ++++ .../loadtests/cache/GridCacheWriteBehindStoreLoadTest.java | 4 ++++ .../loadtests/communication/GridIoManagerBenchmark0.java | 4 ++++ .../GridCachePartitionedAtomicLongLoadTest.java | 4 ++++ .../loadtests/direct/multisplit/GridMultiSplitsLoadTest.java | 4 ++++ .../direct/multisplit/GridMultiSplitsRedeployLoadTest.java | 4 ++++ .../newnodes/GridSingleSplitsNewNodesAbstractLoadTest.java | 4 ++++ .../direct/redeploy/GridSingleSplitsRedeployLoadTest.java | 4 ++++ .../ignite/loadtests/direct/session/GridSessionLoadTest.java | 4 ++++ .../loadtests/direct/stealing/GridStealingLoadTest.java | 4 ++++ .../apache/ignite/loadtests/hashmap/GridHashMapLoadTest.java | 4 ++++ 11 files changed, 44 insertions(+) diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/GridCacheMultiNodeLoadTest.java b/modules/core/src/test/java/org/apache/ignite/loadtests/GridCacheMultiNodeLoadTest.java index 12e1b6470d312..9f31dd8e09a14 100644 --- a/modules/core/src/test/java/org/apache/ignite/loadtests/GridCacheMultiNodeLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/loadtests/GridCacheMultiNodeLoadTest.java @@ -25,6 +25,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; @@ -33,6 +36,7 @@ /** * Multi-node cache test. */ +@RunWith(JUnit4.class) public class GridCacheMultiNodeLoadTest extends GridCommonAbstractTest { /** Cache name. */ public static final String CACHE_NAME = "partitioned"; diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheWriteBehindStoreLoadTest.java b/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheWriteBehindStoreLoadTest.java index 16230a9522c6c..69d8f5108eeeb 100644 --- a/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheWriteBehindStoreLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheWriteBehindStoreLoadTest.java @@ -31,12 +31,16 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * Basic store test. */ +@RunWith(JUnit4.class) public class GridCacheWriteBehindStoreLoadTest extends GridCommonAbstractTest { /** Flush frequency. */ private static final int WRITE_FROM_BEHIND_FLUSH_FREQUENCY = 1000; diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/communication/GridIoManagerBenchmark0.java b/modules/core/src/test/java/org/apache/ignite/loadtests/communication/GridIoManagerBenchmark0.java index 7a1c68deea340..6439ebd073860 100644 --- a/modules/core/src/test/java/org/apache/ignite/loadtests/communication/GridIoManagerBenchmark0.java +++ b/modules/core/src/test/java/org/apache/ignite/loadtests/communication/GridIoManagerBenchmark0.java @@ -47,12 +47,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.managers.communication.GridIoPolicy.PUBLIC_POOL; /** * */ +@RunWith(JUnit4.class) public class GridIoManagerBenchmark0 extends GridCommonAbstractTest { /** */ public static final int CONCUR_MSGS = 10 * 1024; diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/datastructures/GridCachePartitionedAtomicLongLoadTest.java b/modules/core/src/test/java/org/apache/ignite/loadtests/datastructures/GridCachePartitionedAtomicLongLoadTest.java index a656fa7c297db..ad46a581fc40d 100644 --- a/modules/core/src/test/java/org/apache/ignite/loadtests/datastructures/GridCachePartitionedAtomicLongLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/loadtests/datastructures/GridCachePartitionedAtomicLongLoadTest.java @@ -34,6 +34,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -43,6 +46,7 @@ /** * Load test for atomic long. */ +@RunWith(JUnit4.class) public class GridCachePartitionedAtomicLongLoadTest extends GridCommonAbstractTest { /** Test duration. */ private static final long DURATION = 8 * 60 * 60 * 1000; diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/direct/multisplit/GridMultiSplitsLoadTest.java b/modules/core/src/test/java/org/apache/ignite/loadtests/direct/multisplit/GridMultiSplitsLoadTest.java index 84fee1ad6598a..15926fc419817 100644 --- a/modules/core/src/test/java/org/apache/ignite/loadtests/direct/multisplit/GridMultiSplitsLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/loadtests/direct/multisplit/GridMultiSplitsLoadTest.java @@ -31,11 +31,15 @@ import org.apache.ignite.testframework.config.GridTestProperties; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Multi-splits load test. */ @GridCommonTest(group = "Load Test") +@RunWith(JUnit4.class) public class GridMultiSplitsLoadTest extends GridCommonAbstractTest { /** */ public GridMultiSplitsLoadTest() { diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/direct/multisplit/GridMultiSplitsRedeployLoadTest.java b/modules/core/src/test/java/org/apache/ignite/loadtests/direct/multisplit/GridMultiSplitsRedeployLoadTest.java index c77b6e0941b71..1b9bf2c0c827c 100644 --- a/modules/core/src/test/java/org/apache/ignite/loadtests/direct/multisplit/GridMultiSplitsRedeployLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/loadtests/direct/multisplit/GridMultiSplitsRedeployLoadTest.java @@ -27,11 +27,15 @@ import org.apache.ignite.testframework.config.GridTestProperties; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Multi splits redeploy load test. */ @GridCommonTest(group = "Load Test") +@RunWith(JUnit4.class) public class GridMultiSplitsRedeployLoadTest extends GridCommonAbstractTest { /** Load test task type ID. */ public static final String TASK_TYPE_ID = GridLoadTestTask.class.getName(); diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/direct/newnodes/GridSingleSplitsNewNodesAbstractLoadTest.java b/modules/core/src/test/java/org/apache/ignite/loadtests/direct/newnodes/GridSingleSplitsNewNodesAbstractLoadTest.java index 41cf05dc0746b..5263348003565 100644 --- a/modules/core/src/test/java/org/apache/ignite/loadtests/direct/newnodes/GridSingleSplitsNewNodesAbstractLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/loadtests/direct/newnodes/GridSingleSplitsNewNodesAbstractLoadTest.java @@ -29,11 +29,15 @@ import org.apache.ignite.testframework.config.GridTestProperties; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Base class for single split on new nodes tests. */ @GridCommonTest(group = "Load Test") +@RunWith(JUnit4.class) public abstract class GridSingleSplitsNewNodesAbstractLoadTest extends GridCommonAbstractTest { /** * @param cfg Current configuration. diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/direct/redeploy/GridSingleSplitsRedeployLoadTest.java b/modules/core/src/test/java/org/apache/ignite/loadtests/direct/redeploy/GridSingleSplitsRedeployLoadTest.java index abec9c011a104..85b1b2752f4ef 100644 --- a/modules/core/src/test/java/org/apache/ignite/loadtests/direct/redeploy/GridSingleSplitsRedeployLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/loadtests/direct/redeploy/GridSingleSplitsRedeployLoadTest.java @@ -33,11 +33,15 @@ import org.apache.ignite.testframework.config.GridTestProperties; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Single splits redeploy load test. */ @GridCommonTest(group = "Load Test") +@RunWith(JUnit4.class) public class GridSingleSplitsRedeployLoadTest extends GridCommonAbstractTest { /** Load test task type ID. */ public static final String TASK_NAME = "org.apache.ignite.tests.p2p.SingleSplitTestTask"; diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/direct/session/GridSessionLoadTest.java b/modules/core/src/test/java/org/apache/ignite/loadtests/direct/session/GridSessionLoadTest.java index 74cff11535474..0b1957b060ea0 100644 --- a/modules/core/src/test/java/org/apache/ignite/loadtests/direct/session/GridSessionLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/loadtests/direct/session/GridSessionLoadTest.java @@ -26,11 +26,15 @@ import org.apache.ignite.testframework.config.GridTestProperties; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Session load test. */ @GridCommonTest(group = "Load Test") +@RunWith(JUnit4.class) public class GridSessionLoadTest extends GridCommonAbstractTest { /** */ public GridSessionLoadTest() { diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/direct/stealing/GridStealingLoadTest.java b/modules/core/src/test/java/org/apache/ignite/loadtests/direct/stealing/GridStealingLoadTest.java index fca7577d63579..6bfdd36105a74 100644 --- a/modules/core/src/test/java/org/apache/ignite/loadtests/direct/stealing/GridStealingLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/loadtests/direct/stealing/GridStealingLoadTest.java @@ -32,11 +32,15 @@ import org.apache.ignite.testframework.config.GridTestProperties; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @GridCommonTest(group = "Load Test") +@RunWith(JUnit4.class) public class GridStealingLoadTest extends GridCommonAbstractTest { /** */ public GridStealingLoadTest() { diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridHashMapLoadTest.java b/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridHashMapLoadTest.java index 20bd1ce68d6f3..7b2ddb6535ec9 100644 --- a/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridHashMapLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridHashMapLoadTest.java @@ -28,11 +28,15 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.logger.GridTestLog4jLogger; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests hashmap load. */ @SuppressWarnings("InfiniteLoopStatement") +@RunWith(JUnit4.class) public class GridHashMapLoadTest extends GridCommonAbstractTest { /** * From 3745f9aed4f94eee7e52b2700bbf9d280abbace1 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Mon, 3 Dec 2018 19:27:15 +0300 Subject: [PATCH 023/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview --- .../java/org/apache/ignite/logger/java/JavaLoggerTest.java | 4 ++++ .../DynamicProxySerializationMultiJvmSelfTest.java | 4 ++++ .../apache/ignite/marshaller/GridMarshallerAbstractTest.java | 4 ++++ .../marshaller/GridMarshallerMappingConsistencyTest.java | 4 ++++ .../ignite/marshaller/GridMarshallerPerformanceTest.java | 4 ++++ .../apache/ignite/marshaller/MarshallerContextSelfTest.java | 4 ++++ .../marshaller/MarshallerEnumDeadlockMultiJvmTest.java | 4 ++++ .../messaging/GridMessagingNoPeerClassLoadingSelfTest.java | 4 ++++ .../org/apache/ignite/messaging/GridMessagingSelfTest.java | 4 ++++ .../ignite/messaging/IgniteMessagingSendAsyncTest.java | 4 ++++ .../ignite/messaging/IgniteMessagingWithClientTest.java | 4 ++++ .../apache/ignite/p2p/DeploymentClassLoaderCallableTest.java | 4 ++++ .../p2p/GridMultinodeRedeployContinuousModeSelfTest.java | 4 ++++ .../p2p/GridMultinodeRedeployIsolatedModeSelfTest.java | 4 ++++ .../ignite/p2p/GridMultinodeRedeployPrivateModeSelfTest.java | 4 ++++ .../ignite/p2p/GridMultinodeRedeploySharedModeSelfTest.java | 4 ++++ .../org/apache/ignite/p2p/GridP2PClassLoadingSelfTest.java | 4 ++++ .../ignite/p2p/GridP2PContinuousDeploymentSelfTest.java | 4 ++++ .../ignite/p2p/GridP2PDifferentClassLoaderSelfTest.java | 4 ++++ .../apache/ignite/p2p/GridP2PDoubleDeploymentSelfTest.java | 4 ++++ .../apache/ignite/p2p/GridP2PHotRedeploymentSelfTest.java | 1 + .../org/apache/ignite/p2p/GridP2PJobClassLoaderSelfTest.java | 4 ++++ .../apache/ignite/p2p/GridP2PLocalDeploymentSelfTest.java | 4 ++++ .../ignite/p2p/GridP2PMissedResourceCacheSizeSelfTest.java | 4 ++++ .../java/org/apache/ignite/p2p/GridP2PNodeLeftSelfTest.java | 4 ++++ .../org/apache/ignite/p2p/GridP2PRecursionTaskSelfTest.java | 4 ++++ .../apache/ignite/p2p/GridP2PRemoteClassLoadersSelfTest.java | 4 ++++ .../apache/ignite/p2p/GridP2PSameClassLoaderSelfTest.java | 4 ++++ .../org/apache/ignite/p2p/GridP2PTestTaskExecutionTest.java | 5 +++++ .../java/org/apache/ignite/p2p/GridP2PTimeoutSelfTest.java | 4 ++++ .../java/org/apache/ignite/p2p/GridP2PUndeploySelfTest.java | 4 ++++ .../java/org/apache/ignite/p2p/P2PScanQueryUndeployTest.java | 4 ++++ .../org/apache/ignite/p2p/P2PStreamingClassLoaderTest.java | 4 ++++ .../java/org/apache/ignite/p2p/SharedDeploymentTest.java | 4 ++++ .../platform/PlatformDefaultJavaObjectFactorySelfTest.java | 4 ++++ .../platform/PlatformJavaObjectFactoryProxySelfTest.java | 4 ++++ 36 files changed, 142 insertions(+) diff --git a/modules/core/src/test/java/org/apache/ignite/logger/java/JavaLoggerTest.java b/modules/core/src/test/java/org/apache/ignite/logger/java/JavaLoggerTest.java index 286be5e508a00..f8b71f1d66f5e 100644 --- a/modules/core/src/test/java/org/apache/ignite/logger/java/JavaLoggerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/logger/java/JavaLoggerTest.java @@ -23,11 +23,15 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.logger.LoggerNodeIdAware; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Java logger test. */ @GridCommonTest(group = "Logger") +@RunWith(JUnit4.class) public class JavaLoggerTest extends TestCase { /** */ @SuppressWarnings({"FieldCanBeLocal"}) diff --git a/modules/core/src/test/java/org/apache/ignite/marshaller/DynamicProxySerializationMultiJvmSelfTest.java b/modules/core/src/test/java/org/apache/ignite/marshaller/DynamicProxySerializationMultiJvmSelfTest.java index 28dca068cf91a..e490afc81fe34 100644 --- a/modules/core/src/test/java/org/apache/ignite/marshaller/DynamicProxySerializationMultiJvmSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/marshaller/DynamicProxySerializationMultiJvmSelfTest.java @@ -27,10 +27,14 @@ import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.lang.IgniteCallable; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Multi-JVM test for dynamic proxy serialization. */ +@RunWith(JUnit4.class) public class DynamicProxySerializationMultiJvmSelfTest extends GridCommonAbstractTest { /** */ private static Callable marshFactory; diff --git a/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerAbstractTest.java index 3ac10f26035bd..10100e215cc1a 100644 --- a/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerAbstractTest.java @@ -74,6 +74,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.thread.IgniteThread; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.events.EventType.EVTS_CACHE; @@ -81,6 +84,7 @@ /** * Common test for marshallers. */ +@RunWith(JUnit4.class) public abstract class GridMarshallerAbstractTest extends GridCommonAbstractTest implements Serializable { /** */ private static final String CACHE_NAME = "namedCache"; diff --git a/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerMappingConsistencyTest.java b/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerMappingConsistencyTest.java index 2ec1993356767..d8228913c3dbd 100644 --- a/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerMappingConsistencyTest.java +++ b/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerMappingConsistencyTest.java @@ -32,10 +32,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class GridMarshallerMappingConsistencyTest extends GridCommonAbstractTest { /** Test cache name. */ private static final String CACHE_NAME = "cache"; diff --git a/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerPerformanceTest.java b/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerPerformanceTest.java index 31e87b9051e3e..3a7df77146118 100644 --- a/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerPerformanceTest.java +++ b/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerPerformanceTest.java @@ -45,10 +45,14 @@ import org.apache.ignite.lang.IgniteInClosure; import org.apache.ignite.lang.IgniteOutClosure; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Marshallers benchmark. */ +@RunWith(JUnit4.class) public class GridMarshallerPerformanceTest extends GridCommonAbstractTest { /** Number of iterations per test. */ private static final int ITER_CNT = 1 * 1000 * 1000; diff --git a/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerContextSelfTest.java b/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerContextSelfTest.java index 9b96b9948a31f..a7661b7b68909 100644 --- a/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerContextSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerContextSelfTest.java @@ -37,6 +37,9 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.junits.GridTestKernalContext; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.nio.file.Files.readAllBytes; import static org.apache.ignite.internal.MarshallerPlatformIds.JAVA_ID; @@ -44,6 +47,7 @@ /** * Test marshaller context. */ +@RunWith(JUnit4.class) public class MarshallerContextSelfTest extends GridCommonAbstractTest { /** */ private GridTestKernalContext ctx; diff --git a/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerEnumDeadlockMultiJvmTest.java b/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerEnumDeadlockMultiJvmTest.java index 0ce556ed513b6..2ff810601dbba 100644 --- a/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerEnumDeadlockMultiJvmTest.java +++ b/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerEnumDeadlockMultiJvmTest.java @@ -30,10 +30,14 @@ import org.apache.ignite.marshaller.jdk.JdkMarshaller; import org.apache.ignite.resources.IgniteInstanceResource; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Contains test of Enum marshalling with various {@link Marshaller}s. See IGNITE-8547 for details. */ +@RunWith(JUnit4.class) public class MarshallerEnumDeadlockMultiJvmTest extends GridCommonAbstractTest { /** */ private Factory marshFactory; diff --git a/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingNoPeerClassLoadingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingNoPeerClassLoadingSelfTest.java index 56ad98dc5a762..be7a9b381326c 100644 --- a/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingNoPeerClassLoadingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingNoPeerClassLoadingSelfTest.java @@ -27,11 +27,15 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.util.typedef.P2; import org.apache.ignite.testframework.config.GridTestProperties; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for Messaging public API with disabled * peer class loading. */ +@RunWith(JUnit4.class) public class GridMessagingNoPeerClassLoadingSelfTest extends GridMessagingSelfTest { /** */ private static CountDownLatch rcvLatch; diff --git a/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingSelfTest.java index 5d567599ff8df..1c03310c9eb05 100644 --- a/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingSelfTest.java @@ -57,12 +57,16 @@ import org.apache.ignite.testframework.config.GridTestProperties; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.testframework.GridTestUtils.assertThrows; /** * Various tests for Messaging public API. */ +@RunWith(JUnit4.class) public class GridMessagingSelfTest extends GridCommonAbstractTest implements Serializable { /** */ private static final String MSG_1 = "MSG-1"; diff --git a/modules/core/src/test/java/org/apache/ignite/messaging/IgniteMessagingSendAsyncTest.java b/modules/core/src/test/java/org/apache/ignite/messaging/IgniteMessagingSendAsyncTest.java index eb25d3660b143..e8f03aee4d6f4 100644 --- a/modules/core/src/test/java/org/apache/ignite/messaging/IgniteMessagingSendAsyncTest.java +++ b/modules/core/src/test/java/org/apache/ignite/messaging/IgniteMessagingSendAsyncTest.java @@ -37,10 +37,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteMessagingSendAsyncTest extends GridCommonAbstractTest implements Serializable { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/messaging/IgniteMessagingWithClientTest.java b/modules/core/src/test/java/org/apache/ignite/messaging/IgniteMessagingWithClientTest.java index 3645828c6eeec..4e800cb04d139 100644 --- a/modules/core/src/test/java/org/apache/ignite/messaging/IgniteMessagingWithClientTest.java +++ b/modules/core/src/test/java/org/apache/ignite/messaging/IgniteMessagingWithClientTest.java @@ -36,10 +36,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteMessagingWithClientTest extends GridCommonAbstractTest implements Serializable { /** */ protected static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/DeploymentClassLoaderCallableTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/DeploymentClassLoaderCallableTest.java index 68df5b4a9a29e..ca75752377815 100644 --- a/modules/core/src/test/java/org/apache/ignite/p2p/DeploymentClassLoaderCallableTest.java +++ b/modules/core/src/test/java/org/apache/ignite/p2p/DeploymentClassLoaderCallableTest.java @@ -25,9 +25,13 @@ import org.apache.ignite.testframework.GridTestExternalClassLoader; import org.apache.ignite.testframework.config.GridTestProperties; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** */ +@RunWith(JUnit4.class) public class DeploymentClassLoaderCallableTest extends GridCommonAbstractTest { /** */ private static final String RUN_CLS = "org.apache.ignite.tests.p2p.compute.ExternalCallable"; diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/GridMultinodeRedeployContinuousModeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/GridMultinodeRedeployContinuousModeSelfTest.java index 8ae208af48e18..a7b035f753fef 100644 --- a/modules/core/src/test/java/org/apache/ignite/p2p/GridMultinodeRedeployContinuousModeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/p2p/GridMultinodeRedeployContinuousModeSelfTest.java @@ -18,6 +18,9 @@ package org.apache.ignite.p2p; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.configuration.DeploymentMode.CONTINUOUS; @@ -25,6 +28,7 @@ * Continuous deployment mode test. */ @GridCommonTest(group = "P2P") +@RunWith(JUnit4.class) public class GridMultinodeRedeployContinuousModeSelfTest extends GridAbstractMultinodeRedeployTest { /** * Test GridDeploymentMode.CONTINUOUS mode. diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/GridMultinodeRedeployIsolatedModeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/GridMultinodeRedeployIsolatedModeSelfTest.java index d3a3d2f78fbef..cfcc055197c27 100644 --- a/modules/core/src/test/java/org/apache/ignite/p2p/GridMultinodeRedeployIsolatedModeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/p2p/GridMultinodeRedeployIsolatedModeSelfTest.java @@ -18,6 +18,9 @@ package org.apache.ignite.p2p; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.configuration.DeploymentMode.ISOLATED; @@ -25,6 +28,7 @@ * Isolated deployment mode test. */ @GridCommonTest(group = "P2P") +@RunWith(JUnit4.class) public class GridMultinodeRedeployIsolatedModeSelfTest extends GridAbstractMultinodeRedeployTest { /** * Test GridDeploymentMode.ISOLATED mode. diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/GridMultinodeRedeployPrivateModeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/GridMultinodeRedeployPrivateModeSelfTest.java index ad74251232039..bad6f5bde0fa8 100644 --- a/modules/core/src/test/java/org/apache/ignite/p2p/GridMultinodeRedeployPrivateModeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/p2p/GridMultinodeRedeployPrivateModeSelfTest.java @@ -18,6 +18,9 @@ package org.apache.ignite.p2p; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.configuration.DeploymentMode.PRIVATE; @@ -25,6 +28,7 @@ * Private deployment mode test. */ @GridCommonTest(group = "P2P") +@RunWith(JUnit4.class) public class GridMultinodeRedeployPrivateModeSelfTest extends GridAbstractMultinodeRedeployTest { /** * Test GridDeploymentMode.PRIVATE mode. diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/GridMultinodeRedeploySharedModeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/GridMultinodeRedeploySharedModeSelfTest.java index 19c69f18743b5..ade643f136011 100644 --- a/modules/core/src/test/java/org/apache/ignite/p2p/GridMultinodeRedeploySharedModeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/p2p/GridMultinodeRedeploySharedModeSelfTest.java @@ -18,6 +18,9 @@ package org.apache.ignite.p2p; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.configuration.DeploymentMode.SHARED; @@ -25,6 +28,7 @@ * Shared deployment mode test. */ @GridCommonTest(group = "P2P") +@RunWith(JUnit4.class) public class GridMultinodeRedeploySharedModeSelfTest extends GridAbstractMultinodeRedeployTest { /** * Test GridDeploymentMode.SHARED mode. diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PClassLoadingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PClassLoadingSelfTest.java index b902a33224a29..8f2aa7ebb57b6 100644 --- a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PClassLoadingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PClassLoadingSelfTest.java @@ -35,6 +35,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.lang.IgniteProductVersion.fromString; @@ -42,6 +45,7 @@ * P2P test. */ @GridCommonTest(group = "P2P") +@RunWith(JUnit4.class) public class GridP2PClassLoadingSelfTest extends GridCommonAbstractTest { /** */ private final ClassLoader tstClsLdr; diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PContinuousDeploymentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PContinuousDeploymentSelfTest.java index c8832487c717b..c53cbf7765846 100644 --- a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PContinuousDeploymentSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PContinuousDeploymentSelfTest.java @@ -29,6 +29,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; @@ -38,6 +41,7 @@ /** * Tests for continuous deployment with cache and changing topology. */ +@RunWith(JUnit4.class) public class GridP2PContinuousDeploymentSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PDifferentClassLoaderSelfTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PDifferentClassLoaderSelfTest.java index a9656bd8698fa..f73991cf68f95 100644 --- a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PDifferentClassLoaderSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PDifferentClassLoaderSelfTest.java @@ -27,12 +27,16 @@ import org.apache.ignite.testframework.config.GridTestProperties; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test P2P deployment tasks which loaded from different class loaders. */ @SuppressWarnings({"ProhibitedExceptionDeclared", "ProhibitedExceptionThrown"}) @GridCommonTest(group = "P2P") +@RunWith(JUnit4.class) public class GridP2PDifferentClassLoaderSelfTest extends GridCommonAbstractTest { /** * Class Name of task 1. diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PDoubleDeploymentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PDoubleDeploymentSelfTest.java index bca2bd2d681e5..4358f022a3894 100644 --- a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PDoubleDeploymentSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PDoubleDeploymentSelfTest.java @@ -28,12 +28,16 @@ import org.apache.ignite.testframework.GridTestClassLoader; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @SuppressWarnings({"ProhibitedExceptionDeclared"}) @GridCommonTest(group = "P2P") +@RunWith(JUnit4.class) public class GridP2PDoubleDeploymentSelfTest extends GridCommonAbstractTest { /** Deployment mode. */ private DeploymentMode depMode; diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PHotRedeploymentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PHotRedeploymentSelfTest.java index 063a73a8ab8bf..70db1390a1698 100644 --- a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PHotRedeploymentSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PHotRedeploymentSelfTest.java @@ -24,6 +24,7 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; /** * diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PJobClassLoaderSelfTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PJobClassLoaderSelfTest.java index a74e8b25a2386..431fb0d8cf3ec 100644 --- a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PJobClassLoaderSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PJobClassLoaderSelfTest.java @@ -30,12 +30,16 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test to make sure that if job executes on the same node, it reuses the same class loader as task. */ @SuppressWarnings({"ProhibitedExceptionDeclared"}) @GridCommonTest(group = "P2P") +@RunWith(JUnit4.class) public class GridP2PJobClassLoaderSelfTest extends GridCommonAbstractTest { /** * Current deployment mode. Used in {@link #getConfiguration(String)}. diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PLocalDeploymentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PLocalDeploymentSelfTest.java index e8f2f02de6e05..a33d16f424d9b 100644 --- a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PLocalDeploymentSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PLocalDeploymentSelfTest.java @@ -43,6 +43,9 @@ import org.apache.ignite.testframework.config.GridTestProperties; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_CACHE_REMOVED_ENTRIES_TTL; import static org.apache.ignite.spi.deployment.local.LocalDeploymentSpi.IGNITE_DEPLOYMENT_ADDITIONAL_CHECK; @@ -52,6 +55,7 @@ */ @SuppressWarnings({"ProhibitedExceptionDeclared", "ObjectEquality"}) @GridCommonTest(group = "P2P") +@RunWith(JUnit4.class) public class GridP2PLocalDeploymentSelfTest extends GridCommonAbstractTest { /** * Current deployment mode. Used in {@link #getConfiguration(String)}. diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PMissedResourceCacheSizeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PMissedResourceCacheSizeSelfTest.java index 38e1346a916d6..3e87c4253f9f5 100644 --- a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PMissedResourceCacheSizeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PMissedResourceCacheSizeSelfTest.java @@ -33,11 +33,15 @@ import org.apache.ignite.testframework.config.GridTestProperties; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @GridCommonTest(group = "P2P") +@RunWith(JUnit4.class) public class GridP2PMissedResourceCacheSizeSelfTest extends GridCommonAbstractTest { /** Task name. */ private static final String TASK_NAME1 = "org.apache.ignite.tests.p2p.P2PTestTaskExternalPath1"; diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PNodeLeftSelfTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PNodeLeftSelfTest.java index fe1dddd4c53ff..3735cc0aa0434 100644 --- a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PNodeLeftSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PNodeLeftSelfTest.java @@ -26,12 +26,16 @@ import org.apache.ignite.testframework.config.GridTestProperties; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test P2P class loading in SHARED_CLASSLOADER_UNDEPLOY mode. */ @SuppressWarnings({"ProhibitedExceptionDeclared"}) @GridCommonTest(group = "P2P") +@RunWith(JUnit4.class) public class GridP2PNodeLeftSelfTest extends GridCommonAbstractTest { /** */ private static final ClassLoader urlClsLdr1; diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PRecursionTaskSelfTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PRecursionTaskSelfTest.java index f15a724894523..879e6fd987186 100644 --- a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PRecursionTaskSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PRecursionTaskSelfTest.java @@ -32,12 +32,16 @@ import org.apache.ignite.resources.IgniteInstanceResource; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @SuppressWarnings({"ProhibitedExceptionDeclared"}) @GridCommonTest(group = "P2P") +@RunWith(JUnit4.class) public class GridP2PRecursionTaskSelfTest extends GridCommonAbstractTest { /** * Current deployment mode. Used in {@link #getConfiguration(String)}. diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PRemoteClassLoadersSelfTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PRemoteClassLoadersSelfTest.java index 34c174781254f..f761e25560d37 100644 --- a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PRemoteClassLoadersSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PRemoteClassLoadersSelfTest.java @@ -37,12 +37,16 @@ import org.apache.ignite.testframework.GridTestClassLoader; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @SuppressWarnings({"ProhibitedExceptionDeclared"}) @GridCommonTest(group = "P2P") +@RunWith(JUnit4.class) public class GridP2PRemoteClassLoadersSelfTest extends GridCommonAbstractTest { /** Current deployment mode. Used in {@link #getConfiguration(String)}. */ private DeploymentMode depMode; diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PSameClassLoaderSelfTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PSameClassLoaderSelfTest.java index 3c1d0d59a26d5..1b54c81e6eae5 100644 --- a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PSameClassLoaderSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PSameClassLoaderSelfTest.java @@ -31,12 +31,16 @@ import org.apache.ignite.testframework.config.GridTestProperties; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test P2P deployment tasks which loaded from different class loaders. */ @SuppressWarnings({"ProhibitedExceptionDeclared", "ProhibitedExceptionThrown"}) @GridCommonTest(group = "P2P") +@RunWith(JUnit4.class) public class GridP2PSameClassLoaderSelfTest extends GridCommonAbstractTest { /** Class Name of task 1. */ private static final String TEST_TASK1_NAME = "org.apache.ignite.tests.p2p.P2PTestTaskExternalPath1"; diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PTestTaskExecutionTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PTestTaskExecutionTest.java index bd611edb931dc..97f7e6bf09faf 100644 --- a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PTestTaskExecutionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PTestTaskExecutionTest.java @@ -23,10 +23,15 @@ import org.apache.ignite.internal.util.typedef.G; import org.apache.ignite.internal.util.typedef.X; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + /** * Test executes GridP2PTestTask on the remote node. * Before running of test you MUST start at least one remote node. */ +@RunWith(JUnit4.class) public final class GridP2PTestTaskExecutionTest extends GridCommonAbstractTest { /** * Method executes GridP2PTestTask. diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PTimeoutSelfTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PTimeoutSelfTest.java index 1d2e9ab41ea6e..0cd4e7bfca506 100644 --- a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PTimeoutSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PTimeoutSelfTest.java @@ -28,12 +28,16 @@ import org.apache.ignite.testframework.config.GridTestProperties; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @SuppressWarnings({"ProhibitedExceptionDeclared"}) @GridCommonTest(group = "P2P") +@RunWith(JUnit4.class) public class GridP2PTimeoutSelfTest extends GridCommonAbstractTest { /** Current deployment mode. Used in {@link #getConfiguration(String)}. */ private DeploymentMode depMode; diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PUndeploySelfTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PUndeploySelfTest.java index 1c89ef0186755..42eae7d8f3e14 100644 --- a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PUndeploySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PUndeploySelfTest.java @@ -31,12 +31,16 @@ import org.apache.ignite.testframework.junits.IgniteTestResources; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @SuppressWarnings({"ProhibitedExceptionDeclared"}) @GridCommonTest(group = "P2P") +@RunWith(JUnit4.class) public class GridP2PUndeploySelfTest extends GridCommonAbstractTest { /** Current deployment mode. Used in {@link #getConfiguration(String)}. */ private DeploymentMode depMode; diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/P2PScanQueryUndeployTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/P2PScanQueryUndeployTest.java index 9ca24b7912c96..b16fa98b1e837 100644 --- a/modules/core/src/test/java/org/apache/ignite/p2p/P2PScanQueryUndeployTest.java +++ b/modules/core/src/test/java/org/apache/ignite/p2p/P2PScanQueryUndeployTest.java @@ -44,8 +44,12 @@ import org.apache.ignite.testframework.GridTestExternalClassLoader; import org.apache.ignite.testframework.config.GridTestProperties; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** */ +@RunWith(JUnit4.class) public class P2PScanQueryUndeployTest extends GridCommonAbstractTest { /** Predicate classname. */ private static final String PREDICATE_CLASSNAME = "org.apache.ignite.tests.p2p.AlwaysTruePredicate"; diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/P2PStreamingClassLoaderTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/P2PStreamingClassLoaderTest.java index b1267bc1d4bbf..cc38f045c28b5 100644 --- a/modules/core/src/test/java/org/apache/ignite/p2p/P2PStreamingClassLoaderTest.java +++ b/modules/core/src/test/java/org/apache/ignite/p2p/P2PStreamingClassLoaderTest.java @@ -27,9 +27,13 @@ import org.apache.ignite.stream.StreamTransformer; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** */ @GridCommonTest(group = "P2P") +@RunWith(JUnit4.class) public class P2PStreamingClassLoaderTest extends GridCommonAbstractTest { /** */ private static final String ENTRY_PROCESSOR_CLASS_NAME = "org.apache.ignite.tests.p2p.NoopCacheEntryProcessor"; diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/SharedDeploymentTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/SharedDeploymentTest.java index 911cacb6f8111..e35468ab7eb91 100644 --- a/modules/core/src/test/java/org/apache/ignite/p2p/SharedDeploymentTest.java +++ b/modules/core/src/test/java/org/apache/ignite/p2p/SharedDeploymentTest.java @@ -27,9 +27,13 @@ import java.lang.reflect.Constructor; import java.net.URL; import java.util.Collection; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** */ +@RunWith(JUnit4.class) public class SharedDeploymentTest extends GridCommonAbstractTest { /** */ private static final String RUN_CLS = "org.apache.ignite.tests.p2p.compute.ExternalCallable"; diff --git a/modules/core/src/test/java/org/apache/ignite/platform/PlatformDefaultJavaObjectFactorySelfTest.java b/modules/core/src/test/java/org/apache/ignite/platform/PlatformDefaultJavaObjectFactorySelfTest.java index eeff2e1b29207..851c4829dabbd 100644 --- a/modules/core/src/test/java/org/apache/ignite/platform/PlatformDefaultJavaObjectFactorySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/platform/PlatformDefaultJavaObjectFactorySelfTest.java @@ -29,10 +29,14 @@ import java.util.Map; import java.util.UUID; import java.util.concurrent.Callable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Dedicated tests for {@link PlatformDefaultJavaObjectFactory}. */ +@RunWith(JUnit4.class) public class PlatformDefaultJavaObjectFactorySelfTest extends GridCommonAbstractTest { /** Name of the class. */ private static final String CLS_NAME = TestJavaObject.class.getName(); diff --git a/modules/core/src/test/java/org/apache/ignite/platform/PlatformJavaObjectFactoryProxySelfTest.java b/modules/core/src/test/java/org/apache/ignite/platform/PlatformJavaObjectFactoryProxySelfTest.java index 9e1ec89da04f0..38ad669cd278f 100644 --- a/modules/core/src/test/java/org/apache/ignite/platform/PlatformJavaObjectFactoryProxySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/platform/PlatformJavaObjectFactoryProxySelfTest.java @@ -33,10 +33,14 @@ import java.util.Map; import java.util.UUID; import java.util.concurrent.Callable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Dedicated tests for {@link PlatformJavaObjectFactoryProxy}. */ +@RunWith(JUnit4.class) public class PlatformJavaObjectFactoryProxySelfTest extends GridCommonAbstractTest { /** Name of the class. */ private static final String CLS_NAME = TestJavaObject.class.getName(); From 9d97abad919a95c7686e0a6520682a76835c5ebf Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Mon, 3 Dec 2018 19:37:48 +0300 Subject: [PATCH 024/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview --- .../plugin/security/SecurityPermissionSetBuilderTest.java | 4 ++++ .../org/apache/ignite/services/ServiceThreadPoolSelfTest.java | 4 ++++ .../session/GridSessionCancelSiblingsFromFutureSelfTest.java | 4 ++++ .../session/GridSessionCancelSiblingsFromJobSelfTest.java | 4 ++++ .../session/GridSessionCancelSiblingsFromTaskSelfTest.java | 4 ++++ .../apache/ignite/session/GridSessionCheckpointSelfTest.java | 4 ++++ .../ignite/session/GridSessionCollisionSpiSelfTest.java | 4 ++++ .../session/GridSessionFutureWaitJobAttributeSelfTest.java | 4 ++++ .../session/GridSessionFutureWaitTaskAttributeSelfTest.java | 4 ++++ .../apache/ignite/session/GridSessionJobFailoverSelfTest.java | 4 ++++ .../session/GridSessionJobWaitTaskAttributeSelfTest.java | 4 ++++ .../org/apache/ignite/session/GridSessionLoadSelfTest.java | 4 ++++ .../ignite/session/GridSessionSetFutureAttributeSelfTest.java | 4 ++++ .../GridSessionSetFutureAttributeWaitListenerSelfTest.java | 4 ++++ .../ignite/session/GridSessionSetJobAttribute2SelfTest.java | 4 ++++ .../session/GridSessionSetJobAttributeOrderSelfTest.java | 4 ++++ .../ignite/session/GridSessionSetJobAttributeSelfTest.java | 4 ++++ .../GridSessionSetJobAttributeWaitListenerSelfTest.java | 4 ++++ .../ignite/session/GridSessionSetTaskAttributeSelfTest.java | 4 ++++ .../session/GridSessionTaskWaitJobAttributeSelfTest.java | 4 ++++ .../ignite/session/GridSessionWaitAttributeSelfTest.java | 4 ++++ .../ignite/spi/checkpoint/GridCheckpointSpiAbstractTest.java | 4 ++++ .../checkpoint/cache/CacheCheckpointSpiConfigSelfTest.java | 4 ++++ .../cache/CacheCheckpointSpiSecondCacheSelfTest.java | 4 ++++ .../spi/checkpoint/jdbc/JdbcCheckpointSpiConfigSelfTest.java | 4 ++++ .../sharedfs/GridSharedFsCheckpointSpiConfigSelfTest.java | 4 ++++ .../GridSharedFsCheckpointSpiMultiThreadedSelfTest.java | 4 ++++ .../GridSharedFsCheckpointSpiMultipleDirectoriesSelfTest.java | 4 ++++ .../fifoqueue/GridFifoQueueCollisionSpiConfigSelfTest.java | 4 ++++ .../fifoqueue/GridFifoQueueCollisionSpiSelfTest.java | 4 ++++ .../GridJobStealingCollisionSpiAttributesSelfTest.java | 4 ++++ .../GridJobStealingCollisionSpiConfigSelfTest.java | 4 ++++ .../GridJobStealingCollisionSpiCustomTopologySelfTest.java | 4 ++++ .../jobstealing/GridJobStealingCollisionSpiSelfTest.java | 4 ++++ .../GridPriorityQueueCollisionSpiConfigSelfTest.java | 4 ++++ .../priorityqueue/GridPriorityQueueCollisionSpiSelfTest.java | 4 ++++ 36 files changed, 144 insertions(+) diff --git a/modules/core/src/test/java/org/apache/ignite/plugin/security/SecurityPermissionSetBuilderTest.java b/modules/core/src/test/java/org/apache/ignite/plugin/security/SecurityPermissionSetBuilderTest.java index dc6776a0c7731..f6dd03992857d 100644 --- a/modules/core/src/test/java/org/apache/ignite/plugin/security/SecurityPermissionSetBuilderTest.java +++ b/modules/core/src/test/java/org/apache/ignite/plugin/security/SecurityPermissionSetBuilderTest.java @@ -25,6 +25,9 @@ import org.apache.ignite.IgniteException; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.plugin.security.SecurityPermission.ADMIN_VIEW; import static org.apache.ignite.plugin.security.SecurityPermission.CACHE_CREATE; @@ -43,6 +46,7 @@ /** * Test for check correct work {@link SecurityPermissionSetBuilder permission builder} */ +@RunWith(JUnit4.class) public class SecurityPermissionSetBuilderTest extends GridCommonAbstractTest { /** */ diff --git a/modules/core/src/test/java/org/apache/ignite/services/ServiceThreadPoolSelfTest.java b/modules/core/src/test/java/org/apache/ignite/services/ServiceThreadPoolSelfTest.java index 9c2c3a330170e..a54865ce51686 100644 --- a/modules/core/src/test/java/org/apache/ignite/services/ServiceThreadPoolSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/services/ServiceThreadPoolSelfTest.java @@ -24,10 +24,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test verifying that services thread pool is properly used. */ +@RunWith(JUnit4.class) public class ServiceThreadPoolSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/session/GridSessionCancelSiblingsFromFutureSelfTest.java b/modules/core/src/test/java/org/apache/ignite/session/GridSessionCancelSiblingsFromFutureSelfTest.java index 14a804ee07c05..a613482b703a7 100644 --- a/modules/core/src/test/java/org/apache/ignite/session/GridSessionCancelSiblingsFromFutureSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/session/GridSessionCancelSiblingsFromFutureSelfTest.java @@ -45,11 +45,15 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test of session siblings cancellation from future. */ @GridCommonTest(group = "Task Session") +@RunWith(JUnit4.class) public class GridSessionCancelSiblingsFromFutureSelfTest extends GridCommonAbstractTest { /** */ private static final int WAIT_TIME = 20000; diff --git a/modules/core/src/test/java/org/apache/ignite/session/GridSessionCancelSiblingsFromJobSelfTest.java b/modules/core/src/test/java/org/apache/ignite/session/GridSessionCancelSiblingsFromJobSelfTest.java index c8ebf6d3b3a19..1860042af3e7b 100644 --- a/modules/core/src/test/java/org/apache/ignite/session/GridSessionCancelSiblingsFromJobSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/session/GridSessionCancelSiblingsFromJobSelfTest.java @@ -49,11 +49,15 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Session cancellation tests. */ @GridCommonTest(group = "Task Session") +@RunWith(JUnit4.class) public class GridSessionCancelSiblingsFromJobSelfTest extends GridCommonAbstractTest { /** */ private static final int WAIT_TIME = 20000; diff --git a/modules/core/src/test/java/org/apache/ignite/session/GridSessionCancelSiblingsFromTaskSelfTest.java b/modules/core/src/test/java/org/apache/ignite/session/GridSessionCancelSiblingsFromTaskSelfTest.java index 2c4658e36a750..b8868a5b38cee 100644 --- a/modules/core/src/test/java/org/apache/ignite/session/GridSessionCancelSiblingsFromTaskSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/session/GridSessionCancelSiblingsFromTaskSelfTest.java @@ -47,11 +47,15 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Session cancellation tests. */ @GridCommonTest(group = "Task Session") +@RunWith(JUnit4.class) public class GridSessionCancelSiblingsFromTaskSelfTest extends GridCommonAbstractTest { /** */ private static final int WAIT_TIME = 20000; diff --git a/modules/core/src/test/java/org/apache/ignite/session/GridSessionCheckpointSelfTest.java b/modules/core/src/test/java/org/apache/ignite/session/GridSessionCheckpointSelfTest.java index 0c1085f0f218b..1ac3e3e14c606 100644 --- a/modules/core/src/test/java/org/apache/ignite/session/GridSessionCheckpointSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/session/GridSessionCheckpointSelfTest.java @@ -31,11 +31,15 @@ import org.apache.ignite.spi.checkpoint.sharedfs.SharedFsCheckpointSpi; import org.apache.ignite.testframework.junits.common.GridCommonTest; import org.hsqldb.jdbc.jdbcDataSource; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Grid session checkpoint self test. */ @GridCommonTest(group = "Task Session") +@RunWith(JUnit4.class) public class GridSessionCheckpointSelfTest extends GridSessionCheckpointAbstractSelfTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/session/GridSessionCollisionSpiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/session/GridSessionCollisionSpiSelfTest.java index e4b70f65c2b36..010d8661cdc3f 100644 --- a/modules/core/src/test/java/org/apache/ignite/session/GridSessionCollisionSpiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/session/GridSessionCollisionSpiSelfTest.java @@ -40,10 +40,14 @@ import org.apache.ignite.spi.collision.CollisionJobContext; import org.apache.ignite.spi.collision.fifoqueue.FifoQueueCollisionSpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Grid session collision SPI self test. */ +@RunWith(JUnit4.class) public class GridSessionCollisionSpiSelfTest extends GridCommonAbstractTest { /** * Constructs a test. diff --git a/modules/core/src/test/java/org/apache/ignite/session/GridSessionFutureWaitJobAttributeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/session/GridSessionFutureWaitJobAttributeSelfTest.java index 4167f4c50c07d..fa82f150ef7af 100644 --- a/modules/core/src/test/java/org/apache/ignite/session/GridSessionFutureWaitJobAttributeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/session/GridSessionFutureWaitJobAttributeSelfTest.java @@ -40,11 +40,15 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @GridCommonTest(group = "Task Session") +@RunWith(JUnit4.class) public class GridSessionFutureWaitJobAttributeSelfTest extends GridCommonAbstractTest { /** */ private static final int WAIT_TIME = 20000; diff --git a/modules/core/src/test/java/org/apache/ignite/session/GridSessionFutureWaitTaskAttributeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/session/GridSessionFutureWaitTaskAttributeSelfTest.java index 3cad20bf1e8ef..e0aad4c3439e4 100644 --- a/modules/core/src/test/java/org/apache/ignite/session/GridSessionFutureWaitTaskAttributeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/session/GridSessionFutureWaitTaskAttributeSelfTest.java @@ -42,11 +42,15 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @GridCommonTest(group = "Task Session") +@RunWith(JUnit4.class) public class GridSessionFutureWaitTaskAttributeSelfTest extends GridCommonAbstractTest { /** */ private static final int WAIT_TIME = 2000; diff --git a/modules/core/src/test/java/org/apache/ignite/session/GridSessionJobFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/session/GridSessionJobFailoverSelfTest.java index 2fd7c3f6986ab..009d1f62cbbba 100644 --- a/modules/core/src/test/java/org/apache/ignite/session/GridSessionJobFailoverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/session/GridSessionJobFailoverSelfTest.java @@ -36,11 +36,15 @@ import org.apache.ignite.spi.failover.always.AlwaysFailoverSpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Job failover test. */ @GridCommonTest(group = "Task Session") +@RunWith(JUnit4.class) public class GridSessionJobFailoverSelfTest extends GridCommonAbstractTest { /** * Default constructor. diff --git a/modules/core/src/test/java/org/apache/ignite/session/GridSessionJobWaitTaskAttributeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/session/GridSessionJobWaitTaskAttributeSelfTest.java index a21cb0ee945d2..58d05d1991533 100644 --- a/modules/core/src/test/java/org/apache/ignite/session/GridSessionJobWaitTaskAttributeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/session/GridSessionJobWaitTaskAttributeSelfTest.java @@ -43,11 +43,15 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @GridCommonTest(group = "Task Session") +@RunWith(JUnit4.class) public class GridSessionJobWaitTaskAttributeSelfTest extends GridCommonAbstractTest { /** */ public static final int SPLIT_COUNT = 5; diff --git a/modules/core/src/test/java/org/apache/ignite/session/GridSessionLoadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/session/GridSessionLoadSelfTest.java index 8214d407b1fca..98c9d932d7861 100644 --- a/modules/core/src/test/java/org/apache/ignite/session/GridSessionLoadSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/session/GridSessionLoadSelfTest.java @@ -44,11 +44,15 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Task session load self test. */ @GridCommonTest(group = "Task Session") +@RunWith(JUnit4.class) public class GridSessionLoadSelfTest extends GridCommonAbstractTest { /** */ private static final int THREAD_CNT = 40; diff --git a/modules/core/src/test/java/org/apache/ignite/session/GridSessionSetFutureAttributeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/session/GridSessionSetFutureAttributeSelfTest.java index 7f073475dabd7..c0305409fc4ab 100644 --- a/modules/core/src/test/java/org/apache/ignite/session/GridSessionSetFutureAttributeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/session/GridSessionSetFutureAttributeSelfTest.java @@ -45,11 +45,15 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @GridCommonTest(group = "Task Session") +@RunWith(JUnit4.class) public class GridSessionSetFutureAttributeSelfTest extends GridCommonAbstractTest { /** */ private static final int WAIT_TIME = 20000; diff --git a/modules/core/src/test/java/org/apache/ignite/session/GridSessionSetFutureAttributeWaitListenerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/session/GridSessionSetFutureAttributeWaitListenerSelfTest.java index 7197c0e8e929f..8092a5b3d270f 100644 --- a/modules/core/src/test/java/org/apache/ignite/session/GridSessionSetFutureAttributeWaitListenerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/session/GridSessionSetFutureAttributeWaitListenerSelfTest.java @@ -45,11 +45,15 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @GridCommonTest(group = "Task Session") +@RunWith(JUnit4.class) public class GridSessionSetFutureAttributeWaitListenerSelfTest extends GridCommonAbstractTest { /** */ public static final int SPLIT_COUNT = 5; diff --git a/modules/core/src/test/java/org/apache/ignite/session/GridSessionSetJobAttribute2SelfTest.java b/modules/core/src/test/java/org/apache/ignite/session/GridSessionSetJobAttribute2SelfTest.java index e9d76680a6e7b..0395e99539bcd 100644 --- a/modules/core/src/test/java/org/apache/ignite/session/GridSessionSetJobAttribute2SelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/session/GridSessionSetJobAttribute2SelfTest.java @@ -35,11 +35,15 @@ import org.apache.ignite.resources.TaskSessionResource; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Job attribute test. */ @GridCommonTest(group = "Task Session") +@RunWith(JUnit4.class) public class GridSessionSetJobAttribute2SelfTest extends GridCommonAbstractTest { /** */ private static final String TEST_ATTR_KEY = "grid.tasksession.test.attr"; diff --git a/modules/core/src/test/java/org/apache/ignite/session/GridSessionSetJobAttributeOrderSelfTest.java b/modules/core/src/test/java/org/apache/ignite/session/GridSessionSetJobAttributeOrderSelfTest.java index 4fe4393e8bfde..90bd7d68610c6 100644 --- a/modules/core/src/test/java/org/apache/ignite/session/GridSessionSetJobAttributeOrderSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/session/GridSessionSetJobAttributeOrderSelfTest.java @@ -37,11 +37,15 @@ import org.apache.ignite.resources.TaskSessionResource; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Grid session set job attribute self test. */ @GridCommonTest(group = "Task Session") +@RunWith(JUnit4.class) public class GridSessionSetJobAttributeOrderSelfTest extends GridCommonAbstractTest { /** */ private static final String TEST_ATTR_KEY = "grid.task.session.test.attr"; diff --git a/modules/core/src/test/java/org/apache/ignite/session/GridSessionSetJobAttributeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/session/GridSessionSetJobAttributeSelfTest.java index f608d0e1cf91b..c5c6b91900c16 100644 --- a/modules/core/src/test/java/org/apache/ignite/session/GridSessionSetJobAttributeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/session/GridSessionSetJobAttributeSelfTest.java @@ -43,11 +43,15 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @GridCommonTest(group = "Task Session") +@RunWith(JUnit4.class) public class GridSessionSetJobAttributeSelfTest extends GridCommonAbstractTest { /** */ public static final int SPLIT_COUNT = 5; diff --git a/modules/core/src/test/java/org/apache/ignite/session/GridSessionSetJobAttributeWaitListenerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/session/GridSessionSetJobAttributeWaitListenerSelfTest.java index a26b9bc310da1..dfbfe666752e9 100644 --- a/modules/core/src/test/java/org/apache/ignite/session/GridSessionSetJobAttributeWaitListenerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/session/GridSessionSetJobAttributeWaitListenerSelfTest.java @@ -45,11 +45,15 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @GridCommonTest(group = "Task Session") +@RunWith(JUnit4.class) public class GridSessionSetJobAttributeWaitListenerSelfTest extends GridCommonAbstractTest { /** */ public static final int SPLIT_COUNT = 5; diff --git a/modules/core/src/test/java/org/apache/ignite/session/GridSessionSetTaskAttributeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/session/GridSessionSetTaskAttributeSelfTest.java index 380943cd3ea47..a15c46f7f046c 100644 --- a/modules/core/src/test/java/org/apache/ignite/session/GridSessionSetTaskAttributeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/session/GridSessionSetTaskAttributeSelfTest.java @@ -39,11 +39,15 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @GridCommonTest(group = "Task Session") +@RunWith(JUnit4.class) public class GridSessionSetTaskAttributeSelfTest extends GridCommonAbstractTest { /** */ public static final int SPLIT_COUNT = 5; diff --git a/modules/core/src/test/java/org/apache/ignite/session/GridSessionTaskWaitJobAttributeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/session/GridSessionTaskWaitJobAttributeSelfTest.java index 2dd95bba8d57b..f7e713bcb6d94 100644 --- a/modules/core/src/test/java/org/apache/ignite/session/GridSessionTaskWaitJobAttributeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/session/GridSessionTaskWaitJobAttributeSelfTest.java @@ -39,11 +39,15 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @GridCommonTest(group = "Task Session") +@RunWith(JUnit4.class) public class GridSessionTaskWaitJobAttributeSelfTest extends GridCommonAbstractTest { /** */ public static final int SPLIT_COUNT = 5; diff --git a/modules/core/src/test/java/org/apache/ignite/session/GridSessionWaitAttributeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/session/GridSessionWaitAttributeSelfTest.java index 12314f65ae485..ac7aaf79887d3 100644 --- a/modules/core/src/test/java/org/apache/ignite/session/GridSessionWaitAttributeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/session/GridSessionWaitAttributeSelfTest.java @@ -44,12 +44,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests waiting for session attributes. */ @GridCommonTest(group = "Task Session") @SuppressWarnings({"PublicInnerClass"}) +@RunWith(JUnit4.class) public class GridSessionWaitAttributeSelfTest extends GridCommonAbstractTest { /** */ private static final int ATTR_NUM = 100; diff --git a/modules/core/src/test/java/org/apache/ignite/spi/checkpoint/GridCheckpointSpiAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/spi/checkpoint/GridCheckpointSpiAbstractTest.java index d918cb80c88ad..92cf0b4a9235a 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/checkpoint/GridCheckpointSpiAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/checkpoint/GridCheckpointSpiAbstractTest.java @@ -19,11 +19,15 @@ import org.apache.ignite.GridTestIoUtils; import org.apache.ignite.testframework.junits.spi.GridSpiAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Grid checkpoint SPI abstract test. * @param Concrete SPI class. */ +@RunWith(JUnit4.class) public abstract class GridCheckpointSpiAbstractTest extends GridSpiAbstractTest { /** */ diff --git a/modules/core/src/test/java/org/apache/ignite/spi/checkpoint/cache/CacheCheckpointSpiConfigSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/checkpoint/cache/CacheCheckpointSpiConfigSelfTest.java index 9875e3b267849..af0dcdd6a7ed5 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/checkpoint/cache/CacheCheckpointSpiConfigSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/checkpoint/cache/CacheCheckpointSpiConfigSelfTest.java @@ -19,11 +19,15 @@ import org.apache.ignite.testframework.junits.spi.GridSpiAbstractConfigTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Grid cache checkpoint SPI config self test. */ @GridSpiTest(spi = CacheCheckpointSpi.class, group = "Checkpoint SPI") +@RunWith(JUnit4.class) public class CacheCheckpointSpiConfigSelfTest extends GridSpiAbstractConfigTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/spi/checkpoint/cache/CacheCheckpointSpiSecondCacheSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/checkpoint/cache/CacheCheckpointSpiSecondCacheSelfTest.java index acaf020dd8fa0..05e43115e5032 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/checkpoint/cache/CacheCheckpointSpiSecondCacheSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/checkpoint/cache/CacheCheckpointSpiSecondCacheSelfTest.java @@ -24,6 +24,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.REPLICATED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -31,6 +34,7 @@ /** * Test for cache checkpoint SPI with second cache configured. */ +@RunWith(JUnit4.class) public class CacheCheckpointSpiSecondCacheSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/spi/checkpoint/jdbc/JdbcCheckpointSpiConfigSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/checkpoint/jdbc/JdbcCheckpointSpiConfigSelfTest.java index fd13a91acef2b..53d28de207b2e 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/checkpoint/jdbc/JdbcCheckpointSpiConfigSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/checkpoint/jdbc/JdbcCheckpointSpiConfigSelfTest.java @@ -21,6 +21,9 @@ import org.apache.ignite.testframework.junits.spi.GridSpiAbstractConfigTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; import org.hsqldb.jdbc.jdbcDataSource; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.spi.checkpoint.jdbc.JdbcCheckpointSpi.DFLT_CHECKPOINT_TABLE_NAME; import static org.apache.ignite.spi.checkpoint.jdbc.JdbcCheckpointSpi.DFLT_EXPIRE_DATE_FIELD_NAME; @@ -33,6 +36,7 @@ * Grid jdbc checkpoint SPI config self test. */ @GridSpiTest(spi = JdbcCheckpointSpi.class, group = "Checkpoint SPI") +@RunWith(JUnit4.class) public class JdbcCheckpointSpiConfigSelfTest extends GridSpiAbstractConfigTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/spi/checkpoint/sharedfs/GridSharedFsCheckpointSpiConfigSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/checkpoint/sharedfs/GridSharedFsCheckpointSpiConfigSelfTest.java index bb237b999eefa..54757f01096b1 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/checkpoint/sharedfs/GridSharedFsCheckpointSpiConfigSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/checkpoint/sharedfs/GridSharedFsCheckpointSpiConfigSelfTest.java @@ -20,11 +20,15 @@ import java.util.LinkedList; import org.apache.ignite.testframework.junits.spi.GridSpiAbstractConfigTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Grid shared file system checkpoint SPI config self test. */ @GridSpiTest(spi = SharedFsCheckpointSpi.class, group = "Checkpoint SPI") +@RunWith(JUnit4.class) public class GridSharedFsCheckpointSpiConfigSelfTest extends GridSpiAbstractConfigTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/spi/checkpoint/sharedfs/GridSharedFsCheckpointSpiMultiThreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/checkpoint/sharedfs/GridSharedFsCheckpointSpiMultiThreadedSelfTest.java index 1f991582168b6..df1e6f42f1f41 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/checkpoint/sharedfs/GridSharedFsCheckpointSpiMultiThreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/checkpoint/sharedfs/GridSharedFsCheckpointSpiMultiThreadedSelfTest.java @@ -31,11 +31,15 @@ import org.apache.ignite.testframework.junits.spi.GridSpiTest; import org.apache.ignite.testframework.junits.spi.GridSpiTestConfig; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests SPI in multi-threaded environment. */ @GridSpiTest(spi = SharedFsCheckpointSpi.class, group = "Checkpoint SPI") +@RunWith(JUnit4.class) public class GridSharedFsCheckpointSpiMultiThreadedSelfTest extends GridSpiAbstractTest { /** */ diff --git a/modules/core/src/test/java/org/apache/ignite/spi/checkpoint/sharedfs/GridSharedFsCheckpointSpiMultipleDirectoriesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/checkpoint/sharedfs/GridSharedFsCheckpointSpiMultipleDirectoriesSelfTest.java index d0ca9b4fd1d2d..22bd4cf920196 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/checkpoint/sharedfs/GridSharedFsCheckpointSpiMultipleDirectoriesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/checkpoint/sharedfs/GridSharedFsCheckpointSpiMultipleDirectoriesSelfTest.java @@ -27,11 +27,15 @@ import org.apache.ignite.testframework.junits.spi.GridSpiAbstractTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; import org.apache.ignite.testframework.junits.spi.GridSpiTestConfig; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests multiple shared directories. */ @GridSpiTest(spi = SharedFsCheckpointSpi.class, group = "Checkpoint SPI") +@RunWith(JUnit4.class) public class GridSharedFsCheckpointSpiMultipleDirectoriesSelfTest extends GridSpiAbstractTest { /** */ diff --git a/modules/core/src/test/java/org/apache/ignite/spi/collision/fifoqueue/GridFifoQueueCollisionSpiConfigSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/collision/fifoqueue/GridFifoQueueCollisionSpiConfigSelfTest.java index 8c49de7621ba8..fb0a298c07503 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/collision/fifoqueue/GridFifoQueueCollisionSpiConfigSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/collision/fifoqueue/GridFifoQueueCollisionSpiConfigSelfTest.java @@ -19,11 +19,15 @@ import org.apache.ignite.testframework.junits.spi.GridSpiAbstractConfigTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Unit tests for {@link FifoQueueCollisionSpi} config. */ @GridSpiTest(spi = FifoQueueCollisionSpi.class, group = "Collision SPI") +@RunWith(JUnit4.class) public class GridFifoQueueCollisionSpiConfigSelfTest extends GridSpiAbstractConfigTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/spi/collision/fifoqueue/GridFifoQueueCollisionSpiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/collision/fifoqueue/GridFifoQueueCollisionSpiSelfTest.java index 1a5682868b95b..ec0f57161b40f 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/collision/fifoqueue/GridFifoQueueCollisionSpiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/collision/fifoqueue/GridFifoQueueCollisionSpiSelfTest.java @@ -26,11 +26,15 @@ import org.apache.ignite.spi.collision.GridTestCollisionTaskSession; import org.apache.ignite.testframework.junits.spi.GridSpiAbstractTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Unit tests for {@link FifoQueueCollisionSpi}. */ @GridSpiTest(spi = FifoQueueCollisionSpi.class, group = "Collision SPI") +@RunWith(JUnit4.class) public class GridFifoQueueCollisionSpiSelfTest extends GridSpiAbstractTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/spi/collision/jobstealing/GridJobStealingCollisionSpiAttributesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/collision/jobstealing/GridJobStealingCollisionSpiAttributesSelfTest.java index 5258384fcd57e..da1b80d017159 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/collision/jobstealing/GridJobStealingCollisionSpiAttributesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/collision/jobstealing/GridJobStealingCollisionSpiAttributesSelfTest.java @@ -34,6 +34,9 @@ import org.apache.ignite.testframework.junits.spi.GridSpiAbstractTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; import org.apache.ignite.testframework.junits.spi.GridSpiTestConfig; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.IgniteNodeAttributes.ATTR_SPI_CLASS; import static org.apache.ignite.spi.collision.jobstealing.JobStealingCollisionSpi.WAIT_JOBS_THRESHOLD_NODE_ATTR; @@ -42,6 +45,7 @@ * Job stealing attributes test. */ @GridSpiTest(spi = JobStealingCollisionSpi.class, group = "Collision SPI") +@RunWith(JUnit4.class) public class GridJobStealingCollisionSpiAttributesSelfTest extends GridSpiAbstractTest { /** */ private static GridTestNode rmtNode; diff --git a/modules/core/src/test/java/org/apache/ignite/spi/collision/jobstealing/GridJobStealingCollisionSpiConfigSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/collision/jobstealing/GridJobStealingCollisionSpiConfigSelfTest.java index 54e02ffb50a5e..d7db2a77925e8 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/collision/jobstealing/GridJobStealingCollisionSpiConfigSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/collision/jobstealing/GridJobStealingCollisionSpiConfigSelfTest.java @@ -19,11 +19,15 @@ import org.apache.ignite.testframework.junits.spi.GridSpiAbstractConfigTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Job stealing collision SPI config test. */ @GridSpiTest(spi = JobStealingCollisionSpi.class, group = "Collision SPI") +@RunWith(JUnit4.class) public class GridJobStealingCollisionSpiConfigSelfTest extends GridSpiAbstractConfigTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/spi/collision/jobstealing/GridJobStealingCollisionSpiCustomTopologySelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/collision/jobstealing/GridJobStealingCollisionSpiCustomTopologySelfTest.java index 0a45b273a9d88..f061cbbc467e2 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/collision/jobstealing/GridJobStealingCollisionSpiCustomTopologySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/collision/jobstealing/GridJobStealingCollisionSpiCustomTopologySelfTest.java @@ -38,6 +38,9 @@ import org.apache.ignite.testframework.junits.spi.GridSpiTest; import org.apache.ignite.testframework.junits.spi.GridSpiTestConfig; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.IgniteNodeAttributes.ATTR_SPI_CLASS; import static org.apache.ignite.spi.collision.jobstealing.JobStealingCollisionSpi.THIEF_NODE_ATTR; @@ -46,6 +49,7 @@ * Job stealing collision SPI topology test. */ @GridSpiTest(spi = JobStealingCollisionSpi.class, group = "Collision SPI") +@RunWith(JUnit4.class) public class GridJobStealingCollisionSpiCustomTopologySelfTest extends GridSpiAbstractTest { /** */ diff --git a/modules/core/src/test/java/org/apache/ignite/spi/collision/jobstealing/GridJobStealingCollisionSpiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/collision/jobstealing/GridJobStealingCollisionSpiSelfTest.java index 47076ffa0a234..5e3354873c4ab 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/collision/jobstealing/GridJobStealingCollisionSpiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/collision/jobstealing/GridJobStealingCollisionSpiSelfTest.java @@ -40,6 +40,9 @@ import org.apache.ignite.testframework.junits.spi.GridSpiTest; import org.apache.ignite.testframework.junits.spi.GridSpiTestConfig; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.IgniteNodeAttributes.ATTR_SPI_CLASS; import static org.apache.ignite.spi.collision.jobstealing.JobStealingCollisionSpi.STEALING_ATTEMPT_COUNT_ATTR; @@ -50,6 +53,7 @@ * Job stealing SPI test. */ @GridSpiTest(spi = JobStealingCollisionSpi.class, group = "Collision SPI") +@RunWith(JUnit4.class) public class GridJobStealingCollisionSpiSelfTest extends GridSpiAbstractTest { /** */ public GridJobStealingCollisionSpiSelfTest() { diff --git a/modules/core/src/test/java/org/apache/ignite/spi/collision/priorityqueue/GridPriorityQueueCollisionSpiConfigSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/collision/priorityqueue/GridPriorityQueueCollisionSpiConfigSelfTest.java index 9f1873f92a66d..53bb96f36689b 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/collision/priorityqueue/GridPriorityQueueCollisionSpiConfigSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/collision/priorityqueue/GridPriorityQueueCollisionSpiConfigSelfTest.java @@ -19,11 +19,15 @@ import org.apache.ignite.testframework.junits.spi.GridSpiAbstractConfigTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Priority queue collision SPI config test. */ @GridSpiTest(spi = PriorityQueueCollisionSpi.class, group = "Collision SPI") +@RunWith(JUnit4.class) public class GridPriorityQueueCollisionSpiConfigSelfTest extends GridSpiAbstractConfigTest { /** diff --git a/modules/core/src/test/java/org/apache/ignite/spi/collision/priorityqueue/GridPriorityQueueCollisionSpiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/collision/priorityqueue/GridPriorityQueueCollisionSpiSelfTest.java index 158ac0d0e816d..4f2a3fe6dbd84 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/collision/priorityqueue/GridPriorityQueueCollisionSpiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/collision/priorityqueue/GridPriorityQueueCollisionSpiSelfTest.java @@ -29,6 +29,9 @@ import org.apache.ignite.testframework.junits.spi.GridSpiAbstractTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.spi.collision.priorityqueue.PriorityQueueCollisionSpi.DFLT_JOB_PRIORITY_ATTRIBUTE_KEY; import static org.apache.ignite.spi.collision.priorityqueue.PriorityQueueCollisionSpi.DFLT_PARALLEL_JOBS_NUM; @@ -39,6 +42,7 @@ * Priority queue collision SPI test. */ @GridSpiTest(spi = PriorityQueueCollisionSpi.class, group = "Collision SPI") +@RunWith(JUnit4.class) public class GridPriorityQueueCollisionSpiSelfTest extends GridSpiAbstractTest { /** {@inheritDoc} */ @Override protected void afterTest() throws Exception { From 7f8e9cf1ad91fa60b592399a14f5d077403f4f04 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Mon, 3 Dec 2018 19:48:02 +0300 Subject: [PATCH 025/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview --- .../spi/communication/GridAbstractCommunicationSelfTest.java | 4 ++++ .../ignite/spi/communication/GridCacheMessageSelfTest.java | 4 ++++ .../spi/communication/tcp/GridCacheDhtLockBackupSelfTest.java | 4 ++++ .../tcp/GridTcpCommunicationSpiAbstractTest.java | 4 ++++ .../tcp/GridTcpCommunicationSpiConcurrentConnectSelfTest.java | 4 ++++ .../tcp/GridTcpCommunicationSpiConfigSelfTest.java | 4 ++++ .../communication/tcp/GridTcpCommunicationSpiLanLoadTest.java | 4 ++++ .../tcp/GridTcpCommunicationSpiMultithreadedSelfTest.java | 4 ++++ .../tcp/GridTcpCommunicationSpiRecoveryAckSelfTest.java | 4 ++++ ...idTcpCommunicationSpiRecoveryFailureDetectionSelfTest.java | 4 ++++ .../tcp/GridTcpCommunicationSpiRecoverySelfTest.java | 4 ++++ .../GridTcpCommunicationSpiTcpFailureDetectionSelfTest.java | 4 ++++ .../tcp/IgniteTcpCommunicationRecoveryAckClosureSelfTest.java | 4 ++++ .../communication/tcp/TcpCommunicationSpiDropNodesTest.java | 4 ++++ .../tcp/TcpCommunicationSpiFaultyClientTest.java | 4 ++++ .../tcp/TcpCommunicationSpiHalfOpenedConnectionTest.java | 4 ++++ .../tcp/TcpCommunicationSpiSkipMessageSendTest.java | 4 ++++ .../spi/communication/tcp/TcpCommunicationStatisticsTest.java | 4 ++++ .../spi/deployment/local/GridLocalDeploymentSpiSelfTest.java | 4 ++++ 19 files changed, 76 insertions(+) diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/GridAbstractCommunicationSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/GridAbstractCommunicationSelfTest.java index dee8d3c6538c8..26cd67f9687e9 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/GridAbstractCommunicationSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/GridAbstractCommunicationSelfTest.java @@ -44,6 +44,9 @@ import org.apache.ignite.testframework.junits.IgniteMock; import org.apache.ignite.testframework.junits.IgniteTestResources; import org.apache.ignite.testframework.junits.spi.GridSpiAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.IgniteNodeAttributes.ATTR_MACS; @@ -51,6 +54,7 @@ * Super class for all communication self tests. * @param Type of communication SPI. */ +@RunWith(JUnit4.class) public abstract class GridAbstractCommunicationSelfTest extends GridSpiAbstractTest { /** */ private static long msgId = 1; diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/GridCacheMessageSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/GridCacheMessageSelfTest.java index a2eca3053f980..9e758c90cfd52 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/GridCacheMessageSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/GridCacheMessageSelfTest.java @@ -47,6 +47,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.SECONDS; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -54,6 +57,7 @@ /** * Messaging test. */ +@RunWith(JUnit4.class) public class GridCacheMessageSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridCacheDhtLockBackupSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridCacheDhtLockBackupSelfTest.java index 9ab76774caf8f..aeb6e50d638f1 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridCacheDhtLockBackupSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridCacheDhtLockBackupSelfTest.java @@ -41,6 +41,9 @@ import org.apache.ignite.testframework.GridTestThread; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_ASYNC; @@ -48,6 +51,7 @@ /** * Special cases for GG-2329. */ +@RunWith(JUnit4.class) public class GridCacheDhtLockBackupSelfTest extends GridCommonAbstractTest { /** Ip-finder. */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiAbstractTest.java index d6ada9a334992..b33c1e826ce47 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiAbstractTest.java @@ -36,10 +36,14 @@ import org.apache.ignite.spi.communication.CommunicationSpi; import org.apache.ignite.spi.communication.GridAbstractCommunicationSelfTest; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for {@link TcpCommunicationSpi} */ +@RunWith(JUnit4.class) abstract class GridTcpCommunicationSpiAbstractTest extends GridAbstractCommunicationSelfTest { /** */ private static final int SPI_COUNT = 3; diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiConcurrentConnectSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiConcurrentConnectSelfTest.java index cf5c9b6925c3e..8683ef8ef1c9c 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiConcurrentConnectSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiConcurrentConnectSelfTest.java @@ -59,11 +59,15 @@ import org.apache.ignite.testframework.junits.IgniteTestResources; import org.apache.ignite.testframework.junits.spi.GridSpiAbstractTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @GridSpiTest(spi = TcpCommunicationSpi.class, group = "Communication SPI") +@RunWith(JUnit4.class) public class GridTcpCommunicationSpiConcurrentConnectSelfTest extends GridSpiAbstractTest { /** */ diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiConfigSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiConfigSelfTest.java index ad5b9e30385fb..2dcd6ba0bad11 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiConfigSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiConfigSelfTest.java @@ -20,6 +20,9 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.testframework.junits.spi.GridSpiAbstractConfigTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.testframework.GridTestUtils.getFreeCommPort; @@ -27,6 +30,7 @@ * TCP communication SPI config test. */ @GridSpiTest(spi = TcpCommunicationSpi.class, group = "Communication SPI") +@RunWith(JUnit4.class) public class GridTcpCommunicationSpiConfigSelfTest extends GridSpiAbstractConfigTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiLanLoadTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiLanLoadTest.java index ee89bd6648812..21aec783a62e8 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiLanLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiLanLoadTest.java @@ -41,10 +41,14 @@ import org.apache.ignite.testframework.config.GridTestProperties; import org.apache.ignite.testframework.junits.IgniteTestResources; import org.apache.ignite.testframework.junits.spi.GridSpiAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Class for multithreaded {@link TcpCommunicationSpi} test. */ +@RunWith(JUnit4.class) public class GridTcpCommunicationSpiLanLoadTest extends GridSpiAbstractTest { /** Connection idle timeout */ public static final int IDLE_CONN_TIMEOUT = 2000; diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiMultithreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiMultithreadedSelfTest.java index 5f27c3f97b613..7df40f8852bc2 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiMultithreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiMultithreadedSelfTest.java @@ -61,12 +61,16 @@ import org.apache.ignite.testframework.junits.GridTestKernalContext; import org.apache.ignite.testframework.junits.IgniteTestResources; import org.apache.ignite.testframework.junits.spi.GridSpiAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.IgniteNodeAttributes.ATTR_MACS; /** * Class for multithreaded {@link TcpCommunicationSpi} test. */ +@RunWith(JUnit4.class) public class GridTcpCommunicationSpiMultithreadedSelfTest extends GridSpiAbstractTest { /** Connection idle timeout */ public static final int IDLE_CONN_TIMEOUT = 2000; diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoveryAckSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoveryAckSelfTest.java index a81be67a346e3..22d1075cd2518 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoveryAckSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoveryAckSelfTest.java @@ -50,11 +50,15 @@ import org.apache.ignite.testframework.junits.IgniteTestResources; import org.apache.ignite.testframework.junits.spi.GridSpiAbstractTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @GridSpiTest(spi = TcpCommunicationSpi.class, group = "Communication SPI") +@RunWith(JUnit4.class) public class GridTcpCommunicationSpiRecoveryAckSelfTest extends GridSpiAbstractTest { /** */ private static final Collection spiRsrcs = new ArrayList<>(); diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoveryFailureDetectionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoveryFailureDetectionSelfTest.java index e8c9c22002df6..6dfbbf028a823 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoveryFailureDetectionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoveryFailureDetectionSelfTest.java @@ -18,10 +18,14 @@ package org.apache.ignite.spi.communication.tcp; import org.apache.ignite.configuration.IgniteConfiguration; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class GridTcpCommunicationSpiRecoveryFailureDetectionSelfTest extends GridTcpCommunicationSpiRecoverySelfTest { /** {@inheritDoc} */ @Override protected TcpCommunicationSpi getSpi(int idx) { diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoverySelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoverySelfTest.java index 96f482f3cd22b..3232ba3d0e864 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoverySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoverySelfTest.java @@ -55,12 +55,16 @@ import org.apache.ignite.testframework.junits.IgniteTestResources; import org.apache.ignite.testframework.junits.spi.GridSpiAbstractTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @SuppressWarnings("unchecked") @GridSpiTest(spi = TcpCommunicationSpi.class, group = "Communication SPI") +@RunWith(JUnit4.class) public class GridTcpCommunicationSpiRecoverySelfTest extends GridSpiAbstractTest { /** */ private static final Collection spiRsrcs = new ArrayList<>(); diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiTcpFailureDetectionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiTcpFailureDetectionSelfTest.java index d9cf75f7a8137..5a47b85ef0d81 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiTcpFailureDetectionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiTcpFailureDetectionSelfTest.java @@ -19,10 +19,14 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.spi.communication.CommunicationSpi; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class GridTcpCommunicationSpiTcpFailureDetectionSelfTest extends GridTcpCommunicationSpiTcpSelfTest { /** */ private static final int SPI_COUNT = 4; diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/IgniteTcpCommunicationRecoveryAckClosureSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/IgniteTcpCommunicationRecoveryAckClosureSelfTest.java index aba130dabfa95..e3045612b5f99 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/IgniteTcpCommunicationRecoveryAckClosureSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/IgniteTcpCommunicationRecoveryAckClosureSelfTest.java @@ -53,11 +53,15 @@ import org.apache.ignite.testframework.junits.IgniteTestResources; import org.apache.ignite.testframework.junits.spi.GridSpiAbstractTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @GridSpiTest(spi = TcpCommunicationSpi.class, group = "Communication SPI") +@RunWith(JUnit4.class) public class IgniteTcpCommunicationRecoveryAckClosureSelfTest extends GridSpiAbstractTest { /** */ diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiDropNodesTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiDropNodesTest.java index b7cb7546b6d73..739b06bc2258f 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiDropNodesTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiDropNodesTest.java @@ -43,12 +43,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_NODE_FAILED; /** * */ +@RunWith(JUnit4.class) public class TcpCommunicationSpiDropNodesTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiFaultyClientTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiFaultyClientTest.java index 8901ae879eba5..91cc002bc9026 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiFaultyClientTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiFaultyClientTest.java @@ -47,12 +47,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_NODE_FAILED; /** * Tests that faulty client will be failed if connection can't be established. */ +@RunWith(JUnit4.class) public class TcpCommunicationSpiFaultyClientTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiHalfOpenedConnectionTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiHalfOpenedConnectionTest.java index 6681ee4155748..ccbd9d26fef7a 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiHalfOpenedConnectionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiHalfOpenedConnectionTest.java @@ -32,10 +32,14 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.plugin.extensions.communication.Message; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests case when connection is closed only for one side, when other is not notified. */ +@RunWith(JUnit4.class) public class TcpCommunicationSpiHalfOpenedConnectionTest extends GridCommonAbstractTest { /** Client spi. */ private TcpCommunicationSpi clientSpi; diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiSkipMessageSendTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiSkipMessageSendTest.java index 0be4b3c855b63..e3d3b63a729ee 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiSkipMessageSendTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiSkipMessageSendTest.java @@ -48,10 +48,14 @@ import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryAbstractMessage; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests that the client will be segmented in time and won't hang due to canceling compute jobs. */ +@RunWith(JUnit4.class) public class TcpCommunicationSpiSkipMessageSendTest extends GridCommonAbstractTest { /** */ private static final CountDownLatch COMPUTE_JOB_STARTED = new CountDownLatch(1); diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationStatisticsTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationStatisticsTest.java index 2288d5f335a5e..df7cb09e6ba91 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationStatisticsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationStatisticsTest.java @@ -46,10 +46,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for TcpCommunicationSpi statistics. */ +@RunWith(JUnit4.class) public class TcpCommunicationStatisticsTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/spi/deployment/local/GridLocalDeploymentSpiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/deployment/local/GridLocalDeploymentSpiSelfTest.java index 1a0702780b2b0..ecca16ab7c3aa 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/deployment/local/GridLocalDeploymentSpiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/deployment/local/GridLocalDeploymentSpiSelfTest.java @@ -35,11 +35,15 @@ import org.apache.ignite.spi.deployment.DeploymentResource; import org.apache.ignite.testframework.junits.spi.GridSpiAbstractTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Local deployment SPI test. */ @GridSpiTest(spi = LocalDeploymentSpi.class, group = "Deployment SPI") +@RunWith(JUnit4.class) public class GridLocalDeploymentSpiSelfTest extends GridSpiAbstractTest { /** */ private static Map>>> tasks = From 4525bc8b9108db183702f73e54d363452a497968 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Mon, 3 Dec 2018 20:02:40 +0300 Subject: [PATCH 026/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview --- .../org/apache/ignite/spi/GridSpiLocalHostInjectionTest.java | 4 ++++ .../org/apache/ignite/spi/GridSpiStartStopAbstractTest.java | 4 ++++ .../org/apache/ignite/spi/GridTcpSpiForwardingSelfTest.java | 4 ++++ .../spi/discovery/AbstractDiscoveryRandomStartStopTest.java | 4 ++++ .../ignite/spi/discovery/AbstractDiscoverySelfTest.java | 4 ++++ .../apache/ignite/spi/discovery/AbstractDiscoveryTest.java | 4 ++++ .../ignite/spi/discovery/AuthenticationRestartTest.java | 4 ++++ .../discovery/ClusterMetricsSnapshotSerializeSelfTest.java | 4 ++++ .../spi/discovery/FilterDataForClientNodeDiscoveryTest.java | 4 ++++ .../spi/discovery/IgniteDiscoveryCacheReuseSelfTest.java | 4 ++++ .../ignite/spi/discovery/LongClientConnectToClusterTest.java | 4 ++++ .../discovery/tcp/DiscoveryUnmarshalVulnerabilityTest.java | 4 ++++ .../ignite/spi/discovery/tcp/IgniteClientConnectTest.java | 5 ++++- .../tcp/IgniteClientReconnectMassiveShutdownTest.java | 4 ++++ .../tcp/TcpClientDiscoveryMarshallerCheckSelfTest.java | 4 ++++ .../tcp/TcpClientDiscoverySpiCoordinatorChangeTest.java | 4 ++++ .../tcp/TcpClientDiscoverySpiFailureTimeoutSelfTest.java | 4 ++++ .../discovery/tcp/TcpClientDiscoverySpiMulticastTest.java | 4 ++++ .../spi/discovery/tcp/TcpClientDiscoverySpiSelfTest.java | 4 ++++ .../discovery/tcp/TcpClientDiscoveryUnresolvedHostTest.java | 4 ++++ .../discovery/tcp/TcpDiscoveryClientSuspensionSelfTest.java | 4 ++++ .../spi/discovery/tcp/TcpDiscoveryConcurrentStartTest.java | 4 ++++ .../discovery/tcp/TcpDiscoveryMarshallerCheckSelfTest.java | 4 ++++ .../spi/discovery/tcp/TcpDiscoveryMultiThreadedTest.java | 4 ++++ .../tcp/TcpDiscoveryNodeAttributesUpdateOnReconnectTest.java | 4 ++++ .../tcp/TcpDiscoveryNodeConfigConsistentIdSelfTest.java | 4 ++++ .../discovery/tcp/TcpDiscoveryNodeConsistentIdSelfTest.java | 4 ++++ .../tcp/TcpDiscoveryPendingMessageDeliveryTest.java | 4 ++++ .../ignite/spi/discovery/tcp/TcpDiscoveryRestartTest.java | 4 ++++ .../discovery/tcp/TcpDiscoverySegmentationPolicyTest.java | 4 ++++ .../ignite/spi/discovery/tcp/TcpDiscoverySelfTest.java | 4 ++++ .../spi/discovery/tcp/TcpDiscoverySnapshotHistoryTest.java | 4 ++++ .../spi/discovery/tcp/TcpDiscoverySpiConfigSelfTest.java | 4 ++++ .../discovery/tcp/TcpDiscoverySpiFailureTimeoutSelfTest.java | 4 ++++ .../ignite/spi/discovery/tcp/TcpDiscoverySpiMBeanTest.java | 4 ++++ .../spi/discovery/tcp/TcpDiscoverySpiReconnectDelayTest.java | 4 ++++ .../spi/discovery/tcp/TcpDiscoverySpiWildcardSelfTest.java | 4 ++++ .../spi/discovery/tcp/TcpDiscoverySslParametersTest.java | 4 ++++ .../discovery/tcp/TcpDiscoverySslSecuredUnsecuredTest.java | 4 ++++ .../discovery/tcp/TcpDiscoverySslTrustedUntrustedTest.java | 4 ++++ .../spi/discovery/tcp/TcpDiscoveryWithWrongServerTest.java | 4 ++++ .../ignite/spi/encryption/KeystoreEncryptionSpiSelfTest.java | 4 ++++ .../memory/GridMemoryEventStorageMultiThreadedSelfTest.java | 4 ++++ .../memory/GridMemoryEventStorageSpiConfigSelfTest.java | 4 ++++ .../memory/GridMemoryEventStorageSpiSelfTest.java | 4 ++++ .../failover/always/GridAlwaysFailoverSpiConfigSelfTest.java | 4 ++++ .../spi/failover/always/GridAlwaysFailoverSpiSelfTest.java | 4 ++++ .../GridJobStealingFailoverSpiConfigSelfTest.java | 4 ++++ .../GridJobStealingFailoverSpiOneNodeSelfTest.java | 4 ++++ .../jobstealing/GridJobStealingFailoverSpiSelfTest.java | 4 ++++ .../spi/failover/never/GridNeverFailoverSpiSelfTest.java | 4 ++++ 51 files changed, 204 insertions(+), 1 deletion(-) diff --git a/modules/core/src/test/java/org/apache/ignite/spi/GridSpiLocalHostInjectionTest.java b/modules/core/src/test/java/org/apache/ignite/spi/GridSpiLocalHostInjectionTest.java index 9c8940e1acabd..79fc96eabf813 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/GridSpiLocalHostInjectionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/GridSpiLocalHostInjectionTest.java @@ -24,10 +24,14 @@ import org.apache.ignite.testframework.junits.GridTestKernalContext; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * This class tests injection of {@code localHost} property to various SPIs. */ +@RunWith(JUnit4.class) public class GridSpiLocalHostInjectionTest extends GridCommonAbstractTest { /** Value to be set globally in config. */ public static final String CONFIG_LOCAL_ADDR_VALUE = "127.0.0.3"; diff --git a/modules/core/src/test/java/org/apache/ignite/spi/GridSpiStartStopAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/spi/GridSpiStartStopAbstractTest.java index 7ac991e1fb1e6..0b92b16d7e468 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/GridSpiStartStopAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/GridSpiStartStopAbstractTest.java @@ -18,11 +18,15 @@ package org.apache.ignite.spi; import org.apache.ignite.testframework.junits.spi.GridSpiAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Base SPI start-stop test class. * @param SPI implementation class. */ +@RunWith(JUnit4.class) public abstract class GridSpiStartStopAbstractTest extends GridSpiAbstractTest { /** */ public static final int COUNT = 5; diff --git a/modules/core/src/test/java/org/apache/ignite/spi/GridTcpSpiForwardingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/GridTcpSpiForwardingSelfTest.java index e5cded354de9f..54415868a88c7 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/GridTcpSpiForwardingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/GridTcpSpiForwardingSelfTest.java @@ -39,10 +39,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for {@link TcpDiscoverySpi} and {@link TcpCommunicationSpi}. */ +@RunWith(JUnit4.class) public class GridTcpSpiForwardingSelfTest extends GridCommonAbstractTest { /** */ private static final int locPort1 = 47500; diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoveryRandomStartStopTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoveryRandomStartStopTest.java index 93065e1d52e49..468e4b64c4e30 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoveryRandomStartStopTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoveryRandomStartStopTest.java @@ -30,11 +30,15 @@ import org.apache.ignite.events.Event; import org.apache.ignite.internal.managers.eventstorage.GridLocalEventListener; import org.apache.ignite.testframework.junits.spi.GridSpiAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Base discovery random start-stop test class. * @param Discovery spi type. */ +@RunWith(JUnit4.class) public abstract class AbstractDiscoveryRandomStartStopTest extends GridSpiAbstractTest { /** */ private static final int DFLT_MAX_INTERVAL = 10; diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoverySelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoverySelfTest.java index 234197686f728..471dc0ba60a95 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoverySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoverySelfTest.java @@ -47,6 +47,9 @@ import org.apache.ignite.testframework.junits.IgniteTestResources; import org.apache.ignite.testframework.junits.spi.GridSpiAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_NODE_METRICS_UPDATED; import static org.apache.ignite.lang.IgniteProductVersion.fromString; @@ -55,6 +58,7 @@ * Base discovery self-test class. * @param SPI implementation class. */ +@RunWith(JUnit4.class) public abstract class AbstractDiscoverySelfTest extends GridSpiAbstractTest { /** */ private static final String HTTP_ADAPTOR_MBEAN_NAME = "mbeanAdaptor:protocol=HTTP"; diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoveryTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoveryTest.java index 1e39f26cc5859..7876524c0a268 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoveryTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoveryTest.java @@ -29,11 +29,15 @@ import org.apache.ignite.events.Event; import org.apache.ignite.internal.managers.eventstorage.GridLocalEventListener; import org.apache.ignite.testframework.junits.spi.GridSpiAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Base discovery test class. * @param SPI implementation class. */ +@RunWith(JUnit4.class) public abstract class AbstractDiscoveryTest extends GridSpiAbstractTest { /** */ @SuppressWarnings({"ClassExplicitlyExtendsThread"}) diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/AuthenticationRestartTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/AuthenticationRestartTest.java index cbb53a2939a98..d7fc2a1f783f1 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/AuthenticationRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/AuthenticationRestartTest.java @@ -25,6 +25,9 @@ import org.apache.ignite.spi.discovery.tcp.TestReconnectPluginProvider; import org.apache.ignite.spi.discovery.tcp.TestReconnectProcessor; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.testframework.GridTestUtils.waitForCondition; @@ -32,6 +35,7 @@ * Checks whether client is able to reconnect to restarted cluster with * enabled security. */ +@RunWith(JUnit4.class) public class AuthenticationRestartTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/ClusterMetricsSnapshotSerializeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/ClusterMetricsSnapshotSerializeSelfTest.java index a9765212536f7..a6a64d87c01f6 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/ClusterMetricsSnapshotSerializeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/ClusterMetricsSnapshotSerializeSelfTest.java @@ -21,11 +21,15 @@ import org.apache.ignite.internal.ClusterMetricsSnapshot; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Grid discovery metrics test. */ @GridCommonTest(group = "Utils") +@RunWith(JUnit4.class) public class ClusterMetricsSnapshotSerializeSelfTest extends GridCommonAbstractTest { /** Metrics serialized by Ignite 1.0 */ private static final byte[] METRICS_V1 = {0, 0, 0, 22, 0, 0, 0, 8, 64, 0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 15, 64, diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/FilterDataForClientNodeDiscoveryTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/FilterDataForClientNodeDiscoveryTest.java index 2b6ea0266c649..1eda5fb56c87b 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/FilterDataForClientNodeDiscoveryTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/FilterDataForClientNodeDiscoveryTest.java @@ -32,10 +32,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class FilterDataForClientNodeDiscoveryTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/IgniteDiscoveryCacheReuseSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/IgniteDiscoveryCacheReuseSelfTest.java index 75d33488acb2b..68e28da3f7ded 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/IgniteDiscoveryCacheReuseSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/IgniteDiscoveryCacheReuseSelfTest.java @@ -31,10 +31,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests discovery cache reuse between topology events. */ +@RunWith(JUnit4.class) public class IgniteDiscoveryCacheReuseSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/LongClientConnectToClusterTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/LongClientConnectToClusterTest.java index 5f71d36086a48..3e4873907633a 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/LongClientConnectToClusterTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/LongClientConnectToClusterTest.java @@ -36,11 +36,15 @@ import java.util.Collection; import java.util.Collections; import java.util.Map; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test client connects to two nodes cluster during time more than the * {@link org.apache.ignite.configuration.IgniteConfiguration#clientFailureDetectionTimeout}. */ +@RunWith(JUnit4.class) public class LongClientConnectToClusterTest extends GridCommonAbstractTest { /** Client instance name. */ public static final String CLIENT_INSTANCE_NAME = "client"; diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/DiscoveryUnmarshalVulnerabilityTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/DiscoveryUnmarshalVulnerabilityTest.java index 29cf2c468cde7..69081c1c4f0b3 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/DiscoveryUnmarshalVulnerabilityTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/DiscoveryUnmarshalVulnerabilityTest.java @@ -32,6 +32,9 @@ import org.apache.ignite.marshaller.jdk.JdkMarshaller; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_MARSHALLER_BLACKLIST; import static org.apache.ignite.IgniteSystemProperties.IGNITE_MARSHALLER_WHITELIST; @@ -39,6 +42,7 @@ /** * Tests for whitelist and blacklist ot avoiding deserialization vulnerability. */ +@RunWith(JUnit4.class) public class DiscoveryUnmarshalVulnerabilityTest extends GridCommonAbstractTest { /** Marshaller. */ private static final JdkMarshaller MARSH = new JdkMarshaller(); diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/IgniteClientConnectTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/IgniteClientConnectTest.java index a5cba43b50e44..cb7ce3e37e711 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/IgniteClientConnectTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/IgniteClientConnectTest.java @@ -39,7 +39,9 @@ import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryAbstractMessage; import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryNodeAddFinishedMessage; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; - +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * We emulate that client receive message about joining to topology earlier than some server nodes in topology. @@ -47,6 +49,7 @@ * To emulate this we connect client to second node in topology and pause sending message about joining finishing to * third node. */ +@RunWith(JUnit4.class) public class IgniteClientConnectTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/IgniteClientReconnectMassiveShutdownTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/IgniteClientReconnectMassiveShutdownTest.java index a192a1e9a50b7..642c08fb79d5f 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/IgniteClientReconnectMassiveShutdownTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/IgniteClientReconnectMassiveShutdownTest.java @@ -42,6 +42,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.SECONDS; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -52,6 +55,7 @@ /** * Client reconnect test in multi threaded mode while cache operations are in progress. */ +@RunWith(JUnit4.class) public class IgniteClientReconnectMassiveShutdownTest extends GridCommonAbstractTest { /** */ private static final int GRID_CNT = 14; diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoveryMarshallerCheckSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoveryMarshallerCheckSelfTest.java index 37ac8446badf6..916e429b9d973 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoveryMarshallerCheckSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoveryMarshallerCheckSelfTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for {@link org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi}. */ +@RunWith(JUnit4.class) public class TcpClientDiscoveryMarshallerCheckSelfTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiCoordinatorChangeTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiCoordinatorChangeTest.java index 7735907cfa70e..be76afde2db6c 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiCoordinatorChangeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiCoordinatorChangeTest.java @@ -27,10 +27,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * This class tests that a client is able to connect to another server node without leaving the cluster. */ +@RunWith(JUnit4.class) public class TcpClientDiscoverySpiCoordinatorChangeTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected void afterTest() throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiFailureTimeoutSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiFailureTimeoutSelfTest.java index d60ff7a73ec50..644ac59fe2c3a 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiFailureTimeoutSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiFailureTimeoutSelfTest.java @@ -43,12 +43,16 @@ import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryAbstractMessage; import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryPingRequest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_NODE_FAILED; /** * Client-based discovery SPI test with failure detection timeout enabled. */ +@RunWith(JUnit4.class) public class TcpClientDiscoverySpiFailureTimeoutSelfTest extends TcpClientDiscoverySpiSelfTest { /** */ private static final int FAILURE_AWAIT_TIME = 7_000; diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiMulticastTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiMulticastTest.java index d797bcfeab998..ec44dee4cb1ac 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiMulticastTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiMulticastTest.java @@ -30,6 +30,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.SECONDS; import static org.apache.ignite.events.EventType.EVT_CLIENT_NODE_DISCONNECTED; @@ -38,6 +41,7 @@ /** * */ +@RunWith(JUnit4.class) public class TcpClientDiscoverySpiMulticastTest extends GridCommonAbstractTest { /** */ private boolean forceSrv; diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiSelfTest.java index a9ae80f38f991..b52f00bdd8627 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiSelfTest.java @@ -73,6 +73,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.MINUTES; @@ -86,6 +89,7 @@ /** * Client-based discovery tests. */ +@RunWith(JUnit4.class) public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryVmIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoveryUnresolvedHostTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoveryUnresolvedHostTest.java index ee8bb6d55557d..78be17048fead 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoveryUnresolvedHostTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoveryUnresolvedHostTest.java @@ -29,10 +29,14 @@ import org.apache.ignite.spi.IgniteSpiOperationTimeoutHelper; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Client-based discovery SPI test with unresolved server hosts. */ +@RunWith(JUnit4.class) public class TcpClientDiscoveryUnresolvedHostTest extends GridCommonAbstractTest { /** */ TestTcpDiscoverySpi spi; diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryClientSuspensionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryClientSuspensionSelfTest.java index 0196b11098faf..1413f1f25e801 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryClientSuspensionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryClientSuspensionSelfTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for missed client metrics update messages. */ +@RunWith(JUnit4.class) public class TcpDiscoveryClientSuspensionSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryConcurrentStartTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryConcurrentStartTest.java index 18780ab594c65..928cce748b227 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryConcurrentStartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryConcurrentStartTest.java @@ -25,10 +25,14 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for {@link TcpDiscoverySpi}. */ +@RunWith(JUnit4.class) public class TcpDiscoveryConcurrentStartTest extends GridCommonAbstractTest { /** */ private static final int TOP_SIZE = 3; diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryMarshallerCheckSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryMarshallerCheckSelfTest.java index ad2925f7a24fe..13946a6336875 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryMarshallerCheckSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryMarshallerCheckSelfTest.java @@ -25,10 +25,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for {@link TcpDiscoverySpi}. */ +@RunWith(JUnit4.class) public class TcpDiscoveryMarshallerCheckSelfTest extends GridCommonAbstractTest { /** */ private static boolean sameMarsh; diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryMultiThreadedTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryMultiThreadedTest.java index b87df6d7fc474..1082d43da997d 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryMultiThreadedTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryMultiThreadedTest.java @@ -58,6 +58,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_JOB_MAPPED; import static org.apache.ignite.events.EventType.EVT_NODE_FAILED; @@ -68,6 +71,7 @@ /** * Test for {@link TcpDiscoverySpi}. */ +@RunWith(JUnit4.class) public class TcpDiscoveryMultiThreadedTest extends GridCommonAbstractTest { /** */ private static final int GRID_CNT = 5; diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryNodeAttributesUpdateOnReconnectTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryNodeAttributesUpdateOnReconnectTest.java index 089874d74f9a6..25b14a92bfe96 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryNodeAttributesUpdateOnReconnectTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryNodeAttributesUpdateOnReconnectTest.java @@ -32,12 +32,16 @@ import org.apache.ignite.resources.LoggerResource; import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.IgniteClientReconnectAbstractTest.reconnectClientNode; /** * Checks whether on client reconnect node attributes from kernal context are sent. */ +@RunWith(JUnit4.class) public class TcpDiscoveryNodeAttributesUpdateOnReconnectTest extends GridCommonAbstractTest { /** */ private volatile String rejoinAttr; diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryNodeConfigConsistentIdSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryNodeConfigConsistentIdSelfTest.java index e313afa71d4bb..5ba36cac594d1 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryNodeConfigConsistentIdSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryNodeConfigConsistentIdSelfTest.java @@ -22,10 +22,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for {@link IgniteConfiguration#consistentId}. */ +@RunWith(JUnit4.class) public class TcpDiscoveryNodeConfigConsistentIdSelfTest extends GridCommonAbstractTest { /** IP finder. */ private TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryNodeConsistentIdSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryNodeConsistentIdSelfTest.java index c95651d580038..09afa62d5638a 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryNodeConsistentIdSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryNodeConsistentIdSelfTest.java @@ -23,10 +23,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for {@link TcpDiscoveryNode#consistentId()} */ +@RunWith(JUnit4.class) public class TcpDiscoveryNodeConsistentIdSelfTest extends GridCommonAbstractTest { /** IP finder. */ private TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryPendingMessageDeliveryTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryPendingMessageDeliveryTest.java index 7bee6f692c211..6e5588ae28dea 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryPendingMessageDeliveryTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryPendingMessageDeliveryTest.java @@ -37,10 +37,14 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class TcpDiscoveryPendingMessageDeliveryTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryRestartTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryRestartTest.java index 837e52863757c..4f0db6e2e298f 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryRestartTest.java @@ -37,6 +37,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_NODE_FAILED; import static org.apache.ignite.events.EventType.EVT_NODE_JOINED; @@ -45,6 +48,7 @@ /** * */ +@RunWith(JUnit4.class) public class TcpDiscoveryRestartTest extends GridCommonAbstractTest { /** */ private TcpDiscoveryVmIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySegmentationPolicyTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySegmentationPolicyTest.java index 003f7e8d33f27..5e944f8d42449 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySegmentationPolicyTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySegmentationPolicyTest.java @@ -27,10 +27,14 @@ import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.IgniteKernal; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for segmentation policy and failure handling in {@link TcpDiscoverySpi}. */ +@RunWith(JUnit4.class) public class TcpDiscoverySegmentationPolicyTest extends GridCommonAbstractTest { /** Nodes count. */ private static final int NODES_CNT = 3; diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySelfTest.java index c46315028a0ea..16c58c16957ca 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySelfTest.java @@ -92,6 +92,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.SECONDS; import static org.apache.ignite.events.EventType.EVT_JOB_MAPPED; @@ -108,6 +111,7 @@ /** * Test for {@link TcpDiscoverySpi}. */ +@RunWith(JUnit4.class) public class TcpDiscoverySelfTest extends GridCommonAbstractTest { /** */ private TcpDiscoveryVmIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySnapshotHistoryTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySnapshotHistoryTest.java index ff7ed4f316c61..65303a946195a 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySnapshotHistoryTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySnapshotHistoryTest.java @@ -26,12 +26,16 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import java.util.Collections; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi.DFLT_TOP_HISTORY_SIZE; /** * Tests for topology snapshots history. */ +@RunWith(JUnit4.class) public class TcpDiscoverySnapshotHistoryTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiConfigSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiConfigSelfTest.java index 1c53c6c06462d..850ca1fa11fd2 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiConfigSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiConfigSelfTest.java @@ -21,11 +21,15 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.spi.GridSpiAbstractConfigTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @GridSpiTest(spi = TcpDiscoverySpi.class, group = "Discovery SPI") +@RunWith(JUnit4.class) public class TcpDiscoverySpiConfigSelfTest extends GridSpiAbstractConfigTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiFailureTimeoutSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiFailureTimeoutSelfTest.java index 46088497b7ecc..56324a79b4725 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiFailureTimeoutSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiFailureTimeoutSelfTest.java @@ -34,10 +34,14 @@ import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryAbstractMessage; import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryConnectionCheckMessage; import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryPingRequest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class TcpDiscoverySpiFailureTimeoutSelfTest extends AbstractDiscoverySelfTest { /** */ private static final int SPI_COUNT = 6; diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiMBeanTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiMBeanTest.java index 43ca914f03867..3a4d7cfad03e2 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiMBeanTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiMBeanTest.java @@ -27,10 +27,14 @@ import javax.management.MBeanServer; import javax.management.ObjectName; import java.lang.management.ManagementFactory; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests TcpDiscoverySpiMBean. */ +@RunWith(JUnit4.class) public class TcpDiscoverySpiMBeanTest extends GridCommonAbstractTest { /** */ private GridStringLogger strLog = new GridStringLogger(); diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiReconnectDelayTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiReconnectDelayTest.java index 55db8e37873ca..7d9daf9fb7a18 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiReconnectDelayTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiReconnectDelayTest.java @@ -36,6 +36,9 @@ import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryClientReconnectMessage; import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryJoinRequestMessage; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.events.EventType.EVT_CLIENT_NODE_DISCONNECTED; @@ -47,6 +50,7 @@ /** * Test for {@link TcpDiscoverySpi#setReconnectDelay(int)}. */ +@RunWith(JUnit4.class) public class TcpDiscoverySpiReconnectDelayTest extends GridCommonAbstractTest { /** Time to wait for events. */ private static final int EVT_TIMEOUT = 120000; diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiWildcardSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiWildcardSelfTest.java index 4afac405b8d9c..0974c7f332a1b 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiWildcardSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiWildcardSelfTest.java @@ -21,10 +21,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class TcpDiscoverySpiWildcardSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySslParametersTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySslParametersTest.java index 1526b97311a3a..7d0dfddb2a691 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySslParametersTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySslParametersTest.java @@ -23,10 +23,14 @@ import org.apache.ignite.ssl.SslContextFactory; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests cases when node connects to cluster with different set of cipher suites. */ +@RunWith(JUnit4.class) public class TcpDiscoverySslParametersTest extends GridCommonAbstractTest { /** */ diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySslSecuredUnsecuredTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySslSecuredUnsecuredTest.java index acce81c778bde..6803dddd38954 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySslSecuredUnsecuredTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySslSecuredUnsecuredTest.java @@ -29,11 +29,15 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests cases when node connects to cluster with different SSL configuration. * Exception with meaningful message should be thrown. */ +@RunWith(JUnit4.class) public class TcpDiscoverySslSecuredUnsecuredTest extends GridCommonAbstractTest { /** */ private volatile TcpDiscoverySpi spi; diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySslTrustedUntrustedTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySslTrustedUntrustedTest.java index 04d470008edce..1357b1d7be6d6 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySslTrustedUntrustedTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySslTrustedUntrustedTest.java @@ -22,11 +22,15 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests cases when node connects to cluster with different SSL configuration. * Exception with meaningful message should be thrown. */ +@RunWith(JUnit4.class) public class TcpDiscoverySslTrustedUntrustedTest extends GridCommonAbstractTest { /** */ private volatile String keyStore; diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryWithWrongServerTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryWithWrongServerTest.java index e1da5b517a376..85721c138bd2e 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryWithWrongServerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryWithWrongServerTest.java @@ -36,10 +36,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestThread; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Client-based discovery SPI test with non-Ignite servers. */ +@RunWith(JUnit4.class) public class TcpDiscoveryWithWrongServerTest extends GridCommonAbstractTest { /** Non-Ignite Server port #1. */ private static final int SERVER_PORT = 47500; diff --git a/modules/core/src/test/java/org/apache/ignite/spi/encryption/KeystoreEncryptionSpiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/encryption/KeystoreEncryptionSpiSelfTest.java index d28964e48214d..4e605d5b39cb9 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/encryption/KeystoreEncryptionSpiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/encryption/KeystoreEncryptionSpiSelfTest.java @@ -24,12 +24,16 @@ import org.apache.ignite.spi.encryption.keystore.KeystoreEncryptionSpi; import org.apache.ignite.testframework.GridTestUtils; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.nio.charset.StandardCharsets.UTF_8; import static org.apache.ignite.internal.encryption.AbstractEncryptionTest.KEYSTORE_PASSWORD; import static org.apache.ignite.internal.encryption.AbstractEncryptionTest.KEYSTORE_PATH; /** */ +@RunWith(JUnit4.class) public class KeystoreEncryptionSpiSelfTest extends TestCase { /** @throws Exception If failed. */ @Test diff --git a/modules/core/src/test/java/org/apache/ignite/spi/eventstorage/memory/GridMemoryEventStorageMultiThreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/eventstorage/memory/GridMemoryEventStorageMultiThreadedSelfTest.java index e8d1bf1a235ce..af99a0a5fecd4 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/eventstorage/memory/GridMemoryEventStorageMultiThreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/eventstorage/memory/GridMemoryEventStorageMultiThreadedSelfTest.java @@ -25,11 +25,15 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.spi.GridSpiAbstractTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Memory event storage load test. */ @GridSpiTest(spi = MemoryEventStorageSpi.class, group = "EventStorage SPI") +@RunWith(JUnit4.class) public class GridMemoryEventStorageMultiThreadedSelfTest extends GridSpiAbstractTest { /** * @throws Exception If test failed diff --git a/modules/core/src/test/java/org/apache/ignite/spi/eventstorage/memory/GridMemoryEventStorageSpiConfigSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/eventstorage/memory/GridMemoryEventStorageSpiConfigSelfTest.java index e45a1312589a0..44b4c0af3fcad 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/eventstorage/memory/GridMemoryEventStorageSpiConfigSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/eventstorage/memory/GridMemoryEventStorageSpiConfigSelfTest.java @@ -19,11 +19,15 @@ import org.apache.ignite.testframework.junits.spi.GridSpiAbstractConfigTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Memory event storage SPI config test. */ @GridSpiTest(spi = MemoryEventStorageSpi.class, group = "Event Storage SPI") +@RunWith(JUnit4.class) public class GridMemoryEventStorageSpiConfigSelfTest extends GridSpiAbstractConfigTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/spi/eventstorage/memory/GridMemoryEventStorageSpiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/eventstorage/memory/GridMemoryEventStorageSpiSelfTest.java index 7d38482862620..14cadb2b2f5ca 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/eventstorage/memory/GridMemoryEventStorageSpiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/eventstorage/memory/GridMemoryEventStorageSpiSelfTest.java @@ -25,6 +25,9 @@ import org.apache.ignite.testframework.junits.spi.GridSpiAbstractTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; import org.apache.ignite.testframework.junits.spi.GridSpiTestConfig; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_NODE_METRICS_UPDATED; @@ -32,6 +35,7 @@ * Tests for {@link MemoryEventStorageSpi}. */ @GridSpiTest(spi = MemoryEventStorageSpi.class, group = "Event Storage SPI") +@RunWith(JUnit4.class) public class GridMemoryEventStorageSpiSelfTest extends GridSpiAbstractTest { /** */ private static final int EXPIRE_CNT = 100; diff --git a/modules/core/src/test/java/org/apache/ignite/spi/failover/always/GridAlwaysFailoverSpiConfigSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/failover/always/GridAlwaysFailoverSpiConfigSelfTest.java index 9eafacb8f25a7..8be996b54b481 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/failover/always/GridAlwaysFailoverSpiConfigSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/failover/always/GridAlwaysFailoverSpiConfigSelfTest.java @@ -19,11 +19,15 @@ import org.apache.ignite.testframework.junits.spi.GridSpiAbstractConfigTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Always-failover SPI config test. */ @GridSpiTest(spi = AlwaysFailoverSpi.class, group = "Collision SPI") +@RunWith(JUnit4.class) public class GridAlwaysFailoverSpiConfigSelfTest extends GridSpiAbstractConfigTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/spi/failover/always/GridAlwaysFailoverSpiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/failover/always/GridAlwaysFailoverSpiSelfTest.java index 0e1c6888175c9..c22a277539fb8 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/failover/always/GridAlwaysFailoverSpiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/failover/always/GridAlwaysFailoverSpiSelfTest.java @@ -29,6 +29,9 @@ import org.apache.ignite.testframework.GridTestNode; import org.apache.ignite.testframework.junits.spi.GridSpiAbstractTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.spi.failover.always.AlwaysFailoverSpi.FAILED_NODE_LIST_ATTR; @@ -36,6 +39,7 @@ * Always-failover SPI test. */ @GridSpiTest(spi = AlwaysFailoverSpi.class, group = "Failover SPI") +@RunWith(JUnit4.class) public class GridAlwaysFailoverSpiSelfTest extends GridSpiAbstractTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/spi/failover/jobstealing/GridJobStealingFailoverSpiConfigSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/failover/jobstealing/GridJobStealingFailoverSpiConfigSelfTest.java index a478672f94b49..f6ab3a5ff25a6 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/failover/jobstealing/GridJobStealingFailoverSpiConfigSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/failover/jobstealing/GridJobStealingFailoverSpiConfigSelfTest.java @@ -19,11 +19,15 @@ import org.apache.ignite.testframework.junits.spi.GridSpiAbstractConfigTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Job stealing failover SPI config test. */ @GridSpiTest(spi = JobStealingFailoverSpi.class, group = "Collision SPI") +@RunWith(JUnit4.class) public class GridJobStealingFailoverSpiConfigSelfTest extends GridSpiAbstractConfigTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/spi/failover/jobstealing/GridJobStealingFailoverSpiOneNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/failover/jobstealing/GridJobStealingFailoverSpiOneNodeSelfTest.java index 766f6419c3f20..6ce79bfe885b2 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/failover/jobstealing/GridJobStealingFailoverSpiOneNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/failover/jobstealing/GridJobStealingFailoverSpiOneNodeSelfTest.java @@ -30,11 +30,15 @@ import org.apache.ignite.testframework.GridTestNode; import org.apache.ignite.testframework.junits.spi.GridSpiAbstractTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Job stealing failover SPI test for one node. */ @GridSpiTest(spi = JobStealingFailoverSpi.class, group = "Failover SPI") +@RunWith(JUnit4.class) public class GridJobStealingFailoverSpiOneNodeSelfTest extends GridSpiAbstractTest { /** {@inheritDoc} */ @Override protected GridSpiTestContext initSpiContext() throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/spi/failover/jobstealing/GridJobStealingFailoverSpiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/failover/jobstealing/GridJobStealingFailoverSpiSelfTest.java index 478ce760e99ff..4f7bc31ab0af6 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/failover/jobstealing/GridJobStealingFailoverSpiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/failover/jobstealing/GridJobStealingFailoverSpiSelfTest.java @@ -31,6 +31,9 @@ import org.apache.ignite.testframework.GridTestNode; import org.apache.ignite.testframework.junits.spi.GridSpiAbstractTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.IgniteNodeAttributes.ATTR_SPI_CLASS; import static org.apache.ignite.spi.collision.jobstealing.JobStealingCollisionSpi.THIEF_NODE_ATTR; @@ -41,6 +44,7 @@ * Self test for {@link JobStealingFailoverSpi} SPI. */ @GridSpiTest(spi = JobStealingFailoverSpi.class, group = "Failover SPI") +@RunWith(JUnit4.class) public class GridJobStealingFailoverSpiSelfTest extends GridSpiAbstractTest { /** {@inheritDoc} */ @Override protected GridSpiTestContext initSpiContext() throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/spi/failover/never/GridNeverFailoverSpiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/failover/never/GridNeverFailoverSpiSelfTest.java index 41cd009664599..d2baefea9b538 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/failover/never/GridNeverFailoverSpiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/failover/never/GridNeverFailoverSpiSelfTest.java @@ -27,11 +27,15 @@ import org.apache.ignite.testframework.GridTestNode; import org.apache.ignite.testframework.junits.spi.GridSpiAbstractTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Never failover SPI test. */ @GridSpiTest(spi = NeverFailoverSpi.class, group = "Failover SPI") +@RunWith(JUnit4.class) public class GridNeverFailoverSpiSelfTest extends GridSpiAbstractTest { /** * @throws Exception If failed. From 81d83aacf75a1d73615581ba50ecc9ddaa5eac33 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Mon, 3 Dec 2018 20:07:26 +0300 Subject: [PATCH 027/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview --- .../ignite/startup/cmdline/GridCommandLineLoaderTest.java | 4 ++++ .../startup/cmdline/GridCommandLineTransformerSelfTest.java | 4 ++++ .../startup/properties/NotStringSystemPropertyTest.java | 4 ++++ .../apache/ignite/startup/servlet/GridServletLoaderTest.java | 4 ++++ .../apache/ignite/stream/socket/SocketStreamerSelfTest.java | 4 ++++ .../socket/SocketStreamerUnmarshalVulnerabilityTest.java | 4 ++++ .../ignite/testframework/assertions/AlwaysAssertion.java | 2 +- .../org/apache/ignite/testframework/assertions/Assertion.java | 1 - 8 files changed, 25 insertions(+), 2 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/startup/cmdline/GridCommandLineLoaderTest.java b/modules/core/src/test/java/org/apache/ignite/startup/cmdline/GridCommandLineLoaderTest.java index 1034c35a0b660..3cb3d4597cc97 100644 --- a/modules/core/src/test/java/org/apache/ignite/startup/cmdline/GridCommandLineLoaderTest.java +++ b/modules/core/src/test/java/org/apache/ignite/startup/cmdline/GridCommandLineLoaderTest.java @@ -30,6 +30,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; import org.apache.ignite.testframework.junits.multijvm.IgniteProcessProxy; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_RESTART_CODE; @@ -37,6 +40,7 @@ * Command line loader test. */ @GridCommonTest(group = "Loaders") +@RunWith(JUnit4.class) public class GridCommandLineLoaderTest extends GridCommonAbstractTest { /** */ private static final String GRID_CFG_PATH = "/modules/core/src/test/config/loaders/grid-cfg.xml"; diff --git a/modules/core/src/test/java/org/apache/ignite/startup/cmdline/GridCommandLineTransformerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/startup/cmdline/GridCommandLineTransformerSelfTest.java index f98cc262889fa..d08ed6bdb236d 100644 --- a/modules/core/src/test/java/org/apache/ignite/startup/cmdline/GridCommandLineTransformerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/startup/cmdline/GridCommandLineTransformerSelfTest.java @@ -20,10 +20,14 @@ import java.util.concurrent.Callable; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * GridCommandLineTransformer test. */ +@RunWith(JUnit4.class) public class GridCommandLineTransformerSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/startup/properties/NotStringSystemPropertyTest.java b/modules/core/src/test/java/org/apache/ignite/startup/properties/NotStringSystemPropertyTest.java index b321d168c513f..f2cbf98cd2bd0 100644 --- a/modules/core/src/test/java/org/apache/ignite/startup/properties/NotStringSystemPropertyTest.java +++ b/modules/core/src/test/java/org/apache/ignite/startup/properties/NotStringSystemPropertyTest.java @@ -21,10 +21,14 @@ import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * The test checks start of Ignite with non-string properties. */ +@RunWith(JUnit4.class) public class NotStringSystemPropertyTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration optimize(IgniteConfiguration cfg) throws IgniteCheckedException { diff --git a/modules/core/src/test/java/org/apache/ignite/startup/servlet/GridServletLoaderTest.java b/modules/core/src/test/java/org/apache/ignite/startup/servlet/GridServletLoaderTest.java index a13349c3bfe96..05941d6bb9e14 100644 --- a/modules/core/src/test/java/org/apache/ignite/startup/servlet/GridServletLoaderTest.java +++ b/modules/core/src/test/java/org/apache/ignite/startup/servlet/GridServletLoaderTest.java @@ -29,6 +29,9 @@ import org.apache.ignite.testframework.config.GridTestProperties; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Servlet loader test. @@ -58,6 +61,7 @@ * {@code JAVA_OPTS="${JAVA_OPTS} "-Dcom.sun.management.jmxremote.port=1097" "-Dcom.sun.management.jmxremote.ssl=false" "-Dcom.sun.management.jmxremote.authenticate=false" "} */ @GridCommonTest(group = "Loaders") +@RunWith(JUnit4.class) public class GridServletLoaderTest extends GridCommonAbstractTest { /** */ public static final int JMX_RMI_CONNECTOR_PORT = 1097; diff --git a/modules/core/src/test/java/org/apache/ignite/stream/socket/SocketStreamerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/stream/socket/SocketStreamerSelfTest.java index c5f0550a874d1..d45bfd0462f18 100644 --- a/modules/core/src/test/java/org/apache/ignite/stream/socket/SocketStreamerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/stream/socket/SocketStreamerSelfTest.java @@ -51,12 +51,16 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_PUT; /** * Tests {@link SocketStreamer}. */ +@RunWith(JUnit4.class) public class SocketStreamerSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/stream/socket/SocketStreamerUnmarshalVulnerabilityTest.java b/modules/core/src/test/java/org/apache/ignite/stream/socket/SocketStreamerUnmarshalVulnerabilityTest.java index 6a0d18fd29bba..4044ddd7f9e15 100644 --- a/modules/core/src/test/java/org/apache/ignite/stream/socket/SocketStreamerUnmarshalVulnerabilityTest.java +++ b/modules/core/src/test/java/org/apache/ignite/stream/socket/SocketStreamerUnmarshalVulnerabilityTest.java @@ -41,6 +41,9 @@ import org.apache.ignite.stream.StreamSingleTupleExtractor; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_MARSHALLER_BLACKLIST; import static org.apache.ignite.IgniteSystemProperties.IGNITE_MARSHALLER_WHITELIST; @@ -48,6 +51,7 @@ /** * Tests for whitelist and blacklist ot avoiding deserialization vulnerability. */ +@RunWith(JUnit4.class) public class SocketStreamerUnmarshalVulnerabilityTest extends GridCommonAbstractTest { /** Shared value. */ private static final AtomicBoolean SHARED = new AtomicBoolean(); diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/assertions/AlwaysAssertion.java b/modules/core/src/test/java/org/apache/ignite/testframework/assertions/AlwaysAssertion.java index ce5e5390d7138..797ae2b93f2d2 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/assertions/AlwaysAssertion.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/assertions/AlwaysAssertion.java @@ -23,7 +23,7 @@ public class AlwaysAssertion implements Assertion { public static final Assertion INSTANCE = new AlwaysAssertion(); /** {@inheritDoc} */ - @Override @Test + @Override public void test() throws AssertionError { // No-op. } diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/assertions/Assertion.java b/modules/core/src/test/java/org/apache/ignite/testframework/assertions/Assertion.java index af76ad89921c6..4799d88f1aecf 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/assertions/Assertion.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/assertions/Assertion.java @@ -27,6 +27,5 @@ public interface Assertion { * * @throws AssertionError if the condition was not satisfied. */ - @Test public void test() throws AssertionError; } From 63525f674d1927566ae5c8aba481c0d82aafc52b Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Mon, 3 Dec 2018 20:24:32 +0300 Subject: [PATCH 028/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview --- .../org/apache/ignite/GridCacheAffinityBackupsSelfTest.java | 4 ++++ .../org/apache/ignite/GridSuppressedExceptionSelfTest.java | 4 ++++ .../java/org/apache/ignite/IgniteCacheAffinitySelfTest.java | 4 ++++ .../junits/cache/GridAbstractCacheStoreSelfTest.java | 4 ++++ .../junits/common/GridAbstractLifecycleAwareSelfTest.java | 4 ++++ .../test/ConfigVariationsTestSuiteBuilderTest.java | 4 ++++ .../ignite/testframework/test/ListeningTestLoggerTest.java | 4 ++++ .../apache/ignite/testframework/test/ParametersTest.java | 4 ++++ .../ignite/testframework/test/VariationsIteratorTest.java | 4 ++++ .../apache/ignite/testsuites/IgniteCacheMvccTestSuite.java | 6 ++---- .../thread/GridThreadPoolExecutorServiceSelfTest.java | 4 ++++ .../test/java/org/apache/ignite/thread/GridThreadTest.java | 4 ++++ .../org/apache/ignite/thread/IgniteThreadPoolSizeTest.java | 4 ++++ .../org/apache/ignite/util/AttributeNodeFilterSelfTest.java | 4 ++++ .../org/apache/ignite/util/GridCommandHandlerSslTest.java | 4 ++++ .../java/org/apache/ignite/util/GridCommandHandlerTest.java | 4 ++++ .../util/GridConcurrentLinkedDequeMultiThreadedTest.java | 4 ++++ .../ignite/util/GridConcurrentLinkedDequeSelfTest.java | 4 ++++ .../GridConcurrentLinkedHashMapMultiThreadedSelfTest.java | 4 ++++ .../java/org/apache/ignite/util/GridIntListSelfTest.java | 4 ++++ .../ignite/util/GridInternalTaskUnusedWalSegmentsTest.java | 4 ++++ .../java/org/apache/ignite/util/GridLogThrottleTest.java | 4 ++++ .../java/org/apache/ignite/util/GridLongListSelfTest.java | 4 ++++ .../org/apache/ignite/util/GridMessageCollectionTest.java | 4 ++++ .../org/apache/ignite/util/GridPartitionMapSelfTest.java | 4 ++++ .../test/java/org/apache/ignite/util/GridQueueSelfTest.java | 4 ++++ .../java/org/apache/ignite/util/GridRandomSelfTest.java | 4 ++++ .../org/apache/ignite/util/GridSnapshotLockSelfTest.java | 4 ++++ .../apache/ignite/util/GridSpinReadWriteLockSelfTest.java | 4 ++++ .../ignite/util/GridStringBuilderFactorySelfTest.java | 4 ++++ .../apache/ignite/util/GridTopologyHeapSizeSelfTest.java | 4 ++++ .../test/java/org/apache/ignite/util/GridTransientTest.java | 4 ++++ .../apache/ignite/util/mbeans/GridMBeanBaselineTest.java | 4 ++++ .../apache/ignite/util/mbeans/GridMBeanDisableSelfTest.java | 4 ++++ .../ignite/util/mbeans/GridMBeanExoticNamesSelfTest.java | 4 ++++ .../org/apache/ignite/util/mbeans/GridMBeanSelfTest.java | 4 ++++ .../apache/ignite/util/mbeans/WorkersControlMXBeanTest.java | 4 ++++ 37 files changed, 146 insertions(+), 4 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/GridCacheAffinityBackupsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/GridCacheAffinityBackupsSelfTest.java index cfc2a23772869..fb8a57d3cf422 100644 --- a/modules/core/src/test/java/org/apache/ignite/GridCacheAffinityBackupsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/GridCacheAffinityBackupsSelfTest.java @@ -29,10 +29,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests affinity function with different number of backups. */ +@RunWith(JUnit4.class) public class GridCacheAffinityBackupsSelfTest extends GridCommonAbstractTest { /** */ private final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/GridSuppressedExceptionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/GridSuppressedExceptionSelfTest.java index 48b1cd3900573..d73e0607f0c1f 100644 --- a/modules/core/src/test/java/org/apache/ignite/GridSuppressedExceptionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/GridSuppressedExceptionSelfTest.java @@ -21,10 +21,14 @@ import java.util.List; import junit.framework.TestCase; import org.apache.ignite.internal.util.typedef.X; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class GridSuppressedExceptionSelfTest extends TestCase { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/IgniteCacheAffinitySelfTest.java b/modules/core/src/test/java/org/apache/ignite/IgniteCacheAffinitySelfTest.java index 16f1d8014b0d1..001fa18365b31 100644 --- a/modules/core/src/test/java/org/apache/ignite/IgniteCacheAffinitySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/IgniteCacheAffinitySelfTest.java @@ -32,6 +32,9 @@ import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.internal.processors.affinity.GridAffinityProcessor; import org.apache.ignite.internal.processors.cache.IgniteCacheAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -39,6 +42,7 @@ /** * Tests for {@link GridAffinityProcessor.CacheAffinityProxy}. */ +@RunWith(JUnit4.class) public class IgniteCacheAffinitySelfTest extends IgniteCacheAbstractTest { /** Initial grid count. */ private int GRID_CNT = 3; diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/cache/GridAbstractCacheStoreSelfTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/cache/GridAbstractCacheStoreSelfTest.java index 6a3a63df9c24e..fd8ad188f5b91 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/cache/GridAbstractCacheStoreSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/cache/GridAbstractCacheStoreSelfTest.java @@ -45,10 +45,14 @@ import org.apache.ignite.transactions.TransactionIsolation; import org.apache.ignite.transactions.TransactionState; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Abstract cache store test. */ +@RunWith(JUnit4.class) public abstract class GridAbstractCacheStoreSelfTest> extends GridCommonAbstractTest { /** */ diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridAbstractLifecycleAwareSelfTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridAbstractLifecycleAwareSelfTest.java index 43a5a3b314c34..703d59bec051d 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridAbstractLifecycleAwareSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridAbstractLifecycleAwareSelfTest.java @@ -23,10 +23,14 @@ import org.apache.ignite.Ignite; import org.apache.ignite.lifecycle.LifecycleAware; import org.apache.ignite.resources.CacheNameResource; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Base class for tests against {@link LifecycleAware} support. */ +@RunWith(JUnit4.class) public abstract class GridAbstractLifecycleAwareSelfTest extends GridCommonAbstractTest { /** */ protected Collection lifecycleAwares = new ArrayList<>(); diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/test/ConfigVariationsTestSuiteBuilderTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/test/ConfigVariationsTestSuiteBuilderTest.java index cd4357e8e69da..1b338fd2c4c48 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/test/ConfigVariationsTestSuiteBuilderTest.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/test/ConfigVariationsTestSuiteBuilderTest.java @@ -25,10 +25,14 @@ import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.testframework.configvariations.ConfigVariationsTestSuiteBuilder; import org.apache.ignite.testframework.junits.IgniteConfigVariationsAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class ConfigVariationsTestSuiteBuilderTest extends TestCase { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/test/ListeningTestLoggerTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/test/ListeningTestLoggerTest.java index fdcde7190c242..7e199e7777b17 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/test/ListeningTestLoggerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/test/ListeningTestLoggerTest.java @@ -28,6 +28,9 @@ import org.apache.ignite.testframework.ListeningTestLogger; import org.apache.ignite.testframework.LogListener; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.testframework.GridTestUtils.assertThrowsWithCause; @@ -35,6 +38,7 @@ * Test. */ @SuppressWarnings("ThrowableNotThrown") +@RunWith(JUnit4.class) public class ListeningTestLoggerTest extends GridCommonAbstractTest { /** */ private final ListeningTestLogger log = new ListeningTestLogger(false, super.log); diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/test/ParametersTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/test/ParametersTest.java index ecd6fe4b3e2b3..0ac183d79e05c 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/test/ParametersTest.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/test/ParametersTest.java @@ -24,10 +24,14 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.testframework.configvariations.ConfigParameter; import org.apache.ignite.testframework.configvariations.Parameters; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test. */ +@RunWith(JUnit4.class) public class ParametersTest extends TestCase { /** */ private static final String DEFAULT_CACHE_NAME = "default"; diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/test/VariationsIteratorTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/test/VariationsIteratorTest.java index 36b70b2dbb4df..93964286556f7 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/test/VariationsIteratorTest.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/test/VariationsIteratorTest.java @@ -22,10 +22,14 @@ import java.util.Set; import junit.framework.TestCase; import org.apache.ignite.testframework.configvariations.VariationsIterator; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test start iterator. */ +@RunWith(JUnit4.class) public class VariationsIteratorTest extends TestCase { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite.java index 8cbf7a23c21ea..930706d497b45 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite.java @@ -96,8 +96,7 @@ public static class MvccIgniteCacheTxPeekModesTest extends IgniteCacheTxPeekMode } /** {@inheritDoc} */ - @Override @Test - public void testLocalEntries() throws Exception { + @Override public void testLocalEntries() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10167"); super.testLocalEntries(); @@ -112,8 +111,7 @@ public static class MvccIgniteCacheTxReplicatedPeekModesTest extends IgniteCache } /** {@inheritDoc} */ - @Override @Test - public void testLocalEntries() throws Exception { + @Override public void testLocalEntries() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10167"); super.testLocalEntries(); diff --git a/modules/core/src/test/java/org/apache/ignite/thread/GridThreadPoolExecutorServiceSelfTest.java b/modules/core/src/test/java/org/apache/ignite/thread/GridThreadPoolExecutorServiceSelfTest.java index b2cba486146db..f6d00815ed501 100644 --- a/modules/core/src/test/java/org/apache/ignite/thread/GridThreadPoolExecutorServiceSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/thread/GridThreadPoolExecutorServiceSelfTest.java @@ -28,6 +28,9 @@ import java.util.concurrent.atomic.AtomicInteger; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.SECONDS; @@ -35,6 +38,7 @@ * Test for {@link IgniteThreadPoolExecutor}. */ @GridCommonTest(group = "Utils") +@RunWith(JUnit4.class) public class GridThreadPoolExecutorServiceSelfTest extends GridCommonAbstractTest { /** Thread count. */ private static final int THREAD_CNT = 40; diff --git a/modules/core/src/test/java/org/apache/ignite/thread/GridThreadTest.java b/modules/core/src/test/java/org/apache/ignite/thread/GridThreadTest.java index 85d4b17456bb5..2a3e35214e679 100644 --- a/modules/core/src/test/java/org/apache/ignite/thread/GridThreadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/thread/GridThreadTest.java @@ -21,11 +21,15 @@ import java.util.Collection; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for {@link org.apache.ignite.thread.IgniteThread}. */ @GridCommonTest(group = "Utils") +@RunWith(JUnit4.class) public class GridThreadTest extends GridCommonAbstractTest { /** Thread count. */ private static final int THREAD_CNT = 3; diff --git a/modules/core/src/test/java/org/apache/ignite/thread/IgniteThreadPoolSizeTest.java b/modules/core/src/test/java/org/apache/ignite/thread/IgniteThreadPoolSizeTest.java index 675682a8cf090..6ef4cb65cacf5 100644 --- a/modules/core/src/test/java/org/apache/ignite/thread/IgniteThreadPoolSizeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/thread/IgniteThreadPoolSizeTest.java @@ -21,10 +21,14 @@ import org.apache.ignite.Ignition; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteThreadPoolSizeTest extends GridCommonAbstractTest { /** Wrong thread pool size value for testing */ private static final int WRONG_VALUE = 0; diff --git a/modules/core/src/test/java/org/apache/ignite/util/AttributeNodeFilterSelfTest.java b/modules/core/src/test/java/org/apache/ignite/util/AttributeNodeFilterSelfTest.java index 4cdb465fa13cb..aa6d70ac52b9e 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/AttributeNodeFilterSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/AttributeNodeFilterSelfTest.java @@ -32,10 +32,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for {@link AttributeNodeFilter}. */ +@RunWith(JUnit4.class) public class AttributeNodeFilterSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerSslTest.java b/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerSslTest.java index 89a8ba0e6597e..16f576d42c360 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerSslTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerSslTest.java @@ -25,6 +25,9 @@ import org.apache.ignite.internal.commandline.CommandHandler; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.commandline.CommandHandler.EXIT_CODE_CONNECTION_FAILED; import static org.apache.ignite.internal.commandline.CommandHandler.EXIT_CODE_OK; @@ -32,6 +35,7 @@ /** * Command line handler test. */ +@RunWith(JUnit4.class) public class GridCommandHandlerSslTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java b/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java index ebc1770e4d1bc..93e520d187116 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java @@ -96,6 +96,9 @@ import org.apache.ignite.transactions.TransactionRollbackException; import org.apache.ignite.transactions.TransactionTimeoutException; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.nio.file.Files.delete; import static java.nio.file.Files.newDirectoryStream; @@ -114,6 +117,7 @@ /** * Command line handler test. */ +@RunWith(JUnit4.class) public class GridCommandHandlerTest extends GridCommonAbstractTest { /** System out. */ protected PrintStream sysOut; diff --git a/modules/core/src/test/java/org/apache/ignite/util/GridConcurrentLinkedDequeMultiThreadedTest.java b/modules/core/src/test/java/org/apache/ignite/util/GridConcurrentLinkedDequeMultiThreadedTest.java index a7e6b7a248b8e..455b28e11fe2f 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/GridConcurrentLinkedDequeMultiThreadedTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/GridConcurrentLinkedDequeMultiThreadedTest.java @@ -25,10 +25,14 @@ import org.jetbrains.annotations.Nullable; import org.jsr166.ConcurrentLinkedDeque8; import org.jsr166.ConcurrentLinkedDeque8.Node; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for {@link org.jsr166.ConcurrentLinkedDeque8}. */ +@RunWith(JUnit4.class) public class GridConcurrentLinkedDequeMultiThreadedTest extends GridCommonAbstractTest { /** */ private static final Random RND = new Random(); diff --git a/modules/core/src/test/java/org/apache/ignite/util/GridConcurrentLinkedDequeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/util/GridConcurrentLinkedDequeSelfTest.java index 6d99306e708ab..1e55beb751b68 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/GridConcurrentLinkedDequeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/GridConcurrentLinkedDequeSelfTest.java @@ -20,12 +20,16 @@ import java.util.Iterator; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jsr166.ConcurrentLinkedDeque8; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.jsr166.ConcurrentLinkedDeque8.Node; /** * Tests for {@link org.jsr166.ConcurrentLinkedDeque8}. */ +@RunWith(JUnit4.class) public class GridConcurrentLinkedDequeSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/util/GridConcurrentLinkedHashMapMultiThreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/util/GridConcurrentLinkedHashMapMultiThreadedSelfTest.java index db0c4230e5419..0716488eddb4c 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/GridConcurrentLinkedHashMapMultiThreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/GridConcurrentLinkedHashMapMultiThreadedSelfTest.java @@ -34,6 +34,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; import org.jsr166.ConcurrentLinkedHashMap; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.jsr166.ConcurrentLinkedHashMap.QueuePolicy.PER_SEGMENT_Q; import static org.jsr166.ConcurrentLinkedHashMap.QueuePolicy.PER_SEGMENT_Q_OPTIMIZED_RMV; @@ -42,6 +45,7 @@ /** * */ +@RunWith(JUnit4.class) public class GridConcurrentLinkedHashMapMultiThreadedSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/util/GridIntListSelfTest.java b/modules/core/src/test/java/org/apache/ignite/util/GridIntListSelfTest.java index 19c7c2dde016e..e0d079c328252 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/GridIntListSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/GridIntListSelfTest.java @@ -19,12 +19,16 @@ import junit.framework.TestCase; import org.apache.ignite.internal.util.GridIntList; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.util.GridIntList.asList; /** * */ +@RunWith(JUnit4.class) public class GridIntListSelfTest extends TestCase { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/util/GridInternalTaskUnusedWalSegmentsTest.java b/modules/core/src/test/java/org/apache/ignite/util/GridInternalTaskUnusedWalSegmentsTest.java index 5ffa69c93dcd7..3c4ffa0e2b226 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/GridInternalTaskUnusedWalSegmentsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/GridInternalTaskUnusedWalSegmentsTest.java @@ -40,12 +40,16 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_PDS_MAX_CHECKPOINT_MEMORY_HISTORY_SIZE; /** * Test correctness of VisorWalTask. */ +@RunWith(JUnit4.class) public class GridInternalTaskUnusedWalSegmentsTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/util/GridLogThrottleTest.java b/modules/core/src/test/java/org/apache/ignite/util/GridLogThrottleTest.java index e06423ba68040..5b7a2a443033d 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/GridLogThrottleTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/GridLogThrottleTest.java @@ -21,6 +21,9 @@ import org.apache.ignite.testframework.GridStringLogger; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Grid log throttle test. To verify correctness, you need to run this test @@ -28,6 +31,7 @@ * all messages that should be omitted are indeed omitted. */ @GridCommonTest(group = "Utils") +@RunWith(JUnit4.class) public class GridLogThrottleTest extends GridCommonAbstractTest { /** */ private final GridStringLogger log0 = new GridStringLogger(false, this.log); diff --git a/modules/core/src/test/java/org/apache/ignite/util/GridLongListSelfTest.java b/modules/core/src/test/java/org/apache/ignite/util/GridLongListSelfTest.java index 362fb2f167b6c..61c27b2aa0424 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/GridLongListSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/GridLongListSelfTest.java @@ -19,12 +19,16 @@ import junit.framework.TestCase; import org.apache.ignite.internal.util.GridLongList; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.util.GridLongList.asList; /** * */ +@RunWith(JUnit4.class) public class GridLongListSelfTest extends TestCase { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/util/GridMessageCollectionTest.java b/modules/core/src/test/java/org/apache/ignite/util/GridMessageCollectionTest.java index 7ed7cf7f971c2..466500d10092f 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/GridMessageCollectionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/GridMessageCollectionTest.java @@ -27,6 +27,9 @@ import org.apache.ignite.plugin.extensions.communication.MessageFactory; import org.apache.ignite.plugin.extensions.communication.MessageReader; import org.apache.ignite.plugin.extensions.communication.MessageWriter; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.UUID.randomUUID; import static org.apache.ignite.internal.util.GridMessageCollection.of; @@ -34,6 +37,7 @@ /** * */ +@RunWith(JUnit4.class) public class GridMessageCollectionTest extends TestCase { /** */ private byte proto; diff --git a/modules/core/src/test/java/org/apache/ignite/util/GridPartitionMapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/util/GridPartitionMapSelfTest.java index b8828772069b6..1e98de94908cd 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/GridPartitionMapSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/GridPartitionMapSelfTest.java @@ -28,11 +28,15 @@ import org.apache.ignite.internal.util.GridPartitionStateMap; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Grid utils tests. */ @GridCommonTest(group = "Utils") +@RunWith(JUnit4.class) public class GridPartitionMapSelfTest extends GridCommonAbstractTest { /** */ @Test diff --git a/modules/core/src/test/java/org/apache/ignite/util/GridQueueSelfTest.java b/modules/core/src/test/java/org/apache/ignite/util/GridQueueSelfTest.java index 0aadeb4500d62..c4ac47eba7333 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/GridQueueSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/GridQueueSelfTest.java @@ -21,11 +21,15 @@ import org.apache.ignite.internal.util.typedef.X; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Grid utils tests. */ @GridCommonTest(group = "Utils") +@RunWith(JUnit4.class) public class GridQueueSelfTest extends GridCommonAbstractTest { /** * diff --git a/modules/core/src/test/java/org/apache/ignite/util/GridRandomSelfTest.java b/modules/core/src/test/java/org/apache/ignite/util/GridRandomSelfTest.java index 0a99c8db52999..3a06a8b00b7b8 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/GridRandomSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/GridRandomSelfTest.java @@ -21,10 +21,14 @@ import java.util.concurrent.ThreadLocalRandom; import org.apache.ignite.internal.util.GridRandom; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for {@link GridRandom}. */ +@RunWith(JUnit4.class) public class GridRandomSelfTest extends GridCommonAbstractTest { /** */ diff --git a/modules/core/src/test/java/org/apache/ignite/util/GridSnapshotLockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/util/GridSnapshotLockSelfTest.java index 57c1201e25e93..7b092d2eb7e9f 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/GridSnapshotLockSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/GridSnapshotLockSelfTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.internal.util.GridSnapshotLock; import org.apache.ignite.internal.util.typedef.T3; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class GridSnapshotLockSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/util/GridSpinReadWriteLockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/util/GridSpinReadWriteLockSelfTest.java index 102370c519333..e711f478b73d9 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/GridSpinReadWriteLockSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/GridSpinReadWriteLockSelfTest.java @@ -23,10 +23,14 @@ import org.apache.ignite.internal.util.GridSpinReadWriteLock; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class GridSpinReadWriteLockSelfTest extends GridCommonAbstractTest { /** Constructor. */ public GridSpinReadWriteLockSelfTest() { diff --git a/modules/core/src/test/java/org/apache/ignite/util/GridStringBuilderFactorySelfTest.java b/modules/core/src/test/java/org/apache/ignite/util/GridStringBuilderFactorySelfTest.java index 1ab60b9437356..3bce1c1f9af3e 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/GridStringBuilderFactorySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/GridStringBuilderFactorySelfTest.java @@ -21,11 +21,15 @@ import org.apache.ignite.internal.util.typedef.internal.SB; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * String builder factory test. */ @GridCommonTest(group = "Utils") +@RunWith(JUnit4.class) public class GridStringBuilderFactorySelfTest extends GridCommonAbstractTest { /** */ public GridStringBuilderFactorySelfTest() { diff --git a/modules/core/src/test/java/org/apache/ignite/util/GridTopologyHeapSizeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/util/GridTopologyHeapSizeSelfTest.java index 0fd855a839e45..678dd584609d5 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/GridTopologyHeapSizeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/GridTopologyHeapSizeSelfTest.java @@ -28,6 +28,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestNode; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.IgniteNodeAttributes.ATTR_JVM_PID; import static org.apache.ignite.internal.IgniteNodeAttributes.ATTR_MACS; @@ -35,6 +38,7 @@ /** * Tests for calculation logic for topology heap size. */ +@RunWith(JUnit4.class) public class GridTopologyHeapSizeSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/util/GridTransientTest.java b/modules/core/src/test/java/org/apache/ignite/util/GridTransientTest.java index 30fd2271ff917..95f8dacf72dd4 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/GridTransientTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/GridTransientTest.java @@ -24,11 +24,15 @@ import java.io.Serializable; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Transient value serialization test. */ @GridCommonTest(group = "Utils") +@RunWith(JUnit4.class) public class GridTransientTest extends GridCommonAbstractTest implements Serializable { /** */ private static final String VALUE = "value"; diff --git a/modules/core/src/test/java/org/apache/ignite/util/mbeans/GridMBeanBaselineTest.java b/modules/core/src/test/java/org/apache/ignite/util/mbeans/GridMBeanBaselineTest.java index 3b2a4cacecdcc..61edffcac12ad 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/mbeans/GridMBeanBaselineTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/mbeans/GridMBeanBaselineTest.java @@ -28,10 +28,14 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import java.util.Set; import java.util.stream.Collectors; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class GridMBeanBaselineTest extends GridCommonAbstractTest { /** Client index. */ private static final int CLIENT_IDX = 33; diff --git a/modules/core/src/test/java/org/apache/ignite/util/mbeans/GridMBeanDisableSelfTest.java b/modules/core/src/test/java/org/apache/ignite/util/mbeans/GridMBeanDisableSelfTest.java index d111412ae5c6b..6758fdaf7a709 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/mbeans/GridMBeanDisableSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/mbeans/GridMBeanDisableSelfTest.java @@ -27,10 +27,14 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Disabling MBeans test. */ +@RunWith(JUnit4.class) public class GridMBeanDisableSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override public void setUp() throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/util/mbeans/GridMBeanExoticNamesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/util/mbeans/GridMBeanExoticNamesSelfTest.java index 8722b6bd97c08..d50bf6bf1456e 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/mbeans/GridMBeanExoticNamesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/mbeans/GridMBeanExoticNamesSelfTest.java @@ -22,10 +22,14 @@ import org.apache.ignite.Ignite; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Testing registration of MBeans with special characters in group name or bean name. */ +@RunWith(JUnit4.class) public class GridMBeanExoticNamesSelfTest extends GridCommonAbstractTest { /** Test registration of a bean with special characters in group name. */ @Test diff --git a/modules/core/src/test/java/org/apache/ignite/util/mbeans/GridMBeanSelfTest.java b/modules/core/src/test/java/org/apache/ignite/util/mbeans/GridMBeanSelfTest.java index 4a62102e8bef2..8ee1e59760390 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/mbeans/GridMBeanSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/mbeans/GridMBeanSelfTest.java @@ -29,10 +29,14 @@ import org.apache.ignite.mxbean.MXBeanParametersDescriptions; import org.apache.ignite.mxbean.MXBeanParametersNames; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * MBean test. */ +@RunWith(JUnit4.class) public class GridMBeanSelfTest extends GridCommonAbstractTest { /** * Tests correct MBean interface. diff --git a/modules/core/src/test/java/org/apache/ignite/util/mbeans/WorkersControlMXBeanTest.java b/modules/core/src/test/java/org/apache/ignite/util/mbeans/WorkersControlMXBeanTest.java index 815f885b38d9d..1062267b76e90 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/mbeans/WorkersControlMXBeanTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/mbeans/WorkersControlMXBeanTest.java @@ -22,10 +22,14 @@ import org.apache.ignite.internal.worker.WorkersControlMXBeanImpl; import org.apache.ignite.mxbean.WorkersControlMXBean; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * {@link WorkersControlMXBean} test. */ +@RunWith(JUnit4.class) public class WorkersControlMXBeanTest extends GridCommonAbstractTest { /** Test thread name. */ private static final String TEST_THREAD_NAME = "test-thread"; From 3f2c9ebe8c1423ab09778da1b74ed0b9cd42aa5a Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Mon, 3 Dec 2018 20:42:44 +0300 Subject: [PATCH 029/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview --- .../org/apache/ignite/internal/ClusterGroupAbstractTest.java | 4 ++++ .../ignite/internal/ComputeJobCancelWithServiceSelfTest.java | 4 ++++ .../apache/ignite/internal/GridFailoverTopologySelfTest.java | 4 ++++ .../processors/cache/CacheConcurrentReadThroughTest.java | 4 ++++ .../internal/processors/cache/CacheConfigurationLeakTest.java | 4 ++++ .../processors/cache/CacheGetsDistributionAbstractTest.java | 4 ++++ .../processors/cache/GridCacheAbstractFailoverSelfTest.java | 4 ++++ .../processors/cache/GridCacheAbstractFullApiSelfTest.java | 4 ++++ .../processors/cache/GridCacheAbstractRemoveFailureTest.java | 4 ++++ .../processors/cache/GridCacheBasicStoreAbstractTest.java | 4 ++++ .../cache/GridCacheBasicStoreMultithreadedAbstractTest.java | 4 ++++ .../cache/GridCacheInterceptorAbstractSelfTest.java | 4 ++++ .../processors/cache/GridCacheNestedTxAbstractTest.java | 4 ++++ .../processors/cache/GridCachePartitionedGetSelfTest.java | 4 ++++ .../processors/cache/GridCacheSwapPreloadSelfTest.java | 4 ++++ .../cache/GridCacheValueConsistencyAbstractSelfTest.java | 4 ++++ .../cache/IgniteAbstractDynamicCacheStartFailTest.java | 4 ++++ .../cache/IgniteCacheBinaryEntryProcessorSelfTest.java | 4 ++++ .../cache/IgniteCacheConfigurationTemplateTest.java | 4 ++++ .../processors/cache/IgniteCacheInvokeAbstractTest.java | 4 ++++ .../cache/binary/CacheKeepBinaryWithInterceptorTest.java | 4 ++++ .../datastructures/GridCacheQueueApiSelfAbstractTest.java | 4 ++++ .../cache/datastructures/GridCacheSetAbstractSelfTest.java | 4 ++++ .../datastructures/GridCacheSetFailoverAbstractSelfTest.java | 4 ++++ .../distributed/CacheDiscoveryDataConcurrentJoinTest.java | 4 ++++ .../cache/distributed/CacheGetFutureHangsSelfTest.java | 4 ++++ .../distributed/GridCacheAbstractPrimarySyncSelfTest.java | 4 ++++ .../cache/distributed/GridCacheEntrySetAbstractSelfTest.java | 4 ++++ .../cache/distributed/GridCacheLockAbstractTest.java | 4 ++++ .../distributed/GridCachePreloadRestartAbstractSelfTest.java | 4 ++++ .../distributed/IgniteCacheClientNodeConcurrentStart.java | 4 ++++ .../cache/distributed/IgniteCacheNodeJoinAbstractTest.java | 4 ++++ .../dht/GridCacheColocatedOptimisticTransactionSelfTest.java | 4 ++++ .../near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java | 4 ++++ .../distributed/near/GridCacheNearOnlyTopologySelfTest.java | 4 ++++ .../distributed/near/GridCachePartitionedFullApiSelfTest.java | 4 ++++ .../near/GridCachePartitionedMultiNodeFullApiSelfTest.java | 4 ++++ .../integration/IgniteCacheNoWriteThroughAbstractTest.java | 4 ++++ 38 files changed, 152 insertions(+) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupAbstractTest.java index ba44a3d700b83..4d6bafbc7c274 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupAbstractTest.java @@ -57,6 +57,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_JOB_STARTED; @@ -64,6 +67,7 @@ * Abstract test for {@link org.apache.ignite.cluster.ClusterGroup} */ @SuppressWarnings("deprecation") +@RunWith(JUnit4.class) public abstract class ClusterGroupAbstractTest extends GridCommonAbstractTest implements Externalizable { /** VM ip finder for TCP discovery. */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/ComputeJobCancelWithServiceSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/ComputeJobCancelWithServiceSelfTest.java index d2ad8ee742d3e..a9824c21092b3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/ComputeJobCancelWithServiceSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/ComputeJobCancelWithServiceSelfTest.java @@ -36,10 +36,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test cancellation of a job that depends on service. */ +@RunWith(JUnit4.class) public class ComputeJobCancelWithServiceSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverTopologySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverTopologySelfTest.java index 19119beab8309..e3fdd1ff23a8c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverTopologySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverTopologySelfTest.java @@ -37,11 +37,15 @@ import org.apache.ignite.spi.failover.always.AlwaysFailoverSpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test failover and topology. It don't pick local node if it has been excluded from topology. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridFailoverTopologySelfTest extends GridCommonAbstractTest { /** */ private final AtomicBoolean failed = new AtomicBoolean(false); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheConcurrentReadThroughTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheConcurrentReadThroughTest.java index a05a213920881..e26d901623ba2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheConcurrentReadThroughTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheConcurrentReadThroughTest.java @@ -36,10 +36,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test was added to check fix for IGNITE-4465. */ +@RunWith(JUnit4.class) public class CacheConcurrentReadThroughTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheConfigurationLeakTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheConfigurationLeakTest.java index 5952905b4f5fc..d85c52bbfa174 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheConfigurationLeakTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheConfigurationLeakTest.java @@ -27,10 +27,14 @@ import org.apache.ignite.lang.IgniteInClosure; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class CacheConfigurationLeakTest extends GridCommonAbstractTest { /** * diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetsDistributionAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetsDistributionAbstractTest.java index 9032ae95dc9ba..c4d490983e6cd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetsDistributionAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetsDistributionAbstractTest.java @@ -40,6 +40,9 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; import static org.apache.ignite.internal.IgniteNodeAttributes.ATTR_MACS; @@ -49,6 +52,7 @@ /** * Tests of replicated cache's 'get' requests distribution. */ +@RunWith(JUnit4.class) public abstract class CacheGetsDistributionAbstractTest extends GridCommonAbstractTest { /** Client nodes instance's name. */ private static final String CLIENT_NAME = "client"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFailoverSelfTest.java index 637a1abe893a4..587abb358ec6f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFailoverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFailoverSelfTest.java @@ -41,12 +41,16 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; /** * Failover tests for cache. */ +@RunWith(JUnit4.class) public abstract class GridCacheAbstractFailoverSelfTest extends GridCacheAbstractSelfTest { /** */ private static final long TEST_TIMEOUT = 3 * 60 * 1000; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java index 01de7000b80e5..8c4ea1ee27b33 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java @@ -103,6 +103,9 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; @@ -128,6 +131,7 @@ * Full API cache test. */ @SuppressWarnings("TransientFieldInNonSerializableClass") +@RunWith(JUnit4.class) public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstractSelfTest { /** Test timeout */ private static final long TEST_TIMEOUT = 60 * 1000; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractRemoveFailureTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractRemoveFailureTest.java index 695284846ae7c..ecf8233144974 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractRemoveFailureTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractRemoveFailureTest.java @@ -55,6 +55,9 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import java.util.concurrent.ConcurrentHashMap; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_ATOMIC_CACHE_DELETE_HISTORY_SIZE; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -67,6 +70,7 @@ /** * Tests that removes are not lost when topology changes. */ +@RunWith(JUnit4.class) public abstract class GridCacheAbstractRemoveFailureTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicStoreAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicStoreAbstractTest.java index a9ac9282616ed..6e1ed68869f49 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicStoreAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicStoreAbstractTest.java @@ -37,6 +37,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; @@ -47,6 +50,7 @@ /** * Basic store test. */ +@RunWith(JUnit4.class) public abstract class GridCacheBasicStoreAbstractTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicStoreMultithreadedAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicStoreMultithreadedAbstractTest.java index 3546634811231..a65a0c69cb88f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicStoreMultithreadedAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicStoreMultithreadedAbstractTest.java @@ -29,12 +29,16 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * Basic store test. */ +@RunWith(JUnit4.class) public abstract class GridCacheBasicStoreMultithreadedAbstractTest extends GridCommonAbstractTest { /** Cache store. */ private CacheStore store; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorAbstractSelfTest.java index 153b61eb7be2f..64690f29e3dcb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorAbstractSelfTest.java @@ -46,6 +46,9 @@ import org.apache.ignite.transactions.TransactionIsolation; import org.jetbrains.annotations.Nullable; import java.util.concurrent.ConcurrentHashMap; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.LOCAL; @@ -55,6 +58,7 @@ /** * Tests {@link CacheInterceptor}. */ +@RunWith(JUnit4.class) public abstract class GridCacheInterceptorAbstractSelfTest extends GridCacheAbstractSelfTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheNestedTxAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheNestedTxAbstractTest.java index 0770206b303f8..035b309d243a9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheNestedTxAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheNestedTxAbstractTest.java @@ -34,6 +34,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; @@ -43,6 +46,7 @@ /** * Nested transaction emulation. */ +@RunWith(JUnit4.class) public class GridCacheNestedTxAbstractTest extends GridCommonAbstractTest { /** */ protected static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedGetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedGetSelfTest.java index d0fa1568fb3e9..83880c926a8da 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedGetSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedGetSelfTest.java @@ -35,6 +35,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; @@ -44,6 +47,7 @@ /** * */ +@RunWith(JUnit4.class) public class GridCachePartitionedGetSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java index f48059380d538..ee980bbaf8baf 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java @@ -36,6 +36,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -46,6 +49,7 @@ /** * Test for cache swap preloading. */ +@RunWith(JUnit4.class) public class GridCacheSwapPreloadSelfTest extends GridCommonAbstractTest { /** Entry count. */ private static final int ENTRY_CNT = 15_000; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueConsistencyAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueConsistencyAbstractSelfTest.java index f45eeddf26d83..d95c9c499e7db 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueConsistencyAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueConsistencyAbstractSelfTest.java @@ -28,6 +28,9 @@ import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.testframework.GridTestUtils.SF; import org.apache.ignite.testframework.MvccFeatureChecker; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_ATOMIC_CACHE_DELETE_HISTORY_SIZE; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -37,6 +40,7 @@ /** * */ +@RunWith(JUnit4.class) public abstract class GridCacheValueConsistencyAbstractSelfTest extends GridCacheAbstractSelfTest { /** Number of threads for test. */ private static final int THREAD_CNT = 16; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteAbstractDynamicCacheStartFailTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteAbstractDynamicCacheStartFailTest.java index c0abe95dd9fd3..ee3a8e0816be6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteAbstractDynamicCacheStartFailTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteAbstractDynamicCacheStartFailTest.java @@ -67,10 +67,14 @@ import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.resources.IgniteInstanceResource; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests the recovery after a dynamic cache start failure. */ +@RunWith(JUnit4.class) public abstract class IgniteAbstractDynamicCacheStartFailTest extends GridCacheAbstractSelfTest { /** */ private static final String DYNAMIC_CACHE_NAME = "TestDynamicCache"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheBinaryEntryProcessorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheBinaryEntryProcessorSelfTest.java index c741758d5b618..f3cb6bbade438 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheBinaryEntryProcessorSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheBinaryEntryProcessorSelfTest.java @@ -34,10 +34,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteCacheBinaryEntryProcessorSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationTemplateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationTemplateTest.java index e8b7b4cddd4d3..1d458f773150d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationTemplateTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationTemplateTest.java @@ -35,12 +35,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; /** * */ +@RunWith(JUnit4.class) public class IgniteCacheConfigurationTemplateTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeAbstractTest.java index abbe3324ba364..f0ded18bee34b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeAbstractTest.java @@ -48,6 +48,9 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -58,6 +61,7 @@ /** * */ +@RunWith(JUnit4.class) public abstract class IgniteCacheInvokeAbstractTest extends IgniteCacheAbstractTest { /** */ private Integer lastKey = 0; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/CacheKeepBinaryWithInterceptorTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/CacheKeepBinaryWithInterceptorTest.java index 912385701081b..7511f81fd4437 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/CacheKeepBinaryWithInterceptorTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/CacheKeepBinaryWithInterceptorTest.java @@ -31,6 +31,9 @@ import org.jetbrains.annotations.Nullable; import javax.cache.Cache; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.*; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*; @@ -39,6 +42,7 @@ * */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class CacheKeepBinaryWithInterceptorTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueApiSelfAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueApiSelfAbstractTest.java index 6bdf754615680..d25f4057a79b0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueApiSelfAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueApiSelfAbstractTest.java @@ -43,6 +43,9 @@ import org.apache.ignite.resources.IgniteInstanceResource; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -51,6 +54,7 @@ /** * Queue basic tests. */ +@RunWith(JUnit4.class) public abstract class GridCacheQueueApiSelfAbstractTest extends IgniteCollectionAbstractTest { /** */ private static final int QUEUE_CAPACITY = 3; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetAbstractSelfTest.java index 8d62396f40e96..bb1b8d54e521f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetAbstractSelfTest.java @@ -53,6 +53,9 @@ import org.apache.ignite.resources.IgniteInstanceResource; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -63,6 +66,7 @@ /** * Cache set tests. */ +@RunWith(JUnit4.class) public abstract class GridCacheSetAbstractSelfTest extends IgniteCollectionAbstractTest { /** */ protected static final String SET_NAME = "testSet"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetFailoverAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetFailoverAbstractSelfTest.java index 1de3ff763a1dc..16c93635c8391 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetFailoverAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetFailoverAbstractSelfTest.java @@ -36,12 +36,16 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.lang.IgniteUuid; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** * Set failover tests. */ +@RunWith(JUnit4.class) public abstract class GridCacheSetFailoverAbstractSelfTest extends IgniteCollectionAbstractTest { /** */ private static final String SET_NAME = "testFailoverSet"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheDiscoveryDataConcurrentJoinTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheDiscoveryDataConcurrentJoinTest.java index b952f26512ad3..1a3d754822b57 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheDiscoveryDataConcurrentJoinTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheDiscoveryDataConcurrentJoinTest.java @@ -37,12 +37,16 @@ import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryJoinRequestMessage; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; /** * */ +@RunWith(JUnit4.class) public class CacheDiscoveryDataConcurrentJoinTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGetFutureHangsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGetFutureHangsSelfTest.java index 5df4952808592..054c1a4c1bf6f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGetFutureHangsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGetFutureHangsSelfTest.java @@ -39,12 +39,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.PRIMARY_SYNC; /** * Test for reproducing problems during simultaneously Ignite instances stopping and cache requests executing. */ +@RunWith(JUnit4.class) public class CacheGetFutureHangsSelfTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPrimarySyncSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPrimarySyncSelfTest.java index ad44894e63609..00debf975fecc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPrimarySyncSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPrimarySyncSelfTest.java @@ -27,6 +27,9 @@ import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -38,6 +41,7 @@ /** * Test ensuring that PRIMARY_SYNC mode works correctly. */ +@RunWith(JUnit4.class) public abstract class GridCacheAbstractPrimarySyncSelfTest extends GridCommonAbstractTest { /** Grids count. */ private static final int GRID_CNT = 3; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEntrySetAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEntrySetAbstractSelfTest.java index 25305ab4c24c7..cb830ab352975 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEntrySetAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEntrySetAbstractSelfTest.java @@ -27,6 +27,9 @@ import org.apache.ignite.internal.processors.cache.GridCacheAbstractSelfTest; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -36,6 +39,7 @@ /** * */ +@RunWith(JUnit4.class) public abstract class GridCacheEntrySetAbstractSelfTest extends GridCacheAbstractSelfTest { /** */ private static final int GRID_CNT = 2; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheLockAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheLockAbstractTest.java index c7eb26b0222da..216901c105836 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheLockAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheLockAbstractTest.java @@ -41,6 +41,9 @@ import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; @@ -50,6 +53,7 @@ * Test cases for multi-threaded tests. */ @SuppressWarnings({"FieldCanBeLocal"}) +@RunWith(JUnit4.class) public abstract class GridCacheLockAbstractTest extends GridCommonAbstractTest { /** Grid1. */ private static Ignite ignite1; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadRestartAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadRestartAbstractSelfTest.java index 301e054ffa7b9..446243a37c14f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadRestartAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadRestartAbstractSelfTest.java @@ -29,6 +29,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -42,6 +45,7 @@ /** * Test node restart. */ +@RunWith(JUnit4.class) public abstract class GridCachePreloadRestartAbstractSelfTest extends GridCommonAbstractTest { /** Flag for debug output. */ private static final boolean DEBUG = false; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeConcurrentStart.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeConcurrentStart.java index f447d1278c898..333cdbceead2c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeConcurrentStart.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeConcurrentStart.java @@ -27,12 +27,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; /** * */ +@RunWith(JUnit4.class) public class IgniteCacheClientNodeConcurrentStart extends GridCommonAbstractTest { /** */ protected static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheNodeJoinAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheNodeJoinAbstractTest.java index 1589375a43f56..b34da817a3b42 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheNodeJoinAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheNodeJoinAbstractTest.java @@ -28,12 +28,16 @@ import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.internal.processors.cache.IgniteCacheAbstractTest; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** * */ +@RunWith(JUnit4.class) public abstract class IgniteCacheNodeJoinAbstractTest extends IgniteCacheAbstractTest { /** {@inheritDoc} */ @Override protected CacheMode cacheMode() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheColocatedOptimisticTransactionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheColocatedOptimisticTransactionSelfTest.java index d344763d418cd..ee557c2cb95cd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheColocatedOptimisticTransactionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheColocatedOptimisticTransactionSelfTest.java @@ -27,6 +27,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -37,6 +40,7 @@ /** * Test ensuring that values are visible inside OPTIMISTIC transaction in co-located cache. */ +@RunWith(JUnit4.class) public class GridCacheColocatedOptimisticTransactionSelfTest extends GridCommonAbstractTest { /** Grid count. */ private static final int GRID_CNT = 3; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java index 59313f43ddbea..7c342ef95e559 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java @@ -50,6 +50,9 @@ import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; import static org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_LOCKED; @@ -58,6 +61,7 @@ /** * */ +@RunWith(JUnit4.class) public class GridCacheNearOnlyMultiNodeFullApiSelfTest extends GridCachePartitionedMultiNodeFullApiSelfTest { /** */ private static AtomicInteger cnt; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyTopologySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyTopologySelfTest.java index 3b2ea61477ea5..1d48189c9d84e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyTopologySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyTopologySelfTest.java @@ -33,6 +33,9 @@ import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -44,6 +47,7 @@ /** * Near-only cache node startup test. */ +@RunWith(JUnit4.class) public class GridCacheNearOnlyTopologySelfTest extends GridCommonAbstractTest { /** Shared ip finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFullApiSelfTest.java index c3c8cdcbc0e71..e63c31295b3b5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFullApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFullApiSelfTest.java @@ -23,12 +23,16 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.processors.cache.GridCacheAbstractFullApiSelfTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** * Tests for partitioned cache. */ +@RunWith(JUnit4.class) public class GridCachePartitionedFullApiSelfTest extends GridCacheAbstractFullApiSelfTest { /** {@inheritDoc} */ @Override protected CacheMode cacheMode() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java index e797fa0ef96fb..c0300cbb6ee6d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java @@ -32,6 +32,9 @@ import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.IgniteKernal; import org.apache.ignite.internal.util.typedef.F; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -43,6 +46,7 @@ /** * Multi-node tests for partitioned cache. */ +@RunWith(JUnit4.class) public class GridCachePartitionedMultiNodeFullApiSelfTest extends GridCachePartitionedFullApiSelfTest { /** {@inheritDoc} */ @Override protected int gridCount() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheNoWriteThroughAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheNoWriteThroughAbstractTest.java index a618409d45b9e..e7664ddb3dc30 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheNoWriteThroughAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheNoWriteThroughAbstractTest.java @@ -33,6 +33,9 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -40,6 +43,7 @@ /** * Test for configuration property {@link CacheConfiguration#isWriteThrough}. */ +@RunWith(JUnit4.class) public abstract class IgniteCacheNoWriteThroughAbstractTest extends IgniteCacheAbstractTest { /** */ private Integer lastKey = 0; From 13c75f82aa1cbbdd1727217a99f0139c1e9f9592 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Mon, 3 Dec 2018 20:53:38 +0300 Subject: [PATCH 030/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview --- .../org/apache/ignite/internal/GridFailoverSelfTest.java | 4 ++++ .../cache/CacheNearUpdateTopologyChangeAbstractTest.java | 4 ++++ .../internal/processors/cache/CacheRemoveAllSelfTest.java | 4 ++++ .../processors/cache/GridCacheAbstractIteratorsSelfTest.java | 4 ++++ .../internal/processors/cache/GridCacheKeyCheckSelfTest.java | 4 ++++ .../cache/GridCacheMultinodeUpdateAbstractSelfTest.java | 4 ++++ .../cache/IgniteCacheEntryListenerAbstractTest.java | 4 ++++ .../cache/IgniteCacheP2pUnmarshallingErrorTest.java | 4 ++++ .../cache/IgniteCacheP2pUnmarshallingRebalanceErrorTest.java | 4 ++++ .../cache/IgniteCacheP2pUnmarshallingTxErrorTest.java | 4 ++++ .../cache/IgniteCacheReadThroughEvictionSelfTest.java | 4 ++++ .../processors/cache/IgniteCacheStoreValueAbstractTest.java | 4 ++++ .../GridCacheAtomicReferenceApiSelfAbstractTest.java | 4 ++++ .../GridCacheAbstractDistributedByteArrayValuesSelfTest.java | 4 ++++ .../cache/distributed/GridCacheEventAbstractTest.java | 4 ++++ .../distributed/GridCacheMultiNodeLockAbstractTest.java | 4 ++++ .../dht/atomic/AtomicPutAllChangingTopologyTest.java | 4 ++++ .../GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest.java | 4 ++++ .../cache/distributed/near/GridCacheNearMetricsSelfTest.java | 4 ++++ ...idCachePartitionedClientOnlyNoPrimaryFullApiSelfTest.java | 4 ++++ .../IgniteCacheStoreSessionWriteBehindAbstractTest.java | 4 ++++ .../mvcc/CacheMvccAbstractBasicCoordinatorFailoverTest.java | 4 ++++ .../cache/mvcc/CacheMvccAbstractCoordinatorFailoverTest.java | 5 +++++ .../cache/version/CacheVersionedEntryAbstractTest.java | 4 ++++ .../tcp/ipfinder/TcpDiscoveryIpFinderAbstractSelfTest.java | 4 ++++ .../sharedfs/TcpDiscoverySharedFsIpFinderSelfTest.java | 4 ++++ .../GridRoundRobinLoadBalancingSpiLocalNodeSelfTest.java | 4 ++++ 27 files changed, 109 insertions(+) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverSelfTest.java index 87733a9ac0df0..d10e9c5f6c598 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverSelfTest.java @@ -40,11 +40,15 @@ import org.apache.ignite.spi.failover.always.AlwaysFailoverSpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Failover tests. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridFailoverSelfTest extends GridCommonAbstractTest { /** Initial node that job has been mapped to. */ private static final AtomicReference nodeRef = new AtomicReference<>(null); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNearUpdateTopologyChangeAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNearUpdateTopologyChangeAbstractTest.java index 3861128cd120a..6cf9b013b3686 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNearUpdateTopologyChangeAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNearUpdateTopologyChangeAbstractTest.java @@ -27,6 +27,9 @@ import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.internal.util.lang.GridAbsPredicate; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CachePeekMode.ONHEAP; @@ -34,6 +37,7 @@ /** * */ +@RunWith(JUnit4.class) public abstract class CacheNearUpdateTopologyChangeAbstractTest extends IgniteCacheAbstractTest { /** {@inheritDoc} */ @Override protected int gridCount() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheRemoveAllSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheRemoveAllSelfTest.java index 1cc886f47507a..f44d654f3877b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheRemoveAllSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheRemoveAllSelfTest.java @@ -24,10 +24,14 @@ import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test remove all method. */ +@RunWith(JUnit4.class) public class CacheRemoveAllSelfTest extends GridCacheAbstractSelfTest { /** {@inheritDoc} */ @Override protected long getTestTimeout() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractIteratorsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractIteratorsSelfTest.java index 312ff2dba499a..fb2b71e90f7cb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractIteratorsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractIteratorsSelfTest.java @@ -23,10 +23,14 @@ import org.apache.ignite.internal.util.typedef.CA; import org.apache.ignite.internal.util.typedef.CAX; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for cache iterators. */ +@RunWith(JUnit4.class) public abstract class GridCacheAbstractIteratorsSelfTest extends GridCacheAbstractSelfTest { /** Key prefix. */ protected static final String KEY_PREFIX = "testKey"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheKeyCheckSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheKeyCheckSelfTest.java index 39509fa95fa0e..6f6a4275c8164 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheKeyCheckSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheKeyCheckSelfTest.java @@ -25,6 +25,9 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -34,6 +37,7 @@ /** * Tests for cache key check. */ +@RunWith(JUnit4.class) public class GridCacheKeyCheckSelfTest extends GridCacheAbstractSelfTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateAbstractSelfTest.java index ca9b5ccf29b76..77f8651d9ce12 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateAbstractSelfTest.java @@ -26,6 +26,9 @@ import org.apache.ignite.cache.CacheMode; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -34,6 +37,7 @@ * Multinode update test. */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public abstract class GridCacheMultinodeUpdateAbstractSelfTest extends GridCacheAbstractSelfTest { /** */ protected static volatile boolean failed; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java index 0abd49b47b363..7a9eef7369431 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java @@ -68,6 +68,9 @@ import org.apache.ignite.spi.eventstorage.memory.MemoryEventStorageSpi; import org.apache.ignite.testframework.GridTestUtils; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static javax.cache.event.EventType.CREATED; @@ -81,6 +84,7 @@ /** * */ +@RunWith(JUnit4.class) public abstract class IgniteCacheEntryListenerAbstractTest extends IgniteCacheAbstractTest { /** */ private static volatile List> evts; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingErrorTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingErrorTest.java index e0e7b6ffae4d3..89f75a65b001f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingErrorTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingErrorTest.java @@ -32,10 +32,14 @@ import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.X; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Checks behavior on exception while unmarshalling key. */ +@RunWith(JUnit4.class) public class IgniteCacheP2pUnmarshallingErrorTest extends IgniteCacheAbstractTest { /** Allows to change behavior of readExternal method. */ protected static final AtomicInteger readCnt = new AtomicInteger(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingRebalanceErrorTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingRebalanceErrorTest.java index 46d79b26fd16f..086f6d95400d3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingRebalanceErrorTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingRebalanceErrorTest.java @@ -24,10 +24,14 @@ import org.apache.ignite.cluster.ClusterNode; import org.apache.ignite.internal.util.typedef.X; import org.apache.ignite.internal.util.typedef.internal.U; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Checks behavior on exception while unmarshalling key. */ +@RunWith(JUnit4.class) public class IgniteCacheP2pUnmarshallingRebalanceErrorTest extends IgniteCacheP2pUnmarshallingErrorTest { /** {@inheritDoc} */ @Override protected int gridCount() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingTxErrorTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingTxErrorTest.java index 5364e0aea1844..2025f44a14fb6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingTxErrorTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingTxErrorTest.java @@ -24,6 +24,9 @@ import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.internal.util.typedef.X; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; @@ -32,6 +35,7 @@ /** * Checks behavior on exception while unmarshalling key. */ +@RunWith(JUnit4.class) public class IgniteCacheP2pUnmarshallingTxErrorTest extends IgniteCacheP2pUnmarshallingErrorTest { /** {@inheritDoc} */ @Override protected CacheAtomicityMode atomicityMode() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughEvictionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughEvictionSelfTest.java index d508f7ed64dfb..0135732d96cfe 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughEvictionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughEvictionSelfTest.java @@ -37,11 +37,15 @@ import javax.cache.expiry.Duration; import javax.cache.expiry.ExpiryPolicy; import java.util.concurrent.TimeUnit; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class IgniteCacheReadThroughEvictionSelfTest extends IgniteCacheConfigVariationsAbstractTest { /** */ private static final int TIMEOUT = 400; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStoreValueAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStoreValueAbstractTest.java index 45848f2636b11..f4ffb1249f391 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStoreValueAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStoreValueAbstractTest.java @@ -45,12 +45,16 @@ import org.apache.ignite.internal.util.lang.GridAbsPredicate; import org.apache.ignite.lang.IgniteBiInClosure; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * */ +@RunWith(JUnit4.class) public abstract class IgniteCacheStoreValueAbstractTest extends IgniteCacheAbstractTest { /** */ private boolean cpyOnRead; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicReferenceApiSelfAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicReferenceApiSelfAbstractTest.java index b80d1f959bd05..a4d4094d0cc91 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicReferenceApiSelfAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicReferenceApiSelfAbstractTest.java @@ -25,6 +25,9 @@ import org.apache.ignite.configuration.AtomicConfiguration; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -32,6 +35,7 @@ /** * Basic tests for atomic reference. */ +@RunWith(JUnit4.class) public abstract class GridCacheAtomicReferenceApiSelfAbstractTest extends IgniteAtomicsAbstractTest { /** {@inheritDoc} */ @Override protected int gridCount() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractDistributedByteArrayValuesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractDistributedByteArrayValuesSelfTest.java index 7a39e880f373a..be49044943eb1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractDistributedByteArrayValuesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractDistributedByteArrayValuesSelfTest.java @@ -26,6 +26,9 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; @@ -35,6 +38,7 @@ /** * Tests for byte array values in distributed caches. */ +@RunWith(JUnit4.class) public abstract class GridCacheAbstractDistributedByteArrayValuesSelfTest extends GridCacheAbstractByteArrayValuesSelfTest { /** Grids. */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEventAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEventAbstractTest.java index d18edbdc213c1..abaaa7e021b51 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEventAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEventAbstractTest.java @@ -42,6 +42,9 @@ import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVTS_CACHE; import static org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_PUT; @@ -53,6 +56,7 @@ /** * Tests events. */ +@RunWith(JUnit4.class) public abstract class GridCacheEventAbstractTest extends GridCacheAbstractSelfTest { /** */ private static final boolean TEST_INFO = true; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java index c884a307d1b7b..5aa0a6ae40276 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java @@ -41,6 +41,9 @@ import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVTS_CACHE; import static org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_UNLOCKED; @@ -48,6 +51,7 @@ /** * Test cases for multi-threaded tests. */ +@RunWith(JUnit4.class) public abstract class GridCacheMultiNodeLockAbstractTest extends GridCommonAbstractTest { /** */ private static final String CACHE2 = "cache2"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/AtomicPutAllChangingTopologyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/AtomicPutAllChangingTopologyTest.java index 8261016a0ae8c..79e19a3b2055d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/AtomicPutAllChangingTopologyTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/AtomicPutAllChangingTopologyTest.java @@ -36,6 +36,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -45,6 +48,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** */ +@RunWith(JUnit4.class) public class AtomicPutAllChangingTopologyTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest.java index 16f7c55222037..d39c9c407a686 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest.java @@ -25,12 +25,16 @@ import org.apache.ignite.cache.CachePeekMode; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.NearCacheConfiguration; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; /** * Tests NEAR_ONLY cache. */ +@RunWith(JUnit4.class) public class GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest extends GridCacheNearOnlyMultiNodeFullApiSelfTest { /** {@inheritDoc} */ @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMetricsSelfTest.java index fda204dcb904a..43290a762e177 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMetricsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMetricsSelfTest.java @@ -29,12 +29,16 @@ import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.processors.cache.GridCacheAbstractSelfTest; import org.apache.ignite.internal.util.typedef.internal.U; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * Cache metrics test. */ +@RunWith(JUnit4.class) public class GridCacheNearMetricsSelfTest extends GridCacheAbstractSelfTest { /** */ private static final int KEY_CNT = 50; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedClientOnlyNoPrimaryFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedClientOnlyNoPrimaryFullApiSelfTest.java index ace4ffaee73c3..3c9ce6d370024 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedClientOnlyNoPrimaryFullApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedClientOnlyNoPrimaryFullApiSelfTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.internal.util.typedef.X; import org.apache.ignite.lang.IgniteClosure; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for local cache. */ +@RunWith(JUnit4.class) public class GridCachePartitionedClientOnlyNoPrimaryFullApiSelfTest extends GridCachePartitionedFullApiSelfTest { /** {@inheritDoc} */ @Override protected NearCacheConfiguration nearConfiguration() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheStoreSessionWriteBehindAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheStoreSessionWriteBehindAbstractTest.java index 0fe88d9b396f7..8b20541779f8c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheStoreSessionWriteBehindAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheStoreSessionWriteBehindAbstractTest.java @@ -37,10 +37,14 @@ import org.apache.ignite.resources.CacheStoreSessionResource; import org.apache.ignite.resources.IgniteInstanceResource; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public abstract class IgniteCacheStoreSessionWriteBehindAbstractTest extends IgniteCacheAbstractTest { /** */ private static final String CACHE_NAME1 = "cache1"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractBasicCoordinatorFailoverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractBasicCoordinatorFailoverTest.java index a86efac2b23d7..6e9f9e41be1c9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractBasicCoordinatorFailoverTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractBasicCoordinatorFailoverTest.java @@ -59,6 +59,9 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; @@ -67,6 +70,7 @@ /** * Base class for Mvcc coordinator failover test. */ +@RunWith(JUnit4.class) public abstract class CacheMvccAbstractBasicCoordinatorFailoverTest extends CacheMvccAbstractTest { /** * @param concurrency Transaction concurrency. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractCoordinatorFailoverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractCoordinatorFailoverTest.java index 3f4b049c4327d..ca7b1fa8daa95 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractCoordinatorFailoverTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractCoordinatorFailoverTest.java @@ -17,6 +17,10 @@ package org.apache.ignite.internal.processors.cache.mvcc; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + import static org.apache.ignite.internal.processors.cache.mvcc.CacheMvccAbstractTest.ReadMode.GET; import static org.apache.ignite.internal.processors.cache.mvcc.CacheMvccAbstractTest.ReadMode.SCAN; import static org.apache.ignite.internal.processors.cache.mvcc.CacheMvccAbstractTest.WriteMode.PUT; @@ -26,6 +30,7 @@ /** * Mvcc cache API coordinator failover test. */ +@RunWith(JUnit4.class) public abstract class CacheMvccAbstractCoordinatorFailoverTest extends CacheMvccAbstractBasicCoordinatorFailoverTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryAbstractTest.java index 2c8e90c4e47e5..731970507ba74 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryAbstractTest.java @@ -28,10 +28,14 @@ import org.apache.ignite.IgniteCache; import org.apache.ignite.cache.CacheEntry; import org.apache.ignite.internal.processors.cache.GridCacheAbstractSelfTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Versioned entry abstract test. */ +@RunWith(JUnit4.class) public abstract class CacheVersionedEntryAbstractTest extends GridCacheAbstractSelfTest { /** Entries number to store in a cache. */ private static final int ENTRIES_NUM = 500; diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/TcpDiscoveryIpFinderAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/TcpDiscoveryIpFinderAbstractSelfTest.java index 9b6edac9c5782..2620ec6233b18 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/TcpDiscoveryIpFinderAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/TcpDiscoveryIpFinderAbstractSelfTest.java @@ -28,10 +28,14 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.resources.LoggerResource; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Abstract test for ip finder. */ +@RunWith(JUnit4.class) public abstract class TcpDiscoveryIpFinderAbstractSelfTest extends GridCommonAbstractTest { /** */ diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/sharedfs/TcpDiscoverySharedFsIpFinderSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/sharedfs/TcpDiscoverySharedFsIpFinderSelfTest.java index 79fea52cde53e..152a9c055ce21 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/sharedfs/TcpDiscoverySharedFsIpFinderSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/sharedfs/TcpDiscoverySharedFsIpFinderSelfTest.java @@ -24,10 +24,14 @@ import java.util.List; import java.util.UUID; import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinderAbstractSelfTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * GridTcpDiscoverySharedFsIpFinder test. */ +@RunWith(JUnit4.class) public class TcpDiscoverySharedFsIpFinderSelfTest extends TcpDiscoveryIpFinderAbstractSelfTest { /** diff --git a/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/roundrobin/GridRoundRobinLoadBalancingSpiLocalNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/roundrobin/GridRoundRobinLoadBalancingSpiLocalNodeSelfTest.java index c9dca88e10882..5bbe8b2f939f0 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/roundrobin/GridRoundRobinLoadBalancingSpiLocalNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/roundrobin/GridRoundRobinLoadBalancingSpiLocalNodeSelfTest.java @@ -24,11 +24,15 @@ import org.apache.ignite.lang.IgniteUuid; import org.apache.ignite.testframework.junits.spi.GridSpiAbstractTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests Round Robin load balancing for single node. */ @GridSpiTest(spi = RoundRobinLoadBalancingSpi.class, group = "Load Balancing SPI", triggerDiscovery = true) +@RunWith(JUnit4.class) public class GridRoundRobinLoadBalancingSpiLocalNodeSelfTest extends GridSpiAbstractTest { /** From b9d6f0d210549815d66611f2dd4b30feec4123b5 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Mon, 3 Dec 2018 21:02:11 +0300 Subject: [PATCH 031/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview --- .../ignite/internal/GridJobMasterLeaveAwareSelfTest.java | 4 ++++ .../processors/cache/CacheEntryProcessorCopySelfTest.java | 4 ++++ .../processors/cache/CacheGetEntryAbstractTest.java | 4 ++++ .../cache/DataStorageConfigurationValidationTest.java | 4 ++++ .../processors/cache/GridCacheAbstractMetricsSelfTest.java | 4 ++++ .../cache/GridCacheAbstractUsersAffinityMapperSelfTest.java | 4 ++++ .../processors/cache/GridCacheClearLocallySelfTest.java | 4 ++++ .../cache/GridCacheConditionalDeploymentSelfTest.java | 4 ++++ .../cache/GridCacheConfigurationValidationSelfTest.java | 4 ++++ .../processors/cache/GridCacheTtlManagerLoadTest.java | 4 ++++ .../processors/cache/GridCacheTtlManagerSelfTest.java | 4 ++++ .../cache/IgniteCacheConfigurationDefaultTemplateTest.java | 4 ++++ .../GridCacheQueueRotativeMultiNodeAbstractTest.java | 4 ++++ .../datastructures/IgniteAtomicLongApiAbstractSelfTest.java | 4 ++++ .../cache/distributed/CachePutAllFailoverAbstractTest.java | 6 +++--- .../IgniteCacheClientNodePartitionsExchangeTest.java | 4 ++++ .../cache/distributed/dht/GridCacheDhtMappingSelfTest.java | 4 ++++ 17 files changed, 67 insertions(+), 3 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridJobMasterLeaveAwareSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridJobMasterLeaveAwareSelfTest.java index bb01fd7582932..bc2e33a06539f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridJobMasterLeaveAwareSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridJobMasterLeaveAwareSelfTest.java @@ -58,6 +58,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -67,6 +70,7 @@ * interface. */ @GridCommonTest(group = "Task Session") +@RunWith(JUnit4.class) public class GridJobMasterLeaveAwareSelfTest extends GridCommonAbstractTest { /** Total grid count within the cloud. */ private static final int GRID_CNT = 2; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheEntryProcessorCopySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheEntryProcessorCopySelfTest.java index 6caa7b456876c..5c0f3d468a74b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheEntryProcessorCopySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheEntryProcessorCopySelfTest.java @@ -35,10 +35,14 @@ import org.apache.ignite.internal.util.typedef.internal.CU; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for value copy in entry processor. */ +@RunWith(JUnit4.class) public class CacheEntryProcessorCopySelfTest extends GridCommonAbstractTest { /** Old value. */ private static final int OLD_VAL = 100; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryAbstractTest.java index 2090e83feb15f..bb1a625dd5418 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryAbstractTest.java @@ -41,6 +41,9 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -57,6 +60,7 @@ /** * Test getEntry and getEntries methods. */ +@RunWith(JUnit4.class) public abstract class CacheGetEntryAbstractTest extends GridCacheAbstractSelfTest { /** */ private static final String UPDATED_ENTRY_ERR = "Impossible to get version for entry updated in transaction"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/DataStorageConfigurationValidationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/DataStorageConfigurationValidationTest.java index aa792a1aeb154..effdb07c37392 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/DataStorageConfigurationValidationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/DataStorageConfigurationValidationTest.java @@ -21,10 +21,14 @@ import junit.framework.TestCase; import org.apache.ignite.configuration.DataStorageConfiguration; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests assertions in DataStorageConfiguration. */ +@RunWith(JUnit4.class) public class DataStorageConfigurationValidationTest extends TestCase { /** * Tests {@link DataStorageConfiguration#walSegmentSize} property assertion. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java index 817a067556d0d..873987a079f24 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java @@ -45,12 +45,16 @@ import org.apache.ignite.lang.IgniteFuture; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; /** * Cache metrics test. */ +@RunWith(JUnit4.class) public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstractSelfTest { /** */ private static final int KEY_CNT = 500; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractUsersAffinityMapperSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractUsersAffinityMapperSelfTest.java index 5d11a0c4369bf..63fad705080b9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractUsersAffinityMapperSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractUsersAffinityMapperSelfTest.java @@ -36,12 +36,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; /** * Test affinity mapper. */ +@RunWith(JUnit4.class) public abstract class GridCacheAbstractUsersAffinityMapperSelfTest extends GridCommonAbstractTest { /** */ private static final int KEY_CNT = 1000; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearLocallySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearLocallySelfTest.java index 636294519ec52..c959612bccb73 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearLocallySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearLocallySelfTest.java @@ -32,6 +32,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.LOCAL; @@ -43,6 +46,7 @@ /** * Test {@link IgniteCache#localClearAll(java.util.Set)} operations in multinode environment with nodes having caches with different names. */ +@RunWith(JUnit4.class) public class GridCacheClearLocallySelfTest extends GridCommonAbstractTest { /** Local cache. */ private static final String CACHE_LOCAL = "cache_local"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConditionalDeploymentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConditionalDeploymentSelfTest.java index a47fdc07dfe25..d847be4e3d351 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConditionalDeploymentSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConditionalDeploymentSelfTest.java @@ -30,6 +30,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -39,6 +42,7 @@ /** * Cache + conditional deployment test. */ +@RunWith(JUnit4.class) public class GridCacheConditionalDeploymentSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationValidationSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationValidationSelfTest.java index ded19e019ffe8..6649ece187d4b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationValidationSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationValidationSelfTest.java @@ -25,6 +25,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -35,6 +38,7 @@ /** * Attribute validation self test. */ +@RunWith(JUnit4.class) public class GridCacheConfigurationValidationSelfTest extends GridCommonAbstractTest { /** */ private static final String NON_DFLT_CACHE_NAME = "non-dflt-cache"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerLoadTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerLoadTest.java index 997f822d4b6bf..f8fe56097d1ce 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerLoadTest.java @@ -25,6 +25,9 @@ import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.internal.IgniteKernal; import org.apache.ignite.internal.util.typedef.internal.U; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -32,6 +35,7 @@ /** * Check ttl manager for memory leak. */ +@RunWith(JUnit4.class) public class GridCacheTtlManagerLoadTest extends GridCacheTtlManagerSelfTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerSelfTest.java index accc7dbb990da..476d186428ca4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerSelfTest.java @@ -30,6 +30,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.cache.CacheMode.LOCAL; @@ -39,6 +42,7 @@ /** * TTL manager self test. */ +@RunWith(JUnit4.class) public class GridCacheTtlManagerSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationDefaultTemplateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationDefaultTemplateTest.java index 17e366366c935..b880375670595 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationDefaultTemplateTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationDefaultTemplateTest.java @@ -25,10 +25,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteCacheConfigurationDefaultTemplateTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueRotativeMultiNodeAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueRotativeMultiNodeAbstractTest.java index 1793f3b054182..b816efd98638c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueRotativeMultiNodeAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueRotativeMultiNodeAbstractTest.java @@ -32,10 +32,14 @@ import org.apache.ignite.lang.IgniteCallable; import org.apache.ignite.resources.IgniteInstanceResource; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Queue multi node tests. */ +@RunWith(JUnit4.class) public abstract class GridCacheQueueRotativeMultiNodeAbstractTest extends IgniteCollectionAbstractTest { /** */ protected static final int GRID_CNT = 4; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteAtomicLongApiAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteAtomicLongApiAbstractSelfTest.java index 61aa13edf1301..6b02ec46bb48e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteAtomicLongApiAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteAtomicLongApiAbstractSelfTest.java @@ -26,12 +26,16 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; /** * Cache atomic long api test. */ +@RunWith(JUnit4.class) public abstract class IgniteAtomicLongApiAbstractSelfTest extends IgniteAtomicsAbstractTest { /** Random number generator. */ private static final Random RND = new Random(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePutAllFailoverAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePutAllFailoverAbstractTest.java index a7476eb8ecb7a..5a0f1bfb841b0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePutAllFailoverAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePutAllFailoverAbstractTest.java @@ -95,7 +95,7 @@ public abstract class CachePutAllFailoverAbstractTest extends GridCacheAbstractS /** * @throws Exception If failed. */ - @Test + @org.junit.Test public void testPutAllFailover() throws Exception { testPutAllFailover(Test.PUT_ALL); } @@ -103,7 +103,7 @@ public void testPutAllFailover() throws Exception { /** * @throws Exception If failed. */ - @Test + @org.junit.Test public void testPutAllFailoverPessimisticTx() throws Exception { if (atomicityMode() == CacheAtomicityMode.ATOMIC) return; @@ -114,7 +114,7 @@ public void testPutAllFailoverPessimisticTx() throws Exception { /** * @throws Exception If failed. */ - @Test + @org.junit.Test public void testPutAllFailoverAsync() throws Exception { testPutAllFailover(Test.PUT_ALL_ASYNC); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodePartitionsExchangeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodePartitionsExchangeTest.java index ca4370c97b0b4..a2e9458445d31 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodePartitionsExchangeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodePartitionsExchangeTest.java @@ -57,12 +57,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.processors.cache.ExchangeContext.IGNITE_EXCHANGE_COMPATIBILITY_VER_1; /** * */ +@RunWith(JUnit4.class) public class IgniteCacheClientNodePartitionsExchangeTest extends GridCommonAbstractTest { /** */ protected static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtMappingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtMappingSelfTest.java index def8a42b8e510..0cfbf9bf01a21 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtMappingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtMappingSelfTest.java @@ -29,6 +29,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -37,6 +40,7 @@ /** * Tests dht mapping. */ +@RunWith(JUnit4.class) public class GridCacheDhtMappingSelfTest extends GridCommonAbstractTest { /** Number of key backups. */ private static final int BACKUPS = 1; From b8ffd81525a3022ceaf5b45060adcc81bd97b0c7 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Mon, 3 Dec 2018 21:09:32 +0300 Subject: [PATCH 032/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview --- .../cache/GridCacheAbstractFailoverTxSelfTest.java | 5 +++++ .../internal/processors/cache/GridCacheClearSelfTest.java | 4 ++++ .../processors/cache/GridCachePutAllFailoverSelfTest.java | 4 ++++ .../processors/cache/GridCacheStorePutxSelfTest.java | 4 ++++ .../cache/GridCacheTtlManagerNotificationTest.java | 4 ++++ .../cache/datastructures/GridCacheQueueCleanupSelfTest.java | 4 ++++ .../distributed/GridCacheClientModesAbstractSelfTest.java | 4 ++++ .../GridCachePartitionedReloadAllAbstractSelfTest.java | 4 ++++ .../IgniteCacheGroupsPartitionLossPolicySelfTest.java | 4 ++++ ...dCacheAbstractPartitionedOnlyByteArrayValuesSelfTest.java | 4 ++++ .../cache/distributed/dht/GridCacheDhtEntrySelfTest.java | 4 ++++ .../dht/GridCacheDhtEvictionNearReadersSelfTest.java | 4 ++++ .../dht/GridCachePartitionedNearDisabledLockSelfTest.java | 4 ++++ .../GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest.java | 4 ++++ .../distributed/near/GridCacheNearMultiNodeSelfTest.java | 4 ++++ .../cache/distributed/near/GridCacheNearOnlySelfTest.java | 4 ++++ .../GridCacheReplicatedPreloadLifecycleSelfTest.java | 4 ++++ .../cache/eviction/lru/LruNearEvictionPolicySelfTest.java | 4 ++++ .../GridWeightedRandomLoadBalancingSpiSelfTest.java | 4 ++++ 19 files changed, 77 insertions(+) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFailoverTxSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFailoverTxSelfTest.java index 9a3d1eca1f296..c5433f5841e9c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFailoverTxSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFailoverTxSelfTest.java @@ -17,6 +17,10 @@ package org.apache.ignite.internal.processors.cache; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; import static org.apache.ignite.transactions.TransactionIsolation.READ_COMMITTED; @@ -26,6 +30,7 @@ /** * */ +@RunWith(JUnit4.class) public abstract class GridCacheAbstractFailoverTxSelfTest extends GridCacheAbstractFailoverSelfTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearSelfTest.java index da34853dc1e36..aaa30f58162d8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearSelfTest.java @@ -35,10 +35,14 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for cache clear. */ +@RunWith(JUnit4.class) public class GridCacheClearSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePutAllFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePutAllFailoverSelfTest.java index ea88f79848551..644c620ce6ff7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePutAllFailoverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePutAllFailoverSelfTest.java @@ -62,6 +62,9 @@ import org.apache.ignite.spi.failover.FailoverContext; import org.apache.ignite.spi.failover.always.AlwaysFailoverSpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -71,6 +74,7 @@ /** * Tests putAll() method along with failover and different configurations. */ +@RunWith(JUnit4.class) public class GridCachePutAllFailoverSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStorePutxSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStorePutxSelfTest.java index d82a427d938ab..5a052f45283da 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStorePutxSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStorePutxSelfTest.java @@ -32,6 +32,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -41,6 +44,7 @@ * Tests for reproduce problem with GG-6895: * putx calls CacheStore.load() when null GridPredicate passed in to avoid IDE warnings */ +@RunWith(JUnit4.class) public class GridCacheStorePutxSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerNotificationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerNotificationTest.java index 2e7de1bbd2c97..3906aa4d375a1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerNotificationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerNotificationTest.java @@ -39,6 +39,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.eclipse.jetty.util.BlockingArrayQueue; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.SECONDS; @@ -46,6 +49,7 @@ /** * */ +@RunWith(JUnit4.class) public class GridCacheTtlManagerNotificationTest extends GridCommonAbstractTest { /** Count of caches in multi caches test. */ private static final int CACHES_CNT = 10; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueCleanupSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueCleanupSelfTest.java index 2e498ec4a708f..54a933daa559f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueCleanupSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueCleanupSelfTest.java @@ -33,6 +33,9 @@ import org.apache.ignite.internal.processors.datastructures.GridCacheQueueHeaderKey; import org.apache.ignite.internal.util.typedef.PAX; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -40,6 +43,7 @@ /** * Tests cleanup of orphaned queue items. */ +@RunWith(JUnit4.class) public class GridCacheQueueCleanupSelfTest extends IgniteCollectionAbstractTest { /** */ private static final String QUEUE_NAME1 = "CleanupTestQueue1"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientModesAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientModesAbstractSelfTest.java index 82da6a9233b6d..63c0594248b25 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientModesAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientModesAbstractSelfTest.java @@ -31,6 +31,9 @@ import org.apache.ignite.internal.util.typedef.G; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.testframework.MvccFeatureChecker; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -38,6 +41,7 @@ /** * Tests near-only cache. */ +@RunWith(JUnit4.class) public abstract class GridCacheClientModesAbstractSelfTest extends GridCacheAbstractSelfTest { /** Grid cnt. */ private static AtomicInteger gridCnt; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionedReloadAllAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionedReloadAllAbstractSelfTest.java index a000f7ff6982e..1c4958fac7699 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionedReloadAllAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionedReloadAllAbstractSelfTest.java @@ -40,6 +40,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -47,6 +50,7 @@ /** * Check reloadAll() on partitioned cache. */ +@RunWith(JUnit4.class) public abstract class GridCachePartitionedReloadAllAbstractSelfTest extends GridCommonAbstractTest { /** Amount of nodes in the grid. */ private static final int GRID_CNT = 4; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheGroupsPartitionLossPolicySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheGroupsPartitionLossPolicySelfTest.java index 52142367dd8d3..9d3ee2ec22225 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheGroupsPartitionLossPolicySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheGroupsPartitionLossPolicySelfTest.java @@ -41,6 +41,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -48,6 +51,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheGroupsPartitionLossPolicySelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAbstractPartitionedOnlyByteArrayValuesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAbstractPartitionedOnlyByteArrayValuesSelfTest.java index 2828ee9f11dbd..16456bfc217f1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAbstractPartitionedOnlyByteArrayValuesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAbstractPartitionedOnlyByteArrayValuesSelfTest.java @@ -22,6 +22,9 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.internal.processors.cache.distributed.GridCacheAbstractPartitionedByteArrayValuesSelfTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.junit.Assert.assertArrayEquals; @@ -29,6 +32,7 @@ /** * Tests for byte array values in PARTITIONED-ONLY caches. */ +@RunWith(JUnit4.class) public abstract class GridCacheAbstractPartitionedOnlyByteArrayValuesSelfTest extends GridCacheAbstractPartitionedByteArrayValuesSelfTest { /** Offheap cache name. */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEntrySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEntrySelfTest.java index 0a5e6c7f52587..8b5a876ff6e6c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEntrySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEntrySelfTest.java @@ -40,6 +40,9 @@ import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -47,6 +50,7 @@ /** * Unit tests for dht entry. */ +@RunWith(JUnit4.class) public class GridCacheDhtEntrySelfTest extends GridCommonAbstractTest { /** Grid count. */ private static final int GRID_CNT = 2; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionNearReadersSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionNearReadersSelfTest.java index cc72c78d58b65..fbe48f289091d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionNearReadersSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionNearReadersSelfTest.java @@ -41,6 +41,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -50,6 +53,7 @@ /** * Tests for dht cache eviction. */ +@RunWith(JUnit4.class) public class GridCacheDhtEvictionNearReadersSelfTest extends GridCommonAbstractTest { /** */ private static final int GRID_CNT = 4; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledLockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledLockSelfTest.java index 56bb76604d8a7..785324ff9f5ae 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledLockSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledLockSelfTest.java @@ -19,10 +19,14 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedLockSelfTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class GridCachePartitionedNearDisabledLockSelfTest extends GridCachePartitionedLockSelfTest { /** {@inheritDoc} */ @Override protected CacheConfiguration cacheConfiguration() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest.java index 8bfedcbf3c4f9..cddbe7728e1cb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest.java @@ -36,6 +36,9 @@ import org.apache.ignite.internal.util.lang.GridAbsPredicate; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.internal.U; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; @@ -44,6 +47,7 @@ /** * */ +@RunWith(JUnit4.class) public class GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest extends GridCacheNearOnlyMultiNodeFullApiSelfTest { /** {@inheritDoc} */ @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiNodeSelfTest.java index 54bee6a095eb6..8e6b696288ce5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiNodeSelfTest.java @@ -60,6 +60,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -70,6 +73,7 @@ /** * Multi node test for near cache. */ +@RunWith(JUnit4.class) public class GridCacheNearMultiNodeSelfTest extends GridCommonAbstractTest { /** Grid count. */ private static final int GRID_CNT = 2; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlySelfTest.java index 5f0a2c35958b5..ae94888cd29c1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlySelfTest.java @@ -22,6 +22,9 @@ import org.apache.ignite.cache.CacheMode; import org.apache.ignite.cache.CachePeekMode; import org.apache.ignite.internal.processors.cache.distributed.GridCacheClientModesAbstractSelfTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -32,6 +35,7 @@ * Near only self test. */ @SuppressWarnings("RedundantMethodOverride") +@RunWith(JUnit4.class) public abstract class GridCacheNearOnlySelfTest extends GridCacheClientModesAbstractSelfTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadLifecycleSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadLifecycleSelfTest.java index 8d7ac5de8b854..f178e24c7bf80 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadLifecycleSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadLifecycleSelfTest.java @@ -28,6 +28,9 @@ import org.apache.ignite.lifecycle.LifecycleBean; import org.apache.ignite.lifecycle.LifecycleEventType; import org.apache.ignite.resources.IgniteInstanceResource; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.REPLICATED; import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; @@ -38,6 +41,7 @@ /** * Tests for replicated cache preloader. */ +@RunWith(JUnit4.class) public class GridCacheReplicatedPreloadLifecycleSelfTest extends GridCachePreloadLifecycleAbstractTest { /** */ private static boolean quiet = true; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearEvictionPolicySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearEvictionPolicySelfTest.java index fb2a16eed9881..55d606212c8d3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearEvictionPolicySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearEvictionPolicySelfTest.java @@ -29,6 +29,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -39,6 +42,7 @@ /** * LRU near eviction tests (GG-8884). */ +@RunWith(JUnit4.class) public class LruNearEvictionPolicySelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/weightedrandom/GridWeightedRandomLoadBalancingSpiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/weightedrandom/GridWeightedRandomLoadBalancingSpiSelfTest.java index 290274e6ee16b..90f28077b48a5 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/weightedrandom/GridWeightedRandomLoadBalancingSpiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/weightedrandom/GridWeightedRandomLoadBalancingSpiSelfTest.java @@ -27,11 +27,15 @@ import org.apache.ignite.testframework.GridTestNode; import org.apache.ignite.testframework.junits.spi.GridSpiAbstractTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Weighted random load balancing SPI. */ @GridSpiTest(spi = WeightedRandomLoadBalancingSpi.class, group = "Load Balancing SPI") +@RunWith(JUnit4.class) public class GridWeightedRandomLoadBalancingSpiSelfTest extends GridSpiAbstractTest { /** From 36f85d069a50a8360641a21cd365ae6d1409345d Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Mon, 3 Dec 2018 23:37:14 +0300 Subject: [PATCH 033/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview --- .../test/java/org/apache/ignite/internal/ClassSetTest.java | 4 ++++ .../apache/ignite/internal/GridDiscoveryEventSelfTest.java | 4 ++++ .../apache/ignite/internal/GridJobServicesAddNodeTest.java | 4 ++++ .../CacheStoreUsageMultinodeDynamicStartAbstractTest.java | 4 ++++ .../CacheStoreUsageMultinodeStaticStartAbstractTest.java | 5 +++++ .../cache/EntryVersionConsistencyReadThroughTest.java | 4 ++++ .../processors/cache/GridCacheAbstractTxReadTest.java | 4 ++++ .../cache/GridCacheAtomicMessageCountSelfTest.java | 4 ++++ .../ignite/internal/processors/cache/GridCacheLeakTest.java | 4 ++++ .../cache/GridCacheMixedPartitionExchangeSelfTest.java | 4 ++++ .../processors/cache/GridCacheVariableTopologySelfTest.java | 4 ++++ .../internal/processors/cache/GridCacheVersionSelfTest.java | 4 ++++ .../cache/IgniteCacheContainsKeyAbstractSelfTest.java | 4 ++++ .../GridCacheAbstractDataStructuresFailoverSelfTest.java | 4 ++++ .../GridCacheAtomicReferenceMultiNodeAbstractTest.java | 4 ++++ .../GridCacheSequenceMultiNodeAbstractSelfTest.java | 4 ++++ .../GridCachePartitionedAtomicSequenceMultiThreadedTest.java | 4 ++++ .../GridCachePartitionedQueueCreateMultiNodeSelfTest.java | 4 ++++ .../distributed/GridCacheAbstractNodeRestartSelfTest.java | 4 ++++ .../cache/distributed/IgniteCacheAtomicNodeRestartTest.java | 4 ++++ .../distributed/IgniteCachePutGetRestartAbstractTest.java | 4 ++++ .../IgniteCachePrimaryNodeFailureRecoveryAbstractTest.java | 4 ++++ .../distributed/near/GridCacheNearEvictionSelfTest.java | 4 ++++ .../distributed/near/GridCacheNearMultiGetSelfTest.java | 4 ++++ .../cache/distributed/near/GridCacheNearTxForceKeyTest.java | 4 ++++ .../near/GridCachePartitionedNodeRestartTest.java | 4 ++++ .../GridCachePartitionedOptimisticTxNodeRestartTest.java | 4 ++++ .../processors/cache/eviction/EvictionAbstractTest.java | 4 ++++ .../cache/eviction/paged/PageEvictionMetricTest.java | 4 ++++ .../eviction/paged/PageEvictionMultinodeAbstractTest.java | 4 ++++ .../integration/IgniteCacheStoreSessionAbstractTest.java | 4 ++++ .../checkpoint/IgniteCheckpointDirtyPagesForLowLoadTest.java | 4 ++++ ...ontinuousQueryRemoteFilterMissingInClassPathSelfTest.java | 4 ++++ 33 files changed, 133 insertions(+) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/ClassSetTest.java b/modules/core/src/test/java/org/apache/ignite/internal/ClassSetTest.java index 0352bc0980f36..2f27225b15026 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/ClassSetTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/ClassSetTest.java @@ -18,10 +18,14 @@ package org.apache.ignite.internal; import junit.framework.TestCase; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for {@link ClassSet} class. */ +@RunWith(JUnit4.class) public class ClassSetTest extends TestCase { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridDiscoveryEventSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridDiscoveryEventSelfTest.java index 94503558ed145..450480dc8a9c9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridDiscoveryEventSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridDiscoveryEventSelfTest.java @@ -40,6 +40,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.events.EventType.EVT_NODE_FAILED; @@ -49,6 +52,7 @@ /** * Tests discovery event topology snapshots. */ +@RunWith(JUnit4.class) public class GridDiscoveryEventSelfTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridJobServicesAddNodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridJobServicesAddNodeTest.java index a700ed5b84d6d..38b9bb4801f85 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridJobServicesAddNodeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridJobServicesAddNodeTest.java @@ -38,11 +38,15 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests multiple parallel jobs execution, accessing services(), while starting new nodes. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridJobServicesAddNodeTest extends GridCommonAbstractTest { /** */ private static final int LOG_MOD = 100; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStoreUsageMultinodeDynamicStartAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStoreUsageMultinodeDynamicStartAbstractTest.java index 649553199a3f6..80fc6da1c85ca 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStoreUsageMultinodeDynamicStartAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStoreUsageMultinodeDynamicStartAbstractTest.java @@ -21,10 +21,14 @@ import org.apache.ignite.IgniteCache; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.NearCacheConfiguration; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public abstract class CacheStoreUsageMultinodeDynamicStartAbstractTest extends CacheStoreUsageMultinodeAbstractTest { /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStoreUsageMultinodeStaticStartAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStoreUsageMultinodeStaticStartAbstractTest.java index 4f3f4a908bd52..a3b0ea5f58796 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStoreUsageMultinodeStaticStartAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStoreUsageMultinodeStaticStartAbstractTest.java @@ -17,9 +17,14 @@ package org.apache.ignite.internal.processors.cache; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + /** * */ +@RunWith(JUnit4.class) public abstract class CacheStoreUsageMultinodeStaticStartAbstractTest extends CacheStoreUsageMultinodeAbstractTest { /** {@inheritDoc} */ @Override protected void afterTest() throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/EntryVersionConsistencyReadThroughTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/EntryVersionConsistencyReadThroughTest.java index 3daf9386a7207..2580d82fc7280 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/EntryVersionConsistencyReadThroughTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/EntryVersionConsistencyReadThroughTest.java @@ -40,6 +40,9 @@ import org.apache.ignite.internal.processors.cache.version.GridCacheVersion; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -50,6 +53,7 @@ /** * Tests consistency of entry's versions after invokeAll. */ +@RunWith(JUnit4.class) public class EntryVersionConsistencyReadThroughTest extends GridCommonAbstractTest { /** */ private static final int NODES_CNT = 5; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractTxReadTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractTxReadTest.java index 8b943d6ee7db5..140f2260bd4a6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractTxReadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractTxReadTest.java @@ -24,12 +24,16 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * Tests value read inside transaction. */ +@RunWith(JUnit4.class) public abstract class GridCacheAbstractTxReadTest extends GridCacheAbstractSelfTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicMessageCountSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicMessageCountSelfTest.java index 28bcb85491f45..a523a15c877e8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicMessageCountSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicMessageCountSelfTest.java @@ -38,6 +38,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -45,6 +48,7 @@ /** * Tests messages being sent between nodes in ATOMIC mode. */ +@RunWith(JUnit4.class) public class GridCacheAtomicMessageCountSelfTest extends GridCommonAbstractTest { /** VM ip finder for TCP discovery. */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLeakTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLeakTest.java index d6aa445889fd7..740ab4166b79d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLeakTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLeakTest.java @@ -29,6 +29,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -38,6 +41,7 @@ /** * Leak test. */ +@RunWith(JUnit4.class) public class GridCacheLeakTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMixedPartitionExchangeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMixedPartitionExchangeSelfTest.java index 119e9ea75f56e..d0a534edd98a5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMixedPartitionExchangeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMixedPartitionExchangeSelfTest.java @@ -35,6 +35,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -46,6 +49,7 @@ * exchange should be skipped in this case). */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class GridCacheMixedPartitionExchangeSelfTest extends GridCommonAbstractTest { /** VM ip finder for TCP discovery. */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVariableTopologySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVariableTopologySelfTest.java index 2c6ad91d268cf..b52c2068685c9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVariableTopologySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVariableTopologySelfTest.java @@ -39,6 +39,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionRollbackException; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -46,6 +49,7 @@ /** * Affinity routing tests. */ +@RunWith(JUnit4.class) public class GridCacheVariableTopologySelfTest extends GridCommonAbstractTest { /** */ private static final Random RAND = new Random(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionSelfTest.java index a7f605fe115e9..f70dfd25c8d8a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionSelfTest.java @@ -23,10 +23,14 @@ import org.apache.ignite.marshaller.Marshaller; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class GridCacheVersionSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheContainsKeyAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheContainsKeyAbstractSelfTest.java index b78190ce2d6a5..66259b720fb92 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheContainsKeyAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheContainsKeyAbstractSelfTest.java @@ -28,12 +28,16 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; /** * Tests various scenarios for {@code containsKey()} method. */ +@RunWith(JUnit4.class) public abstract class IgniteCacheContainsKeyAbstractSelfTest extends GridCacheAbstractSelfTest { /** * @return Number of grids to start. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java index 78a8e696a0f4c..acdc23a424f7e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java @@ -69,6 +69,9 @@ import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.testframework.GridTestUtils.waitForCondition; @@ -76,6 +79,7 @@ /** * Failover tests for cache data structures. */ +@RunWith(JUnit4.class) public abstract class GridCacheAbstractDataStructuresFailoverSelfTest extends IgniteCollectionAbstractTest { /** */ private static final long TEST_TIMEOUT = 3 * 60 * 1000; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicReferenceMultiNodeAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicReferenceMultiNodeAbstractTest.java index a38e03270bef0..b6c88a6a0a9cd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicReferenceMultiNodeAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicReferenceMultiNodeAbstractTest.java @@ -22,10 +22,14 @@ import org.apache.ignite.IgniteAtomicReference; import org.apache.ignite.IgniteAtomicStamped; import org.apache.ignite.lang.IgniteCallable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * AtomicReference and AtomicStamped multi node tests. */ +@RunWith(JUnit4.class) public abstract class GridCacheAtomicReferenceMultiNodeAbstractTest extends IgniteAtomicsAbstractTest { /** */ protected static final int GRID_CNT = 4; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSequenceMultiNodeAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSequenceMultiNodeAbstractSelfTest.java index 5c385b230753d..48d36b537c17d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSequenceMultiNodeAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSequenceMultiNodeAbstractSelfTest.java @@ -34,10 +34,14 @@ import org.apache.ignite.lang.IgniteCallable; import org.apache.ignite.resources.IgniteInstanceResource; import org.apache.ignite.resources.LoggerResource; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Sequence multi node tests. */ +@RunWith(JUnit4.class) public abstract class GridCacheSequenceMultiNodeAbstractSelfTest extends IgniteAtomicsAbstractTest implements Externalizable { /** */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSequenceMultiThreadedTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSequenceMultiThreadedTest.java index 20687ded0577e..eeee62548a5a3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSequenceMultiThreadedTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSequenceMultiThreadedTest.java @@ -28,12 +28,16 @@ import org.apache.ignite.internal.processors.datastructures.GridCacheAtomicSequenceImpl; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** * Cache partitioned multi-threaded tests. */ +@RunWith(JUnit4.class) public class GridCachePartitionedAtomicSequenceMultiThreadedTest extends IgniteAtomicsAbstractTest { /** Number of threads for multithreaded test. */ private static final int THREAD_NUM = 30; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueCreateMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueCreateMultiNodeSelfTest.java index 744e4dd81c9f6..7979e3cb1fbff 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueCreateMultiNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueCreateMultiNodeSelfTest.java @@ -33,6 +33,9 @@ import org.apache.ignite.internal.processors.cache.datastructures.IgniteCollectionAbstractTest; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; @@ -46,6 +49,7 @@ /** * */ +@RunWith(JUnit4.class) public class GridCachePartitionedQueueCreateMultiNodeSelfTest extends IgniteCollectionAbstractTest { /** {@inheritDoc} */ @Override protected int gridCount() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractNodeRestartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractNodeRestartSelfTest.java index 77583c0ab0981..be36635f5b96a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractNodeRestartSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractNodeRestartSelfTest.java @@ -47,6 +47,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -59,6 +62,7 @@ /** * Test node restart. */ +@RunWith(JUnit4.class) public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbstractTest { /** Cache name. */ protected static final String CACHE_NAME = "TEST_CACHE"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java index 8625a0119de6e..0cfa578f4beb7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java @@ -19,12 +19,16 @@ import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedNodeRestartTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; /** * */ +@RunWith(JUnit4.class) public class IgniteCacheAtomicNodeRestartTest extends GridCachePartitionedNodeRestartTest { /** {@inheritDoc} */ @Override protected CacheAtomicityMode atomicityMode() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCachePutGetRestartAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCachePutGetRestartAbstractTest.java index 06f0e28386a12..0650ea08fd16d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCachePutGetRestartAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCachePutGetRestartAbstractTest.java @@ -35,6 +35,9 @@ import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -45,6 +48,7 @@ /** * Test for specific user scenario. */ +@RunWith(JUnit4.class) public abstract class IgniteCachePutGetRestartAbstractTest extends IgniteCacheAbstractTest { /** */ private static final int ENTRY_CNT = 1000; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePrimaryNodeFailureRecoveryAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePrimaryNodeFailureRecoveryAbstractTest.java index c11d189a3e430..48755e8e9eb91 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePrimaryNodeFailureRecoveryAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePrimaryNodeFailureRecoveryAbstractTest.java @@ -59,6 +59,9 @@ import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT; @@ -72,6 +75,7 @@ /** * */ +@RunWith(JUnit4.class) public abstract class IgniteCachePrimaryNodeFailureRecoveryAbstractTest extends IgniteCacheAbstractTest { /** {@inheritDoc} */ @Override protected int gridCount() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearEvictionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearEvictionSelfTest.java index 7f72e8ea76cdc..947953503519a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearEvictionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearEvictionSelfTest.java @@ -32,6 +32,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -41,6 +44,7 @@ /** * Tests entries distribution between primary-backup-near caches according to nodes count in grid. */ +@RunWith(JUnit4.class) public class GridCacheNearEvictionSelfTest extends GridCommonAbstractTest { /** Grid count. */ private int gridCnt; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiGetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiGetSelfTest.java index e6b513549e7e7..acab624853856 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiGetSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiGetSelfTest.java @@ -36,6 +36,9 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.apache.ignite.transactions.TransactionOptimisticException; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT; @@ -50,6 +53,7 @@ /** * Test getting the same value twice within the same transaction. */ +@RunWith(JUnit4.class) public class GridCacheNearMultiGetSelfTest extends GridCommonAbstractTest { /** Number of gets. */ private static final int GET_CNT = 5; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearTxForceKeyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearTxForceKeyTest.java index 05b47ce78b6ed..3e0fbccb1a57a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearTxForceKeyTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearTxForceKeyTest.java @@ -26,6 +26,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheRebalanceMode.ASYNC; @@ -34,6 +37,7 @@ /** * */ +@RunWith(JUnit4.class) public class GridCacheNearTxForceKeyTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedNodeRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedNodeRestartTest.java index cc119f81b8a85..4fca78955b937 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedNodeRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedNodeRestartTest.java @@ -21,6 +21,9 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.processors.cache.distributed.GridCacheAbstractNodeRestartSelfTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -29,6 +32,7 @@ /** * Test node restart. */ +@RunWith(JUnit4.class) public class GridCachePartitionedNodeRestartTest extends GridCacheAbstractNodeRestartSelfTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOptimisticTxNodeRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOptimisticTxNodeRestartTest.java index 99bdfe33eef86..f7a475eb6cca4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOptimisticTxNodeRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOptimisticTxNodeRestartTest.java @@ -23,6 +23,9 @@ import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.internal.processors.cache.distributed.GridCacheAbstractNodeRestartSelfTest; import org.apache.ignite.transactions.TransactionConcurrency; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -31,6 +34,7 @@ /** * Test node restart. */ +@RunWith(JUnit4.class) public class GridCachePartitionedOptimisticTxNodeRestartTest extends GridCacheAbstractNodeRestartSelfTest { /** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/EvictionAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/EvictionAbstractTest.java index 37f111765a9c5..a2ec38828685e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/EvictionAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/EvictionAbstractTest.java @@ -44,6 +44,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.LOCAL; @@ -61,6 +64,7 @@ /** * Base class for eviction tests. */ +@RunWith(JUnit4.class) public abstract class EvictionAbstractTest> extends GridCommonAbstractTest { /** IP finder. */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMetricTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMetricTest.java index 57cfd46f72fe3..c0f0d25dd0106 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMetricTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMetricTest.java @@ -25,10 +25,14 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.processors.cache.persistence.DataRegionMetricsImpl; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class PageEvictionMetricTest extends PageEvictionAbstractTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMultinodeAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMultinodeAbstractTest.java index 5c993d1e52e0b..f1e5217de3ddd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMultinodeAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMultinodeAbstractTest.java @@ -25,10 +25,14 @@ import org.apache.ignite.cache.CacheWriteSynchronizationMode; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public abstract class PageEvictionMultinodeAbstractTest extends PageEvictionAbstractTest { /** Cache modes. */ private static final CacheMode[] CACHE_MODES = {CacheMode.PARTITIONED, CacheMode.REPLICATED}; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheStoreSessionAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheStoreSessionAbstractTest.java index 3ca0a9268200b..0a6d9361eed1b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheStoreSessionAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheStoreSessionAbstractTest.java @@ -43,12 +43,16 @@ import org.apache.ignite.resources.IgniteInstanceResource; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; /** * */ +@RunWith(JUnit4.class) public abstract class IgniteCacheStoreSessionAbstractTest extends IgniteCacheAbstractTest { /** */ protected static volatile List expData; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/checkpoint/IgniteCheckpointDirtyPagesForLowLoadTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/checkpoint/IgniteCheckpointDirtyPagesForLowLoadTest.java index 1b56e07729676..c1f34f9fbe7b0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/checkpoint/IgniteCheckpointDirtyPagesForLowLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/checkpoint/IgniteCheckpointDirtyPagesForLowLoadTest.java @@ -36,11 +36,15 @@ import org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test generates low load to grid in having some shared groups. Test checks if pages marked dirty after some time will * became reasonable low for 1 put. */ +@RunWith(JUnit4.class) public class IgniteCheckpointDirtyPagesForLowLoadTest extends GridCommonAbstractTest { /** Caches in group. */ private static final int CACHES_IN_GRP = 1; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/ContinuousQueryRemoteFilterMissingInClassPathSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/ContinuousQueryRemoteFilterMissingInClassPathSelfTest.java index a0444aa4fed64..74f924853f521 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/ContinuousQueryRemoteFilterMissingInClassPathSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/ContinuousQueryRemoteFilterMissingInClassPathSelfTest.java @@ -36,10 +36,14 @@ import java.net.MalformedURLException; import java.net.URL; import java.net.URLClassLoader; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class ContinuousQueryRemoteFilterMissingInClassPathSelfTest extends GridCommonAbstractTest { /** URL of classes. */ private static final URL[] URLS; From 91e3039f762875bddc1c263ecb0ec20924f8d69e Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Tue, 4 Dec 2018 00:13:38 +0300 Subject: [PATCH 034/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview --- .../GridComputationBinarylizableClosuresSelfTest.java | 4 ++++ .../ignite/internal/GridFailedInputParametersSelfTest.java | 4 ++++ .../internal/GridFailoverTaskWithPredicateSelfTest.java | 4 ++++ .../processors/cache/CacheEnumOperationsAbstractTest.java | 4 ++++ .../processors/cache/CacheNoAffinityExchangeTest.java | 4 ++++ .../cache/CacheOptimisticTransactionsWithFilterTest.java | 4 ++++ .../processors/cache/CacheReadThroughRestartSelfTest.java | 4 ++++ .../internal/processors/cache/CashEventWithTxLabelTest.java | 4 ++++ .../GridCacheAtomicEntryProcessorDeploymentSelfTest.java | 4 ++++ .../processors/cache/GridCacheBasicApiAbstractTest.java | 4 ++++ .../internal/processors/cache/GridCacheClearAllSelfTest.java | 4 ++++ .../processors/cache/GridCacheEvictionEventAbstractTest.java | 4 ++++ .../cache/GridCacheGetAndTransformStoreAbstractTest.java | 4 ++++ .../cache/GridCacheMultinodeUpdateNearEnabledSelfTest.java | 4 ++++ .../GridCacheOffHeapMultiThreadedUpdateAbstractSelfTest.java | 4 ++++ .../cache/GridCacheOffHeapMultiThreadedUpdateSelfTest.java | 4 ++++ .../processors/cache/GridCacheOffheapUpdateSelfTest.java | 4 ++++ .../processors/cache/GridCacheOnCopyFlagAbstractSelfTest.java | 4 ++++ .../processors/cache/GridCacheOrderedPreloadingSelfTest.java | 4 ++++ .../cache/GridCachePartitionedProjectionAffinitySelfTest.java | 4 ++++ .../cache/GridCacheTcpClientDiscoveryMultiThreadedTest.java | 4 ++++ .../cache/GridCacheTransactionalAbstractMetricsSelfTest.java | 4 ++++ .../processors/cache/GridCacheTtlManagerEvictionSelfTest.java | 4 ++++ .../cache/IgniteCacheCopyOnReadDisabledAbstractTest.java | 4 ++++ .../cache/IgniteCacheExpireAndUpdateConsistencyTest.java | 4 ++++ .../processors/cache/IgniteCachePeekModesAbstractTest.java | 4 ++++ .../cache/IgniteCacheScanPredicateDeploymentSelfTest.java | 4 ++++ .../processors/cache/IgniteCacheSerializationSelfTest.java | 4 ++++ .../processors/cache/IgniteCacheStartStopLoadTest.java | 4 ++++ .../internal/processors/cache/IgniteCacheStartTest.java | 4 ++++ .../GridCacheAtomicStampedApiSelfAbstractTest.java | 4 ++++ .../datastructures/GridCacheQueueClientDisconnectTest.java | 4 ++++ .../GridCacheQueueMultiNodeAbstractSelfTest.java | 4 ++++ .../GridCacheQueueMultiNodeConsistencySelfTest.java | 4 ++++ .../datastructures/GridCacheSequenceApiSelfAbstractTest.java | 4 ++++ .../processors/cache/distributed/CacheExchangeMergeTest.java | 4 ++++ .../processors/cache/distributed/CacheGroupsPreloadTest.java | 4 ++++ .../cache/distributed/CachePageWriteLockUnlockTest.java | 4 ++++ .../processors/cache/distributed/CachePartitionStateTest.java | 4 ++++ .../processors/cache/distributed/CacheStartOnJoinTest.java | 4 ++++ .../cache/distributed/GridCacheNodeFailureAbstractTest.java | 4 ++++ .../cache/distributed/GridCacheTransformEventSelfTest.java | 4 ++++ .../cache/distributed/IgniteCacheClientReconnectTest.java | 4 ++++ .../distributed/IgniteCacheMessageRecoveryAbstractTest.java | 4 ++++ .../distributed/IgniteCacheServerNodeConcurrentStart.java | 4 ++++ .../cache/distributed/IgniteCacheSizeFailoverTest.java | 4 ++++ .../distributed/dht/GridCacheAtomicNearCacheSelfTest.java | 4 ++++ .../cache/distributed/dht/GridCacheDhtMultiBackupTest.java | 4 ++++ .../distributed/dht/GridCacheDhtPreloadStartStopSelfTest.java | 4 ++++ .../distributed/dht/IgniteCacheCommitDelayTxRecoveryTest.java | 4 ++++ .../IgniteCachePartitionedBackupNodeFailureRecoveryTest.java | 4 ++++ .../distributed/dht/atomic/IgniteCacheAtomicProtocolTest.java | 4 ++++ .../GridCacheAtomicPartitionedTckMetricsSelfTestImpl.java | 4 ++++ .../distributed/near/GridCacheNearReaderPreloadSelfTest.java | 4 ++++ .../near/GridCachePartitionedAffinitySelfTest.java | 4 ++++ .../GridCachePartitionedExplicitLockNodeFailureSelfTest.java | 4 ++++ .../near/GridCachePartitionedHitsAndMissesSelfTest.java | 4 ++++ .../near/GridCachePartitionedLoadCacheSelfTest.java | 4 ++++ .../near/GridCachePartitionedPreloadLifecycleSelfTest.java | 4 ++++ .../replicated/GridCacheReplicatedTxMultiNodeBasicTest.java | 4 ++++ .../preloader/GridCacheReplicatedPreloadSelfTest.java | 4 ++++ .../GridCacheReplicatedPreloadStartStopEventsSelfTest.java | 4 ++++ .../processors/cache/local/GridCacheLocalFullApiSelfTest.java | 4 ++++ .../cache/persistence/IgnitePdsContinuousRestartTest.java | 4 ++++ .../CacheContinuousWithTransformerFailoverTest.java | 4 ++++ .../query/continuous/ContinuousQueryPeerClassLoadingTest.java | 4 ++++ .../processors/timeout/GridTimeoutProcessorSelfTest.java | 4 ++++ 67 files changed, 268 insertions(+) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridComputationBinarylizableClosuresSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridComputationBinarylizableClosuresSelfTest.java index 88e7e06c713cd..e677d57790653 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridComputationBinarylizableClosuresSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridComputationBinarylizableClosuresSelfTest.java @@ -33,10 +33,14 @@ import org.apache.ignite.lang.IgniteClosure; import org.apache.ignite.lang.IgniteRunnable; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test ensuring that correct closures are serialized. */ +@RunWith(JUnit4.class) public class GridComputationBinarylizableClosuresSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridFailedInputParametersSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridFailedInputParametersSelfTest.java index 363b5f8d625ba..a8437f9d1e1ef 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridFailedInputParametersSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridFailedInputParametersSelfTest.java @@ -23,6 +23,9 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVTS_ALL; @@ -30,6 +33,7 @@ * Test for invalid input parameters. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridFailedInputParametersSelfTest extends GridCommonAbstractTest { /** */ private static Ignite ignite; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverTaskWithPredicateSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverTaskWithPredicateSelfTest.java index 78a637f227a54..6074efcc031be 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverTaskWithPredicateSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverTaskWithPredicateSelfTest.java @@ -43,11 +43,15 @@ import org.apache.ignite.spi.failover.always.AlwaysFailoverSpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test failover of a task with Node filter predicate. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridFailoverTaskWithPredicateSelfTest extends GridCommonAbstractTest { /** First node's name. */ private static final String NODE1 = "NODE1"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheEnumOperationsAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheEnumOperationsAbstractTest.java index 2b0726eb09176..573e68d4c9212 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheEnumOperationsAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheEnumOperationsAbstractTest.java @@ -33,6 +33,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -43,6 +46,7 @@ /** * */ +@RunWith(JUnit4.class) public abstract class CacheEnumOperationsAbstractTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNoAffinityExchangeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNoAffinityExchangeTest.java index eb60c2fc3a3fb..5eaece87fe75c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNoAffinityExchangeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNoAffinityExchangeTest.java @@ -37,10 +37,14 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class CacheNoAffinityExchangeTest extends GridCommonAbstractTest { /** */ private volatile boolean startClient; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheOptimisticTransactionsWithFilterTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheOptimisticTransactionsWithFilterTest.java index 0aaebb18f49b7..b01429b6de2e2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheOptimisticTransactionsWithFilterTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheOptimisticTransactionsWithFilterTest.java @@ -34,6 +34,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -46,6 +49,7 @@ /** * */ +@RunWith(JUnit4.class) public class CacheOptimisticTransactionsWithFilterTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadThroughRestartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadThroughRestartSelfTest.java index 9273b856ad7db..5ead75929867d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadThroughRestartSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadThroughRestartSelfTest.java @@ -30,6 +30,9 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -37,6 +40,7 @@ /** * Test for read through store. */ +@RunWith(JUnit4.class) public class CacheReadThroughRestartSelfTest extends GridCacheAbstractSelfTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CashEventWithTxLabelTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CashEventWithTxLabelTest.java index b990887a2fdf7..b737c9efde26d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CashEventWithTxLabelTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CashEventWithTxLabelTest.java @@ -43,6 +43,9 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_PUT; import static org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_READ; @@ -52,6 +55,7 @@ * Test to check passing transaction's label for EVT_CACHE_OBJECT_READ, EVT_CACHE_OBJECT_PUT, * EVT_CACHE_OBJECT_REMOVED events. */ +@RunWith(JUnit4.class) public class CashEventWithTxLabelTest extends GridCommonAbstractTest { /** Types event to be checked. */ private static final int[] CACHE_EVENT_TYPES = {EVT_CACHE_OBJECT_READ, EVT_CACHE_OBJECT_PUT, EVT_CACHE_OBJECT_REMOVED}; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicEntryProcessorDeploymentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicEntryProcessorDeploymentSelfTest.java index e66353d8a1ae2..caf1f8b7e02a9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicEntryProcessorDeploymentSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicEntryProcessorDeploymentSelfTest.java @@ -33,6 +33,9 @@ import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.config.GridTestProperties; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -42,6 +45,7 @@ /** * Cache EntryProcessor + Deployment. */ +@RunWith(JUnit4.class) public class GridCacheAtomicEntryProcessorDeploymentSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicApiAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicApiAbstractTest.java index 56b91e15f324d..03e8e6817553b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicApiAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicApiAbstractTest.java @@ -41,6 +41,9 @@ import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.events.EventType.EVTS_CACHE; @@ -51,6 +54,7 @@ * Test cases for multi-threaded tests. */ @SuppressWarnings("LockAcquiredButNotSafelyReleased") +@RunWith(JUnit4.class) public abstract class GridCacheBasicApiAbstractTest extends GridCommonAbstractTest { /** Grid. */ private Ignite ignite; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearAllSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearAllSelfTest.java index 9613c8bc98aa0..1ac2e37923723 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearAllSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearAllSelfTest.java @@ -29,6 +29,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -38,6 +41,7 @@ * Test {@link IgniteCache#clear()} operation in multinode environment with nodes * having caches with different names. */ +@RunWith(JUnit4.class) public class GridCacheClearAllSelfTest extends GridCommonAbstractTest { /** Grid nodes count. */ private static final int GRID_CNT = 3; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionEventAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionEventAbstractTest.java index 7f2067609ca57..c87b3a85e43a3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionEventAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionEventAbstractTest.java @@ -37,6 +37,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_CACHE_ENTRY_EVICTED; import static org.apache.ignite.events.EventType.EVT_JOB_MAPPED; @@ -46,6 +49,7 @@ /** * Eviction event self test. */ +@RunWith(JUnit4.class) public abstract class GridCacheEvictionEventAbstractTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGetAndTransformStoreAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGetAndTransformStoreAbstractTest.java index 5b0050597376a..b089f1a3cccef 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGetAndTransformStoreAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGetAndTransformStoreAbstractTest.java @@ -34,6 +34,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; @@ -42,6 +45,7 @@ /** * Basic get and transform store test. */ +@RunWith(JUnit4.class) public abstract class GridCacheGetAndTransformStoreAbstractTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateNearEnabledSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateNearEnabledSelfTest.java index f6939c90d6708..74f197e7410cc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateNearEnabledSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateNearEnabledSelfTest.java @@ -19,12 +19,16 @@ import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.configuration.NearCacheConfiguration; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; /** * TODO: IGNITE-809. */ +@RunWith(JUnit4.class) public class GridCacheMultinodeUpdateNearEnabledSelfTest extends GridCacheMultinodeUpdateAbstractSelfTest { /** {@inheritDoc} */ @Override protected NearCacheConfiguration nearConfiguration() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapMultiThreadedUpdateAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapMultiThreadedUpdateAbstractSelfTest.java index fa1f9d7af2d19..c0b0ddab0ca47 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapMultiThreadedUpdateAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapMultiThreadedUpdateAbstractSelfTest.java @@ -28,6 +28,9 @@ import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -35,6 +38,7 @@ /** * Multithreaded update test with off heap enabled. */ +@RunWith(JUnit4.class) public abstract class GridCacheOffHeapMultiThreadedUpdateAbstractSelfTest extends GridCacheAbstractSelfTest { /** */ protected static volatile boolean failed; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapMultiThreadedUpdateSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapMultiThreadedUpdateSelfTest.java index c1f8261d6e44c..4f50d384920f8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapMultiThreadedUpdateSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapMultiThreadedUpdateSelfTest.java @@ -23,6 +23,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; @@ -31,6 +34,7 @@ /** * Multithreaded update test with off heap enabled. */ +@RunWith(JUnit4.class) public class GridCacheOffHeapMultiThreadedUpdateSelfTest extends GridCacheOffHeapMultiThreadedUpdateAbstractSelfTest { /** {@inheritDoc} */ @Override protected long getTestTimeout() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapUpdateSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapUpdateSelfTest.java index dfacb44f53f4c..dac3e6713628b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapUpdateSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapUpdateSelfTest.java @@ -26,6 +26,9 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; @@ -35,6 +38,7 @@ /** * Check for specific support issue. */ +@RunWith(JUnit4.class) public class GridCacheOffheapUpdateSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOnCopyFlagAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOnCopyFlagAbstractSelfTest.java index a687c6d9116b7..80e41a16e01a5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOnCopyFlagAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOnCopyFlagAbstractSelfTest.java @@ -41,12 +41,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.junit.Assert.assertNotEquals; /** * Tests that cache value is copied for get, interceptor and invoke closure. */ +@RunWith(JUnit4.class) public abstract class GridCacheOnCopyFlagAbstractSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOrderedPreloadingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOrderedPreloadingSelfTest.java index 207a1add895bc..42b26f3e86057 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOrderedPreloadingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOrderedPreloadingSelfTest.java @@ -35,6 +35,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -43,6 +46,7 @@ /** * Checks ordered preloading. */ +@RunWith(JUnit4.class) public class GridCacheOrderedPreloadingSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedProjectionAffinitySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedProjectionAffinitySelfTest.java index 3a19d8cd92ec4..efe481c6cd5ed 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedProjectionAffinitySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedProjectionAffinitySelfTest.java @@ -28,6 +28,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -36,6 +39,7 @@ /** * Partitioned affinity test for projections. */ +@RunWith(JUnit4.class) public class GridCachePartitionedProjectionAffinitySelfTest extends GridCommonAbstractTest { /** Backup count. */ private static final int BACKUPS = 1; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTcpClientDiscoveryMultiThreadedTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTcpClientDiscoveryMultiThreadedTest.java index 984d90cccd4a4..0bb3cd56d8f20 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTcpClientDiscoveryMultiThreadedTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTcpClientDiscoveryMultiThreadedTest.java @@ -31,12 +31,16 @@ import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** * Tests {@link TcpDiscoverySpi} in client mode with multiple client nodes that interact with a cache concurrently. */ +@RunWith(JUnit4.class) public class GridCacheTcpClientDiscoveryMultiThreadedTest extends GridCacheAbstractSelfTest { /** Server nodes count. */ private static int srvNodesCnt; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTransactionalAbstractMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTransactionalAbstractMetricsSelfTest.java index 0bd6faeadaf91..e3d9a5ca8f702 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTransactionalAbstractMetricsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTransactionalAbstractMetricsSelfTest.java @@ -26,6 +26,9 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.apache.ignite.transactions.TransactionMetrics; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; @@ -37,6 +40,7 @@ /** * Transactional cache metrics test. */ +@RunWith(JUnit4.class) public abstract class GridCacheTransactionalAbstractMetricsSelfTest extends GridCacheAbstractMetricsSelfTest { /** */ private static final int TX_CNT = 3; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerEvictionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerEvictionSelfTest.java index 6fc6cef66d8de..aaf79e9289732 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerEvictionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerEvictionSelfTest.java @@ -32,10 +32,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * TTL manager eviction self test. */ +@RunWith(JUnit4.class) public class GridCacheTtlManagerEvictionSelfTest extends GridCommonAbstractTest { /** */ private static final int ENTRIES_TO_PUT = 10_100; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheCopyOnReadDisabledAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheCopyOnReadDisabledAbstractTest.java index 0e0caee3c379f..d4189e86db781 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheCopyOnReadDisabledAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheCopyOnReadDisabledAbstractTest.java @@ -20,10 +20,14 @@ import java.io.Serializable; import org.apache.ignite.IgniteCache; import org.apache.ignite.configuration.CacheConfiguration; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public abstract class IgniteCacheCopyOnReadDisabledAbstractTest extends GridCacheAbstractSelfTest { /** {@inheritDoc} */ @Override protected int gridCount() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheExpireAndUpdateConsistencyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheExpireAndUpdateConsistencyTest.java index 7258eb97ce791..501fe8a3f7fe1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheExpireAndUpdateConsistencyTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheExpireAndUpdateConsistencyTest.java @@ -48,6 +48,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.SECONDS; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; @@ -60,6 +63,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheExpireAndUpdateConsistencyTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePeekModesAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePeekModesAbstractTest.java index 8edbde43a482b..a813422ba0e58 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePeekModesAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePeekModesAbstractTest.java @@ -42,6 +42,9 @@ import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion; import org.apache.ignite.internal.util.typedef.T2; import org.apache.ignite.spi.IgniteSpiCloseableIterator; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.LOCAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -62,6 +65,7 @@ *

  • {@link IgniteCache#localEntries(CachePeekMode...)}
  • * */ +@RunWith(JUnit4.class) public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstractTest { /** */ private static final int HEAP_ENTRIES = 30; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheScanPredicateDeploymentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheScanPredicateDeploymentSelfTest.java index e6b26c1d435da..35a2852011f99 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheScanPredicateDeploymentSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheScanPredicateDeploymentSelfTest.java @@ -28,6 +28,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -37,6 +40,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheScanPredicateDeploymentSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheSerializationSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheSerializationSelfTest.java index 2eec9d65bd49b..b76130c9f2dd8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheSerializationSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheSerializationSelfTest.java @@ -28,6 +28,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -35,6 +38,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheSerializationSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStartStopLoadTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStartStopLoadTest.java index 0d6ec7d42d67a..15467ee4eadf7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStartStopLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStartStopLoadTest.java @@ -27,11 +27,15 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for dynamic cache start. */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class IgniteCacheStartStopLoadTest extends GridCommonAbstractTest { /** */ private static final long DURATION = 20_000L; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStartTest.java index 6396f86a78c0f..ecc72eb3f2c92 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStartTest.java @@ -29,10 +29,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteCacheStartTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicStampedApiSelfAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicStampedApiSelfAbstractTest.java index f73b136ea05e9..f5e93ae13b129 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicStampedApiSelfAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicStampedApiSelfAbstractTest.java @@ -25,6 +25,9 @@ import org.apache.ignite.configuration.AtomicConfiguration; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -32,6 +35,7 @@ /** * Basic tests for atomic stamped. */ +@RunWith(JUnit4.class) public abstract class GridCacheAtomicStampedApiSelfAbstractTest extends IgniteAtomicsAbstractTest { /** {@inheritDoc} */ @Override protected int gridCount() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueClientDisconnectTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueClientDisconnectTest.java index 314ea5fafe062..af11263aa04ce 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueClientDisconnectTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueClientDisconnectTest.java @@ -31,10 +31,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class GridCacheQueueClientDisconnectTest extends GridCommonAbstractTest { /** */ private static final String IGNITE_QUEUE_NAME = "ignite-queue-client-reconnect-test"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeAbstractSelfTest.java index 9883a608b89ad..4e691dd8ea8ab 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeAbstractSelfTest.java @@ -39,10 +39,14 @@ import org.apache.ignite.lang.IgniteCallable; import org.apache.ignite.resources.IgniteInstanceResource; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Queue multi node tests. */ +@RunWith(JUnit4.class) public abstract class GridCacheQueueMultiNodeAbstractSelfTest extends IgniteCollectionAbstractTest { /** */ private static final int GRID_CNT = 4; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeConsistencySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeConsistencySelfTest.java index 80c67acd7af63..8d79ca36fe5d8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeConsistencySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeConsistencySelfTest.java @@ -31,6 +31,9 @@ import org.apache.ignite.internal.processors.cache.GridCacheContext; import org.apache.ignite.lang.IgniteCallable; import org.apache.ignite.resources.IgniteInstanceResource; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -40,6 +43,7 @@ /** * Consistency test for cache queue in multi node environment. */ +@RunWith(JUnit4.class) public class GridCacheQueueMultiNodeConsistencySelfTest extends IgniteCollectionAbstractTest { /** */ protected static final int GRID_CNT = 3; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSequenceApiSelfAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSequenceApiSelfAbstractTest.java index 7715f5f74ed1a..0924d4c0af11c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSequenceApiSelfAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSequenceApiSelfAbstractTest.java @@ -38,6 +38,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.transactions.Transaction; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; @@ -46,6 +49,7 @@ /** * Cache sequence basic tests. */ +@RunWith(JUnit4.class) public abstract class GridCacheSequenceApiSelfAbstractTest extends IgniteAtomicsAbstractTest { /** */ protected static final int BATCH_SIZE = 3; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java index d7b94cee2b52b..2ab762d724ba0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java @@ -75,6 +75,9 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_EXCHANGE_HISTORY_SIZE; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; @@ -89,6 +92,7 @@ /** * */ +@RunWith(JUnit4.class) public class CacheExchangeMergeTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGroupsPreloadTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGroupsPreloadTest.java index cd1bdc57ceb1e..9e0ffaaf67db1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGroupsPreloadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGroupsPreloadTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class CacheGroupsPreloadTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePageWriteLockUnlockTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePageWriteLockUnlockTest.java index 1e060a46054c3..23d61efc7eb65 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePageWriteLockUnlockTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePageWriteLockUnlockTest.java @@ -37,12 +37,16 @@ import org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager; import org.apache.ignite.internal.processors.cache.persistence.pagemem.PageMemoryEx; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState.OWNING; /** * */ +@RunWith(JUnit4.class) public class CachePageWriteLockUnlockTest extends GridCommonAbstractTest { /** */ public static final int PARTITION = 0; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePartitionStateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePartitionStateTest.java index fd95556331989..8215b0a1d19f6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePartitionStateTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePartitionStateTest.java @@ -41,6 +41,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; import static org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState.EVICTED; @@ -50,6 +53,7 @@ /** * */ +@RunWith(JUnit4.class) public class CachePartitionStateTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheStartOnJoinTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheStartOnJoinTest.java index 34c69c78f9ec8..2f097dad36114 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheStartOnJoinTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheStartOnJoinTest.java @@ -44,6 +44,9 @@ import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryJoinRequestMessage; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -51,6 +54,7 @@ * */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class CacheStartOnJoinTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheNodeFailureAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheNodeFailureAbstractTest.java index aff2f9d682a9b..75d119e3a7511 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheNodeFailureAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheNodeFailureAbstractTest.java @@ -42,6 +42,9 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteState.STOPPED; import static org.apache.ignite.IgniteSystemProperties.IGNITE_TX_SALVAGE_TIMEOUT; @@ -57,6 +60,7 @@ /** * Tests for node failure in transactions. */ +@RunWith(JUnit4.class) public abstract class GridCacheNodeFailureAbstractTest extends GridCommonAbstractTest { /** Random number generator. */ private static final Random RAND = new Random(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTransformEventSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTransformEventSelfTest.java index 654dabe94c07d..863c396f42d64 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTransformEventSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTransformEventSelfTest.java @@ -46,6 +46,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -65,6 +68,7 @@ * Test for TRANSFORM events recording. */ @SuppressWarnings("ConstantConditions") +@RunWith(JUnit4.class) public class GridCacheTransformEventSelfTest extends GridCommonAbstractTest { /** Nodes count. */ private static final int GRID_CNT = 3; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientReconnectTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientReconnectTest.java index ed4f13beb27f6..39aad05d08ebb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientReconnectTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientReconnectTest.java @@ -40,6 +40,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -49,6 +52,7 @@ /** * Test for customer scenario. */ +@RunWith(JUnit4.class) public class IgniteCacheClientReconnectTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheMessageRecoveryAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheMessageRecoveryAbstractTest.java index 8134e1e98cc6c..944f86fd6fac2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheMessageRecoveryAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheMessageRecoveryAbstractTest.java @@ -38,6 +38,9 @@ import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -45,6 +48,7 @@ /** * Tests message delivery after reconnection. */ +@RunWith(JUnit4.class) public abstract class IgniteCacheMessageRecoveryAbstractTest extends GridCommonAbstractTest { /** Grid count. */ public static final int GRID_CNT = 3; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheServerNodeConcurrentStart.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheServerNodeConcurrentStart.java index 04cd731a60fa1..7ac3874b113a2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheServerNodeConcurrentStart.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheServerNodeConcurrentStart.java @@ -24,6 +24,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -32,6 +35,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheServerNodeConcurrentStart extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSizeFailoverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSizeFailoverTest.java index 1834f02e8a844..da955c930e590 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSizeFailoverTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSizeFailoverTest.java @@ -31,6 +31,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -39,6 +42,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheSizeFailoverTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAtomicNearCacheSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAtomicNearCacheSelfTest.java index 92c9beaa2b388..5d12465d2fa6d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAtomicNearCacheSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAtomicNearCacheSelfTest.java @@ -45,6 +45,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -55,6 +58,7 @@ /** * Tests near cache with various atomic cache configuration. */ +@RunWith(JUnit4.class) public class GridCacheAtomicNearCacheSelfTest extends GridCommonAbstractTest { /** */ private static final int GRID_CNT = 4; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtMultiBackupTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtMultiBackupTest.java index e2d86415bed82..1f5bc28bbe165 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtMultiBackupTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtMultiBackupTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.resources.IgniteInstanceResource; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class GridCacheDhtMultiBackupTest extends GridCommonAbstractTest { /** * diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadStartStopSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadStartStopSelfTest.java index a1a2a29f1058f..b142b90eccb71 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadStartStopSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadStartStopSelfTest.java @@ -38,6 +38,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -50,6 +53,7 @@ /** * Test cases for partitioned cache {@link GridDhtPreloader preloader}. */ +@RunWith(JUnit4.class) public class GridCacheDhtPreloadStartStopSelfTest extends GridCommonAbstractTest { /** */ private static final long TEST_TIMEOUT = 5 * 60 * 1000; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheCommitDelayTxRecoveryTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheCommitDelayTxRecoveryTest.java index f1e9de74d139d..43912f1ec9ecb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheCommitDelayTxRecoveryTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheCommitDelayTxRecoveryTest.java @@ -44,6 +44,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.SECONDS; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -55,6 +58,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheCommitDelayTxRecoveryTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePartitionedBackupNodeFailureRecoveryTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePartitionedBackupNodeFailureRecoveryTest.java index cb226b7da0c95..6863601a6e7d6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePartitionedBackupNodeFailureRecoveryTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePartitionedBackupNodeFailureRecoveryTest.java @@ -33,6 +33,9 @@ import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.internal.processors.cache.IgniteCacheAbstractTest; import org.apache.ignite.internal.util.typedef.PA; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -43,6 +46,7 @@ /** */ +@RunWith(JUnit4.class) public class IgniteCachePartitionedBackupNodeFailureRecoveryTest extends IgniteCacheAbstractTest { /** {@inheritDoc}*/ @Override protected int gridCount() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/IgniteCacheAtomicProtocolTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/IgniteCacheAtomicProtocolTest.java index ea59e7c6b7fa0..6e1e48a68d8af 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/IgniteCacheAtomicProtocolTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/IgniteCacheAtomicProtocolTest.java @@ -49,6 +49,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheRebalanceMode.ASYNC; @@ -59,6 +62,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheAtomicProtocolTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPartitionedTckMetricsSelfTestImpl.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPartitionedTckMetricsSelfTestImpl.java index 0e6bbf68542f0..08a44ec10e9f8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPartitionedTckMetricsSelfTestImpl.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPartitionedTckMetricsSelfTestImpl.java @@ -21,10 +21,14 @@ import javax.cache.processor.EntryProcessorException; import javax.cache.processor.MutableEntry; import org.apache.ignite.IgniteCache; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Partitioned atomic cache metrics test. */ +@RunWith(JUnit4.class) public class GridCacheAtomicPartitionedTckMetricsSelfTestImpl extends GridCacheAtomicPartitionedMetricsSelfTest { /** {@inheritDoc} */ @Override protected int gridCount() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReaderPreloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReaderPreloadSelfTest.java index 3af3a4b47ffbf..45df1b5f82bee 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReaderPreloadSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReaderPreloadSelfTest.java @@ -32,6 +32,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -43,6 +46,7 @@ * read it on B. Finally the key is updated again and we ensure that it was updated on the near node B as well. I.e. * with this test we ensures that node B is considered as near reader for that key in case put occurred during preload. */ +@RunWith(JUnit4.class) public class GridCacheNearReaderPreloadSelfTest extends GridCommonAbstractTest { /** Test iterations count. */ private static final int REPEAT_CNT = 10; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAffinitySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAffinitySelfTest.java index 8ca170878ff71..3d8fa6a3c9d3f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAffinitySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAffinitySelfTest.java @@ -42,6 +42,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -53,6 +56,7 @@ /** * Partitioned affinity test. */ +@RunWith(JUnit4.class) public class GridCachePartitionedAffinitySelfTest extends GridCommonAbstractTest { /** Backup count. */ private static final int BACKUPS = 1; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedExplicitLockNodeFailureSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedExplicitLockNodeFailureSelfTest.java index 2ce45915a0b49..ef0b4ab9684da 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedExplicitLockNodeFailureSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedExplicitLockNodeFailureSelfTest.java @@ -35,6 +35,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -44,6 +47,7 @@ /** * Tests for node failure in transactions. */ +@RunWith(JUnit4.class) public class GridCachePartitionedExplicitLockNodeFailureSelfTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedHitsAndMissesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedHitsAndMissesSelfTest.java index 8bbe5ebacf633..94664dbbd66cf 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedHitsAndMissesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedHitsAndMissesSelfTest.java @@ -33,6 +33,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.stream.StreamReceiver; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_ASYNC; @@ -42,6 +45,7 @@ /** * Test for issue GG-3997 Total Hits and Misses display wrong value for in-memory database. */ +@RunWith(JUnit4.class) public class GridCachePartitionedHitsAndMissesSelfTest extends GridCommonAbstractTest { /** Amount of grids to start. */ private static final int GRID_CNT = 3; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedLoadCacheSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedLoadCacheSelfTest.java index 4cbd011fe74bc..5a841153b578d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedLoadCacheSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedLoadCacheSelfTest.java @@ -32,6 +32,9 @@ import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -39,6 +42,7 @@ /** * Load cache test. */ +@RunWith(JUnit4.class) public class GridCachePartitionedLoadCacheSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedPreloadLifecycleSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedPreloadLifecycleSelfTest.java index 0769ed582f676..862dd57ac61d4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedPreloadLifecycleSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedPreloadLifecycleSelfTest.java @@ -28,6 +28,9 @@ import org.apache.ignite.resources.IgniteInstanceResource; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; @@ -36,6 +39,7 @@ /** * Tests for replicated cache preloader. */ +@RunWith(JUnit4.class) public class GridCachePartitionedPreloadLifecycleSelfTest extends GridCachePreloadLifecycleAbstractTest { /** Grid count. */ private int gridCnt = 5; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedTxMultiNodeBasicTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedTxMultiNodeBasicTest.java index 9003669ab6fde..83b41254b390b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedTxMultiNodeBasicTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedTxMultiNodeBasicTest.java @@ -20,6 +20,9 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.processors.cache.IgniteTxMultiNodeAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.REPLICATED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -27,6 +30,7 @@ /** * Test basic cache operations in transactions. */ +@RunWith(JUnit4.class) public class GridCacheReplicatedTxMultiNodeBasicTest extends IgniteTxMultiNodeAbstractTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadSelfTest.java index 33e94253fa438..3b1492304f99c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadSelfTest.java @@ -57,6 +57,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.REPLICATED; import static org.apache.ignite.cache.CacheRebalanceMode.ASYNC; @@ -73,6 +76,7 @@ * Tests for replicated cache preloader. */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class GridCacheReplicatedPreloadSelfTest extends GridCommonAbstractTest { /** */ private CacheRebalanceMode preloadMode = ASYNC; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadStartStopEventsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadStartStopEventsSelfTest.java index 5ba832e4e8c20..632f0ff4efb9c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadStartStopEventsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadStartStopEventsSelfTest.java @@ -27,6 +27,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.REPLICATED; import static org.apache.ignite.events.EventType.EVT_CACHE_REBALANCE_STARTED; @@ -35,6 +38,7 @@ /** * Tests that preload start/preload stop events are fired only once for replicated cache. */ +@RunWith(JUnit4.class) public class GridCacheReplicatedPreloadStartStopEventsSelfTest extends GridCommonAbstractTest { /** */ private TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalFullApiSelfTest.java index b197e9c17e8c5..c55be312bb0f0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalFullApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalFullApiSelfTest.java @@ -27,12 +27,16 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.processors.cache.GridCacheAbstractFullApiSelfTest; import org.apache.ignite.internal.util.typedef.F; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.LOCAL; /** * Tests for local cache. */ +@RunWith(JUnit4.class) public class GridCacheLocalFullApiSelfTest extends GridCacheAbstractFullApiSelfTest { /** {@inheritDoc} */ @Override protected CacheMode cacheMode() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsContinuousRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsContinuousRestartTest.java index 872b06ad170ee..5674e69d5ba45 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsContinuousRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsContinuousRestartTest.java @@ -43,10 +43,14 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Cause by https://issues.apache.org/jira/browse/IGNITE-7278 */ +@RunWith(JUnit4.class) public class IgnitePdsContinuousRestartTest extends GridCommonAbstractTest { /** */ private static final int GRID_CNT = 4; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousWithTransformerFailoverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousWithTransformerFailoverTest.java index 8ab746fab531a..46edec86b6578 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousWithTransformerFailoverTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousWithTransformerFailoverTest.java @@ -40,6 +40,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.SECONDS; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; @@ -48,6 +51,7 @@ /** */ +@RunWith(JUnit4.class) public class CacheContinuousWithTransformerFailoverTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/ContinuousQueryPeerClassLoadingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/ContinuousQueryPeerClassLoadingTest.java index 5def703fcab2d..72fa404d3ea85 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/ContinuousQueryPeerClassLoadingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/ContinuousQueryPeerClassLoadingTest.java @@ -29,10 +29,14 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.custom.DummyEventFilterFactory; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Checks if filter factory correctly deployed on all nodes. */ +@RunWith(JUnit4.class) public class ContinuousQueryPeerClassLoadingTest extends GridCommonAbstractTest { /** */ public static final String CACHE_NAME = "test-cache"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/timeout/GridTimeoutProcessorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/timeout/GridTimeoutProcessorSelfTest.java index 8875e8fe65fca..c31e4cf113b5b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/timeout/GridTimeoutProcessorSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/timeout/GridTimeoutProcessorSelfTest.java @@ -27,12 +27,16 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.GridTestKernalContext; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; /** * Timeout processor tests. */ +@RunWith(JUnit4.class) public class GridTimeoutProcessorSelfTest extends GridCommonAbstractTest { /** Random number generator. */ private static final Random RAND = new Random(); From 519022b43b79e151bad8bafe7f12f8fc508be97c Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Tue, 4 Dec 2018 00:25:40 +0300 Subject: [PATCH 035/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview --- .../org/apache/ignite/internal/GridAffinityMappedTest.java | 4 ++++ .../org/apache/ignite/internal/GridDiscoverySelfTest.java | 4 ++++ .../java/org/apache/ignite/internal/GridHomePathSelfTest.java | 4 ++++ .../processors/cache/CacheFutureExceptionSelfTest.java | 4 ++++ .../CacheInterceptorPartitionCounterRandomOperationsTest.java | 4 ++++ .../processors/cache/CacheSerializableTransactionsTest.java | 4 ++++ .../internal/processors/cache/CacheValidatorMetricsTest.java | 4 ++++ .../cache/GridCacheAbstractFullApiMultithreadedSelfTest.java | 4 ++++ .../processors/cache/GridCacheAbstractLocalStoreSelfTest.java | 4 ++++ .../processors/cache/GridCacheP2PUndeploySelfTest.java | 4 ++++ .../GridDataStorageConfigurationConsistencySelfTest.java | 4 ++++ .../cache/binary/BinaryTxCacheLocalEntriesSelfTest.java | 4 ++++ .../cache/distributed/dht/GridCacheAtomicFullApiSelfTest.java | 4 ++++ .../distributed/dht/IgniteCacheLockFailoverSelfTest.java | 4 ++++ ...chePartitionedAffinityExcludeNeighborsPerformanceTest.java | 4 ++++ .../distributed/near/GridCachePutArrayValueSelfTest.java | 4 ++++ .../replicated/GridCacheReplicatedNodeRestartSelfTest.java | 4 ++++ .../GridCacheContinuousQueryReplicatedAtomicSelfTest.java | 4 ++++ .../adaptive/GridAdaptiveLoadBalancingSpiSelfTest.java | 4 ++++ 19 files changed, 76 insertions(+) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityMappedTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityMappedTest.java index 3a0204061137c..dca90198f5532 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityMappedTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityMappedTest.java @@ -32,12 +32,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** * Tests affinity mapping when {@link AffinityKeyMapper} is used. */ +@RunWith(JUnit4.class) public class GridAffinityMappedTest extends GridCommonAbstractTest { /** VM ip finder for TCP discovery. */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridDiscoverySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridDiscoverySelfTest.java index a76cfa944dc89..ea350148d7a18 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridDiscoverySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridDiscoverySelfTest.java @@ -45,6 +45,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MINUTES; import static org.apache.ignite.events.EventType.EVT_NODE_FAILED; @@ -55,6 +58,7 @@ /** * GridDiscovery self test. */ +@RunWith(JUnit4.class) public class GridDiscoverySelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridHomePathSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridHomePathSelfTest.java index affd021e541da..b38e5fd3c2fda 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridHomePathSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridHomePathSelfTest.java @@ -22,12 +22,16 @@ import org.apache.ignite.internal.util.typedef.G; import org.apache.ignite.internal.util.typedef.X; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_HOME; /** * */ +@RunWith(JUnit4.class) public class GridHomePathSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheFutureExceptionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheFutureExceptionSelfTest.java index cbb832c040683..5ffd290cfc076 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheFutureExceptionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheFutureExceptionSelfTest.java @@ -34,12 +34,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.SECONDS; /** * Cache future self test. */ +@RunWith(JUnit4.class) public class CacheFutureExceptionSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheInterceptorPartitionCounterRandomOperationsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheInterceptorPartitionCounterRandomOperationsTest.java index f5652f6a871aa..53d9d72c0094f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheInterceptorPartitionCounterRandomOperationsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheInterceptorPartitionCounterRandomOperationsTest.java @@ -57,6 +57,9 @@ import org.apache.ignite.transactions.TransactionIsolation; import org.eclipse.jetty.util.BlockingArrayQueue; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.SECONDS; @@ -73,6 +76,7 @@ /** * */ +@RunWith(JUnit4.class) public class CacheInterceptorPartitionCounterRandomOperationsTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheSerializableTransactionsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheSerializableTransactionsTest.java index 5034e9e031020..5cbe7d05ac64b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheSerializableTransactionsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheSerializableTransactionsTest.java @@ -77,6 +77,9 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.apache.ignite.transactions.TransactionOptimisticException; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.SECONDS; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -93,6 +96,7 @@ /** * */ +@RunWith(JUnit4.class) public class CacheSerializableTransactionsTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheValidatorMetricsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheValidatorMetricsTest.java index e504171e26360..74475cca381e2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheValidatorMetricsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheValidatorMetricsTest.java @@ -29,10 +29,14 @@ import org.apache.ignite.configuration.TopologyValidator; import org.apache.ignite.internal.util.typedef.G; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Cache validator metrics test. */ +@RunWith(JUnit4.class) public class CacheValidatorMetricsTest extends GridCommonAbstractTest implements Serializable { /** Cache name 1. */ private static String CACHE_NAME_1 = "cache1"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java index b379f4f7c429e..809ec59fb21d8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java @@ -39,10 +39,14 @@ import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.lang.IgniteInClosure; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Multithreaded cache API tests. */ +@RunWith(JUnit4.class) public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends GridCacheAbstractSelfTest { /** */ private static final Random RND = new Random(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractLocalStoreSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractLocalStoreSelfTest.java index 6e6b9bf1d98b6..bb4bcd3ebc947 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractLocalStoreSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractLocalStoreSelfTest.java @@ -65,6 +65,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_LOCAL_STORE_KEEPS_PRIMARY_ONLY; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -74,6 +77,7 @@ /** * */ +@RunWith(JUnit4.class) public abstract class GridCacheAbstractLocalStoreSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheP2PUndeploySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheP2PUndeploySelfTest.java index 418e058e1ecad..a8a3a31e4188b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheP2PUndeploySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheP2PUndeploySelfTest.java @@ -37,6 +37,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -48,6 +51,7 @@ /** * */ +@RunWith(JUnit4.class) public class GridCacheP2PUndeploySelfTest extends GridCommonAbstractTest { /** Test p2p value. */ private static final String TEST_VALUE = "org.apache.ignite.tests.p2p.GridCacheDeploymentTestValue3"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridDataStorageConfigurationConsistencySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridDataStorageConfigurationConsistencySelfTest.java index 38a095737d86d..2398d06156ab8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridDataStorageConfigurationConsistencySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridDataStorageConfigurationConsistencySelfTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests a check of memory configuration consistency. */ +@RunWith(JUnit4.class) public class GridDataStorageConfigurationConsistencySelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/BinaryTxCacheLocalEntriesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/BinaryTxCacheLocalEntriesSelfTest.java index 64025f6a53356..1240dd94113bf 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/BinaryTxCacheLocalEntriesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/BinaryTxCacheLocalEntriesSelfTest.java @@ -24,10 +24,14 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.internal.processors.cache.GridCacheAbstractSelfTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class BinaryTxCacheLocalEntriesSelfTest extends GridCacheAbstractSelfTest { /** */ private static final String FIELD = "user-name"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAtomicFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAtomicFullApiSelfTest.java index d6c5b3fda6238..87eb8e19b255c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAtomicFullApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAtomicFullApiSelfTest.java @@ -27,12 +27,16 @@ import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedFullApiSelfTest; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; /** * Multi node test for disabled near cache. */ +@RunWith(JUnit4.class) public class GridCacheAtomicFullApiSelfTest extends GridCachePartitionedFullApiSelfTest { /** {@inheritDoc} */ @Override protected CacheAtomicityMode atomicityMode() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheLockFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheLockFailoverSelfTest.java index ee26d4a48b2e2..547491dc8ad5a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheLockFailoverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheLockFailoverSelfTest.java @@ -31,11 +31,15 @@ import org.apache.ignite.lang.IgniteFutureTimeoutException; import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class IgniteCacheLockFailoverSelfTest extends GridCacheAbstractSelfTest { /** {@inheritDoc} */ @Override protected int gridCount() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAffinityExcludeNeighborsPerformanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAffinityExcludeNeighborsPerformanceTest.java index 9124650cb7f65..55fb99c472e0c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAffinityExcludeNeighborsPerformanceTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAffinityExcludeNeighborsPerformanceTest.java @@ -32,6 +32,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheRebalanceMode.NONE; @@ -39,6 +42,7 @@ /** * Partitioned affinity test. */ +@RunWith(JUnit4.class) public class GridCachePartitionedAffinityExcludeNeighborsPerformanceTest extends GridCommonAbstractTest { /** Grid count. */ private static final int GRIDS = 3; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePutArrayValueSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePutArrayValueSelfTest.java index bb9b000df2dad..366c918cad2da 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePutArrayValueSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePutArrayValueSelfTest.java @@ -28,12 +28,16 @@ import org.apache.ignite.internal.processors.cache.GridCacheInternal; import org.apache.ignite.internal.util.typedef.internal.S; import org.apache.ignite.testframework.MvccFeatureChecker; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** * Specific test case for GG-3946 */ +@RunWith(JUnit4.class) public class GridCachePutArrayValueSelfTest extends GridCacheAbstractSelfTest { /** {@inheritDoc} */ @Override protected int gridCount() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedNodeRestartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedNodeRestartSelfTest.java index 6c1e91e019e7e..f7a280c01b318 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedNodeRestartSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedNodeRestartSelfTest.java @@ -19,6 +19,9 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.internal.processors.cache.distributed.GridCacheAbstractNodeRestartSelfTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.REPLICATED; import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; @@ -27,6 +30,7 @@ /** * Tests node restart. */ +@RunWith(JUnit4.class) public class GridCacheReplicatedNodeRestartSelfTest extends GridCacheAbstractNodeRestartSelfTest { /** {@inheritDoc} */ @Override protected CacheConfiguration cacheConfiguration() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryReplicatedAtomicSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryReplicatedAtomicSelfTest.java index fdf2f37696dcd..4fb0a71d46a9c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryReplicatedAtomicSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryReplicatedAtomicSelfTest.java @@ -18,12 +18,16 @@ package org.apache.ignite.internal.processors.cache.query.continuous; import org.apache.ignite.cache.CacheAtomicityMode; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; /** * Continuous queries tests for replicated atomic cache. */ +@RunWith(JUnit4.class) public class GridCacheContinuousQueryReplicatedAtomicSelfTest extends GridCacheContinuousQueryReplicatedSelfTest { /** {@inheritDoc} */ @Override protected CacheAtomicityMode atomicityMode() { diff --git a/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/adaptive/GridAdaptiveLoadBalancingSpiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/adaptive/GridAdaptiveLoadBalancingSpiSelfTest.java index 2b568be2cb0d4..3675bb041950b 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/adaptive/GridAdaptiveLoadBalancingSpiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/adaptive/GridAdaptiveLoadBalancingSpiSelfTest.java @@ -30,11 +30,15 @@ import org.apache.ignite.testframework.junits.spi.GridSpiAbstractTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; import org.apache.ignite.testframework.junits.spi.GridSpiTestConfig; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests adaptive load balancing SPI. */ @GridSpiTest(spi = AdaptiveLoadBalancingSpi.class, group = "Load Balancing SPI") +@RunWith(JUnit4.class) public class GridAdaptiveLoadBalancingSpiSelfTest extends GridSpiAbstractTest { /** {@inheritDoc} */ @Override protected GridSpiTestContext initSpiContext() throws Exception { From 121f01c6583bea68d6f0812dd7a57f09dd789991 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Tue, 4 Dec 2018 00:50:01 +0300 Subject: [PATCH 036/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview --- .../ignite/internal/ClusterBaselineNodesMetricsSelfTest.java | 4 ++++ .../org/apache/ignite/internal/ClusterGroupHostsSelfTest.java | 4 ++++ .../apache/ignite/internal/ClusterNodeMetricsSelfTest.java | 4 ++++ .../apache/ignite/internal/GridAffinityNoCacheSelfTest.java | 4 ++++ .../ignite/internal/GridAlwaysFailoverSpiFailSelfTest.java | 4 ++++ .../ignite/internal/GridCancelledJobsMetricsSelfTest.java | 4 ++++ .../apache/ignite/internal/GridContinuousTaskSelfTest.java | 4 ++++ .../ignite/internal/GridJobCollisionCancelSelfTest.java | 4 ++++ .../BinaryMetadataRegistrationInsideEntryProcessorTest.java | 4 ++++ .../processors/cache/CacheDataRegionConfigurationTest.java | 4 ++++ .../cache/CacheDhtLocalPartitionAfterRemoveSelfTest.java | 4 ++++ .../cache/CacheGetEntryPessimisticRepeatableReadSeltTest.java | 4 ++++ .../ignite/internal/processors/cache/CacheGetFromJobTest.java | 4 ++++ .../processors/cache/CacheNamesWithSpecialCharactersTest.java | 4 ++++ .../processors/cache/CacheRebalanceConfigValidationTest.java | 4 ++++ .../internal/processors/cache/CacheTxFastFinishTest.java | 4 ++++ .../internal/processors/cache/ClusterStateAbstractTest.java | 4 ++++ .../processors/cache/CrossCacheTxRandomOperationsTest.java | 4 ++++ .../cache/GridAbstractCacheInterceptorRebalanceTest.java | 4 ++++ .../processors/cache/GridCacheConcurrentMapSelfTest.java | 4 ++++ .../processors/cache/GridCacheDaemonNodeAbstractSelfTest.java | 4 ++++ .../processors/cache/GridCacheEntryMemorySizeSelfTest.java | 4 ++++ .../processors/cache/GridCacheIncrementTransformTest.java | 4 ++++ .../processors/cache/GridCacheLifecycleAwareSelfTest.java | 4 ++++ .../processors/cache/GridCacheMarshallerTxAbstractTest.java | 4 ++++ .../cache/GridCacheMarshallingNodeJoinSelfTest.java | 4 ++++ .../cache/GridCacheMissingCommitVersionSelfTest.java | 4 ++++ .../processors/cache/GridCacheMvccManagerSelfTest.java | 4 ++++ .../processors/cache/GridCachePartitionedWritesTest.java | 4 ++++ .../cache/GridCachePreloadingEvictionsSelfTest.java | 4 ++++ .../cache/GridCacheQuerySqlFieldInlineSizeSelfTest.java | 4 ++++ .../internal/processors/cache/GridCacheStopSelfTest.java | 4 ++++ .../cache/IgniteCacheConfigVariationsFullApiTest.java | 4 ++++ .../processors/cache/IgniteCacheDynamicStopSelfTest.java | 4 ++++ .../cache/IgniteCacheEntryProcessorNodeJoinTest.java | 4 ++++ .../processors/cache/IgniteCachePutAllRestartTest.java | 4 ++++ .../processors/cache/IgniteCacheReadThroughStoreCallTest.java | 4 ++++ .../GridCacheQueueJoinedNodeSelfAbstractTest.java | 4 ++++ .../GridCachePartitionedAtomicSetFailoverSelfTest.java | 4 ++++ .../processors/cache/distributed/CacheParallelStartTest.java | 4 ++++ .../distributed/CacheResultIsNotNullOnPartitionLossTest.java | 4 ++++ .../cache/distributed/GridCacheAbstractJobExecutionTest.java | 4 ++++ .../cache/distributed/GridCacheBasicOpAbstractTest.java | 4 ++++ .../cache/distributed/GridCacheMultiNodeAbstractTest.java | 4 ++++ .../GridCacheMultithreadedFailoverAbstractTest.java | 4 ++++ .../IgniteBinaryMetadataUpdateNodeRestartTest.java | 4 ++++ .../cache/distributed/IgniteCacheGetRestartTest.java | 4 ++++ .../cache/distributed/IgniteCacheSingleGetMessageTest.java | 4 ++++ .../cache/distributed/IgniteCacheThreadLocalTxTest.java | 4 ++++ .../cache/distributed/IgniteCacheTxIteratorSelfTest.java | 4 ++++ .../dht/GridCacheAbstractTransformWriteThroughSelfTest.java | 4 ++++ .../dht/GridCacheDhtEvictionsDisabledSelfTest.java | 4 ++++ .../distributed/dht/GridCacheDhtPreloadDelayedSelfTest.java | 4 ++++ .../distributed/dht/GridCacheDhtPreloadDisabledSelfTest.java | 4 ++++ .../distributed/dht/GridCacheDhtPreloadMessageCountTest.java | 4 ++++ .../distributed/dht/GridCacheDhtPreloadUnloadSelfTest.java | 4 ++++ .../dht/GridCachePartitionedNearDisabledMetricsSelfTest.java | 4 ++++ .../dht/GridCachePartitionsStateValidationTest.java | 4 ++++ .../distributed/dht/IgniteCacheConcurrentPutGetRemove.java | 4 ++++ .../cache/distributed/dht/IgniteCacheMultiTxLockSelfTest.java | 4 ++++ .../dht/atomic/GridCacheAtomicPreloadSelfTest.java | 4 ++++ .../distributed/near/GridCacheGetStoreErrorSelfTest.java | 4 ++++ .../distributed/near/GridCacheNearAtomicMetricsSelfTest.java | 4 ++++ .../cache/distributed/near/GridCacheNearOneNodeSelfTest.java | 4 ++++ .../distributed/near/GridCachePartitionedBasicOpSelfTest.java | 4 ++++ .../near/GridCachePartitionedMultiNodeLockSelfTest.java | 4 ++++ .../replicated/GridCacheReplicatedLockSelfTest.java | 4 ++++ .../cache/eviction/EvictionPolicyFactoryAbstractTest.java | 4 ++++ .../eviction/lru/LruNearOnlyNearEvictionPolicySelfTest.java | 4 ++++ .../integration/IgniteCacheStoreNodeRestartAbstractTest.java | 4 ++++ .../persistence/db/checkpoint/IgniteMassLoadSandboxTest.java | 4 ++++ .../db/file/DefaultPageSizeBackwardsCompatibilityTest.java | 4 ++++ .../IgnitePdsCheckpointSimulationWithRealCpDisabledTest.java | 4 ++++ .../persistence/db/wal/WalCompactionAfterRestartTest.java | 4 ++++ .../cache/query/continuous/ContinuousQueryMarshallerTest.java | 4 ++++ .../query/continuous/ContinuousQueryReassignmentTest.java | 4 ++++ .../tcp/ipfinder/jdbc/TcpDiscoveryJdbcIpFinderSelfTest.java | 4 ++++ .../multicast/TcpDiscoveryMulticastIpFinderSelfTest.java | 4 ++++ .../adaptive/GridAdaptiveLoadBalancingSpiConfigSelfTest.java | 4 ++++ .../GridRoundRobinLoadBalancingSpiTopologyChangeSelfTest.java | 4 ++++ .../GridWeightedRandomLoadBalancingSpiConfigSelfTest.java | 4 ++++ 81 files changed, 324 insertions(+) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/ClusterBaselineNodesMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/ClusterBaselineNodesMetricsSelfTest.java index 299d9a365ce08..b0b921dd17689 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/ClusterBaselineNodesMetricsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/ClusterBaselineNodesMetricsSelfTest.java @@ -36,11 +36,15 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Baseline nodes metrics self test. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class ClusterBaselineNodesMetricsSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupHostsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupHostsSelfTest.java index b30576af23a17..8d2b43205eeb6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupHostsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupHostsSelfTest.java @@ -29,6 +29,9 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for {@link ClusterGroup#forHost(String, String...)}. @@ -36,6 +39,7 @@ * @see ClusterGroupSelfTest */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class ClusterGroupHostsSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsSelfTest.java index 92f3a5a214e00..6f99fab31738a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsSelfTest.java @@ -51,6 +51,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_NODE_METRICS_UPDATED; import static org.apache.ignite.internal.IgniteNodeAttributes.ATTR_BUILD_VER; @@ -61,6 +64,7 @@ * Grid node metrics self test. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class ClusterNodeMetricsSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityNoCacheSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityNoCacheSelfTest.java index f31be4341487e..24d2659673062 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityNoCacheSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityNoCacheSelfTest.java @@ -34,10 +34,14 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests usage of affinity in case when cache doesn't exist. */ +@RunWith(JUnit4.class) public class GridAffinityNoCacheSelfTest extends GridCommonAbstractTest { /** */ public static final String EXPECTED_MSG = "Failed to find cache"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridAlwaysFailoverSpiFailSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridAlwaysFailoverSpiFailSelfTest.java index e05741c7b28f8..c4cabfb769ec8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridAlwaysFailoverSpiFailSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridAlwaysFailoverSpiFailSelfTest.java @@ -36,11 +36,15 @@ import org.apache.ignite.spi.failover.always.AlwaysFailoverSpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Always failover SPI test. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridAlwaysFailoverSpiFailSelfTest extends GridCommonAbstractTest { /** */ private boolean isFailoverCalled; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridCancelledJobsMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridCancelledJobsMetricsSelfTest.java index ef4aaf58e91a9..765b90cb084ca 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridCancelledJobsMetricsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridCancelledJobsMetricsSelfTest.java @@ -47,11 +47,15 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Cancelled jobs metrics self test. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridCancelledJobsMetricsSelfTest extends GridCommonAbstractTest { /** */ private static GridCancelCollisionSpi colSpi = new GridCancelCollisionSpi(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousTaskSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousTaskSelfTest.java index f9e466d203cdf..cb1d4aefcebde 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousTaskSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousTaskSelfTest.java @@ -55,11 +55,15 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Continuous task test. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridContinuousTaskSelfTest extends GridCommonAbstractTest { /** */ private static final int JOB_COUNT = 10; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridJobCollisionCancelSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridJobCollisionCancelSelfTest.java index 1187da47168e4..58f240246c536 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridJobCollisionCancelSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridJobCollisionCancelSelfTest.java @@ -45,12 +45,16 @@ import org.apache.ignite.spi.collision.CollisionSpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Job collision cancel test. */ @SuppressWarnings( {"PublicInnerClass"}) @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridJobCollisionCancelSelfTest extends GridCommonAbstractTest { /** */ private static final Object mux = new Object(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/BinaryMetadataRegistrationInsideEntryProcessorTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/BinaryMetadataRegistrationInsideEntryProcessorTest.java index 76d000b95b79b..0c878c7d4602a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/BinaryMetadataRegistrationInsideEntryProcessorTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/BinaryMetadataRegistrationInsideEntryProcessorTest.java @@ -29,10 +29,14 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class BinaryMetadataRegistrationInsideEntryProcessorTest extends GridCommonAbstractTest { /** */ private static final String CACHE_NAME = "test-cache"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDataRegionConfigurationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDataRegionConfigurationTest.java index ad843b76bcb14..852fca470b174 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDataRegionConfigurationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDataRegionConfigurationTest.java @@ -29,10 +29,14 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class CacheDataRegionConfigurationTest extends GridCommonAbstractTest { /** */ private volatile CacheConfiguration ccfg; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDhtLocalPartitionAfterRemoveSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDhtLocalPartitionAfterRemoveSelfTest.java index 61f54c2e54fc0..3d380f096cd7b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDhtLocalPartitionAfterRemoveSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDhtLocalPartitionAfterRemoveSelfTest.java @@ -22,12 +22,16 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtLocalPartition; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; /** * Test for remove operation. */ +@RunWith(JUnit4.class) public class CacheDhtLocalPartitionAfterRemoveSelfTest extends GridCommonAbstractTest { /** Grid count. */ private static final int GRID_CNT = 3; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryPessimisticRepeatableReadSeltTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryPessimisticRepeatableReadSeltTest.java index a3732bb753eb5..94e49f9e57214 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryPessimisticRepeatableReadSeltTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryPessimisticRepeatableReadSeltTest.java @@ -19,10 +19,14 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test getEntry and getEntries methods. */ +@RunWith(JUnit4.class) public class CacheGetEntryPessimisticRepeatableReadSeltTest extends CacheGetEntryAbstractTest { /** {@inheritDoc} */ @Override protected TransactionConcurrency concurrency() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetFromJobTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetFromJobTest.java index 032a4e26d556b..05a7c58ef9b89 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetFromJobTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetFromJobTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.lang.IgniteCallable; import org.apache.ignite.resources.IgniteInstanceResource; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Job tries to get cache during topology change. */ +@RunWith(JUnit4.class) public class CacheGetFromJobTest extends GridCacheAbstractSelfTest { /** {@inheritDoc} */ @Override protected int gridCount() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNamesWithSpecialCharactersTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNamesWithSpecialCharactersTest.java index cea5cc284bb7d..1156441b699f0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNamesWithSpecialCharactersTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNamesWithSpecialCharactersTest.java @@ -24,10 +24,14 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import java.util.Collection; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test that validates {@link Ignite#cacheNames()} implementation. */ +@RunWith(JUnit4.class) public class CacheNamesWithSpecialCharactersTest extends GridCommonAbstractTest { public static final String CACHE_NAME_1 = "--№=+:(replicated)"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheRebalanceConfigValidationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheRebalanceConfigValidationTest.java index d0086d2a65503..c3eee1b13d0da 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheRebalanceConfigValidationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheRebalanceConfigValidationTest.java @@ -21,10 +21,14 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class CacheRebalanceConfigValidationTest extends GridCommonAbstractTest { /** Rebalance pool size. */ private int rebalancePoolSize; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheTxFastFinishTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheTxFastFinishTest.java index 242e647821682..b4acba4309b9a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheTxFastFinishTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheTxFastFinishTest.java @@ -35,6 +35,9 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -48,6 +51,7 @@ /** * */ +@RunWith(JUnit4.class) public class CacheTxFastFinishTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/ClusterStateAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/ClusterStateAbstractTest.java index 9ffac019e088b..059c38cac4edd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/ClusterStateAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/ClusterStateAbstractTest.java @@ -42,10 +42,14 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public abstract class ClusterStateAbstractTest extends GridCommonAbstractTest { /** Entry count. */ public static final int ENTRY_CNT = 5000; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CrossCacheTxRandomOperationsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CrossCacheTxRandomOperationsTest.java index 5ee931b9b0dd9..289632c5434bc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CrossCacheTxRandomOperationsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CrossCacheTxRandomOperationsTest.java @@ -44,6 +44,9 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -58,6 +61,7 @@ /** * */ +@RunWith(JUnit4.class) public class CrossCacheTxRandomOperationsTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridAbstractCacheInterceptorRebalanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridAbstractCacheInterceptorRebalanceTest.java index 2666fbfb5598f..3bec8dd56fe28 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridAbstractCacheInterceptorRebalanceTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridAbstractCacheInterceptorRebalanceTest.java @@ -41,6 +41,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -50,6 +53,7 @@ /** * */ +@RunWith(JUnit4.class) public abstract class GridAbstractCacheInterceptorRebalanceTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMapSelfTest.java index f56d46bf906e6..123d73c90fa4e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMapSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMapSelfTest.java @@ -31,6 +31,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.LOCAL; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -38,6 +41,7 @@ /** * Grid cache concurrent hash map self test. */ +@RunWith(JUnit4.class) public class GridCacheConcurrentMapSelfTest extends GridCommonAbstractTest { /** Ip finder. */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDaemonNodeAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDaemonNodeAbstractSelfTest.java index 774e1859e9138..c35ce5ebbf215 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDaemonNodeAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDaemonNodeAbstractSelfTest.java @@ -33,6 +33,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; @@ -41,6 +44,7 @@ /** * Test cache operations with daemon node. */ +@RunWith(JUnit4.class) public abstract class GridCacheDaemonNodeAbstractSelfTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryMemorySizeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryMemorySizeSelfTest.java index 70913a05b0f32..2f3acbf200db3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryMemorySizeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryMemorySizeSelfTest.java @@ -39,6 +39,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.LOCAL; @@ -48,6 +51,7 @@ /** * */ +@RunWith(JUnit4.class) public class GridCacheEntryMemorySizeSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheIncrementTransformTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheIncrementTransformTest.java index e4fe7ee92c8eb..2abd4e074e095 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheIncrementTransformTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheIncrementTransformTest.java @@ -35,6 +35,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -44,6 +47,7 @@ /** * Tests cache in-place modification logic with iterative value increment. */ +@RunWith(JUnit4.class) public class GridCacheIncrementTransformTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLifecycleAwareSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLifecycleAwareSelfTest.java index 51289f8ed5c9b..c57adc5c0e609 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLifecycleAwareSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLifecycleAwareSelfTest.java @@ -49,12 +49,16 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.testframework.junits.common.GridAbstractLifecycleAwareSelfTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** * Test for {@link LifecycleAware} support in {@link CacheConfiguration}. */ +@RunWith(JUnit4.class) public class GridCacheLifecycleAwareSelfTest extends GridAbstractLifecycleAwareSelfTest { /** */ private static final String CACHE_NAME = "cache"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMarshallerTxAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMarshallerTxAbstractTest.java index a8cce7db787c0..c1ee82b1926a1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMarshallerTxAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMarshallerTxAbstractTest.java @@ -28,6 +28,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ; @@ -35,6 +38,7 @@ /** * Test transaction with wrong marshalling. */ +@RunWith(JUnit4.class) public abstract class GridCacheMarshallerTxAbstractTest extends GridCommonAbstractTest { /** * Wrong Externalizable class. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMarshallingNodeJoinSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMarshallingNodeJoinSelfTest.java index ac7591267a048..b82393805000c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMarshallingNodeJoinSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMarshallingNodeJoinSelfTest.java @@ -41,12 +41,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ; /** */ +@RunWith(JUnit4.class) public class GridCacheMarshallingNodeJoinSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMissingCommitVersionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMissingCommitVersionSelfTest.java index 949384cc80146..a9f6d392e5af5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMissingCommitVersionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMissingCommitVersionSelfTest.java @@ -29,6 +29,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_MAX_COMPLETED_TX_COUNT; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -38,6 +41,7 @@ /** * */ +@RunWith(JUnit4.class) public class GridCacheMissingCommitVersionSelfTest extends GridCommonAbstractTest { /** */ private volatile boolean putFailed; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManagerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManagerSelfTest.java index b26acaaa54430..b6d39c85e8972 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManagerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManagerSelfTest.java @@ -29,6 +29,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.LOCAL; @@ -38,6 +41,7 @@ /** * Tests for {@link GridCacheMvccManager}. */ +@RunWith(JUnit4.class) public class GridCacheMvccManagerSelfTest extends GridCommonAbstractTest { /** VM ip finder for TCP discovery. */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedWritesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedWritesTest.java index b5c13f32ef4a0..ef98c48c776af 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedWritesTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedWritesTest.java @@ -30,6 +30,9 @@ import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -39,6 +42,7 @@ * wrapped only in near cache (see {@link GridCacheProcessor} init logic). */ @SuppressWarnings({"unchecked"}) +@RunWith(JUnit4.class) public class GridCachePartitionedWritesTest extends GridCommonAbstractTest { /** Cache store. */ private CacheStore store; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java index 6b0558708c425..38550f798ba98 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java @@ -44,6 +44,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -54,6 +57,7 @@ /** * */ +@RunWith(JUnit4.class) public class GridCachePreloadingEvictionsSelfTest extends GridCommonAbstractTest { /** */ private static final String VALUE = createValue(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQuerySqlFieldInlineSizeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQuerySqlFieldInlineSizeSelfTest.java index b7d30b2424f58..11ceef6c75247 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQuerySqlFieldInlineSizeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQuerySqlFieldInlineSizeSelfTest.java @@ -26,11 +26,15 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests cache configuration with inlineSize property of the QuerySqlField annotation. */ @SuppressWarnings({"unchecked", "unused"}) +@RunWith(JUnit4.class) public class GridCacheQuerySqlFieldInlineSizeSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStopSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStopSelfTest.java index 22acac0af1d62..17570414fb045 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStopSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStopSelfTest.java @@ -39,6 +39,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -51,6 +54,7 @@ /** * Tests correct cache stopping. */ +@RunWith(JUnit4.class) public class GridCacheStopSelfTest extends GridCommonAbstractTest { /** */ private static final String EXPECTED_MSG = "Cache has been closed or destroyed"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java index dd32fda31ea34..30357a1d38e55 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java @@ -88,6 +88,9 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; @@ -114,6 +117,7 @@ * Full API cache test. */ @SuppressWarnings({"unchecked"}) +@RunWith(JUnit4.class) public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVariationsAbstractTest { /** Test timeout */ private static final long TEST_TIMEOUT = 60 * 1000; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDynamicStopSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDynamicStopSelfTest.java index 8816641c42bff..1a0c575095db7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDynamicStopSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDynamicStopSelfTest.java @@ -29,10 +29,14 @@ import org.apache.ignite.lang.IgniteFuture; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteCacheDynamicStopSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryProcessorNodeJoinTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryProcessorNodeJoinTest.java index 26be4cd9b8fc4..b8410130df9a5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryProcessorNodeJoinTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryProcessorNodeJoinTest.java @@ -46,6 +46,9 @@ import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -56,6 +59,7 @@ /** * Tests cache in-place modification logic with iterative value increment. */ +@RunWith(JUnit4.class) public class IgniteCacheEntryProcessorNodeJoinTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePutAllRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePutAllRestartTest.java index 0f01a64020412..037bae0a1dc50 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePutAllRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePutAllRestartTest.java @@ -37,6 +37,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -44,6 +47,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCachePutAllRestartTest extends GridCommonAbstractTest { /** Cache name. */ private static final String CACHE_NAME = "partitioned"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughStoreCallTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughStoreCallTest.java index fa73e6aa74252..7d9b0e898f186 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughStoreCallTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughStoreCallTest.java @@ -44,6 +44,9 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -54,6 +57,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheReadThroughStoreCallTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueJoinedNodeSelfAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueJoinedNodeSelfAbstractTest.java index 7fe7d8ca589e1..c5cbec717cf16 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueJoinedNodeSelfAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueJoinedNodeSelfAbstractTest.java @@ -36,11 +36,15 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test that joining node is able to take items from queue. * See GG-2311 for more information. */ +@RunWith(JUnit4.class) public abstract class GridCacheQueueJoinedNodeSelfAbstractTest extends IgniteCollectionAbstractTest { /** */ protected static final int GRID_CNT = 3; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSetFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSetFailoverSelfTest.java index fa7e264f63a1f..f591b2288f7c5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSetFailoverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSetFailoverSelfTest.java @@ -19,12 +19,16 @@ import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.internal.processors.cache.datastructures.GridCacheSetFailoverAbstractSelfTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; /** * Set failover tests. */ +@RunWith(JUnit4.class) public class GridCachePartitionedAtomicSetFailoverSelfTest extends GridCacheSetFailoverAbstractSelfTest { /** {@inheritDoc} */ @Override protected CacheAtomicityMode collectionCacheAtomicityMode() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheParallelStartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheParallelStartTest.java index d53e3e62a24f0..7c84ede6972e2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheParallelStartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheParallelStartTest.java @@ -33,10 +33,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test covers parallel start and stop of caches. */ +@RunWith(JUnit4.class) public class CacheParallelStartTest extends GridCommonAbstractTest { /** */ private static final int CACHES_COUNT = 500; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheResultIsNotNullOnPartitionLossTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheResultIsNotNullOnPartitionLossTest.java index 5907171f8ba03..9aaa375d44d98 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheResultIsNotNullOnPartitionLossTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheResultIsNotNullOnPartitionLossTest.java @@ -45,10 +45,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class CacheResultIsNotNullOnPartitionLossTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryVmIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractJobExecutionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractJobExecutionTest.java index 4c0507d17f390..0d982163c4831 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractJobExecutionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractJobExecutionTest.java @@ -36,6 +36,9 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ; @@ -44,6 +47,7 @@ /** * Tests cache access from within jobs. */ +@RunWith(JUnit4.class) public abstract class GridCacheAbstractJobExecutionTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheBasicOpAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheBasicOpAbstractTest.java index a825e1b516628..ef12607298d19 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheBasicOpAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheBasicOpAbstractTest.java @@ -35,6 +35,9 @@ import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.SECONDS; @@ -46,6 +49,7 @@ /** * Simple cache test. */ +@RunWith(JUnit4.class) public abstract class GridCacheBasicOpAbstractTest extends GridCommonAbstractTest { /** Grid 1. */ private static Ignite ignite1; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeAbstractTest.java index ea234fa4261ec..1a9d9413913e8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeAbstractTest.java @@ -37,6 +37,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.SECONDS; @@ -48,6 +51,7 @@ /** * Multi-node cache test. */ +@RunWith(JUnit4.class) public abstract class GridCacheMultiNodeAbstractTest extends GridCommonAbstractTest { /** Grid 1. */ private static Ignite ignite1; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultithreadedFailoverAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultithreadedFailoverAbstractTest.java index 8b177bd10d200..8d5c875ebb42b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultithreadedFailoverAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultithreadedFailoverAbstractTest.java @@ -61,6 +61,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -71,6 +74,7 @@ /** * Base test for all multithreaded cache scenarios w/ and w/o failover. */ +@RunWith(JUnit4.class) public class GridCacheMultithreadedFailoverAbstractTest extends GridCommonAbstractTest { /** Node name prefix. */ private static final String NODE_PREFIX = "node"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteBinaryMetadataUpdateNodeRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteBinaryMetadataUpdateNodeRestartTest.java index 8822e3cd6d926..197dc6a22aebf 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteBinaryMetadataUpdateNodeRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteBinaryMetadataUpdateNodeRestartTest.java @@ -41,6 +41,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -50,6 +53,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteBinaryMetadataUpdateNodeRestartTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheGetRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheGetRestartTest.java index ab9b74c420d9e..18039dc8f7033 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheGetRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheGetRestartTest.java @@ -40,6 +40,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -49,6 +52,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheGetRestartTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSingleGetMessageTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSingleGetMessageTest.java index 359fb16a5f2ac..bd850d4a197d0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSingleGetMessageTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSingleGetMessageTest.java @@ -34,6 +34,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -46,6 +49,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheSingleGetMessageTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheThreadLocalTxTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheThreadLocalTxTest.java index 2b624dc36994b..5cfae118582a1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheThreadLocalTxTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheThreadLocalTxTest.java @@ -34,12 +34,16 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; /** * */ +@RunWith(JUnit4.class) public class IgniteCacheThreadLocalTxTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxIteratorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxIteratorSelfTest.java index adf884b1ad308..8c58309de946c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxIteratorSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxIteratorSelfTest.java @@ -36,10 +36,14 @@ import org.apache.ignite.transactions.TransactionIsolation; import javax.cache.Cache; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteCacheTxIteratorSelfTest extends GridCommonAbstractTest { /** */ public static final String CACHE_NAME = "testCache"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAbstractTransformWriteThroughSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAbstractTransformWriteThroughSelfTest.java index 58f6bc5fb3e99..2ba5073ee5424 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAbstractTransformWriteThroughSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAbstractTransformWriteThroughSelfTest.java @@ -35,6 +35,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -45,6 +48,7 @@ /** * Tests write-through. */ +@RunWith(JUnit4.class) public abstract class GridCacheAbstractTransformWriteThroughSelfTest extends GridCommonAbstractTest { /** Grid count. */ protected static final int GRID_CNT = 3; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionsDisabledSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionsDisabledSelfTest.java index f726a66004c57..fffbe53c5d280 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionsDisabledSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionsDisabledSelfTest.java @@ -25,6 +25,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -33,6 +36,7 @@ /** * Test cache closure execution. */ +@RunWith(JUnit4.class) public class GridCacheDhtEvictionsDisabledSelfTest extends GridCommonAbstractTest { /** */ private TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadDelayedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadDelayedSelfTest.java index 545e2b01f8807..adf3052d2033c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadDelayedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadDelayedSelfTest.java @@ -50,6 +50,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -60,6 +63,7 @@ /** * Test cases for partitioned cache {@link GridDhtPreloader preloader}. */ +@RunWith(JUnit4.class) public class GridCacheDhtPreloadDelayedSelfTest extends GridCommonAbstractTest { /** Key count. */ private static final int KEY_CNT = 100; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadDisabledSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadDisabledSelfTest.java index 0bcceb54401e7..98afe7052eea6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadDisabledSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadDisabledSelfTest.java @@ -42,6 +42,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -52,6 +55,7 @@ /** * Test cases for partitioned cache {@link GridDhtPreloader preloader}. */ +@RunWith(JUnit4.class) public class GridCacheDhtPreloadDisabledSelfTest extends GridCommonAbstractTest { /** Flat to print preloading events. */ private static final boolean DEBUG = false; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadMessageCountTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadMessageCountTest.java index 1a91ad936eaa5..8afd359ba23f9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadMessageCountTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadMessageCountTest.java @@ -32,6 +32,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -39,6 +42,7 @@ /** * Test cases for partitioned cache {@link GridDhtPreloader preloader}. */ +@RunWith(JUnit4.class) public class GridCacheDhtPreloadMessageCountTest extends GridCommonAbstractTest { /** Key count. */ private static final int KEY_CNT = 1000; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadUnloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadUnloadSelfTest.java index ce65ab4ad83cd..43d820113c241 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadUnloadSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadUnloadSelfTest.java @@ -32,6 +32,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -44,6 +47,7 @@ * Test large cache counts. */ @SuppressWarnings({"BusyWait"}) +@RunWith(JUnit4.class) public class GridCacheDhtPreloadUnloadSelfTest extends GridCommonAbstractTest { /** Default backups. */ private static final int DFLT_BACKUPS = 1; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledMetricsSelfTest.java index 60f5485f3ab66..2abfe79b97977 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledMetricsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledMetricsSelfTest.java @@ -23,6 +23,9 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.processors.cache.GridCacheAbstractSelfTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; @@ -31,6 +34,7 @@ /** * Metrics test for partitioned cache with disabled near cache. */ +@RunWith(JUnit4.class) public class GridCachePartitionedNearDisabledMetricsSelfTest extends GridCacheAbstractSelfTest { /** */ private static final int GRID_CNT = 2; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionsStateValidationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionsStateValidationTest.java index eb4c17a1af514..59fb1336bef5c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionsStateValidationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionsStateValidationTest.java @@ -55,10 +55,14 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class GridCachePartitionsStateValidationTest extends GridCommonAbstractTest { /** Cache name. */ private static final String CACHE_NAME = "cache"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheConcurrentPutGetRemove.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheConcurrentPutGetRemove.java index ace30645d7f9d..d0611699463c8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheConcurrentPutGetRemove.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheConcurrentPutGetRemove.java @@ -33,6 +33,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -41,6 +44,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheConcurrentPutGetRemove extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheMultiTxLockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheMultiTxLockSelfTest.java index 988916289ff1b..c4678b674d5b0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheMultiTxLockSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheMultiTxLockSelfTest.java @@ -34,6 +34,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -42,6 +45,7 @@ /** * Tests explicit lock. */ +@RunWith(JUnit4.class) public class IgniteCacheMultiTxLockSelfTest extends GridCommonAbstractTest { /** */ public static final String CACHE_NAME = "part_cache"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicPreloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicPreloadSelfTest.java index d47dfe7570e53..da7ce8f034d60 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicPreloadSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicPreloadSelfTest.java @@ -35,6 +35,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC; @@ -44,6 +47,7 @@ /** * Simple test for preloading in ATOMIC cache. */ +@RunWith(JUnit4.class) public class GridCacheAtomicPreloadSelfTest extends GridCommonAbstractTest { /** */ private boolean nearEnabled; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheGetStoreErrorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheGetStoreErrorSelfTest.java index 72ce55664af9c..2363411ac9147 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheGetStoreErrorSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheGetStoreErrorSelfTest.java @@ -33,6 +33,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.LOCAL; @@ -45,6 +48,7 @@ /** * Checks that exception is propagated to user when cache store throws an exception. */ +@RunWith(JUnit4.class) public class GridCacheGetStoreErrorSelfTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearAtomicMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearAtomicMetricsSelfTest.java index 59c36be635bc7..da8d8e20d40d9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearAtomicMetricsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearAtomicMetricsSelfTest.java @@ -22,10 +22,14 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.processors.cache.GridCacheEntryEx; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Atomic cache metrics test. */ +@RunWith(JUnit4.class) public class GridCacheNearAtomicMetricsSelfTest extends GridCacheNearMetricsSelfTest { /** {@inheritDoc} */ @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOneNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOneNodeSelfTest.java index c110c76121c52..635f80dd819c5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOneNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOneNodeSelfTest.java @@ -34,6 +34,9 @@ import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -44,6 +47,7 @@ /** * Single node test for near cache. */ +@RunWith(JUnit4.class) public class GridCacheNearOneNodeSelfTest extends GridCommonAbstractTest { /** Cache store. */ private static TestStore store = new TestStore(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedBasicOpSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedBasicOpSelfTest.java index 48f821859ade2..461e9273c202c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedBasicOpSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedBasicOpSelfTest.java @@ -22,6 +22,9 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.processors.cache.distributed.GridCacheBasicOpAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -29,6 +32,7 @@ /** * Simple cache test. */ +@RunWith(JUnit4.class) public class GridCachePartitionedBasicOpSelfTest extends GridCacheBasicOpAbstractTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeLockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeLockSelfTest.java index 34d28e1f60bc7..1f859b0733a45 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeLockSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeLockSelfTest.java @@ -21,6 +21,9 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.internal.processors.cache.distributed.GridCacheMultiNodeLockAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -28,6 +31,7 @@ /** * Test cases for multi-threaded tests. */ +@RunWith(JUnit4.class) public class GridCachePartitionedMultiNodeLockSelfTest extends GridCacheMultiNodeLockAbstractTest { /** {@inheritDoc} */ @Override protected CacheConfiguration cacheConfiguration() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedLockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedLockSelfTest.java index dd8b52dc032fe..8d2c6ef7fce6b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedLockSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedLockSelfTest.java @@ -19,12 +19,16 @@ import org.apache.ignite.cache.CacheMode; import org.apache.ignite.internal.processors.cache.distributed.GridCacheLockAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.REPLICATED; /** * Test cases for multi-threaded tests. */ +@RunWith(JUnit4.class) public class GridCacheReplicatedLockSelfTest extends GridCacheLockAbstractTest { /** {@inheritDoc} */ @Override protected CacheMode cacheMode() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/EvictionPolicyFactoryAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/EvictionPolicyFactoryAbstractTest.java index f111ac5715267..47a69103d2d0a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/EvictionPolicyFactoryAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/EvictionPolicyFactoryAbstractTest.java @@ -47,6 +47,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.LOCAL; @@ -64,6 +67,7 @@ /** * Base class for eviction tests. */ +@RunWith(JUnit4.class) public abstract class EvictionPolicyFactoryAbstractTest> extends GridCommonAbstractTest { /** IP finder. */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearOnlyNearEvictionPolicySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearOnlyNearEvictionPolicySelfTest.java index 04f15703963e0..3fe51d9d19960 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearOnlyNearEvictionPolicySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearOnlyNearEvictionPolicySelfTest.java @@ -29,6 +29,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -40,6 +43,7 @@ /** * LRU near eviction tests for NEAR_ONLY distribution mode (GG-8884). */ +@RunWith(JUnit4.class) public class LruNearOnlyNearEvictionPolicySelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheStoreNodeRestartAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheStoreNodeRestartAbstractTest.java index 4334c44eba9db..25c20da4afb08 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheStoreNodeRestartAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheStoreNodeRestartAbstractTest.java @@ -22,10 +22,14 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.processors.cache.IgniteCacheAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public abstract class IgniteCacheStoreNodeRestartAbstractTest extends IgniteCacheAbstractTest { /** */ protected static final String CACHE_NAME1 = "cache1"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/checkpoint/IgniteMassLoadSandboxTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/checkpoint/IgniteMassLoadSandboxTest.java index 90e0781295b48..43948912c5199 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/checkpoint/IgniteMassLoadSandboxTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/checkpoint/IgniteMassLoadSandboxTest.java @@ -57,6 +57,9 @@ import org.apache.ignite.testframework.GridStringLogger; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager.DFLT_STORE_DIR; @@ -64,6 +67,7 @@ * Sandbox test to measure progress of grid write operations. If no progress occur during period of time, then thread * dumps are generated. */ +@RunWith(JUnit4.class) public class IgniteMassLoadSandboxTest extends GridCommonAbstractTest { /** Cache name. Random to cover external stores possible problems. */ public static final String CACHE_NAME = "partitioned" + new Random().nextInt(10000000); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/DefaultPageSizeBackwardsCompatibilityTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/DefaultPageSizeBackwardsCompatibilityTest.java index 543e4016dab90..fde76deb923cf 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/DefaultPageSizeBackwardsCompatibilityTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/DefaultPageSizeBackwardsCompatibilityTest.java @@ -29,10 +29,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class DefaultPageSizeBackwardsCompatibilityTest extends GridCommonAbstractTest { /** Ip finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCheckpointSimulationWithRealCpDisabledTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCheckpointSimulationWithRealCpDisabledTest.java index 3019df9726cae..919a58e372f02 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCheckpointSimulationWithRealCpDisabledTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCheckpointSimulationWithRealCpDisabledTest.java @@ -80,11 +80,15 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test simulated chekpoints, * Disables integrated check pointer thread */ +@RunWith(JUnit4.class) public class IgnitePdsCheckpointSimulationWithRealCpDisabledTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalCompactionAfterRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalCompactionAfterRestartTest.java index 1a11a45c8578e..ac7960088c987 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalCompactionAfterRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalCompactionAfterRestartTest.java @@ -43,10 +43,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_WAL_SEGMENT_COMPACTED; /** */ +@RunWith(JUnit4.class) public class WalCompactionAfterRestartTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/ContinuousQueryMarshallerTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/ContinuousQueryMarshallerTest.java index d54872afbc523..4da0074d42cf5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/ContinuousQueryMarshallerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/ContinuousQueryMarshallerTest.java @@ -40,10 +40,14 @@ import org.apache.ignite.custom.DummyEventFilterFactory; import org.apache.ignite.lang.IgniteBiPredicate; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Checks that Optimized Marshaller is not used on any stage of Continuous Query handling. */ +@RunWith(JUnit4.class) public class ContinuousQueryMarshallerTest extends GridCommonAbstractTest { /** */ public static final String CACHE_NAME = "test-cache"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/ContinuousQueryReassignmentTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/ContinuousQueryReassignmentTest.java index 67607256f262d..9722b830f2148 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/ContinuousQueryReassignmentTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/ContinuousQueryReassignmentTest.java @@ -30,12 +30,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.testframework.GridTestUtils.waitForCondition; /** * */ +@RunWith(JUnit4.class) public class ContinuousQueryReassignmentTest extends GridCommonAbstractTest { /** Ip finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/jdbc/TcpDiscoveryJdbcIpFinderSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/jdbc/TcpDiscoveryJdbcIpFinderSelfTest.java index 09df105d40ec7..9d4e4d347bcfc 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/jdbc/TcpDiscoveryJdbcIpFinderSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/jdbc/TcpDiscoveryJdbcIpFinderSelfTest.java @@ -20,10 +20,14 @@ import com.mchange.v2.c3p0.ComboPooledDataSource; import org.apache.ignite.spi.IgniteSpiException; import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinderAbstractSelfTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * JDBC IP finder self test. */ +@RunWith(JUnit4.class) public class TcpDiscoveryJdbcIpFinderSelfTest extends TcpDiscoveryIpFinderAbstractSelfTest { /** */ diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/multicast/TcpDiscoveryMulticastIpFinderSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/multicast/TcpDiscoveryMulticastIpFinderSelfTest.java index 4180579f4212c..a7a2f888fda5d 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/multicast/TcpDiscoveryMulticastIpFinderSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/multicast/TcpDiscoveryMulticastIpFinderSelfTest.java @@ -22,10 +22,14 @@ import java.util.Collections; import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinderAbstractSelfTest; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * GridTcpDiscoveryMulticastIpFinder test. */ +@RunWith(JUnit4.class) public class TcpDiscoveryMulticastIpFinderSelfTest extends TcpDiscoveryIpFinderAbstractSelfTest { /** diff --git a/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/adaptive/GridAdaptiveLoadBalancingSpiConfigSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/adaptive/GridAdaptiveLoadBalancingSpiConfigSelfTest.java index 3f6b57efa8f38..9eb96ad65203a 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/adaptive/GridAdaptiveLoadBalancingSpiConfigSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/adaptive/GridAdaptiveLoadBalancingSpiConfigSelfTest.java @@ -19,11 +19,15 @@ import org.apache.ignite.testframework.junits.spi.GridSpiAbstractConfigTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @GridSpiTest(spi = AdaptiveLoadBalancingSpi.class, group = "LoadBalancing SPI") +@RunWith(JUnit4.class) public class GridAdaptiveLoadBalancingSpiConfigSelfTest extends GridSpiAbstractConfigTest { /** diff --git a/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/roundrobin/GridRoundRobinLoadBalancingSpiTopologyChangeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/roundrobin/GridRoundRobinLoadBalancingSpiTopologyChangeSelfTest.java index b0ecef55bcc32..b8a87a79148d7 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/roundrobin/GridRoundRobinLoadBalancingSpiTopologyChangeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/roundrobin/GridRoundRobinLoadBalancingSpiTopologyChangeSelfTest.java @@ -29,6 +29,9 @@ import org.apache.ignite.testframework.junits.spi.GridSpiAbstractTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; import org.apache.ignite.testframework.junits.spi.GridSpiTestConfig; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.spi.loadbalancing.roundrobin.GridRoundRobinTestUtils.checkCyclicBalancing; @@ -36,6 +39,7 @@ * Tests round robin load balancing with topology changes. */ @GridSpiTest(spi = RoundRobinLoadBalancingSpi.class, group = "Load Balancing SPI") +@RunWith(JUnit4.class) public class GridRoundRobinLoadBalancingSpiTopologyChangeSelfTest extends GridSpiAbstractTest { /** diff --git a/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/weightedrandom/GridWeightedRandomLoadBalancingSpiConfigSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/weightedrandom/GridWeightedRandomLoadBalancingSpiConfigSelfTest.java index 61ef23961834d..36e1e5a442d81 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/weightedrandom/GridWeightedRandomLoadBalancingSpiConfigSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/weightedrandom/GridWeightedRandomLoadBalancingSpiConfigSelfTest.java @@ -19,11 +19,15 @@ import org.apache.ignite.testframework.junits.spi.GridSpiAbstractConfigTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @GridSpiTest(spi = WeightedRandomLoadBalancingSpi.class, group = "Load Balancing SPI") +@RunWith(JUnit4.class) public class GridWeightedRandomLoadBalancingSpiConfigSelfTest extends GridSpiAbstractConfigTest { /** From 07dd093e08162ef79d3b34bd9309836127e8cf6d Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Tue, 4 Dec 2018 01:08:37 +0300 Subject: [PATCH 037/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview --- .../org/apache/ignite/internal/GridAffinityP2PSelfTest.java | 4 ++++ .../GridCachePartitionExchangeManagerHistSizeTest.java | 4 ++++ .../ignite/internal/GridContinuousJobAnnotationSelfTest.java | 4 ++++ .../internal/GridEventStorageCheckAllEventsSelfTest.java | 4 ++++ .../org/apache/ignite/internal/GridGetOrStartSelfTest.java | 4 ++++ .../processors/cache/GridCacheAffinityRoutingSelfTest.java | 4 ++++ .../processors/cache/GridCacheFinishPartitionsSelfTest.java | 4 ++++ .../internal/processors/cache/GridCacheMvccFlagsTest.java | 4 ++++ .../cache/GridProjectionForCachesOnDaemonNodeSelfTest.java | 4 ++++ .../cache/IgniteCacheAbstractStopBusySelfTest.java | 4 ++++ .../cache/IgniteCachePutStackOverflowSelfTest.java | 4 ++++ .../CacheLateAffinityAssignmentNodeJoinValidationTest.java | 4 ++++ .../cache/distributed/CacheLockReleaseNodeLeaveTest.java | 4 ++++ .../cache/distributed/CacheRentingStateRepairTest.java | 4 ++++ .../cache/distributed/CacheTryLockMultithreadedTest.java | 4 ++++ .../GridCachePartitionNotLoadedEventSelfTest.java | 4 ++++ .../distributed/IgniteCacheFailedUpdateResponseTest.java | 4 ++++ .../distributed/dht/GridCacheDhtPreloadBigDataSelfTest.java | 4 ++++ .../dht/GridCacheDhtPreloadMultiThreadedSelfTest.java | 4 ++++ .../cache/distributed/dht/GridCacheDhtPreloadSelfTest.java | 4 ++++ .../dht/GridCachePartitionsStateValidatorSelfTest.java | 4 ++++ .../distributed/dht/IgniteCachePutRetryAtomicSelfTest.java | 5 ++++- .../GridCachePartitionedBasicStoreMultiNodeSelfTest.java | 4 ++++ .../near/GridCachePartitionedFilteredPutSelfTest.java | 4 ++++ .../near/GridCachePartitionedStorePutSelfTest.java | 4 ++++ .../near/GridCachePartitionedTxSalvageSelfTest.java | 4 ++++ .../baseline/IgniteAbsentEvictionNodeOutOfBaselineTest.java | 4 ++++ .../GridRoundRobinLoadBalancingSpiMultipleNodesSelfTest.java | 4 ++++ .../GridRoundRobinLoadBalancingSpiNotPerTaskSelfTest.java | 4 ++++ 29 files changed, 116 insertions(+), 1 deletion(-) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityP2PSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityP2PSelfTest.java index 712c04b046c82..8d3791bc3e0fd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityP2PSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityP2PSelfTest.java @@ -37,12 +37,16 @@ import org.apache.ignite.testframework.GridTestExternalClassLoader; import org.apache.ignite.testframework.config.GridTestProperties; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** * Tests affinity and affinity mapper P2P loading. */ +@RunWith(JUnit4.class) public class GridAffinityP2PSelfTest extends GridCommonAbstractTest { /** VM ip finder for TCP discovery. */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridCachePartitionExchangeManagerHistSizeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridCachePartitionExchangeManagerHistSizeTest.java index 9185fc5d5368d..a104e2343ec5f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridCachePartitionExchangeManagerHistSizeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridCachePartitionExchangeManagerHistSizeTest.java @@ -23,12 +23,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_EXCHANGE_HISTORY_SIZE; /** * Test exchange history size parameter effect. */ +@RunWith(JUnit4.class) public class GridCachePartitionExchangeManagerHistSizeTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousJobAnnotationSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousJobAnnotationSelfTest.java index 234c49d4ac799..55040062ebfdf 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousJobAnnotationSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousJobAnnotationSelfTest.java @@ -40,11 +40,15 @@ import org.apache.ignite.resources.TaskContinuousMapperResource; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for various job callback annotations. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridContinuousJobAnnotationSelfTest extends GridCommonAbstractTest { /** */ private static final AtomicBoolean fail = new AtomicBoolean(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageCheckAllEventsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageCheckAllEventsSelfTest.java index abcfd5ad7c5d0..53a9daa7a3091 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageCheckAllEventsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageCheckAllEventsSelfTest.java @@ -53,6 +53,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.compute.ComputeJobResultPolicy.FAILOVER; import static org.apache.ignite.compute.ComputeJobResultPolicy.WAIT; @@ -80,6 +83,7 @@ * Test event storage. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridEventStorageCheckAllEventsSelfTest extends GridCommonAbstractTest { /** */ private static Ignite ignite; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridGetOrStartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridGetOrStartSelfTest.java index 49deaf852f203..402240e9991bc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridGetOrStartSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridGetOrStartSelfTest.java @@ -20,12 +20,16 @@ import org.apache.ignite.*; import org.apache.ignite.configuration.*; import org.apache.ignite.testframework.junits.common.*; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * The GirdGetOrStartSelfTest tests get or start semantics. See IGNITE-2941 */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridGetOrStartSelfTest extends GridCommonAbstractTest { /** * Default constructor. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityRoutingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityRoutingSelfTest.java index 27cb788b8329b..3f58221045c90 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityRoutingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityRoutingSelfTest.java @@ -38,6 +38,9 @@ import org.apache.ignite.spi.failover.always.AlwaysFailoverSpi; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -45,6 +48,7 @@ /** * Affinity routing tests. */ +@RunWith(JUnit4.class) public class GridCacheAffinityRoutingSelfTest extends GridCommonAbstractTest { /** */ private static final int GRID_CNT = 4; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFinishPartitionsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFinishPartitionsSelfTest.java index 857af440d7dec..2d70e544bf8be 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFinishPartitionsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFinishPartitionsSelfTest.java @@ -36,6 +36,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -45,6 +48,7 @@ /** * Abstract class for cache tests. */ +@RunWith(JUnit4.class) public class GridCacheFinishPartitionsSelfTest extends GridCacheAbstractSelfTest { /** */ private static final int GRID_CNT = 1; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccFlagsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccFlagsTest.java index 143f7329771e8..3b2800867671a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccFlagsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccFlagsTest.java @@ -23,12 +23,16 @@ import org.apache.ignite.internal.IgniteKernal; import org.apache.ignite.internal.processors.cache.version.GridCacheVersion; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.REPLICATED; /** * Tests flags correctness. */ +@RunWith(JUnit4.class) public class GridCacheMvccFlagsTest extends GridCommonAbstractTest { /** Grid. */ private IgniteKernal grid; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridProjectionForCachesOnDaemonNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridProjectionForCachesOnDaemonNodeSelfTest.java index d9faa7e6d74b5..759c35b49f75f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridProjectionForCachesOnDaemonNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridProjectionForCachesOnDaemonNodeSelfTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests of cache related cluster projections for daemon node. */ +@RunWith(JUnit4.class) public class GridProjectionForCachesOnDaemonNodeSelfTest extends GridCommonAbstractTest { /** Ip finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractStopBusySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractStopBusySelfTest.java index d3a02f8a7c880..1e7ff0bc99848 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractStopBusySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractStopBusySelfTest.java @@ -52,6 +52,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -59,6 +62,7 @@ /** * */ +@RunWith(JUnit4.class) public abstract class IgniteCacheAbstractStopBusySelfTest extends GridCommonAbstractTest { /** */ public static final int CLN_GRD = 0; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePutStackOverflowSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePutStackOverflowSelfTest.java index 7c09ee5e59949..f135f79847e14 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePutStackOverflowSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePutStackOverflowSelfTest.java @@ -28,6 +28,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; @@ -36,6 +39,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCachePutStackOverflowSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLateAffinityAssignmentNodeJoinValidationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLateAffinityAssignmentNodeJoinValidationTest.java index b72700641de25..30dfbc669e5ce 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLateAffinityAssignmentNodeJoinValidationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLateAffinityAssignmentNodeJoinValidationTest.java @@ -23,10 +23,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class CacheLateAffinityAssignmentNodeJoinValidationTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLockReleaseNodeLeaveTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLockReleaseNodeLeaveTest.java index 03a088fd16692..178bec7bd53e1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLockReleaseNodeLeaveTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLockReleaseNodeLeaveTest.java @@ -39,6 +39,9 @@ import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.SECONDS; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -49,6 +52,7 @@ /** * */ +@RunWith(JUnit4.class) public class CacheLockReleaseNodeLeaveTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheRentingStateRepairTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheRentingStateRepairTest.java index 49a6d7e2de704..2e1fe2be98df2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheRentingStateRepairTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheRentingStateRepairTest.java @@ -34,12 +34,16 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.testframework.GridTestUtils.waitForCondition; /** * */ +@RunWith(JUnit4.class) public class CacheRentingStateRepairTest extends GridCommonAbstractTest { /** */ public static final int PARTS = 1024; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheTryLockMultithreadedTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheTryLockMultithreadedTest.java index eea174bdf6f70..aa6bedde64ccc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheTryLockMultithreadedTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheTryLockMultithreadedTest.java @@ -29,6 +29,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -38,6 +41,7 @@ /** * */ +@RunWith(JUnit4.class) public class CacheTryLockMultithreadedTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionNotLoadedEventSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionNotLoadedEventSelfTest.java index caafc182bf6b0..9723857a01f54 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionNotLoadedEventSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionNotLoadedEventSelfTest.java @@ -43,6 +43,9 @@ import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.util.TestTcpCommunicationSpi; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -50,6 +53,7 @@ /** * */ +@RunWith(JUnit4.class) public class GridCachePartitionNotLoadedEventSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheFailedUpdateResponseTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheFailedUpdateResponseTest.java index 65e39209decc8..5c6dd016f348b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheFailedUpdateResponseTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheFailedUpdateResponseTest.java @@ -41,6 +41,9 @@ import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.testframework.GridTestUtils.assertThrows; @@ -53,6 +56,7 @@ /** * Checks that no future hangs on non-srializable exceptions and values. */ +@RunWith(JUnit4.class) public class IgniteCacheFailedUpdateResponseTest extends GridCommonAbstractTest { /** Atomic cache. */ private static final String ATOMIC_CACHE = "atomic"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadBigDataSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadBigDataSelfTest.java index 374c82038519b..ecd2909991bb4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadBigDataSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadBigDataSelfTest.java @@ -31,6 +31,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheRebalanceMode.ASYNC; @@ -42,6 +45,7 @@ /** * Test large cache counts. */ +@RunWith(JUnit4.class) public class GridCacheDhtPreloadBigDataSelfTest extends GridCommonAbstractTest { /** Size of values in KB. */ private static final int KBSIZE = 10 * 1024; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadMultiThreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadMultiThreadedSelfTest.java index 89ba060e5ee52..d301dc807c2c4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadMultiThreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadMultiThreadedSelfTest.java @@ -36,10 +36,14 @@ import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * MultiThreaded load test for DHT preloader. */ +@RunWith(JUnit4.class) public class GridCacheDhtPreloadMultiThreadedSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadSelfTest.java index 59b841aaf4407..91e05557c2d04 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadSelfTest.java @@ -47,6 +47,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheRebalanceMode.ASYNC; @@ -62,6 +65,7 @@ /** * Test cases for partitioned cache {@link GridDhtPreloader preloader}. */ +@RunWith(JUnit4.class) public class GridCacheDhtPreloadSelfTest extends GridCommonAbstractTest { /** Flag to print preloading events. */ private static final boolean DEBUG = false; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionsStateValidatorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionsStateValidatorSelfTest.java index 5a7ac0abb35be..9d21162f5cb34 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionsStateValidatorSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionsStateValidatorSelfTest.java @@ -33,12 +33,16 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.mockito.Matchers; import org.mockito.Mockito; /** * Test correct behaviour of {@link GridDhtPartitionsStateValidator} class. */ +@RunWith(JUnit4.class) public class GridCachePartitionsStateValidatorSelfTest extends GridCommonAbstractTest { /** Mocks and stubs. */ private final UUID localNodeId = UUID.randomUUID(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAtomicSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAtomicSelfTest.java index 366fe36a057bb..fc37e5f4dfb65 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAtomicSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAtomicSelfTest.java @@ -28,6 +28,8 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.transactions.Transaction; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -37,6 +39,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCachePutRetryAtomicSelfTest extends IgniteCachePutRetryAbstractSelfTest { /** {@inheritDoc} */ @Override protected CacheAtomicityMode atomicityMode() { @@ -46,7 +49,7 @@ public class IgniteCachePutRetryAtomicSelfTest extends IgniteCachePutRetryAbstra /** * @throws Exception If failed. */ - @Test + @org.junit.Test public void testPutInsideTransaction() throws Exception { ignite(0).createCache(cacheConfiguration(false, false)); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedBasicStoreMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedBasicStoreMultiNodeSelfTest.java index 810f06704b9ca..a3db33f1cc5e6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedBasicStoreMultiNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedBasicStoreMultiNodeSelfTest.java @@ -36,6 +36,9 @@ import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -46,6 +49,7 @@ /** * */ +@RunWith(JUnit4.class) public class GridCachePartitionedBasicStoreMultiNodeSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFilteredPutSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFilteredPutSelfTest.java index f69fbb3314e78..abf3683ac76b0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFilteredPutSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFilteredPutSelfTest.java @@ -30,6 +30,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -37,6 +40,7 @@ /** * Test filtered put. */ +@RunWith(JUnit4.class) public class GridCachePartitionedFilteredPutSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedStorePutSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedStorePutSelfTest.java index 879674c2a9727..0bf0a7dd38ec5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedStorePutSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedStorePutSelfTest.java @@ -29,6 +29,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -37,6 +40,7 @@ /** * Test that store is called correctly on puts. */ +@RunWith(JUnit4.class) public class GridCachePartitionedStorePutSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxSalvageSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxSalvageSelfTest.java index 8637fe5439a41..04cd9c709a652 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxSalvageSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxSalvageSelfTest.java @@ -36,6 +36,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_TX_SALVAGE_TIMEOUT; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -47,6 +50,7 @@ /** * Test tx salvage. */ +@RunWith(JUnit4.class) public class GridCachePartitionedTxSalvageSelfTest extends GridCommonAbstractTest { /** Grid count. */ private static final int GRID_CNT = 5; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteAbsentEvictionNodeOutOfBaselineTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteAbsentEvictionNodeOutOfBaselineTest.java index e04fea2d178c3..c84f754085e67 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteAbsentEvictionNodeOutOfBaselineTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteAbsentEvictionNodeOutOfBaselineTest.java @@ -27,10 +27,14 @@ import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtLocalPartition; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test absenting eviction for joined node if it is out of baseline. */ +@RunWith(JUnit4.class) public class IgniteAbsentEvictionNodeOutOfBaselineTest extends GridCommonAbstractTest { /** */ private static final String TEST_CACHE_NAME = "test"; diff --git a/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/roundrobin/GridRoundRobinLoadBalancingSpiMultipleNodesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/roundrobin/GridRoundRobinLoadBalancingSpiMultipleNodesSelfTest.java index ed0052da38a6b..fe18aec547786 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/roundrobin/GridRoundRobinLoadBalancingSpiMultipleNodesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/roundrobin/GridRoundRobinLoadBalancingSpiMultipleNodesSelfTest.java @@ -29,6 +29,9 @@ import org.apache.ignite.testframework.GridSpiTestContext; import org.apache.ignite.testframework.junits.spi.GridSpiAbstractTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_TASK_FAILED; import static org.apache.ignite.events.EventType.EVT_TASK_FINISHED; @@ -37,6 +40,7 @@ * Tests round robin load balancing SPI. */ @GridSpiTest(spi = RoundRobinLoadBalancingSpi.class, group = "Load Balancing SPI") +@RunWith(JUnit4.class) public class GridRoundRobinLoadBalancingSpiMultipleNodesSelfTest extends GridSpiAbstractTest { /** {@inheritDoc} */ diff --git a/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/roundrobin/GridRoundRobinLoadBalancingSpiNotPerTaskSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/roundrobin/GridRoundRobinLoadBalancingSpiNotPerTaskSelfTest.java index 52aea0cd16ef8..788536de00b08 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/roundrobin/GridRoundRobinLoadBalancingSpiNotPerTaskSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/roundrobin/GridRoundRobinLoadBalancingSpiNotPerTaskSelfTest.java @@ -33,6 +33,9 @@ import org.apache.ignite.testframework.junits.spi.GridSpiAbstractTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; import org.apache.ignite.testframework.junits.spi.GridSpiTestConfig; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_TASK_FAILED; import static org.apache.ignite.events.EventType.EVT_TASK_FINISHED; @@ -42,6 +45,7 @@ * Tests round robin load balancing. */ @GridSpiTest(spi = RoundRobinLoadBalancingSpi.class, group = "Load Balancing SPI") +@RunWith(JUnit4.class) public class GridRoundRobinLoadBalancingSpiNotPerTaskSelfTest extends GridSpiAbstractTest { /** From 916f1fbe643b1dd7ef03b9f05ad763548a2e3388 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Tue, 4 Dec 2018 01:31:17 +0300 Subject: [PATCH 038/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview --- .../apache/ignite/internal/GridCancelUnusedJobSelfTest.java | 4 ++++ .../ignite/internal/GridCollisionJobsContextSelfTest.java | 4 ++++ .../org/apache/ignite/internal/GridCommunicationSelfTest.java | 4 ++++ .../ignite/internal/GridContinuousJobSiblingsSelfTest.java | 4 ++++ .../ignite/internal/GridDeploymentMultiThreadedSelfTest.java | 4 ++++ .../org/apache/ignite/internal/GridDeploymentSelfTest.java | 4 ++++ .../GridEventStorageRuntimeConfigurationSelfTest.java | 4 ++++ .../ignite/internal/GridFailoverCustomTopologySelfTest.java | 4 ++++ .../org/apache/ignite/internal/GridJobContextSelfTest.java | 4 ++++ .../cache/AtomicCacheAffinityConfigurationTest.java | 4 ++++ .../internal/processors/cache/CacheAffinityCallSelfTest.java | 4 ++++ .../processors/cache/CacheDeferredDeleteQueueTest.java | 4 ++++ .../cache/CacheGroupLocalConfigurationSelfTest.java | 4 ++++ .../CacheInterceptorPartitionCounterLocalSanityTest.java | 4 ++++ .../processors/cache/CacheMetricsEntitiesCountTest.java | 4 ++++ .../processors/cache/CacheMetricsForClusterGroupSelfTest.java | 4 ++++ .../internal/processors/cache/CacheMetricsManageTest.java | 4 ++++ .../ignite/internal/processors/cache/CacheNamesSelfTest.java | 4 ++++ .../processors/cache/CacheOffheapMapEntrySelfTest.java | 4 ++++ .../processors/cache/CachePutEventListenerErrorSelfTest.java | 4 ++++ .../internal/processors/cache/CachePutIfAbsentTest.java | 4 ++++ .../processors/cache/CacheStartupInDeploymentModesTest.java | 4 ++++ .../processors/cache/GridCacheAffinityApiSelfTest.java | 4 ++++ .../cache/GridCacheConcurrentTxMultiNodeLoadTest.java | 4 ++++ .../cache/GridCacheConfigurationConsistencySelfTest.java | 4 ++++ .../processors/cache/GridCacheEntryVersionSelfTest.java | 4 ++++ .../cache/GridCacheFullTextQueryMultithreadedSelfTest.java | 4 ++++ .../processors/cache/GridCacheIteratorPerformanceTest.java | 4 ++++ .../processors/cache/GridCacheMultiUpdateLockSelfTest.java | 4 ++++ .../processors/cache/GridCacheMvccPartitionedSelfTest.java | 4 ++++ .../internal/processors/cache/GridCacheMvccSelfTest.java | 4 ++++ .../processors/cache/GridCacheObjectToStringSelfTest.java | 4 ++++ .../processors/cache/GridCacheQueryInternalKeysSelfTest.java | 4 ++++ .../processors/cache/GridCacheReferenceCleanupSelfTest.java | 4 ++++ .../processors/cache/GridCacheStoreValueBytesSelfTest.java | 4 ++++ .../processors/cache/GridCacheVersionMultinodeTest.java | 4 ++++ .../processors/cache/GridLocalIgniteSerializationTest.java | 4 ++++ .../cache/IgniteCacheBinaryObjectsScanSelfTest.java | 4 ++++ .../processors/cache/IgniteCacheCreateRestartSelfTest.java | 4 ++++ .../cache/IgniteCacheEntryListenerExpiredEventsTest.java | 4 ++++ .../cache/IgniteCacheGetCustomCollectionsSelfTest.java | 4 ++++ .../processors/cache/IgniteCacheManyAsyncOperationsTest.java | 4 ++++ .../cache/IgniteCacheP2pUnmarshallingNearErrorTest.java | 4 ++++ .../processors/cache/IgniteCachePartitionMapUpdateTest.java | 4 ++++ .../processors/cache/IgniteCacheStoreCollectionTest.java | 4 ++++ .../cache/IgniteCacheTransactionalStopBusySelfTest.java | 4 ++++ .../cache/binary/BinaryMetadataUpdatesFlowTest.java | 4 ++++ ...GridCacheAbstractQueueFailoverDataConsistencySelfTest.java | 4 ++++ .../IgniteClientDataStructuresAbstractTest.java | 4 ++++ .../GridCachePartitionedAtomicSequenceTxSelfTest.java | 4 ++++ .../GridCachePartitionedNodeRestartTxSelfTest.java | 4 ++++ .../cache/distributed/CacheDataLossOnPartitionMoveTest.java | 4 ++++ .../GridCacheEntrySetIterationPreloadingSelfTest.java | 4 ++++ .../GridCachePartitionEvictionDuringReadThroughSelfTest.java | 4 ++++ .../distributed/GridCachePreloadEventsAbstractSelfTest.java | 4 ++++ .../IgniteBinaryMetadataUpdateChangingTopologySelfTest.java | 4 ++++ .../cache/distributed/IgniteCacheManyClientsTest.java | 4 ++++ .../IgniteCacheMessageRecoveryIdleConnectionTest.java | 4 ++++ .../distributed/IgniteCacheNearRestartRollbackSelfTest.java | 4 ++++ .../distributed/IgniteCachePartitionLossPolicySelfTest.java | 4 ++++ .../dht/CachePartitionPartialCountersMapSelfTest.java | 4 ++++ .../cache/distributed/dht/GridCacheTxNodeFailureSelfTest.java | 4 ++++ .../GridCacheAtomicInvalidPartitionHandlingSelfTest.java | 4 ++++ .../near/GridCacheNearPartitionedClearSelfTest.java | 4 ++++ .../cache/distributed/near/GridCacheNearReadersSelfTest.java | 4 ++++ .../distributed/near/GridCacheNearTxMultiNodeSelfTest.java | 4 ++++ .../near/GridCachePartitionedMultiNodeCounterSelfTest.java | 4 ++++ .../near/GridCachePartitionedMultiThreadedPutGetSelfTest.java | 4 ++++ .../near/GridCachePartitionedTxMultiNodeSelfTest.java | 4 ++++ .../processors/cache/eviction/DhtAndNearEvictionTest.java | 4 ++++ .../cache/eviction/lru/LruEvictionPolicySelfTest.java | 4 ++++ .../cache/local/GridCacheLocalIsolatedNodesSelfTest.java | 4 ++++ .../IgnitePdsCacheStartStopWithFreqCheckpointTest.java | 4 ++++ .../baseline/ClientAffinityAssignmentWithBaselineTest.java | 4 ++++ .../persistence/db/file/IgnitePdsCheckpointSimpleTest.java | 4 ++++ .../tcp/ipfinder/vm/TcpDiscoveryVmIpFinderSelfTest.java | 4 ++++ .../GridAdaptiveLoadBalancingSpiMultipleNodeSelfTest.java | 4 ++++ 77 files changed, 308 insertions(+) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridCancelUnusedJobSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridCancelUnusedJobSelfTest.java index 7e5fd359b547b..cf3cdf75a1a85 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridCancelUnusedJobSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridCancelUnusedJobSelfTest.java @@ -41,11 +41,15 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Cancel unused job test. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridCancelUnusedJobSelfTest extends GridCommonAbstractTest { /** */ private static final int WAIT_TIME = 100000; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridCollisionJobsContextSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridCollisionJobsContextSelfTest.java index c7a4e0247fb29..24bed780a46f8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridCollisionJobsContextSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridCollisionJobsContextSelfTest.java @@ -34,11 +34,15 @@ import org.apache.ignite.spi.collision.CollisionSpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Collision job context test. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridCollisionJobsContextSelfTest extends GridCommonAbstractTest { /** */ public GridCollisionJobsContextSelfTest() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridCommunicationSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridCommunicationSelfTest.java index 33cf129a26b75..2bfd979133888 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridCommunicationSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridCommunicationSelfTest.java @@ -27,11 +27,15 @@ import org.apache.ignite.internal.util.typedef.G; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Grid basic communication test. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridCommunicationSelfTest extends GridCommonAbstractTest { /** */ private static Ignite ignite; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousJobSiblingsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousJobSiblingsSelfTest.java index b1ec746bbb9d0..4f37ec47a89bd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousJobSiblingsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousJobSiblingsSelfTest.java @@ -37,11 +37,15 @@ import org.apache.ignite.resources.TaskSessionResource; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test continuous mapper with siblings. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridContinuousJobSiblingsSelfTest extends GridCommonAbstractTest { /** */ private static final int JOB_COUNT = 10; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridDeploymentMultiThreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridDeploymentMultiThreadedSelfTest.java index 1e86065620b3d..1b0f6d4de5104 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridDeploymentMultiThreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridDeploymentMultiThreadedSelfTest.java @@ -31,12 +31,16 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; /** * Task deployment tests. */ +@RunWith(JUnit4.class) public class GridDeploymentMultiThreadedSelfTest extends GridCommonAbstractTest { /** */ private static final int THREAD_CNT = 20; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridDeploymentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridDeploymentSelfTest.java index b59437b3c525b..000581af088b8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridDeploymentSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridDeploymentSelfTest.java @@ -40,6 +40,9 @@ import org.apache.ignite.spi.deployment.local.LocalDeploymentSpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_TASK_DEPLOYED; import static org.apache.ignite.events.EventType.EVT_TASK_UNDEPLOYED; @@ -48,6 +51,7 @@ * Task deployment tests. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridDeploymentSelfTest extends GridCommonAbstractTest { /** */ private TestDeploymentSpi depSpi; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageRuntimeConfigurationSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageRuntimeConfigurationSelfTest.java index 2d9bc4f426055..22f917c36825d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageRuntimeConfigurationSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageRuntimeConfigurationSelfTest.java @@ -32,6 +32,9 @@ import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_CACHE_ENTRY_CREATED; import static org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_PUT; @@ -44,6 +47,7 @@ /** * Tests for runtime events configuration. */ +@RunWith(JUnit4.class) public class GridEventStorageRuntimeConfigurationSelfTest extends GridCommonAbstractTest { /** */ private int[] inclEvtTypes; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverCustomTopologySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverCustomTopologySelfTest.java index 01173e5ff93d2..a0485c28d7e1a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverCustomTopologySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverCustomTopologySelfTest.java @@ -40,11 +40,15 @@ import org.apache.ignite.spi.failover.always.AlwaysFailoverSpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test failover and custom topology. Topology returns local node if remote node fails. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridFailoverCustomTopologySelfTest extends GridCommonAbstractTest { /** */ private final AtomicInteger failCnt = new AtomicInteger(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridJobContextSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridJobContextSelfTest.java index d82f204b01e4a..87504eaf1eed0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridJobContextSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridJobContextSelfTest.java @@ -34,11 +34,15 @@ import org.apache.ignite.resources.JobContextResource; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Job context test. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridJobContextSelfTest extends GridCommonAbstractTest { /** * @throws Exception If anything failed. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/AtomicCacheAffinityConfigurationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/AtomicCacheAffinityConfigurationTest.java index 296ed65ef13d3..5121755ea87ed 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/AtomicCacheAffinityConfigurationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/AtomicCacheAffinityConfigurationTest.java @@ -28,9 +28,13 @@ import org.apache.ignite.internal.processors.datastructures.AtomicDataStructureProxy; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** */ +@RunWith(JUnit4.class) public class AtomicCacheAffinityConfigurationTest extends GridCommonAbstractTest { /** Affinity function. */ private AffinityFunction affinityFunction; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheAffinityCallSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheAffinityCallSelfTest.java index 84be2f5854473..baaf50325cbf2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheAffinityCallSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheAffinityCallSelfTest.java @@ -38,6 +38,9 @@ import org.apache.ignite.spi.failover.always.AlwaysFailoverSpi; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -45,6 +48,7 @@ * Test for {@link IgniteCompute#affinityCall(String, Object, IgniteCallable)} and * {@link IgniteCompute#affinityRun(String, Object, IgniteRunnable)}. */ +@RunWith(JUnit4.class) public class CacheAffinityCallSelfTest extends GridCommonAbstractTest { /** */ private static final String CACHE_NAME = "myCache"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDeferredDeleteQueueTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDeferredDeleteQueueTest.java index 9d2c974234889..b8b9d086ee3bc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDeferredDeleteQueueTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDeferredDeleteQueueTest.java @@ -28,6 +28,9 @@ import org.apache.ignite.internal.util.lang.GridAbsPredicate; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_CACHE_REMOVED_ENTRIES_TTL; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; @@ -38,6 +41,7 @@ /** * */ +@RunWith(JUnit4.class) public class CacheDeferredDeleteQueueTest extends GridCommonAbstractTest { /** */ private static String ttlProp; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGroupLocalConfigurationSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGroupLocalConfigurationSelfTest.java index 59f3fbb9692b4..eb8d39531edba 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGroupLocalConfigurationSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGroupLocalConfigurationSelfTest.java @@ -23,10 +23,14 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class CacheGroupLocalConfigurationSelfTest extends GridCommonAbstractTest { /** */ private static final String SECOND_NODE_NAME = "secondNode"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheInterceptorPartitionCounterLocalSanityTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheInterceptorPartitionCounterLocalSanityTest.java index 07f2e1b700504..0337ab28b2c9f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheInterceptorPartitionCounterLocalSanityTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheInterceptorPartitionCounterLocalSanityTest.java @@ -47,6 +47,9 @@ import org.apache.ignite.transactions.TransactionIsolation; import org.eclipse.jetty.util.BlockingArrayQueue; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.SECONDS; @@ -61,6 +64,7 @@ /** * */ +@RunWith(JUnit4.class) public class CacheInterceptorPartitionCounterLocalSanityTest extends GridCommonAbstractTest { /** */ private static final int NODES = 1; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMetricsEntitiesCountTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMetricsEntitiesCountTest.java index 0b64348c591a3..9dee01233b0b2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMetricsEntitiesCountTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMetricsEntitiesCountTest.java @@ -26,6 +26,9 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * This test checks that entries count metrics, calculated by method @@ -33,6 +36,7 @@ * over local partitions to get all set of metrics), have the same values as metrics, calculated by individual methods * (which use iteration over local partition per each method call). */ +@RunWith(JUnit4.class) public class CacheMetricsEntitiesCountTest extends GridCommonAbstractTest { /** Grid count. */ private static final int GRID_CNT = 3; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMetricsForClusterGroupSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMetricsForClusterGroupSelfTest.java index 6a4806d4871e5..9cacdb9314fa1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMetricsForClusterGroupSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMetricsForClusterGroupSelfTest.java @@ -32,12 +32,16 @@ import org.apache.ignite.lang.IgniteClosure; import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_NODE_METRICS_UPDATED; /** * Test for cluster wide cache metrics. */ +@RunWith(JUnit4.class) public class CacheMetricsForClusterGroupSelfTest extends GridCommonAbstractTest { /** Grid count. */ private static final int GRID_CNT = 3; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMetricsManageTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMetricsManageTest.java index badc95a5f0d50..f77126796c34d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMetricsManageTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMetricsManageTest.java @@ -53,10 +53,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class CacheMetricsManageTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNamesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNamesSelfTest.java index 726d6021d41c8..de04b9e1b527d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNamesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNamesSelfTest.java @@ -23,10 +23,14 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test that validates {@link Ignite#cacheNames()} implementation. */ +@RunWith(JUnit4.class) public class CacheNamesSelfTest extends GridCommonAbstractTest { /** */ private boolean client; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapMapEntrySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapMapEntrySelfTest.java index 599db12972933..ca414568611b6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapMapEntrySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapMapEntrySelfTest.java @@ -25,6 +25,9 @@ import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheEntry; import org.apache.ignite.internal.processors.cache.distributed.near.GridNearCacheEntry; import org.apache.ignite.internal.processors.cache.local.GridLocalCacheEntry; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -35,6 +38,7 @@ /** * Cache map entry self test. */ +@RunWith(JUnit4.class) public class CacheOffheapMapEntrySelfTest extends GridCacheAbstractSelfTest { /** {@inheritDoc} */ @Override protected int gridCount() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CachePutEventListenerErrorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CachePutEventListenerErrorSelfTest.java index c7823b49e52a4..e0d82007aabe8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CachePutEventListenerErrorSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CachePutEventListenerErrorSelfTest.java @@ -35,10 +35,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for cache put with error in event listener. */ +@RunWith(JUnit4.class) public class CachePutEventListenerErrorSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CachePutIfAbsentTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CachePutIfAbsentTest.java index 8f689a801f8eb..a86f4639cfc32 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CachePutIfAbsentTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CachePutIfAbsentTest.java @@ -34,6 +34,9 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -43,6 +46,7 @@ /** * */ +@RunWith(JUnit4.class) public class CachePutIfAbsentTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStartupInDeploymentModesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStartupInDeploymentModesTest.java index 1e9f6046da339..4d47ff9d0d414 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStartupInDeploymentModesTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStartupInDeploymentModesTest.java @@ -25,10 +25,14 @@ import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.marshaller.Marshaller; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test verifies that it's possible to start caches in Isolated and Private mode when BinaryMarshaller is used. */ +@RunWith(JUnit4.class) public class CacheStartupInDeploymentModesTest extends GridCommonAbstractTest { /** */ private static final String REPLICATED_CACHE = "replicated"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityApiSelfTest.java index 00753c79fb987..f5686896c5414 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityApiSelfTest.java @@ -35,6 +35,9 @@ import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion; import org.apache.ignite.internal.processors.affinity.GridAffinityFunctionContextImpl; import org.apache.ignite.internal.util.typedef.F; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -42,6 +45,7 @@ /** * Affinity API tests. */ +@RunWith(JUnit4.class) public class GridCacheAffinityApiSelfTest extends GridCacheAbstractSelfTest { /** */ private static final int GRID_CNT = 4; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeLoadTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeLoadTest.java index 409cd216d8dc1..9f94ea8e012a0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeLoadTest.java @@ -73,6 +73,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheRebalanceMode.NONE; @@ -83,6 +86,7 @@ /** * */ +@RunWith(JUnit4.class) public class GridCacheConcurrentTxMultiNodeLoadTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationConsistencySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationConsistencySelfTest.java index 5ca82bbbaddd9..2a6297bc70e14 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationConsistencySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationConsistencySelfTest.java @@ -48,6 +48,9 @@ import org.apache.ignite.testframework.GridStringLogger; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -65,6 +68,7 @@ * */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstractTest { /** */ private boolean cacheEnabled; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryVersionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryVersionSelfTest.java index 93ce8cac2ed59..91859406935e3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryVersionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryVersionSelfTest.java @@ -28,6 +28,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -39,6 +42,7 @@ /** * */ +@RunWith(JUnit4.class) public class GridCacheEntryVersionSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFullTextQueryMultithreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFullTextQueryMultithreadedSelfTest.java index 2fddf3635b30d..b993948931a7f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFullTextQueryMultithreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFullTextQueryMultithreadedSelfTest.java @@ -28,6 +28,9 @@ import org.apache.ignite.internal.processors.cache.query.CacheQueryFuture; import org.apache.ignite.internal.util.typedef.X; import org.apache.ignite.internal.util.typedef.internal.S; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -35,6 +38,7 @@ /** * Multithreaded reduce query tests with lots of data. */ +@RunWith(JUnit4.class) public class GridCacheFullTextQueryMultithreadedSelfTest extends GridCacheAbstractSelfTest { /** */ private static final int GRID_CNT = 3; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheIteratorPerformanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheIteratorPerformanceTest.java index 45a8f7ae8276f..9cd2748f7c5c5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheIteratorPerformanceTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheIteratorPerformanceTest.java @@ -28,12 +28,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** * Cache iterator performance test. */ +@RunWith(JUnit4.class) public class GridCacheIteratorPerformanceTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultiUpdateLockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultiUpdateLockSelfTest.java index b73c35f19b7b4..9bd35bbfb35a3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultiUpdateLockSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultiUpdateLockSelfTest.java @@ -34,6 +34,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; @@ -44,6 +47,7 @@ /** * Tests multi-update locks. */ +@RunWith(JUnit4.class) public class GridCacheMultiUpdateLockSelfTest extends GridCommonAbstractTest { /** Shared IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccPartitionedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccPartitionedSelfTest.java index 38a44c46d7e3e..3b8a0a6000577 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccPartitionedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccPartitionedSelfTest.java @@ -30,6 +30,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -37,6 +40,7 @@ /** * Test cases for multi-threaded tests in partitioned cache. */ +@RunWith(JUnit4.class) public class GridCacheMvccPartitionedSelfTest extends GridCommonAbstractTest { /** */ private static final UUID nodeId = UUID.randomUUID(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccSelfTest.java index 0b2e1376eb0f0..164410398a164 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccSelfTest.java @@ -31,12 +31,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.REPLICATED; /** * Test cases for multi-threaded tests. */ +@RunWith(JUnit4.class) public class GridCacheMvccSelfTest extends GridCommonAbstractTest { /** Grid. */ private IgniteKernal grid; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheObjectToStringSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheObjectToStringSelfTest.java index 3b07f1287aa1c..1741a62facdf7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheObjectToStringSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheObjectToStringSelfTest.java @@ -32,6 +32,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.LOCAL; @@ -43,6 +46,7 @@ /** * Tests that common cache objects' toString() methods do not lead to stack overflow. */ +@RunWith(JUnit4.class) public class GridCacheObjectToStringSelfTest extends GridCommonAbstractTest { /** VM ip finder for TCP discovery. */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryInternalKeysSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryInternalKeysSelfTest.java index ab17559b5a8d0..18d37195aea90 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryInternalKeysSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryInternalKeysSelfTest.java @@ -31,6 +31,9 @@ import org.apache.ignite.internal.util.typedef.G; import org.apache.ignite.internal.util.typedef.P1; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; @@ -38,6 +41,7 @@ /** * Cache query internal keys self test. */ +@RunWith(JUnit4.class) public class GridCacheQueryInternalKeysSelfTest extends GridCacheAbstractSelfTest { /** Grid count. */ private static final int GRID_CNT = 2; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReferenceCleanupSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReferenceCleanupSelfTest.java index 6ac9fdb87ee8f..dd1b8f8eb4bf4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReferenceCleanupSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReferenceCleanupSelfTest.java @@ -40,6 +40,9 @@ import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.testframework.GridTestUtils.cacheContext; @@ -47,6 +50,7 @@ /** * */ +@RunWith(JUnit4.class) public class GridCacheReferenceCleanupSelfTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStoreValueBytesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStoreValueBytesSelfTest.java index 96e6ec17c618a..2d6c30d639781 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStoreValueBytesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStoreValueBytesSelfTest.java @@ -26,6 +26,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.REPLICATED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -33,6 +36,7 @@ /** * Test for {@link CacheConfiguration#isStoreKeepBinary()}. */ +@RunWith(JUnit4.class) public class GridCacheStoreValueBytesSelfTest extends GridCommonAbstractTest { /** */ private boolean storeValBytes; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionMultinodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionMultinodeTest.java index ffc7c85ab2e03..6106169ad1241 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionMultinodeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionMultinodeTest.java @@ -30,6 +30,9 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -41,6 +44,7 @@ /** * */ +@RunWith(JUnit4.class) public class GridCacheVersionMultinodeTest extends GridCacheAbstractSelfTest { /** */ private CacheAtomicityMode atomicityMode; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridLocalIgniteSerializationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridLocalIgniteSerializationTest.java index 57dcf49dcbe26..1ced797f3f8aa 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridLocalIgniteSerializationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridLocalIgniteSerializationTest.java @@ -39,10 +39,14 @@ import java.io.ObjectOutputStream; import java.io.Serializable; import java.util.concurrent.Callable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for local Ignite instance processing during serialization/deserialization. */ +@RunWith(JUnit4.class) public class GridLocalIgniteSerializationTest extends GridCommonAbstractTest { /** */ private static final String CACHE_NAME = "cache_name"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheBinaryObjectsScanSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheBinaryObjectsScanSelfTest.java index c88e611e149d7..2fba2b81a5163 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheBinaryObjectsScanSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheBinaryObjectsScanSelfTest.java @@ -30,10 +30,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteCacheBinaryObjectsScanSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheCreateRestartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheCreateRestartSelfTest.java index e7aa090140c87..b236c60733fd3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheCreateRestartSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheCreateRestartSelfTest.java @@ -30,10 +30,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteCacheCreateRestartSelfTest extends GridCommonAbstractTest { /** Cache name. */ private static final String CACHE_NAME = "partitioned"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerExpiredEventsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerExpiredEventsTest.java index 96e8b5bf7da76..0270a41cec0b9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerExpiredEventsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerExpiredEventsTest.java @@ -38,6 +38,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; @@ -48,6 +51,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheEntryListenerExpiredEventsTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheGetCustomCollectionsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheGetCustomCollectionsSelfTest.java index 5491247d4c13f..3d799308d7007 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheGetCustomCollectionsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheGetCustomCollectionsSelfTest.java @@ -32,10 +32,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteCacheGetCustomCollectionsSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheManyAsyncOperationsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheManyAsyncOperationsTest.java index 7104329dd7362..856bea9307cef 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheManyAsyncOperationsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheManyAsyncOperationsTest.java @@ -29,6 +29,9 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.lang.IgniteFuture; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -36,6 +39,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheManyAsyncOperationsTest extends IgniteCacheAbstractTest { /** {@inheritDoc} */ @Override protected int gridCount() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingNearErrorTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingNearErrorTest.java index 89ca8085402a4..ff5b67f90b710 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingNearErrorTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingNearErrorTest.java @@ -20,10 +20,14 @@ import org.apache.ignite.cache.eviction.fifo.FifoEvictionPolicy; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.configuration.NearCacheConfiguration; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Checks behavior on exception while unmarshalling key. */ +@RunWith(JUnit4.class) public class IgniteCacheP2pUnmarshallingNearErrorTest extends IgniteCacheP2pUnmarshallingErrorTest { /** {@inheritDoc} */ @Override protected NearCacheConfiguration nearConfiguration() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePartitionMapUpdateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePartitionMapUpdateTest.java index 7bdd81adb9620..169190698fff6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePartitionMapUpdateTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePartitionMapUpdateTest.java @@ -32,12 +32,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** * */ +@RunWith(JUnit4.class) public class IgniteCachePartitionMapUpdateTest extends GridCommonAbstractTest { /** */ protected static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStoreCollectionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStoreCollectionTest.java index 7707cefea8a77..e2daaf46cd06c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStoreCollectionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStoreCollectionTest.java @@ -29,6 +29,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -38,6 +41,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheStoreCollectionTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTransactionalStopBusySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTransactionalStopBusySelfTest.java index 9d9aaf43b9dcc..4685752fd8e99 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTransactionalStopBusySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTransactionalStopBusySelfTest.java @@ -18,10 +18,14 @@ package org.apache.ignite.internal.processors.cache; import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxPrepareRequest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Stopped node when client operations are executing. */ +@RunWith(JUnit4.class) public class IgniteCacheTransactionalStopBusySelfTest extends IgniteCacheAbstractStopBusySelfTest { /** {@inheritDoc} */ @Override @Test diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/BinaryMetadataUpdatesFlowTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/BinaryMetadataUpdatesFlowTest.java index c894f5d140977..2aadb69d522af 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/BinaryMetadataUpdatesFlowTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/BinaryMetadataUpdatesFlowTest.java @@ -50,6 +50,9 @@ import org.apache.ignite.testframework.GridTestUtils.DiscoveryHook; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.testframework.GridTestUtils.runAsync; import static org.junit.Assert.assertArrayEquals; @@ -57,6 +60,7 @@ /** * */ +@RunWith(JUnit4.class) public class BinaryMetadataUpdatesFlowTest extends GridCommonAbstractTest { /** */ private static final String SEQ_NUM_FLD = "f0"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractQueueFailoverDataConsistencySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractQueueFailoverDataConsistencySelfTest.java index f1dfe9e1b1511..1cf1b11a87e0d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractQueueFailoverDataConsistencySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractQueueFailoverDataConsistencySelfTest.java @@ -37,6 +37,9 @@ import org.apache.ignite.internal.processors.datastructures.GridCacheQueueHeaderKey; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -44,6 +47,7 @@ /** * Queue failover test. */ +@RunWith(JUnit4.class) public abstract class GridCacheAbstractQueueFailoverDataConsistencySelfTest extends IgniteCollectionAbstractTest { /** */ private static final String QUEUE_NAME = "FailoverQueueTest"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteClientDataStructuresAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteClientDataStructuresAbstractTest.java index b87c586a1ce72..ba30a3f2d7be6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteClientDataStructuresAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteClientDataStructuresAbstractTest.java @@ -43,10 +43,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public abstract class IgniteClientDataStructuresAbstractTest extends GridCommonAbstractTest { /** */ protected static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSequenceTxSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSequenceTxSelfTest.java index b4b6b8b23d3c6..1fabfa4bc7590 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSequenceTxSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSequenceTxSelfTest.java @@ -32,12 +32,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; /** * Tests {@link IgniteAtomicSequence} operations inside started user transaction. */ +@RunWith(JUnit4.class) public class GridCachePartitionedAtomicSequenceTxSelfTest extends GridCommonAbstractTest { /** Number of threads. */ private static final int THREAD_NUM = 8; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedNodeRestartTxSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedNodeRestartTxSelfTest.java index fd1ce7cdbb784..f2c50f2781d90 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedNodeRestartTxSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedNodeRestartTxSelfTest.java @@ -30,6 +30,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -41,6 +44,7 @@ /** * Test with variable number of nodes. */ +@RunWith(JUnit4.class) public class GridCachePartitionedNodeRestartTxSelfTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheDataLossOnPartitionMoveTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheDataLossOnPartitionMoveTest.java index a55e62f2a8c15..5938e4b1a0a45 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheDataLossOnPartitionMoveTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheDataLossOnPartitionMoveTest.java @@ -45,6 +45,9 @@ import org.apache.ignite.testframework.GridTestNode; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState.EVICTED; import static org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState.OWNING; @@ -52,6 +55,7 @@ /** * */ +@RunWith(JUnit4.class) public class CacheDataLossOnPartitionMoveTest extends GridCommonAbstractTest { /** */ public static final long MB = 1024 * 1024L; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEntrySetIterationPreloadingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEntrySetIterationPreloadingSelfTest.java index b8d41e885c693..160f8fc22d9d2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEntrySetIterationPreloadingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEntrySetIterationPreloadingSelfTest.java @@ -27,10 +27,14 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.internal.processors.cache.GridCacheAbstractSelfTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests entry wrappers after preloading happened. */ +@RunWith(JUnit4.class) public class GridCacheEntrySetIterationPreloadingSelfTest extends GridCacheAbstractSelfTest { /** {@inheritDoc} */ @Override protected int gridCount() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionEvictionDuringReadThroughSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionEvictionDuringReadThroughSelfTest.java index e812ca1648fe9..9a1572b1f4cf1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionEvictionDuringReadThroughSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionEvictionDuringReadThroughSelfTest.java @@ -40,10 +40,14 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class GridCachePartitionEvictionDuringReadThroughSelfTest extends GridCommonAbstractTest { /** Failing key. */ private static final int FAILING_KEY = 3; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadEventsAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadEventsAbstractSelfTest.java index c8b5b953af9ae..e28df0d5ced3a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadEventsAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadEventsAbstractSelfTest.java @@ -34,6 +34,9 @@ import org.apache.ignite.spi.eventstorage.memory.MemoryEventStorageSpi; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -43,6 +46,7 @@ /** * */ +@RunWith(JUnit4.class) public abstract class GridCachePreloadEventsAbstractSelfTest extends GridCommonAbstractTest { /** */ private TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteBinaryMetadataUpdateChangingTopologySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteBinaryMetadataUpdateChangingTopologySelfTest.java index 073c1bb14fe1f..68c7068faf378 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteBinaryMetadataUpdateChangingTopologySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteBinaryMetadataUpdateChangingTopologySelfTest.java @@ -51,11 +51,15 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests specific scenario when binary metadata should be updated from a system thread * and topology has been already changed since the original transaction start. */ +@RunWith(JUnit4.class) public class IgniteBinaryMetadataUpdateChangingTopologySelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheManyClientsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheManyClientsTest.java index 358f555a67a26..6482fbf7475de 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheManyClientsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheManyClientsTest.java @@ -41,6 +41,9 @@ import org.apache.ignite.spi.eventstorage.memory.MemoryEventStorageSpi; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -49,6 +52,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheManyClientsTest extends GridCommonAbstractTest { /** */ protected static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheMessageRecoveryIdleConnectionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheMessageRecoveryIdleConnectionTest.java index 0999d3f7fc115..0912d4eba31a5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheMessageRecoveryIdleConnectionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheMessageRecoveryIdleConnectionTest.java @@ -34,6 +34,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -43,6 +46,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheMessageRecoveryIdleConnectionTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheNearRestartRollbackSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheNearRestartRollbackSelfTest.java index b527761a67dc9..8e1179ac89421 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheNearRestartRollbackSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheNearRestartRollbackSelfTest.java @@ -49,6 +49,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionRollbackException; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ; @@ -56,6 +59,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheNearRestartRollbackSelfTest extends GridCommonAbstractTest { /** Shared IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCachePartitionLossPolicySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCachePartitionLossPolicySelfTest.java index acc0892e1210b..3855c39cb58af 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCachePartitionLossPolicySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCachePartitionLossPolicySelfTest.java @@ -60,6 +60,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.Arrays.asList; import static java.util.Collections.singletonList; @@ -69,6 +72,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCachePartitionLossPolicySelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/CachePartitionPartialCountersMapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/CachePartitionPartialCountersMapSelfTest.java index 7aa41b5d651dc..c594121258ea4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/CachePartitionPartialCountersMapSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/CachePartitionPartialCountersMapSelfTest.java @@ -19,7 +19,11 @@ import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.CachePartitionPartialCountersMap; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; +@RunWith(JUnit4.class) public class CachePartitionPartialCountersMapSelfTest extends GridCommonAbstractTest { @Test diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheTxNodeFailureSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheTxNodeFailureSelfTest.java index a4c4453d4e5f0..cf1cb469f2210 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheTxNodeFailureSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheTxNodeFailureSelfTest.java @@ -48,6 +48,9 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionRollbackException; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -60,6 +63,7 @@ * Tests one-phase commit transactions when some of the nodes fail in the middle of the transaction. */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class GridCacheTxNodeFailureSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java index 40939319116ea..0d26d13f7eaae 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java @@ -52,6 +52,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; @@ -63,6 +66,7 @@ * Test GridDhtInvalidPartitionException handling in ATOMIC cache during restarts. */ @SuppressWarnings("ErrorNotRethrown") +@RunWith(JUnit4.class) public class GridCacheAtomicInvalidPartitionHandlingSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearPartitionedClearSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearPartitionedClearSelfTest.java index bdea450dab2c2..89d208bfb4a5e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearPartitionedClearSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearPartitionedClearSelfTest.java @@ -31,6 +31,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -41,6 +44,7 @@ * Test clear operation in NEAR_PARTITIONED transactional cache. */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class GridCacheNearPartitionedClearSelfTest extends GridCommonAbstractTest { /** Grid count. */ private static final int GRID_CNT = 3; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReadersSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReadersSelfTest.java index 3040132327217..d39a2b69ba4f4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReadersSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReadersSelfTest.java @@ -50,6 +50,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -60,6 +63,7 @@ /** * Checks that readers are properly handled. */ +@RunWith(JUnit4.class) public class GridCacheNearReadersSelfTest extends GridCommonAbstractTest { /** Number of grids. */ private int grids = 2; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearTxMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearTxMultiNodeSelfTest.java index 604a522e63212..f1b2de28a8971 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearTxMultiNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearTxMultiNodeSelfTest.java @@ -40,6 +40,9 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -52,6 +55,7 @@ /** * Tests near transactions. */ +@RunWith(JUnit4.class) public class GridCacheNearTxMultiNodeSelfTest extends GridCommonAbstractTest { /** */ protected static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeCounterSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeCounterSelfTest.java index 3b60b9f4e3845..df0f5af486297 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeCounterSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeCounterSelfTest.java @@ -54,6 +54,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -65,6 +68,7 @@ * Multiple put test. */ @SuppressWarnings({"UnusedAssignment", "TooBroadScope"}) +@RunWith(JUnit4.class) public class GridCachePartitionedMultiNodeCounterSelfTest extends GridCommonAbstractTest { /** Debug flag. */ private static final boolean DEBUG = false; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiThreadedPutGetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiThreadedPutGetSelfTest.java index 830c1714d1db9..6b7ecd923ea31 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiThreadedPutGetSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiThreadedPutGetSelfTest.java @@ -33,6 +33,9 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -45,6 +48,7 @@ /** * Multithreaded partition cache put get test. */ +@RunWith(JUnit4.class) public class GridCachePartitionedMultiThreadedPutGetSelfTest extends GridCommonAbstractTest { /** */ private static final boolean TEST_INFO = true; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxMultiNodeSelfTest.java index 9c06b9181343a..7fadbdf747370 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxMultiNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxMultiNodeSelfTest.java @@ -20,6 +20,9 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.processors.cache.IgniteTxMultiNodeAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -27,6 +30,7 @@ /** * Test basic cache operations in transactions. */ +@RunWith(JUnit4.class) public class GridCachePartitionedTxMultiNodeSelfTest extends IgniteTxMultiNodeAbstractTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/DhtAndNearEvictionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/DhtAndNearEvictionTest.java index 69edc6bd662b0..f0a883db7dab9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/DhtAndNearEvictionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/DhtAndNearEvictionTest.java @@ -36,12 +36,16 @@ import org.apache.ignite.testframework.GridStringLogger; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Checking that DHT and near cache evictions work correctly when both are set. * * This is a regression test for IGNITE-9315. */ +@RunWith(JUnit4.class) public class DhtAndNearEvictionTest extends GridCommonAbstractTest { /** */ public GridStringLogger strLog; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruEvictionPolicySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruEvictionPolicySelfTest.java index e49c5a63a721c..af29970400087 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruEvictionPolicySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruEvictionPolicySelfTest.java @@ -21,10 +21,14 @@ import org.apache.ignite.cache.eviction.lru.LruEvictionPolicy; import org.apache.ignite.internal.processors.cache.CacheEvictableEntryImpl; import org.apache.ignite.internal.processors.cache.eviction.EvictionAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * LRU Eviction policy tests. */ +@RunWith(JUnit4.class) public class LruEvictionPolicySelfTest extends EvictionAbstractTest> { /** diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalIsolatedNodesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalIsolatedNodesSelfTest.java index a224258900624..521c2bd64be54 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalIsolatedNodesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalIsolatedNodesSelfTest.java @@ -25,12 +25,16 @@ import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.LOCAL; /** * Isolated nodes LOCAL cache self test. */ +@RunWith(JUnit4.class) public class GridCacheLocalIsolatedNodesSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCacheStartStopWithFreqCheckpointTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCacheStartStopWithFreqCheckpointTest.java index d4d399553fa3c..9cae83fcc2fae 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCacheStartStopWithFreqCheckpointTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCacheStartStopWithFreqCheckpointTest.java @@ -38,10 +38,14 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgnitePdsCacheStartStopWithFreqCheckpointTest extends GridCommonAbstractTest { /** Caches. */ private static final int CACHES = 10; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/ClientAffinityAssignmentWithBaselineTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/ClientAffinityAssignmentWithBaselineTest.java index 5d31f8778d7d5..a404adf99811c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/ClientAffinityAssignmentWithBaselineTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/ClientAffinityAssignmentWithBaselineTest.java @@ -53,12 +53,16 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager.DFLT_STORE_DIR; /** * Checks that client affinity assignment cache is calculated correctly regardless of current baseline topology. */ +@RunWith(JUnit4.class) public class ClientAffinityAssignmentWithBaselineTest extends GridCommonAbstractTest { /** Nodes count. */ private static final int DEFAULT_NODES_COUNT = 5; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCheckpointSimpleTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCheckpointSimpleTest.java index 9c37aff4b3e37..28cb69e347139 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCheckpointSimpleTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCheckpointSimpleTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Puts data into grid, waits for checkpoint to start and then verifies data */ +@RunWith(JUnit4.class) public class IgnitePdsCheckpointSimpleTest extends GridCommonAbstractTest { /** {@inheritDoc} */ diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/vm/TcpDiscoveryVmIpFinderSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/vm/TcpDiscoveryVmIpFinderSelfTest.java index 6f2239bc874d2..881f78b6ab11d 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/vm/TcpDiscoveryVmIpFinderSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/vm/TcpDiscoveryVmIpFinderSelfTest.java @@ -27,12 +27,16 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinderAbstractSelfTest; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.processors.cache.binary.GridCacheBinaryObjectsAbstractSelfTest.IP_FINDER; /** * GridTcpDiscoveryVmIpFinder test. */ +@RunWith(JUnit4.class) public class TcpDiscoveryVmIpFinderSelfTest extends TcpDiscoveryIpFinderAbstractSelfTest { /** diff --git a/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/adaptive/GridAdaptiveLoadBalancingSpiMultipleNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/adaptive/GridAdaptiveLoadBalancingSpiMultipleNodeSelfTest.java index f9517016cc5b6..58c4f4a47c76a 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/adaptive/GridAdaptiveLoadBalancingSpiMultipleNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/adaptive/GridAdaptiveLoadBalancingSpiMultipleNodeSelfTest.java @@ -30,11 +30,15 @@ import org.apache.ignite.testframework.junits.spi.GridSpiAbstractTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; import org.apache.ignite.testframework.junits.spi.GridSpiTestConfig; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests adaptive load balancing SPI. */ @GridSpiTest(spi = AdaptiveLoadBalancingSpi.class, group = "Load Balancing SPI") +@RunWith(JUnit4.class) public class GridAdaptiveLoadBalancingSpiMultipleNodeSelfTest extends GridSpiAbstractTest { /** */ private static final int RMT_NODE_CNT = 10; From ffed023c57ba5eaf8c1e78083259cf90085c1a37 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Tue, 4 Dec 2018 02:01:54 +0300 Subject: [PATCH 039/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview --- .../RendezvousAffinityFunctionSimpleBenchmark.java | 4 ++++ .../org/apache/ignite/internal/ClusterMetricsSelfTest.java | 4 ++++ .../org/apache/ignite/internal/GridAffinitySelfTest.java | 4 ++++ .../apache/ignite/internal/GridCancelOnGridStopSelfTest.java | 4 ++++ .../internal/GridEventStorageDefaultExceptionTest.java | 4 ++++ .../org/apache/ignite/internal/GridEventStorageSelfTest.java | 4 ++++ .../internal/GridFailFastNodeFailureDetectionSelfTest.java | 4 ++++ .../cache/CacheAtomicSingleMessageCountSelfTest.java | 4 ++++ .../internal/processors/cache/CacheClientStoreSelfTest.java | 4 ++++ .../processors/cache/CacheConnectionLeakStoreTxTest.java | 4 ++++ .../cache/CacheExchangeMessageDuplicatedStateTest.java | 4 ++++ .../processors/cache/CacheGroupMetricsMBeanTest.java | 4 ++++ .../processors/cache/CacheGroupsMetricsRebalanceTest.java | 4 ++++ .../processors/cache/CacheKeepBinaryTransactionTest.java | 4 ++++ .../internal/processors/cache/CacheNearReaderUpdateTest.java | 4 ++++ .../processors/cache/CacheStopAndDestroySelfTest.java | 4 ++++ .../processors/cache/CacheTxNotAllowReadFromBackupTest.java | 4 ++++ .../internal/processors/cache/ClusterReadOnlyModeTest.java | 4 ++++ .../internal/processors/cache/ConcurrentCacheStartTest.java | 4 ++++ .../ignite/internal/processors/cache/CrossCacheLockTest.java | 4 ++++ .../cache/GridCacheConcurrentGetCacheOnClientTest.java | 4 ++++ ...GridCacheMultinodeUpdateNearEnabledNoBackupsSelfTest.java | 4 ++++ .../internal/processors/cache/GridCacheReloadSelfTest.java | 4 ++++ .../cache/GridCacheReplicatedSynchronousCommitTest.java | 4 ++++ .../cache/GridCacheReturnValueTransferSelfTest.java | 4 ++++ .../internal/processors/cache/GridCacheSlowTxWarnTest.java | 4 ++++ .../cache/GridCacheStoreManagerDeserializationTest.java | 4 ++++ .../internal/processors/cache/GridCacheUtilsSelfTest.java | 4 ++++ .../cache/GridCacheValueBytesPreloadingSelfTest.java | 4 ++++ .../processors/cache/GridCacheVersionTopologyChangeTest.java | 4 ++++ .../processors/cache/GridEvictionPolicyMBeansTest.java | 4 ++++ .../processors/cache/IgniteCacheAtomicStopBusySelfTest.java | 4 ++++ .../processors/cache/IgniteCacheEntryProcessorCallTest.java | 4 ++++ .../cache/IgniteCacheInvokeReadThroughSingleNodeTest.java | 5 +++++ .../processors/cache/IgniteCacheInvokeReadThroughTest.java | 5 +++++ .../processors/cache/IgniteCacheNearLockValueSelfTest.java | 4 ++++ .../processors/cache/IgniteCacheObjectPutSelfTest.java | 4 ++++ ...ridCacheBinaryAtomicEntryProcessorDeploymentSelfTest.java | 4 ++++ .../GridCacheBinaryObjectsAbstractDataStreamerSelfTest.java | 4 ++++ .../distributed/CacheLoadingConcurrentGridStartSelfTest.java | 4 ++++ .../cache/distributed/IgniteCache150ClientsTest.java | 4 ++++ .../cache/distributed/IgniteCacheCreatePutTest.java | 4 ++++ .../distributed/IgniteCacheMessageWriteTimeoutTest.java | 4 ++++ .../distributed/dht/CacheGetReadFromBackupFailoverTest.java | 4 ++++ .../cache/distributed/dht/GridCacheColocatedDebugTest.java | 4 ++++ .../distributed/dht/GridCacheDhtPreloadPerformanceTest.java | 4 ++++ .../dht/GridCachePartitionedTopologyChangeSelfTest.java | 4 ++++ ...GridCachePartitionedTxOriginatingNodeFailureSelfTest.java | 4 ++++ .../dht/GridCachePartitionedUnloadEventsSelfTest.java | 4 ++++ .../distributed/dht/IgniteCacheClearDuringRebalanceTest.java | 4 ++++ .../distributed/dht/IgniteCacheCrossCacheTxFailoverTest.java | 4 ++++ .../near/GridCachePartitionedEvictionSelfTest.java | 4 ++++ .../cache/distributed/near/GridNearCacheStoreUpdateTest.java | 4 ++++ .../cache/eviction/lru/LruEvictionPolicyFactorySelfTest.java | 4 ++++ .../cache/expiry/IgniteCacheClientNearCacheExpiryTest.java | 4 ++++ .../local/GridCacheAtomicLocalTckMetricsSelfTestImpl.java | 4 ++++ .../db/file/IgnitePdsCacheDestroyDuringCheckpointTest.java | 4 ++++ .../persistence/db/file/IgnitePdsCacheIntegrationTest.java | 4 ++++ 58 files changed, 234 insertions(+) diff --git a/modules/core/src/test/java/org/apache/ignite/cache/affinity/rendezvous/RendezvousAffinityFunctionSimpleBenchmark.java b/modules/core/src/test/java/org/apache/ignite/cache/affinity/rendezvous/RendezvousAffinityFunctionSimpleBenchmark.java index e87007f2b9490..7dec6b299cdd5 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/affinity/rendezvous/RendezvousAffinityFunctionSimpleBenchmark.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/affinity/rendezvous/RendezvousAffinityFunctionSimpleBenchmark.java @@ -65,11 +65,15 @@ import java.util.concurrent.atomic.AtomicInteger; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Simple benchmarks, compatibility test and distribution check utils for affinity functions. * Needs to check changes at the {@link RendezvousAffinityFunction}. */ +@RunWith(JUnit4.class) public class RendezvousAffinityFunctionSimpleBenchmark extends GridCommonAbstractTest { /** MAC prefix. */ private static final String MAC_PREF = "MAC"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/ClusterMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/ClusterMetricsSelfTest.java index aeb69f19489cd..79460511b849f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/ClusterMetricsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/ClusterMetricsSelfTest.java @@ -34,6 +34,9 @@ import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_JOB_FINISHED; import static org.apache.ignite.events.EventType.EVT_NODE_METRICS_UPDATED; @@ -42,6 +45,7 @@ * Tests for projection metrics. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class ClusterMetricsSelfTest extends GridCommonAbstractTest { /** */ private static final int NODES_CNT = 4; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridAffinitySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridAffinitySelfTest.java index f2cfc1d8d44fa..106e178d149a0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridAffinitySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridAffinitySelfTest.java @@ -33,12 +33,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** * Tests affinity mapping. */ +@RunWith(JUnit4.class) public class GridAffinitySelfTest extends GridCommonAbstractTest { /** VM ip finder for TCP discovery. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridCancelOnGridStopSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridCancelOnGridStopSelfTest.java index 737d9e88f1c6f..e06032e09a9c0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridCancelOnGridStopSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridCancelOnGridStopSelfTest.java @@ -32,12 +32,16 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test task cancellation on grid stop. */ @SuppressWarnings({"ProhibitedExceptionDeclared"}) @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridCancelOnGridStopSelfTest extends GridCommonAbstractTest { /** */ private static CountDownLatch cnt; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageDefaultExceptionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageDefaultExceptionTest.java index 97235585c3f75..8346abfc45191 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageDefaultExceptionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageDefaultExceptionTest.java @@ -25,11 +25,15 @@ import org.apache.ignite.spi.eventstorage.NoopEventStorageSpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Event storage tests with default no-op spi. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridEventStorageDefaultExceptionTest extends GridCommonAbstractTest { /** */ public GridEventStorageDefaultExceptionTest() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageSelfTest.java index 1a617c2d04700..12185989e5e75 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageSelfTest.java @@ -39,6 +39,9 @@ import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVTS_ALL_MINUS_METRIC_UPDATE; import static org.apache.ignite.events.EventType.EVTS_JOB_EXECUTION; @@ -56,6 +59,7 @@ * serialized form. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridEventStorageSelfTest extends GridCommonAbstractTest { /** First grid. */ private static Ignite ignite1; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridFailFastNodeFailureDetectionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridFailFastNodeFailureDetectionSelfTest.java index bef1fe75986cd..e643e27e25ae7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridFailFastNodeFailureDetectionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridFailFastNodeFailureDetectionSelfTest.java @@ -31,6 +31,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.events.EventType.EVT_NODE_FAILED; @@ -38,6 +41,7 @@ /** * Fail fast test. */ +@RunWith(JUnit4.class) public class GridFailFastNodeFailureDetectionSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheAtomicSingleMessageCountSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheAtomicSingleMessageCountSelfTest.java index 9caa39674ce5f..2a7b446e557f4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheAtomicSingleMessageCountSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheAtomicSingleMessageCountSelfTest.java @@ -41,6 +41,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -48,6 +51,7 @@ /** * Tests single / transform messages being sent between nodes in ATOMIC mode. */ +@RunWith(JUnit4.class) public class CacheAtomicSingleMessageCountSelfTest extends GridCommonAbstractTest { /** VM ip finder for TCP discovery. */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheClientStoreSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheClientStoreSelfTest.java index c52a9f34b7002..cae0f8a5d41e6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheClientStoreSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheClientStoreSelfTest.java @@ -41,12 +41,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_SKIP_CONFIGURATION_CONSISTENCY_CHECK; /** * Tests for cache client with and without store. */ +@RunWith(JUnit4.class) public class CacheClientStoreSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheConnectionLeakStoreTxTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheConnectionLeakStoreTxTest.java index cf9afd25b3ec5..574d99732cef8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheConnectionLeakStoreTxTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheConnectionLeakStoreTxTest.java @@ -42,6 +42,9 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; @@ -51,6 +54,7 @@ /** * */ +@RunWith(JUnit4.class) public class CacheConnectionLeakStoreTxTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheExchangeMessageDuplicatedStateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheExchangeMessageDuplicatedStateTest.java index 4b65bb36d95b8..aca2e5f7404ea 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheExchangeMessageDuplicatedStateTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheExchangeMessageDuplicatedStateTest.java @@ -43,12 +43,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.testframework.GridTestUtils.getFieldValue; /** * */ +@RunWith(JUnit4.class) public class CacheExchangeMessageDuplicatedStateTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGroupMetricsMBeanTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGroupMetricsMBeanTest.java index e87539eefb591..ce3604ffdfba1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGroupMetricsMBeanTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGroupMetricsMBeanTest.java @@ -51,10 +51,14 @@ import org.apache.ignite.mxbean.CacheGroupMetricsMXBean; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Cache group JMX metrics test. */ +@RunWith(JUnit4.class) public class CacheGroupMetricsMBeanTest extends GridCommonAbstractTest implements Serializable { /** */ private boolean pds = false; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGroupsMetricsRebalanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGroupsMetricsRebalanceTest.java index 16704ae66bc30..1de3b7a747165 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGroupsMetricsRebalanceTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGroupsMetricsRebalanceTest.java @@ -39,6 +39,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_REBALANCE_STATISTICS_TIME_INTERVAL; import static org.apache.ignite.testframework.GridTestUtils.runAsync; @@ -47,6 +50,7 @@ /** * */ +@RunWith(JUnit4.class) public class CacheGroupsMetricsRebalanceTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheKeepBinaryTransactionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheKeepBinaryTransactionTest.java index a910dae4e4f6e..538bf8dda3611 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheKeepBinaryTransactionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheKeepBinaryTransactionTest.java @@ -31,10 +31,14 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test that no deserialization happens with binary objects and keepBinary set flag. */ +@RunWith(JUnit4.class) public class CacheKeepBinaryTransactionTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNearReaderUpdateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNearReaderUpdateTest.java index f163f348df01f..c4deb149e2050 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNearReaderUpdateTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNearReaderUpdateTest.java @@ -49,6 +49,9 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.apache.ignite.transactions.TransactionOptimisticException; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -61,6 +64,7 @@ /** * */ +@RunWith(JUnit4.class) public class CacheNearReaderUpdateTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java index 9d030a56c7022..9ed0d7dd610bf 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java @@ -48,6 +48,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.LOCAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -56,6 +59,7 @@ * Checks stop and destroy methods behavior. */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class CacheStopAndDestroySelfTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheTxNotAllowReadFromBackupTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheTxNotAllowReadFromBackupTest.java index 7408c29333afd..17ec75be5987b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheTxNotAllowReadFromBackupTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheTxNotAllowReadFromBackupTest.java @@ -37,10 +37,14 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for query with BinaryMarshaller and different serialization modes and with reflective serializer. */ +@RunWith(JUnit4.class) public class CacheTxNotAllowReadFromBackupTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/ClusterReadOnlyModeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/ClusterReadOnlyModeTest.java index b519cf858c4fb..2da280c74a773 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/ClusterReadOnlyModeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/ClusterReadOnlyModeTest.java @@ -24,10 +24,14 @@ import org.apache.ignite.IgniteDataStreamer; import org.apache.ignite.internal.processors.datastreamer.DataStreamerImpl; import org.apache.ignite.internal.util.typedef.G; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests cache get/put/remove and data streaming in read-only cluster mode. */ +@RunWith(JUnit4.class) public class ClusterReadOnlyModeTest extends ClusterReadOnlyModeAbstractTest { /** * Tests cache get/put/remove. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/ConcurrentCacheStartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/ConcurrentCacheStartTest.java index 05cedba093f1e..8828c577dee63 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/ConcurrentCacheStartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/ConcurrentCacheStartTest.java @@ -24,10 +24,14 @@ import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class ConcurrentCacheStartTest extends GridCommonAbstractTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CrossCacheLockTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CrossCacheLockTest.java index 528e10b1b1ed1..f8b7a383978a1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CrossCacheLockTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CrossCacheLockTest.java @@ -26,12 +26,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; /** * */ +@RunWith(JUnit4.class) public class CrossCacheLockTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentGetCacheOnClientTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentGetCacheOnClientTest.java index 78e70e0e554e0..20c219cbeff77 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentGetCacheOnClientTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentGetCacheOnClientTest.java @@ -26,12 +26,16 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.testframework.GridTestUtils.runAsync; /** * */ +@RunWith(JUnit4.class) public class GridCacheConcurrentGetCacheOnClientTest extends GridCommonAbstractTest{ /** Ip finder. */ private static final TcpDiscoveryVmIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateNearEnabledNoBackupsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateNearEnabledNoBackupsSelfTest.java index 3559c955731dd..1ca6508c20fdb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateNearEnabledNoBackupsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateNearEnabledNoBackupsSelfTest.java @@ -18,10 +18,14 @@ package org.apache.ignite.internal.processors.cache; import org.apache.ignite.configuration.CacheConfiguration; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class GridCacheMultinodeUpdateNearEnabledNoBackupsSelfTest extends GridCacheMultinodeUpdateNearEnabledSelfTest { /** {@inheritDoc} */ @Override protected int gridCount() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReloadSelfTest.java index f6850bc557d6a..b5692333fddbc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReloadSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReloadSelfTest.java @@ -32,12 +32,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** * Checks that CacheProjection.reload() operations are performed correctly. */ +@RunWith(JUnit4.class) public class GridCacheReloadSelfTest extends GridCommonAbstractTest { /** Maximum allowed number of cache entries. */ public static final int MAX_CACHE_ENTRIES = 500; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReplicatedSynchronousCommitTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReplicatedSynchronousCommitTest.java index 863ea010c4c7a..801f4ce6d643e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReplicatedSynchronousCommitTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReplicatedSynchronousCommitTest.java @@ -40,12 +40,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * Test cases for preload tests. */ +@RunWith(JUnit4.class) public class GridCacheReplicatedSynchronousCommitTest extends GridCommonAbstractTest { /** */ private static final int ADDITION_CACHE_NUMBER = 2; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReturnValueTransferSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReturnValueTransferSelfTest.java index 6095e9972d7ef..1ad3f4cca2ba0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReturnValueTransferSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReturnValueTransferSelfTest.java @@ -32,6 +32,9 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -39,6 +42,7 @@ /** * Tests transform for extra traffic. */ +@RunWith(JUnit4.class) public class GridCacheReturnValueTransferSelfTest extends GridCommonAbstractTest { /** Distribution mode. */ private boolean cache; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSlowTxWarnTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSlowTxWarnTest.java index 55988cf8bd443..c7e2d877a0b0a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSlowTxWarnTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSlowTxWarnTest.java @@ -27,6 +27,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.LOCAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -37,6 +40,7 @@ * {@link org.apache.ignite.IgniteSystemProperties#IGNITE_SLOW_TX_WARN_TIMEOUT} * system property. */ +@RunWith(JUnit4.class) public class GridCacheSlowTxWarnTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManagerDeserializationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManagerDeserializationTest.java index c49f9c8bb1fd1..f9bd6c0572f70 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManagerDeserializationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManagerDeserializationTest.java @@ -43,6 +43,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; @@ -56,6 +59,7 @@ * https://issues.apache.org/jira/browse/IGNITE-2753 * */ +@RunWith(JUnit4.class) public class GridCacheStoreManagerDeserializationTest extends GridCommonAbstractTest { /** IP finder. */ protected static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheUtilsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheUtilsSelfTest.java index 92f8b756d2556..8dc33e6a8632e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheUtilsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheUtilsSelfTest.java @@ -35,10 +35,14 @@ import org.apache.ignite.marshaller.MarshallerContextTestImpl; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Grid cache utils test. */ +@RunWith(JUnit4.class) public class GridCacheUtilsSelfTest extends GridCommonAbstractTest { /** * Does not override equals and hashCode. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytesPreloadingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytesPreloadingSelfTest.java index eb71be53ae5cb..2d0eed043b95d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytesPreloadingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytesPreloadingSelfTest.java @@ -22,6 +22,9 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -30,6 +33,7 @@ /** * */ +@RunWith(JUnit4.class) public class GridCacheValueBytesPreloadingSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionTopologyChangeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionTopologyChangeTest.java index 7425ec01d0b67..f72162e10228b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionTopologyChangeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionTopologyChangeTest.java @@ -37,6 +37,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils.SF; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -46,6 +49,7 @@ /** * */ +@RunWith(JUnit4.class) public class GridCacheVersionTopologyChangeTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridEvictionPolicyMBeansTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridEvictionPolicyMBeansTest.java index d8a5ce746aea4..b258d5eedd03d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridEvictionPolicyMBeansTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridEvictionPolicyMBeansTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.internal.util.IgniteUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for the eviction policy JMX beans registered by the kernal. */ +@RunWith(JUnit4.class) public class GridEvictionPolicyMBeansTest extends GridCommonAbstractTest { /** Create test and auto-start the grid */ public GridEvictionPolicyMBeansTest() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicStopBusySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicStopBusySelfTest.java index 8eac6910fcf2c..874185e984336 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicStopBusySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicStopBusySelfTest.java @@ -19,10 +19,14 @@ import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicSingleUpdateRequest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Stopped node when client operations are executing. */ +@RunWith(JUnit4.class) public class IgniteCacheAtomicStopBusySelfTest extends IgniteCacheAbstractStopBusySelfTest { /** {@inheritDoc} */ @Override protected CacheAtomicityMode atomicityMode() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryProcessorCallTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryProcessorCallTest.java index 2447ca292215d..fb6b7c8f799d5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryProcessorCallTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryProcessorCallTest.java @@ -34,6 +34,9 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -47,6 +50,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheEntryProcessorCallTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughSingleNodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughSingleNodeTest.java index 242630bd78f90..ce91a18f3f079 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughSingleNodeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughSingleNodeTest.java @@ -17,6 +17,10 @@ package org.apache.ignite.internal.processors.cache; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.LOCAL; @@ -26,6 +30,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheInvokeReadThroughSingleNodeTest extends IgniteCacheInvokeReadThroughAbstractTest { /** {@inheritDoc} */ @Override protected void startNodes() throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughTest.java index bba2319ab9e88..59aaea31c501b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughTest.java @@ -17,6 +17,10 @@ package org.apache.ignite.internal.processors.cache; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -25,6 +29,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheInvokeReadThroughTest extends IgniteCacheInvokeReadThroughAbstractTest { /** {@inheritDoc} */ @Override protected void startNodes() throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheNearLockValueSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheNearLockValueSelfTest.java index 58a4233c60f3d..4fcf30290ad72 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheNearLockValueSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheNearLockValueSelfTest.java @@ -32,6 +32,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ; @@ -39,6 +42,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheNearLockValueSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheObjectPutSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheObjectPutSelfTest.java index 6ed02101bf902..916d494449853 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheObjectPutSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheObjectPutSelfTest.java @@ -25,10 +25,14 @@ import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.processors.cacheobject.IgniteCacheObjectProcessor; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteCacheObjectPutSelfTest extends GridCommonAbstractTest { /** */ public static final String CACHE_NAME = "partitioned"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryAtomicEntryProcessorDeploymentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryAtomicEntryProcessorDeploymentSelfTest.java index 5f574707c9f27..35a4d7630841d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryAtomicEntryProcessorDeploymentSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryAtomicEntryProcessorDeploymentSelfTest.java @@ -22,10 +22,14 @@ import org.apache.ignite.binary.BinaryObject; import org.apache.ignite.configuration.DeploymentMode; import org.apache.ignite.internal.processors.cache.GridCacheAtomicEntryProcessorDeploymentSelfTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Cache EntryProcessor + Deployment. */ +@RunWith(JUnit4.class) public class GridCacheBinaryAtomicEntryProcessorDeploymentSelfTest extends GridCacheAtomicEntryProcessorDeploymentSelfTest { /** {@inheritDoc} */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractDataStreamerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractDataStreamerSelfTest.java index 0539a7e775ec3..05fac42eb405f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractDataStreamerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractDataStreamerSelfTest.java @@ -39,12 +39,16 @@ import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.PRIMARY_SYNC; /** * Test for binary objects stored in cache. */ +@RunWith(JUnit4.class) public abstract class GridCacheBinaryObjectsAbstractDataStreamerSelfTest extends GridCommonAbstractTest { /** */ private static final int THREAD_CNT = 64; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLoadingConcurrentGridStartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLoadingConcurrentGridStartSelfTest.java index d8704013c8ad3..c950cb6b7ffd4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLoadingConcurrentGridStartSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLoadingConcurrentGridStartSelfTest.java @@ -52,6 +52,9 @@ import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -61,6 +64,7 @@ /** * Tests for cache data loading during simultaneous grids start. */ +@RunWith(JUnit4.class) public class CacheLoadingConcurrentGridStartSelfTest extends GridCommonAbstractTest implements Serializable { /** Grids count */ private static int GRIDS_CNT = 5; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCache150ClientsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCache150ClientsTest.java index 5e27ee08f7128..eab5e1ac26998 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCache150ClientsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCache150ClientsTest.java @@ -37,6 +37,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.PRIMARY_SYNC; @@ -44,6 +47,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCache150ClientsTest extends GridCommonAbstractTest { /** */ protected static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheCreatePutTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheCreatePutTest.java index 5708ebc131659..b630fb07e513c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheCreatePutTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheCreatePutTest.java @@ -34,6 +34,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -44,6 +47,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheCreatePutTest extends GridCommonAbstractTest { /** Grid count. */ private static final int GRID_CNT = 3; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheMessageWriteTimeoutTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheMessageWriteTimeoutTest.java index aa647735ad808..fa1488cee6405 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheMessageWriteTimeoutTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheMessageWriteTimeoutTest.java @@ -31,10 +31,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteCacheMessageWriteTimeoutTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/CacheGetReadFromBackupFailoverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/CacheGetReadFromBackupFailoverTest.java index c27beaf2c35ed..53d33b705a593 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/CacheGetReadFromBackupFailoverTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/CacheGetReadFromBackupFailoverTest.java @@ -48,6 +48,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -57,6 +60,7 @@ /** * Test for getting values on unstable topology with read from backup enabled. */ +@RunWith(JUnit4.class) public class CacheGetReadFromBackupFailoverTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheColocatedDebugTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheColocatedDebugTest.java index 56ce436d8932d..42a82a493acb6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheColocatedDebugTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheColocatedDebugTest.java @@ -49,6 +49,9 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -60,6 +63,7 @@ /** * Tests for colocated cache. */ +@RunWith(JUnit4.class) public class GridCacheColocatedDebugTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadPerformanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadPerformanceTest.java index e21f69f14aa75..989b30dc1fc0c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadPerformanceTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadPerformanceTest.java @@ -33,10 +33,14 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import java.util.concurrent.Callable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test cases for partitioned cache {@link GridDhtPreloader preloader}. */ +@RunWith(JUnit4.class) public class GridCacheDhtPreloadPerformanceTest extends GridCommonAbstractTest { /** */ private static final int THREAD_CNT = 30; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedTopologyChangeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedTopologyChangeSelfTest.java index 34a5e95562da5..389876f58713c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedTopologyChangeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedTopologyChangeSelfTest.java @@ -46,6 +46,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; @@ -58,6 +61,7 @@ /** * Tests that new transactions do not start until partition exchange is completed. */ +@RunWith(JUnit4.class) public class GridCachePartitionedTopologyChangeSelfTest extends GridCommonAbstractTest { /** Partition does not belong to node. */ private static final int PARTITION_READER = 0; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedTxOriginatingNodeFailureSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedTxOriginatingNodeFailureSelfTest.java index 799f90b4003be..66f25bdd077ae 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedTxOriginatingNodeFailureSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedTxOriginatingNodeFailureSelfTest.java @@ -27,10 +27,14 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.internal.processors.cache.distributed.IgniteTxOriginatingNodeFailureAbstractSelfTest; import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxPrepareRequest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests transaction consistency when originating node fails. */ +@RunWith(JUnit4.class) public class GridCachePartitionedTxOriginatingNodeFailureSelfTest extends IgniteTxOriginatingNodeFailureAbstractSelfTest { /** */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedUnloadEventsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedUnloadEventsSelfTest.java index 38a913933db1a..04c835a7c342f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedUnloadEventsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedUnloadEventsSelfTest.java @@ -36,6 +36,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; @@ -44,6 +47,7 @@ /** */ +@RunWith(JUnit4.class) public class GridCachePartitionedUnloadEventsSelfTest extends GridCommonAbstractTest { /** */ private TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheClearDuringRebalanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheClearDuringRebalanceTest.java index 4c2d97a2aa747..71e604195cb4a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheClearDuringRebalanceTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheClearDuringRebalanceTest.java @@ -30,12 +30,16 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** * */ +@RunWith(JUnit4.class) public class IgniteCacheClearDuringRebalanceTest extends GridCommonAbstractTest { /** */ private static final String CACHE_NAME = "cache"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheCrossCacheTxFailoverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheCrossCacheTxFailoverTest.java index 4f7d422f2c9d0..c61d257c0fc46 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheCrossCacheTxFailoverTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheCrossCacheTxFailoverTest.java @@ -49,6 +49,9 @@ import org.apache.ignite.transactions.TransactionIsolation; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -63,6 +66,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheCrossCacheTxFailoverTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedEvictionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedEvictionSelfTest.java index 567b29e346538..a6937edf5d887 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedEvictionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedEvictionSelfTest.java @@ -36,6 +36,9 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -49,6 +52,7 @@ /** * Tests for partitioned cache automatic eviction. */ +@RunWith(JUnit4.class) public class GridCachePartitionedEvictionSelfTest extends GridCacheAbstractSelfTest { /** */ private static final boolean TEST_INFO = true; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheStoreUpdateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheStoreUpdateTest.java index 7fc2f405c4b35..c1f279cdfbd71 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheStoreUpdateTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheStoreUpdateTest.java @@ -43,10 +43,14 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Check that near cache is updated when entry loaded from store. */ +@RunWith(JUnit4.class) public class GridNearCacheStoreUpdateTest extends GridCommonAbstractTest { /** */ private static final String CACHE_NAME = "cache"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruEvictionPolicyFactorySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruEvictionPolicyFactorySelfTest.java index 4bb4fc8879473..17af3d9641420 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruEvictionPolicyFactorySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruEvictionPolicyFactorySelfTest.java @@ -22,10 +22,14 @@ import org.apache.ignite.cache.eviction.lru.LruEvictionPolicy; import org.apache.ignite.cache.eviction.lru.LruEvictionPolicyFactory; import org.apache.ignite.internal.processors.cache.eviction.EvictionPolicyFactoryAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * LRU Eviction policy tests. */ +@RunWith(JUnit4.class) public class LruEvictionPolicyFactorySelfTest extends EvictionPolicyFactoryAbstractTest> { /** {@inheritDoc} */ @Override protected Factory> createPolicyFactory() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheClientNearCacheExpiryTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheClientNearCacheExpiryTest.java index efde7b847321e..4ec23fe6b8f8e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheClientNearCacheExpiryTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheClientNearCacheExpiryTest.java @@ -33,6 +33,9 @@ import org.apache.ignite.internal.processors.cache.IgniteCacheProxy; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -40,6 +43,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheClientNearCacheExpiryTest extends IgniteCacheAbstractTest { /** */ private static final int NODES = 3; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheAtomicLocalTckMetricsSelfTestImpl.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheAtomicLocalTckMetricsSelfTestImpl.java index 3e7a73d6bfc66..f2d73eb978577 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheAtomicLocalTckMetricsSelfTestImpl.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheAtomicLocalTckMetricsSelfTestImpl.java @@ -21,10 +21,14 @@ import javax.cache.processor.EntryProcessorException; import javax.cache.processor.MutableEntry; import org.apache.ignite.IgniteCache; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Local atomic cache metrics test with tck specific. */ +@RunWith(JUnit4.class) public class GridCacheAtomicLocalTckMetricsSelfTestImpl extends GridCacheAtomicLocalMetricsSelfTest { /** * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCacheDestroyDuringCheckpointTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCacheDestroyDuringCheckpointTest.java index 549b82260bfc6..1d95bfec22c40 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCacheDestroyDuringCheckpointTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCacheDestroyDuringCheckpointTest.java @@ -28,10 +28,14 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for cache creation/deletion with frequent checkpoints. */ +@RunWith(JUnit4.class) public class IgnitePdsCacheDestroyDuringCheckpointTest extends GridCommonAbstractTest { /** */ private static final String NAME_PREFIX = "CACHE-"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCacheIntegrationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCacheIntegrationTest.java index 73cb2599cdbeb..213104b505e5c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCacheIntegrationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCacheIntegrationTest.java @@ -43,10 +43,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgnitePdsCacheIntegrationTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); From dfa7f1f5970bbab065ce2a1a1424e7e8d5c6f8db Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Tue, 4 Dec 2018 02:06:11 +0300 Subject: [PATCH 040/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview --- .../processors/cache/GridCacheAffinityMapperSelfTest.java | 4 ++++ .../cache/GridLocalCacheStoreManagerDeserializationTest.java | 4 ++++ .../processors/cache/IgniteCacheNoSyncForGetTest.java | 4 ++++ .../GridCacheBinaryObjectMetadataExchangeMultinodeTest.java | 4 ++++ .../cache/distributed/CacheLateAffinityAssignmentTest.java | 4 ++++ .../IgniteCacheClientMultiNodeUpdateTopologyLockTest.java | 4 ++++ .../IgniteCacheClientNodeChangingTopologyTest.java | 4 ++++ .../dht/IgniteAtomicLongChangingTopologySelfTest.java | 4 ++++ .../cache/distributed/near/GridCacheNearClientHitTest.java | 4 ++++ .../internal/GridInternalTasksLoadBalancingSelfTest.java | 4 ++++ 10 files changed, 40 insertions(+) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityMapperSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityMapperSelfTest.java index 7779e4035a36b..272e3e2a38a78 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityMapperSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityMapperSelfTest.java @@ -24,10 +24,14 @@ import org.apache.ignite.cache.affinity.AffinityKeyMapper; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test affinity mapper. */ +@RunWith(JUnit4.class) public class GridCacheAffinityMapperSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridLocalCacheStoreManagerDeserializationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridLocalCacheStoreManagerDeserializationTest.java index 97ab677d469b4..c2fea0cfc94c9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridLocalCacheStoreManagerDeserializationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridLocalCacheStoreManagerDeserializationTest.java @@ -27,6 +27,9 @@ import javax.cache.expiry.ExpiryPolicy; import java.util.UUID; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Checks whether storing to local store doesn't cause binary objects unmarshalling, @@ -36,6 +39,7 @@ * https://issues.apache.org/jira/browse/IGNITE-2753 * */ +@RunWith(JUnit4.class) public class GridLocalCacheStoreManagerDeserializationTest extends GridCacheStoreManagerDeserializationTest { /** {@inheritDoc} */ @Override protected CacheMode cacheMode() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheNoSyncForGetTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheNoSyncForGetTest.java index 1aa3046df0df6..0ee05aef4f88f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheNoSyncForGetTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheNoSyncForGetTest.java @@ -44,6 +44,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -54,6 +57,7 @@ * */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class IgniteCacheNoSyncForGetTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectMetadataExchangeMultinodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectMetadataExchangeMultinodeTest.java index e767200febfa6..07865622c28b6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectMetadataExchangeMultinodeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectMetadataExchangeMultinodeTest.java @@ -53,10 +53,14 @@ import org.apache.ignite.testframework.GridTestUtils.DiscoverySpiListenerWrapper; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class GridCacheBinaryObjectMetadataExchangeMultinodeTest extends GridCommonAbstractTest { /** */ protected static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLateAffinityAssignmentTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLateAffinityAssignmentTest.java index 671a3d6d66d74..c424217ef3834 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLateAffinityAssignmentTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLateAffinityAssignmentTest.java @@ -98,6 +98,9 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -109,6 +112,7 @@ /** * */ +@RunWith(JUnit4.class) public class CacheLateAffinityAssignmentTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientMultiNodeUpdateTopologyLockTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientMultiNodeUpdateTopologyLockTest.java index 4875911c3ace0..c27bb20f29f31 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientMultiNodeUpdateTopologyLockTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientMultiNodeUpdateTopologyLockTest.java @@ -38,6 +38,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheRebalanceMode.ASYNC; @@ -48,6 +51,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheClientMultiNodeUpdateTopologyLockTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeChangingTopologyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeChangingTopologyTest.java index b6b5b25e0d5cb..4855333ef5bdf 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeChangingTopologyTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeChangingTopologyTest.java @@ -92,6 +92,9 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -106,6 +109,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstractTest { /** */ protected static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteAtomicLongChangingTopologySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteAtomicLongChangingTopologySelfTest.java index 3ea7c8dd0f913..60b240f2c7473 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteAtomicLongChangingTopologySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteAtomicLongChangingTopologySelfTest.java @@ -46,6 +46,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -54,6 +57,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteAtomicLongChangingTopologySelfTest extends GridCommonAbstractTest { /** Grid count. */ private static final int GRID_CNT = 5; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearClientHitTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearClientHitTest.java index 719875797ace0..9e49aa38a92c9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearClientHitTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearClientHitTest.java @@ -29,12 +29,16 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CachePeekMode.NEAR; /** * */ +@RunWith(JUnit4.class) public class GridCacheNearClientHitTest extends GridCommonAbstractTest { /** Ip finder. */ private static final TcpDiscoveryVmIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/internal/GridInternalTasksLoadBalancingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/internal/GridInternalTasksLoadBalancingSelfTest.java index ef333e16cf1e8..59c1df6036ef8 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/internal/GridInternalTasksLoadBalancingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/internal/GridInternalTasksLoadBalancingSelfTest.java @@ -42,10 +42,14 @@ import org.apache.ignite.spi.loadbalancing.LoadBalancingSpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test that will start two nodes with custom load balancing SPI and execute {@link GridInternal} task on it. */ +@RunWith(JUnit4.class) public class GridInternalTasksLoadBalancingSelfTest extends GridCommonAbstractTest { /** Grid count. */ private static final int GRID_CNT = 2; From a488548908ff8c8c4fda28a831d6815e9fe72ac1 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Tue, 4 Dec 2018 02:18:15 +0300 Subject: [PATCH 041/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - wip - migrating // compilable milestone -- verified with diffs overview and rebuild --- .../java/org/apache/ignite/internal/ClusterGroupSelfTest.java | 4 ++++ .../apache/ignite/internal/ClusterNodeMetricsUpdateTest.java | 4 ++++ .../ignite/internal/GridJobCheckpointCleanupSelfTest.java | 4 ++++ .../ignite/internal/processors/cache/CacheComparatorTest.java | 4 ++++ .../processors/cache/CacheDeferredDeleteSanitySelfTest.java | 4 ++++ .../internal/processors/cache/CacheRebalancingSelfTest.java | 4 ++++ .../cache/GridCacheAsyncOperationsLimitSelfTest.java | 4 ++++ .../processors/cache/GridCacheDeploymentSelfTest.java | 4 ++++ .../cache/GridCacheQueryIndexingDisabledSelfTest.java | 4 ++++ .../processors/cache/IgniteCacheContainsKeyAtomicTest.java | 4 ++++ .../internal/processors/cache/IgniteCacheIncrementTxTest.java | 4 ++++ .../cache/IgniteCacheLoadRebalanceEvictionSelfTest.java | 4 ++++ .../GridCachePartitionedQueueEntryMoveSelfTest.java | 4 ++++ .../distributed/CacheGetInsideLockChangingTopologyTest.java | 4 ++++ .../cache/distributed/CacheOperationsInterruptTest.java | 4 ++++ .../cache/distributed/GridCacheMixedModeSelfTest.java | 4 ++++ .../distributed/IgniteCacheCreatePutMultiNodeSelfTest.java | 4 ++++ .../cache/distributed/IgniteCachePrimarySyncTest.java | 4 ++++ .../cache/distributed/IgniteCacheReadFromBackupTest.java | 4 ++++ .../distributed/IgniteCacheSystemTransactionsSelfTest.java | 4 ++++ .../distributed/dht/GridCacheDhtPreloadPutGetSelfTest.java | 4 ++++ .../cache/distributed/dht/GridCacheGlobalLoadTest.java | 4 ++++ .../near/GridCacheRendezvousAffinityClientSelfTest.java | 4 ++++ ...oundRobinLoadBalancingNotPerTaskMultithreadedSelfTest.java | 4 ++++ .../GridWeightedRandomLoadBalancingSpiWeightedSelfTest.java | 4 ++++ 25 files changed, 100 insertions(+) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupSelfTest.java index b7f5d4a0b1dfe..0fb9f80bd89a5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupSelfTest.java @@ -35,11 +35,15 @@ import org.apache.ignite.marshaller.Marshaller; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for {@link ClusterGroup}. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class ClusterGroupSelfTest extends ClusterGroupAbstractTest { /** Nodes count. */ private static final int NODES_CNT = 4; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsUpdateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsUpdateTest.java index dd6496e3c1c57..23d3700c496dd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsUpdateTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsUpdateTest.java @@ -35,10 +35,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class ClusterNodeMetricsUpdateTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridJobCheckpointCleanupSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridJobCheckpointCleanupSelfTest.java index b5a8b91b3efa4..b016a2f86fd87 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridJobCheckpointCleanupSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridJobCheckpointCleanupSelfTest.java @@ -38,10 +38,14 @@ import org.apache.ignite.spi.checkpoint.CheckpointSpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for checkpoint cleanup. */ +@RunWith(JUnit4.class) public class GridJobCheckpointCleanupSelfTest extends GridCommonAbstractTest { /** Number of currently alive checkpoints. */ private final AtomicInteger cntr = new AtomicInteger(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheComparatorTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheComparatorTest.java index 46d182b24aa6a..66bdcfdcf434d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheComparatorTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheComparatorTest.java @@ -20,10 +20,14 @@ import junit.framework.TestCase; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.internal.processors.query.QuerySchema; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for CacheComparators from ClusterCachesInfo */ +@RunWith(JUnit4.class) public class CacheComparatorTest extends TestCase { /** * Test if comparator not violates its general contract diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDeferredDeleteSanitySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDeferredDeleteSanitySelfTest.java index a284cd90d9d91..35205e3697b1d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDeferredDeleteSanitySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDeferredDeleteSanitySelfTest.java @@ -23,6 +23,9 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -33,6 +36,7 @@ /** * Sanity tests of deferred delete for different cache configurations. */ +@RunWith(JUnit4.class) public class CacheDeferredDeleteSanitySelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheRebalancingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheRebalancingSelfTest.java index 5ac6460c645d0..c3085f6c83a28 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheRebalancingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheRebalancingSelfTest.java @@ -37,10 +37,14 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for rebalancing. */ +@RunWith(JUnit4.class) public class CacheRebalancingSelfTest extends GridCommonAbstractTest { /** Cache name with one backups */ private static final String REBALANCE_TEST_CACHE_NAME = "rebalanceCache"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAsyncOperationsLimitSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAsyncOperationsLimitSelfTest.java index 9b35facb8be24..fad6806dfe5c2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAsyncOperationsLimitSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAsyncOperationsLimitSelfTest.java @@ -22,10 +22,14 @@ import org.apache.ignite.internal.util.GridAtomicInteger; import org.apache.ignite.internal.util.typedef.CI1; import org.apache.ignite.lang.IgniteFuture; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Checks that number of concurrent asynchronous operations is limited when configuration parameter is set. */ +@RunWith(JUnit4.class) public class GridCacheAsyncOperationsLimitSelfTest extends GridCacheAbstractSelfTest { /** */ public static final int MAX_CONCURRENT_ASYNC_OPS = 50; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentSelfTest.java index e29b43bac52a8..f3aa2c3a54f02 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentSelfTest.java @@ -34,6 +34,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -45,6 +48,7 @@ /** * Cache + Deployment test. */ +@RunWith(JUnit4.class) public class GridCacheDeploymentSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryIndexingDisabledSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryIndexingDisabledSelfTest.java index b8caa079a1de5..fbbacd80480d6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryIndexingDisabledSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryIndexingDisabledSelfTest.java @@ -27,10 +27,14 @@ import org.apache.ignite.cache.query.TextQuery; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class GridCacheQueryIndexingDisabledSelfTest extends GridCacheAbstractSelfTest { /** {@inheritDoc} */ @Override protected int gridCount() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheContainsKeyAtomicTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheContainsKeyAtomicTest.java index 86681f2c0e744..73324685437a3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheContainsKeyAtomicTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheContainsKeyAtomicTest.java @@ -23,6 +23,9 @@ import org.apache.ignite.IgniteCache; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -31,6 +34,7 @@ /** * Verifies that containsKey() works as expected on atomic cache. */ +@RunWith(JUnit4.class) public class IgniteCacheContainsKeyAtomicTest extends GridCacheAbstractSelfTest { /** Cache name. */ public static final String CACHE_NAME = "replicated"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheIncrementTxTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheIncrementTxTest.java index 0b538f00df51b..d595cc9b39c49 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheIncrementTxTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheIncrementTxTest.java @@ -39,6 +39,9 @@ import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -48,6 +51,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheIncrementTxTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLoadRebalanceEvictionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLoadRebalanceEvictionSelfTest.java index 3723815f11e6b..73d8754ffbd64 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLoadRebalanceEvictionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLoadRebalanceEvictionSelfTest.java @@ -46,10 +46,14 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteCacheLoadRebalanceEvictionSelfTest extends GridCommonAbstractTest { /** */ public static final int LRU_MAX_SIZE = 10; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueEntryMoveSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueEntryMoveSelfTest.java index cb99212289f5f..ea34e74e6bf12 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueEntryMoveSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueEntryMoveSelfTest.java @@ -38,6 +38,9 @@ import org.apache.ignite.internal.processors.cache.datastructures.IgniteCollectionAbstractTest; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -45,6 +48,7 @@ /** * Cache queue test with changing topology. */ +@RunWith(JUnit4.class) public class GridCachePartitionedQueueEntryMoveSelfTest extends IgniteCollectionAbstractTest { /** Queue capacity. */ private static final int QUEUE_CAP = 5; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGetInsideLockChangingTopologyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGetInsideLockChangingTopologyTest.java index ebfd7bb9f5e68..b8dd5aa8cea68 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGetInsideLockChangingTopologyTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGetInsideLockChangingTopologyTest.java @@ -44,6 +44,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -56,6 +59,7 @@ /** * */ +@RunWith(JUnit4.class) public class CacheGetInsideLockChangingTopologyTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheOperationsInterruptTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheOperationsInterruptTest.java index f4290e70f2eef..f4b1beb685d62 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheOperationsInterruptTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheOperationsInterruptTest.java @@ -33,6 +33,9 @@ import java.util.concurrent.Callable; import java.util.concurrent.ThreadLocalRandom; import java.util.concurrent.atomic.AtomicBoolean; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -43,6 +46,7 @@ /** * */ +@RunWith(JUnit4.class) public class CacheOperationsInterruptTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMixedModeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMixedModeSelfTest.java index 688662d557c11..abfff2a3392bc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMixedModeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMixedModeSelfTest.java @@ -24,12 +24,16 @@ import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests cache puts in mixed mode. * * TODO IGNITE-10345: Remove test in ignite 3.0. */ +@RunWith(JUnit4.class) public class GridCacheMixedModeSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheCreatePutMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheCreatePutMultiNodeSelfTest.java index ee131a585c228..9062a2441528c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheCreatePutMultiNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheCreatePutMultiNodeSelfTest.java @@ -35,10 +35,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteCacheCreatePutMultiNodeSelfTest extends GridCommonAbstractTest { /** Grid count. */ private static final int GRID_CNT = 4; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCachePrimarySyncTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCachePrimarySyncTest.java index a2a36af110462..12d490b9b4abd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCachePrimarySyncTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCachePrimarySyncTest.java @@ -32,6 +32,9 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -45,6 +48,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCachePrimarySyncTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheReadFromBackupTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheReadFromBackupTest.java index b5e292941aad9..d673827f8b2f6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheReadFromBackupTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheReadFromBackupTest.java @@ -47,6 +47,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -56,6 +59,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheReadFromBackupTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSystemTransactionsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSystemTransactionsSelfTest.java index 624a315c7b77a..5c16b7d43f741 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSystemTransactionsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSystemTransactionsSelfTest.java @@ -31,6 +31,9 @@ import org.apache.ignite.internal.util.typedef.internal.CU; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC; @@ -41,6 +44,7 @@ /** * Tests that system transactions do not interact with user transactions. */ +@RunWith(JUnit4.class) public class IgniteCacheSystemTransactionsSelfTest extends GridCacheAbstractSelfTest { /** {@inheritDoc} */ @Override protected int gridCount() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadPutGetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadPutGetSelfTest.java index 0fdf35391c46d..73aaac4e783a2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadPutGetSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadPutGetSelfTest.java @@ -36,6 +36,9 @@ import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheRebalanceMode.ASYNC; @@ -46,6 +49,7 @@ /** * Test cases for partitioned cache {@link GridDhtPreloader preloader}. */ +@RunWith(JUnit4.class) public class GridCacheDhtPreloadPutGetSelfTest extends GridCommonAbstractTest { /** Key count. */ private static final int KEY_CNT = 1000; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheGlobalLoadTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheGlobalLoadTest.java index 5b95ed6946c5d..0de12d7fd97f0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheGlobalLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheGlobalLoadTest.java @@ -34,6 +34,9 @@ import org.apache.ignite.resources.IgniteInstanceResource; import org.jetbrains.annotations.Nullable; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -42,6 +45,7 @@ * Load cache test. */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class GridCacheGlobalLoadTest extends IgniteCacheAbstractTest { /** */ private static ConcurrentMap map; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheRendezvousAffinityClientSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheRendezvousAffinityClientSelfTest.java index 25cad8384754a..71daeca500df3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheRendezvousAffinityClientSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheRendezvousAffinityClientSelfTest.java @@ -32,10 +32,14 @@ import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests rendezvous affinity function with CLIENT_ONLY node (GG-8768). */ +@RunWith(JUnit4.class) public class GridCacheRendezvousAffinityClientSelfTest extends GridCommonAbstractTest { /** Client node. */ private boolean client; diff --git a/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/roundrobin/GridRoundRobinLoadBalancingNotPerTaskMultithreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/roundrobin/GridRoundRobinLoadBalancingNotPerTaskMultithreadedSelfTest.java index fab985a31cb9f..f786d4e1e2f77 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/roundrobin/GridRoundRobinLoadBalancingNotPerTaskMultithreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/roundrobin/GridRoundRobinLoadBalancingNotPerTaskMultithreadedSelfTest.java @@ -33,11 +33,15 @@ import org.apache.ignite.testframework.junits.spi.GridSpiAbstractTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; import org.apache.ignite.testframework.junits.spi.GridSpiTestConfig; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Multithreaded tests for global load balancer. */ @GridSpiTest(spi = RoundRobinLoadBalancingSpi.class, group = "Load Balancing SPI") +@RunWith(JUnit4.class) public class GridRoundRobinLoadBalancingNotPerTaskMultithreadedSelfTest extends GridSpiAbstractTest { /** Thread count. */ diff --git a/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/weightedrandom/GridWeightedRandomLoadBalancingSpiWeightedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/weightedrandom/GridWeightedRandomLoadBalancingSpiWeightedSelfTest.java index 1bc47ccdfcf85..e751be0de45c5 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/weightedrandom/GridWeightedRandomLoadBalancingSpiWeightedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/weightedrandom/GridWeightedRandomLoadBalancingSpiWeightedSelfTest.java @@ -31,6 +31,9 @@ import org.apache.ignite.testframework.junits.spi.GridSpiAbstractTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; import org.apache.ignite.testframework.junits.spi.GridSpiTestConfig; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.spi.loadbalancing.weightedrandom.WeightedRandomLoadBalancingSpi.NODE_WEIGHT_ATTR_NAME; @@ -38,6 +41,7 @@ * {@link WeightedRandomLoadBalancingSpi} self test. */ @GridSpiTest(spi = WeightedRandomLoadBalancingSpi.class, group = "Load Balancing SPI") +@RunWith(JUnit4.class) public class GridWeightedRandomLoadBalancingSpiWeightedSelfTest extends GridSpiAbstractTest { /** From 0998fae8396fcf825e5f80a951b69dd4de66a582 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Tue, 4 Dec 2018 02:25:47 +0300 Subject: [PATCH 042/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - wip - messing with override -- verified with diffs overview and rebuild --- .../apache/ignite/internal/GridSelfTest.java | 8 +- ...ncryptedCachePreconfiguredRestartTest.java | 4 +- ...ntryPessimisticRepeatableReadSeltTest.java | 4 +- .../GridCacheLifecycleAwareSelfTest.java | 4 +- ...odeUpdateNearEnabledNoBackupsSelfTest.java | 4 +- ...cheMultinodeUpdateNearEnabledSelfTest.java | 4 +- .../IgniteCacheAtomicStopBusySelfTest.java | 16 ++-- ...iteCacheP2pUnmarshallingNearErrorTest.java | 4 +- ...cheP2pUnmarshallingRebalanceErrorTest.java | 4 +- ...gniteCacheP2pUnmarshallingTxErrorTest.java | 4 +- ...iteCacheTransactionalStopBusySelfTest.java | 16 ++-- .../cache/IgniteCacheTxNearPeekModesTest.java | 4 +- .../cache/IgniteCacheTxPeekModesTest.java | 4 +- ...ogyValidatorAbstractTxCacheGroupsTest.java | 4 +- ...eTopologyValidatorAbstractTxCacheTest.java | 4 +- ...ologyValidatorCacheGroupsAbstractTest.java | 4 +- ...eptorCacheConfigVariationsFullApiTest.java | 12 +-- ...ePartitionedAtomicSetFailoverSelfTest.java | 4 +- .../IgniteCacheAtomicNodeRestartTest.java | 4 +- .../dht/GridCacheAtomicFullApiSelfTest.java | 4 +- ...hePartitionedNearDisabledLockSelfTest.java | 4 +- ...micClientOnlyMultiNodeFullApiSelfTest.java | 32 +++---- ...tomicNearOnlyMultiNodeFullApiSelfTest.java | 4 +- ...CacheNearOnlyMultiNodeFullApiSelfTest.java | 20 ++--- .../GridCachePartitionedBasicOpSelfTest.java | 16 ++-- ...CachePartitionedMultiNodeLockSelfTest.java | 20 ++--- .../GridCachePartitionedNodeRestartTest.java | 60 ++++++------- ...artitionedOptimisticTxNodeRestartTest.java | 60 ++++++------- ...idCachePartitionedTxMultiNodeSelfTest.java | 28 +++---- ...eRebalancingPartitionDistributionTest.java | 3 +- .../GridCacheReplicatedLockSelfTest.java | 4 +- ...ridCacheReplicatedNodeRestartSelfTest.java | 64 +++++++------- ...idCacheReplicatedTxMultiNodeBasicTest.java | 28 +++---- ...ntinuousQueryReplicatedAtomicSelfTest.java | 4 +- ...iteComputeConfigVariationsFullApiTest.java | 3 +- .../IgniteDbSingleNodeTinyPutGetTest.java | 84 +++++++++---------- .../DataStreamProcessorMvccSelfTest.java | 12 +-- ...condaryFileSystemDualAbstractSelfTest.java | 4 +- .../igfs/IgfsPrimaryMultiNodeSelfTest.java | 4 +- ...iteServiceProxyTimeoutInitializedTest.java | 3 +- .../internal/util/nio/GridNioSslSelfTest.java | 8 +- ...idMessagingNoPeerClassLoadingSelfTest.java | 4 +- .../GridTcpCommunicationSpiAbstractTest.java | 4 +- 43 files changed, 293 insertions(+), 296 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridSelfTest.java index 07ebe72374488..32b0e8a73fc47 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridSelfTest.java @@ -69,8 +69,8 @@ public class GridSelfTest extends ClusterGroupAbstractTest { } /** {@inheritDoc} */ - @Override @Test - public void testRemoteNodes() throws Exception { + @Test + @Override public void testRemoteNodes() throws Exception { int size = remoteNodeIds().size(); String name = "oneMoreGrid"; @@ -90,8 +90,8 @@ public void testRemoteNodes() throws Exception { } /** {@inheritDoc} */ - @Override @Test - public void testRemoteProjection() throws Exception { + @Test + @Override public void testRemoteProjection() throws Exception { ClusterGroup remotePrj = projection().forRemotes(); int size = remotePrj.nodes().size(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCachePreconfiguredRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCachePreconfiguredRestartTest.java index 85d6ee88ac044..58e2c3d1b1760 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCachePreconfiguredRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/encryption/EncryptedCachePreconfiguredRestartTest.java @@ -53,8 +53,8 @@ public void testDifferentPreconfiguredCachesOnNodes() throws Exception { } /** {@inheritDoc} */ - @Override @Test - public void testCreateEncryptedCache() throws Exception { + @Test + @Override public void testCreateEncryptedCache() throws Exception { differentCachesOnNodes = false; super.testCreateEncryptedCache(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryPessimisticRepeatableReadSeltTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryPessimisticRepeatableReadSeltTest.java index 94e49f9e57214..4dd7030b1089d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryPessimisticRepeatableReadSeltTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryPessimisticRepeatableReadSeltTest.java @@ -38,8 +38,8 @@ public class CacheGetEntryPessimisticRepeatableReadSeltTest extends CacheGetEntr return TransactionIsolation.REPEATABLE_READ; } - @Override @Test - public void testReplicatedTransactional() throws Exception { + @Test + @Override public void testReplicatedTransactional() throws Exception { super.testReplicatedTransactional(); } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLifecycleAwareSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLifecycleAwareSelfTest.java index c57adc5c0e609..6654edc6a463b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLifecycleAwareSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLifecycleAwareSelfTest.java @@ -369,8 +369,8 @@ public TestTopologyValidator() { /** {@inheritDoc} */ @SuppressWarnings("ErrorNotRethrown") - @Override @Test - public void testLifecycleAware() throws Exception { + @Test + @Override public void testLifecycleAware() throws Exception { for (boolean nearEnabled : new boolean[] {true, false}) { near = nearEnabled; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateNearEnabledNoBackupsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateNearEnabledNoBackupsSelfTest.java index 1ca6508c20fdb..0ad58b704ca4f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateNearEnabledNoBackupsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateNearEnabledNoBackupsSelfTest.java @@ -42,8 +42,8 @@ public class GridCacheMultinodeUpdateNearEnabledNoBackupsSelfTest extends GridCa } /** {@inheritDoc} */ - @Override @Test - public void testInvoke() throws Exception { + @Test + @Override public void testInvoke() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-809"); } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateNearEnabledSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateNearEnabledSelfTest.java index 74f197e7410cc..257b03ff07ab4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateNearEnabledSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateNearEnabledSelfTest.java @@ -41,8 +41,8 @@ public class GridCacheMultinodeUpdateNearEnabledSelfTest extends GridCacheMultin } /** {@inheritDoc} */ - @Override @Test - public void testInvoke() throws Exception { + @Test + @Override public void testInvoke() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-809"); } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicStopBusySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicStopBusySelfTest.java index 874185e984336..58ab3bb3279b3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicStopBusySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicStopBusySelfTest.java @@ -34,32 +34,32 @@ public class IgniteCacheAtomicStopBusySelfTest extends IgniteCacheAbstractStopBu } /** {@inheritDoc} */ - @Override @Test - public void testPut() throws Exception { + @Test + @Override public void testPut() throws Exception { bannedMsg.set(GridNearAtomicSingleUpdateRequest.class); super.testPut(); } /** {@inheritDoc} */ - @Override @Test - public void testPutBatch() throws Exception { + @Test + @Override public void testPutBatch() throws Exception { bannedMsg.set(GridNearAtomicSingleUpdateRequest.class); super.testPut(); } /** {@inheritDoc} */ - @Override @Test - public void testPutAsync() throws Exception { + @Test + @Override public void testPutAsync() throws Exception { bannedMsg.set(GridNearAtomicSingleUpdateRequest.class); super.testPut(); } /** {@inheritDoc} */ - @Override @Test - public void testRemove() throws Exception { + @Test + @Override public void testRemove() throws Exception { bannedMsg.set(GridNearAtomicSingleUpdateRequest.class); super.testPut(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingNearErrorTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingNearErrorTest.java index ff5b67f90b710..5dca856e5accf 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingNearErrorTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingNearErrorTest.java @@ -47,8 +47,8 @@ public class IgniteCacheP2pUnmarshallingNearErrorTest extends IgniteCacheP2pUnma } /** {@inheritDoc} */ - @Override @Test - public void testResponseMessageOnUnmarshallingFailed() throws InterruptedException { + @Test + @Override public void testResponseMessageOnUnmarshallingFailed() throws InterruptedException { //GridCacheEvictionRequest unmarshalling failed test. readCnt.set(5); //2 for each put. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingRebalanceErrorTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingRebalanceErrorTest.java index 086f6d95400d3..1183d6a17300b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingRebalanceErrorTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingRebalanceErrorTest.java @@ -39,8 +39,8 @@ public class IgniteCacheP2pUnmarshallingRebalanceErrorTest extends IgniteCacheP2 } /** {@inheritDoc} */ - @Override @Test - public void testResponseMessageOnUnmarshallingFailed() throws Exception { + @Test + @Override public void testResponseMessageOnUnmarshallingFailed() throws Exception { //GridDhtPartitionSupplyMessage unmarshalling failed test. readCnt.set(Integer.MAX_VALUE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingTxErrorTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingTxErrorTest.java index 2025f44a14fb6..9fb14d2eafa98 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingTxErrorTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingTxErrorTest.java @@ -81,8 +81,8 @@ private void failPessimictic() { } /** {@inheritDoc} */ - @Override @Test - public void testResponseMessageOnUnmarshallingFailed() { + @Test + @Override public void testResponseMessageOnUnmarshallingFailed() { //GridNearTxPrepareRequest unmarshalling failed test readCnt.set(2); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTransactionalStopBusySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTransactionalStopBusySelfTest.java index 4685752fd8e99..2ee30b145a0f5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTransactionalStopBusySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTransactionalStopBusySelfTest.java @@ -28,32 +28,32 @@ @RunWith(JUnit4.class) public class IgniteCacheTransactionalStopBusySelfTest extends IgniteCacheAbstractStopBusySelfTest { /** {@inheritDoc} */ - @Override @Test - public void testPut() throws Exception { + @Test + @Override public void testPut() throws Exception { bannedMsg.set(GridNearTxPrepareRequest.class); super.testPut(); } /** {@inheritDoc} */ - @Override @Test - public void testPutBatch() throws Exception { + @Test + @Override public void testPutBatch() throws Exception { bannedMsg.set(GridNearTxPrepareRequest.class); super.testPut(); } /** {@inheritDoc} */ - @Override @Test - public void testPutAsync() throws Exception { + @Test + @Override public void testPutAsync() throws Exception { bannedMsg.set(GridNearTxPrepareRequest.class); super.testPut(); } /** {@inheritDoc} */ - @Override @Test - public void testRemove() throws Exception { + @Test + @Override public void testRemove() throws Exception { bannedMsg.set(GridNearTxPrepareRequest.class); super.testPut(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxNearPeekModesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxNearPeekModesTest.java index 047358bf9e54a..c3ab3b9ee3e4f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxNearPeekModesTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxNearPeekModesTest.java @@ -32,8 +32,8 @@ public class IgniteCacheTxNearPeekModesTest extends IgniteCacheTxPeekModesTest { } /** {@inheritDoc} */ - @Override @Test - public void testLocalPeek() throws Exception { + @Test + @Override public void testLocalPeek() throws Exception { // TODO: uncomment and re-open ticket if fails. // fail("https://issues.apache.org/jira/browse/IGNITE-1824"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxPeekModesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxPeekModesTest.java index c648cad5ec126..973b3adefd2f1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxPeekModesTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxPeekModesTest.java @@ -47,8 +47,8 @@ public class IgniteCacheTxPeekModesTest extends IgniteCachePeekModesAbstractTest } /** {@inheritDoc} */ - @Override @Test - public void testLocalPeek() throws Exception { + @Test + @Override public void testLocalPeek() throws Exception { // TODO: uncomment and re-open ticket if fails. // fail("https://issues.apache.org/jira/browse/IGNITE-1824"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorAbstractTxCacheGroupsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorAbstractTxCacheGroupsTest.java index 52110a836d2e7..5e2cac512e89a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorAbstractTxCacheGroupsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorAbstractTxCacheGroupsTest.java @@ -46,8 +46,8 @@ public abstract class IgniteTopologyValidatorAbstractTxCacheGroupsTest } /** {@inheritDoc} */ - @Override @Test - public void testTopologyValidator() throws Exception { + @Test + @Override public void testTopologyValidator() throws Exception { try (Transaction tx = grid(0).transactions().txStart(OPTIMISTIC, REPEATABLE_READ)) { putValid(CACHE_NAME_1); putValid(CACHE_NAME_3); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorAbstractTxCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorAbstractTxCacheTest.java index d543aec948e34..8d7e33fccc16b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorAbstractTxCacheTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorAbstractTxCacheTest.java @@ -45,8 +45,8 @@ public abstract class IgniteTopologyValidatorAbstractTxCacheTest extends IgniteT } /** {@inheritDoc} */ - @Override @Test - public void testTopologyValidator() throws Exception { + @Test + @Override public void testTopologyValidator() throws Exception { try (Transaction tx = grid(0).transactions().txStart(OPTIMISTIC, REPEATABLE_READ)) { putValid(CACHE_NAME_1); commitFailed(tx); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorCacheGroupsAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorCacheGroupsAbstractTest.java index 7315db7b98ffd..b42091073b055 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorCacheGroupsAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorCacheGroupsAbstractTest.java @@ -83,8 +83,8 @@ public abstract class IgniteTopologyValidatorCacheGroupsAbstractTest extends Ign /** * @throws Exception If failed. */ - @Override @Test - public void testTopologyValidator() throws Exception { + @Test + @Override public void testTopologyValidator() throws Exception { putValid(DEFAULT_CACHE_NAME); remove(DEFAULT_CACHE_NAME); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/InterceptorCacheConfigVariationsFullApiTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/InterceptorCacheConfigVariationsFullApiTest.java index 52f38dd3cf18c..a323067fcfb00 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/InterceptorCacheConfigVariationsFullApiTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/InterceptorCacheConfigVariationsFullApiTest.java @@ -46,20 +46,20 @@ public class InterceptorCacheConfigVariationsFullApiTest extends IgniteCacheConf } /** {@inheritDoc} */ - @Override @Test - public void testTtlNoTx() throws Exception { + @Test + @Override public void testTtlNoTx() throws Exception { // No-op. } /** {@inheritDoc} */ - @Override @Test - public void testTtlNoTxOldEntry() throws Exception { + @Test + @Override public void testTtlNoTxOldEntry() throws Exception { // No-op. } /** {@inheritDoc} */ - @Override @Test - public void testTtlTx() throws Exception { + @Test + @Override public void testTtlTx() throws Exception { // No-op. } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSetFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSetFailoverSelfTest.java index f591b2288f7c5..9e88a187fcf2d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSetFailoverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSetFailoverSelfTest.java @@ -36,8 +36,8 @@ public class GridCachePartitionedAtomicSetFailoverSelfTest extends GridCacheSetF } /** {@inheritDoc} */ - @Override @Test - public void testNodeRestart() throws Exception { + @Test + @Override public void testNodeRestart() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-170"); } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java index 0cfa578f4beb7..66e7b3e2eb705 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java @@ -36,8 +36,8 @@ public class IgniteCacheAtomicNodeRestartTest extends GridCachePartitionedNodeRe } /** {@inheritDoc} */ - @Override @Test - public void testRestartWithPutFourNodesNoBackups() { + @Test + @Override public void testRestartWithPutFourNodesNoBackups() { fail("https://issues.apache.org/jira/browse/IGNITE-1587"); } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAtomicFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAtomicFullApiSelfTest.java index 87eb8e19b255c..b83e1c1a83402 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAtomicFullApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAtomicFullApiSelfTest.java @@ -79,8 +79,8 @@ public void testLock() throws Exception { /** * @throws Exception In case of error. */ - @Override @Test - public void testGetAll() throws Exception { + @Test + @Override public void testGetAll() throws Exception { jcache().put("key1", 1); jcache().put("key2", 2); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledLockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledLockSelfTest.java index 785324ff9f5ae..ff738c6714cea 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledLockSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledLockSelfTest.java @@ -45,8 +45,8 @@ public class GridCachePartitionedNearDisabledLockSelfTest extends GridCacheParti } /** {@inheritDoc} */ - @Override @Test - public void testLockReentrancy() throws Throwable { + @Test + @Override public void testLockReentrancy() throws Throwable { fail("https://issues.apache.org/jira/browse/IGNITE-835"); } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest.java index cddbe7728e1cb..7a9812abfe0e8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest.java @@ -84,20 +84,20 @@ public class GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest extends GridCache } /** {@inheritDoc} */ - @Override @Test - public void testReaderTtlNoTx() { + @Test + @Override public void testReaderTtlNoTx() { // No-op. } /** {@inheritDoc} */ - @Override @Test - public void testReaderTtlTx() { + @Test + @Override public void testReaderTtlTx() { // No-op. } /** {@inheritDoc} */ - @Override @Test - public void testSize() throws Exception { + @Test + @Override public void testSize() throws Exception { IgniteCache cache = jcache(); int size = 10; @@ -126,8 +126,8 @@ public void testSize() throws Exception { } /** {@inheritDoc} */ - @Override @Test - public void testClear() throws Exception { + @Test + @Override public void testClear() throws Exception { IgniteCache nearCache = jcache(); IgniteCache primary = fullCache(); @@ -162,8 +162,8 @@ public void testClear() throws Exception { } /** {@inheritDoc} */ - @Override @Test - public void testLocalClearKeys() throws Exception { + @Test + @Override public void testLocalClearKeys() throws Exception { IgniteCache nearCache = jcache(); IgniteCache primary = fullCache(); @@ -194,8 +194,8 @@ public void testLocalClearKeys() throws Exception { } /** {@inheritDoc} */ - @Override @Test - public void testEvictExpired() throws Exception { + @Test + @Override public void testEvictExpired() throws Exception { IgniteCache cache = jcache(); final String key = primaryKeysForCache(cache, 1).get(0); @@ -242,8 +242,8 @@ public void testEvictExpired() throws Exception { } /** {@inheritDoc} */ - @Override @Test - public void testLocalEvict() throws Exception { + @Test + @Override public void testLocalEvict() throws Exception { IgniteCache cache = jcache(); List keys = primaryKeysForCache(cache, 3); @@ -292,8 +292,8 @@ public void testLocalEvict() throws Exception { } /** {@inheritDoc} */ - @Override @Test - public void testPeekExpired() throws Exception { + @Test + @Override public void testPeekExpired() throws Exception { IgniteCache c = jcache(); String key = primaryKeysForCache(c, 1).get(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest.java index d39c9c407a686..7e64ce03a4792 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest.java @@ -79,8 +79,8 @@ public class GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest extends GridCacheNe } /** {@inheritDoc} */ - @Override @Test - public void testClear() throws Exception { + @Test + @Override public void testClear() throws Exception { IgniteCache nearCache = jcache(); IgniteCache primary = fullCache(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java index 7c342ef95e559..103abddb19f67 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java @@ -179,8 +179,8 @@ protected boolean clientHasNearCache() { } /** {@inheritDoc} */ - @Override @Test - public void testSize() throws Exception { + @Test + @Override public void testSize() throws Exception { IgniteCache nearCache = jcache(); int size = 10; @@ -209,8 +209,8 @@ public void testSize() throws Exception { } /** {@inheritDoc} */ - @Override @Test - public void testLoadAll() throws Exception { + @Test + @Override public void testLoadAll() throws Exception { // Not needed for near-only cache. } @@ -439,8 +439,8 @@ else if (i == nearIdx) } /** {@inheritDoc} */ - @Override @Test - public void testClear() throws Exception { + @Test + @Override public void testClear() throws Exception { IgniteCache nearCache = jcache(); IgniteCache primary = fullCache(); @@ -492,8 +492,8 @@ public void testClear() throws Exception { } /** {@inheritDoc} */ - @Override @Test - public void testLocalClearKeys() throws Exception { + @Test + @Override public void testLocalClearKeys() throws Exception { IgniteCache nearCache = jcache(); IgniteCache primary = fullCache(); @@ -560,8 +560,8 @@ public void testLocalClearKeys() throws Exception { /** {@inheritDoc} */ @SuppressWarnings("BusyWait") - @Override @Test - public void testLockUnlock() throws Exception { + @Test + @Override public void testLockUnlock() throws Exception { if (lockingEnabled()) { final CountDownLatch lockCnt = new CountDownLatch(1); final CountDownLatch unlockCnt = new CountDownLatch(1); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedBasicOpSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedBasicOpSelfTest.java index 461e9273c202c..df888da1894e4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedBasicOpSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedBasicOpSelfTest.java @@ -52,26 +52,26 @@ public class GridCachePartitionedBasicOpSelfTest extends GridCacheBasicOpAbstrac } /** {@inheritDoc} */ - @Override @Test - public void testBasicOps() throws Exception { + @Test + @Override public void testBasicOps() throws Exception { super.testBasicOps(); } /** {@inheritDoc} */ - @Override @Test - public void testBasicOpsAsync() throws Exception { + @Test + @Override public void testBasicOpsAsync() throws Exception { super.testBasicOpsAsync(); } /** {@inheritDoc} */ - @Override @Test - public void testOptimisticTransaction() throws Exception { + @Test + @Override public void testOptimisticTransaction() throws Exception { super.testOptimisticTransaction(); } /** {@inheritDoc} */ - @Override @Test - public void testPutWithExpiration() throws Exception { + @Test + @Override public void testPutWithExpiration() throws Exception { super.testPutWithExpiration(); } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeLockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeLockSelfTest.java index 1f859b0733a45..e1d77d09560e2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeLockSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeLockSelfTest.java @@ -51,32 +51,32 @@ public class GridCachePartitionedMultiNodeLockSelfTest extends GridCacheMultiNod } /** {@inheritDoc} */ - @Override @Test - public void testBasicLock() throws Exception { + @Test + @Override public void testBasicLock() throws Exception { super.testBasicLock(); } /** {@inheritDoc} */ - @Override @Test - public void testLockMultithreaded() throws Exception { + @Test + @Override public void testLockMultithreaded() throws Exception { super.testLockMultithreaded(); } /** {@inheritDoc} */ - @Override @Test - public void testLockReentry() throws IgniteCheckedException { + @Test + @Override public void testLockReentry() throws IgniteCheckedException { super.testLockReentry(); } /** {@inheritDoc} */ - @Override @Test - public void testMultiNodeLock() throws Exception { + @Test + @Override public void testMultiNodeLock() throws Exception { super.testMultiNodeLock(); } /** {@inheritDoc} */ - @Override @Test - public void testMultiNodeLockWithKeyLists() throws Exception { + @Test + @Override public void testMultiNodeLockWithKeyLists() throws Exception { super.testMultiNodeLockWithKeyLists(); } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedNodeRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedNodeRestartTest.java index 4fca78955b937..38e9d35cb0b3e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedNodeRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedNodeRestartTest.java @@ -61,92 +61,92 @@ public class GridCachePartitionedNodeRestartTest extends GridCacheAbstractNodeRe } /** {@inheritDoc} */ - @Override @Test - public void testRestart() throws Exception { + @Test + @Override public void testRestart() throws Exception { super.testRestart(); } /** {@inheritDoc} */ - @Override @Test - public void testRestartWithPutTwoNodesNoBackups() throws Throwable { + @Test + @Override public void testRestartWithPutTwoNodesNoBackups() throws Throwable { super.testRestartWithPutTwoNodesNoBackups(); } /** {@inheritDoc} */ - @Override @Test - public void testRestartWithPutTwoNodesOneBackup() throws Throwable { + @Test + @Override public void testRestartWithPutTwoNodesOneBackup() throws Throwable { super.testRestartWithPutTwoNodesOneBackup(); } /** {@inheritDoc} */ - @Override @Test - public void testRestartWithPutFourNodesNoBackups() throws Throwable { + @Test + @Override public void testRestartWithPutFourNodesNoBackups() throws Throwable { super.testRestartWithPutFourNodesNoBackups(); } /** {@inheritDoc} */ - @Override @Test - public void testRestartWithPutFourNodesOneBackups() throws Throwable { + @Test + @Override public void testRestartWithPutFourNodesOneBackups() throws Throwable { super.testRestartWithPutFourNodesOneBackups(); } /** {@inheritDoc} */ - @Override @Test - public void testRestartWithPutSixNodesTwoBackups() throws Throwable { + @Test + @Override public void testRestartWithPutSixNodesTwoBackups() throws Throwable { super.testRestartWithPutSixNodesTwoBackups(); } /** {@inheritDoc} */ - @Override @Test - public void testRestartWithPutEightNodesTwoBackups() throws Throwable { + @Test + @Override public void testRestartWithPutEightNodesTwoBackups() throws Throwable { super.testRestartWithPutEightNodesTwoBackups(); } /** {@inheritDoc} */ - @Override @Test - public void testRestartWithPutTenNodesTwoBackups() throws Throwable { + @Test + @Override public void testRestartWithPutTenNodesTwoBackups() throws Throwable { super.testRestartWithPutTenNodesTwoBackups(); } /** {@inheritDoc} */ - @Override @Test - public void testRestartWithTxEightNodesTwoBackups() throws Throwable { + @Test + @Override public void testRestartWithTxEightNodesTwoBackups() throws Throwable { super.testRestartWithTxEightNodesTwoBackups(); } /** {@inheritDoc} */ - @Override @Test - public void testRestartWithTxFourNodesNoBackups() throws Throwable { + @Test + @Override public void testRestartWithTxFourNodesNoBackups() throws Throwable { super.testRestartWithTxFourNodesNoBackups(); } /** {@inheritDoc} */ - @Override @Test - public void testRestartWithTxFourNodesOneBackups() throws Throwable { + @Test + @Override public void testRestartWithTxFourNodesOneBackups() throws Throwable { super.testRestartWithTxFourNodesOneBackups(); } /** {@inheritDoc} */ - @Override @Test - public void testRestartWithTxSixNodesTwoBackups() throws Throwable { + @Test + @Override public void testRestartWithTxSixNodesTwoBackups() throws Throwable { super.testRestartWithTxSixNodesTwoBackups(); } /** {@inheritDoc} */ - @Override @Test - public void testRestartWithTxTenNodesTwoBackups() throws Throwable { + @Test + @Override public void testRestartWithTxTenNodesTwoBackups() throws Throwable { super.testRestartWithTxTenNodesTwoBackups(); } /** {@inheritDoc} */ - @Override @Test - public void testRestartWithTxTwoNodesNoBackups() throws Throwable { + @Test + @Override public void testRestartWithTxTwoNodesNoBackups() throws Throwable { super.testRestartWithTxTwoNodesNoBackups(); } /** {@inheritDoc} */ - @Override @Test - public void testRestartWithTxTwoNodesOneBackup() throws Throwable { + @Test + @Override public void testRestartWithTxTwoNodesOneBackup() throws Throwable { super.testRestartWithTxTwoNodesOneBackup(); } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOptimisticTxNodeRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOptimisticTxNodeRestartTest.java index f7a475eb6cca4..75263b092bb3c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOptimisticTxNodeRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOptimisticTxNodeRestartTest.java @@ -81,84 +81,84 @@ protected boolean nearEnabled() { } /** {@inheritDoc} */ - @Override @Test - public void testRestart() throws Exception { + @Test + @Override public void testRestart() throws Exception { } /** {@inheritDoc} */ - @Override @Test - public void testRestartWithPutTwoNodesNoBackups() throws Throwable { + @Test + @Override public void testRestartWithPutTwoNodesNoBackups() throws Throwable { } /** {@inheritDoc} */ - @Override @Test - public void testRestartWithPutTwoNodesOneBackup() throws Throwable { + @Test + @Override public void testRestartWithPutTwoNodesOneBackup() throws Throwable { } /** {@inheritDoc} */ - @Override @Test - public void testRestartWithPutFourNodesNoBackups() throws Throwable { + @Test + @Override public void testRestartWithPutFourNodesNoBackups() throws Throwable { } /** {@inheritDoc} */ - @Override @Test - public void testRestartWithPutFourNodesOneBackups() throws Throwable { + @Test + @Override public void testRestartWithPutFourNodesOneBackups() throws Throwable { } /** {@inheritDoc} */ - @Override @Test - public void testRestartWithPutSixNodesTwoBackups() throws Throwable { + @Test + @Override public void testRestartWithPutSixNodesTwoBackups() throws Throwable { } /** {@inheritDoc} */ - @Override @Test - public void testRestartWithPutEightNodesTwoBackups() throws Throwable { + @Test + @Override public void testRestartWithPutEightNodesTwoBackups() throws Throwable { } /** {@inheritDoc} */ - @Override @Test - public void testRestartWithPutTenNodesTwoBackups() throws Throwable { + @Test + @Override public void testRestartWithPutTenNodesTwoBackups() throws Throwable { } /** {@inheritDoc} */ - @Override @Test - public void testRestartWithTxEightNodesTwoBackups() throws Throwable { + @Test + @Override public void testRestartWithTxEightNodesTwoBackups() throws Throwable { super.testRestartWithTxEightNodesTwoBackups(); } /** {@inheritDoc} */ - @Override @Test - public void testRestartWithTxFourNodesNoBackups() throws Throwable { + @Test + @Override public void testRestartWithTxFourNodesNoBackups() throws Throwable { super.testRestartWithTxFourNodesNoBackups(); } /** {@inheritDoc} */ - @Override @Test - public void testRestartWithTxFourNodesOneBackups() throws Throwable { + @Test + @Override public void testRestartWithTxFourNodesOneBackups() throws Throwable { super.testRestartWithTxFourNodesOneBackups(); } /** {@inheritDoc} */ - @Override @Test - public void testRestartWithTxSixNodesTwoBackups() throws Throwable { + @Test + @Override public void testRestartWithTxSixNodesTwoBackups() throws Throwable { super.testRestartWithTxSixNodesTwoBackups(); } /** {@inheritDoc} */ - @Override @Test - public void testRestartWithTxTenNodesTwoBackups() throws Throwable { + @Test + @Override public void testRestartWithTxTenNodesTwoBackups() throws Throwable { super.testRestartWithTxTenNodesTwoBackups(); } /** {@inheritDoc} */ - @Override @Test - public void testRestartWithTxTwoNodesNoBackups() throws Throwable { + @Test + @Override public void testRestartWithTxTwoNodesNoBackups() throws Throwable { super.testRestartWithTxTwoNodesNoBackups(); } /** {@inheritDoc} */ - @Override @Test - public void testRestartWithTxTwoNodesOneBackup() throws Throwable { + @Test + @Override public void testRestartWithTxTwoNodesOneBackup() throws Throwable { super.testRestartWithTxTwoNodesOneBackup(); } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxMultiNodeSelfTest.java index 7fadbdf747370..a032d6c301916 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxMultiNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxMultiNodeSelfTest.java @@ -49,44 +49,44 @@ public class GridCachePartitionedTxMultiNodeSelfTest extends IgniteTxMultiNodeAb } /** {@inheritDoc} */ - @Override @Test - public void testPutOneEntryInTx() throws Exception { + @Test + @Override public void testPutOneEntryInTx() throws Exception { super.testPutOneEntryInTx(); } /** {@inheritDoc} */ - @Override @Test - public void testPutOneEntryInTxMultiThreaded() throws Exception { + @Test + @Override public void testPutOneEntryInTxMultiThreaded() throws Exception { super.testPutOneEntryInTxMultiThreaded(); } /** {@inheritDoc} */ - @Override @Test - public void testPutTwoEntriesInTx() throws Exception { + @Test + @Override public void testPutTwoEntriesInTx() throws Exception { super.testPutTwoEntriesInTx(); } /** {@inheritDoc} */ - @Override @Test - public void testPutTwoEntryInTxMultiThreaded() throws Exception { + @Test + @Override public void testPutTwoEntryInTxMultiThreaded() throws Exception { super.testPutTwoEntryInTxMultiThreaded(); } /** {@inheritDoc} */ - @Override @Test - public void testRemoveInTxQueried() throws Exception { + @Test + @Override public void testRemoveInTxQueried() throws Exception { super.testRemoveInTxQueried(); } /** {@inheritDoc} */ - @Override @Test - public void testRemoveInTxQueriedMultiThreaded() throws Exception { + @Test + @Override public void testRemoveInTxQueriedMultiThreaded() throws Exception { super.testRemoveInTxQueriedMultiThreaded(); } /** {@inheritDoc} */ - @Override @Test - public void testRemoveInTxSimple() throws Exception { + @Test + @Override public void testRemoveInTxSimple() throws Exception { super.testRemoveInTxSimple(); } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionDistributionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionDistributionTest.java index 871764a74af62..ec5d0d0b1dc64 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionDistributionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionDistributionTest.java @@ -119,8 +119,7 @@ public FairDistributionAssertion() { } /** {@inheritDoc} */ - @Override @Test - public void test() throws AssertionError { + @Override public void test() throws AssertionError { super.test(); Affinity affinity = ignite().affinity(CACHE_NAME); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedLockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedLockSelfTest.java index 8d2c6ef7fce6b..c37e814546ea6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedLockSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedLockSelfTest.java @@ -36,8 +36,8 @@ public class GridCacheReplicatedLockSelfTest extends GridCacheLockAbstractTest { } /** {@inheritDoc} */ - @Override @Test - public void testLockReentrancy() throws Throwable { + @Test + @Override public void testLockReentrancy() throws Throwable { fail("https://issues.apache.org/jira/browse/IGNITE-835"); } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedNodeRestartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedNodeRestartSelfTest.java index f7a280c01b318..fde81ce96cfea 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedNodeRestartSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedNodeRestartSelfTest.java @@ -59,98 +59,98 @@ public class GridCacheReplicatedNodeRestartSelfTest extends GridCacheAbstractNod } /** {@inheritDoc} */ - @Override @Test - public void testRestartWithPutTwoNodesNoBackups() throws Throwable { + @Test + @Override public void testRestartWithPutTwoNodesNoBackups() throws Throwable { super.testRestartWithPutTwoNodesNoBackups(); } /** {@inheritDoc} */ - @Override @Test - public void testRestartWithPutTwoNodesOneBackup() throws Throwable { + @Test + @Override public void testRestartWithPutTwoNodesOneBackup() throws Throwable { // No-op. } /** {@inheritDoc} */ - @Override @Test - public void testRestartWithPutFourNodesOneBackups() throws Throwable { + @Test + @Override public void testRestartWithPutFourNodesOneBackups() throws Throwable { super.testRestartWithPutFourNodesOneBackups(); } /** {@inheritDoc} */ - @Override @Test - public void testRestartWithPutFourNodesNoBackups() throws Throwable { + @Test + @Override public void testRestartWithPutFourNodesNoBackups() throws Throwable { // No-op. } /** {@inheritDoc} */ - @Override @Test - public void testRestartWithPutSixNodesTwoBackups() throws Throwable { + @Test + @Override public void testRestartWithPutSixNodesTwoBackups() throws Throwable { super.testRestartWithPutSixNodesTwoBackups(); } /** {@inheritDoc} */ - @Override @Test - public void testRestartWithPutEightNodesTwoBackups() throws Throwable { + @Test + @Override public void testRestartWithPutEightNodesTwoBackups() throws Throwable { super.testRestartWithPutEightNodesTwoBackups(); } /** {@inheritDoc} */ - @Override @Test - public void testRestartWithPutTenNodesTwoBackups() throws Throwable { + @Test + @Override public void testRestartWithPutTenNodesTwoBackups() throws Throwable { super.testRestartWithPutTenNodesTwoBackups(); } /** {@inheritDoc} */ - @Override @Test - public void testRestartWithTxTwoNodesNoBackups() throws Throwable { + @Test + @Override public void testRestartWithTxTwoNodesNoBackups() throws Throwable { // No-op. } /** {@inheritDoc} */ - @Override @Test - public void testRestartWithTxTwoNodesOneBackup() throws Throwable { + @Test + @Override public void testRestartWithTxTwoNodesOneBackup() throws Throwable { super.testRestartWithTxTwoNodesOneBackup(); } /** {@inheritDoc} */ - @Override @Test - public void testRestartWithTxFourNodesOneBackups() throws Throwable { + @Test + @Override public void testRestartWithTxFourNodesOneBackups() throws Throwable { super.testRestartWithTxFourNodesOneBackups(); } /** {@inheritDoc} */ - @Override @Test - public void testRestartWithTxFourNodesNoBackups() throws Throwable { + @Test + @Override public void testRestartWithTxFourNodesNoBackups() throws Throwable { // No-op. } /** {@inheritDoc} */ - @Override @Test - public void testRestartWithTxSixNodesTwoBackups() throws Throwable { + @Test + @Override public void testRestartWithTxSixNodesTwoBackups() throws Throwable { super.testRestartWithTxSixNodesTwoBackups(); } /** {@inheritDoc} */ - @Override @Test - public void testRestartWithTxEightNodesTwoBackups() throws Throwable { + @Test + @Override public void testRestartWithTxEightNodesTwoBackups() throws Throwable { super.testRestartWithTxEightNodesTwoBackups(); } /** {@inheritDoc} */ - @Override @Test - public void testRestartWithTxTenNodesTwoBackups() throws Throwable { + @Test + @Override public void testRestartWithTxTenNodesTwoBackups() throws Throwable { super.testRestartWithTxTenNodesTwoBackups(); } /** {@inheritDoc} */ - @Override @Test - public void testRestartWithTxPutAllTenNodesTwoBackups() throws Throwable { + @Test + @Override public void testRestartWithTxPutAllTenNodesTwoBackups() throws Throwable { super.testRestartWithTxPutAllTenNodesTwoBackups(); } /** {@inheritDoc} */ - @Override @Test - public void testRestartWithTxPutAllFourNodesTwoBackups() throws Throwable { + @Test + @Override public void testRestartWithTxPutAllFourNodesTwoBackups() throws Throwable { super.testRestartWithTxPutAllFourNodesTwoBackups(); } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedTxMultiNodeBasicTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedTxMultiNodeBasicTest.java index 83b41254b390b..35b8d9bc6cb9a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedTxMultiNodeBasicTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedTxMultiNodeBasicTest.java @@ -48,44 +48,44 @@ public class GridCacheReplicatedTxMultiNodeBasicTest extends IgniteTxMultiNodeAb } /** {@inheritDoc} */ - @Override @Test - public void testPutOneEntryInTx() throws Exception { + @Test + @Override public void testPutOneEntryInTx() throws Exception { super.testPutOneEntryInTx(); } /** {@inheritDoc} */ - @Override @Test - public void testPutTwoEntriesInTx() throws Exception { + @Test + @Override public void testPutTwoEntriesInTx() throws Exception { super.testPutTwoEntriesInTx(); } /** {@inheritDoc} */ - @Override @Test - public void testPutOneEntryInTxMultiThreaded() throws Exception { + @Test + @Override public void testPutOneEntryInTxMultiThreaded() throws Exception { super.testPutOneEntryInTxMultiThreaded(); } /** {@inheritDoc} */ - @Override @Test - public void testPutTwoEntryInTxMultiThreaded() throws Exception { + @Test + @Override public void testPutTwoEntryInTxMultiThreaded() throws Exception { super.testPutTwoEntryInTxMultiThreaded(); } /** {@inheritDoc} */ - @Override @Test - public void testRemoveInTxQueried() throws Exception { + @Test + @Override public void testRemoveInTxQueried() throws Exception { super.testRemoveInTxQueried(); } /** {@inheritDoc} */ - @Override @Test - public void testRemoveInTxSimple() throws Exception { + @Test + @Override public void testRemoveInTxSimple() throws Exception { super.testRemoveInTxSimple(); } /** {@inheritDoc} */ - @Override @Test - public void testRemoveInTxQueriedMultiThreaded() throws Exception { + @Test + @Override public void testRemoveInTxQueriedMultiThreaded() throws Exception { super.testRemoveInTxQueriedMultiThreaded(); } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryReplicatedAtomicSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryReplicatedAtomicSelfTest.java index 4fb0a71d46a9c..27fb0fdd44dc6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryReplicatedAtomicSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryReplicatedAtomicSelfTest.java @@ -35,8 +35,8 @@ public class GridCacheContinuousQueryReplicatedAtomicSelfTest extends GridCacheC } /** {@inheritDoc} */ - @Override @Test - public void testInternalKey() throws Exception { + @Test + @Override public void testInternalKey() throws Exception { // No-op. } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/IgniteComputeConfigVariationsFullApiTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/IgniteComputeConfigVariationsFullApiTest.java index 7f8d7db17b75e..3e6736ed06deb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/IgniteComputeConfigVariationsFullApiTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/IgniteComputeConfigVariationsFullApiTest.java @@ -209,8 +209,7 @@ public void testExecuteTaskClass() throws Exception { @Test public void testExecuteTaskClassAsync() throws Exception { runTest(jobFactories, new ComputeTest() { - @Override @Test - public void test(Factory factory, Ignite ignite) throws Exception { + @Override public void test(Factory factory, Ignite ignite) throws Exception { // Begin with negative to check 'null' value in the test. final int[] i = {-1}; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbSingleNodeTinyPutGetTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbSingleNodeTinyPutGetTest.java index 9812182687f86..14b5b5324365f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbSingleNodeTinyPutGetTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbSingleNodeTinyPutGetTest.java @@ -48,128 +48,128 @@ public void testPutGetTiny() { } /** {@inheritDoc} */ - @Override @Test - public void testGradualRandomPutAllRemoveAll() { + @Test + @Override public void testGradualRandomPutAllRemoveAll() { // No-op } /** {@inheritDoc} */ - @Override @Test - public void testRandomRemove() { + @Test + @Override public void testRandomRemove() { // No-op } /** {@inheritDoc} */ - @Override @Test - public void testRandomPut() { + @Test + @Override public void testRandomPut() { // No-op } /** {@inheritDoc} */ - @Override @Test - public void testPutGetSimple() { + @Test + @Override public void testPutGetSimple() { // No-op } /** {@inheritDoc} */ - @Override @Test - public void testPutGetLarge() { + @Test + @Override public void testPutGetLarge() { // No-op } /** {@inheritDoc} */ - @Override @Test - public void testPutGetOverwrite() { + @Test + @Override public void testPutGetOverwrite() { // No-op } /** {@inheritDoc} */ - @Override @Test - public void testOverwriteNormalSizeAfterSmallerSize() { + @Test + @Override public void testOverwriteNormalSizeAfterSmallerSize() { // No-op } /** {@inheritDoc} */ - @Override @Test - public void testPutDoesNotTriggerRead() { + @Test + @Override public void testPutDoesNotTriggerRead() { // No-op } /** {@inheritDoc} */ - @Override @Test - public void testPutGetMultipleObjects() { + @Test + @Override public void testPutGetMultipleObjects() { // No-op } /** {@inheritDoc} */ - @Override @Test - public void testSizeClear() { + @Test + @Override public void testSizeClear() { // No-op } /** {@inheritDoc} */ - @Override @Test - public void testBounds() { + @Test + @Override public void testBounds() { // No-op } /** {@inheritDoc} */ - @Override @Test - public void testMultithreadedPut() { + @Test + @Override public void testMultithreadedPut() { // No-op } /** {@inheritDoc} */ - @Override @Test - public void testPutGetRandomUniqueMultipleObjects() { + @Test + @Override public void testPutGetRandomUniqueMultipleObjects() { // No-op } /** {@inheritDoc} */ - @Override @Test - public void testPutPrimaryUniqueSecondaryDuplicates() { + @Test + @Override public void testPutPrimaryUniqueSecondaryDuplicates() { // No-op } /** {@inheritDoc} */ - @Override @Test - public void testPutGetRandomNonUniqueMultipleObjects() { + @Test + @Override public void testPutGetRandomNonUniqueMultipleObjects() { // No-op } /** {@inheritDoc} */ - @Override @Test - public void testPutGetRemoveMultipleForward() { + @Test + @Override public void testPutGetRemoveMultipleForward() { // No-op } /** {@inheritDoc} */ - @Override @Test - public void testRandomPutGetRemove() { + @Test + @Override public void testRandomPutGetRemove() { // No-op } /** {@inheritDoc} */ - @Override @Test - public void testPutGetRemoveMultipleBackward() { + @Test + @Override public void testPutGetRemoveMultipleBackward() { // No-op } /** {@inheritDoc} */ - @Override @Test - public void testIndexOverwrite() { + @Test + @Override public void testIndexOverwrite() { // No-op } /** {@inheritDoc} */ - @Override @Test - public void testObjectKey() { + @Test + @Override public void testObjectKey() { // No-op } /** {@inheritDoc} */ - @Override @Test - public void testIterators() { + @Test + @Override public void testIterators() { // No-op } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorMvccSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorMvccSelfTest.java index 560f9738e4838..f8737da2599f9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorMvccSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorMvccSelfTest.java @@ -55,22 +55,22 @@ public class DataStreamProcessorMvccSelfTest extends DataStreamProcessorSelfTest } /** {@inheritDoc} */ - @Override @Test - public void testUpdateStore() throws Exception { + @Test + @Override public void testUpdateStore() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-8582"); super.testUpdateStore(); } /** {@inheritDoc} */ - @Override @Test - public void testFlushTimeout() { + @Test + @Override public void testFlushTimeout() { fail("https://issues.apache.org/jira/browse/IGNITE-9321"); } /** {@inheritDoc} */ - @Override @Test - public void testLocal() { + @Test + @Override public void testLocal() { // Do not check local caches with MVCC enabled. } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsLocalSecondaryFileSystemDualAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsLocalSecondaryFileSystemDualAbstractSelfTest.java index 971f3d09ff8d8..bdfb3187c92ea 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsLocalSecondaryFileSystemDualAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsLocalSecondaryFileSystemDualAbstractSelfTest.java @@ -184,8 +184,8 @@ public void testSymlinkToFile() throws Exception { * * @throws Exception If failed. */ - @Override @Test - public void testUpdateParentRootPathMissing() throws Exception { + @Test + @Override public void testUpdateParentRootPathMissing() throws Exception { doUpdateParentRootPathMissing(properties(TEST_GROUP, "0555")); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsPrimaryMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsPrimaryMultiNodeSelfTest.java index eb47a0c17fd77..0969cfd4b987a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsPrimaryMultiNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsPrimaryMultiNodeSelfTest.java @@ -34,8 +34,8 @@ public class IgfsPrimaryMultiNodeSelfTest extends IgfsPrimarySelfTest { /** * @throws Exception If failed. */ - @Override @Test - public void testCreateConsistencyMultithreaded() throws Exception { + @Test + @Override public void testCreateConsistencyMultithreaded() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-8823"); } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceProxyTimeoutInitializedTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceProxyTimeoutInitializedTest.java index 480b7bef20aba..4e56b5831e2e2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceProxyTimeoutInitializedTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceProxyTimeoutInitializedTest.java @@ -201,8 +201,7 @@ private static class TestWaitServiceImpl implements Service, TestService { private static final long serialVersionUID = 0L; /** {@inheritDoc} */ - @Override @Test - public void test() { + @Override public void test() { // No-op } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSslSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSslSelfTest.java index e8804eab44b31..034beb07d2682 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSslSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSslSelfTest.java @@ -79,15 +79,15 @@ public class GridNioSslSelfTest extends GridNioSelfTest { } /** {@inheritDoc} */ - @Override @Test - public void testWriteTimeout() throws Exception { + @Test + @Override public void testWriteTimeout() throws Exception { // Skip base test because it enables "skipWrite" mode in the GridNioServer // which makes SSL handshake impossible. } /** {@inheritDoc} */ - @Override @Test - public void testAsyncSendReceive() throws Exception { + @Test + @Override public void testAsyncSendReceive() throws Exception { // No-op, do not want to mess with SSL channel. } } diff --git a/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingNoPeerClassLoadingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingNoPeerClassLoadingSelfTest.java index be7a9b381326c..e5620007f3f97 100644 --- a/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingNoPeerClassLoadingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingNoPeerClassLoadingSelfTest.java @@ -56,8 +56,8 @@ public class GridMessagingNoPeerClassLoadingSelfTest extends GridMessagingSelfTe * * @throws Exception If error occurs. */ - @Override @Test - public void testSendMessageWithExternalClassLoader() throws Exception { + @Test + @Override public void testSendMessageWithExternalClassLoader() throws Exception { URL[] urls = new URL[] { new URL(GridTestProperties.getProperty("p2p.uri.cls")) }; ClassLoader extLdr = new URLClassLoader(urls); diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiAbstractTest.java index b33c1e826ce47..eda8d8e8a6ea9 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiAbstractTest.java @@ -86,8 +86,8 @@ protected GridTcpCommunicationSpiAbstractTest(boolean useShmem) { } /** {@inheritDoc} */ - @Override @Test - public void testSendToManyNodes() throws Exception { + @Test + @Override public void testSendToManyNodes() throws Exception { super.testSendToManyNodes(); // Test idle clients remove. From 338785a26e59712a3c2bc907268018e0e430e396 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Tue, 4 Dec 2018 02:35:37 +0300 Subject: [PATCH 043/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - upgraded testsuites -- verified with diffs overview and rebuild --- .../testsuites/IgniteBasicTestSuite.java | 9 +- ...gniteCacheDataStructuresSelfTestSuite.java | 149 +++++++++--------- .../IgniteCacheEvictionSelfTestSuite.java | 63 ++++---- .../IgniteCacheIteratorsSelfTestSuite.java | 9 +- ...gniteCacheTcpClientDiscoveryTestSuite.java | 21 +-- .../IgniteContinuousTaskSelfTestSuite.java | 11 +- .../IgniteExternalizableSelfTestSuite.java | 5 +- .../testsuites/IgniteIgfsTestSuite.java | 59 +++---- .../IgniteIpcSharedMemorySelfTestSuite.java | 11 +- .../IgniteJobMetricsSelfTestSuite.java | 5 +- .../testsuites/IgniteLangSelfTestSuite.java | 57 +++---- .../IgniteLoggingSelfTestSuite.java | 3 +- .../testsuites/IgniteP2PSelfTestSuite.java | 39 ++--- .../testsuites/IgnitePlatformsTestSuite.java | 5 +- .../IgniteSpiCheckpointSelfTestSuite.java | 27 ++-- .../IgniteSpiCommunicationSelfTestSuite.java | 49 +++--- .../IgniteSpiDeploymentSelfTestSuite.java | 7 +- .../IgniteSpiDiscoverySelfTestSuite.java | 93 +++++------ .../IgniteSpiEventStorageSelfTestSuite.java | 11 +- .../IgniteSpiFailoverSelfTestSuite.java | 21 +-- .../testsuites/IgniteStartUpTestSuite.java | 3 +- .../testsuites/IgniteStreamSelfTestSuite.java | 7 +- .../IgniteTaskSessionSelfTestSuite.java | 41 ++--- .../IgniteTimeoutProcessorSelfTestSuite.java | 5 +- .../IgniteTopologyValidatorTestSuite.java | 29 ++-- 25 files changed, 382 insertions(+), 357 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java index 40bea5a5cb3d7..4998c4e50137f 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java @@ -18,6 +18,7 @@ package org.apache.ignite.testsuites; import java.util.Set; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.GridSuppressedExceptionSelfTest; import org.apache.ignite.failure.FailureHandlerTriggeredTest; @@ -125,10 +126,10 @@ public static TestSuite suite(@Nullable final Set ignoredTests) throws Ex suite.addTest(IgnitePlatformsTestSuite.suite()); - suite.addTest(new TestSuite(GridSelfTest.class)); - suite.addTest(new TestSuite(ClusterGroupHostsSelfTest.class)); - suite.addTest(new TestSuite(IgniteMessagingWithClientTest.class)); - suite.addTest(new TestSuite(IgniteMessagingSendAsyncTest.class)); + suite.addTest(new JUnit4TestAdapter(GridSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(ClusterGroupHostsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteMessagingWithClientTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteMessagingSendAsyncTest.class)); GridTestUtils.addTestIfNeeded(suite, ClusterGroupSelfTest.class, ignoredTests); GridTestUtils.addTestIfNeeded(suite, GridMessagingSelfTest.class, ignoredTests); diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheDataStructuresSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheDataStructuresSelfTestSuite.java index bca706e18b292..3732754a16d2a 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheDataStructuresSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheDataStructuresSelfTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.AtomicCacheAffinityConfigurationTest; import org.apache.ignite.internal.processors.cache.datastructures.GridCacheQueueCleanupSelfTest; @@ -98,95 +99,95 @@ public static TestSuite suite() throws Exception { TestSuite suite = new TestSuite("Ignite Cache Data Structures Test Suite"); // Data structures. - suite.addTest(new TestSuite(GridCachePartitionedQueueFailoverDataConsistencySelfTest.class)); - suite.addTest(new TestSuite(GridCachePartitionedAtomicQueueFailoverDataConsistencySelfTest.class)); - - suite.addTest(new TestSuite(GridCacheLocalSequenceApiSelfTest.class)); - suite.addTest(new TestSuite(GridCacheLocalSetSelfTest.class)); - suite.addTest(new TestSuite(GridCacheLocalAtomicSetSelfTest.class)); - suite.addTest(new TestSuite(GridCacheLocalQueueApiSelfTest.class)); - suite.addTest(new TestSuite(GridCacheLocalAtomicQueueApiSelfTest.class)); - suite.addTest(new TestSuite(IgniteLocalCountDownLatchSelfTest.class)); - suite.addTest(new TestSuite(IgniteLocalSemaphoreSelfTest.class)); - suite.addTest(new TestSuite(IgniteLocalLockSelfTest.class)); - - suite.addTest(new TestSuite(GridCacheReplicatedSequenceApiSelfTest.class)); - suite.addTest(new TestSuite(GridCacheReplicatedSequenceMultiNodeSelfTest.class)); - suite.addTest(new TestSuite(GridCacheReplicatedQueueApiSelfTest.class)); - suite.addTest(new TestSuite(GridCacheReplicatedQueueMultiNodeSelfTest.class)); - suite.addTest(new TestSuite(GridCacheReplicatedQueueRotativeMultiNodeTest.class)); - suite.addTest(new TestSuite(GridCacheReplicatedSetSelfTest.class)); - suite.addTest(new TestSuite(GridCacheReplicatedSetWithClientSelfTest.class)); - suite.addTest(new TestSuite(GridCacheReplicatedSetWithNodeFilterSelfTest.class)); - suite.addTest(new TestSuite(GridCacheReplicatedDataStructuresFailoverSelfTest.class)); - suite.addTest(new TestSuite(IgniteReplicatedCountDownLatchSelfTest.class)); - suite.addTest(new TestSuite(IgniteReplicatedSemaphoreSelfTest.class)); - suite.addTest(new TestSuite(IgniteReplicatedLockSelfTest.class)); - suite.addTest(new TestSuite(IgniteCacheAtomicReplicatedNodeRestartSelfTest.class)); - - suite.addTest(new TestSuite(GridCachePartitionedSequenceApiSelfTest.class)); - suite.addTest(new TestSuite(GridCachePartitionedSequenceMultiNodeSelfTest.class)); - suite.addTest(new TestSuite(GridCachePartitionedQueueApiSelfTest.class)); - suite.addTest(new TestSuite(GridCachePartitionedAtomicQueueApiSelfTest.class)); - suite.addTest(new TestSuite(GridCachePartitionedQueueMultiNodeSelfTest.class)); - suite.addTest(new TestSuite(GridCachePartitionedAtomicQueueMultiNodeSelfTest.class)); - suite.addTest(new TestSuite(GridCacheQueueClientDisconnectTest.class)); - - suite.addTest(new TestSuite(GridCachePartitionedQueueCreateMultiNodeSelfTest.class)); - suite.addTest(new TestSuite(GridCachePartitionedAtomicQueueCreateMultiNodeSelfTest.class)); - suite.addTest(new TestSuite(GridCachePartitionedSetSelfTest.class)); - suite.addTest(new TestSuite(GridCachePartitionedSetWithClientSelfTest.class)); - suite.addTest(new TestSuite(GridCachePartitionedSetWithNodeFilterSelfTest.class)); - suite.addTest(new TestSuite(IgnitePartitionedSetNoBackupsSelfTest.class)); - suite.addTest(new TestSuite(GridCachePartitionedAtomicSetSelfTest.class)); - suite.addTest(new TestSuite(IgnitePartitionedCountDownLatchSelfTest.class)); - suite.addTest(new TestSuite(IgniteDataStructureWithJobTest.class)); - suite.addTest(new TestSuite(IgnitePartitionedSemaphoreSelfTest.class)); - suite.addTest(new TestSuite(SemaphoreFailoverSafeReleasePermitsTest.class)); - suite.addTest(new TestSuite(SemaphoreFailoverNoWaitingAcquirerTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedQueueFailoverDataConsistencySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedAtomicQueueFailoverDataConsistencySelfTest.class)); + + suite.addTest(new JUnit4TestAdapter(GridCacheLocalSequenceApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheLocalSetSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheLocalAtomicSetSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheLocalQueueApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheLocalAtomicQueueApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteLocalCountDownLatchSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteLocalSemaphoreSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteLocalLockSelfTest.class)); + + suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedSequenceApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedSequenceMultiNodeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedQueueApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedQueueMultiNodeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedQueueRotativeMultiNodeTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedSetSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedSetWithClientSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedSetWithNodeFilterSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedDataStructuresFailoverSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteReplicatedCountDownLatchSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteReplicatedSemaphoreSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteReplicatedLockSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheAtomicReplicatedNodeRestartSelfTest.class)); + + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedSequenceApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedSequenceMultiNodeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedQueueApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedAtomicQueueApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedQueueMultiNodeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedAtomicQueueMultiNodeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheQueueClientDisconnectTest.class)); + + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedQueueCreateMultiNodeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedAtomicQueueCreateMultiNodeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedSetSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedSetWithClientSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedSetWithNodeFilterSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgnitePartitionedSetNoBackupsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedAtomicSetSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgnitePartitionedCountDownLatchSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteDataStructureWithJobTest.class)); + suite.addTest(new JUnit4TestAdapter(IgnitePartitionedSemaphoreSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(SemaphoreFailoverSafeReleasePermitsTest.class)); + suite.addTest(new JUnit4TestAdapter(SemaphoreFailoverNoWaitingAcquirerTest.class)); // TODO IGNITE-3141, enabled when fixed. - // suite.addTest(new TestSuite(IgnitePartitionedLockSelfTest.class)); + // suite.addTest(new JUnit4TestAdapter(IgnitePartitionedLockSelfTest.class)); - suite.addTest(new TestSuite(GridCachePartitionedSetFailoverSelfTest.class)); - suite.addTest(new TestSuite(GridCachePartitionedAtomicSetFailoverSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedSetFailoverSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedAtomicSetFailoverSelfTest.class)); - suite.addTest(new TestSuite(GridCachePartitionedQueueRotativeMultiNodeTest.class)); - suite.addTest(new TestSuite(GridCachePartitionedAtomicQueueRotativeMultiNodeTest.class)); - suite.addTest(new TestSuite(GridCacheQueueCleanupSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedQueueRotativeMultiNodeTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedAtomicQueueRotativeMultiNodeTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheQueueCleanupSelfTest.class)); - suite.addTest(new TestSuite(GridCachePartitionedQueueEntryMoveSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedQueueEntryMoveSelfTest.class)); - suite.addTest(new TestSuite(GridCachePartitionedDataStructuresFailoverSelfTest.class)); - suite.addTest(new TestSuite(GridCacheQueueMultiNodeConsistencySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedDataStructuresFailoverSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheQueueMultiNodeConsistencySelfTest.class)); - suite.addTest(new TestSuite(IgniteLocalAtomicLongApiSelfTest.class)); - suite.addTest(new TestSuite(IgnitePartitionedAtomicLongApiSelfTest.class)); - suite.addTest(new TestSuite(IgniteReplicatedAtomicLongApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteLocalAtomicLongApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgnitePartitionedAtomicLongApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteReplicatedAtomicLongApiSelfTest.class)); - suite.addTest(new TestSuite(GridCachePartitionedAtomicSequenceMultiThreadedTest.class)); - suite.addTest(new TestSuite(GridCachePartitionedAtomicSequenceTxSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedAtomicSequenceMultiThreadedTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedAtomicSequenceTxSelfTest.class)); - suite.addTest(new TestSuite(GridCachePartitionedAtomicStampedApiSelfTest.class)); - suite.addTest(new TestSuite(GridCacheReplicatedAtomicStampedApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedAtomicStampedApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedAtomicStampedApiSelfTest.class)); - suite.addTest(new TestSuite(GridCachePartitionedAtomicReferenceApiSelfTest.class)); - suite.addTest(new TestSuite(GridCacheReplicatedAtomicReferenceApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedAtomicReferenceApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedAtomicReferenceApiSelfTest.class)); - //suite.addTest(new TestSuite(GridCachePartitionedAtomicReferenceMultiNodeTest.class)); - //suite.addTest(new TestSuite(GridCacheReplicatedAtomicReferenceMultiNodeTest.class)); + //suite.addTest(new JUnit4TestAdapter(GridCachePartitionedAtomicReferenceMultiNodeTest.class)); + //suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedAtomicReferenceMultiNodeTest.class)); - suite.addTest(new TestSuite(GridCachePartitionedNodeRestartTxSelfTest.class)); - suite.addTest(new TestSuite(GridCachePartitionedQueueJoinedNodeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedNodeRestartTxSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedQueueJoinedNodeSelfTest.class)); - suite.addTest(new TestSuite(IgniteDataStructureUniqueNameTest.class)); - //suite.addTest(new TestSuite(IgniteDataStructuresNoClassOnServerTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteDataStructureUniqueNameTest.class)); + //suite.addTest(new JUnit4TestAdapter(IgniteDataStructuresNoClassOnServerTest.class)); - suite.addTest(new TestSuite(IgniteClientDataStructuresTest.class)); - suite.addTest(new TestSuite(IgniteClientDiscoveryDataStructuresTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteClientDataStructuresTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteClientDiscoveryDataStructuresTest.class)); - suite.addTest(new TestSuite(IgnitePartitionedQueueNoBackupsTest.class)); + suite.addTest(new JUnit4TestAdapter(IgnitePartitionedQueueNoBackupsTest.class)); - suite.addTest(new TestSuite(IgniteSequenceInternalCleanupTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteSequenceInternalCleanupTest.class)); suite.addTestSuite(AtomicCacheAffinityConfigurationTest.class); diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheEvictionSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheEvictionSelfTestSuite.java index ad9658d3593ca..816dfec038648 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheEvictionSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheEvictionSelfTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.GridCachePreloadingEvictionsSelfTest; import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicNearEvictionSelfTest; @@ -61,41 +62,41 @@ public class IgniteCacheEvictionSelfTestSuite extends TestSuite { public static TestSuite suite() throws Exception { TestSuite suite = new TestSuite("Ignite Cache Eviction Test Suite"); - suite.addTest(new TestSuite(FifoEvictionPolicySelfTest.class)); - suite.addTest(new TestSuite(SortedEvictionPolicySelfTest.class)); - suite.addTest(new TestSuite(LruEvictionPolicySelfTest.class)); - suite.addTest(new TestSuite(FifoEvictionPolicyFactorySelfTest.class)); - suite.addTest(new TestSuite(SortedEvictionPolicyFactorySelfTest.class)); - suite.addTest(new TestSuite(LruEvictionPolicyFactorySelfTest.class)); - suite.addTest(new TestSuite(LruNearEvictionPolicySelfTest.class)); - suite.addTest(new TestSuite(LruNearOnlyNearEvictionPolicySelfTest.class)); - suite.addTest(new TestSuite(GridCacheNearEvictionSelfTest.class)); - suite.addTest(new TestSuite(GridCacheAtomicNearEvictionSelfTest.class)); - suite.addTest(new TestSuite(GridCacheEvictionFilterSelfTest.class)); - suite.addTest(new TestSuite(GridCacheConcurrentEvictionsSelfTest.class)); - suite.addTest(new TestSuite(GridCacheConcurrentEvictionConsistencySelfTest.class)); - suite.addTest(new TestSuite(GridCacheEvictionTouchSelfTest.class)); - suite.addTest(new TestSuite(GridCacheEvictionLockUnlockSelfTest.class)); - suite.addTest(new TestSuite(GridCachePreloadingEvictionsSelfTest.class)); - suite.addTest(new TestSuite(GridCacheEmptyEntriesPartitionedSelfTest.class)); - suite.addTest(new TestSuite(GridCacheEmptyEntriesLocalSelfTest.class)); - suite.addTest(new TestSuite(GridCacheEvictableEntryEqualsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(FifoEvictionPolicySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(SortedEvictionPolicySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(LruEvictionPolicySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(FifoEvictionPolicyFactorySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(SortedEvictionPolicyFactorySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(LruEvictionPolicyFactorySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(LruNearEvictionPolicySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(LruNearOnlyNearEvictionPolicySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheNearEvictionSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheAtomicNearEvictionSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheEvictionFilterSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheConcurrentEvictionsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheConcurrentEvictionConsistencySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheEvictionTouchSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheEvictionLockUnlockSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePreloadingEvictionsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheEmptyEntriesPartitionedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheEmptyEntriesLocalSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheEvictableEntryEqualsSelfTest.class)); - suite.addTest(new TestSuite(RandomLruPageEvictionMultinodeTest.class)); - suite.addTest(new TestSuite(RandomLruNearEnabledPageEvictionMultinodeTest.class)); - suite.addTest(new TestSuite(Random2LruPageEvictionMultinodeTest.class)); - suite.addTest(new TestSuite(Random2LruNearEnabledPageEvictionMultinodeTest.class)); - suite.addTest(new TestSuite(RandomLruPageEvictionWithRebalanceTest.class)); - suite.addTest(new TestSuite(Random2LruPageEvictionWithRebalanceTest.class)); - suite.addTest(new TestSuite(PageEvictionTouchOrderTest.class)); - suite.addTest(new TestSuite(PageEvictionReadThroughTest.class)); - suite.addTest(new TestSuite(PageEvictionDataStreamerTest.class)); + suite.addTest(new JUnit4TestAdapter(RandomLruPageEvictionMultinodeTest.class)); + suite.addTest(new JUnit4TestAdapter(RandomLruNearEnabledPageEvictionMultinodeTest.class)); + suite.addTest(new JUnit4TestAdapter(Random2LruPageEvictionMultinodeTest.class)); + suite.addTest(new JUnit4TestAdapter(Random2LruNearEnabledPageEvictionMultinodeTest.class)); + suite.addTest(new JUnit4TestAdapter(RandomLruPageEvictionWithRebalanceTest.class)); + suite.addTest(new JUnit4TestAdapter(Random2LruPageEvictionWithRebalanceTest.class)); + suite.addTest(new JUnit4TestAdapter(PageEvictionTouchOrderTest.class)); + suite.addTest(new JUnit4TestAdapter(PageEvictionReadThroughTest.class)); + suite.addTest(new JUnit4TestAdapter(PageEvictionDataStreamerTest.class)); - suite.addTest(new TestSuite(PageEvictionMetricTest.class)); + suite.addTest(new JUnit4TestAdapter(PageEvictionMetricTest.class)); - suite.addTest(new TestSuite(PageEvictionPagesRecyclingAndReusingTest.class)); + suite.addTest(new JUnit4TestAdapter(PageEvictionPagesRecyclingAndReusingTest.class)); - suite.addTest(new TestSuite(DhtAndNearEvictionTest.class)); + suite.addTest(new JUnit4TestAdapter(DhtAndNearEvictionTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheIteratorsSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheIteratorsSelfTestSuite.java index 6fb3b486cb1a5..c13a19af90a10 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheIteratorsSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheIteratorsSelfTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedIteratorsSelfTest; import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCacheReplicatedIteratorsSelfTest; @@ -33,10 +34,10 @@ public class IgniteCacheIteratorsSelfTestSuite extends TestSuite { public static TestSuite suite() throws Exception { TestSuite suite = new TestSuite("Cache Iterators Test Suite"); - suite.addTest(new TestSuite(GridCacheLocalIteratorsSelfTest.class)); - suite.addTest(new TestSuite(GridCacheReplicatedIteratorsSelfTest.class)); - suite.addTest(new TestSuite(GridCachePartitionedIteratorsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheLocalIteratorsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedIteratorsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedIteratorsSelfTest.class)); return suite; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTcpClientDiscoveryTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTcpClientDiscoveryTestSuite.java index e0efda43e4a8c..3ab2e1a659329 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTcpClientDiscoveryTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTcpClientDiscoveryTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.GridCacheTcpClientDiscoveryMultiThreadedTest; import org.apache.ignite.internal.processors.cache.distributed.GridCacheClientModesTcpClientDiscoveryAbstractTest; @@ -32,16 +33,16 @@ public class IgniteCacheTcpClientDiscoveryTestSuite { public static TestSuite suite() throws Exception { TestSuite suite = new TestSuite("Cache + TcpClientDiscovery SPI test suite."); - suite.addTest(new TestSuite(GridCacheClientModesTcpClientDiscoveryAbstractTest.CaseNearPartitionedAtomic.class)); - suite.addTest(new TestSuite(GridCacheClientModesTcpClientDiscoveryAbstractTest.CaseNearPartitionedTransactional.class)); - suite.addTest(new TestSuite(GridCacheClientModesTcpClientDiscoveryAbstractTest.CaseNearReplicatedAtomic.class)); - suite.addTest(new TestSuite(GridCacheClientModesTcpClientDiscoveryAbstractTest.CaseNearReplicatedTransactional.class)); - suite.addTest(new TestSuite(GridCacheClientModesTcpClientDiscoveryAbstractTest.CaseClientPartitionedAtomic.class)); - suite.addTest(new TestSuite(GridCacheClientModesTcpClientDiscoveryAbstractTest.CaseClientPartitionedTransactional.class)); - suite.addTest(new TestSuite(GridCacheClientModesTcpClientDiscoveryAbstractTest.CaseClientReplicatedAtomic.class)); - suite.addTest(new TestSuite(GridCacheClientModesTcpClientDiscoveryAbstractTest.CaseClientReplicatedTransactional.class)); - suite.addTest(new TestSuite(GridCacheTcpClientDiscoveryMultiThreadedTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheClientModesTcpClientDiscoveryAbstractTest.CaseNearPartitionedAtomic.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheClientModesTcpClientDiscoveryAbstractTest.CaseNearPartitionedTransactional.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheClientModesTcpClientDiscoveryAbstractTest.CaseNearReplicatedAtomic.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheClientModesTcpClientDiscoveryAbstractTest.CaseNearReplicatedTransactional.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheClientModesTcpClientDiscoveryAbstractTest.CaseClientPartitionedAtomic.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheClientModesTcpClientDiscoveryAbstractTest.CaseClientPartitionedTransactional.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheClientModesTcpClientDiscoveryAbstractTest.CaseClientReplicatedAtomic.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheClientModesTcpClientDiscoveryAbstractTest.CaseClientReplicatedTransactional.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheTcpClientDiscoveryMultiThreadedTest.class)); return suite; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteContinuousTaskSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteContinuousTaskSelfTestSuite.java index a99826ecae600..b520078440422 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteContinuousTaskSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteContinuousTaskSelfTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.GridContinuousJobAnnotationSelfTest; import org.apache.ignite.internal.GridContinuousJobSiblingsSelfTest; @@ -34,12 +35,12 @@ public class IgniteContinuousTaskSelfTestSuite extends TestSuite { public static TestSuite suite() throws Exception { TestSuite suite = new TestSuite("Ignite Kernal Test Suite"); - suite.addTest(new TestSuite(GridContinuousJobAnnotationSelfTest.class)); - suite.addTest(new TestSuite(GridContinuousJobSiblingsSelfTest.class)); - suite.addTest(new TestSuite(GridContinuousTaskSelfTest.class)); - suite.addTest(new TestSuite(GridTaskContinuousMapperSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridContinuousJobAnnotationSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridContinuousJobSiblingsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridContinuousTaskSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridTaskContinuousMapperSelfTest.class)); return suite; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteExternalizableSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteExternalizableSelfTestSuite.java index 7ac1284a813e5..d4a1d24a89bdc 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteExternalizableSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteExternalizableSelfTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.GridTopicExternalizableSelfTest; @@ -30,8 +31,8 @@ public class IgniteExternalizableSelfTestSuite extends TestSuite { public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite Externalizable Test Suite"); - suite.addTest(new TestSuite(GridTopicExternalizableSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridTopicExternalizableSelfTest.class)); return suite; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteIgfsTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteIgfsTestSuite.java index e7c567b79efc2..38824c280f1f0 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteIgfsTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteIgfsTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.igfs.IgfsFragmentizerSelfTest; import org.apache.ignite.igfs.IgfsFragmentizerTopologySelfTest; @@ -80,46 +81,46 @@ public class IgniteIgfsTestSuite extends TestSuite { public static TestSuite suite() throws Exception { TestSuite suite = new TestSuite("Ignite FS Test Suite For Platform Independent Tests"); - suite.addTest(new TestSuite(IgfsPrimarySelfTest.class)); - suite.addTest(new TestSuite(IgfsPrimaryMultiNodeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgfsPrimarySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgfsPrimaryMultiNodeSelfTest.class)); - suite.addTest(new TestSuite(IgfsPrimaryRelaxedConsistencySelfTest.class)); - suite.addTest(new TestSuite(IgfsPrimaryRelaxedConsistencyMultiNodeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgfsPrimaryRelaxedConsistencySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgfsPrimaryRelaxedConsistencyMultiNodeSelfTest.class)); - suite.addTest(new TestSuite(IgfsDualSyncSelfTest.class)); - suite.addTest(new TestSuite(IgfsDualAsyncSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgfsDualSyncSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgfsDualAsyncSelfTest.class)); - suite.addTest(new TestSuite(IgfsLocalSecondaryFileSystemDualSyncSelfTest.class)); - suite.addTest(new TestSuite(IgfsLocalSecondaryFileSystemDualAsyncSelfTest.class)); - suite.addTest(new TestSuite(IgfsLocalSecondaryFileSystemDualSyncClientSelfTest.class)); - suite.addTest(new TestSuite(IgfsLocalSecondaryFileSystemDualAsyncClientSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgfsLocalSecondaryFileSystemDualSyncSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgfsLocalSecondaryFileSystemDualAsyncSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgfsLocalSecondaryFileSystemDualSyncClientSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgfsLocalSecondaryFileSystemDualAsyncClientSelfTest.class)); - //suite.addTest(new TestSuite(IgfsSizeSelfTest.class)); - suite.addTest(new TestSuite(IgfsAttributesSelfTest.class)); - suite.addTest(new TestSuite(IgfsFileInfoSelfTest.class)); - suite.addTest(new TestSuite(IgfsMetaManagerSelfTest.class)); - suite.addTest(new TestSuite(IgfsDataManagerSelfTest.class)); - suite.addTest(new TestSuite(IgfsProcessorSelfTest.class)); - suite.addTest(new TestSuite(IgfsProcessorValidationSelfTest.class)); - suite.addTest(new TestSuite(IgfsCacheSelfTest.class)); + //suite.addTest(new JUnit4TestAdapter(IgfsSizeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgfsAttributesSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgfsFileInfoSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgfsMetaManagerSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgfsDataManagerSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgfsProcessorSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgfsProcessorValidationSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgfsCacheSelfTest.class)); if (U.isWindows()) - suite.addTest(new TestSuite(IgfsServerManagerIpcEndpointRegistrationOnWindowsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgfsServerManagerIpcEndpointRegistrationOnWindowsSelfTest.class)); - suite.addTest(new TestSuite(IgfsCachePerBlockLruEvictionPolicySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgfsCachePerBlockLruEvictionPolicySelfTest.class)); - suite.addTest(new TestSuite(IgfsStreamsSelfTest.class)); - suite.addTest(new TestSuite(IgfsModesSelfTest.class)); - suite.addTest(new TestSuite(IgfsMetricsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgfsStreamsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgfsModesSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgfsMetricsSelfTest.class)); - suite.addTest(new TestSuite(IgfsPrimaryClientSelfTest.class)); - suite.addTest(new TestSuite(IgfsPrimaryRelaxedConsistencyClientSelfTest.class)); - suite.addTest(new TestSuite(IgfsDualSyncClientSelfTest.class)); - suite.addTest(new TestSuite(IgfsDualAsyncClientSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgfsPrimaryClientSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgfsPrimaryRelaxedConsistencyClientSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgfsDualSyncClientSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgfsDualAsyncClientSelfTest.class)); - suite.addTest(new TestSuite(IgfsOneClientNodeTest.class)); + suite.addTest(new JUnit4TestAdapter(IgfsOneClientNodeTest.class)); - suite.addTest(new TestSuite(IgfsModeResolverSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgfsModeResolverSelfTest.class)); //suite.addTestSuite(IgfsPathSelfTest.class); suite.addTestSuite(IgfsFragmentizerSelfTest.class); diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteIpcSharedMemorySelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteIpcSharedMemorySelfTestSuite.java index 0b8d580a1253a..63973fbb0b463 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteIpcSharedMemorySelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteIpcSharedMemorySelfTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.util.ipc.shmem.IpcSharedMemoryCrashDetectionSelfTest; import org.apache.ignite.internal.util.ipc.shmem.IpcSharedMemoryNativeLoaderSelfTest; @@ -34,11 +35,11 @@ public class IgniteIpcSharedMemorySelfTestSuite extends TestSuite { public static TestSuite suite() throws Exception { TestSuite suite = new TestSuite("Ignite IPC Shared Memory Test Suite."); - suite.addTest(new TestSuite(IpcSharedMemorySpaceSelfTest.class)); - suite.addTest(new TestSuite(IpcSharedMemoryUtilsSelfTest.class)); - suite.addTest(new TestSuite(IpcSharedMemoryCrashDetectionSelfTest.class)); - suite.addTest(new TestSuite(IpcSharedMemoryNativeLoaderSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IpcSharedMemorySpaceSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IpcSharedMemoryUtilsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IpcSharedMemoryCrashDetectionSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IpcSharedMemoryNativeLoaderSelfTest.class)); return suite; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteJobMetricsSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteJobMetricsSelfTestSuite.java index 2255bda1b1984..0873b194f605d 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteJobMetricsSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteJobMetricsSelfTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.jobmetrics.GridJobMetricsProcessorLoadTest; @@ -31,8 +32,8 @@ public class IgniteJobMetricsSelfTestSuite extends TestSuite { public static TestSuite suite() throws Exception { TestSuite suite = new TestSuite("Ignite Job metrics Test Suite"); - suite.addTest(new TestSuite(GridJobMetricsProcessorLoadTest.class)); + suite.addTest(new JUnit4TestAdapter(GridJobMetricsProcessorLoadTest.class)); return suite; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteLangSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteLangSelfTestSuite.java index f40b03e534715..4e6cc3b582fcf 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteLangSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteLangSelfTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.util.future.GridCompoundFutureSelfTest; import org.apache.ignite.internal.util.future.GridEmbeddedFutureSelfTest; @@ -57,39 +58,39 @@ public class IgniteLangSelfTestSuite extends TestSuite { public static TestSuite suite() throws Exception { TestSuite suite = new TestSuite("Ignite Lang Test Suite"); - suite.addTest(new TestSuite(GridTupleSelfTest.class)); - suite.addTest(new TestSuite(GridBoundedPriorityQueueSelfTest.class)); - suite.addTest(new TestSuite(GridByteArrayListSelfTest.class)); - suite.addTest(new TestSuite(GridLeanMapSelfTest.class)); - suite.addTest(new TestSuite(GridLeanIdentitySetSelfTest.class)); - suite.addTest(new TestSuite(GridListSetSelfTest.class)); - suite.addTest(new TestSuite(GridSetWrapperSelfTest.class)); - suite.addTest(new TestSuite(GridConcurrentWeakHashSetSelfTest.class)); - suite.addTest(new TestSuite(GridMetadataAwareAdapterSelfTest.class)); - suite.addTest(new TestSuite(GridSetWrapperSelfTest.class)); - suite.addTest(new TestSuite(IgniteUuidSelfTest.class)); - suite.addTest(new TestSuite(GridXSelfTest.class)); - suite.addTest(new TestSuite(GridBoundedConcurrentOrderedMapSelfTest.class)); - suite.addTest(new TestSuite(GridBoundedConcurrentLinkedHashMapSelfTest.class)); - suite.addTest(new TestSuite(GridConcurrentLinkedDequeSelfTest.class)); - suite.addTest(new TestSuite(GridCircularBufferSelfTest.class)); - suite.addTest(new TestSuite(GridConcurrentLinkedHashMapSelfTest.class)); - suite.addTest(new TestSuite(GridConcurrentLinkedHashMapMultiThreadedSelfTest.class)); - suite.addTest(new TestSuite(GridStripedLockSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridTupleSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridBoundedPriorityQueueSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridByteArrayListSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridLeanMapSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridLeanIdentitySetSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridListSetSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridSetWrapperSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridConcurrentWeakHashSetSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridMetadataAwareAdapterSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridSetWrapperSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteUuidSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridXSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridBoundedConcurrentOrderedMapSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridBoundedConcurrentLinkedHashMapSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridConcurrentLinkedDequeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCircularBufferSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridConcurrentLinkedHashMapSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridConcurrentLinkedHashMapMultiThreadedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridStripedLockSelfTest.class)); - suite.addTest(new TestSuite(GridFutureAdapterSelfTest.class)); - suite.addTest(new TestSuite(GridCompoundFutureSelfTest.class)); - suite.addTest(new TestSuite(GridEmbeddedFutureSelfTest.class)); - suite.addTest(new TestSuite(GridNioFutureSelfTest.class)); - suite.addTest(new TestSuite(GridNioEmbeddedFutureSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridFutureAdapterSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCompoundFutureSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridEmbeddedFutureSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridNioFutureSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridNioEmbeddedFutureSelfTest.class)); - suite.addTest(new TestSuite(IgniteFutureImplTest.class)); - suite.addTest(new TestSuite(IgniteCacheFutureImplTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteFutureImplTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheFutureImplTest.class)); - suite.addTest(new TestSuite(IgniteOffheapReadWriteLockSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteOffheapReadWriteLockSelfTest.class)); // Consistent hash tests. - suite.addTest(new TestSuite(GridConsistentHashSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridConsistentHashSelfTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteLoggingSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteLoggingSelfTestSuite.java index 43a56fd664078..b0f58514fc876 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteLoggingSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteLoggingSelfTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.logger.java.JavaLoggerTest; @@ -30,7 +31,7 @@ public class IgniteLoggingSelfTestSuite extends TestSuite { public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite Logging Test Suite"); - suite.addTest(new TestSuite(JavaLoggerTest.class)); + suite.addTest(new JUnit4TestAdapter(JavaLoggerTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteP2PSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteP2PSelfTestSuite.java index 8a0bc3ec42cd8..95ecfa4725c31 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteP2PSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteP2PSelfTestSuite.java @@ -18,6 +18,7 @@ package org.apache.ignite.testsuites; import java.util.Set; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.managers.deployment.GridDeploymentMessageCountSelfTest; import org.apache.ignite.p2p.DeploymentClassLoaderCallableTest; @@ -60,25 +61,25 @@ public static TestSuite suite() throws Exception { public static TestSuite suite(Set ignoredTests) throws Exception { TestSuite suite = new TestSuite("Ignite P2P Test Suite"); - suite.addTest(new TestSuite(GridP2PDoubleDeploymentSelfTest.class)); - suite.addTest(new TestSuite(GridP2PHotRedeploymentSelfTest.class)); - suite.addTest(new TestSuite(GridP2PClassLoadingSelfTest.class)); - suite.addTest(new TestSuite(GridP2PUndeploySelfTest.class)); - suite.addTest(new TestSuite(GridP2PRemoteClassLoadersSelfTest.class)); - suite.addTest(new TestSuite(GridP2PNodeLeftSelfTest.class)); - suite.addTest(new TestSuite(GridP2PDifferentClassLoaderSelfTest.class)); - suite.addTest(new TestSuite(GridP2PSameClassLoaderSelfTest.class)); - suite.addTest(new TestSuite(GridP2PJobClassLoaderSelfTest.class)); - suite.addTest(new TestSuite(GridP2PRecursionTaskSelfTest.class)); - suite.addTest(new TestSuite(GridP2PLocalDeploymentSelfTest.class)); - //suite.addTest(new TestSuite(GridP2PTestTaskExecutionTest.class)); - suite.addTest(new TestSuite(GridP2PTimeoutSelfTest.class)); - suite.addTest(new TestSuite(GridP2PMissedResourceCacheSizeSelfTest.class)); - suite.addTest(new TestSuite(GridP2PContinuousDeploymentSelfTest.class)); - suite.addTest(new TestSuite(DeploymentClassLoaderCallableTest.class)); - suite.addTest(new TestSuite(P2PStreamingClassLoaderTest.class)); - suite.addTest(new TestSuite(SharedDeploymentTest.class)); - suite.addTest(new TestSuite(P2PScanQueryUndeployTest.class)); + suite.addTest(new JUnit4TestAdapter(GridP2PDoubleDeploymentSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridP2PHotRedeploymentSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridP2PClassLoadingSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridP2PUndeploySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridP2PRemoteClassLoadersSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridP2PNodeLeftSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridP2PDifferentClassLoaderSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridP2PSameClassLoaderSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridP2PJobClassLoaderSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridP2PRecursionTaskSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridP2PLocalDeploymentSelfTest.class)); + //suite.addTest(new JUnit4TestAdapter(GridP2PTestTaskExecutionTest.class)); + suite.addTest(new JUnit4TestAdapter(GridP2PTimeoutSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridP2PMissedResourceCacheSizeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridP2PContinuousDeploymentSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(DeploymentClassLoaderCallableTest.class)); + suite.addTest(new JUnit4TestAdapter(P2PStreamingClassLoaderTest.class)); + suite.addTest(new JUnit4TestAdapter(SharedDeploymentTest.class)); + suite.addTest(new JUnit4TestAdapter(P2PScanQueryUndeployTest.class)); GridTestUtils.addTestIfNeeded(suite, GridDeploymentMessageCountSelfTest.class, ignoredTests); return suite; diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePlatformsTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePlatformsTestSuite.java index f7021d88ce4c0..682fff3e41048 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePlatformsTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePlatformsTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.platform.PlatformDefaultJavaObjectFactorySelfTest; import org.apache.ignite.platform.PlatformJavaObjectFactoryProxySelfTest; @@ -33,8 +34,8 @@ public static TestSuite suite() throws Exception { TestSuite suite = new TestSuite("Ignite Deployment SPI Test Suite"); // LocalDeploymentSpi tests - suite.addTest(new TestSuite(PlatformDefaultJavaObjectFactorySelfTest.class)); - suite.addTest(new TestSuite(PlatformJavaObjectFactoryProxySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(PlatformDefaultJavaObjectFactorySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(PlatformJavaObjectFactoryProxySelfTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiCheckpointSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiCheckpointSelfTestSuite.java index db26032f473e6..92e04a12baa17 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiCheckpointSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiCheckpointSelfTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.spi.checkpoint.cache.CacheCheckpointSpiConfigSelfTest; import org.apache.ignite.spi.checkpoint.cache.CacheCheckpointSpiSecondCacheSelfTest; @@ -43,23 +44,23 @@ public static TestSuite suite() throws Exception { TestSuite suite = new TestSuite("Ignite Checkpoint Test Suite"); // Cache. - suite.addTest(new TestSuite(CacheCheckpointSpiConfigSelfTest.class)); - suite.addTest(new TestSuite(CacheCheckpointSpiSelfTest.class)); - suite.addTest(new TestSuite(CacheCheckpointSpiStartStopSelfTest.class)); - suite.addTest(new TestSuite(CacheCheckpointSpiSecondCacheSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheCheckpointSpiConfigSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheCheckpointSpiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheCheckpointSpiStartStopSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheCheckpointSpiSecondCacheSelfTest.class)); // JDBC. - suite.addTest(new TestSuite(JdbcCheckpointSpiConfigSelfTest.class)); - suite.addTest(new TestSuite(JdbcCheckpointSpiCustomConfigSelfTest.class)); - suite.addTest(new TestSuite(JdbcCheckpointSpiDefaultConfigSelfTest.class)); - suite.addTest(new TestSuite(JdbcCheckpointSpiStartStopSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcCheckpointSpiConfigSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcCheckpointSpiCustomConfigSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcCheckpointSpiDefaultConfigSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcCheckpointSpiStartStopSelfTest.class)); // Shared FS. - suite.addTest(new TestSuite(GridSharedFsCheckpointSpiMultipleDirectoriesSelfTest.class)); - suite.addTest(new TestSuite(GridSharedFsCheckpointSpiSelfTest.class)); - suite.addTest(new TestSuite(GridSharedFsCheckpointSpiStartStopSelfTest.class)); - suite.addTest(new TestSuite(GridSharedFsCheckpointSpiConfigSelfTest.class)); - //suite.addTest(new TestSuite(GridSharedFsCheckpointSpiMultiThreadedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridSharedFsCheckpointSpiMultipleDirectoriesSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridSharedFsCheckpointSpiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridSharedFsCheckpointSpiStartStopSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridSharedFsCheckpointSpiConfigSelfTest.class)); + //suite.addTest(new JUnit4TestAdapter(GridSharedFsCheckpointSpiMultiThreadedSelfTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiCommunicationSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiCommunicationSelfTestSuite.java index 50c0412a7c342..105210882d1ae 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiCommunicationSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiCommunicationSelfTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.spi.communication.tcp.GridTcpCommunicationSpiConcurrentConnectSelfTest; import org.apache.ignite.spi.communication.tcp.GridTcpCommunicationSpiConcurrentConnectSslSelfTest; @@ -53,41 +54,41 @@ public class IgniteSpiCommunicationSelfTestSuite extends TestSuite { public static TestSuite suite() throws Exception { TestSuite suite = new TestSuite("Communication SPI Test Suite"); - suite.addTest(new TestSuite(GridTcpCommunicationSpiRecoveryAckSelfTest.class)); - suite.addTest(new TestSuite(IgniteTcpCommunicationRecoveryAckClosureSelfTest.class)); - suite.addTest(new TestSuite(GridTcpCommunicationSpiRecoverySelfTest.class)); - suite.addTest(new TestSuite(GridTcpCommunicationSpiRecoveryNoPairedConnectionsTest.class)); - suite.addTest(new TestSuite(GridTcpCommunicationSpiRecoverySslSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridTcpCommunicationSpiRecoveryAckSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteTcpCommunicationRecoveryAckClosureSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridTcpCommunicationSpiRecoverySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridTcpCommunicationSpiRecoveryNoPairedConnectionsTest.class)); + suite.addTest(new JUnit4TestAdapter(GridTcpCommunicationSpiRecoverySslSelfTest.class)); - suite.addTest(new TestSuite(GridTcpCommunicationSpiConcurrentConnectSelfTest.class)); - suite.addTest(new TestSuite(GridTcpCommunicationSpiConcurrentConnectSslSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridTcpCommunicationSpiConcurrentConnectSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridTcpCommunicationSpiConcurrentConnectSslSelfTest.class)); - suite.addTest(new TestSuite(GridTcpCommunicationSpiSslSelfTest.class)); - suite.addTest(new TestSuite(GridTcpCommunicationSpiSslSmallBuffersSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridTcpCommunicationSpiSslSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridTcpCommunicationSpiSslSmallBuffersSelfTest.class)); - suite.addTest(new TestSuite(GridTcpCommunicationSpiTcpSelfTest.class)); - suite.addTest(new TestSuite(GridTcpCommunicationSpiTcpNoDelayOffSelfTest.class)); - suite.addTest(new TestSuite(GridTcpCommunicationSpiShmemSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridTcpCommunicationSpiTcpSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridTcpCommunicationSpiTcpNoDelayOffSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridTcpCommunicationSpiShmemSelfTest.class)); - suite.addTest(new TestSuite(GridTcpCommunicationSpiStartStopSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridTcpCommunicationSpiStartStopSelfTest.class)); - suite.addTest(new TestSuite(GridTcpCommunicationSpiMultithreadedSelfTest.class)); - suite.addTest(new TestSuite(GridTcpCommunicationSpiMultithreadedShmemTest.class)); + suite.addTest(new JUnit4TestAdapter(GridTcpCommunicationSpiMultithreadedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridTcpCommunicationSpiMultithreadedShmemTest.class)); - suite.addTest(new TestSuite(GridTcpCommunicationSpiRecoveryFailureDetectionSelfTest.class)); - suite.addTest(new TestSuite(GridTcpCommunicationSpiTcpFailureDetectionSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridTcpCommunicationSpiRecoveryFailureDetectionSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridTcpCommunicationSpiTcpFailureDetectionSelfTest.class)); - suite.addTest(new TestSuite(GridTcpCommunicationSpiConfigSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridTcpCommunicationSpiConfigSelfTest.class)); - suite.addTest(new TestSuite(TcpCommunicationSpiSkipMessageSendTest.class)); + suite.addTest(new JUnit4TestAdapter(TcpCommunicationSpiSkipMessageSendTest.class)); - suite.addTest(new TestSuite(TcpCommunicationSpiFaultyClientTest.class)); - suite.addTest(new TestSuite(TcpCommunicationSpiDropNodesTest.class)); - suite.addTest(new TestSuite(TcpCommunicationSpiHalfOpenedConnectionTest.class)); + suite.addTest(new JUnit4TestAdapter(TcpCommunicationSpiFaultyClientTest.class)); + suite.addTest(new JUnit4TestAdapter(TcpCommunicationSpiDropNodesTest.class)); + suite.addTest(new JUnit4TestAdapter(TcpCommunicationSpiHalfOpenedConnectionTest.class)); - suite.addTest(new TestSuite(TcpCommunicationStatisticsTest.class)); + suite.addTest(new JUnit4TestAdapter(TcpCommunicationStatisticsTest.class)); - //suite.addTest(new TestSuite(GridCacheDhtLockBackupSelfTest.class)); + //suite.addTest(new JUnit4TestAdapter(GridCacheDhtLockBackupSelfTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiDeploymentSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiDeploymentSelfTestSuite.java index f3b1e5665d298..eb4679bbed931 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiDeploymentSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiDeploymentSelfTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.spi.deployment.local.GridLocalDeploymentSpiSelfTest; import org.apache.ignite.spi.deployment.local.GridLocalDeploymentSpiStartStopSelfTest; @@ -33,9 +34,9 @@ public static TestSuite suite() throws Exception { TestSuite suite = new TestSuite("Ignite Deployment SPI Test Suite"); // LocalDeploymentSpi tests - suite.addTest(new TestSuite(GridLocalDeploymentSpiSelfTest.class)); - suite.addTest(new TestSuite(GridLocalDeploymentSpiStartStopSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridLocalDeploymentSpiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridLocalDeploymentSpiStartStopSelfTest.class)); return suite; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiDiscoverySelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiDiscoverySelfTestSuite.java index 3ef1087a81efd..86731648ebdaa 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiDiscoverySelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiDiscoverySelfTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.IgniteDiscoveryMassiveNodeFailTest; import org.apache.ignite.spi.GridTcpSpiForwardingSelfTest; @@ -79,71 +80,71 @@ public static TestSuite suite() throws Exception { TestSuite suite = new TestSuite("Ignite Discovery SPI Test Suite"); // Tcp. - suite.addTest(new TestSuite(TcpDiscoveryVmIpFinderSelfTest.class)); - suite.addTest(new TestSuite(TcpDiscoverySharedFsIpFinderSelfTest.class)); - suite.addTest(new TestSuite(TcpDiscoveryJdbcIpFinderSelfTest.class)); - suite.addTest(new TestSuite(TcpDiscoveryMulticastIpFinderSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(TcpDiscoveryVmIpFinderSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(TcpDiscoverySharedFsIpFinderSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(TcpDiscoveryJdbcIpFinderSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(TcpDiscoveryMulticastIpFinderSelfTest.class)); - suite.addTest(new TestSuite(TcpDiscoverySelfTest.class)); - suite.addTest(new TestSuite(TcpDiscoverySpiSelfTest.class)); - //suite.addTest(new TestSuite(TcpDiscoverySpiRandomStartStopTest.class)); - //suite.addTest(new TestSuite(TcpDiscoverySpiSslSelfTest.class)); - //suite.addTest(new TestSuite(TcpDiscoverySpiWildcardSelfTest.class)); - suite.addTest(new TestSuite(TcpDiscoverySpiFailureTimeoutSelfTest.class)); - suite.addTest(new TestSuite(TcpDiscoverySpiMBeanTest.class)); - suite.addTest(new TestSuite(TcpDiscoverySpiStartStopSelfTest.class)); - suite.addTest(new TestSuite(TcpDiscoverySpiConfigSelfTest.class)); - suite.addTest(new TestSuite(TcpDiscoveryMarshallerCheckSelfTest.class)); - suite.addTest(new TestSuite(TcpDiscoverySnapshotHistoryTest.class)); + suite.addTest(new JUnit4TestAdapter(TcpDiscoverySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(TcpDiscoverySpiSelfTest.class)); + //suite.addTest(new JUnit4TestAdapter(TcpDiscoverySpiRandomStartStopTest.class)); + //suite.addTest(new JUnit4TestAdapter(TcpDiscoverySpiSslSelfTest.class)); + //suite.addTest(new JUnit4TestAdapter(TcpDiscoverySpiWildcardSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(TcpDiscoverySpiFailureTimeoutSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(TcpDiscoverySpiMBeanTest.class)); + suite.addTest(new JUnit4TestAdapter(TcpDiscoverySpiStartStopSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(TcpDiscoverySpiConfigSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(TcpDiscoveryMarshallerCheckSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(TcpDiscoverySnapshotHistoryTest.class)); - suite.addTest(new TestSuite(GridTcpSpiForwardingSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridTcpSpiForwardingSelfTest.class)); - suite.addTest(new TestSuite(TcpClientDiscoverySpiSelfTest.class)); - suite.addTest(new TestSuite(LongClientConnectToClusterTest.class)); - suite.addTest(new TestSuite(TcpClientDiscoveryMarshallerCheckSelfTest.class)); - suite.addTest(new TestSuite(TcpClientDiscoverySpiCoordinatorChangeTest.class)); - suite.addTest(new TestSuite(TcpClientDiscoverySpiMulticastTest.class)); - suite.addTest(new TestSuite(TcpClientDiscoverySpiFailureTimeoutSelfTest.class)); - suite.addTest(new TestSuite(TcpClientDiscoveryUnresolvedHostTest.class)); + suite.addTest(new JUnit4TestAdapter(TcpClientDiscoverySpiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(LongClientConnectToClusterTest.class)); + suite.addTest(new JUnit4TestAdapter(TcpClientDiscoveryMarshallerCheckSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(TcpClientDiscoverySpiCoordinatorChangeTest.class)); + suite.addTest(new JUnit4TestAdapter(TcpClientDiscoverySpiMulticastTest.class)); + suite.addTest(new JUnit4TestAdapter(TcpClientDiscoverySpiFailureTimeoutSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(TcpClientDiscoveryUnresolvedHostTest.class)); - suite.addTest(new TestSuite(TcpDiscoveryNodeConsistentIdSelfTest.class)); - suite.addTest(new TestSuite(TcpDiscoveryNodeConfigConsistentIdSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(TcpDiscoveryNodeConsistentIdSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(TcpDiscoveryNodeConfigConsistentIdSelfTest.class)); - suite.addTest(new TestSuite(TcpDiscoveryRestartTest.class)); - suite.addTest(new TestSuite(TcpDiscoveryMultiThreadedTest.class)); - //suite.addTest(new TestSuite(TcpDiscoveryConcurrentStartTest.class)); + suite.addTest(new JUnit4TestAdapter(TcpDiscoveryRestartTest.class)); + suite.addTest(new JUnit4TestAdapter(TcpDiscoveryMultiThreadedTest.class)); + //suite.addTest(new JUnit4TestAdapter(TcpDiscoveryConcurrentStartTest.class)); - suite.addTest(new TestSuite(TcpDiscoverySegmentationPolicyTest.class)); + suite.addTest(new JUnit4TestAdapter(TcpDiscoverySegmentationPolicyTest.class)); - suite.addTest(new TestSuite(TcpDiscoveryNodeAttributesUpdateOnReconnectTest.class)); - suite.addTest(new TestSuite(AuthenticationRestartTest.class)); + suite.addTest(new JUnit4TestAdapter(TcpDiscoveryNodeAttributesUpdateOnReconnectTest.class)); + suite.addTest(new JUnit4TestAdapter(AuthenticationRestartTest.class)); - suite.addTest(new TestSuite(TcpDiscoveryWithWrongServerTest.class)); + suite.addTest(new JUnit4TestAdapter(TcpDiscoveryWithWrongServerTest.class)); - suite.addTest(new TestSuite(TcpDiscoverySpiReconnectDelayTest.class)); + suite.addTest(new JUnit4TestAdapter(TcpDiscoverySpiReconnectDelayTest.class)); - suite.addTest(new TestSuite(IgniteDiscoveryMassiveNodeFailTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteDiscoveryMassiveNodeFailTest.class)); // Client connect. - suite.addTest(new TestSuite(IgniteClientConnectTest.class)); - suite.addTest(new TestSuite(IgniteClientReconnectMassiveShutdownTest.class)); - suite.addTest(new TestSuite(TcpDiscoveryClientSuspensionSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteClientConnectTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteClientReconnectMassiveShutdownTest.class)); + suite.addTest(new JUnit4TestAdapter(TcpDiscoveryClientSuspensionSelfTest.class)); // SSL. - suite.addTest(new TestSuite(TcpDiscoverySslSelfTest.class)); - suite.addTest(new TestSuite(TcpDiscoverySslTrustedSelfTest.class)); - suite.addTest(new TestSuite(TcpDiscoverySslSecuredUnsecuredTest.class)); - suite.addTest(new TestSuite(TcpDiscoverySslTrustedUntrustedTest.class)); - suite.addTest(new TestSuite(TcpDiscoverySslParametersTest.class)); + suite.addTest(new JUnit4TestAdapter(TcpDiscoverySslSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(TcpDiscoverySslTrustedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(TcpDiscoverySslSecuredUnsecuredTest.class)); + suite.addTest(new JUnit4TestAdapter(TcpDiscoverySslTrustedUntrustedTest.class)); + suite.addTest(new JUnit4TestAdapter(TcpDiscoverySslParametersTest.class)); // Disco cache reuse. - suite.addTest(new TestSuite(IgniteDiscoveryCacheReuseSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteDiscoveryCacheReuseSelfTest.class)); - suite.addTest(new TestSuite(DiscoveryUnmarshalVulnerabilityTest.class)); + suite.addTest(new JUnit4TestAdapter(DiscoveryUnmarshalVulnerabilityTest.class)); - suite.addTest(new TestSuite(FilterDataForClientNodeDiscoveryTest.class)); + suite.addTest(new JUnit4TestAdapter(FilterDataForClientNodeDiscoveryTest.class)); - suite.addTest(new TestSuite(TcpDiscoveryPendingMessageDeliveryTest.class)); + suite.addTest(new JUnit4TestAdapter(TcpDiscoveryPendingMessageDeliveryTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiEventStorageSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiEventStorageSelfTestSuite.java index 9f295a28e883e..6c814983776d0 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiEventStorageSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiEventStorageSelfTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.spi.eventstorage.memory.GridMemoryEventStorageMultiThreadedSelfTest; import org.apache.ignite.spi.eventstorage.memory.GridMemoryEventStorageSpiConfigSelfTest; @@ -34,11 +35,11 @@ public class IgniteSpiEventStorageSelfTestSuite extends TestSuite { public static TestSuite suite() throws Exception { TestSuite suite = new TestSuite("Ignite Event Storage Test Suite"); - suite.addTest(new TestSuite(GridMemoryEventStorageSpiSelfTest.class)); - suite.addTest(new TestSuite(GridMemoryEventStorageSpiStartStopSelfTest.class)); - suite.addTest(new TestSuite(GridMemoryEventStorageMultiThreadedSelfTest.class)); - suite.addTest(new TestSuite(GridMemoryEventStorageSpiConfigSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridMemoryEventStorageSpiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridMemoryEventStorageSpiStartStopSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridMemoryEventStorageMultiThreadedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridMemoryEventStorageSpiConfigSelfTest.class)); return suite; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiFailoverSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiFailoverSelfTestSuite.java index 2e8f0e9965326..d48c2ac27de49 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiFailoverSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiFailoverSelfTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.spi.failover.always.GridAlwaysFailoverSpiConfigSelfTest; import org.apache.ignite.spi.failover.always.GridAlwaysFailoverSpiSelfTest; @@ -40,20 +41,20 @@ public static TestSuite suite() throws Exception { TestSuite suite = new TestSuite("Ignite Failover SPI Test Suite"); // Always failover. - suite.addTest(new TestSuite(GridAlwaysFailoverSpiSelfTest.class)); - suite.addTest(new TestSuite(GridAlwaysFailoverSpiStartStopSelfTest.class)); - suite.addTest(new TestSuite(GridAlwaysFailoverSpiConfigSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridAlwaysFailoverSpiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridAlwaysFailoverSpiStartStopSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridAlwaysFailoverSpiConfigSelfTest.class)); // Never failover. - suite.addTest(new TestSuite(GridNeverFailoverSpiSelfTest.class)); - suite.addTest(new TestSuite(GridNeverFailoverSpiStartStopSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridNeverFailoverSpiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridNeverFailoverSpiStartStopSelfTest.class)); // Job stealing failover. - suite.addTest(new TestSuite(GridJobStealingFailoverSpiSelfTest.class)); - suite.addTest(new TestSuite(GridJobStealingFailoverSpiOneNodeSelfTest.class)); - suite.addTest(new TestSuite(GridJobStealingFailoverSpiStartStopSelfTest.class)); - suite.addTest(new TestSuite(GridJobStealingFailoverSpiConfigSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridJobStealingFailoverSpiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridJobStealingFailoverSpiOneNodeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridJobStealingFailoverSpiStartStopSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridJobStealingFailoverSpiConfigSelfTest.class)); return suite; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteStartUpTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteStartUpTestSuite.java index b29f5c730dd2e..c1a35454340dd 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteStartUpTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteStartUpTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.startup.cmdline.GridCommandLineTransformerSelfTest; @@ -31,7 +32,7 @@ public class IgniteStartUpTestSuite extends TestSuite { public static TestSuite suite() throws Exception { TestSuite suite = new TestSuite("Ignite StartUp Test Suite"); - suite.addTest(new TestSuite(GridCommandLineTransformerSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCommandLineTransformerSelfTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteStreamSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteStreamSelfTestSuite.java index 9eac2773166f7..a66940137842e 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteStreamSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteStreamSelfTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.stream.socket.SocketStreamerSelfTest; import org.apache.ignite.stream.socket.SocketStreamerUnmarshalVulnerabilityTest; @@ -32,9 +33,9 @@ public class IgniteStreamSelfTestSuite extends TestSuite { public static TestSuite suite() throws Exception { TestSuite suite = new TestSuite("Ignite Stream Test Suite"); - suite.addTest(new TestSuite(SocketStreamerSelfTest.class)); - suite.addTest(new TestSuite(SocketStreamerUnmarshalVulnerabilityTest.class)); + suite.addTest(new JUnit4TestAdapter(SocketStreamerSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(SocketStreamerUnmarshalVulnerabilityTest.class)); return suite; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteTaskSessionSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteTaskSessionSelfTestSuite.java index 9a837db184ac4..43b08a2261de2 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteTaskSessionSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteTaskSessionSelfTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.session.GridSessionCancelSiblingsFromFutureSelfTest; import org.apache.ignite.session.GridSessionCancelSiblingsFromJobSelfTest; @@ -49,26 +50,26 @@ public class IgniteTaskSessionSelfTestSuite extends TestSuite { public static TestSuite suite() throws Exception { TestSuite suite = new TestSuite("Ignite TaskSession Test Suite"); - suite.addTest(new TestSuite(GridSessionCancelSiblingsFromFutureSelfTest.class)); - suite.addTest(new TestSuite(GridSessionCancelSiblingsFromJobSelfTest.class)); - suite.addTest(new TestSuite(GridSessionCancelSiblingsFromTaskSelfTest.class)); - suite.addTest(new TestSuite(GridSessionSetFutureAttributeSelfTest.class)); - suite.addTest(new TestSuite(GridSessionSetFutureAttributeWaitListenerSelfTest.class)); - suite.addTest(new TestSuite(GridSessionSetJobAttributeWaitListenerSelfTest.class)); - suite.addTest(new TestSuite(GridSessionSetJobAttributeSelfTest.class)); - suite.addTest(new TestSuite(GridSessionSetJobAttribute2SelfTest.class)); - suite.addTest(new TestSuite(GridSessionJobWaitTaskAttributeSelfTest.class)); - suite.addTest(new TestSuite(GridSessionSetTaskAttributeSelfTest.class)); - suite.addTest(new TestSuite(GridSessionFutureWaitTaskAttributeSelfTest.class)); - suite.addTest(new TestSuite(GridSessionFutureWaitJobAttributeSelfTest.class)); - suite.addTest(new TestSuite(GridSessionTaskWaitJobAttributeSelfTest.class)); - suite.addTest(new TestSuite(GridSessionSetJobAttributeOrderSelfTest.class)); - suite.addTest(new TestSuite(GridSessionWaitAttributeSelfTest.class)); - suite.addTest(new TestSuite(GridSessionJobFailoverSelfTest.class)); - suite.addTest(new TestSuite(GridSessionLoadSelfTest.class)); - suite.addTest(new TestSuite(GridSessionCollisionSpiSelfTest.class)); - suite.addTest(new TestSuite(GridSessionCheckpointSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridSessionCancelSiblingsFromFutureSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridSessionCancelSiblingsFromJobSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridSessionCancelSiblingsFromTaskSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridSessionSetFutureAttributeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridSessionSetFutureAttributeWaitListenerSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridSessionSetJobAttributeWaitListenerSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridSessionSetJobAttributeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridSessionSetJobAttribute2SelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridSessionJobWaitTaskAttributeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridSessionSetTaskAttributeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridSessionFutureWaitTaskAttributeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridSessionFutureWaitJobAttributeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridSessionTaskWaitJobAttributeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridSessionSetJobAttributeOrderSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridSessionWaitAttributeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridSessionJobFailoverSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridSessionLoadSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridSessionCollisionSpiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridSessionCheckpointSelfTest.class)); return suite; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteTimeoutProcessorSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteTimeoutProcessorSelfTestSuite.java index 713dce0a30b8a..c21175e94d5e2 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteTimeoutProcessorSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteTimeoutProcessorSelfTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.timeout.GridTimeoutProcessor; import org.apache.ignite.internal.processors.timeout.GridTimeoutProcessorSelfTest; @@ -32,8 +33,8 @@ public class IgniteTimeoutProcessorSelfTestSuite extends TestSuite { public static TestSuite suite() throws Exception { TestSuite suite = new TestSuite("Ignite Timeout Processor Test Suite"); - suite.addTest(new TestSuite(GridTimeoutProcessorSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridTimeoutProcessorSelfTest.class)); return suite; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteTopologyValidatorTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteTopologyValidatorTestSuite.java index 1c9b8525c8be0..e228dcbec9e7b 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteTopologyValidatorTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteTopologyValidatorTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.IgniteTopologyValidatorGridSplitCacheTest; import org.apache.ignite.internal.processors.cache.IgniteTopologyValidatorNearPartitionedAtomicCacheGroupsTest; @@ -43,22 +44,22 @@ public class IgniteTopologyValidatorTestSuite extends TestSuite { public static TestSuite suite() throws Exception { TestSuite suite = new TestSuite("Topology validator Test Suite"); - suite.addTest(new TestSuite(IgniteTopologyValidatorNearPartitionedAtomicCacheTest.class)); - suite.addTest(new TestSuite(IgniteTopologyValidatorNearPartitionedTxCacheTest.class)); - suite.addTest(new TestSuite(IgniteTopologyValidatorPartitionedAtomicCacheTest.class)); - suite.addTest(new TestSuite(IgniteTopologyValidatorPartitionedTxCacheTest.class)); - suite.addTest(new TestSuite(IgniteTopologyValidatorReplicatedAtomicCacheTest.class)); - suite.addTest(new TestSuite(IgniteTopologyValidatorReplicatedTxCacheTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteTopologyValidatorNearPartitionedAtomicCacheTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteTopologyValidatorNearPartitionedTxCacheTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteTopologyValidatorPartitionedAtomicCacheTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteTopologyValidatorPartitionedTxCacheTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteTopologyValidatorReplicatedAtomicCacheTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteTopologyValidatorReplicatedTxCacheTest.class)); - suite.addTest(new TestSuite(IgniteTopologyValidatorNearPartitionedAtomicCacheGroupsTest.class)); - suite.addTest(new TestSuite(IgniteTopologyValidatorNearPartitionedTxCacheGroupsTest.class)); - suite.addTest(new TestSuite(IgniteTopologyValidatorPartitionedAtomicCacheGroupsTest.class)); - suite.addTest(new TestSuite(IgniteTopologyValidatorPartitionedTxCacheGroupsTest.class)); - suite.addTest(new TestSuite(IgniteTopologyValidatorReplicatedAtomicCacheGroupsTest.class)); - suite.addTest(new TestSuite(IgniteTopologyValidatorReplicatedTxCacheGroupsTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteTopologyValidatorNearPartitionedAtomicCacheGroupsTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteTopologyValidatorNearPartitionedTxCacheGroupsTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteTopologyValidatorPartitionedAtomicCacheGroupsTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteTopologyValidatorPartitionedTxCacheGroupsTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteTopologyValidatorReplicatedAtomicCacheGroupsTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteTopologyValidatorReplicatedTxCacheGroupsTest.class)); - suite.addTest(new TestSuite(IgniteTopologyValidatorGridSplitCacheTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteTopologyValidatorGridSplitCacheTest.class)); return suite; } -} \ No newline at end of file +} From a600de407ab4032e42b393f4037338c8e00d3d0f Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Tue, 4 Dec 2018 14:44:33 +0300 Subject: [PATCH 044/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - corrected errors discovered by TC bot -- verified with diffs overview, rebuild and trial execution of changed tests at my machine --- .../ignite/internal/GridContinuousJobAnnotationSelfTest.java | 1 - .../GridCacheAbstractDataStructuresFailoverSelfTest.java | 1 - 2 files changed, 2 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousJobAnnotationSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousJobAnnotationSelfTest.java index 55040062ebfdf..50173605d6594 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousJobAnnotationSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousJobAnnotationSelfTest.java @@ -91,7 +91,6 @@ public void testJobChildAnnotation() throws Exception { * @param jobCls Job class. * @throws Exception If test failed. */ - @Test public void testContinuousJobAnnotation(Class jobCls) throws Exception { try { Ignite ignite = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java index acdc23a424f7e..e408b97e9bba7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java @@ -750,7 +750,6 @@ public void testFairReentrantLockFailsWhenServersLeft() throws Exception { /** * @throws Exception If failed. */ - @Test public void testReentrantLockFailsWhenServersLeft(final boolean fair) throws Exception { client = true; From c4f963ade106ce0679b86b4b856f1edaa6906578 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Tue, 4 Dec 2018 15:28:32 +0300 Subject: [PATCH 045/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - upgraded setUp and tearDown methods -- verified with diffs overview and rebuild --- .../internal/commandline/CommandHandlerParsingTest.java | 6 +++++- .../v2/DirectByteBufferStreamImplV2ByteOrderSelfTest.java | 2 ++ .../GridManagerMxBeanIllegalArgumentHandleTest.java | 4 ++++ .../processors/cache/GridCacheBasicStoreAbstractTest.java | 2 ++ .../cache/GridCacheEvictionEventAbstractTest.java | 2 ++ .../cache/GridCacheGetAndTransformStoreAbstractTest.java | 2 ++ .../cache/GridCacheInterceptorLocalSelfTest.java | 4 +++- .../cache/GridCacheInterceptorLocalWithStoreSelfTest.java | 4 +++- .../cache/GridCacheVariableTopologySelfTest.java | 2 ++ .../cache/IgniteCacheReadThroughEvictionSelfTest.java | 2 ++ .../cache/distributed/GridCacheLockAbstractTest.java | 2 ++ .../distributed/GridCacheMultiNodeLockAbstractTest.java | 2 ++ .../distributed/GridCacheNodeFailureAbstractTest.java | 2 ++ .../distributed/IgniteTxRemoveTimeoutObjectsTest.java | 2 ++ .../distributed/near/GridCacheNearMultiNodeSelfTest.java | 2 ++ .../distributed/near/GridCacheNearOneNodeSelfTest.java | 2 ++ .../cache/local/GridCacheLocalBasicApiSelfTest.java | 4 +++- .../cache/local/GridCacheLocalBasicStoreSelfTest.java | 4 +++- .../cache/local/GridCacheLocalEvictionEventSelfTest.java | 4 +++- .../local/GridCacheLocalGetAndTransformStoreSelfTest.java | 4 +++- .../cache/local/GridCacheLocalLoadAllSelfTest.java | 2 ++ .../cache/local/GridCacheLocalLockSelfTest.java | 2 ++ .../cache/local/GridCacheLocalMultithreadedSelfTest.java | 2 ++ .../cache/local/GridCacheLocalTxTimeoutSelfTest.java | 2 ++ .../persistence/db/wal/crc/IgniteDataIntegrityTests.java | 8 ++++++-- .../store/GridCacheWriteBehindStoreAbstractTest.java | 2 ++ .../cache/store/GridCacheWriteBehindStoreLocalTest.java | 4 +++- .../processors/igfs/IgfsModeResolverSelfTest.java | 4 +++- .../util/GridStartupWithUndefinedIgniteHomeSelfTest.java | 4 +++- .../io/GridUnsafeDataInputOutputByteOrderSelfTest.java | 6 +++++- .../junits/common/GridCommonAbstractTest.java | 4 ++++ .../testframework/junits/spi/GridSpiAbstractTest.java | 4 ++++ .../ignite/util/mbeans/GridMBeanDisableSelfTest.java | 4 ++++ 33 files changed, 93 insertions(+), 13 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/commandline/CommandHandlerParsingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/commandline/CommandHandlerParsingTest.java index 261856bcdabfa..fccbdaebd2618 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/commandline/CommandHandlerParsingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/commandline/CommandHandlerParsingTest.java @@ -27,6 +27,8 @@ import org.apache.ignite.internal.visor.tx.VisorTxProjection; import org.apache.ignite.internal.visor.tx.VisorTxSortOrder; import org.apache.ignite.internal.visor.tx.VisorTxTaskArg; +import org.junit.After; +import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -49,13 +51,15 @@ @RunWith(JUnit4.class) public class CommandHandlerParsingTest extends TestCase { /** {@inheritDoc} */ - @Override protected void setUp() throws Exception { + @Before + @Override public void setUp() throws Exception { System.setProperty(IGNITE_ENABLE_EXPERIMENTAL_COMMAND, "true"); super.setUp(); } /** {@inheritDoc} */ + @After @Override public void tearDown() throws Exception { System.clearProperty(IGNITE_ENABLE_EXPERIMENTAL_COMMAND); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/direct/stream/v2/DirectByteBufferStreamImplV2ByteOrderSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/direct/stream/v2/DirectByteBufferStreamImplV2ByteOrderSelfTest.java index 5f4efbe45db8d..74e9f0f67a8eb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/direct/stream/v2/DirectByteBufferStreamImplV2ByteOrderSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/direct/stream/v2/DirectByteBufferStreamImplV2ByteOrderSelfTest.java @@ -29,6 +29,7 @@ import org.apache.ignite.plugin.extensions.communication.Message; import org.apache.ignite.plugin.extensions.communication.MessageFactory; import org.jetbrains.annotations.Nullable; +import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -65,6 +66,7 @@ public class DirectByteBufferStreamImplV2ByteOrderSelfTest extends TestCase { private byte[] outArr; /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { super.setUp(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerMxBeanIllegalArgumentHandleTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerMxBeanIllegalArgumentHandleTest.java index d1c2254a18edb..403c152a4d660 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerMxBeanIllegalArgumentHandleTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerMxBeanIllegalArgumentHandleTest.java @@ -28,6 +28,8 @@ import org.apache.ignite.internal.managers.discovery.GridDiscoveryManager; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.jetbrains.annotations.NotNull; +import org.junit.After; +import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -54,6 +56,7 @@ public class GridManagerMxBeanIllegalArgumentHandleTest extends TestCase { private boolean correctSetupOfTestPerformed; /** {@inheritDoc} Changes field to always failing mock */ + @Before @Override public void setUp() throws Exception { super.setUp(); try { @@ -99,6 +102,7 @@ public class GridManagerMxBeanIllegalArgumentHandleTest extends TestCase { * * @throws Exception if field set failed */ + @After @Override public void tearDown() throws Exception { super.tearDown(); if (correctSetupOfTestPerformed) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicStoreAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicStoreAbstractTest.java index 6e1ed68869f49..b48e58b63001e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicStoreAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicStoreAbstractTest.java @@ -37,6 +37,7 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.jetbrains.annotations.Nullable; +import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -59,6 +60,7 @@ public abstract class GridCacheBasicStoreAbstractTest extends GridCommonAbstract private static final GridCacheTestStore store = new GridCacheTestStore(); /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionEventAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionEventAbstractTest.java index c87b3a85e43a3..6d83a07afccc0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionEventAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionEventAbstractTest.java @@ -37,6 +37,7 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -55,6 +56,7 @@ public abstract class GridCacheEvictionEventAbstractTest extends GridCommonAbstr private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.EVICTION); MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_EVENTS); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGetAndTransformStoreAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGetAndTransformStoreAbstractTest.java index b089f1a3cccef..b32f7d2b677b6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGetAndTransformStoreAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGetAndTransformStoreAbstractTest.java @@ -34,6 +34,7 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -54,6 +55,7 @@ public abstract class GridCacheGetAndTransformStoreAbstractTest extends GridComm private static final GridCacheTestStore store = new GridCacheTestStore(); /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorLocalSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorLocalSelfTest.java index 24c38b24d361f..9dc71f7e5524b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorLocalSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorLocalSelfTest.java @@ -20,6 +20,7 @@ import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.cache.CacheMode; import org.apache.ignite.testframework.MvccFeatureChecker; +import org.junit.Before; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.LOCAL; @@ -29,6 +30,7 @@ */ public class GridCacheInterceptorLocalSelfTest extends GridCacheInterceptorAbstractSelfTest { /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); @@ -49,4 +51,4 @@ public class GridCacheInterceptorLocalSelfTest extends GridCacheInterceptorAbstr @Override protected int gridCount() { return 1; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorLocalWithStoreSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorLocalWithStoreSelfTest.java index 6375aa66ea2d0..29bbf23f136b9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorLocalWithStoreSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorLocalWithStoreSelfTest.java @@ -18,12 +18,14 @@ package org.apache.ignite.internal.processors.cache; import org.apache.ignite.testframework.MvccFeatureChecker; +import org.junit.Before; /** * Tests {@link org.apache.ignite.cache.CacheInterceptor}. */ public class GridCacheInterceptorLocalWithStoreSelfTest extends GridCacheInterceptorLocalSelfTest { /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); @@ -34,4 +36,4 @@ public class GridCacheInterceptorLocalWithStoreSelfTest extends GridCacheInterce @Override protected boolean storeEnabled() { return true; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVariableTopologySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVariableTopologySelfTest.java index b52c2068685c9..82f08173affed 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVariableTopologySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVariableTopologySelfTest.java @@ -39,6 +39,7 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionRollbackException; +import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -58,6 +59,7 @@ public class GridCacheVariableTopologySelfTest extends GridCommonAbstractTest { private TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { if (MvccFeatureChecker.forcedMvcc()) fail("https://issues.apache.org/jira/browse/IGNITE-7388"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughEvictionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughEvictionSelfTest.java index 0135732d96cfe..335ac0d6bc107 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughEvictionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughEvictionSelfTest.java @@ -37,6 +37,7 @@ import javax.cache.expiry.Duration; import javax.cache.expiry.ExpiryPolicy; import java.util.concurrent.TimeUnit; +import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -54,6 +55,7 @@ public class IgniteCacheReadThroughEvictionSelfTest extends IgniteCacheConfigVar private static final int KEYS = 100; /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheLockAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheLockAbstractTest.java index 216901c105836..9663864f4c86c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheLockAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheLockAbstractTest.java @@ -41,6 +41,7 @@ import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -71,6 +72,7 @@ public abstract class GridCacheLockAbstractTest extends GridCommonAbstractTest { private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.ENTRY_LOCK); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java index 5aa0a6ae40276..4559762ecbf2f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java @@ -41,6 +41,7 @@ import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -69,6 +70,7 @@ public abstract class GridCacheMultiNodeLockAbstractTest extends GridCommonAbstr private static Collection> lsnrs = new ArrayList<>(); /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.ENTRY_LOCK); MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_EVENTS); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheNodeFailureAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheNodeFailureAbstractTest.java index 75d119e3a7511..9b82354d4e35b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheNodeFailureAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheNodeFailureAbstractTest.java @@ -42,6 +42,7 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -81,6 +82,7 @@ public abstract class GridCacheNodeFailureAbstractTest extends GridCommonAbstrac private static final List IGNITEs = new ArrayList<>(); /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.ENTRY_LOCK); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxRemoveTimeoutObjectsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxRemoveTimeoutObjectsTest.java index b186b45e983e1..a005557044696 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxRemoveTimeoutObjectsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxRemoveTimeoutObjectsTest.java @@ -35,6 +35,7 @@ import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionTimeoutException; +import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -61,6 +62,7 @@ public class IgniteTxRemoveTimeoutObjectsTest extends GridCacheAbstractSelfTest } /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { if (MvccFeatureChecker.forcedMvcc()) fail("https://issues.apache.org/jira/browse/IGNITE-7388"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiNodeSelfTest.java index 8e6b696288ce5..f646d8416b44b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiNodeSelfTest.java @@ -60,6 +60,7 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.jetbrains.annotations.Nullable; +import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -85,6 +86,7 @@ public class GridCacheNearMultiNodeSelfTest extends GridCommonAbstractTest { private static TestStore store = new TestStore(); /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOneNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOneNodeSelfTest.java index 635f80dd819c5..8b33512608dee 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOneNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOneNodeSelfTest.java @@ -34,6 +34,7 @@ import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -53,6 +54,7 @@ public class GridCacheNearOneNodeSelfTest extends GridCommonAbstractTest { private static TestStore store = new TestStore(); /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalBasicApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalBasicApiSelfTest.java index 91df59911517f..86ea47db13377 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalBasicApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalBasicApiSelfTest.java @@ -21,6 +21,7 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.processors.cache.GridCacheBasicApiAbstractTest; import org.apache.ignite.testframework.MvccFeatureChecker; +import org.junit.Before; import static org.apache.ignite.cache.CacheMode.LOCAL; @@ -29,6 +30,7 @@ */ public class GridCacheLocalBasicApiSelfTest extends GridCacheBasicApiAbstractTest { /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); @@ -47,4 +49,4 @@ public class GridCacheLocalBasicApiSelfTest extends GridCacheBasicApiAbstractTes return cfg; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalBasicStoreSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalBasicStoreSelfTest.java index 5d6492b57eee7..430a911db932a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalBasicStoreSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalBasicStoreSelfTest.java @@ -20,6 +20,7 @@ import org.apache.ignite.cache.CacheMode; import org.apache.ignite.internal.processors.cache.GridCacheBasicStoreAbstractTest; import org.apache.ignite.testframework.MvccFeatureChecker; +import org.junit.Before; import static org.apache.ignite.cache.CacheMode.LOCAL; @@ -28,6 +29,7 @@ */ public class GridCacheLocalBasicStoreSelfTest extends GridCacheBasicStoreAbstractTest { /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); @@ -38,4 +40,4 @@ public class GridCacheLocalBasicStoreSelfTest extends GridCacheBasicStoreAbstrac @Override protected CacheMode cacheMode() { return LOCAL; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalEvictionEventSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalEvictionEventSelfTest.java index 74066899ddfcd..f808edea08544 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalEvictionEventSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalEvictionEventSelfTest.java @@ -21,6 +21,7 @@ import org.apache.ignite.cache.CacheMode; import org.apache.ignite.internal.processors.cache.GridCacheEvictionEventAbstractTest; import org.apache.ignite.testframework.MvccFeatureChecker; +import org.junit.Before; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -29,6 +30,7 @@ */ public class GridCacheLocalEvictionEventSelfTest extends GridCacheEvictionEventAbstractTest { /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); @@ -44,4 +46,4 @@ public class GridCacheLocalEvictionEventSelfTest extends GridCacheEvictionEventA @Override protected CacheAtomicityMode atomicityMode() { return TRANSACTIONAL; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalGetAndTransformStoreSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalGetAndTransformStoreSelfTest.java index 9752b7eae480a..0cb53335fdbc8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalGetAndTransformStoreSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalGetAndTransformStoreSelfTest.java @@ -20,6 +20,7 @@ import org.apache.ignite.cache.CacheMode; import org.apache.ignite.internal.processors.cache.GridCacheGetAndTransformStoreAbstractTest; import org.apache.ignite.testframework.MvccFeatureChecker; +import org.junit.Before; import static org.apache.ignite.cache.CacheMode.LOCAL; @@ -28,6 +29,7 @@ */ public class GridCacheLocalGetAndTransformStoreSelfTest extends GridCacheGetAndTransformStoreAbstractTest { /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); @@ -38,4 +40,4 @@ public class GridCacheLocalGetAndTransformStoreSelfTest extends GridCacheGetAndT @Override protected CacheMode cacheMode() { return LOCAL; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalLoadAllSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalLoadAllSelfTest.java index 638a49f848e68..f5e453c1bc0bd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalLoadAllSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalLoadAllSelfTest.java @@ -29,6 +29,7 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -41,6 +42,7 @@ @RunWith(JUnit4.class) public class GridCacheLocalLoadAllSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalLockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalLockSelfTest.java index 4bd013ef1a244..1dbb8b122af96 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalLockSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalLockSelfTest.java @@ -31,6 +31,7 @@ import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -43,6 +44,7 @@ @RunWith(JUnit4.class) public class GridCacheLocalLockSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalMultithreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalMultithreadedSelfTest.java index f5b659acdabe3..a10f67443acb4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalMultithreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalMultithreadedSelfTest.java @@ -36,6 +36,7 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -48,6 +49,7 @@ @RunWith(JUnit4.class) public class GridCacheLocalMultithreadedSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxTimeoutSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxTimeoutSelfTest.java index e7297e91b0e9a..ec87f675ced76 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxTimeoutSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxTimeoutSelfTest.java @@ -31,6 +31,7 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.apache.ignite.transactions.TransactionTimeoutException; +import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -48,6 +49,7 @@ @RunWith(JUnit4.class) public class GridCacheLocalTxTimeoutSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteDataIntegrityTests.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteDataIntegrityTests.java index a9ac6a229440f..68d1a627ed1d2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteDataIntegrityTests.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteDataIntegrityTests.java @@ -32,6 +32,8 @@ import org.apache.ignite.internal.processors.cache.persistence.wal.io.FileInput; import org.apache.ignite.internal.processors.cache.persistence.wal.io.SimpleFileInput; import org.apache.ignite.internal.processors.cache.persistence.wal.crc.IgniteDataIntegrityViolationException; +import org.junit.After; +import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -48,7 +50,8 @@ public class IgniteDataIntegrityTests extends TestCase { private ByteBufferExpander expBuf; /** {@inheritDoc} */ - @Override protected void setUp() throws Exception { + @Before + @Override public void setUp() throws Exception { super.setUp(); File file = File.createTempFile("integrity", "dat"); @@ -82,7 +85,8 @@ public class IgniteDataIntegrityTests extends TestCase { } /** {@inheritDoc} */ - @Override protected void tearDown() throws Exception { + @After + @Override public void tearDown() throws Exception { fileInput.io().close(); expBuf.close(); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStoreAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStoreAbstractTest.java index 7ac71262b7bbb..25cf6efad6c69 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStoreAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStoreAbstractTest.java @@ -38,6 +38,7 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.jetbrains.annotations.Nullable; +import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -58,6 +59,7 @@ public abstract class GridCacheWriteBehindStoreAbstractTest extends GridCommonAb private static final GridCacheTestStore store = new GridCacheTestStore(); /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStoreLocalTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStoreLocalTest.java index 160203e538da0..8eaffe1b0a482 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStoreLocalTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStoreLocalTest.java @@ -19,12 +19,14 @@ import org.apache.ignite.cache.CacheMode; import org.apache.ignite.testframework.MvccFeatureChecker; +import org.junit.Before; /** * Tests {@link org.apache.ignite.internal.processors.cache.store.GridCacheWriteBehindStore} in grid configuration. */ public class GridCacheWriteBehindStoreLocalTest extends GridCacheWriteBehindStoreAbstractTest { /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); @@ -35,4 +37,4 @@ public class GridCacheWriteBehindStoreLocalTest extends GridCacheWriteBehindStor @Override protected CacheMode cacheMode() { return CacheMode.LOCAL; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsModeResolverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsModeResolverSelfTest.java index 92b509db80f87..f8392a4234a45 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsModeResolverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsModeResolverSelfTest.java @@ -27,6 +27,7 @@ import org.apache.ignite.igfs.IgfsMode; import org.apache.ignite.igfs.IgfsPath; import org.apache.ignite.internal.util.typedef.T2; +import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -45,7 +46,8 @@ public class IgfsModeResolverSelfTest extends TestCase { private IgfsModeResolver reslvr; /** {@inheritDoc} */ - @Override protected void setUp() throws Exception { + @Before + @Override public void setUp() throws Exception { reslvr = new IgfsModeResolver(DUAL_SYNC, new ArrayList<>(Arrays.asList(new T2<>( new IgfsPath("/a/b/c/d"), PROXY), new T2<>(new IgfsPath("/a/P/"), PRIMARY), new T2<>(new IgfsPath("/a/b/"), DUAL_ASYNC)))); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/GridStartupWithUndefinedIgniteHomeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/GridStartupWithUndefinedIgniteHomeSelfTest.java index 53a3d0c767d32..d8f300d64cb8b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/GridStartupWithUndefinedIgniteHomeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/GridStartupWithUndefinedIgniteHomeSelfTest.java @@ -30,6 +30,7 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.After; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -54,7 +55,8 @@ public class GridStartupWithUndefinedIgniteHomeSelfTest extends TestCase { private static final int GRID_COUNT = 2; /** {@inheritDoc} */ - @Override protected void tearDown() throws Exception { + @After + @Override public void tearDown() throws Exception { // Next grid in the same VM shouldn't use cached values produced by these tests. nullifyHomeDirectory(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/io/GridUnsafeDataInputOutputByteOrderSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/io/GridUnsafeDataInputOutputByteOrderSelfTest.java index 158fc98283466..34a7816fc6db8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/io/GridUnsafeDataInputOutputByteOrderSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/io/GridUnsafeDataInputOutputByteOrderSelfTest.java @@ -20,6 +20,8 @@ import java.io.ByteArrayInputStream; import java.util.Random; import junit.framework.TestCase; +import org.junit.After; +import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -53,13 +55,15 @@ public class GridUnsafeDataInputOutputByteOrderSelfTest extends TestCase { private GridUnsafeDataInput in; /** {@inheritDoc} */ - @Override protected void setUp() throws Exception { + @Before + @Override public void setUp() throws Exception { out = new GridUnsafeDataOutput(16 * 8+ LEN_BYTES); in = new GridUnsafeDataInput(); in.inputStream(new ByteArrayInputStream(out.internalArray())); } /** {@inheritDoc} */ + @After @Override public void tearDown() throws Exception { in.close(); out.close(); diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java index 0910292c20411..f7f27ec511931 100755 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java @@ -116,6 +116,8 @@ import org.apache.ignite.transactions.TransactionRollbackException; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import org.junit.After; +import org.junit.Before; import static org.apache.ignite.cache.CacheMode.LOCAL; import static org.apache.ignite.cache.CacheRebalanceMode.NONE; @@ -481,6 +483,7 @@ protected GridNearCacheAdapter near(int idx, String cache) { } /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { // Disable SSL hostname verifier. HttpsURLConnection.setDefaultHostnameVerifier(new HostnameVerifier() { @@ -495,6 +498,7 @@ protected GridNearCacheAdapter near(int idx, String cache) { } /** {@inheritDoc} */ + @After @Override public void tearDown() throws Exception { getTestCounters().incrementStopped(); diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/spi/GridSpiAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/spi/GridSpiAbstractTest.java index 05ebddfe70652..52aace7a3366c 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/spi/GridSpiAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/spi/GridSpiAbstractTest.java @@ -54,6 +54,8 @@ import org.apache.ignite.testframework.junits.IgniteTestResources; import org.apache.ignite.testframework.junits.spi.GridSpiTestConfig.ConfigType; import org.jetbrains.annotations.Nullable; +import org.junit.After; +import org.junit.Before; import static org.apache.ignite.lang.IgniteProductVersion.fromString; @@ -126,6 +128,7 @@ private void resetTestData() throws Exception { /** * @throws Exception If failed. */ + @Before @Override public final void setUp() throws Exception { // Need to change classloader here, although it also handled in the parent class // the current test initialisation procedure doesn't allow us to setUp the parent first. @@ -490,6 +493,7 @@ protected UUID getNodeId() throws Exception { /** * @throws Exception If failed. */ + @After @Override public final void tearDown() throws Exception { getTestCounters().incrementStopped(); diff --git a/modules/core/src/test/java/org/apache/ignite/util/mbeans/GridMBeanDisableSelfTest.java b/modules/core/src/test/java/org/apache/ignite/util/mbeans/GridMBeanDisableSelfTest.java index 6758fdaf7a709..55e06d51af29b 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/mbeans/GridMBeanDisableSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/mbeans/GridMBeanDisableSelfTest.java @@ -27,6 +27,8 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.After; +import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -37,6 +39,7 @@ @RunWith(JUnit4.class) public class GridMBeanDisableSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { IgniteUtils.IGNITE_MBEANS_DISABLED = true; @@ -44,6 +47,7 @@ public class GridMBeanDisableSelfTest extends GridCommonAbstractTest { } /** {@inheritDoc} */ + @After @Override public void tearDown() throws Exception { IgniteUtils.IGNITE_MBEANS_DISABLED = false; From f5ac032647bc1a2f0d6c6f52371de1c5d0e37cd4 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Wed, 5 Dec 2018 15:08:59 +0300 Subject: [PATCH 046/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - added annotation to new test case that was merged from master -- verified with diffs overview and rebuild --- .../persistence/LocalWalModeChangeDuringRebalancingSelfTest.java | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/LocalWalModeChangeDuringRebalancingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/LocalWalModeChangeDuringRebalancingSelfTest.java index adc0a242ab306..094c678df2341 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/LocalWalModeChangeDuringRebalancingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/LocalWalModeChangeDuringRebalancingSelfTest.java @@ -315,6 +315,7 @@ else if (timestamp >= rebalanceStartedTimestamp && timestamp <= rebalanceFinishe /** * @throws Exception If failed. */ + @Test public void testWalDisabledDuringRebalancingWithPendingTxTracker() throws Exception { enablePendingTxTracker = true; dfltCacheBackupCnt = 2; From d76fb50fd7f528becef83af92af25d415b7ddc6f Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Thu, 6 Dec 2018 17:52:40 +0300 Subject: [PATCH 047/176] IGNITE-10176 migrate non-core modules tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview and rebuild --- .../ignite/gridify/AbstractAopTest.java | 44 +++++++++++++++++++ .../ignite/gridify/BasicAopSelfTest.java | 7 ++- .../GridifySetToXXXNonSpringAopSelfTest.java | 8 +++- .../GridifySetToXXXSpringAopSelfTest.java | 8 +++- .../hierarchy/GridifyHierarchyTest.java | 7 ++- .../optimized/OptimizedMarshallerAopTest.java | 7 ++- .../apache/ignite/p2p/P2PGridifySelfTest.java | 14 +++++- .../singlesplit/SingleSplitsLoadTest.java | 5 +++ .../gridify/GridifySingleSplitLoadTest.java | 5 +++ .../gridify/ExternalNonSpringAopSelfTest.java | 36 +++++++++++++++ 10 files changed, 135 insertions(+), 6 deletions(-) diff --git a/modules/aop/src/test/java/org/apache/ignite/gridify/AbstractAopTest.java b/modules/aop/src/test/java/org/apache/ignite/gridify/AbstractAopTest.java index 947ba766c5a20..f5f061fbdbb2c 100644 --- a/modules/aop/src/test/java/org/apache/ignite/gridify/AbstractAopTest.java +++ b/modules/aop/src/test/java/org/apache/ignite/gridify/AbstractAopTest.java @@ -33,6 +33,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestClassLoader; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_CLASS_DEPLOYED; import static org.apache.ignite.events.EventType.EVT_TASK_DEPLOYED; @@ -41,6 +44,7 @@ * Abstract AOP test. */ @SuppressWarnings( {"OverlyStrongTypeCast", "ProhibitedExceptionDeclared", "IfMayBeConditional"}) +@RunWith(JUnit4.class) public abstract class AbstractAopTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -65,6 +69,7 @@ public abstract class AbstractAopTest extends GridCommonAbstractTest { /** * @throws Exception If test failed. */ + @Test public void testDefaultPrivate() throws Exception { checkDefault(DeploymentMode.PRIVATE); } @@ -72,6 +77,7 @@ public void testDefaultPrivate() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testDefaultIsolated() throws Exception { checkDefault(DeploymentMode.ISOLATED); } @@ -79,6 +85,7 @@ public void testDefaultIsolated() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testDefaultContinuous() throws Exception { checkDefault(DeploymentMode.CONTINUOUS); } @@ -86,6 +93,7 @@ public void testDefaultContinuous() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testDefaultShared() throws Exception { checkDefault(DeploymentMode.SHARED); } @@ -93,6 +101,7 @@ public void testDefaultShared() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testDefaultWithUserClassLoaderPrivate() throws Exception { checkDefaultWithUserClassLoader(DeploymentMode.PRIVATE); } @@ -100,6 +109,7 @@ public void testDefaultWithUserClassLoaderPrivate() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testDefaultWithUserClassLoaderIsolated() throws Exception { checkDefaultWithUserClassLoader(DeploymentMode.ISOLATED); } @@ -107,6 +117,7 @@ public void testDefaultWithUserClassLoaderIsolated() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testDefaultWithUserClassLoaderContinuous() throws Exception { checkDefaultWithUserClassLoader(DeploymentMode.CONTINUOUS); } @@ -114,6 +125,7 @@ public void testDefaultWithUserClassLoaderContinuous() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testDefaultWithUserClassLoaderShared() throws Exception { checkDefaultWithUserClassLoader(DeploymentMode.SHARED); } @@ -121,6 +133,7 @@ public void testDefaultWithUserClassLoaderShared() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testSingleDeploymentWithUserClassLoaderPrivate() throws Exception { checkSingleDeploymentWithUserClassLoader(DeploymentMode.PRIVATE); } @@ -128,6 +141,7 @@ public void testSingleDeploymentWithUserClassLoaderPrivate() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testSingleDeploymentWithUserClassLoaderIsolated() throws Exception { checkSingleDeploymentWithUserClassLoader(DeploymentMode.ISOLATED); } @@ -135,6 +149,7 @@ public void testSingleDeploymentWithUserClassLoaderIsolated() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testSingleDeploymentWithUserClassLoaderContinuous() throws Exception { checkSingleDeploymentWithUserClassLoader(DeploymentMode.CONTINUOUS); } @@ -142,6 +157,7 @@ public void testSingleDeploymentWithUserClassLoaderContinuous() throws Exception /** * @throws Exception If test failed. */ + @Test public void testSingleDeploymentWithUserClassLoaderShared() throws Exception { checkSingleDeploymentWithUserClassLoader(DeploymentMode.SHARED); } @@ -149,6 +165,7 @@ public void testSingleDeploymentWithUserClassLoaderShared() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testDefaultResourceWithUserClassLoaderPrivate() throws Exception { checkDefaultResourceWithUserClassLoader(DeploymentMode.PRIVATE); } @@ -156,6 +173,7 @@ public void testDefaultResourceWithUserClassLoaderPrivate() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testDefaultResourceWithUserClassLoaderIsolated() throws Exception { checkDefaultResourceWithUserClassLoader(DeploymentMode.ISOLATED); } @@ -163,6 +181,7 @@ public void testDefaultResourceWithUserClassLoaderIsolated() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testDefaultResourceWithUserClassLoaderContinuous() throws Exception { checkDefaultResourceWithUserClassLoader(DeploymentMode.CONTINUOUS); } @@ -170,6 +189,7 @@ public void testDefaultResourceWithUserClassLoaderContinuous() throws Exception /** * @throws Exception If test failed. */ + @Test public void testDefaultResourceWithUserClassLoaderShared() throws Exception { checkDefaultResourceWithUserClassLoader(DeploymentMode.SHARED); } @@ -177,6 +197,7 @@ public void testDefaultResourceWithUserClassLoaderShared() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testNonDefaultClassPrivate() throws Exception { checkNonDefaultClass(DeploymentMode.PRIVATE); } @@ -184,6 +205,7 @@ public void testNonDefaultClassPrivate() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testNonDefaultClassIsolated() throws Exception { checkNonDefaultClass(DeploymentMode.ISOLATED); } @@ -191,6 +213,7 @@ public void testNonDefaultClassIsolated() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testNonDefaultClassContinuous() throws Exception { checkNonDefaultClass(DeploymentMode.CONTINUOUS); } @@ -198,6 +221,7 @@ public void testNonDefaultClassContinuous() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testNonDefaultClassShared() throws Exception { checkNonDefaultClass(DeploymentMode.SHARED); } @@ -205,6 +229,7 @@ public void testNonDefaultClassShared() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testNonDefaultNamePrivate() throws Exception { checkNonDefaultName(DeploymentMode.PRIVATE); } @@ -212,6 +237,7 @@ public void testNonDefaultNamePrivate() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testNonDefaultNameIsolated() throws Exception { checkNonDefaultName(DeploymentMode.ISOLATED); } @@ -219,6 +245,7 @@ public void testNonDefaultNameIsolated() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testNonDefaultNameContinuous() throws Exception { checkNonDefaultName(DeploymentMode.CONTINUOUS); } @@ -226,6 +253,7 @@ public void testNonDefaultNameContinuous() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testNonDefaultNameShared() throws Exception { checkNonDefaultName(DeploymentMode.SHARED); } @@ -233,6 +261,7 @@ public void testNonDefaultNameShared() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testDefaultExceptionPrivate() throws Exception { checkDefaultException(DeploymentMode.PRIVATE); } @@ -240,6 +269,7 @@ public void testDefaultExceptionPrivate() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testDefaultExceptionIsolated() throws Exception { checkDefaultException(DeploymentMode.ISOLATED); } @@ -247,6 +277,7 @@ public void testDefaultExceptionIsolated() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testDefaultExceptionContinuous() throws Exception { checkDefaultException(DeploymentMode.CONTINUOUS); } @@ -254,6 +285,7 @@ public void testDefaultExceptionContinuous() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testDefaultExceptionShared() throws Exception { checkDefaultException(DeploymentMode.SHARED); } @@ -261,6 +293,7 @@ public void testDefaultExceptionShared() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testDefaultResourcePrivate() throws Exception { checkDefaultResource(DeploymentMode.PRIVATE); } @@ -268,6 +301,7 @@ public void testDefaultResourcePrivate() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testDefaultResourceIsolated() throws Exception { checkDefaultResource(DeploymentMode.ISOLATED); } @@ -275,6 +309,7 @@ public void testDefaultResourceIsolated() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testDefaultResourceContinuous() throws Exception { checkDefaultResource(DeploymentMode.CONTINUOUS); } @@ -282,6 +317,7 @@ public void testDefaultResourceContinuous() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testDefaultResourceShared() throws Exception { checkDefaultResource(DeploymentMode.SHARED); } @@ -289,6 +325,7 @@ public void testDefaultResourceShared() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testNonDefaultClassResourcePrivate() throws Exception { checkNonDefaultClassResource(DeploymentMode.PRIVATE); } @@ -296,6 +333,7 @@ public void testNonDefaultClassResourcePrivate() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testNonDefaultClassResourceIsolated() throws Exception { checkNonDefaultClassResource(DeploymentMode.ISOLATED); } @@ -303,6 +341,7 @@ public void testNonDefaultClassResourceIsolated() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testNonDefaultClassResourceContinuous() throws Exception { checkNonDefaultClassResource(DeploymentMode.CONTINUOUS); } @@ -310,6 +349,7 @@ public void testNonDefaultClassResourceContinuous() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testNonDefaultClassResourceShared() throws Exception { checkNonDefaultClassResource(DeploymentMode.SHARED); } @@ -317,6 +357,7 @@ public void testNonDefaultClassResourceShared() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testNonDefaultNameResourcePrivate() throws Exception { checkNonDefaultNameResource(DeploymentMode.PRIVATE); } @@ -324,6 +365,7 @@ public void testNonDefaultNameResourcePrivate() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testNonDefaultNameResourceIsolated() throws Exception { checkNonDefaultNameResource(DeploymentMode.ISOLATED); } @@ -331,6 +373,7 @@ public void testNonDefaultNameResourceIsolated() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testNonDefaultNameResourceContinuous() throws Exception { checkNonDefaultNameResource(DeploymentMode.CONTINUOUS); } @@ -338,6 +381,7 @@ public void testNonDefaultNameResourceContinuous() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testNonDefaultNameResourceShared() throws Exception { checkNonDefaultNameResource(DeploymentMode.SHARED); } diff --git a/modules/aop/src/test/java/org/apache/ignite/gridify/BasicAopSelfTest.java b/modules/aop/src/test/java/org/apache/ignite/gridify/BasicAopSelfTest.java index 54ac74fd2c4a3..024a5364717f7 100644 --- a/modules/aop/src/test/java/org/apache/ignite/gridify/BasicAopSelfTest.java +++ b/modules/aop/src/test/java/org/apache/ignite/gridify/BasicAopSelfTest.java @@ -26,6 +26,9 @@ import java.util.Collection; import java.util.List; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tries to execute dummy gridified task. It should fail because grid is not started. @@ -33,10 +36,12 @@ * The main purpose of this test is to check that AOP is properly configured. It should * be included in all suites that require AOP. */ +@RunWith(JUnit4.class) public class BasicAopSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testAop() throws Exception { try { gridify(); @@ -71,4 +76,4 @@ private static class TestTask extends GridifyTaskSplitAdapter { return null; } } -} \ No newline at end of file +} diff --git a/modules/aop/src/test/java/org/apache/ignite/gridify/GridifySetToXXXNonSpringAopSelfTest.java b/modules/aop/src/test/java/org/apache/ignite/gridify/GridifySetToXXXNonSpringAopSelfTest.java index 2ebd272e6c604..14a7bff5585fe 100644 --- a/modules/aop/src/test/java/org/apache/ignite/gridify/GridifySetToXXXNonSpringAopSelfTest.java +++ b/modules/aop/src/test/java/org/apache/ignite/gridify/GridifySetToXXXNonSpringAopSelfTest.java @@ -25,6 +25,9 @@ import java.util.List; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * To run this test with JBoss AOP make sure of the following: @@ -51,10 +54,12 @@ * 2. Classpath should contains the ${IGNITE_HOME}/modules/tests/config/aop/aspectj folder. */ @GridCommonTest(group="AOP") +@RunWith(JUnit4.class) public class GridifySetToXXXNonSpringAopSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testGridifySetToSet() throws Exception { try { startGrid("GridifySetToSetTarget"); @@ -111,6 +116,7 @@ public void testGridifySetToSet() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGridifySetToValue() throws Exception { try { startGrid("GridifySetToValueTarget"); @@ -206,4 +212,4 @@ private static class MathEnumerationAdapter implements Enumeration { return iter.next(); } } -} \ No newline at end of file +} diff --git a/modules/aop/src/test/java/org/apache/ignite/gridify/GridifySetToXXXSpringAopSelfTest.java b/modules/aop/src/test/java/org/apache/ignite/gridify/GridifySetToXXXSpringAopSelfTest.java index 1dd499a031a16..7ff56d09a8b59 100644 --- a/modules/aop/src/test/java/org/apache/ignite/gridify/GridifySetToXXXSpringAopSelfTest.java +++ b/modules/aop/src/test/java/org/apache/ignite/gridify/GridifySetToXXXSpringAopSelfTest.java @@ -26,6 +26,9 @@ import org.apache.ignite.compute.gridify.aop.spring.GridifySpringEnhancer; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * To run this test with JBoss AOP make sure of the following: @@ -52,10 +55,12 @@ * 2. Classpath should contains the ${IGNITE_HOME}/modules/tests/config/aop/aspectj folder. */ @GridCommonTest(group="AOP") +@RunWith(JUnit4.class) public class GridifySetToXXXSpringAopSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testGridifySetToSet() throws Exception { try { startGrid("GridifySetToSetTarget"); @@ -112,6 +117,7 @@ public void testGridifySetToSet() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGridifySetToValue() throws Exception { try { startGrid("GridifySetToValueTarget"); @@ -207,4 +213,4 @@ private static class MathEnumerationAdapter implements Enumeration { return iter.next(); } } -} \ No newline at end of file +} diff --git a/modules/aop/src/test/java/org/apache/ignite/gridify/hierarchy/GridifyHierarchyTest.java b/modules/aop/src/test/java/org/apache/ignite/gridify/hierarchy/GridifyHierarchyTest.java index 3dc8d53b87326..232d92892a725 100644 --- a/modules/aop/src/test/java/org/apache/ignite/gridify/hierarchy/GridifyHierarchyTest.java +++ b/modules/aop/src/test/java/org/apache/ignite/gridify/hierarchy/GridifyHierarchyTest.java @@ -18,10 +18,14 @@ package org.apache.ignite.gridify.hierarchy; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Gridify hierarchy test. */ +@RunWith(JUnit4.class) public class GridifyHierarchyTest extends GridCommonAbstractTest { /** */ public GridifyHierarchyTest() { @@ -38,6 +42,7 @@ public void noneTestGridifyHierarchyProtected() { /** * @throws Exception If failed. */ + @Test public void testGridifyHierarchyPrivate() throws Exception { Target target = new Target(); @@ -48,4 +53,4 @@ public void testGridifyHierarchyPrivate() throws Exception { @Override public String getTestIgniteInstanceName() { return "GridifyHierarchyTest"; } -} \ No newline at end of file +} diff --git a/modules/aop/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerAopTest.java b/modules/aop/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerAopTest.java index 8236f435f9c1d..672225f404afc 100644 --- a/modules/aop/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerAopTest.java +++ b/modules/aop/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerAopTest.java @@ -26,6 +26,9 @@ import org.apache.ignite.internal.util.typedef.X; import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_TASK_FINISHED; @@ -44,6 +47,7 @@ * * */ +@RunWith(JUnit4.class) public class OptimizedMarshallerAopTest extends GridCommonAbstractTest { /** */ private static final AtomicInteger cntr = new AtomicInteger(); @@ -71,6 +75,7 @@ public OptimizedMarshallerAopTest() { * * @throws Exception If failed. */ + @Test public void testUp() throws Exception { G.ignite().events().localListen(new IgnitePredicate() { @Override public boolean apply(Event evt) { @@ -95,4 +100,4 @@ public void testUp() throws Exception { private void gridify1() { X.println("Executes on grid"); } -} \ No newline at end of file +} diff --git a/modules/aop/src/test/java/org/apache/ignite/p2p/P2PGridifySelfTest.java b/modules/aop/src/test/java/org/apache/ignite/p2p/P2PGridifySelfTest.java index 7511d61b07fb4..42e527c08f613 100644 --- a/modules/aop/src/test/java/org/apache/ignite/p2p/P2PGridifySelfTest.java +++ b/modules/aop/src/test/java/org/apache/ignite/p2p/P2PGridifySelfTest.java @@ -28,12 +28,16 @@ import org.apache.ignite.testframework.GridTestClassLoader; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @SuppressWarnings({"ProhibitedExceptionDeclared"}) @GridCommonTest(group = "P2P") +@RunWith(JUnit4.class) public class P2PGridifySelfTest extends GridCommonAbstractTest { /** Current deployment mode. Used in {@link #getConfiguration(String)}. */ private DeploymentMode depMode; @@ -174,6 +178,7 @@ public Integer executeGridifyResource(int res) { * * @throws Exception if error occur. */ + @Test public void testPrivateMode() throws Exception { processTestBothNodesDeploy(DeploymentMode.PRIVATE); } @@ -183,6 +188,7 @@ public void testPrivateMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testIsolatedMode() throws Exception { processTestBothNodesDeploy(DeploymentMode.ISOLATED); } @@ -192,6 +198,7 @@ public void testIsolatedMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testContinuousMode() throws Exception { processTestBothNodesDeploy(DeploymentMode.CONTINUOUS); } @@ -201,6 +208,7 @@ public void testContinuousMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testSharedMode() throws Exception { processTestBothNodesDeploy(DeploymentMode.SHARED); } @@ -210,6 +218,7 @@ public void testSharedMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testResourcePrivateMode() throws Exception { processTestGridifyResource(DeploymentMode.PRIVATE); } @@ -219,6 +228,7 @@ public void testResourcePrivateMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testResourceIsolatedMode() throws Exception { processTestGridifyResource(DeploymentMode.ISOLATED); } @@ -228,6 +238,7 @@ public void testResourceIsolatedMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testResourceContinuousMode() throws Exception { processTestGridifyResource(DeploymentMode.CONTINUOUS); } @@ -237,7 +248,8 @@ public void testResourceContinuousMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testResourceSharedMode() throws Exception { processTestGridifyResource(DeploymentMode.SHARED); } -} \ No newline at end of file +} diff --git a/modules/aop/src/test/java/org/apache/loadtests/direct/singlesplit/SingleSplitsLoadTest.java b/modules/aop/src/test/java/org/apache/loadtests/direct/singlesplit/SingleSplitsLoadTest.java index 61429dc75b32b..ef76cd8fea9fd 100644 --- a/modules/aop/src/test/java/org/apache/loadtests/direct/singlesplit/SingleSplitsLoadTest.java +++ b/modules/aop/src/test/java/org/apache/loadtests/direct/singlesplit/SingleSplitsLoadTest.java @@ -31,11 +31,15 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; import org.apache.log4j.Level; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Single split load test. */ @GridCommonTest(group = "Load Test") +@RunWith(JUnit4.class) public class SingleSplitsLoadTest extends GridCommonAbstractTest { /** */ public SingleSplitsLoadTest() { @@ -80,6 +84,7 @@ private int getThreadCount() { * * @throws Exception If task execution failed. */ + @Test public void testLoad() throws Exception { final Ignite ignite = G.ignite(getTestIgniteInstanceName()); diff --git a/modules/aop/src/test/java/org/apache/loadtests/gridify/GridifySingleSplitLoadTest.java b/modules/aop/src/test/java/org/apache/loadtests/gridify/GridifySingleSplitLoadTest.java index 7f4403df238b2..f417c3c0157c2 100644 --- a/modules/aop/src/test/java/org/apache/loadtests/gridify/GridifySingleSplitLoadTest.java +++ b/modules/aop/src/test/java/org/apache/loadtests/gridify/GridifySingleSplitLoadTest.java @@ -31,11 +31,15 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; import org.apache.log4j.Level; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Gridify single split load test. */ @GridCommonTest(group = "Load Test") +@RunWith(JUnit4.class) public class GridifySingleSplitLoadTest extends GridCommonAbstractTest { /** */ public GridifySingleSplitLoadTest() { @@ -97,6 +101,7 @@ private int getThreadCount() { * * @throws Exception If task execution failed. */ + @Test public void testGridifyLoad() throws Exception { Ignite ignite = G.ignite(getTestIgniteInstanceName()); diff --git a/modules/aop/src/test/java/org/test/gridify/ExternalNonSpringAopSelfTest.java b/modules/aop/src/test/java/org/test/gridify/ExternalNonSpringAopSelfTest.java index 9428208b19ee3..c5d3e2870b538 100644 --- a/modules/aop/src/test/java/org/test/gridify/ExternalNonSpringAopSelfTest.java +++ b/modules/aop/src/test/java/org/test/gridify/ExternalNonSpringAopSelfTest.java @@ -25,6 +25,9 @@ import org.apache.ignite.spi.deployment.local.LocalDeploymentSpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * To run this test with JBoss AOP make sure of the following: @@ -51,6 +54,7 @@ * 2. Classpath should contains the ${IGNITE_HOME}/modules/tests/config/aop/aspectj folder. */ @GridCommonTest(group="AOP") +@RunWith(JUnit4.class) public class ExternalNonSpringAopSelfTest extends GridCommonAbstractTest { /** */ private DeploymentMode depMode = DeploymentMode.PRIVATE; @@ -78,6 +82,7 @@ private void deployTask() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testDefaultPrivate() throws Exception { checkDefault(DeploymentMode.PRIVATE); } @@ -85,6 +90,7 @@ public void testDefaultPrivate() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testDefaultIsolated() throws Exception { checkDefault(DeploymentMode.ISOLATED); } @@ -92,6 +98,7 @@ public void testDefaultIsolated() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testDefaultContinuous() throws Exception { checkDefault(DeploymentMode.CONTINUOUS); } @@ -99,6 +106,7 @@ public void testDefaultContinuous() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testDefaultShared() throws Exception { checkDefault(DeploymentMode.SHARED); } @@ -106,6 +114,7 @@ public void testDefaultShared() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testNonDefaultClassPrivate() throws Exception { checkNonDefaultClass(DeploymentMode.PRIVATE); } @@ -113,6 +122,7 @@ public void testNonDefaultClassPrivate() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testNonDefaultClassIsolated() throws Exception { checkNonDefaultClass(DeploymentMode.ISOLATED); } @@ -120,6 +130,7 @@ public void testNonDefaultClassIsolated() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testNonDefaultContinuous() throws Exception { checkNonDefaultClass(DeploymentMode.CONTINUOUS); } @@ -127,6 +138,7 @@ public void testNonDefaultContinuous() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testNonDefaultShared() throws Exception { checkNonDefaultClass(DeploymentMode.SHARED); } @@ -134,6 +146,7 @@ public void testNonDefaultShared() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testNonDefaultNamePrivate() throws Exception { checkNonDefaultName(DeploymentMode.PRIVATE); } @@ -141,6 +154,7 @@ public void testNonDefaultNamePrivate() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testNonDefaultNameIsolated() throws Exception { checkNonDefaultName(DeploymentMode.ISOLATED); } @@ -148,6 +162,7 @@ public void testNonDefaultNameIsolated() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testNonDefaultNameContinuous() throws Exception { checkNonDefaultName(DeploymentMode.CONTINUOUS); } @@ -155,6 +170,7 @@ public void testNonDefaultNameContinuous() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testNonDefaultNameShared() throws Exception { checkNonDefaultName(DeploymentMode.SHARED); } @@ -162,6 +178,7 @@ public void testNonDefaultNameShared() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testTaskNameAndTaskClassPrivate() throws Exception { checkTaskNameAndTaskClass(DeploymentMode.PRIVATE); } @@ -169,6 +186,7 @@ public void testTaskNameAndTaskClassPrivate() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testTaskNameAndTaskClassIsolated() throws Exception { checkTaskNameAndTaskClass(DeploymentMode.ISOLATED); } @@ -176,6 +194,7 @@ public void testTaskNameAndTaskClassIsolated() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testTaskNameAndTaskClassContinuous() throws Exception { checkTaskNameAndTaskClass(DeploymentMode.CONTINUOUS); } @@ -183,6 +202,7 @@ public void testTaskNameAndTaskClassContinuous() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testTaskNameAndTaskClassShared() throws Exception { checkTaskNameAndTaskClass(DeploymentMode.SHARED); } @@ -190,6 +210,7 @@ public void testTaskNameAndTaskClassShared() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testDefaultExceptionPrivate() throws Exception { checkDefaultException(DeploymentMode.PRIVATE); } @@ -197,6 +218,7 @@ public void testDefaultExceptionPrivate() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testDefaultExceptionIsolated() throws Exception { checkDefaultException(DeploymentMode.ISOLATED); } @@ -204,6 +226,7 @@ public void testDefaultExceptionIsolated() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testDefaultExceptionContinuous() throws Exception { checkDefaultException(DeploymentMode.CONTINUOUS); } @@ -211,6 +234,7 @@ public void testDefaultExceptionContinuous() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testDefaultExceptionShared() throws Exception { checkDefaultException(DeploymentMode.SHARED); } @@ -218,6 +242,7 @@ public void testDefaultExceptionShared() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testDefaultResourcePrivate() throws Exception { checkDefaultResource(DeploymentMode.PRIVATE); } @@ -225,6 +250,7 @@ public void testDefaultResourcePrivate() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testDefaultResourceIsolated() throws Exception { checkDefaultResource(DeploymentMode.ISOLATED); } @@ -232,6 +258,7 @@ public void testDefaultResourceIsolated() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testDefaultResourceContinuous() throws Exception { checkDefaultResource(DeploymentMode.CONTINUOUS); } @@ -239,6 +266,7 @@ public void testDefaultResourceContinuous() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testDefaultResourceShared() throws Exception { checkDefaultResource(DeploymentMode.SHARED); } @@ -246,6 +274,7 @@ public void testDefaultResourceShared() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testNonDefaultClassResourcePrivate() throws Exception { checkNonDefaultClassResource(DeploymentMode.PRIVATE); } @@ -253,6 +282,7 @@ public void testNonDefaultClassResourcePrivate() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testNonDefaultClassResourceIsolated() throws Exception { checkNonDefaultClassResource(DeploymentMode.ISOLATED); } @@ -260,6 +290,7 @@ public void testNonDefaultClassResourceIsolated() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testNonDefaultClassResourceContinuous() throws Exception { checkNonDefaultClassResource(DeploymentMode.CONTINUOUS); } @@ -267,6 +298,7 @@ public void testNonDefaultClassResourceContinuous() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testNonDefaultClassResourceShared() throws Exception { checkNonDefaultClassResource(DeploymentMode.SHARED); } @@ -274,6 +306,7 @@ public void testNonDefaultClassResourceShared() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testNonDefaultNameResourcePrivate() throws Exception { checkNonDefaultNameResource(DeploymentMode.PRIVATE); } @@ -281,6 +314,7 @@ public void testNonDefaultNameResourcePrivate() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testNonDefaultNameResourceIsolated() throws Exception { checkNonDefaultNameResource(DeploymentMode.ISOLATED); } @@ -288,6 +322,7 @@ public void testNonDefaultNameResourceIsolated() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testNonDefaultNameResourceContinuous() throws Exception { checkNonDefaultNameResource(DeploymentMode.CONTINUOUS); } @@ -295,6 +330,7 @@ public void testNonDefaultNameResourceContinuous() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testNonDefaultNameResourceShared() throws Exception { checkNonDefaultNameResource(DeploymentMode.SHARED); } From 90282b6f2ee41280cd4e6abadad114d9ec4bf262 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Thu, 6 Dec 2018 18:25:28 +0300 Subject: [PATCH 048/176] IGNITE-10176 migrate non-core modules tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview and rebuild --- .../spi/checkpoint/s3/S3CheckpointManagerSelfTest.java | 8 +++++++- .../spi/checkpoint/s3/S3CheckpointSpiConfigSelfTest.java | 7 ++++++- .../spi/checkpoint/s3/S3CheckpointSpiSelfTest.java | 9 ++++++++- .../S3CheckpointSpiStartStopBucketEndpointSelfTest.java | 7 ++++++- .../s3/S3CheckpointSpiStartStopSSEAlgorithmSelfTest.java | 7 ++++++- .../checkpoint/s3/S3CheckpointSpiStartStopSelfTest.java | 7 ++++++- .../spi/checkpoint/s3/S3SessionCheckpointSelfTest.java | 7 ++++++- .../ipfinder/elb/TcpDiscoveryElbIpFinderSelfTest.java | 7 ++++++- .../s3/TcpDiscoveryS3IpFinderAbstractSelfTest.java | 5 +++++ ...iscoveryS3IpFinderAwsCredentialsProviderSelfTest.java | 7 ++++++- .../s3/TcpDiscoveryS3IpFinderAwsCredentialsSelfTest.java | 7 ++++++- .../s3/TcpDiscoveryS3IpFinderBucketEndpointSelfTest.java | 5 +++++ .../s3/TcpDiscoveryS3IpFinderKeyPrefixSelfTest.java | 5 +++++ .../s3/TcpDiscoveryS3IpFinderSSEAlgorithmSelfTest.java | 7 ++++++- .../tcp/ipfinder/s3/client/DummyObjectListingTest.java | 5 +++++ .../tcp/ipfinder/s3/client/DummyS3ClientTest.java | 8 ++++++++ 16 files changed, 97 insertions(+), 11 deletions(-) diff --git a/modules/aws/src/test/java/org/apache/ignite/spi/checkpoint/s3/S3CheckpointManagerSelfTest.java b/modules/aws/src/test/java/org/apache/ignite/spi/checkpoint/s3/S3CheckpointManagerSelfTest.java index acda385d5fb7e..7816e7ba0af47 100644 --- a/modules/aws/src/test/java/org/apache/ignite/spi/checkpoint/s3/S3CheckpointManagerSelfTest.java +++ b/modules/aws/src/test/java/org/apache/ignite/spi/checkpoint/s3/S3CheckpointManagerSelfTest.java @@ -23,10 +23,14 @@ import org.apache.ignite.internal.managers.checkpoint.GridCheckpointManagerAbstractSelfTest; import org.apache.ignite.testsuites.IgniteIgnore; import org.apache.ignite.testsuites.IgniteS3TestSuite; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Checkpoint manager test using {@link S3CheckpointSpi}. */ +@RunWith(JUnit4.class) public class S3CheckpointManagerSelfTest extends GridCheckpointManagerAbstractSelfTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { @@ -52,6 +56,7 @@ public class S3CheckpointManagerSelfTest extends GridCheckpointManagerAbstractSe * @throws Exception Thrown if any exception occurs. */ @IgniteIgnore("https://issues.apache.org/jira/browse/IGNITE-2420") + @Test public void testS3Based() throws Exception { retries = 6; @@ -62,9 +67,10 @@ public void testS3Based() throws Exception { * @throws Exception Thrown if any exception occurs. */ @IgniteIgnore("https://issues.apache.org/jira/browse/IGNITE-2420") + @Test public void testMultiNodeS3Based() throws Exception { retries = 6; doMultiNodeTest("s3"); } -} \ No newline at end of file +} diff --git a/modules/aws/src/test/java/org/apache/ignite/spi/checkpoint/s3/S3CheckpointSpiConfigSelfTest.java b/modules/aws/src/test/java/org/apache/ignite/spi/checkpoint/s3/S3CheckpointSpiConfigSelfTest.java index 727845b0d9915..446c715e0c96b 100644 --- a/modules/aws/src/test/java/org/apache/ignite/spi/checkpoint/s3/S3CheckpointSpiConfigSelfTest.java +++ b/modules/aws/src/test/java/org/apache/ignite/spi/checkpoint/s3/S3CheckpointSpiConfigSelfTest.java @@ -19,16 +19,21 @@ import org.apache.ignite.testframework.junits.spi.GridSpiAbstractConfigTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Grid S3 checkpoint SPI config self test. */ @GridSpiTest(spi = S3CheckpointSpi.class, group = "Checkpoint SPI") +@RunWith(JUnit4.class) public class S3CheckpointSpiConfigSelfTest extends GridSpiAbstractConfigTest { /** * @throws Exception If failed. */ + @Test public void testNegativeConfig() throws Exception { checkNegativeSpiProperty(new S3CheckpointSpi(), "awsCredentials", null); } -} \ No newline at end of file +} diff --git a/modules/aws/src/test/java/org/apache/ignite/spi/checkpoint/s3/S3CheckpointSpiSelfTest.java b/modules/aws/src/test/java/org/apache/ignite/spi/checkpoint/s3/S3CheckpointSpiSelfTest.java index cb38083506e69..a25b5be481a53 100644 --- a/modules/aws/src/test/java/org/apache/ignite/spi/checkpoint/s3/S3CheckpointSpiSelfTest.java +++ b/modules/aws/src/test/java/org/apache/ignite/spi/checkpoint/s3/S3CheckpointSpiSelfTest.java @@ -39,11 +39,15 @@ import org.apache.ignite.testframework.junits.spi.GridSpiTest; import org.apache.ignite.testsuites.IgniteIgnore; import org.apache.ignite.testsuites.IgniteS3TestSuite; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Grid S3 checkpoint SPI self test. */ @GridSpiTest(spi = S3CheckpointSpi.class, group = "Checkpoint SPI") +@RunWith(JUnit4.class) public class S3CheckpointSpiSelfTest extends GridSpiAbstractTest { /** */ private static final int CHECK_POINT_COUNT = 10; @@ -96,6 +100,7 @@ public class S3CheckpointSpiSelfTest extends GridSpiAbstractTest { /** {@inheritDoc} */ @@ -44,7 +48,8 @@ public class S3CheckpointSpiStartStopBucketEndpointSelfTest extends GridSpiStart /** {@inheritDoc} */ @IgniteIgnore("https://issues.apache.org/jira/browse/IGNITE-2420") + @Test @Override public void testStartStop() throws Exception { super.testStartStop(); } -} \ No newline at end of file +} diff --git a/modules/aws/src/test/java/org/apache/ignite/spi/checkpoint/s3/S3CheckpointSpiStartStopSSEAlgorithmSelfTest.java b/modules/aws/src/test/java/org/apache/ignite/spi/checkpoint/s3/S3CheckpointSpiStartStopSSEAlgorithmSelfTest.java index 7bfb75dd7888e..6f269f49a2b0a 100644 --- a/modules/aws/src/test/java/org/apache/ignite/spi/checkpoint/s3/S3CheckpointSpiStartStopSSEAlgorithmSelfTest.java +++ b/modules/aws/src/test/java/org/apache/ignite/spi/checkpoint/s3/S3CheckpointSpiStartStopSSEAlgorithmSelfTest.java @@ -23,11 +23,15 @@ import org.apache.ignite.testframework.junits.spi.GridSpiTest; import org.apache.ignite.testsuites.IgniteIgnore; import org.apache.ignite.testsuites.IgniteS3TestSuite; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Grid S3 checkpoint SPI start stop self test. */ @GridSpiTest(spi = S3CheckpointSpi.class, group = "Checkpoint SPI") +@RunWith(JUnit4.class) public class S3CheckpointSpiStartStopSSEAlgorithmSelfTest extends GridSpiStartStopAbstractTest { /** {@inheritDoc} */ @Override protected void spiConfigure(S3CheckpointSpi spi) throws Exception { @@ -43,7 +47,8 @@ public class S3CheckpointSpiStartStopSSEAlgorithmSelfTest extends GridSpiStartSt /** {@inheritDoc} */ @IgniteIgnore("https://issues.apache.org/jira/browse/IGNITE-2420") + @Test @Override public void testStartStop() throws Exception { super.testStartStop(); } -} \ No newline at end of file +} diff --git a/modules/aws/src/test/java/org/apache/ignite/spi/checkpoint/s3/S3CheckpointSpiStartStopSelfTest.java b/modules/aws/src/test/java/org/apache/ignite/spi/checkpoint/s3/S3CheckpointSpiStartStopSelfTest.java index a062b51f28e3f..5fec5027d1cdd 100644 --- a/modules/aws/src/test/java/org/apache/ignite/spi/checkpoint/s3/S3CheckpointSpiStartStopSelfTest.java +++ b/modules/aws/src/test/java/org/apache/ignite/spi/checkpoint/s3/S3CheckpointSpiStartStopSelfTest.java @@ -23,11 +23,15 @@ import org.apache.ignite.testframework.junits.spi.GridSpiTest; import org.apache.ignite.testsuites.IgniteIgnore; import org.apache.ignite.testsuites.IgniteS3TestSuite; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Grid S3 checkpoint SPI start stop self test. */ @GridSpiTest(spi = S3CheckpointSpi.class, group = "Checkpoint SPI") +@RunWith(JUnit4.class) public class S3CheckpointSpiStartStopSelfTest extends GridSpiStartStopAbstractTest { /** {@inheritDoc} */ @Override protected void spiConfigure(S3CheckpointSpi spi) throws Exception { @@ -43,7 +47,8 @@ public class S3CheckpointSpiStartStopSelfTest extends GridSpiStartStopAbstractTe /** {@inheritDoc} */ @IgniteIgnore("https://issues.apache.org/jira/browse/IGNITE-2420") + @Test @Override public void testStartStop() throws Exception { super.testStartStop(); } -} \ No newline at end of file +} diff --git a/modules/aws/src/test/java/org/apache/ignite/spi/checkpoint/s3/S3SessionCheckpointSelfTest.java b/modules/aws/src/test/java/org/apache/ignite/spi/checkpoint/s3/S3SessionCheckpointSelfTest.java index 54a7910d030f3..99a0cc5e8ba57 100644 --- a/modules/aws/src/test/java/org/apache/ignite/spi/checkpoint/s3/S3SessionCheckpointSelfTest.java +++ b/modules/aws/src/test/java/org/apache/ignite/spi/checkpoint/s3/S3SessionCheckpointSelfTest.java @@ -24,15 +24,20 @@ import org.apache.ignite.session.GridSessionCheckpointSelfTest; import org.apache.ignite.testsuites.IgniteIgnore; import org.apache.ignite.testsuites.IgniteS3TestSuite; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Grid session checkpoint self test using {@link S3CheckpointSpi}. */ +@RunWith(JUnit4.class) public class S3SessionCheckpointSelfTest extends GridSessionCheckpointAbstractSelfTest { /** * @throws Exception If failed. */ @IgniteIgnore("https://issues.apache.org/jira/browse/IGNITE-2420") + @Test public void testS3Checkpoint() throws Exception { IgniteConfiguration cfg = getConfiguration(); @@ -51,4 +56,4 @@ public void testS3Checkpoint() throws Exception { checkCheckpoints(cfg); } -} \ No newline at end of file +} diff --git a/modules/aws/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/elb/TcpDiscoveryElbIpFinderSelfTest.java b/modules/aws/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/elb/TcpDiscoveryElbIpFinderSelfTest.java index 1217d8b4f98eb..85568f0f50540 100644 --- a/modules/aws/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/elb/TcpDiscoveryElbIpFinderSelfTest.java +++ b/modules/aws/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/elb/TcpDiscoveryElbIpFinderSelfTest.java @@ -19,10 +19,14 @@ import org.apache.ignite.spi.IgniteSpiException; import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinderAbstractSelfTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * TcpDiscoveryElbIpFinderSelfTest test. */ +@RunWith(JUnit4.class) public class TcpDiscoveryElbIpFinderSelfTest extends TcpDiscoveryIpFinderAbstractSelfTest { /** * Constructor. @@ -44,6 +48,7 @@ public TcpDiscoveryElbIpFinderSelfTest() throws Exception { } /** {@inheritDoc} */ + @Test @Override public void testIpFinder() throws Exception { TcpDiscoveryElbIpFinder ipFinder = new TcpDiscoveryElbIpFinder(); @@ -78,4 +83,4 @@ public TcpDiscoveryElbIpFinderSelfTest() throws Exception { assertTrue(e.getMessage().startsWith("One or more configuration parameters are invalid")); } } -} \ No newline at end of file +} diff --git a/modules/aws/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/s3/TcpDiscoveryS3IpFinderAbstractSelfTest.java b/modules/aws/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/s3/TcpDiscoveryS3IpFinderAbstractSelfTest.java index 768e44da70f3d..37a0accc208f5 100644 --- a/modules/aws/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/s3/TcpDiscoveryS3IpFinderAbstractSelfTest.java +++ b/modules/aws/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/s3/TcpDiscoveryS3IpFinderAbstractSelfTest.java @@ -27,10 +27,14 @@ import org.apache.ignite.testsuites.IgniteIgnore; import org.apache.ignite.testsuites.IgniteS3TestSuite; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Abstract TcpDiscoveryS3IpFinder to test with different ways of setting AWS credentials. */ +@RunWith(JUnit4.class) abstract class TcpDiscoveryS3IpFinderAbstractSelfTest extends TcpDiscoveryIpFinderAbstractSelfTest { /** Bucket endpoint */ @@ -83,6 +87,7 @@ abstract class TcpDiscoveryS3IpFinderAbstractSelfTest /** {@inheritDoc} */ @IgniteIgnore("https://issues.apache.org/jira/browse/IGNITE-2420") + @Test @Override public void testIpFinder() throws Exception { super.testIpFinder(); } diff --git a/modules/aws/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/s3/TcpDiscoveryS3IpFinderAwsCredentialsProviderSelfTest.java b/modules/aws/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/s3/TcpDiscoveryS3IpFinderAwsCredentialsProviderSelfTest.java index 9ff5571a26e5e..06524d24d8cd1 100644 --- a/modules/aws/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/s3/TcpDiscoveryS3IpFinderAwsCredentialsProviderSelfTest.java +++ b/modules/aws/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/s3/TcpDiscoveryS3IpFinderAwsCredentialsProviderSelfTest.java @@ -20,10 +20,14 @@ import com.amazonaws.auth.AWSStaticCredentialsProvider; import com.amazonaws.auth.BasicAWSCredentials; import org.apache.ignite.testsuites.IgniteS3TestSuite; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * TcpDiscoveryS3IpFinder test using AWS credentials provider. */ +@RunWith(JUnit4.class) public class TcpDiscoveryS3IpFinderAwsCredentialsProviderSelfTest extends TcpDiscoveryS3IpFinderAbstractSelfTest { /** * Constructor. @@ -41,7 +45,8 @@ public TcpDiscoveryS3IpFinderAwsCredentialsProviderSelfTest() throws Exception { } /** {@inheritDoc} */ + @Test @Override public void testIpFinder() throws Exception { super.testIpFinder(); } -} \ No newline at end of file +} diff --git a/modules/aws/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/s3/TcpDiscoveryS3IpFinderAwsCredentialsSelfTest.java b/modules/aws/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/s3/TcpDiscoveryS3IpFinderAwsCredentialsSelfTest.java index 5bea2515530c5..db287108016c5 100644 --- a/modules/aws/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/s3/TcpDiscoveryS3IpFinderAwsCredentialsSelfTest.java +++ b/modules/aws/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/s3/TcpDiscoveryS3IpFinderAwsCredentialsSelfTest.java @@ -19,10 +19,14 @@ import com.amazonaws.auth.BasicAWSCredentials; import org.apache.ignite.testsuites.IgniteS3TestSuite; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * TcpDiscoveryS3IpFinder test using AWS credentials. */ +@RunWith(JUnit4.class) public class TcpDiscoveryS3IpFinderAwsCredentialsSelfTest extends TcpDiscoveryS3IpFinderAbstractSelfTest { /** * Constructor. @@ -40,7 +44,8 @@ public TcpDiscoveryS3IpFinderAwsCredentialsSelfTest() throws Exception { } /** {@inheritDoc} */ + @Test @Override public void testIpFinder() throws Exception { super.testIpFinder(); } -} \ No newline at end of file +} diff --git a/modules/aws/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/s3/TcpDiscoveryS3IpFinderBucketEndpointSelfTest.java b/modules/aws/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/s3/TcpDiscoveryS3IpFinderBucketEndpointSelfTest.java index 07d4839d959d7..11481d8f42286 100644 --- a/modules/aws/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/s3/TcpDiscoveryS3IpFinderBucketEndpointSelfTest.java +++ b/modules/aws/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/s3/TcpDiscoveryS3IpFinderBucketEndpointSelfTest.java @@ -19,12 +19,16 @@ import com.amazonaws.auth.BasicAWSCredentials; import org.apache.ignite.testsuites.IgniteS3TestSuite; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * TcpDiscoveryS3IpFinder tests bucket endpoint for IP finder. * For information about possible endpoint names visit * docs.aws.amazon.com. */ +@RunWith(JUnit4.class) public class TcpDiscoveryS3IpFinderBucketEndpointSelfTest extends TcpDiscoveryS3IpFinderAbstractSelfTest { /** * Constructor. @@ -49,6 +53,7 @@ public TcpDiscoveryS3IpFinderBucketEndpointSelfTest() throws Exception { } /** {@inheritDoc} */ + @Test @Override public void testIpFinder() throws Exception { super.testIpFinder(); } diff --git a/modules/aws/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/s3/TcpDiscoveryS3IpFinderKeyPrefixSelfTest.java b/modules/aws/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/s3/TcpDiscoveryS3IpFinderKeyPrefixSelfTest.java index 6e4960bdb3939..bb01f0b4e8503 100644 --- a/modules/aws/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/s3/TcpDiscoveryS3IpFinderKeyPrefixSelfTest.java +++ b/modules/aws/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/s3/TcpDiscoveryS3IpFinderKeyPrefixSelfTest.java @@ -19,12 +19,16 @@ import com.amazonaws.auth.BasicAWSCredentials; import org.apache.ignite.spi.discovery.tcp.ipfinder.s3.client.DummyS3Client; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.mockito.Mockito; /** * TcpDiscoveryS3IpFinder tests key prefix for IP finder. For information about key prefix visit: * . */ +@RunWith(JUnit4.class) public class TcpDiscoveryS3IpFinderKeyPrefixSelfTest extends TcpDiscoveryS3IpFinderAbstractSelfTest { /** * Constructor. @@ -58,6 +62,7 @@ public TcpDiscoveryS3IpFinderKeyPrefixSelfTest() throws Exception { } /** {@inheritDoc} */ + @Test @Override public void testIpFinder() throws Exception { injectLogger(finder); diff --git a/modules/aws/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/s3/TcpDiscoveryS3IpFinderSSEAlgorithmSelfTest.java b/modules/aws/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/s3/TcpDiscoveryS3IpFinderSSEAlgorithmSelfTest.java index 838a3c67f37c7..b909fac99adde 100644 --- a/modules/aws/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/s3/TcpDiscoveryS3IpFinderSSEAlgorithmSelfTest.java +++ b/modules/aws/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/s3/TcpDiscoveryS3IpFinderSSEAlgorithmSelfTest.java @@ -19,12 +19,16 @@ import com.amazonaws.auth.BasicAWSCredentials; import org.apache.ignite.testsuites.IgniteS3TestSuite; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * TcpDiscoveryS3IpFinder tests server-side encryption algorithm for Amazon S3-managed encryption keys. * For information about possible S3-managed encryption keys visit * docs.aws.amazon.com. */ +@RunWith(JUnit4.class) public class TcpDiscoveryS3IpFinderSSEAlgorithmSelfTest extends TcpDiscoveryS3IpFinderAbstractSelfTest { /** * Constructor. @@ -42,7 +46,8 @@ public TcpDiscoveryS3IpFinderSSEAlgorithmSelfTest() throws Exception { } /** {@inheritDoc} */ + @Test @Override public void testIpFinder() throws Exception { super.testIpFinder(); } -} \ No newline at end of file +} diff --git a/modules/aws/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/s3/client/DummyObjectListingTest.java b/modules/aws/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/s3/client/DummyObjectListingTest.java index 2598af0c7af58..9016b52f5de20 100644 --- a/modules/aws/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/s3/client/DummyObjectListingTest.java +++ b/modules/aws/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/s3/client/DummyObjectListingTest.java @@ -23,14 +23,19 @@ import java.util.List; import java.util.Set; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Class to test {@link DummyObjectListing}. */ +@RunWith(JUnit4.class) public class DummyObjectListingTest extends GridCommonAbstractTest { /** * Test cases for various object listing functions for S3 bucket. */ + @Test public void testDummyObjectListing() { Set fakeKeyPrefixSet = new HashSet<>(); diff --git a/modules/aws/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/s3/client/DummyS3ClientTest.java b/modules/aws/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/s3/client/DummyS3ClientTest.java index bd1b12fd548f6..88c205c629e3e 100644 --- a/modules/aws/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/s3/client/DummyS3ClientTest.java +++ b/modules/aws/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/s3/client/DummyS3ClientTest.java @@ -26,10 +26,14 @@ import java.util.Map; import java.util.Set; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Class to test {@link DummyS3Client}. */ +@RunWith(JUnit4.class) public class DummyS3ClientTest extends GridCommonAbstractTest { /** Instance of {@link DummyS3Client} to be used for tests. */ private DummyS3Client s3; @@ -54,6 +58,7 @@ public class DummyS3ClientTest extends GridCommonAbstractTest { /** * Test cases to check the 'doesBucketExist' method. */ + @Test public void testDoesBucketExist() { assertTrue("The bucket 'testBucket' should exist", s3.doesBucketExist("testBucket")); assertFalse("The bucket 'nonExistentBucket' should not exist", s3.doesBucketExist("nonExistentBucket")); @@ -62,6 +67,7 @@ public void testDoesBucketExist() { /** * Test cases for various object listing functions for S3 bucket. */ + @Test public void testListObjects() { ObjectListing listing = s3.listObjects("testBucket"); @@ -98,6 +104,7 @@ public void testListObjects() { /** * Test cases for various object listing functions for S3 bucket and key prefix. */ + @Test public void testListObjectsWithAPrefix() { ObjectListing listing = s3.listObjects("testBucket", "/test"); @@ -149,6 +156,7 @@ public void testListObjectsWithAPrefix() { /** * Test case to check if a bucket is created properly. */ + @Test public void testCreateBucket() { s3.createBucket("testBucket1"); From 69787fb001977726ed36e9bae1026ada8e54748e Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Thu, 6 Dec 2018 18:43:10 +0300 Subject: [PATCH 049/176] IGNITE-10176 migrate non-core modules tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview and rebuild --- .../ignite/stream/camel/IgniteCamelStreamerTest.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/camel/src/test/java/org/apache/ignite/stream/camel/IgniteCamelStreamerTest.java b/modules/camel/src/test/java/org/apache/ignite/stream/camel/IgniteCamelStreamerTest.java index 88b7eb8845757..b384d1a294202 100644 --- a/modules/camel/src/test/java/org/apache/ignite/stream/camel/IgniteCamelStreamerTest.java +++ b/modules/camel/src/test/java/org/apache/ignite/stream/camel/IgniteCamelStreamerTest.java @@ -56,12 +56,16 @@ import org.apache.ignite.stream.StreamMultipleTupleExtractor; import org.apache.ignite.stream.StreamSingleTupleExtractor; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_PUT; /** * Test class for {@link CamelStreamer}. */ +@RunWith(JUnit4.class) public class IgniteCamelStreamerTest extends GridCommonAbstractTest { /** text/plain media type. */ private static final MediaType TEXT_PLAIN = MediaType.parse("text/plain;charset=utf-8"); @@ -127,6 +131,7 @@ public IgniteCamelStreamerTest() { /** * @throws Exception */ + @Test public void testSendOneEntryPerMessage() throws Exception { streamer.setSingleTupleExtractor(singleTupleExtractor()); @@ -147,6 +152,7 @@ public void testSendOneEntryPerMessage() throws Exception { /** * @throws Exception */ + @Test public void testMultipleEntriesInOneMessage() throws Exception { streamer.setMultipleTupleExtractor(multipleTupleExtractor()); @@ -167,6 +173,7 @@ public void testMultipleEntriesInOneMessage() throws Exception { /** * @throws Exception */ + @Test public void testResponseProcessorIsCalled() throws Exception { streamer.setSingleTupleExtractor(singleTupleExtractor()); streamer.setResponseProcessor(new Processor() { @@ -195,6 +202,7 @@ public void testResponseProcessorIsCalled() throws Exception { /** * @throws Exception */ + @Test public void testUserSpecifiedCamelContext() throws Exception { final AtomicInteger cnt = new AtomicInteger(); @@ -228,6 +236,7 @@ public void testUserSpecifiedCamelContext() throws Exception { /** * @throws Exception */ + @Test public void testUserSpecifiedCamelContextWithPropertyPlaceholders() throws Exception { // Create a CamelContext with a custom property placeholder. CamelContext context = new DefaultCamelContext(); @@ -266,6 +275,7 @@ public void testUserSpecifiedCamelContextWithPropertyPlaceholders() throws Excep /** * @throws Exception */ + @Test public void testInvalidEndpointUri() throws Exception { streamer.setSingleTupleExtractor(singleTupleExtractor()); streamer.setEndpointUri("abc"); From 4be44eb0968ff8b3e8e008ffc1d1033be994cd28 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Thu, 6 Dec 2018 18:48:56 +0300 Subject: [PATCH 050/176] IGNITE-10176 migrate non-core modules tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview and rebuild --- .../java/org/apache/ignite/tests/CassandraConfigTest.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/cassandra/store/src/test/java/org/apache/ignite/tests/CassandraConfigTest.java b/modules/cassandra/store/src/test/java/org/apache/ignite/tests/CassandraConfigTest.java index f09f5038cc441..7f4d5efd881f4 100644 --- a/modules/cassandra/store/src/test/java/org/apache/ignite/tests/CassandraConfigTest.java +++ b/modules/cassandra/store/src/test/java/org/apache/ignite/tests/CassandraConfigTest.java @@ -21,16 +21,21 @@ import org.apache.ignite.cache.query.annotations.QuerySqlField; import org.apache.ignite.cache.store.cassandra.persistence.KeyPersistenceSettings; import org.apache.ignite.cache.store.cassandra.persistence.KeyValuePersistenceSettings; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Simple test for DDL generator. */ +@RunWith(JUnit4.class) public class CassandraConfigTest extends TestCase { /** * Check if same DDL generated for similar keys and same KeyPersistenceConfiguration. * * @throws Exception */ + @Test public void testDDLGeneration() throws Exception { KeyPersistenceSettings keyPersistenceSettingsA = getKeyPersistenceSettings(KeyA.class); KeyPersistenceSettings keyPersistenceSettingsB = getKeyPersistenceSettings(KeyB.class); From d87d4e26e21067b8ac3151d81ed9e27ce2781a96 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Thu, 6 Dec 2018 19:53:27 +0300 Subject: [PATCH 051/176] IGNITE-10176 migrate non-core modules tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview and rebuild --- .../internal/TaskEventSubjectIdSelfTest.java | 9 + .../ClientAbstractMultiThreadedSelfTest.java | 7 +- .../client/ClientDefaultCacheSelfTest.java | 5 + .../client/ClientReconnectionSelfTest.java | 12 +- .../ClientTcpSslAuthenticationSelfTest.java | 10 +- ...ExecutionAfterTopologyRestartSelfTest.java | 7 +- .../impl/ClientCacheFlagsCodecTest.java | 6 + .../impl/ClientComputeImplSelfTest.java | 18 +- .../client/impl/ClientDataImplSelfTest.java | 23 +- .../impl/ClientFutureAdapterSelfTest.java | 8 +- ...ClientPropertiesConfigurationSelfTest.java | 8 +- .../ClientAbstractConnectivitySelfTest.java | 12 +- .../ClientAbstractMultiNodeSelfTest.java | 7 + .../integration/ClientAbstractSelfTest.java | 11 + .../ClientPreferDirectSelfTest.java | 8 +- .../router/ClientFailedInitSelfTest.java | 10 +- .../client/router/RouterFactorySelfTest.java | 7 +- .../router/TcpRouterAbstractSelfTest.java | 7 +- .../client/util/ClientByteUtilsTest.java | 10 +- .../util/ClientConsistentHashSelfTest.java | 10 +- .../client/util/ClientJavaHasherSelfTest.java | 7 +- .../ignite/internal/jdbc2/JdbcBlobTest.java | 15 +- .../internal/jdbc2/JdbcBulkLoadSelfTest.java | 5 + .../jdbc2/JdbcComplexQuerySelfTest.java | 9 + .../jdbc2/JdbcConnectionReopenTest.java | 5 + .../jdbc2/JdbcConnectionSelfTest.java | 15 ++ .../jdbc2/JdbcDeleteStatementSelfTest.java | 7 + .../jdbc2/JdbcDistributedJoinsQueryTest.java | 9 + .../JdbcDynamicIndexAbstractSelfTest.java | 11 + .../jdbc2/JdbcEmptyCacheSelfTest.java | 6 + .../internal/jdbc2/JdbcErrorsSelfTest.java | 6 + .../jdbc2/JdbcInsertStatementSelfTest.java | 12 ++ .../jdbc2/JdbcLocalCachesSelfTest.java | 7 + .../jdbc2/JdbcMergeStatementSelfTest.java | 7 + .../internal/jdbc2/JdbcMetadataSelfTest.java | 15 ++ .../jdbc2/JdbcNoCacheStreamingSelfTest.java | 6 + .../jdbc2/JdbcNoDefaultCacheTest.java | 6 + .../jdbc2/JdbcPreparedStatementSelfTest.java | 20 ++ .../internal/jdbc2/JdbcResultSetSelfTest.java | 27 +++ .../internal/jdbc2/JdbcSpringSelfTest.java | 6 + .../jdbc2/JdbcStatementBatchingSelfTest.java | 8 + .../internal/jdbc2/JdbcStatementSelfTest.java | 10 + .../internal/jdbc2/JdbcStreamingSelfTest.java | 8 + .../jdbc2/JdbcStreamingToPublicCacheTest.java | 5 + .../jdbc2/JdbcUpdateStatementSelfTest.java | 7 + .../rest/ChangeStateCommandHandlerTest.java | 5 + .../rest/ClientMemcachedProtocolSelfTest.java | 23 ++ .../JettyRestProcessorAbstractSelfTest.java | 64 ++++++ ...stProcessorAuthenticationAbstractTest.java | 6 + ...cessorAuthenticationWithTokenSelfTest.java | 5 + .../JettyRestProcessorGetAllAsArrayTest.java | 5 + .../JettyRestProcessorSignedSelfTest.java | 5 + .../rest/RestBinaryProtocolSelfTest.java | 21 +- .../rest/RestMemcacheProtocolSelfTest.java | 19 +- .../rest/RestProcessorMultiStartSelfTest.java | 6 + .../rest/RestProcessorStartSelfTest.java | 7 +- .../rest/TaskCommandHandlerSelfTest.java | 7 +- .../TcpRestUnmarshalVulnerabilityTest.java | 12 +- .../protocols/tcp/TcpRestParserSelfTest.java | 12 +- .../redis/RedisProtocolConnectSelfTest.java | 7 + .../redis/RedisProtocolServerSelfTest.java | 7 + ...colStringAtomicDatastructuresSelfTest.java | 5 + .../redis/RedisProtocolStringSelfTest.java | 19 ++ .../ignite/jdbc/JdbcComplexQuerySelfTest.java | 11 +- .../ignite/jdbc/JdbcConnectionSelfTest.java | 14 +- .../ignite/jdbc/JdbcEmptyCacheSelfTest.java | 8 +- .../jdbc/JdbcErrorsAbstractSelfTest.java | 36 ++++ .../ignite/jdbc/JdbcLocalCachesSelfTest.java | 8 +- .../ignite/jdbc/JdbcMetadataSelfTest.java | 9 + .../ignite/jdbc/JdbcNoDefaultCacheTest.java | 6 + .../jdbc/JdbcPojoLegacyQuerySelfTest.java | 5 + .../ignite/jdbc/JdbcPojoQuerySelfTest.java | 6 + .../jdbc/JdbcPreparedStatementSelfTest.java | 21 +- .../ignite/jdbc/JdbcResultSetSelfTest.java | 23 +- .../ignite/jdbc/JdbcStatementSelfTest.java | 9 +- .../jdbc/JdbcVersionMismatchSelfTest.java | 5 + .../jdbc/suite/IgniteJdbcDriverTestSuite.java | 199 +++++++++--------- ...dbcThinAuthenticateConnectionSelfTest.java | 11 +- .../JdbcThinAutoCloseServerCursorTest.java | 8 + .../jdbc/thin/JdbcThinBatchSelfTest.java | 25 +++ .../JdbcThinBulkLoadAbstractSelfTest.java | 35 +++ ...ThinComplexDmlDdlCustomSchemaSelfTest.java | 8 +- .../thin/JdbcThinComplexDmlDdlSelfTest.java | 7 +- .../thin/JdbcThinComplexQuerySelfTest.java | 11 +- ...bcThinConnectionMultipleAddressesTest.java | 19 +- ...JdbcThinConnectionMvccEnabledSelfTest.java | 13 +- .../jdbc/thin/JdbcThinConnectionSSLTest.java | 17 +- .../jdbc/thin/JdbcThinConnectionSelfTest.java | 58 +++++ .../jdbc/thin/JdbcThinDataSourceSelfTest.java | 12 +- .../thin/JdbcThinDeleteStatementSelfTest.java | 6 + .../JdbcThinDynamicIndexAbstractSelfTest.java | 11 + .../jdbc/thin/JdbcThinEmptyCacheSelfTest.java | 8 +- .../jdbc/thin/JdbcThinErrorsSelfTest.java | 9 + .../thin/JdbcThinInsertStatementSelfTest.java | 9 + .../thin/JdbcThinLocalQueriesSelfTest.java | 5 + .../thin/JdbcThinMergeStatementSelfTest.java | 6 + .../JdbcThinMetadataPrimaryKeysSelfTest.java | 8 + .../jdbc/thin/JdbcThinMetadataSelfTest.java | 24 ++- .../JdbcThinMissingLongArrayResultsTest.java | 5 + .../thin/JdbcThinNoDefaultSchemaTest.java | 9 + .../JdbcThinPreparedStatementSelfTest.java | 23 +- .../jdbc/thin/JdbcThinResultSetSelfTest.java | 26 ++- .../jdbc/thin/JdbcThinSchemaCaseTest.java | 5 + .../thin/JdbcThinSelectAfterAlterTable.java | 8 +- .../jdbc/thin/JdbcThinStatementSelfTest.java | 38 +++- .../JdbcThinStreamingAbstractSelfTest.java | 17 +- .../ignite/jdbc/thin/JdbcThinTcpIoTest.java | 6 + ...inTransactionsAbstractComplexSelfTest.java | 34 +++ .../thin/JdbcThinTransactionsSelfTest.java | 22 ++ ...inTransactionsWithMvccEnabledSelfTest.java | 21 ++ .../thin/JdbcThinUpdateStatementSelfTest.java | 6 + ...ionFinishOnDeactivatedClusterSelfTest.java | 6 + .../client/ClientMarshallerBenchmarkTest.java | 7 +- .../client/ClientTcpSslLoadTest.java | 7 +- 114 files changed, 1431 insertions(+), 148 deletions(-) diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/TaskEventSubjectIdSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/TaskEventSubjectIdSelfTest.java index ebd7ab5e5441e..de951cf97d779 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/TaskEventSubjectIdSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/TaskEventSubjectIdSelfTest.java @@ -44,6 +44,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.events.EventType.EVTS_TASK_EXECUTION; @@ -56,6 +59,7 @@ /** * Tests for security subject ID in task events. */ +@RunWith(JUnit4.class) public class TaskEventSubjectIdSelfTest extends GridCommonAbstractTest { /** */ private static final Collection evts = new ArrayList<>(); @@ -116,6 +120,7 @@ public class TaskEventSubjectIdSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testSimpleTask() throws Exception { latch = new CountDownLatch(3); @@ -160,6 +165,7 @@ public void testSimpleTask() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFailedTask() throws Exception { latch = new CountDownLatch(2); @@ -206,6 +212,7 @@ public void testFailedTask() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTimedOutTask() throws Exception { latch = new CountDownLatch(2); @@ -261,6 +268,7 @@ public void testTimedOutTask() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClosure() throws Exception { latch = new CountDownLatch(3); @@ -312,6 +320,7 @@ public void testClosure() throws Exception { * * @throws Exception If failed. */ + @Test public void testClient() throws Exception { latch = new CountDownLatch(3); diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientAbstractMultiThreadedSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientAbstractMultiThreadedSelfTest.java index 6b14185e9c1d7..2ba00c3eed8e1 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientAbstractMultiThreadedSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientAbstractMultiThreadedSelfTest.java @@ -48,6 +48,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.LOCAL; @@ -58,6 +61,7 @@ /** * */ +@RunWith(JUnit4.class) public abstract class ClientAbstractMultiThreadedSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -245,6 +249,7 @@ private CacheConfiguration cacheConfiguration(@NotNull String cacheName) throws /** * @throws Exception If failed. */ + @Test public void testMultithreadedTaskRun() throws Exception { final AtomicLong cnt = new AtomicLong(); @@ -396,4 +401,4 @@ private static class TestTask extends ComputeTaskSplitAdapter { return locNodeId; } } -} \ No newline at end of file +} diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientDefaultCacheSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientDefaultCacheSelfTest.java index c62cf8a547c92..7e4e4f0e72af3 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientDefaultCacheSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientDefaultCacheSelfTest.java @@ -41,12 +41,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_JETTY_PORT; /** * Tests that client is able to connect to a grid with only default cache enabled. */ +@RunWith(JUnit4.class) public class ClientDefaultCacheSelfTest extends GridCommonAbstractTest { /** Path to jetty config configured with SSL. */ private static final String REST_JETTY_CFG = "modules/clients/src/test/resources/jetty/rest-jetty.xml"; @@ -183,6 +187,7 @@ private JsonNode jsonResponse(String content) throws IOException { /** * Json format string in cache should not transform to Json object on get request. */ + @Test public void testSkipString2JsonTransformation() throws Exception { String val = "{\"v\":\"my Value\",\"t\":1422559650154}"; diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientReconnectionSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientReconnectionSelfTest.java index b1cd2d56b96f2..3253bdb81e0d6 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientReconnectionSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientReconnectionSelfTest.java @@ -27,10 +27,14 @@ import org.apache.ignite.internal.util.typedef.X; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testsuites.IgniteIgnore; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class ClientReconnectionSelfTest extends GridCommonAbstractTest { /** */ public static final String HOST = "127.0.0.1"; @@ -90,6 +94,7 @@ private GridClient client(String host) throws GridClientException { /** * @throws Exception If failed. */ + @Test public void testNoFailedReconnection() throws Exception { for (int i = 0; i < ClientTestRestServer.SERVERS_CNT; i++) runServer(i, false); @@ -147,6 +152,7 @@ public void testNoFailedReconnection() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCorrectInit() throws Exception { for (int i = 0; i < ClientTestRestServer.SERVERS_CNT; i++) runServer(i, i == 0); @@ -164,6 +170,7 @@ public void testCorrectInit() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFailedInit() throws Exception { for (int i = 0; i < ClientTestRestServer.SERVERS_CNT; i++) runServer(i, true); @@ -191,9 +198,10 @@ public void testFailedInit() throws Exception { * @throws Exception If failed. */ @IgniteIgnore(value = "https://issues.apache.org/jira/browse/IGNITE-590", forceFailure = true) + @Test public void testIdleConnection() throws Exception { int srvsCnt = 4; // TODO: IGNITE-590 it may be wrong value. Need to investigate after IGNITE-590 will be fixed. - + for (int i = 0; i < srvsCnt; i++) runServer(i, false); @@ -242,4 +250,4 @@ private ClientTestRestServer runServer(int idx, boolean failOnConnect) throws I return srv; } -} \ No newline at end of file +} diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientTcpSslAuthenticationSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientTcpSslAuthenticationSelfTest.java index 922526201b194..c43c3c0c4354f 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientTcpSslAuthenticationSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientTcpSslAuthenticationSelfTest.java @@ -32,10 +32,14 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests */ +@RunWith(JUnit4.class) public class ClientTcpSslAuthenticationSelfTest extends GridCommonAbstractTest { /** REST TCP port. */ private static final int REST_TCP_PORT = 12121; @@ -112,6 +116,7 @@ private GridClientImpl createClient() throws Exception { /** * @throws Exception If failed. */ + @Test public void testServerAuthenticated() throws Exception { checkServerAuthenticatedByClient(false); } @@ -119,6 +124,7 @@ public void testServerAuthenticated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testServerNotAuthenticatedByClient() throws Exception { try { checkServerAuthenticatedByClient(true); @@ -131,6 +137,7 @@ public void testServerNotAuthenticatedByClient() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientAuthenticated() throws Exception { checkClientAuthenticatedByServer(false); } @@ -138,6 +145,7 @@ public void testClientAuthenticated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientNotAuthenticated() throws Exception { try { checkServerAuthenticatedByClient(true); @@ -264,4 +272,4 @@ public void reset() { srvCheckCallCnt.set(0); } } -} \ No newline at end of file +} diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientTcpTaskExecutionAfterTopologyRestartSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientTcpTaskExecutionAfterTopologyRestartSelfTest.java index 7dac20e0090fa..3e02fbbb1a901 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientTcpTaskExecutionAfterTopologyRestartSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientTcpTaskExecutionAfterTopologyRestartSelfTest.java @@ -23,10 +23,14 @@ import org.apache.ignite.failure.FailureHandler; import org.apache.ignite.failure.NoOpFailureHandler; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Ensures */ +@RunWith(JUnit4.class) public class ClientTcpTaskExecutionAfterTopologyRestartSelfTest extends GridCommonAbstractTest { /** Port. */ private static final int PORT = 11211; @@ -61,6 +65,7 @@ public class ClientTcpTaskExecutionAfterTopologyRestartSelfTest extends GridComm /** * @throws Exception If failed. */ + @Test public void testTaskAfterRestart() throws Exception { startGrids(1); @@ -79,4 +84,4 @@ public void testTaskAfterRestart() throws Exception { cli.compute().execute(ClientTcpTask.class.getName(), Collections.singletonList("arg")); } -} \ No newline at end of file +} diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/impl/ClientCacheFlagsCodecTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/impl/ClientCacheFlagsCodecTest.java index a9bda0aff1452..c792edbc71ecd 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/client/impl/ClientCacheFlagsCodecTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/impl/ClientCacheFlagsCodecTest.java @@ -25,14 +25,19 @@ import org.apache.ignite.internal.client.GridClientCacheFlag; import org.apache.ignite.internal.util.typedef.F; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests conversions between GridClientCacheFlag. */ +@RunWith(JUnit4.class) public class ClientCacheFlagsCodecTest extends TestCase { /** * Tests that each client flag will be correctly converted to server flag. */ + @Test public void testEncodingDecodingFullness() { for (GridClientCacheFlag f : GridClientCacheFlag.values()) { int bits = GridClientCacheFlag.encodeCacheFlags(EnumSet.of(f)); @@ -48,6 +53,7 @@ public void testEncodingDecodingFullness() { /** * Tests that groups of client flags can be correctly converted to corresponding server flag groups. */ + @Test public void testGroupEncodingDecoding() { // All. doTestGroup(GridClientCacheFlag.values()); diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/impl/ClientComputeImplSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/impl/ClientComputeImplSelfTest.java index 7777f334f56c9..7fd50574883c6 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/client/impl/ClientComputeImplSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/impl/ClientComputeImplSelfTest.java @@ -24,6 +24,9 @@ import org.apache.ignite.internal.client.GridClientNode; import org.apache.ignite.internal.client.GridClientPredicate; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.testframework.GridTestUtils.assertThrows; @@ -31,6 +34,7 @@ * Simple unit test for GridClientComputeImpl which checks method parameters. * It tests only those methods that can produce assertion underneath upon incorrect arguments. */ +@RunWith(JUnit4.class) public class ClientComputeImplSelfTest extends GridCommonAbstractTest { /** Mocked client compute. */ private GridClientCompute compute = allocateInstance0(GridClientComputeImpl.class); @@ -38,6 +42,7 @@ public class ClientComputeImplSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testProjection_byGridClientNode() throws Exception { assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -49,6 +54,7 @@ public void testProjection_byGridClientNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testExecute() throws Exception { assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -60,6 +66,7 @@ public void testExecute() throws Exception { /** * @throws Exception If failed. */ + @Test public void testExecuteAsync() throws Exception { assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -71,6 +78,7 @@ public void testExecuteAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAffinityExecute() throws Exception { assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -82,6 +90,7 @@ public void testAffinityExecute() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAffinityExecuteAsync() throws Exception { assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -93,6 +102,7 @@ public void testAffinityExecuteAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNode() throws Exception { assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -104,6 +114,7 @@ public void testNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNodesByIds() throws Exception { assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -115,6 +126,7 @@ public void testNodesByIds() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNodesByFilter() throws Exception { assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -126,6 +138,7 @@ public void testNodesByFilter() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRefreshNodeById() throws Exception { assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -137,6 +150,7 @@ public void testRefreshNodeById() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRefreshNodeByIdAsync() throws Exception { assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -148,6 +162,7 @@ public void testRefreshNodeByIdAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRefreshNodeByIp() throws Exception { assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -159,6 +174,7 @@ public void testRefreshNodeByIp() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRefreshNodeByIpAsync() throws Exception { assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -166,4 +182,4 @@ public void testRefreshNodeByIpAsync() throws Exception { } }, NullPointerException.class, "Ouch! Argument cannot be null: ip"); } -} \ No newline at end of file +} diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/impl/ClientDataImplSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/impl/ClientDataImplSelfTest.java index 1638f31239193..61379d1368134 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/client/impl/ClientDataImplSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/impl/ClientDataImplSelfTest.java @@ -20,12 +20,16 @@ import java.util.concurrent.Callable; import org.apache.ignite.internal.client.GridClientData; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.testframework.GridTestUtils.assertThrows; /** * Simple unit test for GridClientDataImpl which checks method parameters. */ +@RunWith(JUnit4.class) public class ClientDataImplSelfTest extends GridCommonAbstractTest { /** Mocked client data. */ private GridClientData data = allocateInstance0(GridClientDataImpl.class); @@ -33,6 +37,7 @@ public class ClientDataImplSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPut() throws Exception { assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -54,6 +59,7 @@ public void testPut() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAsync() throws Exception { assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -75,6 +81,7 @@ public void testPutAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAll() throws Exception { assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -88,6 +95,7 @@ public void testPutAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAllAsync() throws Exception { assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -101,6 +109,7 @@ public void testPutAllAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGet() throws Exception { assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -112,6 +121,7 @@ public void testGet() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetAsync() throws Exception { assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -123,6 +133,7 @@ public void testGetAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetAll() throws Exception { assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -134,6 +145,7 @@ public void testGetAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetAllAsync() throws Exception { assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -145,6 +157,7 @@ public void testGetAllAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemove() throws Exception { assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -158,6 +171,7 @@ public void testRemove() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemoveAsync() throws Exception { assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -169,6 +183,7 @@ public void testRemoveAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemoveAll() throws Exception { assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -182,6 +197,7 @@ public void testRemoveAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemoveAllAsync() throws Exception { assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -195,6 +211,7 @@ public void testRemoveAllAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReplace() throws Exception { assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -216,6 +233,7 @@ public void testReplace() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReplaceAsync() throws Exception { assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -233,6 +251,7 @@ public void testReplaceAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCas() throws Exception { assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -246,6 +265,7 @@ public void testCas() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCasAsync() throws Exception { assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -257,6 +277,7 @@ public void testCasAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAffinity() throws Exception { assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -264,4 +285,4 @@ public void testAffinity() throws Exception { } }, NullPointerException.class, "Ouch! Argument cannot be null: key"); } -} \ No newline at end of file +} diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/impl/ClientFutureAdapterSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/impl/ClientFutureAdapterSelfTest.java index 67df048d13fe2..0d017cff11b5b 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/client/impl/ClientFutureAdapterSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/impl/ClientFutureAdapterSelfTest.java @@ -24,14 +24,19 @@ import org.apache.ignite.internal.client.GridClientFuture; import org.apache.ignite.internal.client.GridClientFutureTimeoutException; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Grid client future implementation self test. */ +@RunWith(JUnit4.class) public class ClientFutureAdapterSelfTest extends GridCommonAbstractTest { /** * Test finished futures. */ + @Test public void testFinished() { GridClientFutureAdapter fut = new GridClientFutureAdapter<>(); @@ -50,6 +55,7 @@ public void testFinished() { * * @throws org.apache.ignite.internal.client.GridClientException On any exception. */ + @Test public void testChains() throws GridClientException { // Synchronous notifications. testChains(1, 100); @@ -114,4 +120,4 @@ private void testChains(int chainSize, long waitDelay) throws GridClientExceptio info("Time consumption for " + chainSize + " chained futures: " + (System.currentTimeMillis() - start)); } -} \ No newline at end of file +} diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/impl/ClientPropertiesConfigurationSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/impl/ClientPropertiesConfigurationSelfTest.java index 55aadfd01b51d..964b14e0de01f 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/client/impl/ClientPropertiesConfigurationSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/impl/ClientPropertiesConfigurationSelfTest.java @@ -39,6 +39,9 @@ import org.apache.ignite.internal.util.IgniteUtils; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.springframework.context.support.FileSystemXmlApplicationContext; import static org.apache.ignite.internal.client.GridClientConfiguration.DFLT_MAX_CONN_IDLE_TIME; @@ -47,6 +50,7 @@ /** * Properties-based configuration self test. */ +@RunWith(JUnit4.class) public class ClientPropertiesConfigurationSelfTest extends GridCommonAbstractTest { /** * Grid client spring configuration. @@ -73,6 +77,7 @@ public class ClientPropertiesConfigurationSelfTest extends GridCommonAbstractTes * * @throws Exception In case of exception. */ + @Test public void testCreation() throws Exception { // Validate default configuration. GridClientConfiguration cfg = new GridClientConfiguration(); @@ -131,6 +136,7 @@ public void testCreation() throws Exception { * * @throws Exception In case of any exception. */ + @Test public void testSpringConfig() throws Exception { GridClientConfiguration cfg = new FileSystemXmlApplicationContext( GRID_CLIENT_SPRING_CONFIG.toString()).getBean(GridClientConfiguration.class); @@ -242,4 +248,4 @@ private void validateConfig(int expDataCfgs, GridClientConfiguration cfg) { assertEquals(null, cfg.getSslContextFactory(), null); assertEquals(DFLT_TOP_REFRESH_FREQ, cfg.getTopologyRefreshFrequency()); } -} \ No newline at end of file +} diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractConnectivitySelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractConnectivitySelfTest.java index 8207ccfb6f15c..327c56f95a4be 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractConnectivitySelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractConnectivitySelfTest.java @@ -38,10 +38,14 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests the REST client-server connectivity with various configurations. */ +@RunWith(JUnit4.class) public abstract class ClientAbstractConnectivitySelfTest extends GridCommonAbstractTest { /** */ private static final String WILDCARD_IP = "0.0.0.0"; @@ -122,6 +126,7 @@ protected GridClient startClient(String addr, int port) throws GridClientExcepti * * @throws Exception If failed. */ + @Test public void testOneNodeDefaultHostAndPort() throws Exception { startRestNode("grid1", null, null); @@ -136,6 +141,7 @@ public void testOneNodeDefaultHostAndPort() throws Exception { * Simple test of address list filtering. * @throws Exception If failed. */ + @Test public void testResolveReachableOneAddress() throws Exception { InetAddress addr = InetAddress.getByAddress(new byte[] {127, 0, 0, 1} ); @@ -151,6 +157,7 @@ public void testResolveReachableOneAddress() throws Exception { * * @throws Exception If error occurs. */ + @Test public void testOneNodeLoopbackHost() throws Exception { startRestNode("grid1", LOOPBACK_IP, defaultRestPort()); @@ -164,6 +171,7 @@ public void testOneNodeLoopbackHost() throws Exception { * * @throws Exception If error occurs. */ + @Test public void testOneNodeZeroIpv4Address() throws Exception { startRestNode("grid1", WILDCARD_IP, defaultRestPort()); @@ -208,6 +216,7 @@ public void testOneNodeZeroIpv4Address() throws Exception { * * @throws Exception If error occurs. */ + @Test public void testTwoNodesDefaultHostAndPort() throws Exception { startRestNode("grid1", null, null); startRestNode("grid2", null, null); @@ -256,6 +265,7 @@ public void testTwoNodesDefaultHostAndPort() throws Exception { * * @throws Exception If error occurs. */ + @Test public void testRefreshTopologyOnNodeLeft() throws Exception { startRestNode("grid1", null, null); startRestNode("grid2", null, null); @@ -323,4 +333,4 @@ private static class IpV4AddressPredicate implements P1 { return s.matches("\\d+\\.\\d+\\.\\d+\\.\\d+"); } } -} \ No newline at end of file +} diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractMultiNodeSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractMultiNodeSelfTest.java index 024e9c0dcf13d..ab0630a63d5b7 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractMultiNodeSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractMultiNodeSelfTest.java @@ -77,6 +77,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -89,6 +92,7 @@ /** * Tests basic client behavior with multiple nodes. */ +@RunWith(JUnit4.class) public abstract class ClientAbstractMultiNodeSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -261,6 +265,7 @@ private CacheConfiguration cacheConfiguration(@NotNull String cacheName) throws /** * @throws Exception If failed. */ + @Test public void testEmptyProjections() throws Exception { final GridClientCompute dflt = client.compute(); @@ -296,6 +301,7 @@ public void testEmptyProjections() throws Exception { /** * @throws Exception If failed. */ + @Test public void testProjectionRun() throws Exception { GridClientCompute dflt = client.compute(); @@ -325,6 +331,7 @@ public void testProjectionRun() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTopologyListener() throws Exception { final Collection added = new ArrayList<>(1); final Collection rmvd = new ArrayList<>(1); diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractSelfTest.java index 041e9fcd793a8..eee73f7acfa4e 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractSelfTest.java @@ -72,6 +72,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_JETTY_PORT; import static org.apache.ignite.cache.CacheMode.LOCAL; @@ -83,6 +86,7 @@ * Tests for Java client. */ @SuppressWarnings("deprecation") +@RunWith(JUnit4.class) public abstract class ClientAbstractSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -346,6 +350,7 @@ protected GridClientConfiguration clientConfiguration() throws GridClientExcepti /** * @throws Exception If failed. */ + @Test public void testConnectable() throws Exception { GridClient client = client(); @@ -359,6 +364,7 @@ public void testConnectable() throws Exception { * * @throws Exception If failed. */ + @Test public void testNoAsyncExceptions() throws Exception { GridClient client = client(); @@ -404,6 +410,7 @@ public void testNoAsyncExceptions() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGracefulShutdown() throws Exception { GridClientCompute compute = client.compute(); @@ -422,6 +429,7 @@ public void testGracefulShutdown() throws Exception { /** * @throws Exception If failed. */ + @Test public void testForceShutdown() throws Exception { GridClientCompute compute = client.compute(); @@ -445,6 +453,7 @@ public void testForceShutdown() throws Exception { /** * @throws Exception If failed. */ + @Test public void testShutdown() throws Exception { GridClient c = client(); @@ -486,6 +495,7 @@ public void testShutdown() throws Exception { /** * @throws Exception If failed. */ + @Test public void testExecute() throws Exception { String taskName = getTaskName(); Object taskArg = getTaskArgument(); @@ -499,6 +509,7 @@ public void testExecute() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTopology() throws Exception { GridClientCompute compute = client.compute(); diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientPreferDirectSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientPreferDirectSelfTest.java index b012d3b85fe6f..e99d93dacd821 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientPreferDirectSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientPreferDirectSelfTest.java @@ -40,6 +40,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.client.integration.ClientAbstractMultiNodeSelfTest.HOST; import static org.apache.ignite.internal.client.integration.ClientAbstractMultiNodeSelfTest.REST_TCP_PORT_BASE; @@ -48,6 +51,7 @@ /** * */ +@RunWith(JUnit4.class) public class ClientPreferDirectSelfTest extends GridCommonAbstractTest { /** VM ip finder for TCP discovery. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -86,6 +90,7 @@ public class ClientPreferDirectSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRandomBalancer() throws Exception { GridClientRandomBalancer b = new GridClientRandomBalancer(); @@ -97,6 +102,7 @@ public void testRandomBalancer() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRoundRobinBalancer() throws Exception { GridClientRoundRobinBalancer b = new GridClientRoundRobinBalancer(); @@ -195,4 +201,4 @@ private static class TestTask extends ComputeTaskSplitAdapter { return ignite.cluster().localNode().id().toString(); } } -} \ No newline at end of file +} diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/router/ClientFailedInitSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/router/ClientFailedInitSelfTest.java index 971dcb186b157..86fc9a6e52577 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/client/router/ClientFailedInitSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/router/ClientFailedInitSelfTest.java @@ -42,6 +42,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_JETTY_PORT; import static org.apache.ignite.internal.client.GridClientProtocol.TCP; @@ -53,6 +56,7 @@ /** * */ +@RunWith(JUnit4.class) public class ClientFailedInitSelfTest extends GridCommonAbstractTest { /** */ private static final int RECONN_CNT = 3; @@ -103,6 +107,7 @@ public class ClientFailedInitSelfTest extends GridCommonAbstractTest { /** * */ + @Test public void testEmptyAddresses() { try { GridClientFactory.start(new GridClientConfiguration()); @@ -117,6 +122,7 @@ public void testEmptyAddresses() { /** * */ + @Test public void testRoutersAndServersAddressesProvided() { try { GridClientConfiguration c = new GridClientConfiguration(); @@ -136,6 +142,7 @@ public void testRoutersAndServersAddressesProvided() { /** * @throws Exception If failed. */ + @Test public void testTcpClient() throws Exception { doTestClient(TCP); } @@ -143,6 +150,7 @@ public void testTcpClient() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTcpRouter() throws Exception { doTestRouter(TCP); } @@ -288,4 +296,4 @@ private static class TestTask extends ComputeTaskSplitAdapter { return results.get(0).getData(); } } -} \ No newline at end of file +} diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/router/RouterFactorySelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/router/RouterFactorySelfTest.java index 5df424c4cabce..09ff38086a76a 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/client/router/RouterFactorySelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/router/RouterFactorySelfTest.java @@ -27,12 +27,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_JETTY_PORT; /** * Test routers factory. */ +@RunWith(JUnit4.class) public class RouterFactorySelfTest extends GridCommonAbstractTest { /** Shared IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -59,6 +63,7 @@ public class RouterFactorySelfTest extends GridCommonAbstractTest { * * @throws Exception In case of any exception. */ + @Test public void testRouterFactory() throws Exception { try { System.setProperty(IGNITE_JETTY_PORT, String.valueOf(GRID_HTTP_PORT)); @@ -109,4 +114,4 @@ public void testRouterFactory() throws Exception { stopAllGrids(); } } -} \ No newline at end of file +} diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/router/TcpRouterAbstractSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/router/TcpRouterAbstractSelfTest.java index 628006ebfa2ac..c3ae3d2671aac 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/client/router/TcpRouterAbstractSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/router/TcpRouterAbstractSelfTest.java @@ -29,10 +29,14 @@ import org.apache.ignite.internal.client.router.impl.GridTcpRouterImpl; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.logger.log4j.Log4JLogger; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Abstract base class for http routing tests. */ +@RunWith(JUnit4.class) public abstract class TcpRouterAbstractSelfTest extends ClientAbstractSelfTest { /** Port number to use by router. */ private static final int ROUTER_PORT = BINARY_PORT + 1; @@ -117,6 +121,7 @@ public GridTcpRouterConfiguration routerConfiguration() throws IgniteCheckedExce /** * @throws Exception If failed. */ + @Test @Override public void testConnectable() throws Exception { GridClient client = client(); @@ -124,4 +129,4 @@ public GridTcpRouterConfiguration routerConfiguration() throws IgniteCheckedExce assertFalse(F.first(nodes).connectable()); } -} \ No newline at end of file +} diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/util/ClientByteUtilsTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/util/ClientByteUtilsTest.java index 72112cb8e6fd9..93aa8cd17b310 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/client/util/ClientByteUtilsTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/util/ClientByteUtilsTest.java @@ -25,6 +25,9 @@ import org.apache.ignite.internal.util.GridClientByteUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.util.GridClientByteUtils.bytesToInt; import static org.apache.ignite.internal.util.GridClientByteUtils.bytesToLong; @@ -36,12 +39,14 @@ /** * Test case for client's byte convertion utility. */ +@RunWith(JUnit4.class) public class ClientByteUtilsTest extends GridCommonAbstractTest { /** * Test UUID conversions from string to binary and back. * * @throws Exception On any exception. */ + @Test public void testUuidConvertions() throws Exception { Map map = new LinkedHashMap<>(); @@ -92,6 +97,7 @@ public void testUuidConvertions() throws Exception { } } + @Test public void testShortToBytes() throws Exception { Map map = new HashMap<>(); @@ -116,6 +122,7 @@ public void testShortToBytes() throws Exception { } } + @Test public void testIntToBytes() throws Exception { Map map = new HashMap<>(); @@ -140,6 +147,7 @@ public void testIntToBytes() throws Exception { } } + @Test public void testLongToBytes() throws Exception { Map map = new LinkedHashMap<>(); @@ -177,4 +185,4 @@ private byte[] asByteArray(String text) { return b; } -} \ No newline at end of file +} diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/util/ClientConsistentHashSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/util/ClientConsistentHashSelfTest.java index 9ee274fab52fe..b0c7217c72512 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/client/util/ClientConsistentHashSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/util/ClientConsistentHashSelfTest.java @@ -31,10 +31,14 @@ import java.util.TreeSet; import java.util.UUID; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for consistent hash management class. */ +@RunWith(JUnit4.class) public class ClientConsistentHashSelfTest extends GridCommonAbstractTest { /** Replicas count. */ private static final int REPLICAS = 512; @@ -44,6 +48,7 @@ public class ClientConsistentHashSelfTest extends GridCommonAbstractTest { * * @throws Exception In case of any exception. */ + @Test public void testCollisions() throws Exception { Map> map = new HashMap<>(); @@ -95,6 +100,7 @@ public void testCollisions() throws Exception { * * @throws Exception In case of any exception. */ + @Test public void testTreeSetRestrictions() throws Exception { // Constructs hash without explicit node's comparator. GridClientConsistentHash hash = new GridClientConsistentHash<>(); @@ -129,6 +135,7 @@ public void testTreeSetRestrictions() throws Exception { * Validate generated hashes.

    * Note! This test should be ported into all supported platforms. */ + @Test public void testHashGeneraton() { // Validate strings. checkHash("", -1484017934); @@ -167,6 +174,7 @@ public void testHashGeneraton() { /** * Test mapping to nodes. */ + @Test public void testMappingToNodes() { String n1 = "node #1"; String n2 = "node #2"; @@ -288,4 +296,4 @@ private void checkHash(Object o, int code) { assertEquals("Check affinity for object: " + o, code, i); } -} \ No newline at end of file +} diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/util/ClientJavaHasherSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/util/ClientJavaHasherSelfTest.java index 765c58d88eeca..432cd895ae43d 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/client/util/ClientJavaHasherSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/util/ClientJavaHasherSelfTest.java @@ -21,14 +21,19 @@ import java.util.Map; import java.util.UUID; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for Java hash codes calculations - SHOULD BE PORTED to other languages. */ +@RunWith(JUnit4.class) public class ClientJavaHasherSelfTest extends GridCommonAbstractTest { /** * Validate known Java hash codes. */ + @Test public void testPredefined() { Map map = new LinkedHashMap<>(); @@ -82,4 +87,4 @@ public void testPredefined() { fail("Java hash codes validation fails."); } -} \ No newline at end of file +} diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcBlobTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcBlobTest.java index 9e0e0d2f6aab1..1f1536f25cb8f 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcBlobTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcBlobTest.java @@ -22,14 +22,19 @@ import java.sql.SQLException; import java.util.Arrays; import junit.framework.TestCase; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class JdbcBlobTest extends TestCase { /** * @throws Exception If failed. */ + @Test public void testLength() throws Exception { JdbcBlob blob = new JdbcBlob(new byte[16]); @@ -50,6 +55,7 @@ public void testLength() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetBytes() throws Exception { byte[] arr = new byte[] {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; @@ -124,6 +130,7 @@ public void testGetBytes() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetBinaryStream() throws Exception { byte[] arr = new byte[] {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; @@ -150,6 +157,7 @@ public void testGetBinaryStream() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetBinaryStreamWithParams() throws Exception { byte[] arr = new byte[] {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; @@ -222,6 +230,7 @@ public void testGetBinaryStreamWithParams() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPositionBytePattern() throws Exception { byte[] arr = new byte[] {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; @@ -256,6 +265,7 @@ public void testPositionBytePattern() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPositionBlobPattern() throws Exception { byte[] arr = new byte[] {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; @@ -290,6 +300,7 @@ public void testPositionBlobPattern() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSetBytes() throws Exception { byte[] arr = new byte[] {0, 1, 2, 3, 4, 5, 6, 7}; @@ -341,6 +352,7 @@ public void testSetBytes() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSetBytesWithOffsetAndLength() throws Exception { byte[] arr = new byte[] {0, 1, 2, 3, 4, 5, 6, 7}; @@ -419,6 +431,7 @@ public void testSetBytesWithOffsetAndLength() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTruncate() throws Exception { byte[] arr = new byte[] {0, 1, 2, 3, 4, 5, 6, 7}; @@ -482,4 +495,4 @@ private static byte[] readBytes(InputStream is) throws IOException { return res; } -} \ No newline at end of file +} diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcBulkLoadSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcBulkLoadSelfTest.java index f6958ab723dd3..eb936e0133a17 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcBulkLoadSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcBulkLoadSelfTest.java @@ -37,12 +37,16 @@ import java.util.Collections; import java.util.Properties; import java.util.concurrent.Callable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteJdbcDriver.CFG_URL_PREFIX; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** COPY command test for the regular JDBC driver. */ +@RunWith(JUnit4.class) public class JdbcBulkLoadSelfTest extends GridCommonAbstractTest { /** JDBC URL. */ private static final String BASE_URL = CFG_URL_PREFIX + @@ -124,6 +128,7 @@ private Connection createConnection() throws Exception { * * @throws Exception if failed. */ + @Test public void testBulkLoadThrows() throws Exception { GridTestUtils.assertThrows(null, new Callable() { @Override public Object call() throws Exception { diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcComplexQuerySelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcComplexQuerySelfTest.java index 62b384069207e..93d74c11fad63 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcComplexQuerySelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcComplexQuerySelfTest.java @@ -33,6 +33,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteJdbcDriver.CFG_URL_PREFIX; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -42,6 +45,7 @@ /** * Tests for complex queries (joins, etc.). */ +@RunWith(JUnit4.class) public class JdbcComplexQuerySelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -131,6 +135,7 @@ protected CacheConfiguration cacheConfiguration(@NotNull String name, Class c /** * @throws Exception If failed. */ + @Test public void testJoin() throws Exception { ResultSet rs = stmt.executeQuery( "select p.id, p.name, o.name as orgName from \"pers\".Person p, \"org\".Organization o where p.orgId = o.id"); @@ -166,6 +171,7 @@ else if (id == 3) { /** * @throws Exception If failed. */ + @Test public void testJoinWithoutAlias() throws Exception { ResultSet rs = stmt.executeQuery( "select p.id, p.name, o.name from \"pers\".Person p, \"org\".Organization o where p.orgId = o.id"); @@ -204,6 +210,7 @@ else if (id == 3) { /** * @throws Exception If failed. */ + @Test public void testIn() throws Exception { ResultSet rs = stmt.executeQuery("select name from \"pers\".Person where age in (25, 35)"); @@ -224,6 +231,7 @@ public void testIn() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBetween() throws Exception { ResultSet rs = stmt.executeQuery("select name from \"pers\".Person where age between 24 and 36"); @@ -244,6 +252,7 @@ public void testBetween() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCalculatedValue() throws Exception { ResultSet rs = stmt.executeQuery("select age * 2 from \"pers\".Person"); diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcConnectionReopenTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcConnectionReopenTest.java index 531b4e52352f6..554626b059467 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcConnectionReopenTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcConnectionReopenTest.java @@ -22,12 +22,16 @@ import org.apache.ignite.Ignite; import org.apache.ignite.internal.IgnitionEx; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteJdbcDriver.CFG_URL_PREFIX; /** * Connection test. */ +@RunWith(JUnit4.class) public class JdbcConnectionReopenTest extends GridCommonAbstractTest { /** * @return Config URL to use in test. @@ -39,6 +43,7 @@ private String configURL() { /** * @throws Exception If failed. */ + @Test public void testReopenSameInstanceName() throws Exception { String url = CFG_URL_PREFIX + configURL(); diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcConnectionSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcConnectionSelfTest.java index d560d74a2c898..0fb66bc76d103 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcConnectionSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcConnectionSelfTest.java @@ -31,12 +31,16 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteJdbcDriver.CFG_URL_PREFIX; /** * Connection test. */ +@RunWith(JUnit4.class) public class JdbcConnectionSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -100,6 +104,7 @@ private CacheConfiguration cacheConfiguration(@NotNull String name) throws Excep /** * @throws Exception If failed. */ + @Test public void testDefaults() throws Exception { String url = CFG_URL_PREFIX + configURL(); @@ -117,6 +122,7 @@ public void testDefaults() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNodeId() throws Exception { String url = CFG_URL_PREFIX + "nodeId=" + grid(0).localNode().id() + '@' + configURL(); @@ -134,6 +140,7 @@ public void testNodeId() throws Exception { /** * @throws Exception If failed. */ + @Test public void testWrongNodeId() throws Exception { UUID wrongId = UUID.randomUUID(); @@ -156,6 +163,7 @@ public void testWrongNodeId() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientNodeId() throws Exception { client = true; @@ -182,6 +190,7 @@ public void testClientNodeId() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDaemonNodeId() throws Exception { daemon = true; @@ -208,6 +217,7 @@ public void testDaemonNodeId() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCustomCache() throws Exception { String url = CFG_URL_PREFIX + "cache=" + CUSTOM_CACHE_NAME + '@' + configURL(); @@ -219,6 +229,7 @@ public void testCustomCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testWrongCache() throws Exception { final String url = CFG_URL_PREFIX + "cache=wrongCacheName@" + configURL(); @@ -239,6 +250,7 @@ public void testWrongCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClose() throws Exception { String url = CFG_URL_PREFIX + configURL(); @@ -268,6 +280,7 @@ public void testClose() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxAllowedCommit() throws Exception { String url = CFG_URL_PREFIX + "transactionsAllowed=true@" + configURL(); @@ -285,6 +298,7 @@ public void testTxAllowedCommit() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxAllowedRollback() throws Exception { String url = CFG_URL_PREFIX + "transactionsAllowed=true@" + configURL(); @@ -302,6 +316,7 @@ public void testTxAllowedRollback() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSqlHints() throws Exception { try (final Connection conn = DriverManager.getConnection(CFG_URL_PREFIX + "enforceJoinOrder=true@" + configURL())) { diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcDeleteStatementSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcDeleteStatementSelfTest.java index 3eec5a025d947..5652fb1177368 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcDeleteStatementSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcDeleteStatementSelfTest.java @@ -21,14 +21,19 @@ import java.sql.SQLException; import java.util.Arrays; import java.util.HashSet; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class JdbcDeleteStatementSelfTest extends JdbcAbstractUpdateStatementSelfTest { /** * */ + @Test public void testExecute() throws SQLException { conn.createStatement().execute("delete from Person where cast(substring(_key, 2, 1) as int) % 2 = 0"); @@ -39,6 +44,7 @@ public void testExecute() throws SQLException { /** * */ + @Test public void testExecuteUpdate() throws SQLException { int res = conn.createStatement().executeUpdate("delete from Person where cast(substring(_key, 2, 1) as int) % 2 = 0"); @@ -51,6 +57,7 @@ public void testExecuteUpdate() throws SQLException { /** * */ + @Test public void testBatch() throws SQLException { PreparedStatement ps = conn.prepareStatement("delete from Person where firstName = ?"); diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcDistributedJoinsQueryTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcDistributedJoinsQueryTest.java index bcf61591a28ac..59e3bf446488e 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcDistributedJoinsQueryTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcDistributedJoinsQueryTest.java @@ -31,6 +31,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteJdbcDriver.CFG_URL_PREFIX; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -40,6 +43,7 @@ /** * Tests for complex queries with distributed joins enabled (joins, etc.). */ +@RunWith(JUnit4.class) public class JdbcDistributedJoinsQueryTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -116,6 +120,7 @@ public class JdbcDistributedJoinsQueryTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testJoin() throws Exception { ResultSet rs = stmt.executeQuery( "select p.id, p.name, o.name as orgName from Person p, Organization o where p.orgId = o.id"); @@ -151,6 +156,7 @@ else if (id == 3) { /** * @throws Exception If failed. */ + @Test public void testJoinWithoutAlias() throws Exception { ResultSet rs = stmt.executeQuery( "select p.id, p.name, o.name from Person p, Organization o where p.orgId = o.id"); @@ -189,6 +195,7 @@ else if (id == 3) { /** * @throws Exception If failed. */ + @Test public void testIn() throws Exception { ResultSet rs = stmt.executeQuery("select name from Person where age in (25, 35)"); @@ -209,6 +216,7 @@ public void testIn() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBetween() throws Exception { ResultSet rs = stmt.executeQuery("select name from Person where age between 24 and 36"); @@ -229,6 +237,7 @@ public void testBetween() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCalculatedValue() throws Exception { ResultSet rs = stmt.executeQuery("select age * 2 from Person"); diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcDynamicIndexAbstractSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcDynamicIndexAbstractSelfTest.java index 13efcdff96ad7..c5219dde065f1 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcDynamicIndexAbstractSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcDynamicIndexAbstractSelfTest.java @@ -31,10 +31,14 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.internal.util.typedef.F; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test that checks indexes handling with JDBC. */ +@RunWith(JUnit4.class) public abstract class JdbcDynamicIndexAbstractSelfTest extends JdbcAbstractDmlStatementSelfTest { /** */ private static final String CREATE_INDEX = "create index idx on Person (id desc)"; @@ -136,6 +140,7 @@ private Object getSingleValue(ResultSet rs) throws SQLException { /** * Test that after index creation index is used by queries. */ + @Test public void testCreateIndex() throws SQLException { assertSize(3); @@ -165,6 +170,7 @@ public void testCreateIndex() throws SQLException { /** * Test that creating an index with duplicate name yields an error. */ + @Test public void testCreateIndexWithDuplicateName() throws SQLException { jdbcRun(CREATE_INDEX); @@ -179,6 +185,7 @@ public void testCreateIndexWithDuplicateName() throws SQLException { /** * Test that creating an index with duplicate name does not yield an error with {@code IF NOT EXISTS}. */ + @Test public void testCreateIndexIfNotExists() throws SQLException { jdbcRun(CREATE_INDEX); @@ -189,6 +196,7 @@ public void testCreateIndexIfNotExists() throws SQLException { /** * Test that after index drop there are no attempts to use it, and data state remains intact. */ + @Test public void testDropIndex() throws SQLException { assertSize(3); @@ -218,6 +226,7 @@ public void testDropIndex() throws SQLException { /** * Test that dropping a non-existent index yields an error. */ + @Test public void testDropMissingIndex() { assertSqlException(new RunnableX() { /** {@inheritDoc} */ @@ -230,6 +239,7 @@ public void testDropMissingIndex() { /** * Test that dropping a non-existent index does not yield an error with {@code IF EXISTS}. */ + @Test public void testDropMissingIndexIfExists() throws SQLException { // Despite index missing, this does not yield an error. jdbcRun(DROP_INDEX_IF_EXISTS); @@ -238,6 +248,7 @@ public void testDropMissingIndexIfExists() throws SQLException { /** * Test that changes in cache affect index, and vice versa. */ + @Test public void testIndexState() throws SQLException { IgniteCache cache = cache(); diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcEmptyCacheSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcEmptyCacheSelfTest.java index 25b97ea1c17c6..13c4df32d7ecf 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcEmptyCacheSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcEmptyCacheSelfTest.java @@ -24,6 +24,9 @@ import org.apache.ignite.testframework.junits.common.*; import java.sql.*; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteJdbcDriver.*; import static org.apache.ignite.cache.CacheMode.*; @@ -32,6 +35,7 @@ /** * Tests for empty cache. */ +@RunWith(JUnit4.class) public class JdbcEmptyCacheSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -99,6 +103,7 @@ public class JdbcEmptyCacheSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testSelectNumber() throws Exception { ResultSet rs = stmt.executeQuery("select 1"); @@ -117,6 +122,7 @@ public void testSelectNumber() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSelectString() throws Exception { ResultSet rs = stmt.executeQuery("select 'str'"); diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcErrorsSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcErrorsSelfTest.java index 63f0c84a67f76..a701b91514670 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcErrorsSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcErrorsSelfTest.java @@ -22,10 +22,14 @@ import java.sql.SQLException; import org.apache.ignite.jdbc.JdbcErrorsAbstractSelfTest; import org.apache.ignite.lang.IgniteCallable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test SQLSTATE codes propagation with thin client driver. */ +@RunWith(JUnit4.class) public class JdbcErrorsSelfTest extends JdbcErrorsAbstractSelfTest { /** Path to JDBC configuration for node that is to start. */ private static final String CFG_PATH = "modules/clients/src/test/config/jdbc-config.xml"; @@ -40,6 +44,7 @@ public class JdbcErrorsSelfTest extends JdbcErrorsAbstractSelfTest { * due to communication problems (not due to clear misconfiguration). * @throws SQLException if failed. */ + @Test public void testConnectionError() throws SQLException { final String path = "jdbc:ignite:сfg://cache=test@/unknown/path"; @@ -56,6 +61,7 @@ public void testConnectionError() throws SQLException { * Test error code for the case when connection string is a mess. * @throws SQLException if failed. */ + @Test public void testInvalidConnectionStringFormat() throws SQLException { final String cfgPath = "cache="; diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcInsertStatementSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcInsertStatementSelfTest.java index 3c37871e6aa29..06801846a1556 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcInsertStatementSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcInsertStatementSelfTest.java @@ -28,10 +28,14 @@ import org.apache.ignite.cache.CachePeekMode; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Statement test. */ +@RunWith(JUnit4.class) public class JdbcInsertStatementSelfTest extends JdbcAbstractDmlStatementSelfTest { /** SQL query. */ private static final String SQL = "insert into Person(_key, id, firstName, lastName, age, data) values " + @@ -135,6 +139,7 @@ public class JdbcInsertStatementSelfTest extends JdbcAbstractDmlStatementSelfTes /** * @throws SQLException If failed. */ + @Test public void testExecuteUpdate() throws SQLException { int res = stmt.executeUpdate(SQL); @@ -144,6 +149,7 @@ public void testExecuteUpdate() throws SQLException { /** * @throws SQLException If failed. */ + @Test public void testExecute() throws SQLException { boolean res = stmt.execute(SQL); @@ -153,6 +159,7 @@ public void testExecute() throws SQLException { /** * */ + @Test public void testDuplicateKeys() { jcache(0).put("p2", new Person(2, "Joe", "Black", 35)); @@ -176,6 +183,7 @@ public void testDuplicateKeys() { /** * @throws SQLException if failed. */ + @Test public void testBatch() throws SQLException { formBatch(1, 2); formBatch(3, 4); @@ -188,6 +196,7 @@ public void testBatch() throws SQLException { /** * @throws SQLException if failed. */ + @Test public void testSingleItemBatch() throws SQLException { formBatch(1, 2); @@ -199,6 +208,7 @@ public void testSingleItemBatch() throws SQLException { /** * @throws SQLException if failed. */ + @Test public void testSingleItemBatchError() throws SQLException { formBatch(1, 2); @@ -222,6 +232,7 @@ public void testSingleItemBatchError() throws SQLException { /** * @throws SQLException if failed. */ + @Test public void testErrorAmidstBatch() throws SQLException { formBatch(1, 2); formBatch(3, 1); // Duplicate key @@ -247,6 +258,7 @@ public void testErrorAmidstBatch() throws SQLException { /** * @throws Exception If failed. */ + @Test public void testClearBatch() throws Exception { GridTestUtils.assertThrows(log, new Callable() { @Override public Object call() throws SQLException { diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcLocalCachesSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcLocalCachesSelfTest.java index 46379cba70b81..56ebb90630b88 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcLocalCachesSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcLocalCachesSelfTest.java @@ -29,6 +29,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteJdbcDriver.CFG_URL_PREFIX; import static org.apache.ignite.IgniteJdbcDriver.PROP_NODE_ID; @@ -38,6 +41,7 @@ /** * Test JDBC with several local caches. */ +@RunWith(JUnit4.class) public class JdbcLocalCachesSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -98,6 +102,7 @@ public class JdbcLocalCachesSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCache1() throws Exception { Properties cfg = new Properties(); @@ -129,6 +134,7 @@ public void testCache1() throws Exception { * * @throws Exception If failed. */ + @Test public void testCountAll() throws Exception { Properties cfg = new Properties(); @@ -154,6 +160,7 @@ public void testCountAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCache2() throws Exception { Properties cfg = new Properties(); diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcMergeStatementSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcMergeStatementSelfTest.java index 489bacd8ea906..b9fc04ec24426 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcMergeStatementSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcMergeStatementSelfTest.java @@ -23,10 +23,14 @@ import java.sql.Statement; import java.util.Arrays; import org.apache.ignite.cache.CachePeekMode; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * MERGE statement test. */ +@RunWith(JUnit4.class) public class JdbcMergeStatementSelfTest extends JdbcAbstractDmlStatementSelfTest { /** SQL query. */ private static final String SQL = "merge into Person(_key, id, firstName, lastName, age, data) values " + @@ -130,6 +134,7 @@ public class JdbcMergeStatementSelfTest extends JdbcAbstractDmlStatementSelfTest /** * @throws SQLException If failed. */ + @Test public void testExecuteUpdate() throws SQLException { int res = stmt.executeUpdate(SQL); @@ -139,6 +144,7 @@ public void testExecuteUpdate() throws SQLException { /** * @throws SQLException If failed. */ + @Test public void testExecute() throws SQLException { boolean res = stmt.execute(SQL); @@ -148,6 +154,7 @@ public void testExecute() throws SQLException { /** * @throws SQLException if failed. */ + @Test public void testBatch() throws SQLException { prepStmt.setString(1, "p1"); prepStmt.setInt(2, 1); diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcMetadataSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcMetadataSelfTest.java index b18e4d5aeddf9..e718cb6bfae71 100755 --- a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcMetadataSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcMetadataSelfTest.java @@ -52,6 +52,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.sql.Types.INTEGER; import static java.sql.Types.VARCHAR; @@ -65,6 +68,7 @@ /** * Metadata tests. */ +@RunWith(JUnit4.class) public class JdbcMetadataSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -145,6 +149,7 @@ protected CacheConfiguration cacheConfiguration(@NotNull String name) { /** * @throws Exception If failed. */ + @Test public void testResultSetMetaData() throws Exception { try (Connection conn = DriverManager.getConnection(BASE_URL)) { Statement stmt = conn.createStatement(); @@ -179,6 +184,7 @@ public void testResultSetMetaData() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDecimalAndDateTypeMetaData() throws Exception { try (Connection conn = DriverManager.getConnection(BASE_URL)) { Statement stmt = conn.createStatement(); @@ -213,6 +219,7 @@ public void testDecimalAndDateTypeMetaData() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetTables() throws Exception { try (Connection conn = DriverManager.getConnection(BASE_URL)) { DatabaseMetaData meta = conn.getMetaData(); @@ -254,6 +261,7 @@ public void testGetTables() throws Exception { * Negative scenarios for catalog name. * Perform metadata lookups, that use incorrect catalog names. */ + @Test public void testCatalogWithNotExistingName() throws SQLException { checkNoEntitiesFoundForCatalog(""); checkNoEntitiesFoundForCatalog("NOT_EXISTING_CATALOG"); @@ -305,6 +313,7 @@ private static void assertIsEmpty(ResultSet rs) throws SQLException { /** * @throws Exception If failed. */ + @Test public void testGetColumns() throws Exception { try (Connection conn = DriverManager.getConnection(BASE_URL)) { DatabaseMetaData meta = conn.getMetaData(); @@ -393,6 +402,7 @@ public void testGetColumns() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMetadataResultSetClose() throws Exception { try (Connection conn = DriverManager.getConnection(BASE_URL); ResultSet tbls = conn.getMetaData().getTables(null, null, "%", null)) { @@ -411,6 +421,7 @@ public void testMetadataResultSetClose() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIndexMetadata() throws Exception { try (Connection conn = DriverManager.getConnection(BASE_URL); ResultSet rs = conn.getMetaData().getIndexInfo(null, "pers", "PERSON", false, false)) { @@ -449,6 +460,7 @@ else if ("AGE".equals(field)) /** * @throws Exception If failed. */ + @Test public void testPrimaryKeyMetadata() throws Exception { try (Connection conn = DriverManager.getConnection(BASE_URL); ResultSet rs = conn.getMetaData().getPrimaryKeys(null, "pers", "PERSON")) { @@ -468,6 +480,7 @@ public void testPrimaryKeyMetadata() throws Exception { /** * @throws Exception If failed. */ + @Test public void testParametersMetadata() throws Exception { try (Connection conn = DriverManager.getConnection(BASE_URL)) { conn.setSchema("pers"); @@ -492,6 +505,7 @@ public void testParametersMetadata() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSchemasMetadata() throws Exception { try (Connection conn = DriverManager.getConnection(BASE_URL)) { ResultSet rs = conn.getMetaData().getSchemas(); @@ -514,6 +528,7 @@ public void testSchemasMetadata() throws Exception { /** * @throws Exception If failed. */ + @Test public void testVersions() throws Exception { try (Connection conn = DriverManager.getConnection(BASE_URL)) { assertEquals("Apache Ignite", conn.getMetaData().getDatabaseProductName()); diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcNoCacheStreamingSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcNoCacheStreamingSelfTest.java index e32e07036bb0a..e3bdfec4dded7 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcNoCacheStreamingSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcNoCacheStreamingSelfTest.java @@ -31,6 +31,9 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteJdbcDriver.CFG_URL_PREFIX; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -39,6 +42,7 @@ /** * Data streaming test for thick driver and no explicit caches. */ +@RunWith(JUnit4.class) public class JdbcNoCacheStreamingSelfTest extends GridCommonAbstractTest { /** JDBC URL. */ private static final String BASE_URL = CFG_URL_PREFIX + @@ -123,6 +127,7 @@ protected Connection createConnection(boolean allowOverwrite) throws Exception { /** * @throws Exception if failed. */ + @Test public void testStreamedInsert() throws Exception { for (int i = 10; i <= 100; i += 10) ignite(0).cache(DEFAULT_CACHE_NAME).put(i, i * 100); @@ -152,6 +157,7 @@ public void testStreamedInsert() throws Exception { /** * @throws Exception if failed. */ + @Test public void testStreamedInsertWithOverwritesAllowed() throws Exception { for (int i = 10; i <= 100; i += 10) ignite(0).cache(DEFAULT_CACHE_NAME).put(i, i * 100); diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcNoDefaultCacheTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcNoDefaultCacheTest.java index 5c549a82712b6..5e6cac65c8ab6 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcNoDefaultCacheTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcNoDefaultCacheTest.java @@ -32,12 +32,16 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteJdbcDriver.CFG_URL_PREFIX; /** * */ +@RunWith(JUnit4.class) public class JdbcNoDefaultCacheTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -102,6 +106,7 @@ private CacheConfiguration cacheConfiguration(@NotNull String name) throws Excep /** * @throws Exception If failed. */ + @Test public void testDefaults() throws Exception { String url = CFG_URL_PREFIX + CFG_URL; @@ -119,6 +124,7 @@ public void testDefaults() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNoCacheNameQuery() throws Exception { try ( Connection conn = DriverManager.getConnection(CFG_URL_PREFIX + CFG_URL); diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcPreparedStatementSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcPreparedStatementSelfTest.java index b6afc94d3c6fc..30f2fad167eb6 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcPreparedStatementSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcPreparedStatementSelfTest.java @@ -37,6 +37,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.sql.Types.BIGINT; import static java.sql.Types.BINARY; @@ -59,6 +62,7 @@ /** * Prepared statement test. */ +@RunWith(JUnit4.class) public class JdbcPreparedStatementSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -154,6 +158,7 @@ public class JdbcPreparedStatementSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRepeatableUsage() throws Exception { stmt = conn.prepareStatement("select * from TestObject where id = ?"); @@ -189,6 +194,7 @@ public void testRepeatableUsage() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBoolean() throws Exception { stmt = conn.prepareStatement("select * from TestObject where boolVal is not distinct from ?"); @@ -226,6 +232,7 @@ public void testBoolean() throws Exception { /** * @throws Exception If failed. */ + @Test public void testByte() throws Exception { stmt = conn.prepareStatement("select * from TestObject where byteVal is not distinct from ?"); @@ -263,6 +270,7 @@ public void testByte() throws Exception { /** * @throws Exception If failed. */ + @Test public void testShort() throws Exception { stmt = conn.prepareStatement("select * from TestObject where shortVal is not distinct from ?"); @@ -300,6 +308,7 @@ public void testShort() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInteger() throws Exception { stmt = conn.prepareStatement("select * from TestObject where intVal is not distinct from ?"); @@ -337,6 +346,7 @@ public void testInteger() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLong() throws Exception { stmt = conn.prepareStatement("select * from TestObject where longVal is not distinct from ?"); @@ -374,6 +384,7 @@ public void testLong() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFloat() throws Exception { stmt = conn.prepareStatement("select * from TestObject where floatVal is not distinct from ?"); @@ -411,6 +422,7 @@ public void testFloat() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDouble() throws Exception { stmt = conn.prepareStatement("select * from TestObject where doubleVal is not distinct from ?"); @@ -448,6 +460,7 @@ public void testDouble() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBigDecimal() throws Exception { stmt = conn.prepareStatement("select * from TestObject where bigVal is not distinct from ?"); @@ -485,6 +498,7 @@ public void testBigDecimal() throws Exception { /** * @throws Exception If failed. */ + @Test public void testString() throws Exception { stmt = conn.prepareStatement("select * from TestObject where strVal is not distinct from ?"); @@ -522,6 +536,7 @@ public void testString() throws Exception { /** * @throws Exception If failed. */ + @Test public void testArray() throws Exception { stmt = conn.prepareStatement("select * from TestObject where arrVal is not distinct from ?"); @@ -559,6 +574,7 @@ public void testArray() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBlob() throws Exception { stmt = conn.prepareStatement("select * from TestObject where blobVal is not distinct from ?"); @@ -600,6 +616,7 @@ public void testBlob() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDate() throws Exception { stmt = conn.prepareStatement("select * from TestObject where dateVal is not distinct from ?"); @@ -637,6 +654,7 @@ public void testDate() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTime() throws Exception { stmt = conn.prepareStatement("select * from TestObject where timeVal is not distinct from ?"); @@ -674,6 +692,7 @@ public void testTime() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTimestamp() throws Exception { stmt = conn.prepareStatement("select * from TestObject where tsVal is not distinct from ?"); @@ -711,6 +730,7 @@ public void testTimestamp() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUrl() throws Exception { stmt = conn.prepareStatement("select * from TestObject where urlVal is not distinct from ?"); diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcResultSetSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcResultSetSelfTest.java index 486af7f229516..3cbd46196bb42 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcResultSetSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcResultSetSelfTest.java @@ -45,6 +45,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteJdbcDriver.CFG_URL_PREFIX; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -55,6 +58,7 @@ * Result set test. */ @SuppressWarnings("FloatingPointEquality") +@RunWith(JUnit4.class) public class JdbcResultSetSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -164,6 +168,7 @@ private TestObject createObjectWithData(int id) throws MalformedURLException { /** * @throws Exception If failed. */ + @Test public void testBoolean() throws Exception { ResultSet rs = stmt.executeQuery(SQL); @@ -244,6 +249,7 @@ public void testBoolean() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBoolean2() throws Exception { ResultSet rs = stmt.executeQuery(SQL); @@ -264,6 +270,7 @@ public void testBoolean2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBoolean3() throws Exception { ResultSet rs = stmt.executeQuery(SQL); @@ -284,6 +291,7 @@ public void testBoolean3() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBoolean4() throws Exception { ResultSet rs = stmt.executeQuery(SQL); @@ -304,6 +312,7 @@ public void testBoolean4() throws Exception { /** * @throws Exception If failed. */ + @Test public void testByte() throws Exception { ResultSet rs = stmt.executeQuery(SQL); @@ -344,6 +353,7 @@ public void testByte() throws Exception { /** * @throws Exception If failed. */ + @Test public void testShort() throws Exception { ResultSet rs = stmt.executeQuery(SQL); @@ -384,6 +394,7 @@ public void testShort() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInteger() throws Exception { ResultSet rs = stmt.executeQuery(SQL); @@ -424,6 +435,7 @@ public void testInteger() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLong() throws Exception { ResultSet rs = stmt.executeQuery(SQL); @@ -464,6 +476,7 @@ public void testLong() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFloat() throws Exception { ResultSet rs = stmt.executeQuery(SQL); @@ -504,6 +517,7 @@ public void testFloat() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDouble() throws Exception { ResultSet rs = stmt.executeQuery(SQL); @@ -544,6 +558,7 @@ public void testDouble() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBigDecimal() throws Exception { ResultSet rs = stmt.executeQuery(SQL); @@ -584,6 +599,7 @@ public void testBigDecimal() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBigDecimalScale() throws Exception { assert "0.12".equals(convertStringToBigDecimalViaJdbc("0.1234", 2).toString()); assert "1.001".equals(convertStringToBigDecimalViaJdbc("1.0005", 3).toString()); @@ -608,6 +624,7 @@ private BigDecimal convertStringToBigDecimalViaJdbc(String strDec, int scale) th /** * @throws Exception If failed. */ + @Test public void testString() throws Exception { ResultSet rs = stmt.executeQuery(SQL); @@ -647,6 +664,7 @@ public void testString() throws Exception { /** * @throws Exception If failed. */ + @Test public void testArray() throws Exception { ResultSet rs = stmt.executeQuery(SQL); @@ -668,6 +686,7 @@ public void testArray() throws Exception { * @throws Exception If failed. */ @SuppressWarnings("deprecation") + @Test public void testDate() throws Exception { ResultSet rs = stmt.executeQuery(SQL); @@ -696,6 +715,7 @@ public void testDate() throws Exception { * @throws Exception If failed. */ @SuppressWarnings("deprecation") + @Test public void testTime() throws Exception { ResultSet rs = stmt.executeQuery(SQL); @@ -723,6 +743,7 @@ public void testTime() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTimestamp() throws Exception { ResultSet rs = stmt.executeQuery(SQL); @@ -750,6 +771,7 @@ public void testTimestamp() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUrl() throws Exception { ResultSet rs = stmt.executeQuery(SQL); @@ -770,6 +792,7 @@ public void testUrl() throws Exception { /** * @throws Exception If failed. */ + @Test public void testObject() throws Exception { final Ignite ignite = ignite(0); final boolean binaryMarshaller = ignite.configuration().getMarshaller() instanceof BinaryMarshaller; @@ -804,6 +827,7 @@ public void testObject() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNavigation() throws Exception { ResultSet rs = stmt.executeQuery("select * from TestObject where id > 0"); @@ -849,6 +873,7 @@ public void testNavigation() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFetchSize() throws Exception { stmt.setFetchSize(1); @@ -864,6 +889,7 @@ public void testFetchSize() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNewQueryTaskFetchSize() throws Exception { stmt.setFetchSize(1); @@ -883,6 +909,7 @@ public void testNewQueryTaskFetchSize() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFindColumn() throws Exception { final ResultSet rs = stmt.executeQuery(SQL); diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcSpringSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcSpringSelfTest.java index 7a29b13d7ee5f..f5ab95ccc0ef0 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcSpringSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcSpringSelfTest.java @@ -31,12 +31,16 @@ import org.apache.ignite.internal.util.spring.IgniteSpringHelper; import org.apache.ignite.resources.SpringApplicationContextResource; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteJdbcDriver.CFG_URL_PREFIX; /** * Test of cluster and JDBC driver with config that contains cache with POJO store and datasource bean. */ +@RunWith(JUnit4.class) public class JdbcSpringSelfTest extends JdbcConnectionSelfTest { /** Grid count. */ private static final int GRID_CNT = 2; @@ -61,6 +65,7 @@ public class JdbcSpringSelfTest extends JdbcConnectionSelfTest { } /** {@inheritDoc} */ + @Test @Override public void testClientNodeId() throws Exception { IgniteEx client = (IgniteEx) startGridWithSpringCtx(getTestIgniteInstanceName(), true, configURL()); @@ -96,6 +101,7 @@ private static class TestInjectTarget { * * @throws Exception If test failed. */ + @Test public void testSpringBean() throws Exception { String url = CFG_URL_PREFIX + configURL(); diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcStatementBatchingSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcStatementBatchingSelfTest.java index c9169b98a6bd7..88fe2358cabb3 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcStatementBatchingSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcStatementBatchingSelfTest.java @@ -23,10 +23,14 @@ import java.sql.Statement; import java.util.concurrent.Callable; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Statement batch test. */ +@RunWith(JUnit4.class) public class JdbcStatementBatchingSelfTest extends JdbcAbstractDmlStatementSelfTest { /** {@inheritDoc} */ @@ -39,6 +43,7 @@ public class JdbcStatementBatchingSelfTest extends JdbcAbstractDmlStatementSelfT /** * @throws SQLException If failed. */ + @Test public void testDatabaseMetadataBatchSupportFlag() throws SQLException { DatabaseMetaData meta = conn.getMetaData(); @@ -50,6 +55,7 @@ public void testDatabaseMetadataBatchSupportFlag() throws SQLException { /** * @throws SQLException If failed. */ + @Test public void testBatch() throws SQLException { try (Statement stmt = conn.createStatement()) { stmt.addBatch("INSERT INTO Person(_key, id, firstName, lastName, age, data) " + @@ -78,6 +84,7 @@ public void testBatch() throws SQLException { /** * @throws SQLException If failed. */ + @Test public void testErrorAmidstBatch() throws SQLException { BatchUpdateException reason = (BatchUpdateException) GridTestUtils.assertThrows(log, @@ -110,6 +117,7 @@ public void testErrorAmidstBatch() throws SQLException { /** * @throws Exception If failed. */ + @Test public void testClearBatch() throws Exception { try (Statement stmt = conn.createStatement()) { GridTestUtils.assertThrows(log, new Callable() { diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcStatementSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcStatementSelfTest.java index 2762b53ecd119..2e5ce85c24f19 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcStatementSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcStatementSelfTest.java @@ -32,6 +32,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteJdbcDriver.CFG_URL_PREFIX; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -40,6 +43,7 @@ /** * Statement test. */ +@RunWith(JUnit4.class) public class JdbcStatementSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -119,6 +123,7 @@ public class JdbcStatementSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testExecuteQuery() throws Exception { ResultSet rs = stmt.executeQuery(SQL); @@ -151,6 +156,7 @@ else if (id == 3) { /** * @throws Exception If failed. */ + @Test public void testExecute() throws Exception { assert stmt.execute(SQL); @@ -185,6 +191,7 @@ else if (id == 3) { /** * @throws Exception If failed. */ + @Test public void testMaxRows() throws Exception { stmt.setMaxRows(1); @@ -248,6 +255,7 @@ else if (id == 3) { /** * @throws Exception If failed. */ + @Test public void testExecuteQueryMultipleOnlyResultSets() throws Exception { assert conn.getMetaData().supportsMultipleResultSets(); @@ -276,6 +284,7 @@ public void testExecuteQueryMultipleOnlyResultSets() throws Exception { /** * @throws Exception If failed. */ + @Test public void testExecuteQueryMultipleOnlyDml() throws Exception { assert conn.getMetaData().supportsMultipleResultSets(); @@ -312,6 +321,7 @@ public void testExecuteQueryMultipleOnlyDml() throws Exception { /** * @throws Exception If failed. */ + @Test public void testExecuteQueryMultipleMixed() throws Exception { assert conn.getMetaData().supportsMultipleResultSets(); diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcStreamingSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcStreamingSelfTest.java index ab66a84440e1b..bd390ba413154 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcStreamingSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcStreamingSelfTest.java @@ -38,6 +38,9 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteJdbcDriver.CFG_URL_PREFIX; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -46,6 +49,7 @@ /** * Data streaming test. */ +@RunWith(JUnit4.class) public class JdbcStreamingSelfTest extends JdbcThinAbstractSelfTest { /** JDBC URL. */ private static final String BASE_URL = CFG_URL_PREFIX + @@ -163,6 +167,7 @@ protected Connection createStreamedConnection(boolean allowOverwrite, long flush /** * @throws Exception if failed. */ + @Test public void testStreamedInsert() throws Exception { for (int i = 10; i <= 100; i += 10) put(i, nameForId(i * 100)); @@ -193,6 +198,7 @@ public void testStreamedInsert() throws Exception { /** * @throws Exception if failed. */ + @Test public void testStreamedInsertWithoutColumnsList() throws Exception { for (int i = 10; i <= 100; i += 10) put(i, nameForId(i * 100)); @@ -223,6 +229,7 @@ public void testStreamedInsertWithoutColumnsList() throws Exception { /** * @throws Exception if failed. */ + @Test public void testStreamedInsertWithOverwritesAllowed() throws Exception { for (int i = 10; i <= 100; i += 10) put(i, nameForId(i * 100)); @@ -248,6 +255,7 @@ public void testStreamedInsertWithOverwritesAllowed() throws Exception { } /** */ + @Test public void testOnlyInsertsAllowed() { assertStatementForbidden("CREATE TABLE PUBLIC.X (x int primary key, y int)"); diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcStreamingToPublicCacheTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcStreamingToPublicCacheTest.java index 20fd0fbbe392f..e4491ae59d151 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcStreamingToPublicCacheTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcStreamingToPublicCacheTest.java @@ -31,6 +31,9 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteJdbcDriver.CFG_URL_PREFIX; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -39,6 +42,7 @@ /** * Data streaming test. */ +@RunWith(JUnit4.class) public class JdbcStreamingToPublicCacheTest extends GridCommonAbstractTest { /** JDBC URL. */ private static final String BASE_URL = CFG_URL_PREFIX + "cache=%s@modules/clients/src/test/config/jdbc-config.xml"; @@ -105,6 +109,7 @@ private Connection createConnection(String cacheName, boolean streaming) throws /** * @throws Exception if failed. */ + @Test public void testStreamedInsert() throws Exception { // Create table try (Connection conn = createConnection(DEFAULT_CACHE_NAME, false)) { diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcUpdateStatementSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcUpdateStatementSelfTest.java index 07b5587ffedde..3da079fae5ec2 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcUpdateStatementSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcUpdateStatementSelfTest.java @@ -22,14 +22,19 @@ import java.util.Arrays; import org.apache.ignite.cache.query.SqlFieldsQuery; import org.apache.ignite.internal.util.typedef.F; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class JdbcUpdateStatementSelfTest extends JdbcAbstractUpdateStatementSelfTest { /** * */ + @Test public void testExecute() throws SQLException { conn.createStatement().execute("update Person set firstName = 'Jack' where " + "cast(substring(_key, 2, 1) as int) % 2 = 0"); @@ -41,6 +46,7 @@ public void testExecute() throws SQLException { /** * */ + @Test public void testExecuteUpdate() throws SQLException { conn.createStatement().executeUpdate("update Person set firstName = 'Jack' where " + "cast(substring(_key, 2, 1) as int) % 2 = 0"); @@ -52,6 +58,7 @@ public void testExecuteUpdate() throws SQLException { /** * @throws SQLException If failed. */ + @Test public void testBatch() throws SQLException { PreparedStatement ps = conn.prepareStatement("update Person set lastName = concat(firstName, 'son') " + "where firstName = ?"); diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/ChangeStateCommandHandlerTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/ChangeStateCommandHandlerTest.java index cb882e7393c8f..a012139cdad29 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/ChangeStateCommandHandlerTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/ChangeStateCommandHandlerTest.java @@ -30,12 +30,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.client.GridClientProtocol.TCP; /** * */ +@RunWith(JUnit4.class) public class ChangeStateCommandHandlerTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -94,6 +98,7 @@ public class ChangeStateCommandHandlerTest extends GridCommonAbstractTest { /** * */ + @Test public void testActivateDeActivate() throws GridClientException { GridClientClusterState state = client.state(); diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/ClientMemcachedProtocolSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/ClientMemcachedProtocolSelfTest.java index f80b5e92a52e5..6f83f50e16b99 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/ClientMemcachedProtocolSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/ClientMemcachedProtocolSelfTest.java @@ -29,12 +29,16 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.util.typedef.F; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.junit.Assert.assertArrayEquals; /** * Tests for TCP binary protocol. */ +@RunWith(JUnit4.class) public class ClientMemcachedProtocolSelfTest extends AbstractRestProcessorSelfTest { /** Grid count. */ private static final int GRID_CNT = 1; @@ -92,6 +96,7 @@ private MemcachedClientIF startClient() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGet() throws Exception { jcache().put("getKey1", "getVal1"); jcache().put("getKey2", "getVal2"); @@ -104,6 +109,7 @@ public void testGet() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetBulk() throws Exception { jcache().put("getKey1", "getVal1"); jcache().put("getKey2", "getVal2"); @@ -122,6 +128,7 @@ public void testGetBulk() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSet() throws Exception { Assert.assertTrue(client.set("setKey", 0, "setVal").get()); @@ -131,6 +138,7 @@ public void testSet() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSetWithExpiration() throws Exception { Assert.assertTrue(client.set("setKey", 2000, "setVal").get()); @@ -144,6 +152,7 @@ public void testSetWithExpiration() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAdd() throws Exception { jcache().put("addKey1", "addVal1"); @@ -157,6 +166,7 @@ public void testAdd() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAddWithExpiration() throws Exception { Assert.assertTrue(client.add("addKey", 2000, "addVal").get()); @@ -170,6 +180,7 @@ public void testAddWithExpiration() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReplace() throws Exception { Assert.assertFalse(client.replace("replaceKey", 0, "replaceVal").get()); @@ -184,6 +195,7 @@ public void testReplace() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReplaceWithExpiration() throws Exception { jcache().put("replaceKey", "replaceVal"); @@ -199,6 +211,7 @@ public void testReplaceWithExpiration() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDelete() throws Exception { Assert.assertFalse(client.delete("deleteKey").get()); @@ -212,6 +225,7 @@ public void testDelete() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIncrement() throws Exception { Assert.assertEquals(5, client.incr("incrKey", 3, 2)); @@ -225,6 +239,7 @@ public void testIncrement() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDecrement() throws Exception { Assert.assertEquals(5, client.decr("decrKey", 10, 15)); @@ -238,6 +253,7 @@ public void testDecrement() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFlush() throws Exception { jcache().put("flushKey1", "flushVal1"); jcache().put("flushKey2", "flushVal2"); @@ -252,6 +268,7 @@ public void testFlush() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStat() throws Exception { jcache().put("statKey1", "statVal1"); assertEquals("statVal1", jcache().get("statKey1")); @@ -283,6 +300,7 @@ public void testStat() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAppend() throws Exception { Assert.assertFalse(client.append(0, "appendKey", "_suffix").get()); @@ -298,6 +316,7 @@ public void testAppend() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPrepend() throws Exception { Assert.assertFalse(client.append(0, "prependKey", "_suffix").get()); @@ -313,6 +332,7 @@ public void testPrepend() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSpecialTypes() throws Exception { Assert.assertTrue(client.set("boolKey", 0, true).get()); @@ -361,6 +381,7 @@ public void testSpecialTypes() throws Exception { /** * @throws Exception If failed. */ + @Test public void testComplexObject() throws Exception { Assert.assertTrue(client.set("objKey", 0, new ValueObject(10, "String")).get()); @@ -370,6 +391,7 @@ public void testComplexObject() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCustomPort() throws Exception { customPort = 11212; @@ -392,6 +414,7 @@ public void testCustomPort() throws Exception { /** * @throws Exception If failed. */ + @Test public void testVersion() throws Exception { Map map = client.getVersions(); diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java index 81f0a36fb32ff..46416beea83f1 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java @@ -137,6 +137,9 @@ import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.lang.IgniteUuid; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -152,6 +155,7 @@ * Tests for Jetty REST protocol. */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public abstract class JettyRestProcessorAbstractSelfTest extends JettyRestProcessorCommonSelfTest { /** Used to sent request charset. */ private static final String CHARSET = StandardCharsets.UTF_8.name(); @@ -287,6 +291,7 @@ protected JsonNode jsonTaskResult(String content) throws IOException { /** * @throws Exception If failed. */ + @Test public void testGet() throws Exception { jcache().put("getKey", "getVal"); @@ -315,6 +320,7 @@ private void checkJson(String json, Person p) throws IOException { /** * @throws Exception If failed. */ + @Test public void testGetBinaryObjects() throws Exception { Person p = new Person(1, "John", "Doe", 300); @@ -411,6 +417,7 @@ public void testGetBinaryObjects() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNullMapKeyAndValue() throws Exception { Map map1 = new HashMap<>(); map1.put(null, null); @@ -444,6 +451,7 @@ public void testNullMapKeyAndValue() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSimpleObject() throws Exception { SimplePerson p = new SimplePerson(1, "Test", java.sql.Date.valueOf("1977-01-26"), 1000.55, 39, "CIO", 25); @@ -467,6 +475,7 @@ public void testSimpleObject() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDate() throws Exception { java.util.Date utilDate = new java.util.Date(); @@ -504,6 +513,7 @@ public void testDate() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUUID() throws Exception { UUID uuid = UUID.randomUUID(); @@ -529,6 +539,7 @@ public void testUUID() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTuple() throws Exception { T2 t = new T2("key", "value"); @@ -547,6 +558,7 @@ public void testTuple() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheSize() throws Exception { jcache().removeAll(); @@ -562,6 +574,7 @@ public void testCacheSize() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIgniteName() throws Exception { String ret = content(null, GridRestCommand.NAME); @@ -617,6 +630,7 @@ private void checkGetOrCreateAndDestroy( /** * @throws Exception If failed. */ + @Test public void testGetOrCreateCache() throws Exception { checkGetOrCreateAndDestroy("testCache", PARTITIONED, 0, FULL_SYNC, null, null); @@ -666,6 +680,7 @@ public void testGetOrCreateCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetAll() throws Exception { final Map entries = F.asMap("getKey1", "getVal1", "getKey2", "getVal2"); @@ -688,6 +703,7 @@ public void testGetAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIncorrectPut() throws Exception { String ret = content(DEFAULT_CACHE_NAME, GridRestCommand.CACHE_PUT, "key", "key0"); @@ -698,6 +714,7 @@ public void testIncorrectPut() throws Exception { /** * @throws Exception If failed. */ + @Test public void testContainsKey() throws Exception { grid(0).cache(DEFAULT_CACHE_NAME).put("key0", "val0"); @@ -709,6 +726,7 @@ public void testContainsKey() throws Exception { /** * @throws Exception If failed. */ + @Test public void testContainsKeys() throws Exception { grid(0).cache(DEFAULT_CACHE_NAME).put("key0", "val0"); grid(0).cache(DEFAULT_CACHE_NAME).put("key1", "val1"); @@ -724,6 +742,7 @@ public void testContainsKeys() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetAndPut() throws Exception { grid(0).cache(DEFAULT_CACHE_NAME).put("key0", "val0"); @@ -740,6 +759,7 @@ public void testGetAndPut() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetAndPutIfAbsent() throws Exception { grid(0).cache(DEFAULT_CACHE_NAME).put("key0", "val0"); @@ -756,6 +776,7 @@ public void testGetAndPutIfAbsent() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutIfAbsent2() throws Exception { String ret = content(DEFAULT_CACHE_NAME, GridRestCommand.CACHE_PUT_IF_ABSENT, "key", "key0", @@ -770,6 +791,7 @@ public void testPutIfAbsent2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemoveValue() throws Exception { grid(0).cache(DEFAULT_CACHE_NAME).put("key0", "val0"); @@ -795,6 +817,7 @@ public void testRemoveValue() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetAndRemove() throws Exception { grid(0).cache(DEFAULT_CACHE_NAME).put("key0", "val0"); @@ -808,6 +831,7 @@ public void testGetAndRemove() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReplaceValue() throws Exception { grid(0).cache(DEFAULT_CACHE_NAME).put("key0", "val0"); @@ -835,6 +859,7 @@ public void testReplaceValue() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetAndReplace() throws Exception { grid(0).cache(DEFAULT_CACHE_NAME).put("key0", "val0"); @@ -851,6 +876,7 @@ public void testGetAndReplace() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeactivateActivate() throws Exception { assertClusterState(true); @@ -867,6 +893,7 @@ public void testDeactivateActivate() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPut() throws Exception { String ret = content(DEFAULT_CACHE_NAME, GridRestCommand.CACHE_PUT, "key", "putKey", @@ -883,6 +910,7 @@ public void testPut() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutWithExpiration() throws Exception { String ret = content(DEFAULT_CACHE_NAME, GridRestCommand.CACHE_PUT, "key", "putKey", @@ -902,6 +930,7 @@ public void testPutWithExpiration() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAdd() throws Exception { jcache().put("addKey1", "addVal1"); @@ -919,6 +948,7 @@ public void testAdd() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAddWithExpiration() throws Exception { String ret = content(DEFAULT_CACHE_NAME, GridRestCommand.CACHE_ADD, "key", "addKey", @@ -938,6 +968,7 @@ public void testAddWithExpiration() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAll() throws Exception { String ret = content(DEFAULT_CACHE_NAME, GridRestCommand.CACHE_PUT_ALL, "k1", "putKey1", @@ -957,6 +988,7 @@ public void testPutAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemove() throws Exception { jcache().put("rmvKey", "rmvVal"); @@ -974,6 +1006,7 @@ public void testRemove() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemoveAll() throws Exception { jcache().put("rmvKey1", "rmvVal1"); jcache().put("rmvKey2", "rmvVal2"); @@ -1015,6 +1048,7 @@ public void testRemoveAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCas() throws Exception { jcache().put("casKey", "casOldVal"); @@ -1038,6 +1072,7 @@ public void testCas() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReplace() throws Exception { jcache().put("repKey", "repOldVal"); @@ -1058,6 +1093,7 @@ public void testReplace() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReplaceWithExpiration() throws Exception { jcache().put("replaceKey", "replaceVal"); @@ -1082,6 +1118,7 @@ public void testReplaceWithExpiration() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAppend() throws Exception { jcache().put("appendKey", "appendVal"); @@ -1098,6 +1135,7 @@ public void testAppend() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPrepend() throws Exception { jcache().put("prependKey", "prependVal"); @@ -1114,6 +1152,7 @@ public void testPrepend() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIncrement() throws Exception { String ret = content(DEFAULT_CACHE_NAME, GridRestCommand.ATOMIC_INCREMENT, "key", "incrKey", @@ -1140,6 +1179,7 @@ public void testIncrement() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDecrement() throws Exception { String ret = content(DEFAULT_CACHE_NAME, GridRestCommand.ATOMIC_DECREMENT, "key", "decrKey", @@ -1166,6 +1206,7 @@ public void testDecrement() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCar() throws Exception { jcache().put("casKey", "casOldVal"); @@ -1186,6 +1227,7 @@ public void testCar() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutIfAbsent() throws Exception { assertNull(jcache().localPeek("casKey")); @@ -1204,6 +1246,7 @@ public void testPutIfAbsent() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCasRemove() throws Exception { jcache().put("casKey", "casVal"); @@ -1221,6 +1264,7 @@ public void testCasRemove() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMetrics() throws Exception { String ret = content(DEFAULT_CACHE_NAME, GridRestCommand.CACHE_METRICS); @@ -1310,6 +1354,7 @@ private void testMetadata(Collection metas, JsonNode arr) /** * @throws Exception If failed. */ + @Test public void testMetadataLocal() throws Exception { IgniteCacheProxy cache = F.first(grid(0).context().cache().publicCaches()); @@ -1351,6 +1396,7 @@ public void testMetadataLocal() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMetadataRemote() throws Exception { CacheConfiguration partialCacheCfg = new CacheConfiguration<>("partial"); @@ -1390,6 +1436,7 @@ public void testMetadataRemote() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTopology() throws Exception { String ret = content(null, GridRestCommand.TOPOLOGY, "attr", "false", @@ -1456,6 +1503,7 @@ public void testTopology() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNode() throws Exception { String ret = content(null, GridRestCommand.NODE, "attr", "true", @@ -1526,6 +1574,7 @@ public void testNode() throws Exception { * * @throws Exception If failed. */ + @Test public void testExe() throws Exception { String ret = content(DEFAULT_CACHE_NAME, GridRestCommand.EXE); @@ -1571,6 +1620,7 @@ public void testExe() throws Exception { * * @throws Exception If failed. */ + @Test public void testVisorGateway() throws Exception { ClusterNode locNode = grid(1).localNode(); @@ -1928,6 +1978,7 @@ public void testVisorGateway() throws Exception { /** * @throws Exception If failed. */ + @Test public void testVersion() throws Exception { String ret = content(null, GridRestCommand.VERSION); @@ -1939,6 +1990,7 @@ public void testVersion() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryArgs() throws Exception { String qry = "salary > ? and salary <= ?"; @@ -1960,6 +2012,7 @@ public void testQueryArgs() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryScan() throws Exception { String ret = content("person", GridRestCommand.EXECUTE_SCAN_QUERY, "pageSize", "10", @@ -1976,6 +2029,7 @@ public void testQueryScan() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFilterQueryScan() throws Exception { String ret = content("person", GridRestCommand.EXECUTE_SCAN_QUERY, "pageSize", "10", @@ -1992,6 +2046,7 @@ public void testFilterQueryScan() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIncorrectFilterQueryScan() throws Exception { String clsName = ScanFilter.class.getName() + 1; @@ -2006,6 +2061,7 @@ public void testIncorrectFilterQueryScan() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQuery() throws Exception { grid(0).cache(DEFAULT_CACHE_NAME).put("1", "1"); grid(0).cache(DEFAULT_CACHE_NAME).put("2", "2"); @@ -2051,6 +2107,7 @@ public void testQuery() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDistributedJoinsQuery() throws Exception { String qry = "select * from Person, \"organization\".Organization " + "where \"organization\".Organization.id = Person.orgId " + @@ -2074,6 +2131,7 @@ public void testDistributedJoinsQuery() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSqlFieldsQuery() throws Exception { String qry = "select concat(firstName, ' ', lastName) from Person"; @@ -2092,6 +2150,7 @@ public void testSqlFieldsQuery() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDistributedJoinsSqlFieldsQuery() throws Exception { String qry = "select * from \"person\".Person p, \"organization\".Organization o where o.id = p.orgId"; @@ -2111,6 +2170,7 @@ public void testDistributedJoinsSqlFieldsQuery() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSqlFieldsMetadataQuery() throws Exception { String qry = "select firstName, lastName from Person"; @@ -2141,6 +2201,7 @@ public void testSqlFieldsMetadataQuery() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryClose() throws Exception { String qry = "salary > ? and salary <= ?"; @@ -2170,6 +2231,7 @@ public void testQueryClose() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryDelay() throws Exception { String qry = "salary > ? and salary <= ?"; @@ -2232,6 +2294,7 @@ private void putTypedValue(String type, String k, String v, int status) throws E /** * @throws Exception If failed. */ + @Test public void testTypedPut() throws Exception { // Test boolean type. putTypedValue("boolean", "true", "false", STATUS_SUCCESS); @@ -2409,6 +2472,7 @@ private void getTypedValue(String keyType, String k, String exp) throws Exceptio /** * @throws Exception If failed. */ + @Test public void testTypedGet() throws Exception { // Test boolean type. IgniteCache cBool = typedCache(); diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAuthenticationAbstractTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAuthenticationAbstractTest.java index 8f99cdb0ae2e3..351d23736c9dc 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAuthenticationAbstractTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAuthenticationAbstractTest.java @@ -26,12 +26,16 @@ import org.apache.ignite.internal.processors.authentication.IgniteAuthenticationProcessor; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.configuration.WALMode.NONE; /** * Test REST with enabled authentication. */ +@RunWith(JUnit4.class) public abstract class JettyRestProcessorAuthenticationAbstractTest extends JettyRestProcessorUnsignedSelfTest { /** */ protected static final String DFLT_USER = "ignite"; @@ -90,6 +94,7 @@ public abstract class JettyRestProcessorAuthenticationAbstractTest extends Jetty /** * @throws Exception If failed. */ + @Test public void testAuthenticationCommand() throws Exception { String ret = content(null, GridRestCommand.AUTHENTICATE); @@ -99,6 +104,7 @@ public void testAuthenticationCommand() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAddUpdateRemoveUser() throws Exception { // Add user. String ret = content(null, GridRestCommand.ADD_USER, diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAuthenticationWithTokenSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAuthenticationWithTokenSelfTest.java index 0a1b6b9d802f1..bf2ddac9b0f1b 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAuthenticationWithTokenSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAuthenticationWithTokenSelfTest.java @@ -18,10 +18,14 @@ package org.apache.ignite.internal.processors.rest; import org.apache.ignite.internal.util.typedef.F; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test REST with enabled authentication and token. */ +@RunWith(JUnit4.class) public class JettyRestProcessorAuthenticationWithTokenSelfTest extends JettyRestProcessorAuthenticationAbstractTest { /** */ private String tok = ""; @@ -56,6 +60,7 @@ public class JettyRestProcessorAuthenticationWithTokenSelfTest extends JettyRest /** * @throws Exception If failed. */ + @Test public void testInvalidSessionToken() throws Exception { tok = null; diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorGetAllAsArrayTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorGetAllAsArrayTest.java index 521d7c18e9916..3017d87a558ca 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorGetAllAsArrayTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorGetAllAsArrayTest.java @@ -22,11 +22,15 @@ import java.util.Map; import java.util.Set; import org.apache.ignite.internal.util.typedef.F; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_REST_GETALL_AS_ARRAY; import static org.apache.ignite.internal.processors.rest.GridRestResponse.STATUS_SUCCESS; /** */ +@RunWith(JUnit4.class) public class JettyRestProcessorGetAllAsArrayTest extends JettyRestProcessorCommonSelfTest { /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { @@ -45,6 +49,7 @@ public class JettyRestProcessorGetAllAsArrayTest extends JettyRestProcessorCommo /** * @throws Exception If failed. */ + @Test public void testGetAll() throws Exception { final Map entries = F.asMap("getKey1", "getVal1", "getKey2", "getVal2"); diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorSignedSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorSignedSelfTest.java index 3be99b489eef3..b5860dccd8344 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorSignedSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorSignedSelfTest.java @@ -25,10 +25,14 @@ import java.util.Base64; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.util.typedef.internal.U; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class JettyRestProcessorSignedSelfTest extends JettyRestProcessorAbstractSelfTest { /** */ protected static final String REST_SECRET_KEY = "secret-key"; @@ -52,6 +56,7 @@ public class JettyRestProcessorSignedSelfTest extends JettyRestProcessorAbstract /** * @throws Exception If failed. */ + @Test public void testUnauthorized() throws Exception { String addr = "http://" + LOC_HOST + ":" + restPort() + "/ignite?cacheName=default&cmd=top"; diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/RestBinaryProtocolSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/RestBinaryProtocolSelfTest.java index 8d9fe7762d5ee..3fe693d02b297 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/RestBinaryProtocolSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/RestBinaryProtocolSelfTest.java @@ -45,6 +45,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.LOCAL; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -53,6 +56,7 @@ * TCP protocol test. */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class RestBinaryProtocolSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -139,6 +143,7 @@ private TestBinaryClient client() throws IgniteCheckedException { /** * @throws Exception If failed. */ + @Test public void testPut() throws Exception { assertTrue(client.cachePut(DEFAULT_CACHE_NAME, "key1", "val1")); assertEquals("val1", grid().cache(DEFAULT_CACHE_NAME).get("key1")); @@ -150,6 +155,7 @@ public void testPut() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutAll() throws Exception { client.cachePutAll(DEFAULT_CACHE_NAME, F.asMap("key1", "val1", "key2", "val2")); @@ -171,6 +177,7 @@ public void testPutAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGet() throws Exception { grid().cache(DEFAULT_CACHE_NAME).put("key", "val"); @@ -184,6 +191,7 @@ public void testGet() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFailure() throws Exception { IgniteKernal kernal = ((IgniteKernal)grid()); @@ -219,6 +227,7 @@ public void testFailure() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetAll() throws Exception { IgniteCache jcacheDflt = grid().cache(DEFAULT_CACHE_NAME); IgniteCache jcacheName = grid().cache(CACHE_NAME); @@ -263,6 +272,7 @@ public void testGetAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemove() throws Exception { IgniteCache jcacheDflt = grid().cache(DEFAULT_CACHE_NAME); IgniteCache jcacheName = grid().cache(CACHE_NAME); @@ -286,6 +296,7 @@ public void testRemove() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemoveAll() throws Exception { IgniteCache jcacheDflt = grid().cache(DEFAULT_CACHE_NAME); @@ -319,6 +330,7 @@ public void testRemoveAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReplace() throws Exception { assertFalse(client.cacheReplace(DEFAULT_CACHE_NAME, "key1", "val1")); @@ -341,6 +353,7 @@ public void testReplace() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCompareAndSet() throws Exception { assertFalse(client.cacheCompareAndSet(DEFAULT_CACHE_NAME, "key", null, null)); @@ -403,6 +416,7 @@ public void testCompareAndSet() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMetrics() throws Exception { IgniteCache jcacheDft = grid().cache(DEFAULT_CACHE_NAME); IgniteCache jcacheName = grid().cache(CACHE_NAME); @@ -445,6 +459,7 @@ public void testMetrics() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAppend() throws Exception { grid().cache(DEFAULT_CACHE_NAME).remove("key"); grid().cache(CACHE_NAME).remove("key"); @@ -469,6 +484,7 @@ public void testAppend() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPrepend() throws Exception { grid().cache(DEFAULT_CACHE_NAME).remove("key"); grid().cache(CACHE_NAME).remove("key"); @@ -493,6 +509,7 @@ public void testPrepend() throws Exception { /** * @throws Exception If failed. */ + @Test public void testExecute() throws Exception { GridClientTaskResultBean res = client.execute(TestTask.class.getName(), Arrays.asList("executing", 3, "test", 5, "task")); @@ -504,6 +521,7 @@ public void testExecute() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNode() throws Exception { assertNull(client.node(UUID.randomUUID(), false, false)); assertNull(client.node("wrongHost", false, false)); @@ -548,6 +566,7 @@ public void testNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTopology() throws Exception { List top = client.topology(true, true); @@ -613,4 +632,4 @@ private static class TestTask extends ComputeTaskSplitAdapter, Inte return sum; } } -} \ No newline at end of file +} diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/RestMemcacheProtocolSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/RestMemcacheProtocolSelfTest.java index 8b6c2bfa783cf..26a5f8fcf39b0 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/RestMemcacheProtocolSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/RestMemcacheProtocolSelfTest.java @@ -28,6 +28,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.LOCAL; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -35,6 +38,7 @@ /** * TCP protocol test. */ +@RunWith(JUnit4.class) public class RestMemcacheProtocolSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -121,6 +125,7 @@ private TestMemcacheClient client() throws IgniteCheckedException { /** * @throws Exception If failed. */ + @Test public void testPut() throws Exception { assertTrue(client.cachePut(null, "key1", "val1")); assertEquals("val1", grid().cache(DEFAULT_CACHE_NAME).get("key1")); @@ -132,6 +137,7 @@ public void testPut() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGet() throws Exception { grid().cache(DEFAULT_CACHE_NAME).put("key", "val"); @@ -145,6 +151,7 @@ public void testGet() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemove() throws Exception { grid().cache(DEFAULT_CACHE_NAME).put("key", "val"); @@ -164,6 +171,7 @@ public void testRemove() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAdd() throws Exception { assertTrue(client.cacheAdd(null, "key", "val")); assertEquals("val", grid().cache(DEFAULT_CACHE_NAME).get("key")); @@ -179,6 +187,7 @@ public void testAdd() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReplace() throws Exception { assertFalse(client.cacheReplace(null, "key1", "val1")); grid().cache(DEFAULT_CACHE_NAME).put("key1", "val1"); @@ -198,6 +207,7 @@ public void testReplace() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMetrics() throws Exception { grid().cache(DEFAULT_CACHE_NAME).localMxBean().clear(); grid().cache(CACHE_NAME).localMxBean().clear(); @@ -236,6 +246,7 @@ public void testMetrics() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIncrement() throws Exception { assertEquals(15L, client().increment("key", 10L, 5L)); assertEquals(15L, grid().atomicLong("key", 0, true).get()); @@ -259,6 +270,7 @@ public void testIncrement() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDecrement() throws Exception { assertEquals(15L, client().decrement("key", 20L, 5L)); assertEquals(15L, grid().atomicLong("key", 0, true).get()); @@ -282,6 +294,7 @@ public void testDecrement() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAppend() throws Exception { assertFalse(client.cacheAppend(null, "wrongKey", "_suffix")); assertFalse(client.cacheAppend(CACHE_NAME, "wrongKey", "_suffix")); @@ -298,6 +311,7 @@ public void testAppend() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPrepend() throws Exception { assertFalse(client.cachePrepend(null, "wrongKey", "prefix_")); assertFalse(client.cachePrepend(CACHE_NAME, "wrongKey", "prefix_")); @@ -314,6 +328,7 @@ public void testPrepend() throws Exception { /** * @throws Exception If failed. */ + @Test public void testVersion() throws Exception { assertNotNull(client.version()); } @@ -321,6 +336,7 @@ public void testVersion() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNoop() throws Exception { client.noop(); } @@ -328,7 +344,8 @@ public void testNoop() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQuit() throws Exception { client.quit(); } -} \ No newline at end of file +} diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/RestProcessorMultiStartSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/RestProcessorMultiStartSelfTest.java index 24274d77d55b7..9be68b13d4085 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/RestProcessorMultiStartSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/RestProcessorMultiStartSelfTest.java @@ -22,10 +22,14 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Rest processor test. */ +@RunWith(JUnit4.class) public class RestProcessorMultiStartSelfTest extends GridCommonAbstractTest { /** */ private static final int GRID_CNT = 3; @@ -55,6 +59,7 @@ public class RestProcessorMultiStartSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testMultiStart() throws Exception { try { for (int i = 0; i < GRID_CNT; i++) @@ -72,6 +77,7 @@ public void testMultiStart() throws Exception { * * @throws Exception If failed. */ + @Test public void testMultiStartWithClient() throws Exception { try { int clnIdx = GRID_CNT - 1; diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/RestProcessorStartSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/RestProcessorStartSelfTest.java index 477c41ab35bbc..6026785cc1001 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/RestProcessorStartSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/RestProcessorStartSelfTest.java @@ -35,10 +35,14 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class RestProcessorStartSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -92,6 +96,7 @@ public class RestProcessorStartSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testTcpStart() throws Exception { GridClientConfiguration clCfg = new GridClientConfiguration(); @@ -165,4 +170,4 @@ private class TestDiscoverySpi extends TcpDiscoverySpi { super.spiStart(igniteInstanceName); } } -} \ No newline at end of file +} diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/TaskCommandHandlerSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/TaskCommandHandlerSelfTest.java index c28da5fb0d6b7..68b5c4cd0e253 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/TaskCommandHandlerSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/TaskCommandHandlerSelfTest.java @@ -47,6 +47,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.NotNull; import org.jsr166.ConcurrentLinkedHashMap; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.LOCAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -57,6 +60,7 @@ /** * Test for {@code GridTaskCommandHandler} */ +@RunWith(JUnit4.class) public class TaskCommandHandlerSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -163,6 +167,7 @@ private GridClientConfiguration clientConfiguration() { /** * @throws Exception If failed. */ + @Test public void testManyTasksRun() throws Exception { GridClientCompute compute = client.compute(); @@ -220,4 +225,4 @@ private static class TestTask extends ComputeTaskSplitAdapter { return sum; } } -} \ No newline at end of file +} diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/TcpRestUnmarshalVulnerabilityTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/TcpRestUnmarshalVulnerabilityTest.java index 92d824be329db..cbb14ffaaa1c3 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/TcpRestUnmarshalVulnerabilityTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/TcpRestUnmarshalVulnerabilityTest.java @@ -38,6 +38,9 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_MARSHALLER_BLACKLIST; import static org.apache.ignite.IgniteSystemProperties.IGNITE_MARSHALLER_WHITELIST; @@ -47,6 +50,7 @@ /** * Tests for whitelist and blacklist ot avoiding deserialization vulnerability. */ +@RunWith(JUnit4.class) public class TcpRestUnmarshalVulnerabilityTest extends GridCommonAbstractTest { /** Marshaller. */ private static final GridClientJdkMarshaller MARSH = new GridClientJdkMarshaller(); @@ -89,6 +93,7 @@ public class TcpRestUnmarshalVulnerabilityTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testNoLists() throws Exception { testExploit(true); } @@ -96,6 +101,7 @@ public void testNoLists() throws Exception { /** * @throws Exception If failed. */ + @Test public void testWhiteListIncluded() throws Exception { String path = U.resolveIgnitePath("modules/core/src/test/config/class_list_exploit_included.txt").getPath(); @@ -107,6 +113,7 @@ public void testWhiteListIncluded() throws Exception { /** * @throws Exception If failed. */ + @Test public void testWhiteListExcluded() throws Exception { String path = U.resolveIgnitePath("modules/core/src/test/config/class_list_exploit_excluded.txt").getPath(); @@ -118,6 +125,7 @@ public void testWhiteListExcluded() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBlackListIncluded() throws Exception { String path = U.resolveIgnitePath("modules/core/src/test/config/class_list_exploit_included.txt").getPath(); @@ -129,6 +137,7 @@ public void testBlackListIncluded() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBlackListExcluded() throws Exception { String path = U.resolveIgnitePath("modules/core/src/test/config/class_list_exploit_excluded.txt").getPath(); @@ -140,6 +149,7 @@ public void testBlackListExcluded() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBothListIncluded() throws Exception { String path = U.resolveIgnitePath("modules/core/src/test/config/class_list_exploit_included.txt").getPath(); @@ -266,4 +276,4 @@ private void readObject(ObjectInputStream is) throws ClassNotFoundException, IOE // No-op. } } -} \ No newline at end of file +} diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/protocols/tcp/TcpRestParserSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/protocols/tcp/TcpRestParserSelfTest.java index fecd2b977bbdf..e230ad4414552 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/protocols/tcp/TcpRestParserSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/protocols/tcp/TcpRestParserSelfTest.java @@ -34,6 +34,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.processors.rest.client.message.GridClientCacheRequest.GridCacheOperation.CAS; import static org.apache.ignite.internal.processors.rest.protocols.tcp.GridMemcachedMessage.IGNITE_HANDSHAKE_FLAG; @@ -45,6 +48,7 @@ * This class tests that parser confirms memcache extended specification. */ @SuppressWarnings("TypeMayBeWeakened") +@RunWith(JUnit4.class) public class TcpRestParserSelfTest extends GridCommonAbstractTest { /** Marshaller. */ private GridClientMarshaller marshaller = new GridClientOptimizedMarshaller(); @@ -58,6 +62,7 @@ public class TcpRestParserSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testSimplePacketParsing() throws Exception { GridNioSession ses = new MockNioSession(); @@ -93,6 +98,7 @@ public void testSimplePacketParsing() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIncorrectPackets() throws Exception { final GridNioSession ses = new MockNioSession(); @@ -142,6 +148,7 @@ public void testIncorrectPackets() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCustomMessages() throws Exception { GridClientCacheRequest req = new GridClientCacheRequest(CAS); @@ -178,6 +185,7 @@ public void testCustomMessages() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMixedParsing() throws Exception { GridNioSession ses1 = new MockNioSession(); GridNioSession ses2 = new MockNioSession(); @@ -247,6 +255,7 @@ public void testMixedParsing() throws Exception { /** * @throws Exception If failed. */ + @Test public void testParseContinuousSplit() throws Exception { ByteBuffer tmp = ByteBuffer.allocate(10 * 1024); @@ -301,6 +310,7 @@ public void testParseContinuousSplit() throws Exception { * * @throws Exception If failed. */ + @Test public void testParseClientHandshake() throws Exception { for (int splitPos = 1; splitPos < 5; splitPos++) { log.info("Checking split position: " + splitPos); @@ -453,4 +463,4 @@ private ByteBuffer rawPacket(byte magic, byte opCode, byte[] opaque, @Nullable b return res; } -} \ No newline at end of file +} diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/protocols/tcp/redis/RedisProtocolConnectSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/protocols/tcp/redis/RedisProtocolConnectSelfTest.java index f7fd69a6d58cf..ca3859f72a00e 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/protocols/tcp/redis/RedisProtocolConnectSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/protocols/tcp/redis/RedisProtocolConnectSelfTest.java @@ -18,15 +18,20 @@ package org.apache.ignite.internal.processors.rest.protocols.tcp.redis; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import redis.clients.jedis.Jedis; /** * Tests for Connection commands of Redis protocol. */ +@RunWith(JUnit4.class) public class RedisProtocolConnectSelfTest extends RedisCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPing() throws Exception { try (Jedis jedis = pool.getResource()) { Assert.assertEquals("PONG", jedis.ping()); @@ -36,6 +41,7 @@ public void testPing() throws Exception { /** * @throws Exception If failed. */ + @Test public void testEcho() throws Exception { try (Jedis jedis = pool.getResource()) { Assert.assertEquals("Hello, grid!", jedis.echo("Hello, grid!")); @@ -45,6 +51,7 @@ public void testEcho() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSelect() throws Exception { try (Jedis jedis = pool.getResource()) { // connected to cache with index 0 diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/protocols/tcp/redis/RedisProtocolServerSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/protocols/tcp/redis/RedisProtocolServerSelfTest.java index a424d77e89c8f..f0f5f477cfb41 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/protocols/tcp/redis/RedisProtocolServerSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/protocols/tcp/redis/RedisProtocolServerSelfTest.java @@ -19,15 +19,20 @@ import java.util.HashMap; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import redis.clients.jedis.Jedis; /** * Tests for Server commands of Redis protocol. */ +@RunWith(JUnit4.class) public class RedisProtocolServerSelfTest extends RedisCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testDbSize() throws Exception { try (Jedis jedis = pool.getResource()) { Assert.assertEquals(0, (long)jedis.dbSize()); @@ -46,6 +51,7 @@ public void testDbSize() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFlushDb() throws Exception { try (Jedis jedis = pool.getResource()) { Assert.assertEquals(0, (long)jedis.dbSize()); @@ -82,6 +88,7 @@ public void testFlushDb() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFlushAll() throws Exception { try (Jedis jedis = pool.getResource()) { Assert.assertEquals(0, (long)jedis.dbSize()); diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/protocols/tcp/redis/RedisProtocolStringAtomicDatastructuresSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/protocols/tcp/redis/RedisProtocolStringAtomicDatastructuresSelfTest.java index 2e983f46ece5f..385b4898d8399 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/protocols/tcp/redis/RedisProtocolStringAtomicDatastructuresSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/protocols/tcp/redis/RedisProtocolStringAtomicDatastructuresSelfTest.java @@ -17,17 +17,22 @@ package org.apache.ignite.internal.processors.rest.protocols.tcp.redis; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import redis.clients.jedis.Jedis; /** * Tests for String atomic datastructures commands of Redis protocol. */ +@RunWith(JUnit4.class) public class RedisProtocolStringAtomicDatastructuresSelfTest extends RedisCommonAbstractTest { /** * Test that threads with datastructures commands wasn't deadlocked when PME happens. * * @throws Exception If failed. */ + @Test public void testAtomicCommandsTopologyChange() throws Exception { try (Jedis jedis = pool.getResource()) { int size = grid(0).cachesx().size(); diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/protocols/tcp/redis/RedisProtocolStringSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/protocols/tcp/redis/RedisProtocolStringSelfTest.java index 21a988268c232..e192c004f5b22 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/protocols/tcp/redis/RedisProtocolStringSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/protocols/tcp/redis/RedisProtocolStringSelfTest.java @@ -21,16 +21,21 @@ import java.util.HashSet; import java.util.List; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import redis.clients.jedis.Jedis; import redis.clients.jedis.exceptions.JedisDataException; /** * Tests for String commands of Redis protocol. */ +@RunWith(JUnit4.class) public class RedisProtocolStringSelfTest extends RedisCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testGet() throws Exception { try (Jedis jedis = pool.getResource()) { jcache().put("getKey1", "getVal1"); @@ -54,6 +59,7 @@ public void testGet() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetSet() throws Exception { try (Jedis jedis = pool.getResource()) { jcache().put("getSetKey1", "1"); @@ -77,6 +83,7 @@ public void testGetSet() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMGet() throws Exception { try (Jedis jedis = pool.getResource()) { jcache().put("getKey1", "getVal1"); @@ -96,6 +103,7 @@ public void testMGet() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSet() throws Exception { long EXPIRE_MS = 1000L; int EXPIRE_SEC = 1; @@ -131,6 +139,7 @@ public void testSet() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMSet() throws Exception { try (Jedis jedis = pool.getResource()) { jedis.mset("setKey1", "1", "setKey2", "2"); @@ -143,6 +152,7 @@ public void testMSet() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIncrDecr() throws Exception { try (Jedis jedis = pool.getResource()) { Assert.assertEquals(1, (long)jedis.incr("newKeyIncr")); @@ -226,6 +236,7 @@ public void testIncrDecr() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIncrDecrBy() throws Exception { try (Jedis jedis = pool.getResource()) { Assert.assertEquals(2, (long)jedis.incrBy("newKeyIncrBy", 2)); @@ -282,6 +293,7 @@ public void testIncrDecrBy() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAppend() throws Exception { try (Jedis jedis = pool.getResource()) { Assert.assertEquals(5, (long)jedis.append("appendKey1", "Hello")); @@ -303,6 +315,7 @@ public void testAppend() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStrlen() throws Exception { try (Jedis jedis = pool.getResource()) { Assert.assertEquals(0, (long)jedis.strlen("strlenKeyNonExisting")); @@ -327,6 +340,7 @@ public void testStrlen() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSetRange() throws Exception { try (Jedis jedis = pool.getResource()) { Assert.assertEquals(0, (long)jedis.setrange("setRangeKey1", 0, "")); @@ -375,6 +389,7 @@ public void testSetRange() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetRange() throws Exception { try (Jedis jedis = pool.getResource()) { Assert.assertEquals("", jedis.getrange("getRangeKeyNonExisting", 0, 0)); @@ -402,6 +417,7 @@ public void testGetRange() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDel() throws Exception { jcache().put("delKey1", "abc"); jcache().put("delKey2", "abcd"); @@ -415,6 +431,7 @@ public void testDel() throws Exception { /** * @throws Exception If failed. */ + @Test public void testExists() throws Exception { jcache().put("existsKey1", "abc"); jcache().put("existsKey2", "abcd"); @@ -427,6 +444,7 @@ public void testExists() throws Exception { /** * @throws Exception If failed. */ + @Test public void testExpire() throws Exception { testExpire(new Expiration() { @Override public long expire(Jedis jedis, String key) { @@ -438,6 +456,7 @@ public void testExpire() throws Exception { /** * @throws Exception If failed. */ + @Test public void testExpireMs() throws Exception { testExpire(new Expiration() { @Override public long expire(Jedis jedis, String key) { diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcComplexQuerySelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcComplexQuerySelfTest.java index 269e301502aac..abb3044c92b33 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcComplexQuerySelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcComplexQuerySelfTest.java @@ -32,6 +32,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -40,6 +43,7 @@ /** * Tests for complex queries (joins, etc.). */ +@RunWith(JUnit4.class) public class JdbcComplexQuerySelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -126,6 +130,7 @@ protected CacheConfiguration cacheConfiguration() { /** * @throws Exception If failed. */ + @Test public void testJoin() throws Exception { ResultSet rs = stmt.executeQuery( "select p.id, p.name, o.name as orgName from \"pers\".Person p, \"org\".Organization o where p.orgId = o.id"); @@ -161,6 +166,7 @@ else if (id == 3) { /** * @throws Exception If failed. */ + @Test public void testJoinWithoutAlias() throws Exception { ResultSet rs = stmt.executeQuery( "select p.id, p.name, o.name from \"pers\".Person p, \"org\".Organization o where p.orgId = o.id"); @@ -199,6 +205,7 @@ else if (id == 3) { /** * @throws Exception If failed. */ + @Test public void testIn() throws Exception { ResultSet rs = stmt.executeQuery("select name from \"pers\".Person where age in (25, 35)"); @@ -219,6 +226,7 @@ public void testIn() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBetween() throws Exception { ResultSet rs = stmt.executeQuery("select name from \"pers\".Person where age between 24 and 36"); @@ -239,6 +247,7 @@ public void testBetween() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCalculatedValue() throws Exception { ResultSet rs = stmt.executeQuery("select age * 2 from \"pers\".Person"); @@ -316,4 +325,4 @@ private Organization(int id, String name) { this.name = name; } } -} \ No newline at end of file +} diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcConnectionSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcConnectionSelfTest.java index b48d6e2d25a9c..1721f1ad9c617 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcConnectionSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcConnectionSelfTest.java @@ -30,10 +30,14 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Connection test. */ +@RunWith(JUnit4.class) public class JdbcConnectionSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -95,6 +99,7 @@ private CacheConfiguration cacheConfiguration(@NotNull String name) throws Excep /** * @throws Exception If failed. */ + @Test public void testDefaults() throws Exception { String url = URL_PREFIX + HOST; @@ -105,6 +110,7 @@ public void testDefaults() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNodeId() throws Exception { String url = URL_PREFIX + HOST + "/?nodeId=" + grid(0).localNode().id(); @@ -118,6 +124,7 @@ public void testNodeId() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCustomCache() throws Exception { String url = URL_PREFIX + HOST + "/" + CUSTOM_CACHE_NAME; @@ -127,6 +134,7 @@ public void testCustomCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCustomPort() throws Exception { String url = URL_PREFIX + HOST + ":" + CUSTOM_PORT; @@ -137,6 +145,7 @@ public void testCustomPort() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCustomCacheNameAndPort() throws Exception { String url = URL_PREFIX + HOST + ":" + CUSTOM_PORT + "/" + CUSTOM_CACHE_NAME; @@ -146,6 +155,7 @@ public void testCustomCacheNameAndPort() throws Exception { /** * @throws Exception If failed. */ + @Test public void testWrongCache() throws Exception { final String url = URL_PREFIX + HOST + "/wrongCacheName"; @@ -166,6 +176,7 @@ public void testWrongCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testWrongPort() throws Exception { final String url = URL_PREFIX + HOST + ":33333"; @@ -186,6 +197,7 @@ public void testWrongPort() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClose() throws Exception { String url = URL_PREFIX + HOST; @@ -211,4 +223,4 @@ public void testClose() throws Exception { "Connection is closed." ); } -} \ No newline at end of file +} diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcEmptyCacheSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcEmptyCacheSelfTest.java index 897f71e11cbca..b5b1055289e12 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcEmptyCacheSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcEmptyCacheSelfTest.java @@ -27,6 +27,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -34,6 +37,7 @@ /** * Tests for empty cache. */ +@RunWith(JUnit4.class) public class JdbcEmptyCacheSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -100,6 +104,7 @@ public class JdbcEmptyCacheSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testSelectNumber() throws Exception { ResultSet rs = stmt.executeQuery("select 1"); @@ -118,6 +123,7 @@ public void testSelectNumber() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSelectString() throws Exception { ResultSet rs = stmt.executeQuery("select 'str'"); @@ -131,4 +137,4 @@ public void testSelectString() throws Exception { assert cnt == 1; } -} \ No newline at end of file +} diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcErrorsAbstractSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcErrorsAbstractSelfTest.java index bdcfe5bb2f1cb..4de4c12644a65 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcErrorsAbstractSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcErrorsAbstractSelfTest.java @@ -41,10 +41,14 @@ import org.apache.ignite.lang.IgniteCallable; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test SQLSTATE codes propagation with (any) Ignite JDBC driver. */ +@RunWith(JUnit4.class) public abstract class JdbcErrorsAbstractSelfTest extends GridCommonAbstractTest { /** */ protected static final String CACHE_STORE_TEMPLATE = "cache_store"; @@ -73,6 +77,7 @@ public abstract class JdbcErrorsAbstractSelfTest extends GridCommonAbstractTest * Test that H2 specific error codes get propagated to Ignite SQL exceptions. * @throws SQLException if failed. */ + @Test public void testParsingErrors() throws SQLException { checkErrorState("gibberish", "42000", "Failed to parse query. Syntax error in SQL statement \"GIBBERISH[*] \""); @@ -82,6 +87,7 @@ public void testParsingErrors() throws SQLException { * Test that error codes from tables related DDL operations get propagated to Ignite SQL exceptions. * @throws SQLException if failed. */ + @Test public void testTableErrors() throws SQLException { checkErrorState("DROP TABLE \"PUBLIC\".missing", "42000", "Table doesn't exist: MISSING"); } @@ -90,6 +96,7 @@ public void testTableErrors() throws SQLException { * Test that error codes from indexes related DDL operations get propagated to Ignite SQL exceptions. * @throws SQLException if failed. */ + @Test public void testIndexErrors() throws SQLException { checkErrorState("DROP INDEX \"PUBLIC\".missing", "42000", "Index doesn't exist: MISSING"); } @@ -98,6 +105,7 @@ public void testIndexErrors() throws SQLException { * Test that error codes from DML operations get propagated to Ignite SQL exceptions. * @throws SQLException if failed. */ + @Test public void testDmlErrors() throws SQLException { checkErrorState("INSERT INTO \"test\".INTEGER(_key, _val) values(1, null)", "22004", "Value for INSERT, COPY, MERGE, or UPDATE must not be null"); @@ -110,6 +118,7 @@ public void testDmlErrors() throws SQLException { * Test error code for the case when user attempts to refer a future currently unsupported. * @throws SQLException if failed. */ + @Test public void testUnsupportedSql() throws SQLException { checkErrorState("ALTER TABLE \"test\".Integer MODIFY COLUMN _key CHAR", "0A000", "ALTER COLUMN is not supported"); @@ -119,6 +128,7 @@ public void testUnsupportedSql() throws SQLException { * Test error code for the case when user attempts to use a closed connection. * @throws SQLException if failed. */ + @Test public void testConnectionClosed() throws SQLException { checkErrorState(new IgniteCallable() { @Override public Void call() throws Exception { @@ -231,6 +241,7 @@ public void testConnectionClosed() throws SQLException { * Test error code for the case when user attempts to use a closed result set. * @throws SQLException if failed. */ + @Test public void testResultSetClosed() throws SQLException { checkErrorState(new ConnClosure() { @Override public void run(Connection conn) throws Exception { @@ -252,6 +263,7 @@ public void testResultSetClosed() throws SQLException { * from column whose value can't be converted to an {@code int}. * @throws SQLException if failed. */ + @Test public void testInvalidIntFormat() throws SQLException { checkErrorState(new ConnClosure() { @Override public void run(Connection conn) throws Exception { @@ -271,6 +283,7 @@ public void testInvalidIntFormat() throws SQLException { * from column whose value can't be converted to an {@code long}. * @throws SQLException if failed. */ + @Test public void testInvalidLongFormat() throws SQLException { checkErrorState(new ConnClosure() { @Override public void run(Connection conn) throws Exception { @@ -290,6 +303,7 @@ public void testInvalidLongFormat() throws SQLException { * from column whose value can't be converted to an {@code float}. * @throws SQLException if failed. */ + @Test public void testInvalidFloatFormat() throws SQLException { checkErrorState(new ConnClosure() { @Override public void run(Connection conn) throws Exception { @@ -309,6 +323,7 @@ public void testInvalidFloatFormat() throws SQLException { * from column whose value can't be converted to an {@code double}. * @throws SQLException if failed. */ + @Test public void testInvalidDoubleFormat() throws SQLException { checkErrorState(new ConnClosure() { @Override public void run(Connection conn) throws Exception { @@ -328,6 +343,7 @@ public void testInvalidDoubleFormat() throws SQLException { * from column whose value can't be converted to an {@code byte}. * @throws SQLException if failed. */ + @Test public void testInvalidByteFormat() throws SQLException { checkErrorState(new ConnClosure() { @Override public void run(Connection conn) throws Exception { @@ -347,6 +363,7 @@ public void testInvalidByteFormat() throws SQLException { * from column whose value can't be converted to an {@code short}. * @throws SQLException if failed. */ + @Test public void testInvalidShortFormat() throws SQLException { checkErrorState(new ConnClosure() { @Override public void run(Connection conn) throws Exception { @@ -366,6 +383,7 @@ public void testInvalidShortFormat() throws SQLException { * from column whose value can't be converted to an {@code BigDecimal}. * @throws SQLException if failed. */ + @Test public void testInvalidBigDecimalFormat() throws SQLException { checkErrorState(new ConnClosure() { @Override public void run(Connection conn) throws Exception { @@ -385,6 +403,7 @@ public void testInvalidBigDecimalFormat() throws SQLException { * from column whose value can't be converted to an {@code boolean}. * @throws SQLException if failed. */ + @Test public void testInvalidBooleanFormat() throws SQLException { checkErrorState(new ConnClosure() { @Override public void run(Connection conn) throws Exception { @@ -404,6 +423,7 @@ public void testInvalidBooleanFormat() throws SQLException { * from column whose value can't be converted to an {@code boolean}. * @throws SQLException if failed. */ + @Test public void testInvalidObjectFormat() throws SQLException { checkErrorState(new ConnClosure() { @Override public void run(Connection conn) throws Exception { @@ -423,6 +443,7 @@ public void testInvalidObjectFormat() throws SQLException { * from column whose value can't be converted to a {@link Date}. * @throws SQLException if failed. */ + @Test public void testInvalidDateFormat() throws SQLException { checkErrorState(new ConnClosure() { @Override public void run(Connection conn) throws Exception { @@ -442,6 +463,7 @@ public void testInvalidDateFormat() throws SQLException { * from column whose value can't be converted to a {@link Time}. * @throws SQLException if failed. */ + @Test public void testInvalidTimeFormat() throws SQLException { checkErrorState(new ConnClosure() { @Override public void run(Connection conn) throws Exception { @@ -461,6 +483,7 @@ public void testInvalidTimeFormat() throws SQLException { * from column whose value can't be converted to a {@link Timestamp}. * @throws SQLException if failed. */ + @Test public void testInvalidTimestampFormat() throws SQLException { checkErrorState(new ConnClosure() { @Override public void run(Connection conn) throws Exception { @@ -480,6 +503,7 @@ public void testInvalidTimestampFormat() throws SQLException { * from column whose value can't be converted to a {@link URL}. * @throws SQLException if failed. */ + @Test public void testInvalidUrlFormat() throws SQLException { checkErrorState(new ConnClosure() { @Override public void run(Connection conn) throws Exception { @@ -499,6 +523,7 @@ public void testInvalidUrlFormat() throws SQLException { * * @throws SQLException if failed. */ + @Test public void testNotNullViolation() throws SQLException { try (Connection conn = getConnection()) { conn.setSchema("PUBLIC"); @@ -528,6 +553,7 @@ public void testNotNullViolation() throws SQLException { * * @throws SQLException if failed. */ + @Test public void testNotNullRestrictionReadThroughCacheStore() throws SQLException { checkErrorState(new ConnClosure() { @Override public void run(Connection conn) throws Exception { @@ -548,6 +574,7 @@ public void testNotNullRestrictionReadThroughCacheStore() throws SQLException { * * @throws SQLException if failed. */ + @Test public void testNotNullRestrictionCacheInterceptor() throws SQLException { checkErrorState(new ConnClosure() { @Override public void run(Connection conn) throws Exception { @@ -566,6 +593,7 @@ public void testNotNullRestrictionCacheInterceptor() throws SQLException { * * @throws SQLException If failed. */ + @Test public void testSelectWrongTable() throws SQLException { checkSqlErrorMessage("select from wrong", "42000", "Failed to parse query. Table \"WRONG\" not found"); @@ -576,6 +604,7 @@ public void testSelectWrongTable() throws SQLException { * * @throws SQLException If failed. */ + @Test public void testSelectWrongColumnName() throws SQLException { checkSqlErrorMessage("select wrong from test", "42000", "Failed to parse query. Column \"WRONG\" not found"); @@ -586,6 +615,7 @@ public void testSelectWrongColumnName() throws SQLException { * * @throws SQLException If failed. */ + @Test public void testSelectWrongSyntax() throws SQLException { checkSqlErrorMessage("select from test where", "42000", "Failed to parse query. Syntax error in SQL statement \"SELECT FROM TEST WHERE[*]"); @@ -596,6 +626,7 @@ public void testSelectWrongSyntax() throws SQLException { * * @throws SQLException If failed. */ + @Test public void testDmlWrongTable() throws SQLException { checkSqlErrorMessage("insert into wrong (id, val) values (3, 'val3')", "42000", "Failed to parse query. Table \"WRONG\" not found"); @@ -615,6 +646,7 @@ public void testDmlWrongTable() throws SQLException { * * @throws SQLException If failed. */ + @Test public void testDmlWrongColumnName() throws SQLException { checkSqlErrorMessage("insert into test (id, wrong) values (3, 'val3')", "42000", "Failed to parse query. Column \"WRONG\" not found"); @@ -634,6 +666,7 @@ public void testDmlWrongColumnName() throws SQLException { * * @throws SQLException If failed. */ + @Test public void testDmlWrongSyntax() throws SQLException { checkSqlErrorMessage("insert test (id, val) values (3, 'val3')", "42000", "Failed to parse query. Syntax error in SQL statement \"INSERT TEST[*] (ID, VAL)"); @@ -653,6 +686,7 @@ public void testDmlWrongSyntax() throws SQLException { * * @throws SQLException If failed. */ + @Test public void testDdlWrongTable() throws SQLException { checkSqlErrorMessage("create table test (id int primary key, val varchar)", "42000", "Table already exists: TEST"); @@ -675,6 +709,7 @@ public void testDdlWrongTable() throws SQLException { * * @throws SQLException If failed. */ + @Test public void testDdlWrongColumnName() throws SQLException { checkSqlErrorMessage("create index idx1 on test (wrong)", "42000", "Column doesn't exist: WRONG"); @@ -688,6 +723,7 @@ public void testDdlWrongColumnName() throws SQLException { * * @throws SQLException If failed. */ + @Test public void testDdlWrongSyntax() throws SQLException { checkSqlErrorMessage("create table test2 (id int wrong key, val varchar)", "42000", "Failed to parse query. Syntax error in SQL statement \"CREATE TABLE TEST2 (ID INT WRONG[*]"); diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcLocalCachesSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcLocalCachesSelfTest.java index 9350e0d597241..64594483355cb 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcLocalCachesSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcLocalCachesSelfTest.java @@ -29,6 +29,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteJdbcDriver.PROP_NODE_ID; import static org.apache.ignite.cache.CacheMode.LOCAL; @@ -37,6 +40,7 @@ /** * Test JDBC with several local caches. */ +@RunWith(JUnit4.class) public class JdbcLocalCachesSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -95,6 +99,7 @@ public class JdbcLocalCachesSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCache1() throws Exception { Properties cfg = new Properties(); @@ -123,6 +128,7 @@ public void testCache1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCache2() throws Exception { Properties cfg = new Properties(); @@ -147,4 +153,4 @@ public void testCache2() throws Exception { conn.close(); } } -} \ No newline at end of file +} diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcMetadataSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcMetadataSelfTest.java index 0613de7417578..802e57650c86a 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcMetadataSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcMetadataSelfTest.java @@ -40,6 +40,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.sql.Types.INTEGER; import static java.sql.Types.VARCHAR; @@ -52,6 +55,7 @@ /** * Metadata tests. */ +@RunWith(JUnit4.class) public class JdbcMetadataSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -114,6 +118,7 @@ protected CacheConfiguration cacheConfiguration() { /** * @throws Exception If failed. */ + @Test public void testResultSetMetaData() throws Exception { Statement stmt = DriverManager.getConnection(URL).createStatement(); @@ -146,6 +151,7 @@ public void testResultSetMetaData() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDecimalAndDateTypeMetaData() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { Statement stmt = conn.createStatement(); @@ -180,6 +186,7 @@ public void testDecimalAndDateTypeMetaData() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetTables() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { DatabaseMetaData meta = conn.getMetaData(); @@ -216,6 +223,7 @@ public void testGetTables() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetColumns() throws Exception { final boolean primitivesInformationIsLostAfterStore = ignite(0).configuration().getMarshaller() instanceof BinaryMarshaller; try (Connection conn = DriverManager.getConnection(URL)) { @@ -309,6 +317,7 @@ public void testGetColumns() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMetadataResultSetClose() throws Exception { try (Connection conn = DriverManager.getConnection(URL); ResultSet tbls = conn.getMetaData().getTables(null, null, "%", null)) { diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcNoDefaultCacheTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcNoDefaultCacheTest.java index adb5c306aeb94..5fcb7b3f65088 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcNoDefaultCacheTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcNoDefaultCacheTest.java @@ -31,10 +31,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class JdbcNoDefaultCacheTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -109,6 +113,7 @@ protected String getUrl() { /** * @throws Exception If failed. */ + @Test public void testDefaults() throws Exception { String url = getUrl(); @@ -124,6 +129,7 @@ public void testDefaults() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNoCacheNameQuery() throws Exception { Statement stmt; diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcPojoLegacyQuerySelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcPojoLegacyQuerySelfTest.java index 4fa7ba5443870..4f63caf8bd2b0 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcPojoLegacyQuerySelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcPojoLegacyQuerySelfTest.java @@ -18,10 +18,14 @@ package org.apache.ignite.jdbc; import java.sql.ResultSet; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for Jdbc driver query without class on client */ +@RunWith(JUnit4.class) public class JdbcPojoLegacyQuerySelfTest extends AbstractJdbcPojoQuerySelfTest { /** URL. */ private static final String URL = "jdbc:ignite://127.0.0.1/"; @@ -29,6 +33,7 @@ public class JdbcPojoLegacyQuerySelfTest extends AbstractJdbcPojoQuerySelfTest { /** * @throws Exception If failed. */ + @Test public void testJdbcQuery() throws Exception { stmt.execute("select * from JdbcTestObject"); diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcPojoQuerySelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcPojoQuerySelfTest.java index 6729d0491c67d..31ac22f8206de 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcPojoQuerySelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcPojoQuerySelfTest.java @@ -18,12 +18,16 @@ package org.apache.ignite.jdbc; import java.sql.ResultSet; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteJdbcDriver.CFG_URL_PREFIX; /** * Test for Jdbc driver query without class on client */ +@RunWith(JUnit4.class) public class JdbcPojoQuerySelfTest extends AbstractJdbcPojoQuerySelfTest { /** URL. */ private static final String URL = CFG_URL_PREFIX + "cache=default@modules/clients/src/test/config/jdbc-bin-config.xml"; @@ -31,6 +35,7 @@ public class JdbcPojoQuerySelfTest extends AbstractJdbcPojoQuerySelfTest { /** * @throws Exception If failed. */ + @Test public void testJdbcQueryTask2() throws Exception { stmt.execute("select * from JdbcTestObject"); @@ -42,6 +47,7 @@ public void testJdbcQueryTask2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testJdbcQueryTask1() throws Exception { ResultSet rs = stmt.executeQuery("select * from JdbcTestObject"); diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcPreparedStatementSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcPreparedStatementSelfTest.java index 7a52edf1e2193..3af0ddcce3145 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcPreparedStatementSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcPreparedStatementSelfTest.java @@ -36,6 +36,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.sql.Types.BIGINT; import static java.sql.Types.BINARY; @@ -57,6 +60,7 @@ /** * Prepared statement test. */ +@RunWith(JUnit4.class) public class JdbcPreparedStatementSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -151,6 +155,7 @@ public class JdbcPreparedStatementSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRepeatableUsage() throws Exception { stmt = conn.prepareStatement("select * from TestObject where id = ?"); @@ -186,6 +191,7 @@ public void testRepeatableUsage() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBoolean() throws Exception { stmt = conn.prepareStatement("select * from TestObject where boolVal is not distinct from ?"); @@ -223,6 +229,7 @@ public void testBoolean() throws Exception { /** * @throws Exception If failed. */ + @Test public void testByte() throws Exception { stmt = conn.prepareStatement("select * from TestObject where byteVal is not distinct from ?"); @@ -260,6 +267,7 @@ public void testByte() throws Exception { /** * @throws Exception If failed. */ + @Test public void testShort() throws Exception { stmt = conn.prepareStatement("select * from TestObject where shortVal is not distinct from ?"); @@ -297,6 +305,7 @@ public void testShort() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInteger() throws Exception { stmt = conn.prepareStatement("select * from TestObject where intVal is not distinct from ?"); @@ -334,6 +343,7 @@ public void testInteger() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLong() throws Exception { stmt = conn.prepareStatement("select * from TestObject where longVal is not distinct from ?"); @@ -371,6 +381,7 @@ public void testLong() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFloat() throws Exception { stmt = conn.prepareStatement("select * from TestObject where floatVal is not distinct from ?"); @@ -408,6 +419,7 @@ public void testFloat() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDouble() throws Exception { stmt = conn.prepareStatement("select * from TestObject where doubleVal is not distinct from ?"); @@ -445,6 +457,7 @@ public void testDouble() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBigDecimal() throws Exception { stmt = conn.prepareStatement("select * from TestObject where bigVal is not distinct from ?"); @@ -482,6 +495,7 @@ public void testBigDecimal() throws Exception { /** * @throws Exception If failed. */ + @Test public void testString() throws Exception { stmt = conn.prepareStatement("select * from TestObject where strVal is not distinct from ?"); @@ -519,6 +533,7 @@ public void testString() throws Exception { /** * @throws Exception If failed. */ + @Test public void testArray() throws Exception { stmt = conn.prepareStatement("select * from TestObject where arrVal is not distinct from ?"); @@ -556,6 +571,7 @@ public void testArray() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDate() throws Exception { stmt = conn.prepareStatement("select * from TestObject where dateVal is not distinct from ?"); @@ -593,6 +609,7 @@ public void testDate() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTime() throws Exception { stmt = conn.prepareStatement("select * from TestObject where timeVal is not distinct from ?"); @@ -630,6 +647,7 @@ public void testTime() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTimestamp() throws Exception { stmt = conn.prepareStatement("select * from TestObject where tsVal is not distinct from ?"); @@ -667,6 +685,7 @@ public void testTimestamp() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUrl() throws Exception { stmt = conn.prepareStatement("select * from TestObject where urlVal is not distinct from ?"); @@ -772,4 +791,4 @@ private TestObject(int id) { this.id = id; } } -} \ No newline at end of file +} diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcResultSetSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcResultSetSelfTest.java index 2214139764a46..f7988391a656d 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcResultSetSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcResultSetSelfTest.java @@ -44,6 +44,9 @@ import java.util.Arrays; import java.util.Objects; import java.util.concurrent.Callable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -52,6 +55,7 @@ * Result set test. */ @SuppressWarnings("FloatingPointEquality") +@RunWith(JUnit4.class) public class JdbcResultSetSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -156,6 +160,7 @@ private TestObject createObjectWithData(int id) throws MalformedURLException { /** * @throws Exception If failed. */ + @Test public void testBoolean() throws Exception { ResultSet rs = stmt.executeQuery(SQL); @@ -176,6 +181,7 @@ public void testBoolean() throws Exception { /** * @throws Exception If failed. */ + @Test public void testByte() throws Exception { ResultSet rs = stmt.executeQuery(SQL); @@ -196,6 +202,7 @@ public void testByte() throws Exception { /** * @throws Exception If failed. */ + @Test public void testShort() throws Exception { ResultSet rs = stmt.executeQuery(SQL); @@ -216,6 +223,7 @@ public void testShort() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInteger() throws Exception { ResultSet rs = stmt.executeQuery(SQL); @@ -236,6 +244,7 @@ public void testInteger() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLong() throws Exception { ResultSet rs = stmt.executeQuery(SQL); @@ -256,6 +265,7 @@ public void testLong() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFloat() throws Exception { ResultSet rs = stmt.executeQuery(SQL); @@ -276,6 +286,7 @@ public void testFloat() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDouble() throws Exception { ResultSet rs = stmt.executeQuery(SQL); @@ -296,6 +307,7 @@ public void testDouble() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBigDecimal() throws Exception { ResultSet rs = stmt.executeQuery(SQL); @@ -316,6 +328,7 @@ public void testBigDecimal() throws Exception { /** * @throws Exception If failed. */ + @Test public void testString() throws Exception { ResultSet rs = stmt.executeQuery(SQL); @@ -336,6 +349,7 @@ public void testString() throws Exception { /** * @throws Exception If failed. */ + @Test public void testArray() throws Exception { ResultSet rs = stmt.executeQuery(SQL); @@ -357,6 +371,7 @@ public void testArray() throws Exception { * @throws Exception If failed. */ @SuppressWarnings("deprecation") + @Test public void testDate() throws Exception { ResultSet rs = stmt.executeQuery(SQL); @@ -378,6 +393,7 @@ public void testDate() throws Exception { * @throws Exception If failed. */ @SuppressWarnings("deprecation") + @Test public void testTime() throws Exception { ResultSet rs = stmt.executeQuery(SQL); @@ -398,6 +414,7 @@ public void testTime() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTimestamp() throws Exception { ResultSet rs = stmt.executeQuery(SQL); @@ -418,6 +435,7 @@ public void testTimestamp() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUrl() throws Exception { ResultSet rs = stmt.executeQuery(SQL); @@ -507,6 +525,7 @@ private static String removeIdHash(String str) { /** * @throws Exception If failed. */ + @Test public void testObject() throws Exception { final Ignite ignite = ignite(0); final boolean binaryMarshaller = ignite.configuration().getMarshaller() instanceof BinaryMarshaller; @@ -541,6 +560,7 @@ public void testObject() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNavigation() throws Exception { ResultSet rs = stmt.executeQuery("select * from TestObject where id > 0"); @@ -578,6 +598,7 @@ public void testNavigation() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFindColumn() throws Exception { final ResultSet rs = stmt.executeQuery(SQL); @@ -789,4 +810,4 @@ private TestObjectField(int a, String b) { return S.toString(TestObjectField.class, this); } } -} \ No newline at end of file +} diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcStatementSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcStatementSelfTest.java index 353080176e831..dc7990331a30c 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcStatementSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcStatementSelfTest.java @@ -32,6 +32,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -39,6 +42,7 @@ /** * Statement test. */ +@RunWith(JUnit4.class) public class JdbcStatementSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -117,6 +121,7 @@ public class JdbcStatementSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testExecuteQuery() throws Exception { ResultSet rs = stmt.executeQuery(SQL); @@ -149,6 +154,7 @@ else if (id == 3) { /** * @throws Exception If failed. */ + @Test public void testExecute() throws Exception { assert stmt.execute(SQL); @@ -185,6 +191,7 @@ else if (id == 3) { /** * @throws Exception If failed. */ + @Test public void testMaxRows() throws Exception { stmt.setMaxRows(1); @@ -282,4 +289,4 @@ private Person(int id, String firstName, String lastName, int age) { this.age = age; } } -} \ No newline at end of file +} diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcVersionMismatchSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcVersionMismatchSelfTest.java index 19e18a216285e..19a1be60bfc46 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcVersionMismatchSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcVersionMismatchSelfTest.java @@ -28,10 +28,14 @@ import java.sql.Statement; import java.util.ArrayList; import java.util.List; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * JDBC version mismatch test. */ +@RunWith(JUnit4.class) public class JdbcVersionMismatchSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { @@ -53,6 +57,7 @@ public class JdbcVersionMismatchSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testVersionMismatchJdbc() throws Exception { try (Connection conn1 = connect(); Connection conn2 = connect()) { conn1.setAutoCommit(false); diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/suite/IgniteJdbcDriverTestSuite.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/suite/IgniteJdbcDriverTestSuite.java index 747b13e9d356d..18e45f13c1590 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/suite/IgniteJdbcDriverTestSuite.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/suite/IgniteJdbcDriverTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.jdbc.suite; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.jdbc2.JdbcBlobTest; import org.apache.ignite.internal.jdbc2.JdbcBulkLoadSelfTest; @@ -99,125 +100,125 @@ public static TestSuite suite() throws Exception { TestSuite suite = new TestSuite("Ignite JDBC Driver Test Suite"); // Thin client based driver tests. - suite.addTest(new TestSuite(JdbcConnectionSelfTest.class)); - suite.addTest(new TestSuite(JdbcStatementSelfTest.class)); - suite.addTest(new TestSuite(JdbcPreparedStatementSelfTest.class)); - suite.addTest(new TestSuite(JdbcResultSetSelfTest.class)); - suite.addTest(new TestSuite(JdbcComplexQuerySelfTest.class)); - suite.addTest(new TestSuite(JdbcMetadataSelfTest.class)); - suite.addTest(new TestSuite(JdbcEmptyCacheSelfTest.class)); - suite.addTest(new TestSuite(JdbcLocalCachesSelfTest.class)); - suite.addTest(new TestSuite(JdbcNoDefaultCacheTest.class)); - suite.addTest(new TestSuite(JdbcDefaultNoOpCacheTest.class)); - suite.addTest(new TestSuite(JdbcPojoQuerySelfTest.class)); - suite.addTest(new TestSuite(JdbcPojoLegacyQuerySelfTest.class)); - suite.addTest(new TestSuite(JdbcConnectionReopenTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcConnectionSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcStatementSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcPreparedStatementSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcResultSetSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcComplexQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcMetadataSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcEmptyCacheSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcLocalCachesSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcNoDefaultCacheTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcDefaultNoOpCacheTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcPojoQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcPojoLegacyQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcConnectionReopenTest.class)); // Ignite client node based driver tests - suite.addTest(new TestSuite(org.apache.ignite.internal.jdbc2.JdbcConnectionSelfTest.class)); - suite.addTest(new TestSuite(org.apache.ignite.internal.jdbc2.JdbcSpringSelfTest.class)); - suite.addTest(new TestSuite(org.apache.ignite.internal.jdbc2.JdbcStatementSelfTest.class)); - suite.addTest(new TestSuite(org.apache.ignite.internal.jdbc2.JdbcPreparedStatementSelfTest.class)); - suite.addTest(new TestSuite(org.apache.ignite.internal.jdbc2.JdbcResultSetSelfTest.class)); - suite.addTest(new TestSuite(org.apache.ignite.internal.jdbc2.JdbcComplexQuerySelfTest.class)); - suite.addTest(new TestSuite(JdbcDistributedJoinsQueryTest.class)); - suite.addTest(new TestSuite(org.apache.ignite.internal.jdbc2.JdbcMetadataSelfTest.class)); - suite.addTest(new TestSuite(org.apache.ignite.internal.jdbc2.JdbcEmptyCacheSelfTest.class)); - suite.addTest(new TestSuite(org.apache.ignite.internal.jdbc2.JdbcLocalCachesSelfTest.class)); - suite.addTest(new TestSuite(org.apache.ignite.internal.jdbc2.JdbcNoDefaultCacheTest.class)); - suite.addTest(new TestSuite(org.apache.ignite.internal.jdbc2.JdbcDefaultNoOpCacheTest.class)); - suite.addTest(new TestSuite(org.apache.ignite.internal.jdbc2.JdbcMergeStatementSelfTest.class)); - suite.addTest(new TestSuite(org.apache.ignite.internal.jdbc2.JdbcBinaryMarshallerMergeStatementSelfTest.class)); - suite.addTest(new TestSuite(org.apache.ignite.internal.jdbc2.JdbcUpdateStatementSelfTest.class)); - suite.addTest(new TestSuite(org.apache.ignite.internal.jdbc2.JdbcInsertStatementSelfTest.class)); - suite.addTest(new TestSuite(org.apache.ignite.internal.jdbc2.JdbcBinaryMarshallerInsertStatementSelfTest.class)); - suite.addTest(new TestSuite(org.apache.ignite.internal.jdbc2.JdbcDeleteStatementSelfTest.class)); - suite.addTest(new TestSuite(org.apache.ignite.internal.jdbc2.JdbcStatementBatchingSelfTest.class)); - suite.addTest(new TestSuite(org.apache.ignite.internal.jdbc2.JdbcErrorsSelfTest.class)); - suite.addTest(new TestSuite(org.apache.ignite.internal.jdbc2.JdbcStreamingToPublicCacheTest.class)); - suite.addTest(new TestSuite(org.apache.ignite.internal.jdbc2.JdbcNoCacheStreamingSelfTest.class)); - suite.addTest(new TestSuite(JdbcBulkLoadSelfTest.class)); - - suite.addTest(new TestSuite(JdbcBlobTest.class)); - suite.addTest(new TestSuite(org.apache.ignite.internal.jdbc2.JdbcStreamingSelfTest.class)); - suite.addTest(new TestSuite(JdbcThinStreamingNotOrderedSelfTest.class)); - suite.addTest(new TestSuite(JdbcThinStreamingOrderedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(org.apache.ignite.internal.jdbc2.JdbcConnectionSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(org.apache.ignite.internal.jdbc2.JdbcSpringSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(org.apache.ignite.internal.jdbc2.JdbcStatementSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(org.apache.ignite.internal.jdbc2.JdbcPreparedStatementSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(org.apache.ignite.internal.jdbc2.JdbcResultSetSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(org.apache.ignite.internal.jdbc2.JdbcComplexQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcDistributedJoinsQueryTest.class)); + suite.addTest(new JUnit4TestAdapter(org.apache.ignite.internal.jdbc2.JdbcMetadataSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(org.apache.ignite.internal.jdbc2.JdbcEmptyCacheSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(org.apache.ignite.internal.jdbc2.JdbcLocalCachesSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(org.apache.ignite.internal.jdbc2.JdbcNoDefaultCacheTest.class)); + suite.addTest(new JUnit4TestAdapter(org.apache.ignite.internal.jdbc2.JdbcDefaultNoOpCacheTest.class)); + suite.addTest(new JUnit4TestAdapter(org.apache.ignite.internal.jdbc2.JdbcMergeStatementSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(org.apache.ignite.internal.jdbc2.JdbcBinaryMarshallerMergeStatementSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(org.apache.ignite.internal.jdbc2.JdbcUpdateStatementSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(org.apache.ignite.internal.jdbc2.JdbcInsertStatementSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(org.apache.ignite.internal.jdbc2.JdbcBinaryMarshallerInsertStatementSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(org.apache.ignite.internal.jdbc2.JdbcDeleteStatementSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(org.apache.ignite.internal.jdbc2.JdbcStatementBatchingSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(org.apache.ignite.internal.jdbc2.JdbcErrorsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(org.apache.ignite.internal.jdbc2.JdbcStreamingToPublicCacheTest.class)); + suite.addTest(new JUnit4TestAdapter(org.apache.ignite.internal.jdbc2.JdbcNoCacheStreamingSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcBulkLoadSelfTest.class)); + + suite.addTest(new JUnit4TestAdapter(JdbcBlobTest.class)); + suite.addTest(new JUnit4TestAdapter(org.apache.ignite.internal.jdbc2.JdbcStreamingSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinStreamingNotOrderedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinStreamingOrderedSelfTest.class)); // DDL tests. - suite.addTest(new TestSuite(org.apache.ignite.internal.jdbc2.JdbcDynamicIndexAtomicPartitionedNearSelfTest.class)); - suite.addTest(new TestSuite(org.apache.ignite.internal.jdbc2.JdbcDynamicIndexAtomicPartitionedSelfTest.class)); - suite.addTest(new TestSuite(org.apache.ignite.internal.jdbc2.JdbcDynamicIndexAtomicReplicatedSelfTest.class)); - suite.addTest(new TestSuite(org.apache.ignite.internal.jdbc2.JdbcDynamicIndexTransactionalPartitionedNearSelfTest.class)); - suite.addTest(new TestSuite(org.apache.ignite.internal.jdbc2.JdbcDynamicIndexTransactionalPartitionedSelfTest.class)); - suite.addTest(new TestSuite(org.apache.ignite.internal.jdbc2.JdbcDynamicIndexTransactionalReplicatedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(org.apache.ignite.internal.jdbc2.JdbcDynamicIndexAtomicPartitionedNearSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(org.apache.ignite.internal.jdbc2.JdbcDynamicIndexAtomicPartitionedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(org.apache.ignite.internal.jdbc2.JdbcDynamicIndexAtomicReplicatedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(org.apache.ignite.internal.jdbc2.JdbcDynamicIndexTransactionalPartitionedNearSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(org.apache.ignite.internal.jdbc2.JdbcDynamicIndexTransactionalPartitionedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(org.apache.ignite.internal.jdbc2.JdbcDynamicIndexTransactionalReplicatedSelfTest.class)); // New thin JDBC - suite.addTest(new TestSuite(JdbcThinConnectionSelfTest.class)); - suite.addTest(new TestSuite(JdbcThinConnectionMvccEnabledSelfTest.class)); - suite.addTest(new TestSuite(JdbcThinConnectionMultipleAddressesTest.class)); - suite.addTest(new TestSuite(JdbcThinTcpIoTest.class)); - suite.addTest(new TestSuite(JdbcThinConnectionSSLTest.class)); - suite.addTest(new TestSuite(JdbcThinDataSourceSelfTest.class)); - suite.addTest(new TestSuite(JdbcThinPreparedStatementSelfTest.class)); - suite.addTest(new TestSuite(JdbcThinResultSetSelfTest.class)); - - suite.addTest(new TestSuite(JdbcThinStatementSelfTest.class)); - suite.addTest(new TestSuite(JdbcThinComplexQuerySelfTest.class)); - suite.addTest(new TestSuite(JdbcThinNoDefaultSchemaTest.class)); - suite.addTest(new TestSuite(JdbcThinSchemaCaseTest.class)); - suite.addTest(new TestSuite(JdbcThinEmptyCacheSelfTest.class)); - suite.addTest(new TestSuite(JdbcThinMetadataSelfTest.class)); - suite.addTest(new TestSuite(JdbcThinMetadataPrimaryKeysSelfTest.class)); - suite.addTest(new TestSuite(JdbcThinErrorsSelfTest.class)); - - suite.addTest(new TestSuite(JdbcThinInsertStatementSelfTest.class)); - suite.addTest(new TestSuite(JdbcThinUpdateStatementSelfTest.class)); - suite.addTest(new TestSuite(JdbcThinMergeStatementSelfTest.class)); - suite.addTest(new TestSuite(JdbcThinDeleteStatementSelfTest.class)); - suite.addTest(new TestSuite(JdbcThinAutoCloseServerCursorTest.class)); - suite.addTest(new TestSuite(JdbcThinBatchSelfTest.class)); - suite.addTest(new TestSuite(JdbcThinMissingLongArrayResultsTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinConnectionSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinConnectionMvccEnabledSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinConnectionMultipleAddressesTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinTcpIoTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinConnectionSSLTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinDataSourceSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinPreparedStatementSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinResultSetSelfTest.class)); + + suite.addTest(new JUnit4TestAdapter(JdbcThinStatementSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinComplexQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinNoDefaultSchemaTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinSchemaCaseTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinEmptyCacheSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinMetadataSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinMetadataPrimaryKeysSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinErrorsSelfTest.class)); + + suite.addTest(new JUnit4TestAdapter(JdbcThinInsertStatementSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinUpdateStatementSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinMergeStatementSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinDeleteStatementSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinAutoCloseServerCursorTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinBatchSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinMissingLongArrayResultsTest.class)); // New thin JDBC driver, DDL tests - suite.addTest(new TestSuite(JdbcThinDynamicIndexAtomicPartitionedNearSelfTest.class)); - suite.addTest(new TestSuite(JdbcThinDynamicIndexAtomicPartitionedSelfTest.class)); - suite.addTest(new TestSuite(JdbcThinDynamicIndexAtomicReplicatedSelfTest.class)); - suite.addTest(new TestSuite(JdbcThinDynamicIndexTransactionalPartitionedNearSelfTest.class)); - suite.addTest(new TestSuite(JdbcThinDynamicIndexTransactionalPartitionedSelfTest.class)); - suite.addTest(new TestSuite(JdbcThinDynamicIndexTransactionalReplicatedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinDynamicIndexAtomicPartitionedNearSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinDynamicIndexAtomicPartitionedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinDynamicIndexAtomicReplicatedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinDynamicIndexTransactionalPartitionedNearSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinDynamicIndexTransactionalPartitionedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinDynamicIndexTransactionalReplicatedSelfTest.class)); // New thin JDBC driver, DML tests - suite.addTest(new TestSuite(JdbcThinBulkLoadAtomicPartitionedNearSelfTest.class)); - suite.addTest(new TestSuite(JdbcThinBulkLoadAtomicPartitionedSelfTest.class)); - suite.addTest(new TestSuite(JdbcThinBulkLoadAtomicReplicatedSelfTest.class)); - suite.addTest(new TestSuite(JdbcThinBulkLoadTransactionalPartitionedNearSelfTest.class)); - suite.addTest(new TestSuite(JdbcThinBulkLoadTransactionalPartitionedSelfTest.class)); - suite.addTest(new TestSuite(JdbcThinBulkLoadTransactionalReplicatedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinBulkLoadAtomicPartitionedNearSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinBulkLoadAtomicPartitionedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinBulkLoadAtomicReplicatedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinBulkLoadTransactionalPartitionedNearSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinBulkLoadTransactionalPartitionedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinBulkLoadTransactionalReplicatedSelfTest.class)); // New thin JDBC driver, full SQL tests - suite.addTest(new TestSuite(JdbcThinComplexDmlDdlSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinComplexDmlDdlSelfTest.class)); - suite.addTest(new TestSuite(JdbcThinSelectAfterAlterTable.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinSelectAfterAlterTable.class)); // Update on server - suite.addTest(new TestSuite(JdbcThinInsertStatementSkipReducerOnUpdateSelfTest.class)); - suite.addTest(new TestSuite(JdbcThinUpdateStatementSkipReducerOnUpdateSelfTest.class)); - suite.addTest(new TestSuite(JdbcThinMergeStatementSkipReducerOnUpdateSelfTest.class)); - suite.addTest(new TestSuite(JdbcThinComplexDmlDdlSkipReducerOnUpdateSelfTest.class)); - suite.addTest(new TestSuite(JdbcThinComplexDmlDdlCustomSchemaSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinInsertStatementSkipReducerOnUpdateSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinUpdateStatementSkipReducerOnUpdateSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinMergeStatementSkipReducerOnUpdateSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinComplexDmlDdlSkipReducerOnUpdateSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinComplexDmlDdlCustomSchemaSelfTest.class)); // Transactions - suite.addTest(new TestSuite(JdbcThinTransactionsSelfTest.class)); - suite.addTest(new TestSuite(JdbcThinTransactionsClientAutoCommitComplexSelfTest.class)); - suite.addTest(new TestSuite(JdbcThinTransactionsServerAutoCommitComplexSelfTest.class)); - suite.addTest(new TestSuite(JdbcThinTransactionsClientNoAutoCommitComplexSelfTest.class)); - suite.addTest(new TestSuite(JdbcThinTransactionsServerNoAutoCommitComplexSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinTransactionsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinTransactionsClientAutoCommitComplexSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinTransactionsServerAutoCommitComplexSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinTransactionsClientNoAutoCommitComplexSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinTransactionsServerNoAutoCommitComplexSelfTest.class)); - suite.addTest(new TestSuite(JdbcThinLocalQueriesSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinLocalQueriesSelfTest.class)); // Various commands. - suite.addTest(new TestSuite(JdbcThinWalModeChangeSelfTest.class)); - suite.addTest(new TestSuite(JdbcThinAuthenticateConnectionSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinWalModeChangeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinAuthenticateConnectionSelfTest.class)); return suite; } diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinAuthenticateConnectionSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinAuthenticateConnectionSelfTest.java index cb4d7f3cf70c9..ee4a62f39b96a 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinAuthenticateConnectionSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinAuthenticateConnectionSelfTest.java @@ -31,11 +31,15 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for authenticated an non authenticated JDBC thin connection. */ @SuppressWarnings("ThrowableNotThrown") +@RunWith(JUnit4.class) public class JdbcThinAuthenticateConnectionSelfTest extends JdbcThinAbstractSelfTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -93,6 +97,7 @@ public class JdbcThinAuthenticateConnectionSelfTest extends JdbcThinAbstractSelf /** * @throws Exception If failed. */ + @Test public void testConnection() throws Exception { checkConnection(URL, "ignite", "ignite"); checkConnection(URL, "another_user", "passwd"); @@ -102,6 +107,7 @@ public void testConnection() throws Exception { /** */ + @Test public void testInvalidUserPassword() { String err = "Unauthenticated sessions are prohibited"; checkInvalidUserPassword(URL, null, null, err); @@ -119,6 +125,7 @@ public void testInvalidUserPassword() { /** * @throws SQLException On failed. */ + @Test public void testUserSqlOnAuthorized() throws SQLException { try (Connection conn = DriverManager.getConnection(URL, "ignite", "ignite")) { conn.createStatement().execute("CREATE USER test WITH PASSWORD 'test'"); @@ -139,6 +146,7 @@ public void testUserSqlOnAuthorized() throws SQLException { /** * @throws SQLException On error. */ + @Test public void testUserSqlWithNotIgniteUser() throws SQLException { try (Connection conn = DriverManager.getConnection(URL, "another_user", "passwd")) { String err = "User management operations are not allowed for user"; @@ -157,6 +165,7 @@ public void testUserSqlWithNotIgniteUser() throws SQLException { /** * @throws SQLException On error. */ + @Test public void testQuotedUsername() throws SQLException { // Spaces checkUserPassword(" test", " "); @@ -235,4 +244,4 @@ private void checkUnauthorizedOperation(final Connection conn, final String sql, } }, SQLException.class, err); } -} \ No newline at end of file +} diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinAutoCloseServerCursorTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinAutoCloseServerCursorTest.java index 0e0bcb7b58c83..f3d19aea5a2e5 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinAutoCloseServerCursorTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinAutoCloseServerCursorTest.java @@ -34,6 +34,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -42,6 +45,7 @@ * Tests an optional optimization that server cursor is closed automatically * when last result set page is transmitted. */ +@RunWith(JUnit4.class) public class JdbcThinAutoCloseServerCursorTest extends JdbcThinAbstractSelfTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -95,6 +99,7 @@ public class JdbcThinAutoCloseServerCursorTest extends JdbcThinAbstractSelfTest * * @throws Exception If failed. */ + @Test public void testQuery() throws Exception { IgniteCache cache = grid(0).cache(CACHE_NAME); @@ -188,6 +193,7 @@ public void testQuery() throws Exception { * * @throws Exception If failed. */ + @Test public void testInsert() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { conn.setSchema('"' + CACHE_NAME + '"'); @@ -217,6 +223,7 @@ public void testInsert() throws Exception { * * @throws Exception If failed. */ + @Test public void testUpdate() throws Exception { IgniteCache cache = grid(0).cache(CACHE_NAME); @@ -242,6 +249,7 @@ public void testUpdate() throws Exception { * * @throws Exception If failed. */ + @Test public void testDelete() throws Exception { IgniteCache cache = grid(0).cache(CACHE_NAME); diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinBatchSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinBatchSelfTest.java index ca74fcd21bba9..6dcb9ec0aa4f9 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinBatchSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinBatchSelfTest.java @@ -28,12 +28,16 @@ import org.apache.ignite.internal.processors.cache.query.IgniteQueryErrorCode; import org.apache.ignite.internal.processors.odbc.SqlStateCode; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.junit.Assert.assertArrayEquals; /** * Statement test. */ +@RunWith(JUnit4.class) public class JdbcThinBatchSelfTest extends JdbcThinAbstractDmlStatementSelfTest { /** SQL query. */ private static final String SQL_PREPARED = "insert into Person(_key, id, firstName, lastName, age) values " + @@ -77,6 +81,7 @@ public class JdbcThinBatchSelfTest extends JdbcThinAbstractDmlStatementSelfTest /** * @throws SQLException If failed. */ + @Test public void testBatch() throws SQLException { final int BATCH_SIZE = 10; @@ -96,6 +101,7 @@ public void testBatch() throws SQLException { /** * @throws SQLException If failed. */ + @Test public void testBatchOnClosedStatement() throws SQLException { final Statement stmt2 = conn.createStatement(); final PreparedStatement pstmt2 = conn.prepareStatement(""); @@ -155,6 +161,7 @@ public void testBatchOnClosedStatement() throws SQLException { /** * @throws SQLException If failed. */ + @Test public void testBatchException() throws SQLException { final int BATCH_SIZE = 7; @@ -198,6 +205,7 @@ public void testBatchException() throws SQLException { /** * @throws SQLException If failed. */ + @Test public void testBatchParseException() throws SQLException { final int BATCH_SIZE = 7; @@ -241,6 +249,7 @@ public void testBatchParseException() throws SQLException { /** * @throws SQLException If failed. */ + @Test public void testBatchMerge() throws SQLException { final int BATCH_SIZE = 7; @@ -260,6 +269,7 @@ public void testBatchMerge() throws SQLException { /** * @throws SQLException If failed. */ + @Test public void testBatchMergeParseException() throws SQLException { final int BATCH_SIZE = 7; @@ -303,6 +313,7 @@ public void testBatchMergeParseException() throws SQLException { /** * @throws SQLException If failed. */ + @Test public void testBatchKeyDuplicatesException() throws SQLException { final int BATCH_SIZE = 7; @@ -348,6 +359,7 @@ public void testBatchKeyDuplicatesException() throws SQLException { /** * @throws SQLException If failed. */ + @Test public void testHeterogeneousBatch() throws SQLException { stmt.addBatch("insert into Person (_key, id, firstName, lastName, age) values ('p0', 0, 'Name0', 'Lastname0', 10)"); stmt.addBatch("insert into Person (_key, id, firstName, lastName, age) values ('p1', 1, 'Name1', 'Lastname1', 20), ('p2', 2, 'Name2', 'Lastname2', 30)"); @@ -365,6 +377,7 @@ public void testHeterogeneousBatch() throws SQLException { /** * @throws SQLException If failed. */ + @Test public void testHeterogeneousBatchException() throws SQLException { stmt.addBatch("insert into Person (_key, id, firstName, lastName, age) values ('p0', 0, 'Name0', 'Lastname0', 10)"); stmt.addBatch("insert into Person (_key, id, firstName, lastName, age) values ('p1', 1, 'Name1', 'Lastname1', 20), ('p2', 2, 'Name2', 'Lastname2', 30)"); @@ -396,6 +409,7 @@ public void testHeterogeneousBatchException() throws SQLException { /** * @throws SQLException If failed. */ + @Test public void testBatchClear() throws SQLException { final int BATCH_SIZE = 7; @@ -418,6 +432,7 @@ public void testBatchClear() throws SQLException { * * @throws SQLException on error. */ + @Test public void testEmptyBatchStreaming() throws SQLException { executeUpdateOn(conn, "SET STREAMING ON"); @@ -436,6 +451,7 @@ public void testEmptyBatchStreaming() throws SQLException { * * @throws SQLException on error. */ + @Test public void testEmptyBatchStreamingPrepared() throws SQLException { try (Statement statement = conn.createStatement()) { statement.executeUpdate("SET STREAMING ON"); @@ -456,6 +472,7 @@ public void testEmptyBatchStreamingPrepared() throws SQLException { /** * @throws SQLException If failed. */ + @Test public void testBatchPrepared() throws SQLException { final int BATCH_SIZE = 10; @@ -482,6 +499,7 @@ public void testBatchPrepared() throws SQLException { /** * @throws SQLException If failed. */ + @Test public void testBatchExceptionPrepared() throws SQLException { final int BATCH_SIZE = 7; @@ -546,6 +564,7 @@ public void testBatchExceptionPrepared() throws SQLException { /** * @throws SQLException If failed. */ + @Test public void testBatchMergePrepared() throws SQLException { final int BATCH_SIZE = 10; @@ -575,6 +594,7 @@ public void testBatchMergePrepared() throws SQLException { /** * @throws SQLException If failed. */ + @Test public void testBatchMergeExceptionPrepared() throws SQLException { final int BATCH_SIZE = 7; @@ -655,6 +675,7 @@ private void populateTable(int size) throws SQLException { /** * @throws SQLException If failed. */ + @Test public void testBatchUpdatePrepared() throws SQLException { final int BATCH_SIZE = 10; @@ -679,6 +700,7 @@ public void testBatchUpdatePrepared() throws SQLException { /** * @throws SQLException If failed. */ + @Test public void testBatchUpdateExceptionPrepared() throws SQLException { final int BATCH_SIZE = 7; @@ -734,6 +756,7 @@ public void testBatchUpdateExceptionPrepared() throws SQLException { /** * @throws SQLException If failed. */ + @Test public void testBatchDeletePrepared() throws SQLException { final int BATCH_SIZE = 10; @@ -758,6 +781,7 @@ public void testBatchDeletePrepared() throws SQLException { /** * @throws SQLException If failed. */ + @Test public void testBatchDeleteExceptionPrepared() throws SQLException { final int BATCH_SIZE = 7; @@ -813,6 +837,7 @@ public void testBatchDeleteExceptionPrepared() throws SQLException { /** * @throws SQLException If failed. */ + @Test public void testBatchClearPrepared() throws SQLException { final int BATCH_SIZE = 10; diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinBulkLoadAbstractSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinBulkLoadAbstractSelfTest.java index 8eeac18b552ab..a1432fcdab76e 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinBulkLoadAbstractSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinBulkLoadAbstractSelfTest.java @@ -42,6 +42,9 @@ import org.apache.ignite.internal.processors.query.QueryUtils; import org.apache.ignite.lang.IgniteClosure; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -50,6 +53,7 @@ /** * COPY statement tests. */ +@RunWith(JUnit4.class) public abstract class JdbcThinBulkLoadAbstractSelfTest extends JdbcThinAbstractDmlStatementSelfTest { /** Subdirectory with CSV files */ private static final String CSV_FILE_SUBDIR = "/modules/clients/src/test/resources/"; @@ -195,6 +199,7 @@ private CacheConfiguration cacheConfigWithQueryEntity() { * * @throws SQLException If failed. */ + @Test public void testBasicStatement() throws SQLException { int updatesCnt = stmt.executeUpdate(BASIC_SQL_COPY_STMT); @@ -209,6 +214,7 @@ public void testBasicStatement() throws SQLException { * * @throws SQLException If failed. */ + @Test public void testEmptyFile() throws SQLException { int updatesCnt = stmt.executeUpdate( "copy from '" + BULKLOAD_EMPTY_CSV_FILE + "' into " + TBL_NAME + @@ -225,6 +231,7 @@ public void testEmptyFile() throws SQLException { * * @throws SQLException If failed. */ + @Test public void testOneLineFile() throws SQLException { int updatesCnt = stmt.executeUpdate( "copy from '" + BULKLOAD_ONE_LINE_CSV_FILE + "' into " + TBL_NAME + @@ -239,6 +246,7 @@ public void testOneLineFile() throws SQLException { /** * Verifies that error is reported for empty charset name. */ + @Test public void testEmptyCharset() { GridTestUtils.assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -255,6 +263,7 @@ public void testEmptyCharset() { /** * Verifies that error is reported for unsupported charset name. */ + @Test public void testNotSupportedCharset() { GridTestUtils.assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -271,6 +280,7 @@ public void testNotSupportedCharset() { /** * Verifies that error is reported for unknown charset name. */ + @Test public void testUnknownCharset() { GridTestUtils.assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -289,6 +299,7 @@ public void testUnknownCharset() { * * @throws SQLException If failed. */ + @Test public void testAsciiCharset() throws SQLException { int updatesCnt = stmt.executeUpdate( "copy from '" + BULKLOAD_TWO_LINES_CSV_FILE + "'" + @@ -307,6 +318,7 @@ public void testAsciiCharset() throws SQLException { * * @throws SQLException If failed. */ + @Test public void testUtf8Charset() throws SQLException { checkBulkLoadWithCharset(BULKLOAD_UTF8_CSV_FILE, "utf-8"); } @@ -316,6 +328,7 @@ public void testUtf8Charset() throws SQLException { * * @throws SQLException If failed. */ + @Test public void testWin1251Charset() throws SQLException { checkBulkLoadWithCharset(BULKLOAD_CP1251_CSV_FILE, "windows-1251"); } @@ -345,6 +358,7 @@ private void checkBulkLoadWithCharset(String fileName, String charsetName) throw * * @throws SQLException If failed. */ + @Test public void testWrongCharset_Utf8AsWin1251() throws SQLException { checkBulkLoadWithWrongCharset(BULKLOAD_UTF8_CSV_FILE, "UTF-8", "windows-1251"); } @@ -355,6 +369,7 @@ public void testWrongCharset_Utf8AsWin1251() throws SQLException { * * @throws SQLException If failed. */ + @Test public void testWrongCharset_Win1251AsUtf8() throws SQLException { checkBulkLoadWithWrongCharset(BULKLOAD_CP1251_CSV_FILE, "windows-1251", "UTF-8"); } @@ -365,6 +380,7 @@ public void testWrongCharset_Win1251AsUtf8() throws SQLException { * * @throws SQLException If failed. */ + @Test public void testWrongCharset_Utf8AsAscii() throws SQLException { checkBulkLoadWithWrongCharset(BULKLOAD_UTF8_CSV_FILE, "UTF-8", "ascii"); } @@ -375,6 +391,7 @@ public void testWrongCharset_Utf8AsAscii() throws SQLException { * * @throws SQLException If failed. */ + @Test public void testWrongCharset_Win1251AsAscii() throws SQLException { checkBulkLoadWithWrongCharset(BULKLOAD_CP1251_CSV_FILE, "windows-1251", "ascii"); } @@ -385,6 +402,7 @@ public void testWrongCharset_Win1251AsAscii() throws SQLException { * * @throws SQLException If failed. */ + @Test public void testPacketSize_1() throws SQLException { int updatesCnt = stmt.executeUpdate(BASIC_SQL_COPY_STMT + " packet_size 1"); @@ -399,6 +417,7 @@ public void testPacketSize_1() throws SQLException { * * @throws SQLException If failed. */ + @Test public void testDefaultCharset() throws SQLException { int updatesCnt = stmt.executeUpdate( "copy from '" + BULKLOAD_UTF8_CSV_FILE + "' into " + TBL_NAME + @@ -415,6 +434,7 @@ public void testDefaultCharset() throws SQLException { * * @throws SQLException If failed. */ + @Test public void testBulkLoadToNonAffinityNode() throws Exception { IgniteEx client = startGrid(getConfiguration("client").setClientMode(true)); @@ -443,6 +463,7 @@ public void testBulkLoadToNonAffinityNode() throws Exception { * * @throws SQLException If failed. */ + @Test public void testDefaultCharsetPacketSize1() throws SQLException { int updatesCnt = stmt.executeUpdate( "copy from '" + BULKLOAD_UTF8_CSV_FILE + "' into " + TBL_NAME + @@ -457,6 +478,7 @@ public void testDefaultCharsetPacketSize1() throws SQLException { /** * Checks that error is reported for a non-existent file. */ + @Test public void testWrongFileName() { GridTestUtils.assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -473,6 +495,7 @@ public void testWrongFileName() { /** * Checks that error is reported if the destination table is missing. */ + @Test public void testMissingTable() { GridTestUtils.assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -489,6 +512,7 @@ public void testMissingTable() { /** * Checks that error is reported when a non-existing column is specified in the SQL command. */ + @Test public void testWrongColumnName() { GridTestUtils.assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -505,6 +529,7 @@ public void testWrongColumnName() { /** * Checks that error is reported if field read from CSV file cannot be converted to the type of the column. */ + @Test public void testWrongColumnType() { GridTestUtils.assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -523,6 +548,7 @@ public void testWrongColumnType() { * * @throws SQLException If failed. */ + @Test public void testFieldsSubset() throws SQLException { int updatesCnt = stmt.executeUpdate( "copy from '" + BULKLOAD_TWO_LINES_CSV_FILE + "'" + @@ -543,6 +569,7 @@ public void testFieldsSubset() throws SQLException { * * @throws SQLException If failed. */ + @Test public void testCreateAndBulkLoadTable() throws SQLException { String tblName = QueryUtils.DFLT_SCHEMA + ".\"PersonTbl\""; @@ -568,6 +595,7 @@ public void testCreateAndBulkLoadTable() throws SQLException { * @throws SQLException If failed. */ @SuppressWarnings("unchecked") + @Test public void testConfigureQueryEntityAndBulkLoad() throws SQLException { ignite(0).getOrCreateCache(cacheConfigWithQueryEntity()); @@ -583,6 +611,7 @@ public void testConfigureQueryEntityAndBulkLoad() throws SQLException { * * @throws SQLException If failed. */ + @Test public void testMultipleStatement() throws SQLException { GridTestUtils.assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -608,6 +637,7 @@ public void testMultipleStatement() throws SQLException { * * @throws SQLException If failed. */ + @Test public void testExecuteQuery() throws SQLException { GridTestUtils.assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -623,6 +653,7 @@ public void testExecuteQuery() throws SQLException { * * @throws SQLException If failed. */ + @Test public void testExecute() throws SQLException { boolean isRowSet = stmt.execute(BASIC_SQL_COPY_STMT); @@ -636,6 +667,7 @@ public void testExecute() throws SQLException { * * @throws SQLException If failed. */ + @Test public void testPreparedStatementWithExecuteUpdate() throws SQLException { PreparedStatement pstmt = conn.prepareStatement(BASIC_SQL_COPY_STMT); @@ -651,6 +683,7 @@ public void testPreparedStatementWithExecuteUpdate() throws SQLException { * * @throws SQLException If failed. */ + @Test public void testPreparedStatementWithParameter() throws SQLException { GridTestUtils.assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -673,6 +706,7 @@ public void testPreparedStatementWithParameter() throws SQLException { * * @throws SQLException If failed. */ + @Test public void testPreparedStatementWithExecute() throws SQLException { PreparedStatement pstmt = conn.prepareStatement(BASIC_SQL_COPY_STMT); @@ -686,6 +720,7 @@ public void testPreparedStatementWithExecute() throws SQLException { /** * Verifies that COPY command is rejected by PreparedStatement.executeQuery(). */ + @Test public void testPreparedStatementWithExecuteQuery() { GridTestUtils.assertThrows(log, new Callable() { @Override public Object call() throws Exception { diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinComplexDmlDdlCustomSchemaSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinComplexDmlDdlCustomSchemaSelfTest.java index 8fd9356533be5..e4d7d1519c2d2 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinComplexDmlDdlCustomSchemaSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinComplexDmlDdlCustomSchemaSelfTest.java @@ -22,10 +22,14 @@ import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Base class for complex SQL tests based on JDBC driver. */ +@RunWith(JUnit4.class) public class JdbcThinComplexDmlDdlCustomSchemaSelfTest extends JdbcThinComplexDmlDdlSelfTest { /** Simple schema. */ private static final String SCHEMA_1 = "SCHEMA_1"; @@ -55,6 +59,7 @@ public class JdbcThinComplexDmlDdlCustomSchemaSelfTest extends JdbcThinComplexDm * * @throws Exception If failed. */ + @Test public void testCreateSelectDropEscapedSchema() throws Exception { try { curSchema = SCHEMA_2; @@ -71,8 +76,9 @@ public void testCreateSelectDropEscapedSchema() throws Exception { * * @throws Exception If failed. */ + @Test public void testMultiple() throws Exception { testCreateSelectDrop(); testCreateSelectDrop(); } -} \ No newline at end of file +} diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinComplexDmlDdlSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinComplexDmlDdlSelfTest.java index 88fcab2eab6b0..f721e0c0eeb8a 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinComplexDmlDdlSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinComplexDmlDdlSelfTest.java @@ -39,10 +39,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Base class for complex SQL tests based on JDBC driver. */ +@RunWith(JUnit4.class) public class JdbcThinComplexDmlDdlSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -127,6 +131,7 @@ protected Connection createConnection() throws SQLException { /** * @throws Exception If failed. */ + @Test public void testCreateSelectDrop() throws Exception { conn = createConnection(); @@ -476,4 +481,4 @@ private Row(Object[] row) { return Arrays.toString(row); } } -} \ No newline at end of file +} diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinComplexQuerySelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinComplexQuerySelfTest.java index f93c4fa0a4dd8..19903e331d8fb 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinComplexQuerySelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinComplexQuerySelfTest.java @@ -31,6 +31,9 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -39,6 +42,7 @@ /** * Tests for complex queries (joins, etc.). */ +@RunWith(JUnit4.class) public class JdbcThinComplexQuerySelfTest extends JdbcThinAbstractSelfTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -130,6 +134,7 @@ protected CacheConfiguration cacheConfiguration() { /** * @throws Exception If failed. */ + @Test public void testJoin() throws Exception { ResultSet rs = stmt.executeQuery( "select p.id, p.name, o.name as orgName from \"pers\".Person p, \"org\".Organization o where p.orgId = o.id"); @@ -165,6 +170,7 @@ else if (id == 3) { /** * @throws Exception If failed. */ + @Test public void testJoinWithoutAlias() throws Exception { ResultSet rs = stmt.executeQuery( "select p.id, p.name, o.name from \"pers\".Person p, \"org\".Organization o where p.orgId = o.id"); @@ -203,6 +209,7 @@ else if (id == 3) { /** * @throws Exception If failed. */ + @Test public void testIn() throws Exception { ResultSet rs = stmt.executeQuery("select name from \"pers\".Person where age in (25, 35)"); @@ -223,6 +230,7 @@ public void testIn() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBetween() throws Exception { ResultSet rs = stmt.executeQuery("select name from \"pers\".Person where age between 24 and 36"); @@ -243,6 +251,7 @@ public void testBetween() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCalculatedValue() throws Exception { ResultSet rs = stmt.executeQuery("select age * 2 from \"pers\".Person"); @@ -320,4 +329,4 @@ private Organization(int id, String name) { this.name = name; } } -} \ No newline at end of file +} diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionMultipleAddressesTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionMultipleAddressesTest.java index 4f6651c2c0b7b..a5840c6322504 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionMultipleAddressesTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionMultipleAddressesTest.java @@ -45,11 +45,15 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * JDBC driver reconnect test with multiple addresses. */ @SuppressWarnings("ThrowableNotThrown") +@RunWith(JUnit4.class) public class JdbcThinConnectionMultipleAddressesTest extends JdbcThinAbstractSelfTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -131,6 +135,7 @@ private CacheConfiguration cacheConfiguration(@NotNull String name) throws Excep /** * @throws Exception If failed. */ + @Test public void testMultipleAddressesConnect() throws Exception { try (Connection conn = DriverManager.getConnection(url())) { try (Statement stmt = conn.createStatement()) { @@ -148,6 +153,7 @@ public void testMultipleAddressesConnect() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPortRangeConnect() throws Exception { try (Connection conn = DriverManager.getConnection(URL_PORT_RANGE)) { try (Statement stmt = conn.createStatement()) { @@ -165,6 +171,7 @@ public void testPortRangeConnect() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultipleAddressesOneNodeFailoverOnStatementExecute() throws Exception { checkReconnectOnStatementExecute(url(), false); } @@ -172,6 +179,7 @@ public void testMultipleAddressesOneNodeFailoverOnStatementExecute() throws Exce /** * @throws Exception If failed. */ + @Test public void testMultipleAddressesAllNodesFailoverOnStatementExecute() throws Exception { checkReconnectOnStatementExecute(url(), true); } @@ -179,6 +187,7 @@ public void testMultipleAddressesAllNodesFailoverOnStatementExecute() throws Exc /** * @throws Exception If failed. */ + @Test public void testPortRangeAllNodesFailoverOnStatementExecute() throws Exception { checkReconnectOnStatementExecute(URL_PORT_RANGE, true); } @@ -186,6 +195,7 @@ public void testPortRangeAllNodesFailoverOnStatementExecute() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultipleAddressesOneNodeFailoverOnResultSet() throws Exception { checkReconnectOnResultSet(url(), false); } @@ -193,6 +203,7 @@ public void testMultipleAddressesOneNodeFailoverOnResultSet() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultipleAddressesAllNodesFailoverOnResultSet() throws Exception { checkReconnectOnResultSet(url(), true); } @@ -200,6 +211,7 @@ public void testMultipleAddressesAllNodesFailoverOnResultSet() throws Exception /** * @throws Exception If failed. */ + @Test public void testPortRangeAllNodesFailoverOnResultSet() throws Exception { checkReconnectOnResultSet(URL_PORT_RANGE, true); } @@ -207,6 +219,7 @@ public void testPortRangeAllNodesFailoverOnResultSet() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultipleAddressesOneNodeFailoverOnMeta() throws Exception { checkReconnectOnMeta(url(), false); } @@ -214,6 +227,7 @@ public void testMultipleAddressesOneNodeFailoverOnMeta() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultipleAddressesAllNodesFailoverOnMeta() throws Exception { checkReconnectOnMeta(url(), true); } @@ -221,6 +235,7 @@ public void testMultipleAddressesAllNodesFailoverOnMeta() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPortRangeAllNodesFailoverOnMeta() throws Exception { checkReconnectOnMeta(URL_PORT_RANGE, true); } @@ -228,6 +243,7 @@ public void testPortRangeAllNodesFailoverOnMeta() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultipleAddressesOneNodeFailoverOnStreaming() throws Exception { checkReconnectOnStreaming(url(), false); } @@ -235,6 +251,7 @@ public void testMultipleAddressesOneNodeFailoverOnStreaming() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientConnectionMXBean() throws Exception { Connection conn = DriverManager.getConnection(URL_PORT_RANGE); @@ -548,4 +565,4 @@ private void restart(boolean all) throws Exception { if (all) startGrids(NODES_CNT); } -} \ No newline at end of file +} diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionMvccEnabledSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionMvccEnabledSelfTest.java index a26f547dbdf76..d186dcd7970e0 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionMvccEnabledSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionMvccEnabledSelfTest.java @@ -33,6 +33,9 @@ import org.apache.ignite.testframework.GridStringLogger; import org.apache.ignite.testframework.GridTestUtils; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.sql.Connection.TRANSACTION_NONE; import static java.sql.Connection.TRANSACTION_READ_COMMITTED; @@ -44,6 +47,7 @@ * Connection test. */ @SuppressWarnings("ThrowableNotThrown") +@RunWith(JUnit4.class) public class JdbcThinConnectionMvccEnabledSelfTest extends JdbcThinAbstractSelfTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -99,6 +103,7 @@ private CacheConfiguration cacheConfiguration(@NotNull String name) { /** * @throws Exception If failed. */ + @Test public void testMetadataDefaults() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { DatabaseMetaData meta = conn.getMetaData(); @@ -117,6 +122,7 @@ public void testMetadataDefaults() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetSetAutoCommit() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { assertTrue(conn.getMetaData().supportsTransactions()); @@ -145,6 +151,7 @@ public void testGetSetAutoCommit() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCommit() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { assertTrue(conn.getMetaData().supportsTransactions()); @@ -180,6 +187,7 @@ public void testCommit() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRollback() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { assertTrue(conn.getMetaData().supportsTransactions()); @@ -215,6 +223,7 @@ public void testRollback() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSetSavepoint() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { assert !conn.getMetaData().supportsSavepoints(); @@ -254,6 +263,7 @@ public void testSetSavepoint() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSetSavepointName() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { assert !conn.getMetaData().supportsSavepoints(); @@ -308,6 +318,7 @@ public void testSetSavepointName() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRollbackSavePoint() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { assert !conn.getMetaData().supportsSavepoints(); @@ -373,4 +384,4 @@ private Savepoint getFakeSavepoint() { } }; } -} \ No newline at end of file +} diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionSSLTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionSSLTest.java index 355a198c56672..10d6570e8b8b2 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionSSLTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionSSLTest.java @@ -37,11 +37,15 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.ssl.SslContextFactory; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * SSL connection test. */ @SuppressWarnings("ThrowableNotThrown") +@RunWith(JUnit4.class) public class JdbcThinConnectionSSLTest extends JdbcThinAbstractSelfTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -95,6 +99,7 @@ public class JdbcThinConnectionSSLTest extends JdbcThinAbstractSelfTest { /** * @throws Exception If failed. */ + @Test public void testConnection() throws Exception { setSslCtxFactoryToCli = true; sslCtxFactory = getTestSslContextFactory(); @@ -118,6 +123,7 @@ public void testConnection() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConnectionTrustAll() throws Exception { setSslCtxFactoryToCli = true; sslCtxFactory = getTestSslContextFactory(); @@ -140,6 +146,7 @@ public void testConnectionTrustAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConnectionUseIgniteFactory() throws Exception { setSslCtxFactoryToIgnite = true; sslCtxFactory = getTestSslContextFactory(); @@ -163,6 +170,7 @@ public void testConnectionUseIgniteFactory() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDefaultContext() throws Exception { // Store exists default SSL context to restore after test. final SSLContext dfltSslCtx = SSLContext.getDefault(); @@ -200,6 +208,7 @@ public void testDefaultContext() throws Exception { /** * @throws Exception If failed. */ + @Test public void testContextFactory() throws Exception { setSslCtxFactoryToCli = true; sslCtxFactory = getTestSslContextFactory(); @@ -218,6 +227,7 @@ public void testContextFactory() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSslServerAndPlainClient() throws Exception { setSslCtxFactoryToCli = true; sslCtxFactory = getTestSslContextFactory(); @@ -241,6 +251,7 @@ public void testSslServerAndPlainClient() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvalidKeystoreConfig() throws Exception { setSslCtxFactoryToCli = true; @@ -329,6 +340,7 @@ public void testInvalidKeystoreConfig() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUnknownClientCertificate() throws Exception { setSslCtxFactoryToCli = true; sslCtxFactory = getTestSslContextFactory(); @@ -356,6 +368,7 @@ public void testUnknownClientCertificate() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUnsupportedSslProtocol() throws Exception { setSslCtxFactoryToCli = true; sslCtxFactory = getTestSslContextFactory(); @@ -384,6 +397,7 @@ public void testUnsupportedSslProtocol() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvalidKeyAlgorithm() throws Exception { setSslCtxFactoryToCli = true; sslCtxFactory = getTestSslContextFactory(); @@ -412,6 +426,7 @@ public void testInvalidKeyAlgorithm() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvalidKeyStoreType() throws Exception { setSslCtxFactoryToCli = true; sslCtxFactory = getTestSslContextFactory(); @@ -476,4 +491,4 @@ public static class TestSSLFactory implements Factory { return getTestSslContextFactory().create().getSocketFactory(); } } -} \ No newline at end of file +} diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionSelfTest.java index 5d2a33ec26d20..11f9770846aea 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionSelfTest.java @@ -53,6 +53,9 @@ import org.apache.ignite.testframework.GridStringLogger; import org.apache.ignite.testframework.GridTestUtils; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.sql.Connection.TRANSACTION_NONE; import static java.sql.Connection.TRANSACTION_READ_COMMITTED; @@ -72,6 +75,7 @@ * Connection test. */ @SuppressWarnings("ThrowableNotThrown") +@RunWith(JUnit4.class) public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -131,6 +135,7 @@ private CacheConfiguration cacheConfiguration(@NotNull String name) throws Excep * @throws Exception If failed. */ @SuppressWarnings({"EmptyTryBlock", "unused"}) + @Test public void testDefaults() throws Exception { try (Connection conn = DriverManager.getConnection("jdbc:ignite:thin://127.0.0.1")) { // No-op. @@ -144,6 +149,7 @@ public void testDefaults() throws Exception { /** * Test invalid endpoint. */ + @Test public void testInvalidEndpoint() { assertInvalid("jdbc:ignite:thin://", "Host name is empty"); assertInvalid("jdbc:ignite:thin://:10000", "Host name is empty"); @@ -160,6 +166,7 @@ public void testInvalidEndpoint() { * * @throws Exception If failed. */ + @Test public void testSocketBuffers() throws Exception { final int dfltDufSize = 64 * 1024; @@ -197,6 +204,7 @@ public void testSocketBuffers() throws Exception { * * @throws Exception If failed. */ + @Test public void testSocketBuffersSemicolon() throws Exception { final int dfltDufSize = 64 * 1024; @@ -229,6 +237,7 @@ public void testSocketBuffersSemicolon() throws Exception { * * @throws Exception If failed. */ + @Test public void testSqlHints() throws Exception { try (Connection conn = DriverManager.getConnection("jdbc:ignite:thin://127.0.0.1")) { assertHints(conn, false, false, false, false, false, false); @@ -269,6 +278,7 @@ public void testSqlHints() throws Exception { * * @throws Exception If failed. */ + @Test public void testSqlHintsSemicolon() throws Exception { try (Connection conn = DriverManager.getConnection("jdbc:ignite:thin://127.0.0.1;distributedJoins=true")) { assertHints(conn, true, false, false, false, false, false); @@ -327,6 +337,7 @@ private void assertHints(Connection conn, boolean distributedJoins, boolean enfo * * @throws Exception If failed. */ + @Test public void testTcpNoDelay() throws Exception { assertInvalid("jdbc:ignite:thin://127.0.0.1?tcpNoDelay=0", "Invalid property value. [name=tcpNoDelay, val=0, choices=[true, false]]"); @@ -366,6 +377,7 @@ public void testTcpNoDelay() throws Exception { * * @throws Exception If failed. */ + @Test public void testTcpNoDelaySemicolon() throws Exception { assertInvalid("jdbc:ignite:thin://127.0.0.1;tcpNoDelay=0", "Invalid property value. [name=tcpNoDelay, val=0, choices=[true, false]]"); @@ -401,6 +413,7 @@ public void testTcpNoDelaySemicolon() throws Exception { * * @throws Exception If failed. */ + @Test public void testAutoCloseServerCursorProperty() throws Exception { String url = "jdbc:ignite:thin://127.0.0.1?autoCloseServerCursor"; @@ -437,6 +450,7 @@ public void testAutoCloseServerCursorProperty() throws Exception { * * @throws Exception If failed. */ + @Test public void testAutoCloseServerCursorPropertySemicolon() throws Exception { String url = "jdbc:ignite:thin://127.0.0.1;autoCloseServerCursor"; @@ -469,6 +483,7 @@ public void testAutoCloseServerCursorPropertySemicolon() throws Exception { * * @throws Exception If failed. */ + @Test public void testSchema() throws Exception { assertInvalid("jdbc:ignite:thin://127.0.0.1/qwe/qwe", "Invalid URL format (only schema name is allowed in URL path parameter 'host:port[/schemaName]')" ); @@ -491,6 +506,7 @@ public void testSchema() throws Exception { * * @throws Exception If failed. */ + @Test public void testSchemaSemicolon() throws Exception { try (Connection conn = DriverManager.getConnection("jdbc:ignite:thin://127.0.0.1;schema=public")) { assertEquals("Invalid schema", "PUBLIC", conn.getSchema()); @@ -539,6 +555,7 @@ private void assertInvalid(final String url, String errMsg) { * @throws Exception If failed. */ @SuppressWarnings("ThrowableNotThrown") + @Test public void testClose() throws Exception { final Connection conn; @@ -565,6 +582,7 @@ public void testClose() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCreateStatement() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { try (Statement stmt = conn.createStatement()) { @@ -587,6 +605,7 @@ public void testCreateStatement() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCreateStatement2() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { int [] rsTypes = new int[] @@ -640,6 +659,7 @@ public void testCreateStatement2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCreateStatement3() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { int [] rsTypes = new int[] @@ -699,6 +719,7 @@ public void testCreateStatement3() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPrepareStatement() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { // null query text @@ -732,6 +753,7 @@ public void testPrepareStatement() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPrepareStatement3() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { final String sqlText = "select * from test where param = ?"; @@ -792,6 +814,7 @@ public void testPrepareStatement3() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPrepareStatement4() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { final String sqlText = "select * from test where param = ?"; @@ -857,6 +880,7 @@ public void testPrepareStatement4() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPrepareStatementAutoGeneratedKeysUnsupported() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { final String sqlText = "insert into test (val) values (?)"; @@ -906,6 +930,7 @@ public void testPrepareStatementAutoGeneratedKeysUnsupported() throws Exception /** * @throws Exception If failed. */ + @Test public void testPrepareCallUnsupported() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { final String sqlText = "exec test()"; @@ -946,6 +971,7 @@ public void testPrepareCallUnsupported() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNativeSql() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { // null query text @@ -977,6 +1003,7 @@ public void testNativeSql() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetSetAutoCommit() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { boolean ac0 = conn.getAutoCommit(); @@ -1001,6 +1028,7 @@ public void testGetSetAutoCommit() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCommit() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { // Should not be called in auto-commit mode @@ -1045,6 +1073,7 @@ public void testCommit() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRollback() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { // Should not be called in auto-commit mode @@ -1074,6 +1103,7 @@ public void testRollback() throws Exception { /** * @throws Exception if failed. */ + @Test public void testBeginFailsWhenMvccIsDisabled() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { conn.createStatement().execute("BEGIN"); @@ -1088,6 +1118,7 @@ public void testBeginFailsWhenMvccIsDisabled() throws Exception { /** * @throws Exception if failed. */ + @Test public void testCommitIgnoredWhenMvccIsDisabled() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { conn.setAutoCommit(false); @@ -1101,6 +1132,7 @@ public void testCommitIgnoredWhenMvccIsDisabled() throws Exception { /** * @throws Exception if failed. */ + @Test public void testRollbackIgnoredWhenMvccIsDisabled() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { conn.setAutoCommit(false); @@ -1115,6 +1147,7 @@ public void testRollbackIgnoredWhenMvccIsDisabled() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetMetaData() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { DatabaseMetaData meta = conn.getMetaData(); @@ -1135,6 +1168,7 @@ public void testGetMetaData() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetSetReadOnly() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { conn.close(); @@ -1158,6 +1192,7 @@ public void testGetSetReadOnly() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetSetCatalog() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { assert !conn.getMetaData().supportsCatalogsInDataManipulation(); @@ -1189,6 +1224,7 @@ public void testGetSetCatalog() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetSetTransactionIsolation() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { // Invalid parameter value @@ -1239,6 +1275,7 @@ public void testGetSetTransactionIsolation() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClearGetWarnings() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { SQLWarning warn = conn.getWarnings(); @@ -1272,6 +1309,7 @@ public void testClearGetWarnings() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetSetTypeMap() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { GridTestUtils.assertThrows(log, @@ -1327,6 +1365,7 @@ public void testGetSetTypeMap() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetSetHoldability() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { // default value @@ -1380,6 +1419,7 @@ public void testGetSetHoldability() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSetSavepoint() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { assert !conn.getMetaData().supportsSavepoints(); @@ -1410,6 +1450,7 @@ public void testSetSavepoint() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSetSavepointName() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { assert !conn.getMetaData().supportsSavepoints(); @@ -1455,6 +1496,7 @@ public void testSetSavepointName() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRollbackSavePoint() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { assert !conn.getMetaData().supportsSavepoints(); @@ -1500,6 +1542,7 @@ public void testRollbackSavePoint() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReleaseSavepoint() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { assert !conn.getMetaData().supportsSavepoints(); @@ -1538,6 +1581,7 @@ public void testReleaseSavepoint() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCreateClob() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { // Unsupported @@ -1568,6 +1612,7 @@ public void testCreateClob() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCreateBlob() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { // Unsupported @@ -1598,6 +1643,7 @@ public void testCreateBlob() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCreateNClob() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { // Unsupported @@ -1628,6 +1674,7 @@ public void testCreateNClob() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCreateSQLXML() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { // Unsupported @@ -1658,6 +1705,7 @@ public void testCreateSQLXML() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetSetClientInfoPair() throws Exception { // fail("https://issues.apache.org/jira/browse/IGNITE-5425"); @@ -1693,6 +1741,7 @@ public void testGetSetClientInfoPair() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetSetClientInfoProperties() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { final String name = "ApplicationName"; @@ -1731,6 +1780,7 @@ public void testGetSetClientInfoProperties() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCreateArrayOf() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { final String typeName = "varchar"; @@ -1771,6 +1821,7 @@ public void testCreateArrayOf() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCreateStruct() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { // Invalid typename @@ -1807,6 +1858,7 @@ public void testCreateStruct() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetSetSchema() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { assertEquals("PUBLIC", conn.getSchema()); @@ -1840,6 +1892,7 @@ public void testGetSetSchema() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAbort() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { //Invalid executor @@ -1866,6 +1919,7 @@ public void testAbort() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetSetNetworkTimeout() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { // default @@ -1924,6 +1978,7 @@ public void testGetSetNetworkTimeout() throws Exception { /** * Test that attempting to supply invalid nested TX mode to driver fails on the client. */ + @Test public void testInvalidNestedTxMode() { GridTestUtils.assertThrows(null, new Callable() { @Override public Object call() throws Exception { @@ -1939,6 +1994,7 @@ public void testInvalidNestedTxMode() { * We have to do this without explicit {@link Connection} as long as there's no other way to bypass validation and * supply a malformed {@link ConnectionProperties} to {@link JdbcThinTcpIo}. */ + @Test public void testInvalidNestedTxModeOnServerSide() throws SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException, IOException { ConnectionPropertiesImpl connProps = new ConnectionPropertiesImpl(); @@ -1973,6 +2029,7 @@ public void testInvalidNestedTxModeOnServerSide() throws SQLException, NoSuchMet /** */ + @Test public void testSslClientAndPlainServer() { GridTestUtils.assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -1990,6 +2047,7 @@ public void testSslClientAndPlainServer() { /** * @throws Exception If failed. */ + @Test public void testMultithreadingException() throws Exception { int threadCnt = 10; diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinDataSourceSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinDataSourceSelfTest.java index 6040bed3e2cf8..cead71a69188f 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinDataSourceSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinDataSourceSelfTest.java @@ -43,11 +43,15 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * DataSource test. */ @SuppressWarnings("ThrowableNotThrown") +@RunWith(JUnit4.class) public class JdbcThinDataSourceSelfTest extends JdbcThinAbstractSelfTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -98,6 +102,7 @@ private CacheConfiguration cacheConfiguration(String name) throws Exception { /** * @throws Exception If failed. */ + @Test public void testJndi() throws Exception { IgniteJdbcThinDataSource ids = new IgniteJdbcThinDataSource(); @@ -117,6 +122,7 @@ public void testJndi() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUrlCompose() throws Exception { IgniteJdbcThinDataSource ids = new IgniteJdbcThinDataSource(); @@ -139,6 +145,7 @@ public void testUrlCompose() throws Exception { /** * @throws Exception If failed. */ + @Test public void testResetUrl() throws Exception { IgniteJdbcThinDataSource ids = new IgniteJdbcThinDataSource(); @@ -157,6 +164,7 @@ public void testResetUrl() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSqlHints() throws Exception { IgniteJdbcThinDataSource ids = new IgniteJdbcThinDataSource(); @@ -195,6 +203,7 @@ public void testSqlHints() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTcpNoDelay() throws Exception { IgniteJdbcThinDataSource ids = new IgniteJdbcThinDataSource(); @@ -218,6 +227,7 @@ public void testTcpNoDelay() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSocketBuffers() throws Exception { final IgniteJdbcThinDataSource ids = new IgniteJdbcThinDataSource(); @@ -426,4 +436,4 @@ public static class JndiMockContext implements Context { return null; } } -} \ No newline at end of file +} diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinDeleteStatementSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinDeleteStatementSelfTest.java index 9d0665b8fe3d2..d11e5bb958615 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinDeleteStatementSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinDeleteStatementSelfTest.java @@ -20,14 +20,19 @@ import java.sql.SQLException; import java.util.Arrays; import java.util.HashSet; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class JdbcThinDeleteStatementSelfTest extends JdbcThinAbstractUpdateStatementSelfTest { /** * @throws SQLException If failed. */ + @Test public void testExecute() throws SQLException { conn.createStatement().execute("delete from Person where cast(substring(_key, 2, 1) as int) % 2 = 0"); @@ -38,6 +43,7 @@ public void testExecute() throws SQLException { /** * @throws SQLException If failed. */ + @Test public void testExecuteUpdate() throws SQLException { int res = conn.createStatement().executeUpdate("delete from Person where cast(substring(_key, 2, 1) as int) % 2 = 0"); diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinDynamicIndexAbstractSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinDynamicIndexAbstractSelfTest.java index 539713aeb4cdb..765ca839d2759 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinDynamicIndexAbstractSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinDynamicIndexAbstractSelfTest.java @@ -33,10 +33,14 @@ import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test that checks indexes handling with JDBC. */ +@RunWith(JUnit4.class) public abstract class JdbcThinDynamicIndexAbstractSelfTest extends JdbcThinAbstractDmlStatementSelfTest { /** */ private static final String CREATE_INDEX = "create index idx on Person (id desc)"; @@ -143,6 +147,7 @@ private Object getSingleValue(ResultSet rs) throws SQLException { * Test that after index creation index is used by queries. * @throws SQLException If failed. */ + @Test public void testCreateIndex() throws SQLException { assertSize(3); @@ -173,6 +178,7 @@ public void testCreateIndex() throws SQLException { * Test that creating an index with duplicate name yields an error. * @throws SQLException If failed. */ + @Test public void testCreateIndexWithDuplicateName() throws SQLException { jdbcRun(CREATE_INDEX); @@ -189,6 +195,7 @@ public void testCreateIndexWithDuplicateName() throws SQLException { * Test that creating an index with duplicate name does not yield an error with {@code IF NOT EXISTS}. * @throws SQLException If failed. */ + @Test public void testCreateIndexIfNotExists() throws SQLException { jdbcRun(CREATE_INDEX); @@ -200,6 +207,7 @@ public void testCreateIndexIfNotExists() throws SQLException { * Test that after index drop there are no attempts to use it, and data state remains intact. * @throws SQLException If failed. */ + @Test public void testDropIndex() throws SQLException { assertSize(3); @@ -229,6 +237,7 @@ public void testDropIndex() throws SQLException { /** * Test that dropping a non-existent index yields an error. */ + @Test public void testDropMissingIndex() { GridTestUtils.assertThrowsAnyCause(log, new Callable() { @Override public Void call() throws Exception { @@ -243,6 +252,7 @@ public void testDropMissingIndex() { * Test that dropping a non-existent index does not yield an error with {@code IF EXISTS}. * @throws SQLException If failed. */ + @Test public void testDropMissingIndexIfExists() throws SQLException { // Despite index missing, this does not yield an error. jdbcRun(DROP_INDEX_IF_EXISTS); @@ -252,6 +262,7 @@ public void testDropMissingIndexIfExists() throws SQLException { * Test that changes in cache affect index, and vice versa. * @throws SQLException If failed. */ + @Test public void testIndexState() throws SQLException { IgniteCache cache = cache(); diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinEmptyCacheSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinEmptyCacheSelfTest.java index 87c1428f78b34..f67fc522b2045 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinEmptyCacheSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinEmptyCacheSelfTest.java @@ -26,6 +26,9 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -33,6 +36,7 @@ /** * Tests for empty cache. */ +@RunWith(JUnit4.class) public class JdbcThinEmptyCacheSelfTest extends JdbcThinAbstractSelfTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -104,6 +108,7 @@ public class JdbcThinEmptyCacheSelfTest extends JdbcThinAbstractSelfTest { /** * @throws Exception If failed. */ + @Test public void testSelectNumber() throws Exception { ResultSet rs = stmt.executeQuery("select 1"); @@ -122,6 +127,7 @@ public void testSelectNumber() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSelectString() throws Exception { ResultSet rs = stmt.executeQuery("select 'str'"); @@ -135,4 +141,4 @@ public void testSelectString() throws Exception { assert cnt == 1; } -} \ No newline at end of file +} diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinErrorsSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinErrorsSelfTest.java index 633cdc394a04d..218b39e54d779 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinErrorsSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinErrorsSelfTest.java @@ -24,12 +24,16 @@ import java.sql.Statement; import org.apache.ignite.jdbc.JdbcErrorsAbstractSelfTest; import org.apache.ignite.lang.IgniteCallable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.junit.Assert.assertArrayEquals; /** * Test SQLSTATE codes propagation with thin client driver. */ +@RunWith(JUnit4.class) public class JdbcThinErrorsSelfTest extends JdbcErrorsAbstractSelfTest { /** {@inheritDoc} */ @Override protected Connection getConnection() throws SQLException { @@ -41,6 +45,7 @@ public class JdbcThinErrorsSelfTest extends JdbcErrorsAbstractSelfTest { * due to communication problems (not due to clear misconfiguration). * @throws SQLException if failed. */ + @Test public void testConnectionError() throws SQLException { checkErrorState(new IgniteCallable() { @Override public Void call() throws Exception { @@ -55,6 +60,7 @@ public void testConnectionError() throws SQLException { * Test error code for the case when connection string is a mess. * @throws SQLException if failed. */ + @Test public void testInvalidConnectionStringFormat() throws SQLException { checkErrorState(new IgniteCallable() { @Override public Void call() throws Exception { @@ -71,6 +77,7 @@ public void testInvalidConnectionStringFormat() throws SQLException { * @throws SQLException if failed. */ @SuppressWarnings("MagicConstant") + @Test public void testInvalidIsolationLevel() throws SQLException { checkErrorState(new ConnClosure() { @Override public void run(Connection conn) throws Exception { @@ -83,6 +90,7 @@ public void testInvalidIsolationLevel() throws SQLException { * Test error code for the case when error is caused on batch execution. * @throws SQLException if failed. */ + @Test public void testBatchUpdateException() throws SQLException { try (final Connection conn = getConnection()) { try (Statement stmt = conn.createStatement()) { @@ -113,6 +121,7 @@ public void testBatchUpdateException() throws SQLException { * Check that unsupported explain of update operation causes Exception on the driver side with correct code and * message. */ + @Test public void testExplainUpdatesUnsupported() throws Exception{ checkErrorState((conn) -> { try (Statement statement = conn.createStatement()) { diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinInsertStatementSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinInsertStatementSelfTest.java index bf55da0879eb2..50c197aad5ffb 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinInsertStatementSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinInsertStatementSelfTest.java @@ -25,10 +25,14 @@ import java.util.HashSet; import java.util.concurrent.Callable; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Statement test. */ +@RunWith(JUnit4.class) public class JdbcThinInsertStatementSelfTest extends JdbcThinAbstractDmlStatementSelfTest { /** SQL query. */ private static final String SQL = "insert into Person(_key, id, firstName, lastName, age) values " + @@ -140,6 +144,7 @@ public class JdbcThinInsertStatementSelfTest extends JdbcThinAbstractDmlStatemen /** * @throws SQLException If failed. */ + @Test public void testExecuteUpdate() throws SQLException { assertEquals(3, stmt.executeUpdate(SQL)); } @@ -147,6 +152,7 @@ public void testExecuteUpdate() throws SQLException { /** * @throws SQLException If failed. */ + @Test public void testPreparedExecuteUpdate() throws SQLException { assertEquals(3, prepStmt.executeUpdate()); } @@ -154,6 +160,7 @@ public void testPreparedExecuteUpdate() throws SQLException { /** * @throws SQLException If failed. */ + @Test public void testExecute() throws SQLException { assertFalse(stmt.execute(SQL)); } @@ -161,6 +168,7 @@ public void testExecute() throws SQLException { /** * @throws SQLException If failed. */ + @Test public void testPreparedExecute() throws SQLException { assertFalse(prepStmt.execute()); } @@ -168,6 +176,7 @@ public void testPreparedExecute() throws SQLException { /** * */ + @Test public void testDuplicateKeys() { jcache(0).put("p2", new Person(2, "Joe", "Black", 35)); diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinLocalQueriesSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinLocalQueriesSelfTest.java index 1e28e52d3e3d6..7bb7168e6e6e7 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinLocalQueriesSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinLocalQueriesSelfTest.java @@ -23,10 +23,14 @@ import java.util.Map; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.internal.U; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test that replicated-only query is executed locally. */ +@RunWith(JUnit4.class) public class JdbcThinLocalQueriesSelfTest extends JdbcThinAbstractSelfTest { /** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { @@ -47,6 +51,7 @@ public class JdbcThinLocalQueriesSelfTest extends JdbcThinAbstractSelfTest { /** * */ + @Test public void testLocalThinJdbcQuery() throws SQLException { try (Connection c = connect(grid(0), "replicatedOnly=true")) { execute(c, "CREATE TABLE Company(id int primary key, name varchar) WITH " + diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinMergeStatementSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinMergeStatementSelfTest.java index 9d9467f3bd754..11911ba83f07f 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinMergeStatementSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinMergeStatementSelfTest.java @@ -21,10 +21,14 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * MERGE statement test. */ +@RunWith(JUnit4.class) public class JdbcThinMergeStatementSelfTest extends JdbcThinAbstractDmlStatementSelfTest { /** SQL query. */ private static final String SQL = "merge into Person(_key, id, firstName, lastName, age) values " + @@ -117,6 +121,7 @@ public class JdbcThinMergeStatementSelfTest extends JdbcThinAbstractDmlStatement /** * @throws SQLException If failed. */ + @Test public void testExecuteUpdate() throws SQLException { assertEquals(3, stmt.executeUpdate(SQL)); } @@ -124,6 +129,7 @@ public void testExecuteUpdate() throws SQLException { /** * @throws SQLException If failed. */ + @Test public void testExecute() throws SQLException { assertFalse(stmt.execute(SQL)); } diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinMetadataPrimaryKeysSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinMetadataPrimaryKeysSelfTest.java index 5733b72fef2ae..a4ef3119b3c2b 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinMetadataPrimaryKeysSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinMetadataPrimaryKeysSelfTest.java @@ -27,10 +27,14 @@ import java.util.Arrays; import java.util.List; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Verifies that primary keys in the metadata are valid. */ +@RunWith(JUnit4.class) public class JdbcThinMetadataPrimaryKeysSelfTest extends GridCommonAbstractTest { /** Url. */ private static final String URL = "jdbc:ignite:thin://127.0.0.1"; @@ -68,6 +72,7 @@ private int executeUpdate(String sql) throws SQLException { /** * Checks for PK that contains single unwrapped field. */ + @Test public void testSingleUnwrappedKey() throws Exception { executeUpdate("CREATE TABLE TEST (ID LONG PRIMARY KEY, NAME VARCHAR);"); @@ -77,6 +82,7 @@ public void testSingleUnwrappedKey() throws Exception { /** * Checks for PK that contains single field. Key is forcibly wrapped. */ + @Test public void testSingleWrappedKey() throws Exception { executeUpdate("CREATE TABLE TEST (" + "ID LONG PRIMARY KEY, " + @@ -89,6 +95,7 @@ public void testSingleWrappedKey() throws Exception { /** * Checks for composite (so implicitly wrapped) primary key. */ + @Test public void testCompositeKey() throws Exception { executeUpdate("CREATE TABLE TEST (" + "ID LONG, " + @@ -102,6 +109,7 @@ public void testCompositeKey() throws Exception { /** * Checks for composite (so implicitly wrapped) primary key. Additionally, affinity key is used. */ + @Test public void testCompositeKeyWithAK() throws Exception { final String tpl = "CREATE TABLE TEST (" + "ID LONG, " + diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinMetadataSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinMetadataSelfTest.java index df67666730b33..04c2efd75950c 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinMetadataSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinMetadataSelfTest.java @@ -51,6 +51,9 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.sql.Types.INTEGER; import static java.sql.Types.VARCHAR; @@ -63,6 +66,7 @@ /** * Metadata tests. */ +@RunWith(JUnit4.class) public class JdbcThinMetadataSelfTest extends JdbcThinAbstractSelfTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -106,7 +110,7 @@ protected CacheConfiguration cacheConfiguration(QueryEntity qryEntity) { startGridsMultiThreaded(3); Map orgPrecision = new HashMap<>(); - + orgPrecision.put("name", 42); IgniteCache orgCache = jcache(grid(0), @@ -147,7 +151,7 @@ protected CacheConfiguration cacheConfiguration(QueryEntity qryEntity) { personCache.put(new AffinityKey<>("p2", "o1"), new Person("Joe Black", 35, 1)); personCache.put(new AffinityKey<>("p3", "o2"), new Person("Mike Green", 40, 2)); - IgniteCache departmentCache = jcache(grid(0), + IgniteCache departmentCache = jcache(grid(0), defaultCacheConfiguration().setIndexedTypes(Integer.class, Department.class), "dep"); try (Connection conn = DriverManager.getConnection(URL)) { @@ -167,6 +171,7 @@ protected CacheConfiguration cacheConfiguration(QueryEntity qryEntity) { /** * @throws Exception If failed. */ + @Test public void testResultSetMetaData() throws Exception { Connection conn = DriverManager.getConnection(URL); @@ -203,6 +208,7 @@ public void testResultSetMetaData() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDecimalAndDateTypeMetaData() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { Statement stmt = conn.createStatement(); @@ -237,6 +243,7 @@ public void testDecimalAndDateTypeMetaData() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetTables() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { DatabaseMetaData meta = conn.getMetaData(); @@ -285,6 +292,7 @@ public void testGetTables() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetAllTables() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { DatabaseMetaData meta = conn.getMetaData(); @@ -316,6 +324,7 @@ public void testGetAllTables() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetColumns() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { conn.setSchema("pers"); @@ -428,6 +437,7 @@ else if ("_VAL".equals(name)) { /** * @throws Exception If failed. */ + @Test public void testGetAllColumns() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { DatabaseMetaData meta = conn.getMetaData(); @@ -481,6 +491,7 @@ public void testGetAllColumns() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvalidCatalog() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { DatabaseMetaData meta = conn.getMetaData(); @@ -510,6 +521,7 @@ public void testInvalidCatalog() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIndexMetadata() throws Exception { try (Connection conn = DriverManager.getConnection(URL); ResultSet rs = conn.getMetaData().getIndexInfo(null, "pers", "PERSON", false, false)) { @@ -548,6 +560,7 @@ else if ("AGE".equals(field)) /** * @throws Exception If failed. */ + @Test public void testGetAllIndexes() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { ResultSet rs = conn.getMetaData().getIndexInfo(null, null, null, false, false); @@ -576,6 +589,7 @@ public void testGetAllIndexes() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPrimaryKeyMetadata() throws Exception { try (Connection conn = DriverManager.getConnection(URL); ResultSet rs = conn.getMetaData().getPrimaryKeys(null, "pers", "PERSON")) { @@ -595,6 +609,7 @@ public void testPrimaryKeyMetadata() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetAllPrimaryKeys() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { ResultSet rs = conn.getMetaData().getPrimaryKeys(null, null, null); @@ -627,6 +642,7 @@ public void testGetAllPrimaryKeys() throws Exception { /** * @throws Exception If failed. */ + @Test public void testParametersMetadata() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { conn.setSchema("\"pers\""); @@ -651,6 +667,7 @@ public void testParametersMetadata() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSchemasMetadata() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { ResultSet rs = conn.getMetaData().getSchemas(); @@ -674,6 +691,7 @@ public void testSchemasMetadata() throws Exception { * Negative scenarios for catalog name. * Perform metadata lookups, that use incorrect catalog names. */ + @Test public void testCatalogWithNotExistingName() throws SQLException { checkNoEntitiesFoundForCatalog(""); checkNoEntitiesFoundForCatalog("NOT_EXISTING_CATALOG"); @@ -725,6 +743,7 @@ private static void assertIsEmpty(ResultSet rs) throws SQLException { /** * @throws Exception If failed. */ + @Test public void testEmptySchemasMetadata() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { ResultSet rs = conn.getMetaData().getSchemas(null, "qqq"); @@ -736,6 +755,7 @@ public void testEmptySchemasMetadata() throws Exception { /** * @throws Exception If failed. */ + @Test public void testVersions() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { assert conn.getMetaData().getDatabaseProductVersion().equals(IgniteVersionUtils.VER.toString()); diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinMissingLongArrayResultsTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinMissingLongArrayResultsTest.java index f78ce7029d12d..6363e13ab8bfa 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinMissingLongArrayResultsTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinMissingLongArrayResultsTest.java @@ -35,10 +35,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class JdbcThinMissingLongArrayResultsTest extends JdbcThinAbstractSelfTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -165,6 +169,7 @@ private CacheConfiguration cacheConfiguration(@NotNull String name) throws Excep * @throws Exception If failed. */ @SuppressWarnings({"unused"}) + @Test public void testDefaults() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { conn.setSchema('"' + CACHE_NAME + '"'); diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinNoDefaultSchemaTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinNoDefaultSchemaTest.java index 53425c8bbb054..b4f77887b3dde 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinNoDefaultSchemaTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinNoDefaultSchemaTest.java @@ -32,10 +32,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class JdbcThinNoDefaultSchemaTest extends JdbcThinAbstractSelfTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -104,6 +108,7 @@ private CacheConfiguration cacheConfiguration(@NotNull String name) throws Excep * @throws Exception If failed. */ @SuppressWarnings({"EmptyTryBlock", "unused"}) + @Test public void testDefaults() throws Exception { try (Connection conn = DriverManager.getConnection(URL)) { // No-op. @@ -117,6 +122,7 @@ public void testDefaults() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSchemaNameInQuery() throws Exception { Connection conn = DriverManager.getConnection(URL); @@ -155,6 +161,7 @@ public void testSchemaNameInQuery() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSchemaInUrl() throws Exception { try(Connection conn = DriverManager.getConnection(URL + "/\"cache1\"")) { Statement stmt = conn.createStatement(); @@ -182,6 +189,7 @@ public void testSchemaInUrl() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSchemaInUrlAndInQuery() throws Exception { try(Connection conn = DriverManager.getConnection(URL + "/\"cache2\"")) { Statement stmt = conn.createStatement(); @@ -201,6 +209,7 @@ public void testSchemaInUrlAndInQuery() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSetSchema() throws Exception { try(Connection conn = DriverManager.getConnection(URL)) { // Try to execute query without set schema diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinPreparedStatementSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinPreparedStatementSelfTest.java index 36bc80c0fad39..97887fde8a489 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinPreparedStatementSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinPreparedStatementSelfTest.java @@ -44,6 +44,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.sql.Types.BIGINT; import static java.sql.Types.BINARY; @@ -65,6 +68,7 @@ * Prepared statement test. */ @SuppressWarnings("ThrowableNotThrown") +@RunWith(JUnit4.class) public class JdbcThinPreparedStatementSelfTest extends JdbcThinAbstractSelfTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -167,6 +171,7 @@ public class JdbcThinPreparedStatementSelfTest extends JdbcThinAbstractSelfTest /** * @throws Exception If failed. */ + @Test public void testRepeatableUsage() throws Exception { stmt = conn.prepareStatement(SQL_PART + " where id = ?"); @@ -202,6 +207,7 @@ public void testRepeatableUsage() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryExecuteException() throws Exception { stmt = conn.prepareStatement(SQL_PART + " where boolVal is not distinct from ?"); @@ -259,6 +265,7 @@ public void testQueryExecuteException() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBoolean() throws Exception { stmt = conn.prepareStatement(SQL_PART + " where boolVal is not distinct from ?"); @@ -298,6 +305,7 @@ public void testBoolean() throws Exception { /** * @throws Exception If failed. */ + @Test public void testByte() throws Exception { stmt = conn.prepareStatement(SQL_PART + " where byteVal is not distinct from ?"); @@ -337,6 +345,7 @@ public void testByte() throws Exception { /** * @throws Exception If failed. */ + @Test public void testShort() throws Exception { stmt = conn.prepareStatement(SQL_PART + " where shortVal is not distinct from ?"); @@ -376,6 +385,7 @@ public void testShort() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInteger() throws Exception { stmt = conn.prepareStatement(SQL_PART + " where intVal is not distinct from ?"); @@ -415,6 +425,7 @@ public void testInteger() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLong() throws Exception { stmt = conn.prepareStatement(SQL_PART + " where longVal is not distinct from ?"); @@ -454,6 +465,7 @@ public void testLong() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFloat() throws Exception { stmt = conn.prepareStatement(SQL_PART + " where floatVal is not distinct from ?"); @@ -493,6 +505,7 @@ public void testFloat() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDouble() throws Exception { stmt = conn.prepareStatement(SQL_PART + " where doubleVal is not distinct from ?"); @@ -532,6 +545,7 @@ public void testDouble() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBigDecimal() throws Exception { stmt = conn.prepareStatement(SQL_PART + " where bigVal is not distinct from ?"); @@ -571,6 +585,7 @@ public void testBigDecimal() throws Exception { /** * @throws Exception If failed. */ + @Test public void testString() throws Exception { stmt = conn.prepareStatement(SQL_PART + " where strVal is not distinct from ?"); @@ -610,6 +625,7 @@ public void testString() throws Exception { /** * @throws Exception If failed. */ + @Test public void testArray() throws Exception { stmt = conn.prepareStatement(SQL_PART + " where arrVal is not distinct from ?"); @@ -649,6 +665,7 @@ public void testArray() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDate() throws Exception { stmt = conn.prepareStatement(SQL_PART + " where dateVal is not distinct from ?"); @@ -688,6 +705,7 @@ public void testDate() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTime() throws Exception { stmt = conn.prepareStatement(SQL_PART + " where timeVal is not distinct from ?"); @@ -727,6 +745,7 @@ public void testTime() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTimestamp() throws Exception { stmt = conn.prepareStatement(SQL_PART + " where tsVal is not distinct from ?"); @@ -766,6 +785,7 @@ public void testTimestamp() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClearParameter() throws Exception { stmt = conn.prepareStatement(SQL_PART + " where boolVal is not distinct from ?"); @@ -789,6 +809,7 @@ public void testClearParameter() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNotSupportedTypes() throws Exception { stmt = conn.prepareStatement(""); @@ -1049,4 +1070,4 @@ private TestObject(int id) { this.id = id; } } -} \ No newline at end of file +} diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinResultSetSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinResultSetSelfTest.java index 75ca8b6a67deb..6156d0f8bfdbd 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinResultSetSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinResultSetSelfTest.java @@ -46,6 +46,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -54,6 +57,7 @@ * Result set test. */ @SuppressWarnings({"FloatingPointEquality", "ThrowableNotThrown", "AssertWithSideEffects"}) +@RunWith(JUnit4.class) public class JdbcThinResultSetSelfTest extends JdbcThinAbstractSelfTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -163,6 +167,7 @@ private TestObject createObjectWithData(int id) throws MalformedURLException { /** * @throws Exception If failed. */ + @Test public void testBoolean() throws Exception { ResultSet rs = stmt.executeQuery(SQL); @@ -243,6 +248,7 @@ public void testBoolean() throws Exception { /** * @throws Exception If failed. */ + @Test public void testByte() throws Exception { ResultSet rs = stmt.executeQuery(SQL); @@ -282,6 +288,7 @@ public void testByte() throws Exception { /** * @throws Exception If failed. */ + @Test public void testShort() throws Exception { ResultSet rs = stmt.executeQuery(SQL); @@ -321,6 +328,7 @@ public void testShort() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInteger() throws Exception { ResultSet rs = stmt.executeQuery(SQL); @@ -360,6 +368,7 @@ public void testInteger() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLong() throws Exception { ResultSet rs = stmt.executeQuery(SQL); @@ -399,6 +408,7 @@ public void testLong() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFloat() throws Exception { ResultSet rs = stmt.executeQuery(SQL); @@ -438,6 +448,7 @@ public void testFloat() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDouble() throws Exception { ResultSet rs = stmt.executeQuery(SQL); @@ -477,6 +488,7 @@ public void testDouble() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBigDecimal() throws Exception { ResultSet rs = stmt.executeQuery(SQL); @@ -516,6 +528,7 @@ public void testBigDecimal() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBigDecimalScale() throws Exception { assert "0.12".equals(convertStringToBigDecimalViaJdbc("0.1234", 2).toString()); assert "1.001".equals(convertStringToBigDecimalViaJdbc("1.0005", 3).toString()); @@ -540,6 +553,7 @@ private BigDecimal convertStringToBigDecimalViaJdbc(String strDec, int scale) th /** * @throws Exception If failed. */ + @Test public void testString() throws Exception { ResultSet rs = stmt.executeQuery(SQL); @@ -579,6 +593,7 @@ public void testString() throws Exception { /** * @throws Exception If failed. */ + @Test public void testArray() throws Exception { ResultSet rs = stmt.executeQuery(SQL); @@ -600,6 +615,7 @@ public void testArray() throws Exception { * @throws Exception If failed. */ @SuppressWarnings("deprecation") + @Test public void testDate() throws Exception { ResultSet rs = stmt.executeQuery(SQL); @@ -628,6 +644,7 @@ public void testDate() throws Exception { * @throws Exception If failed. */ @SuppressWarnings("deprecation") + @Test public void testTime() throws Exception { ResultSet rs = stmt.executeQuery(SQL); @@ -655,6 +672,7 @@ public void testTime() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTimestamp() throws Exception { ResultSet rs = stmt.executeQuery(SQL); @@ -682,6 +700,7 @@ public void testTimestamp() throws Exception { /** * @throws Exception If failed. */ + @Test public void testObjectNotSupported() throws Exception { GridTestUtils.assertThrowsAnyCause(log, new Callable() { @Override public Object call() throws Exception { @@ -695,6 +714,7 @@ public void testObjectNotSupported() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNavigation() throws Exception { ResultSet rs = stmt.executeQuery("select id from TestObject where id > 0"); @@ -736,6 +756,7 @@ public void testNavigation() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFindColumn() throws Exception { final ResultSet rs = stmt.executeQuery(SQL); @@ -761,6 +782,7 @@ public void testFindColumn() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNotSupportedTypes() throws Exception { final ResultSet rs = stmt.executeQuery(SQL); @@ -902,6 +924,7 @@ public void testNotSupportedTypes() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUpdateNotSupported() throws Exception { final ResultSet rs = stmt.executeQuery(SQL); @@ -1409,6 +1432,7 @@ public void testUpdateNotSupported() throws Exception { /** * @throws Exception If failed. */ + @Test public void testExceptionOnClosedResultSet() throws Exception { final ResultSet rs = stmt.executeQuery(SQL); @@ -1841,4 +1865,4 @@ private TestObjectField(int a, String b) { return S.toString(TestObjectField.class, this); } } -} \ No newline at end of file +} diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinSchemaCaseTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinSchemaCaseTest.java index 0a4e6f516ce89..c1110a0f98781 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinSchemaCaseTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinSchemaCaseTest.java @@ -29,10 +29,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class JdbcThinSchemaCaseTest extends JdbcThinAbstractSelfTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -91,6 +95,7 @@ private CacheConfiguration cacheConfiguration(@NotNull String name, @NotNull Str * @throws Exception If failed. */ @SuppressWarnings({"unused"}) + @Test public void testSchemaName() throws Exception { checkSchemaConnection("test0"); checkSchemaConnection("test1"); diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinSelectAfterAlterTable.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinSelectAfterAlterTable.java index 5374bca7a1722..0bc8f2c6bce6c 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinSelectAfterAlterTable.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinSelectAfterAlterTable.java @@ -32,10 +32,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Base class for complex SQL tests based on JDBC driver. */ +@RunWith(JUnit4.class) public class JdbcThinSelectAfterAlterTable extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -119,6 +123,7 @@ private CacheConfiguration cacheConfiguration(@NotNull String name) throws Excep /** * @throws Exception If failed. */ + @Test public void testSelectAfterAlterTableSingleNode() throws Exception { stmt.executeUpdate("alter table person add age int"); @@ -128,6 +133,7 @@ public void testSelectAfterAlterTableSingleNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSelectAfterAlterTableMultiNode() throws Exception { try (Connection conn2 = DriverManager.getConnection("jdbc:ignite:thin://127.0.0.1:" + (ClientConnectorConfiguration.DFLT_PORT + 1))) { @@ -163,4 +169,4 @@ public void checkNewColumn(Statement stmt) throws SQLException { assertTrue(newColExists); } -} \ No newline at end of file +} diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinStatementSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinStatementSelfTest.java index db3955d1d3f33..bab663a9c799c 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinStatementSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinStatementSelfTest.java @@ -37,6 +37,8 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -45,6 +47,7 @@ * Statement test. */ @SuppressWarnings({"ThrowableNotThrown"}) +@RunWith(JUnit4.class) public class JdbcThinStatementSelfTest extends JdbcThinAbstractSelfTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -124,6 +127,7 @@ public class JdbcThinStatementSelfTest extends JdbcThinAbstractSelfTest { /** * @throws Exception If failed. */ + @org.junit.Test public void testExecuteQuery0() throws Exception { ResultSet rs = stmt.executeQuery(SQL); @@ -156,6 +160,7 @@ else if (id == 3) { /** * @throws Exception If failed. */ + @org.junit.Test public void testExecuteQuery1() throws Exception { final String sqlText = "select val from test"; @@ -182,6 +187,7 @@ public void testExecuteQuery1() throws Exception { /** * @throws Exception If failed. */ + @org.junit.Test public void testExecute() throws Exception { assert stmt.execute(SQL); @@ -220,6 +226,7 @@ else if (id == 3) { /** * @throws Exception If failed. */ + @org.junit.Test public void testMaxRows() throws Exception { stmt.setMaxRows(1); @@ -285,6 +292,7 @@ else if (id == 3) { /** * @throws Exception If failed. */ + @org.junit.Test public void testCloseResultSet0() throws Exception { ResultSet rs0 = stmt.executeQuery(SQL); ResultSet rs1 = stmt.executeQuery(SQL); @@ -303,6 +311,7 @@ public void testCloseResultSet0() throws Exception { /** * @throws Exception If failed. */ + @org.junit.Test public void testCloseResultSet1() throws Exception { stmt.execute(SQL); @@ -316,6 +325,7 @@ public void testCloseResultSet1() throws Exception { /** * @throws Exception If failed. */ + @org.junit.Test public void testCloseResultSetByConnectionClose() throws Exception { ResultSet rs = stmt.executeQuery(SQL); @@ -328,6 +338,7 @@ public void testCloseResultSetByConnectionClose() throws Exception { /** * @throws Exception If failed. */ + @org.junit.Test public void testCloseOnCompletionAfterQuery() throws Exception { assert !stmt.isCloseOnCompletion() : "Invalid default closeOnCompletion"; @@ -357,6 +368,7 @@ public void testCloseOnCompletionAfterQuery() throws Exception { /** * @throws Exception If failed. */ + @org.junit.Test public void testCloseOnCompletionBeforeQuery() throws Exception { assert !stmt.isCloseOnCompletion() : "Invalid default closeOnCompletion"; @@ -386,6 +398,7 @@ public void testCloseOnCompletionBeforeQuery() throws Exception { /** * @throws Exception If failed. */ + @org.junit.Test public void testExecuteQueryTimeout() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-5438"); @@ -408,6 +421,7 @@ public void testExecuteQueryTimeout() throws Exception { /** * @throws Exception If failed. */ + @org.junit.Test public void testExecuteQueryMultipleOnlyResultSets() throws Exception { assert conn.getMetaData().supportsMultipleResultSets(); @@ -436,6 +450,7 @@ public void testExecuteQueryMultipleOnlyResultSets() throws Exception { /** * @throws Exception If failed. */ + @org.junit.Test public void testExecuteQueryMultipleOnlyDml() throws Exception { conn.setSchema(null); @@ -471,6 +486,7 @@ public void testExecuteQueryMultipleOnlyDml() throws Exception { /** * @throws Exception If failed. */ + @org.junit.Test public void testExecuteQueryMultipleMixed() throws Exception { conn.setSchema(null); @@ -531,6 +547,7 @@ public void testExecuteQueryMultipleMixed() throws Exception { /** * @throws Exception If failed. */ + @org.junit.Test public void testExecuteUpdate() throws Exception { final String sqlText = "update test set val=1 where _key=1"; @@ -548,6 +565,7 @@ public void testExecuteUpdate() throws Exception { /** * @throws Exception If failed. */ + @org.junit.Test public void testExecuteUpdateProducesResultSet() throws Exception { final String sqlText = "select * from test"; @@ -565,6 +583,7 @@ public void testExecuteUpdateProducesResultSet() throws Exception { /** * @throws Exception If failed. */ + @org.junit.Test public void testExecuteUpdateTimeout() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-5438"); @@ -587,6 +606,7 @@ public void testExecuteUpdateTimeout() throws Exception { /** * @throws Exception If failed. */ + @org.junit.Test public void testClose() throws Exception { String sqlText = "select * from test"; @@ -609,6 +629,7 @@ public void testClose() throws Exception { /** * @throws Exception If failed. */ + @org.junit.Test public void testGetSetMaxFieldSizeUnsupported() throws Exception { assertEquals(0, stmt.getMaxFieldSize()); @@ -646,6 +667,7 @@ public void testGetSetMaxFieldSizeUnsupported() throws Exception { /** * @throws Exception If failed. */ + @org.junit.Test public void testGetSetMaxRows() throws Exception { assertEquals(0, stmt.getMaxRows()); @@ -696,6 +718,7 @@ public void testGetSetMaxRows() throws Exception { /** * @throws Exception If failed. */ + @org.junit.Test public void testSetEscapeProcessing() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-5440"); @@ -733,6 +756,7 @@ public void testSetEscapeProcessing() throws Exception { /** * @throws Exception If failed. */ + @org.junit.Test public void testGetSetQueryTimeout() throws Exception { assertEquals(0, stmt.getQueryTimeout()); @@ -777,6 +801,7 @@ public void testGetSetQueryTimeout() throws Exception { /** * @throws Exception If failed. */ + @org.junit.Test public void testMaxFieldSize() throws Exception { assert stmt.getMaxFieldSize() >= 0; @@ -802,6 +827,7 @@ public void testMaxFieldSize() throws Exception { /** * @throws Exception If failed. */ + @org.junit.Test public void testQueryTimeout() throws Exception { assert stmt.getQueryTimeout() == 0 : "Default timeout invalid: " + stmt.getQueryTimeout(); @@ -827,6 +853,7 @@ public void testQueryTimeout() throws Exception { /** * @throws Exception If failed. */ + @org.junit.Test public void testWarningsOnClosedStatement() throws Exception { stmt.clearWarnings(); @@ -850,6 +877,7 @@ public void testWarningsOnClosedStatement() throws Exception { /** * @throws Exception If failed. */ + @org.junit.Test public void testCursorName() throws Exception { checkNotSupported(new RunnableX() { @Override public void run() throws Exception { @@ -869,6 +897,7 @@ public void testCursorName() throws Exception { /** * @throws Exception If failed. */ + @org.junit.Test public void testGetMoreResults() throws Exception { assert !stmt.getMoreResults(); @@ -894,6 +923,7 @@ public void testGetMoreResults() throws Exception { /** * @throws Exception If failed. */ + @org.junit.Test public void testGetMoreResults1() throws Exception { assert !stmt.getMoreResults(Statement.CLOSE_CURRENT_RESULT); assert !stmt.getMoreResults(Statement.KEEP_CURRENT_RESULT); @@ -925,6 +955,7 @@ public void testGetMoreResults1() throws Exception { * * @throws Exception If failed. */ + @org.junit.Test public void testBatchEmpty() throws Exception { assert conn.getMetaData().supportsBatchUpdates(); @@ -938,6 +969,7 @@ public void testBatchEmpty() throws Exception { /** * @throws Exception If failed. */ + @org.junit.Test public void testFetchDirection() throws Exception { assert stmt.getFetchDirection() == ResultSet.FETCH_FORWARD; @@ -971,6 +1003,7 @@ public void testFetchDirection() throws Exception { /** * @throws Exception If failed. */ + @org.junit.Test public void testAutogenerated() throws Exception { GridTestUtils.assertThrows(log, new Callable() { @@ -1042,6 +1075,7 @@ public void testAutogenerated() throws Exception { /** * @throws Exception If failed. */ + @org.junit.Test public void testCancel() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-5439"); @@ -1088,6 +1122,7 @@ public void testCancel() throws Exception { /** * @throws Exception If failed. */ + @org.junit.Test public void testStatementTypeMismatchSelectForCachedQuery() throws Exception { // Put query to cache. stmt.executeQuery("select 1;"); @@ -1109,6 +1144,7 @@ public void testStatementTypeMismatchSelectForCachedQuery() throws Exception { /** * @throws Exception If failed. */ + @org.junit.Test public void testStatementTypeMismatchUpdate() throws Exception { GridTestUtils.assertThrows(log, new Callable() { @@ -1216,4 +1252,4 @@ private Person(int id, String firstName, String lastName, int age) { this.age = age; } } -} \ No newline at end of file +} diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinStreamingAbstractSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinStreamingAbstractSelfTest.java index c83977c692d19..70dc7815f8162 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinStreamingAbstractSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinStreamingAbstractSelfTest.java @@ -40,10 +40,14 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.GridTestUtils; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for streaming via thin driver. */ +@RunWith(JUnit4.class) public abstract class JdbcThinStreamingAbstractSelfTest extends JdbcStreamingSelfTest { /** */ protected int batchSize = 17; @@ -96,6 +100,7 @@ public abstract class JdbcThinStreamingAbstractSelfTest extends JdbcStreamingSel /** * @throws Exception if failed. */ + @Test public void testStreamedBatchedInsert() throws Exception { for (int i = 10; i <= 100; i += 10) put(i, nameForId(i * 100)); @@ -132,6 +137,7 @@ public void testStreamedBatchedInsert() throws Exception { /** * @throws SQLException if failed. */ + @Test public void testSimultaneousStreaming() throws Exception { try (Connection anotherConn = createOrdinaryConnection()) { execute(anotherConn, "CREATE TABLE PUBLIC.T(x int primary key, y int) WITH " + @@ -212,6 +218,7 @@ public void testSimultaneousStreaming() throws Exception { /** * */ + @Test public void testStreamingWithMixedStatementTypes() throws Exception { String prepStmtStr = "insert into Person(\"id\", \"name\") values (?, ?)"; @@ -268,6 +275,7 @@ public void testStreamingWithMixedStatementTypes() throws Exception { /** * @throws SQLException if failed. */ + @Test public void testStreamingOffToOn() throws Exception { try (Connection conn = createOrdinaryConnection()) { assertStreamingState(false); @@ -281,6 +289,7 @@ public void testStreamingOffToOn() throws Exception { /** * @throws SQLException if failed. */ + @Test public void testStreamingOffToOff() throws Exception { try (Connection conn = createOrdinaryConnection()) { assertStreamingState(false); @@ -294,6 +303,7 @@ public void testStreamingOffToOff() throws Exception { /** * @throws SQLException if failed. */ + @Test public void testStreamingOnToOff() throws Exception { try (Connection conn = createStreamedConnection(false)) { assertStreamingState(true); @@ -307,6 +317,7 @@ public void testStreamingOnToOff() throws Exception { /** * @throws SQLException if failed. */ + @Test public void testFlush() throws Exception { try (Connection conn = createStreamedConnection(false, 10000)) { assertStreamingState(true); @@ -337,6 +348,7 @@ public void testFlush() throws Exception { /** * @throws SQLException if failed. */ + @Test public void testStreamingReEnabled() throws Exception { try (Connection conn = createStreamedConnection(false, 10000)) { assertStreamingState(true); @@ -381,6 +393,7 @@ public void testStreamingReEnabled() throws Exception { * */ @SuppressWarnings("ThrowableNotThrown") + @Test public void testNonStreamedBatch() { GridTestUtils.assertThrows(null, new Callable() { @Override public Object call() throws Exception { @@ -407,6 +420,7 @@ public void testNonStreamedBatch() { * */ @SuppressWarnings("ThrowableNotThrown") + @Test public void testStreamingStatementInTheMiddleOfNonPreparedBatch() { GridTestUtils.assertThrows(null, new Callable() { @Override public Object call() throws Exception { @@ -428,6 +442,7 @@ public void testStreamingStatementInTheMiddleOfNonPreparedBatch() { * */ @SuppressWarnings("ThrowableNotThrown") + @Test public void testBatchingSetStreamingStatement() { GridTestUtils.assertThrows(null, new Callable() { @Override public Object call() throws Exception { @@ -513,4 +528,4 @@ static final class IndexingWithContext extends IgniteH2Indexing { return super.querySqlFields(schemaName, qry, cliCtx, keepBinary, failOnMultipleStmts, tracker, cancel); } } -} \ No newline at end of file +} diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinTcpIoTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinTcpIoTest.java index d8ce82b2c9c1e..dab2d88d95c8e 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinTcpIoTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinTcpIoTest.java @@ -32,10 +32,14 @@ import org.apache.ignite.internal.util.HostAndPortRange; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for JdbcThinTcpIo. */ +@RunWith(JUnit4.class) public class JdbcThinTcpIoTest extends GridCommonAbstractTest { /** Server port range. */ private static final int[] SERVER_PORT_RANGE = {59000, 59020}; @@ -115,6 +119,7 @@ private JdbcThinTcpIo createTcpIo(String[] addrs, int port) throws SQLException * @throws SQLException On connection error or reject. * @throws IOException On IO error in handshake. */ + @Test public void testHostWithManyAddresses() throws SQLException, IOException, InterruptedException { CountDownLatch connectionAccepted = new CountDownLatch(1); @@ -141,6 +146,7 @@ public void testHostWithManyAddresses() throws SQLException, IOException, Interr * @throws SQLException On connection error or reject. * @throws IOException On IO error in handshake. */ + @Test public void testExceptionMessage() throws SQLException, IOException { try (ServerSocket sock = createServerSocket(null)) { String[] addrs = {INACCESSIBLE_ADDRESSES[0], INACCESSIBLE_ADDRESSES[1]}; diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinTransactionsAbstractComplexSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinTransactionsAbstractComplexSelfTest.java index af78f8e615448..6b0e17865d493 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinTransactionsAbstractComplexSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinTransactionsAbstractComplexSelfTest.java @@ -44,10 +44,14 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.lang.IgniteInClosure; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test to check various transactional scenarios. */ +@RunWith(JUnit4.class) public abstract class JdbcThinTransactionsAbstractComplexSelfTest extends JdbcThinAbstractSelfTest { /** Client node index. */ static final int CLI_IDX = 1; @@ -227,6 +231,7 @@ public abstract class JdbcThinTransactionsAbstractComplexSelfTest extends JdbcTh /** * */ + @Test public void testSingleDmlStatement() throws SQLException { insertPerson(6, "John", "Doe", 2, 2); @@ -237,6 +242,7 @@ public void testSingleDmlStatement() throws SQLException { /** * */ + @Test public void testMultipleDmlStatements() throws SQLException { executeInTransaction(new TransactionClosure() { @Override public void apply(Connection conn) { @@ -259,6 +265,7 @@ public void testMultipleDmlStatements() throws SQLException { /** * */ + @Test public void testBatchDmlStatements() throws SQLException { doBatchedInsert(); @@ -271,6 +278,7 @@ public void testBatchDmlStatements() throws SQLException { /** * */ + @Test public void testBatchDmlStatementsIntermediateFailure() throws SQLException { insertPerson(6, "John", "Doe", 2, 2); @@ -338,6 +346,7 @@ private void doBatchedInsert() throws SQLException { /** * */ + @Test public void testInsertAndQueryMultipleCaches() throws SQLException { executeInTransaction(new TransactionClosure() { @Override public void apply(Connection conn) { @@ -359,6 +368,7 @@ public void testInsertAndQueryMultipleCaches() throws SQLException { /** * */ + @Test public void testColocatedJoinSelectAndInsertInTransaction() throws SQLException { // We'd like to put some Google into cities with over 1K population which don't have it yet executeInTransaction(new TransactionClosure() { @@ -382,6 +392,7 @@ public void testColocatedJoinSelectAndInsertInTransaction() throws SQLException /** * */ + @Test public void testDistributedJoinSelectAndInsertInTransaction() throws SQLException { try (Connection c = connect("distributedJoins=true")) { // We'd like to put some Google into cities with over 1K population which don't have it yet @@ -407,6 +418,7 @@ public void testDistributedJoinSelectAndInsertInTransaction() throws SQLExceptio /** * */ + @Test public void testInsertFromExpression() throws SQLException { executeInTransaction(new TransactionClosure() { @Override public void apply(Connection conn) { @@ -419,6 +431,7 @@ public void testInsertFromExpression() throws SQLException { /** * */ + @Test public void testAutoRollback() throws SQLException { try (Connection c = connect()) { begin(c); @@ -434,6 +447,7 @@ public void testAutoRollback() throws SQLException { /** * */ + @Test public void testRepeatableReadWithConcurrentDelete() throws Exception { doTestRepeatableRead(new IgniteInClosure() { @Override public void apply(Connection conn) { @@ -445,6 +459,7 @@ public void testRepeatableReadWithConcurrentDelete() throws Exception { /** * */ + @Test public void testRepeatableReadWithConcurrentFastDelete() throws Exception { doTestRepeatableRead(new IgniteInClosure() { @Override public void apply(Connection conn) { @@ -456,6 +471,7 @@ public void testRepeatableReadWithConcurrentFastDelete() throws Exception { /** * */ + @Test public void testRepeatableReadWithConcurrentCacheRemove() throws Exception { doTestRepeatableRead(new IgniteInClosure() { @Override public void apply(Connection conn) { @@ -467,6 +483,7 @@ public void testRepeatableReadWithConcurrentCacheRemove() throws Exception { /** * */ + @Test public void testRepeatableReadAndDeleteWithConcurrentDelete() throws Exception { doTestRepeatableRead(new IgniteInClosure() { @Override public void apply(Connection conn) { @@ -478,6 +495,7 @@ public void testRepeatableReadAndDeleteWithConcurrentDelete() throws Exception { /** * */ + @Test public void testRepeatableReadAndDeleteWithConcurrentFastDelete() throws Exception { doTestRepeatableRead(new IgniteInClosure() { @Override public void apply(Connection conn) { @@ -489,6 +507,7 @@ public void testRepeatableReadAndDeleteWithConcurrentFastDelete() throws Excepti /** * */ + @Test public void testRepeatableReadAndDeleteWithConcurrentCacheRemove() throws Exception { doTestRepeatableRead(new IgniteInClosure() { @Override public void apply(Connection conn) { @@ -500,6 +519,7 @@ public void testRepeatableReadAndDeleteWithConcurrentCacheRemove() throws Except /** * */ + @Test public void testRepeatableReadAndFastDeleteWithConcurrentDelete() throws Exception { doTestRepeatableRead(new IgniteInClosure() { @Override public void apply(Connection conn) { @@ -511,6 +531,7 @@ public void testRepeatableReadAndFastDeleteWithConcurrentDelete() throws Excepti /** * */ + @Test public void testRepeatableReadAndFastDeleteWithConcurrentFastDelete() throws Exception { doTestRepeatableRead(new IgniteInClosure() { @Override public void apply(Connection conn) { @@ -522,6 +543,7 @@ public void testRepeatableReadAndFastDeleteWithConcurrentFastDelete() throws Exc /** * */ + @Test public void testRepeatableReadAndFastDeleteWithConcurrentCacheRemove() throws Exception { doTestRepeatableRead(new IgniteInClosure() { @Override public void apply(Connection conn) { @@ -533,6 +555,7 @@ public void testRepeatableReadAndFastDeleteWithConcurrentCacheRemove() throws Ex /** * */ + @Test public void testRepeatableReadAndDeleteWithConcurrentDeleteAndRollback() throws Exception { doTestRepeatableRead(new IgniteInClosure() { @Override public void apply(Connection conn) { @@ -544,6 +567,7 @@ public void testRepeatableReadAndDeleteWithConcurrentDeleteAndRollback() throws /** * */ + @Test public void testRepeatableReadAndDeleteWithConcurrentFastDeleteAndRollback() throws Exception { doTestRepeatableRead(new IgniteInClosure() { @Override public void apply(Connection conn) { @@ -555,6 +579,7 @@ public void testRepeatableReadAndDeleteWithConcurrentFastDeleteAndRollback() thr /** * */ + @Test public void testRepeatableReadAndDeleteWithConcurrentCacheRemoveAndRollback() throws Exception { doTestRepeatableRead(new IgniteInClosure() { @Override public void apply(Connection conn) { @@ -566,6 +591,7 @@ public void testRepeatableReadAndDeleteWithConcurrentCacheRemoveAndRollback() th /** * */ + @Test public void testRepeatableReadAndFastDeleteWithConcurrentDeleteAndRollback() throws Exception { doTestRepeatableRead(new IgniteInClosure() { @Override public void apply(Connection conn) { @@ -577,6 +603,7 @@ public void testRepeatableReadAndFastDeleteWithConcurrentDeleteAndRollback() thr /** * */ + @Test public void testRepeatableReadAndFastDeleteWithConcurrentFastDeleteAndRollback() throws Exception { doTestRepeatableRead(new IgniteInClosure() { @Override public void apply(Connection conn) { @@ -588,6 +615,7 @@ public void testRepeatableReadAndFastDeleteWithConcurrentFastDeleteAndRollback() /** * */ + @Test public void testRepeatableReadAndFastDeleteWithConcurrentCacheRemoveAndRollback() throws Exception { doTestRepeatableRead(new IgniteInClosure() { @Override public void apply(Connection conn) { @@ -599,6 +627,7 @@ public void testRepeatableReadAndFastDeleteWithConcurrentCacheRemoveAndRollback( /** * */ + @Test public void testRepeatableReadWithConcurrentUpdate() throws Exception { doTestRepeatableRead(new IgniteInClosure() { @Override public void apply(Connection conn) { @@ -610,6 +639,7 @@ public void testRepeatableReadWithConcurrentUpdate() throws Exception { /** * */ + @Test public void testRepeatableReadWithConcurrentCacheReplace() throws Exception { doTestRepeatableRead(new IgniteInClosure() { @Override public void apply(Connection conn) { @@ -627,6 +657,7 @@ public void testRepeatableReadWithConcurrentCacheReplace() throws Exception { /** * */ + @Test public void testRepeatableReadAndUpdateWithConcurrentUpdate() throws Exception { doTestRepeatableRead(new IgniteInClosure() { @Override public void apply(Connection conn) { @@ -638,6 +669,7 @@ public void testRepeatableReadAndUpdateWithConcurrentUpdate() throws Exception { /** * */ + @Test public void testRepeatableReadAndUpdateWithConcurrentCacheReplace() throws Exception { doTestRepeatableRead(new IgniteInClosure() { @Override public void apply(Connection conn) { @@ -655,6 +687,7 @@ public void testRepeatableReadAndUpdateWithConcurrentCacheReplace() throws Excep /** * */ + @Test public void testRepeatableReadAndUpdateWithConcurrentUpdateAndRollback() throws Exception { doTestRepeatableRead(new IgniteInClosure() { @Override public void apply(Connection conn) { @@ -666,6 +699,7 @@ public void testRepeatableReadAndUpdateWithConcurrentUpdateAndRollback() throws /** * */ + @Test public void testRepeatableReadAndUpdateWithConcurrentCacheReplaceAndRollback() throws Exception { doTestRepeatableRead(new IgniteInClosure() { @Override public void apply(Connection conn) { diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinTransactionsSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinTransactionsSelfTest.java index 88e53d9a4d6ec..143a14c26f145 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinTransactionsSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinTransactionsSelfTest.java @@ -40,10 +40,14 @@ import org.apache.ignite.testframework.GridStringLogger; import org.apache.ignite.testframework.GridTestUtils; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests to check behavior with transactions on. */ +@RunWith(JUnit4.class) public class JdbcThinTransactionsSelfTest extends JdbcThinAbstractSelfTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -124,6 +128,7 @@ private static Connection c(boolean autoCommit, NestedTxMode nestedTxMode) throw /** * */ + @Test public void testTransactionsBeginCommitRollback() throws IgniteCheckedException { final AtomicBoolean stop = new AtomicBoolean(); @@ -160,6 +165,7 @@ public void testTransactionsBeginCommitRollback() throws IgniteCheckedException /** * */ + @Test public void testTransactionsBeginCommitRollbackAutocommit() throws IgniteCheckedException { GridTestUtils.runMultiThreadedAsync(new Runnable() { @Override public void run() { @@ -186,6 +192,7 @@ public void testTransactionsBeginCommitRollbackAutocommit() throws IgniteChecked /** * */ + @Test public void testIgnoreNestedTxAutocommitOff() throws SQLException { try (Connection c = c(false, NestedTxMode.IGNORE)) { doNestedTxStart(c, false); @@ -197,6 +204,7 @@ public void testIgnoreNestedTxAutocommitOff() throws SQLException { /** * */ + @Test public void testCommitNestedTxAutocommitOff() throws SQLException { try (Connection c = c(false, NestedTxMode.COMMIT)) { doNestedTxStart(c, false); @@ -208,6 +216,7 @@ public void testCommitNestedTxAutocommitOff() throws SQLException { /** * */ + @Test public void testErrorNestedTxAutocommitOff() throws SQLException { GridTestUtils.assertThrows(null, new Callable() { @Override public Void call() throws Exception { @@ -223,6 +232,7 @@ public void testErrorNestedTxAutocommitOff() throws SQLException { /** * */ + @Test public void testIgnoreNestedTxAutocommitOn() throws SQLException { try (Connection c = c(true, NestedTxMode.IGNORE)) { doNestedTxStart(c, false); @@ -234,6 +244,7 @@ public void testIgnoreNestedTxAutocommitOn() throws SQLException { /** * */ + @Test public void testCommitNestedTxAutocommitOn() throws SQLException { try (Connection c = c(true, NestedTxMode.COMMIT)) { doNestedTxStart(c, false); @@ -245,6 +256,7 @@ public void testCommitNestedTxAutocommitOn() throws SQLException { /** * */ + @Test public void testErrorNestedTxAutocommitOn() throws SQLException { GridTestUtils.assertThrows(null, new Callable() { @Override public Void call() throws Exception { @@ -260,6 +272,7 @@ public void testErrorNestedTxAutocommitOn() throws SQLException { /** * */ + @Test public void testIgnoreNestedTxAutocommitOffBatched() throws SQLException { try (Connection c = c(false, NestedTxMode.IGNORE)) { doNestedTxStart(c, true); @@ -271,6 +284,7 @@ public void testIgnoreNestedTxAutocommitOffBatched() throws SQLException { /** * */ + @Test public void testCommitNestedTxAutocommitOffBatched() throws SQLException { try (Connection c = c(false, NestedTxMode.COMMIT)) { doNestedTxStart(c, true); @@ -282,6 +296,7 @@ public void testCommitNestedTxAutocommitOffBatched() throws SQLException { /** * */ + @Test public void testErrorNestedTxAutocommitOffBatched() throws SQLException { GridTestUtils.assertThrows(null, new Callable() { @Override public Void call() throws Exception { @@ -297,6 +312,7 @@ public void testErrorNestedTxAutocommitOffBatched() throws SQLException { /** * */ + @Test public void testIgnoreNestedTxAutocommitOnBatched() throws SQLException { try (Connection c = c(true, NestedTxMode.IGNORE)) { doNestedTxStart(c, true); @@ -308,6 +324,7 @@ public void testIgnoreNestedTxAutocommitOnBatched() throws SQLException { /** * */ + @Test public void testCommitNestedTxAutocommitOnBatched() throws SQLException { try (Connection c = c(true, NestedTxMode.COMMIT)) { doNestedTxStart(c, true); @@ -319,6 +336,7 @@ public void testCommitNestedTxAutocommitOnBatched() throws SQLException { /** * */ + @Test public void testErrorNestedTxAutocommitOnBatched() throws SQLException { GridTestUtils.assertThrows(null, new Callable() { @Override public Void call() throws Exception { @@ -359,6 +377,7 @@ private void doNestedTxStart(Connection conn, boolean batched) throws SQLExcepti /** * @throws SQLException if failed. */ + @Test public void testAutoCommitSingle() throws SQLException { doTestAutoCommit(false); } @@ -366,6 +385,7 @@ public void testAutoCommitSingle() throws SQLException { /** * @throws SQLException if failed. */ + @Test public void testAutoCommitBatched() throws SQLException { doTestAutoCommit(true); } @@ -410,6 +430,7 @@ private void doTestAutoCommit(boolean batched) throws SQLException { * Test that exception in one of the statements does not kill connection worker altogether. * @throws SQLException if failed. */ + @Test public void testExceptionHandling() throws SQLException { try (Connection c = c(true, NestedTxMode.ERROR)) { try (Statement s = c.createStatement()) { @@ -436,6 +457,7 @@ public void testExceptionHandling() throws SQLException { * Test that exception in one of the statements does not kill connection worker altogether. * @throws SQLException if failed. */ + @Test public void testParsingErrorHasNoSideEffect() throws SQLException { try (Connection c = c(false, NestedTxMode.ERROR)) { try (Statement s = c.createStatement()) { diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinTransactionsWithMvccEnabledSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinTransactionsWithMvccEnabledSelfTest.java index 2261523fd8210..dea855f07fc72 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinTransactionsWithMvccEnabledSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinTransactionsWithMvccEnabledSelfTest.java @@ -40,10 +40,14 @@ import org.apache.ignite.testframework.GridStringLogger; import org.apache.ignite.testframework.GridTestUtils; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests to check behavior with transactions on. */ +@RunWith(JUnit4.class) public class JdbcThinTransactionsWithMvccEnabledSelfTest extends JdbcThinAbstractSelfTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -123,6 +127,7 @@ private static Connection c(boolean autoCommit, NestedTxMode nestedTxMode) throw /** * */ + @Test public void testTransactionsBeginCommitRollback() throws IgniteCheckedException { final AtomicBoolean stop = new AtomicBoolean(); @@ -159,6 +164,7 @@ public void testTransactionsBeginCommitRollback() throws IgniteCheckedException /** * */ + @Test public void testTransactionsBeginCommitRollbackAutocommit() throws IgniteCheckedException { GridTestUtils.runMultiThreadedAsync(new Runnable() { @Override public void run() { @@ -185,6 +191,7 @@ public void testTransactionsBeginCommitRollbackAutocommit() throws IgniteChecked /** * */ + @Test public void testIgnoreNestedTxAutocommitOff() throws SQLException { try (Connection c = c(false, NestedTxMode.IGNORE)) { doNestedTxStart(c, false); @@ -196,6 +203,7 @@ public void testIgnoreNestedTxAutocommitOff() throws SQLException { /** * */ + @Test public void testCommitNestedTxAutocommitOff() throws SQLException { try (Connection c = c(false, NestedTxMode.COMMIT)) { doNestedTxStart(c, false); @@ -207,6 +215,7 @@ public void testCommitNestedTxAutocommitOff() throws SQLException { /** * */ + @Test public void testErrorNestedTxAutocommitOff() { GridTestUtils.assertThrows(null, new Callable() { @Override public Void call() throws Exception { @@ -222,6 +231,7 @@ public void testErrorNestedTxAutocommitOff() { /** * */ + @Test public void testIgnoreNestedTxAutocommitOn() throws SQLException { try (Connection c = c(true, NestedTxMode.IGNORE)) { doNestedTxStart(c, false); @@ -233,6 +243,7 @@ public void testIgnoreNestedTxAutocommitOn() throws SQLException { /** * */ + @Test public void testCommitNestedTxAutocommitOn() throws SQLException { try (Connection c = c(true, NestedTxMode.COMMIT)) { doNestedTxStart(c, false); @@ -244,6 +255,7 @@ public void testCommitNestedTxAutocommitOn() throws SQLException { /** * */ + @Test public void testErrorNestedTxAutocommitOn() { GridTestUtils.assertThrows(null, new Callable() { @Override public Void call() throws Exception { @@ -259,6 +271,7 @@ public void testErrorNestedTxAutocommitOn() { /** * */ + @Test public void testIgnoreNestedTxAutocommitOffBatched() throws SQLException { try (Connection c = c(false, NestedTxMode.IGNORE)) { doNestedTxStart(c, true); @@ -270,6 +283,7 @@ public void testIgnoreNestedTxAutocommitOffBatched() throws SQLException { /** * */ + @Test public void testCommitNestedTxAutocommitOffBatched() throws SQLException { try (Connection c = c(false, NestedTxMode.COMMIT)) { doNestedTxStart(c, true); @@ -281,6 +295,7 @@ public void testCommitNestedTxAutocommitOffBatched() throws SQLException { /** * */ + @Test public void testErrorNestedTxAutocommitOffBatched() { GridTestUtils.assertThrows(null, new Callable() { @Override public Void call() throws Exception { @@ -296,6 +311,7 @@ public void testErrorNestedTxAutocommitOffBatched() { /** * */ + @Test public void testIgnoreNestedTxAutocommitOnBatched() throws SQLException { try (Connection c = c(true, NestedTxMode.IGNORE)) { doNestedTxStart(c, true); @@ -307,6 +323,7 @@ public void testIgnoreNestedTxAutocommitOnBatched() throws SQLException { /** * */ + @Test public void testCommitNestedTxAutocommitOnBatched() throws SQLException { try (Connection c = c(true, NestedTxMode.COMMIT)) { doNestedTxStart(c, true); @@ -318,6 +335,7 @@ public void testCommitNestedTxAutocommitOnBatched() throws SQLException { /** * */ + @Test public void testErrorNestedTxAutocommitOnBatched() { GridTestUtils.assertThrows(null, new Callable() { @Override public Void call() throws Exception { @@ -358,6 +376,7 @@ private void doNestedTxStart(Connection conn, boolean batched) throws SQLExcepti /** * @throws SQLException if failed. */ + @Test public void testAutoCommitSingle() throws SQLException { doTestAutoCommit(false); } @@ -365,6 +384,7 @@ public void testAutoCommitSingle() throws SQLException { /** * @throws SQLException if failed. */ + @Test public void testAutoCommitBatched() throws SQLException { doTestAutoCommit(true); } @@ -409,6 +429,7 @@ private void doTestAutoCommit(boolean batched) throws SQLException { * Test that exception in one of the statements does not kill connection worker altogether. * @throws SQLException if failed. */ + @Test public void testExceptionHandling() throws SQLException { try (Connection c = c(true, NestedTxMode.ERROR)) { try (Statement s = c.createStatement()) { diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinUpdateStatementSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinUpdateStatementSelfTest.java index f749dbeba7bf2..1f5fd8564b076 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinUpdateStatementSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinUpdateStatementSelfTest.java @@ -21,14 +21,19 @@ import java.util.Arrays; import org.apache.ignite.cache.query.SqlFieldsQuery; import org.apache.ignite.internal.util.typedef.F; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class JdbcThinUpdateStatementSelfTest extends JdbcThinAbstractUpdateStatementSelfTest { /** * @throws SQLException If failed. */ + @Test public void testExecute() throws SQLException { conn.createStatement().execute("update Person set firstName = 'Jack' where " + "cast(substring(_key, 2, 1) as int) % 2 = 0"); @@ -40,6 +45,7 @@ public void testExecute() throws SQLException { /** * @throws SQLException If failed. */ + @Test public void testExecuteUpdate() throws SQLException { conn.createStatement().executeUpdate("update Person set firstName = 'Jack' where " + "cast(substring(_key, 2, 1) as int) % 2 = 0"); diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/MvccJdbcTransactionFinishOnDeactivatedClusterSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/MvccJdbcTransactionFinishOnDeactivatedClusterSelfTest.java index 8a4fbe3e5c994..dab44bfa38ba4 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/MvccJdbcTransactionFinishOnDeactivatedClusterSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/MvccJdbcTransactionFinishOnDeactivatedClusterSelfTest.java @@ -35,8 +35,12 @@ import org.apache.ignite.internal.util.lang.GridAbsPredicate; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** */ +@RunWith(JUnit4.class) public class MvccJdbcTransactionFinishOnDeactivatedClusterSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { @@ -60,6 +64,7 @@ public class MvccJdbcTransactionFinishOnDeactivatedClusterSelfTest extends GridC /** * @throws Exception If failed. */ + @Test public void testTxCommitAfterDeactivation() throws Exception { checkTxFinishAfterDeactivation(true); } @@ -67,6 +72,7 @@ public void testTxCommitAfterDeactivation() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxRollbackAfterDeactivation() throws Exception { checkTxFinishAfterDeactivation(false); } diff --git a/modules/clients/src/test/java/org/apache/ignite/loadtests/client/ClientMarshallerBenchmarkTest.java b/modules/clients/src/test/java/org/apache/ignite/loadtests/client/ClientMarshallerBenchmarkTest.java index 08c2cbe375213..3b9b494523f97 100644 --- a/modules/clients/src/test/java/org/apache/ignite/loadtests/client/ClientMarshallerBenchmarkTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/loadtests/client/ClientMarshallerBenchmarkTest.java @@ -31,12 +31,16 @@ import org.apache.ignite.internal.util.typedef.X; import org.apache.ignite.marshaller.MarshallerUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.processors.rest.client.message.GridClientCacheRequest.GridCacheOperation.CAS; /** * Tests basic performance of marshallers. */ +@RunWith(JUnit4.class) public class ClientMarshallerBenchmarkTest extends GridCommonAbstractTest { /** Marshallers to test. */ private GridClientMarshaller[] marshallers; @@ -58,6 +62,7 @@ public ClientMarshallerBenchmarkTest() { /** * @throws Exception If failed. */ + @Test public void testCacheRequestTime() throws Exception { GridClientCacheRequest req = new GridClientCacheRequest(CAS); @@ -162,4 +167,4 @@ private T runMarshallUnmarshalLoop(T obj, int iterCnt, GridClientMarshaller return (T)res; } -} \ No newline at end of file +} diff --git a/modules/clients/src/test/java/org/apache/ignite/loadtests/client/ClientTcpSslLoadTest.java b/modules/clients/src/test/java/org/apache/ignite/loadtests/client/ClientTcpSslLoadTest.java index a90a3bf4ea0a3..77b0af6426ba0 100644 --- a/modules/clients/src/test/java/org/apache/ignite/loadtests/client/ClientTcpSslLoadTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/loadtests/client/ClientTcpSslLoadTest.java @@ -20,10 +20,14 @@ import org.apache.ignite.IgniteException; import org.apache.ignite.internal.client.ClientTcpSslMultiThreadedSelfTest; import org.apache.ignite.internal.util.typedef.internal.U; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Makes a long run to ensure stability and absence of memory leaks. */ +@RunWith(JUnit4.class) public class ClientTcpSslLoadTest extends ClientTcpSslMultiThreadedSelfTest { /** Test duration. */ private static final long TEST_RUN_TIME = 8 * 60 * 60 * 1000; @@ -37,6 +41,7 @@ public class ClientTcpSslLoadTest extends ClientTcpSslMultiThreadedSelfTest { /** * @throws Exception If failed. */ + @Test public void testLongRun() throws Exception { long start = System.currentTimeMillis(); @@ -82,4 +87,4 @@ private void clearCaches() { log.error("Cache clear failed.", e); } } -} \ No newline at end of file +} From 31eec33b46f643b010df836e0a48273b94ab863b Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Thu, 6 Dec 2018 20:18:02 +0300 Subject: [PATCH 052/176] IGNITE-10176 migrate non-core modules tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview and rebuild --- .../cloud/TcpDiscoveryCloudIpFinderSelfTest.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/cloud/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/cloud/TcpDiscoveryCloudIpFinderSelfTest.java b/modules/cloud/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/cloud/TcpDiscoveryCloudIpFinderSelfTest.java index c754553ef66e4..e4cef65ac0f47 100644 --- a/modules/cloud/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/cloud/TcpDiscoveryCloudIpFinderSelfTest.java +++ b/modules/cloud/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/cloud/TcpDiscoveryCloudIpFinderSelfTest.java @@ -25,10 +25,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinderAbstractSelfTest; import org.apache.ignite.testsuites.IgniteCloudTestSuite; import org.apache.ignite.testsuites.IgniteIgnore; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * TcpDiscoveryCloudIpFinder test. */ +@RunWith(JUnit4.class) public class TcpDiscoveryCloudIpFinderSelfTest extends TcpDiscoveryIpFinderAbstractSelfTest { /** @@ -51,6 +55,7 @@ public TcpDiscoveryCloudIpFinderSelfTest() throws Exception { } /* {@inheritDoc} */ + @Test @Override public void testIpFinder() throws Exception { // No-op } @@ -61,6 +66,7 @@ public TcpDiscoveryCloudIpFinderSelfTest() throws Exception { * @throws Exception If any error occurs. */ @IgniteIgnore("https://issues.apache.org/jira/browse/IGNITE-845") + @Test public void testAmazonWebServices() throws Exception { testCloudProvider("aws-ec2"); } @@ -71,6 +77,7 @@ public void testAmazonWebServices() throws Exception { * @throws Exception If any error occurs. */ @IgniteIgnore("https://issues.apache.org/jira/browse/IGNITE-1585") + @Test public void testGoogleComputeEngine() throws Exception { testCloudProvider("google-compute-engine"); } @@ -80,6 +87,7 @@ public void testGoogleComputeEngine() throws Exception { * * @throws Exception If any error occurs. */ + @Test public void testRackspace() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-9444"); @@ -123,4 +131,4 @@ private void testCloudProvider(String provider) throws Exception { assert addresses.size() == ipFinder.getRegisteredAddresses().size(); } -} \ No newline at end of file +} From aa1427ac3e3edd816a5b680239812319db4ccf1a Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Thu, 6 Dec 2018 20:45:46 +0300 Subject: [PATCH 053/176] IGNITE-10176 migrate non-core modules tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview --- .../compatibility/PdsWithTtlCompatibilityTest.java | 5 +++++ .../persistence/FoldersReuseCompatibilityTest.java | 6 ++++++ .../IgnitePKIndexesMigrationToUnwrapPkTest.java | 6 ++++++ .../MigratingToWalV2SerializerWithCompactionTest.java | 5 +++++ .../persistence/PersistenceBasicCompatibilityTest.java | 10 ++++++++++ 5 files changed, 32 insertions(+) diff --git a/modules/compatibility/src/test/java/org/apache/ignite/compatibility/PdsWithTtlCompatibilityTest.java b/modules/compatibility/src/test/java/org/apache/ignite/compatibility/PdsWithTtlCompatibilityTest.java index 946caddb5f203..ffb05bb2e2102 100644 --- a/modules/compatibility/src/test/java/org/apache/ignite/compatibility/PdsWithTtlCompatibilityTest.java +++ b/modules/compatibility/src/test/java/org/apache/ignite/compatibility/PdsWithTtlCompatibilityTest.java @@ -43,6 +43,9 @@ import org.apache.ignite.lang.IgniteInClosure; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test PendingTree upgrading to per-partition basis. Test fill cache with persistence enabled and with ExpirePolicy @@ -51,6 +54,7 @@ * Note: Test for ignite-2.3 version will always fails due to entry ttl update fails with assertion on checkpoint lock * check. */ +@RunWith(JUnit4.class) public class PdsWithTtlCompatibilityTest extends IgnitePersistenceCompatibilityAbstractTest { /** */ static final String TEST_CACHE_NAME = PdsWithTtlCompatibilityTest.class.getSimpleName(); @@ -84,6 +88,7 @@ public class PdsWithTtlCompatibilityTest extends IgnitePersistenceCompatibilityA * * @throws Exception If failed. */ + @Test public void testNodeStartByOldVersionPersistenceData_2_1() throws Exception { doTestStartupWithOldVersion("2.1.0"); } diff --git a/modules/compatibility/src/test/java/org/apache/ignite/compatibility/persistence/FoldersReuseCompatibilityTest.java b/modules/compatibility/src/test/java/org/apache/ignite/compatibility/persistence/FoldersReuseCompatibilityTest.java index e04f39f99321d..a667c15267375 100644 --- a/modules/compatibility/src/test/java/org/apache/ignite/compatibility/persistence/FoldersReuseCompatibilityTest.java +++ b/modules/compatibility/src/test/java/org/apache/ignite/compatibility/persistence/FoldersReuseCompatibilityTest.java @@ -36,12 +36,16 @@ import org.apache.ignite.lang.IgniteInClosure; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.processors.cache.persistence.filename.PdsConsistentIdProcessor.parseSubFolderName; /** * Test for new and old style persistent storage folders generation and compatible startup of current ignite version */ +@RunWith(JUnit4.class) public class FoldersReuseCompatibilityTest extends IgnitePersistenceCompatibilityAbstractTest { /** Cache name for test. */ private static final String CACHE_NAME = "dummy"; @@ -80,6 +84,7 @@ public void ignored_testFoldersReuseCompatibility_2_3() throws Exception { * * @throws Exception if failed. */ + @Test public void testFoldersReuseCompatibility_2_2() throws Exception { runFoldersReuse("2.2.0"); } @@ -90,6 +95,7 @@ public void testFoldersReuseCompatibility_2_2() throws Exception { * * @throws Exception if failed. */ + @Test public void testFoldersReuseCompatibility_2_1() throws Exception { runFoldersReuse("2.1.0"); } diff --git a/modules/compatibility/src/test/java/org/apache/ignite/compatibility/persistence/IgnitePKIndexesMigrationToUnwrapPkTest.java b/modules/compatibility/src/test/java/org/apache/ignite/compatibility/persistence/IgnitePKIndexesMigrationToUnwrapPkTest.java index 60b64642b63fa..bac39a58c514a 100644 --- a/modules/compatibility/src/test/java/org/apache/ignite/compatibility/persistence/IgnitePKIndexesMigrationToUnwrapPkTest.java +++ b/modules/compatibility/src/test/java/org/apache/ignite/compatibility/persistence/IgnitePKIndexesMigrationToUnwrapPkTest.java @@ -33,10 +33,14 @@ import org.apache.ignite.lang.IgniteInClosure; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test to check that starting node with PK index of the old format present doesn't break anything. */ +@RunWith(JUnit4.class) public class IgnitePKIndexesMigrationToUnwrapPkTest extends IgnitePersistenceCompatibilityAbstractTest { /** */ private static String TABLE_NAME = "TEST_IDX_TABLE"; @@ -73,6 +77,7 @@ public class IgnitePKIndexesMigrationToUnwrapPkTest extends IgnitePersistenceCom * * @throws Exception If failed. */ + @Test public void testSecondaryIndexesMigration_2_5() throws Exception { doTestStartupWithOldVersion("2.5.0"); } @@ -82,6 +87,7 @@ public void testSecondaryIndexesMigration_2_5() throws Exception { * * @throws Exception If failed. */ + @Test public void testSecondaryIndexesMigration_2_4() throws Exception { doTestStartupWithOldVersion("2.4.0"); } diff --git a/modules/compatibility/src/test/java/org/apache/ignite/compatibility/persistence/MigratingToWalV2SerializerWithCompactionTest.java b/modules/compatibility/src/test/java/org/apache/ignite/compatibility/persistence/MigratingToWalV2SerializerWithCompactionTest.java index d4c58f8f4b3c5..84d0cfa610e63 100644 --- a/modules/compatibility/src/test/java/org/apache/ignite/compatibility/persistence/MigratingToWalV2SerializerWithCompactionTest.java +++ b/modules/compatibility/src/test/java/org/apache/ignite/compatibility/persistence/MigratingToWalV2SerializerWithCompactionTest.java @@ -34,10 +34,14 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.lang.IgniteInClosure; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Saves data using previous version of ignite and then load this data using actual version */ +@RunWith(JUnit4.class) public class MigratingToWalV2SerializerWithCompactionTest extends IgnitePersistenceCompatibilityAbstractTest { /** */ private static final String TEST_CACHE_NAME = MigratingToWalV2SerializerWithCompactionTest.class.getSimpleName(); @@ -78,6 +82,7 @@ public class MigratingToWalV2SerializerWithCompactionTest extends IgnitePersiste * * @throws Exception If failed. */ + @Test public void testCompactingOldWalFiles() throws Exception { doTestStartupWithOldVersion("2.3.0"); } diff --git a/modules/compatibility/src/test/java/org/apache/ignite/compatibility/persistence/PersistenceBasicCompatibilityTest.java b/modules/compatibility/src/test/java/org/apache/ignite/compatibility/persistence/PersistenceBasicCompatibilityTest.java index a94c45990bbb0..8088dda909bb0 100644 --- a/modules/compatibility/src/test/java/org/apache/ignite/compatibility/persistence/PersistenceBasicCompatibilityTest.java +++ b/modules/compatibility/src/test/java/org/apache/ignite/compatibility/persistence/PersistenceBasicCompatibilityTest.java @@ -38,10 +38,14 @@ import org.apache.ignite.internal.processors.cache.GridCacheAbstractFullApiSelfTest; import org.apache.ignite.lang.IgniteInClosure; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Saves data using previous version of ignite and then load this data using actual version. */ +@RunWith(JUnit4.class) public class PersistenceBasicCompatibilityTest extends IgnitePersistenceCompatibilityAbstractTest { /** */ protected static final String TEST_CACHE_NAME = PersistenceBasicCompatibilityTest.class.getSimpleName(); @@ -76,6 +80,7 @@ public class PersistenceBasicCompatibilityTest extends IgnitePersistenceCompatib * * @throws Exception If failed. */ + @Test public void testNodeStartByOldVersionPersistenceData_2_2() throws Exception { doTestStartupWithOldVersion("2.2.0"); } @@ -85,6 +90,7 @@ public void testNodeStartByOldVersionPersistenceData_2_2() throws Exception { * * @throws Exception If failed. */ + @Test public void testNodeStartByOldVersionPersistenceData_2_1() throws Exception { doTestStartupWithOldVersion("2.1.0"); } @@ -94,6 +100,7 @@ public void testNodeStartByOldVersionPersistenceData_2_1() throws Exception { * * @throws Exception If failed. */ + @Test public void testNodeStartByOldVersionPersistenceData_2_3() throws Exception { doTestStartupWithOldVersion("2.3.0"); } @@ -103,6 +110,7 @@ public void testNodeStartByOldVersionPersistenceData_2_3() throws Exception { * * @throws Exception If failed. */ + @Test public void testNodeStartByOldVersionPersistenceData_2_4() throws Exception { doTestStartupWithOldVersion("2.4.0"); } @@ -112,6 +120,7 @@ public void testNodeStartByOldVersionPersistenceData_2_4() throws Exception { * * @throws Exception If failed. */ + @Test public void testNodeStartByOldVersionPersistenceData_2_5() throws Exception { doTestStartupWithOldVersion("2.5.0"); } @@ -121,6 +130,7 @@ public void testNodeStartByOldVersionPersistenceData_2_5() throws Exception { * * @throws Exception If failed. */ + @Test public void testNodeStartByOldVersionPersistenceData_2_6() throws Exception { doTestStartupWithOldVersion("2.6.0"); } From 5dd5481c8c6452a287a92cf4146afd20922d5701 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Thu, 6 Dec 2018 20:50:31 +0300 Subject: [PATCH 054/176] IGNITE-10176 migrate non-core modules tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview and rebuild --- .../compress/CompressionProcessorTest.java | 64 +++++++++++++++++++ .../DiskPageCompressionIntegrationTest.java | 12 ++++ .../compress/FileSystemUtilsTest.java | 5 ++ 3 files changed, 81 insertions(+) diff --git a/modules/compress/src/test/java/org/apache/ignite/internal/processors/compress/CompressionProcessorTest.java b/modules/compress/src/test/java/org/apache/ignite/internal/processors/compress/CompressionProcessorTest.java index f660426540bc9..56b21f50106aa 100644 --- a/modules/compress/src/test/java/org/apache/ignite/internal/processors/compress/CompressionProcessorTest.java +++ b/modules/compress/src/test/java/org/apache/ignite/internal/processors/compress/CompressionProcessorTest.java @@ -41,6 +41,9 @@ import org.apache.ignite.internal.util.GridUnsafe; import org.apache.ignite.testframework.junits.GridTestKernalContext; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.configuration.DiskPageCompression.LZ4; import static org.apache.ignite.configuration.DiskPageCompression.SKIP_GARBAGE; @@ -57,6 +60,7 @@ /** */ +@RunWith(JUnit4.class) public class CompressionProcessorTest extends GridCommonAbstractTest { /** */ private static final int ITEM_SIZE = 6; // To fill the whole page. @@ -91,6 +95,7 @@ public class CompressionProcessorTest extends GridCommonAbstractTest { /** * @throws IgniteCheckedException If failed. */ + @Test public void testDataPageCompact16() throws IgniteCheckedException { blockSize = 16; compression = SKIP_GARBAGE; @@ -101,6 +106,7 @@ public void testDataPageCompact16() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testDataPageCompact128() throws IgniteCheckedException { blockSize = 128; compression = SKIP_GARBAGE; @@ -111,6 +117,7 @@ public void testDataPageCompact128() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testDataPageCompact1k() throws IgniteCheckedException { blockSize = 1024; compression = SKIP_GARBAGE; @@ -121,6 +128,7 @@ public void testDataPageCompact1k() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testDataPageCompact2k() throws IgniteCheckedException { blockSize = 2 * 1024; compression = SKIP_GARBAGE; @@ -131,6 +139,7 @@ public void testDataPageCompact2k() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testDataPageZstd16() throws IgniteCheckedException { blockSize = 16; compression = ZSTD; @@ -142,6 +151,7 @@ public void testDataPageZstd16() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testDataPageZstd128() throws IgniteCheckedException { blockSize = 128; compression = ZSTD; @@ -153,6 +163,7 @@ public void testDataPageZstd128() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testDataPageZstd1k() throws IgniteCheckedException { blockSize = 1024; compression = ZSTD; @@ -164,6 +175,7 @@ public void testDataPageZstd1k() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testDataPageZstd2k() throws IgniteCheckedException { blockSize = 2 * 1024; compression = ZSTD; @@ -175,6 +187,7 @@ public void testDataPageZstd2k() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testDataPageSnappy16() throws IgniteCheckedException { blockSize = 16; compression = SNAPPY; @@ -185,6 +198,7 @@ public void testDataPageSnappy16() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testDataPageSnappy128() throws IgniteCheckedException { blockSize = 128; compression = SNAPPY; @@ -195,6 +209,7 @@ public void testDataPageSnappy128() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testDataPageSnappy1k() throws IgniteCheckedException { blockSize = 1024; compression = SNAPPY; @@ -205,6 +220,7 @@ public void testDataPageSnappy1k() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testDataPageSnappy2k() throws IgniteCheckedException { blockSize = 2 * 1024; compression = SNAPPY; @@ -216,6 +232,7 @@ public void testDataPageSnappy2k() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testDataPageLz4Fast16() throws IgniteCheckedException { blockSize = 16; compression = LZ4; @@ -227,6 +244,7 @@ public void testDataPageLz4Fast16() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testDataPageLz4Fast128() throws IgniteCheckedException { blockSize = 128; compression = LZ4; @@ -238,6 +256,7 @@ public void testDataPageLz4Fast128() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testDataPageLz4Fast1k() throws IgniteCheckedException { blockSize = 1024; compression = LZ4; @@ -249,6 +268,7 @@ public void testDataPageLz4Fast1k() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testDataPageLz4Fast2k() throws IgniteCheckedException { blockSize = 2 * 1024; compression = LZ4; @@ -260,6 +280,7 @@ public void testDataPageLz4Fast2k() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testDataPageLz4Slow16() throws IgniteCheckedException { blockSize = 16; compression = LZ4; @@ -271,6 +292,7 @@ public void testDataPageLz4Slow16() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testDataPageLz4Slow128() throws IgniteCheckedException { blockSize = 128; compression = LZ4; @@ -282,6 +304,7 @@ public void testDataPageLz4Slow128() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testDataPageLz4Slow1k() throws IgniteCheckedException { blockSize = 1024; compression = LZ4; @@ -293,6 +316,7 @@ public void testDataPageLz4Slow1k() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testDataPageLz4Slow2k() throws IgniteCheckedException { blockSize = 2 * 1024; compression = LZ4; @@ -304,6 +328,7 @@ public void testDataPageLz4Slow2k() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testInnerPageCompact16() throws IgniteCheckedException { blockSize = 16; compression = SKIP_GARBAGE; @@ -314,6 +339,7 @@ public void testInnerPageCompact16() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testLeafPageCompact16() throws IgniteCheckedException { blockSize = 16; compression = SKIP_GARBAGE; @@ -324,6 +350,7 @@ public void testLeafPageCompact16() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testInnerPageZstd16() throws IgniteCheckedException { blockSize = 16; compression = ZSTD; @@ -335,6 +362,7 @@ public void testInnerPageZstd16() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testLeafPageZstd16() throws IgniteCheckedException { blockSize = 16; compression = ZSTD; @@ -347,6 +375,7 @@ public void testLeafPageZstd16() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testInnerPageLz4Fast16() throws IgniteCheckedException { blockSize = 16; compression = LZ4; @@ -358,6 +387,7 @@ public void testInnerPageLz4Fast16() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testLeafPageLz4Fast16() throws IgniteCheckedException { blockSize = 16; compression = LZ4; @@ -369,6 +399,7 @@ public void testLeafPageLz4Fast16() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testInnerPageLz4Slow16() throws IgniteCheckedException { blockSize = 16; compression = LZ4; @@ -380,6 +411,7 @@ public void testInnerPageLz4Slow16() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testLeafPageLz4Slow16() throws IgniteCheckedException { blockSize = 16; compression = LZ4; @@ -391,6 +423,7 @@ public void testLeafPageLz4Slow16() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testInnerPageSnappy16() throws IgniteCheckedException { blockSize = 16; compression = SNAPPY; @@ -401,6 +434,7 @@ public void testInnerPageSnappy16() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testLeafPageSnappy16() throws IgniteCheckedException { blockSize = 16; compression = SNAPPY; @@ -411,6 +445,7 @@ public void testLeafPageSnappy16() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testInnerPageCompact128() throws IgniteCheckedException { blockSize = 128; compression = SKIP_GARBAGE; @@ -421,6 +456,7 @@ public void testInnerPageCompact128() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testLeafPageCompact128() throws IgniteCheckedException { blockSize = 128; compression = SKIP_GARBAGE; @@ -431,6 +467,7 @@ public void testLeafPageCompact128() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testInnerPageZstd128() throws IgniteCheckedException { blockSize = 128; compression = ZSTD; @@ -442,6 +479,7 @@ public void testInnerPageZstd128() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testLeafPageZstd128() throws IgniteCheckedException { blockSize = 128; compression = ZSTD; @@ -453,6 +491,7 @@ public void testLeafPageZstd128() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testInnerPageLz4Fast128() throws IgniteCheckedException { blockSize = 128; compression = LZ4; @@ -464,6 +503,7 @@ public void testInnerPageLz4Fast128() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testLeafPageLz4Fast128() throws IgniteCheckedException { blockSize = 128; compression = LZ4; @@ -475,6 +515,7 @@ public void testLeafPageLz4Fast128() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testInnerPageLz4Slow128() throws IgniteCheckedException { blockSize = 128; compression = LZ4; @@ -486,6 +527,7 @@ public void testInnerPageLz4Slow128() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testLeafPageLz4Slow128() throws IgniteCheckedException { blockSize = 128; compression = LZ4; @@ -497,6 +539,7 @@ public void testLeafPageLz4Slow128() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testInnerPageSnappy128() throws IgniteCheckedException { blockSize = 128; compression = SNAPPY; @@ -507,6 +550,7 @@ public void testInnerPageSnappy128() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testLeafPageSnappy128() throws IgniteCheckedException { blockSize = 128; compression = SNAPPY; @@ -517,6 +561,7 @@ public void testLeafPageSnappy128() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testInnerPageCompact1k() throws IgniteCheckedException { blockSize = 1024; compression = SKIP_GARBAGE; @@ -527,6 +572,7 @@ public void testInnerPageCompact1k() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testLeafPageCompact1k() throws IgniteCheckedException { blockSize = 1024; compression = SKIP_GARBAGE; @@ -537,6 +583,7 @@ public void testLeafPageCompact1k() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testInnerPageZstd1k() throws IgniteCheckedException { blockSize = 1024; compression = ZSTD; @@ -548,6 +595,7 @@ public void testInnerPageZstd1k() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testLeafPageZstd1k() throws IgniteCheckedException { blockSize = 1024; compression = ZSTD; @@ -559,6 +607,7 @@ public void testLeafPageZstd1k() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testInnerPageLz4Fast1k() throws IgniteCheckedException { blockSize = 1024; compression = LZ4; @@ -570,6 +619,7 @@ public void testInnerPageLz4Fast1k() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testLeafPageLz4Fast1k() throws IgniteCheckedException { blockSize = 1024; compression = LZ4; @@ -581,6 +631,7 @@ public void testLeafPageLz4Fast1k() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testInnerPageLz4Slow1k() throws IgniteCheckedException { blockSize = 1024; compression = LZ4; @@ -592,6 +643,7 @@ public void testInnerPageLz4Slow1k() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testLeafPageLz4Slow1k() throws IgniteCheckedException { blockSize = 1024; compression = LZ4; @@ -603,6 +655,7 @@ public void testLeafPageLz4Slow1k() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testInnerPageSnappy1k() throws IgniteCheckedException { blockSize = 1024; compression = SNAPPY; @@ -613,6 +666,7 @@ public void testInnerPageSnappy1k() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testLeafPageSnappy1k() throws IgniteCheckedException { blockSize = 1024; compression = SNAPPY; @@ -623,6 +677,7 @@ public void testLeafPageSnappy1k() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testInnerPageCompact2k() throws IgniteCheckedException { blockSize = 2 * 1024; compression = SKIP_GARBAGE; @@ -633,6 +688,7 @@ public void testInnerPageCompact2k() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testLeafPageCompact2k() throws IgniteCheckedException { blockSize = 2 * 1024; compression = SKIP_GARBAGE; @@ -643,6 +699,7 @@ public void testLeafPageCompact2k() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testInnerPageZstd2k() throws IgniteCheckedException { blockSize = 2 * 1024; compression = ZSTD; @@ -654,6 +711,7 @@ public void testInnerPageZstd2k() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testLeafPageZstd2k() throws IgniteCheckedException { blockSize = 2 * 1024; compression = ZSTD; @@ -665,6 +723,7 @@ public void testLeafPageZstd2k() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testInnerPageLz4Fast2k() throws IgniteCheckedException { blockSize = 2 * 1024; compression = LZ4; @@ -676,6 +735,7 @@ public void testInnerPageLz4Fast2k() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testLeafPageLz4Fast2k() throws IgniteCheckedException { blockSize = 2 * 1024; compression = LZ4; @@ -687,6 +747,7 @@ public void testLeafPageLz4Fast2k() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testInnerPageLz4Slow2k() throws IgniteCheckedException { blockSize = 2 * 1024; compression = LZ4; @@ -698,6 +759,7 @@ public void testInnerPageLz4Slow2k() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testLeafPageLz4Slow2k() throws IgniteCheckedException { blockSize = 2 * 1024; compression = LZ4; @@ -709,6 +771,7 @@ public void testLeafPageLz4Slow2k() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testInnerPageSnappy2k() throws IgniteCheckedException { blockSize = 2 * 1024; compression = SNAPPY; @@ -719,6 +782,7 @@ public void testInnerPageSnappy2k() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testLeafPageSnappy2k() throws IgniteCheckedException { blockSize = 2 * 1024; compression = SNAPPY; diff --git a/modules/compress/src/test/java/org/apache/ignite/internal/processors/compress/DiskPageCompressionIntegrationTest.java b/modules/compress/src/test/java/org/apache/ignite/internal/processors/compress/DiskPageCompressionIntegrationTest.java index ca7f4ea88b8bb..9b6ed045a5c0e 100644 --- a/modules/compress/src/test/java/org/apache/ignite/internal/processors/compress/DiskPageCompressionIntegrationTest.java +++ b/modules/compress/src/test/java/org/apache/ignite/internal/processors/compress/DiskPageCompressionIntegrationTest.java @@ -48,6 +48,9 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.mxbean.CacheGroupMetricsMXBean; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.configuration.DataStorageConfiguration.MAX_PAGE_SIZE; @@ -64,6 +67,7 @@ /** * */ +@RunWith(JUnit4.class) public class DiskPageCompressionIntegrationTest extends GridCommonAbstractTest { /** */ private DiskPageCompression compression; @@ -112,6 +116,7 @@ protected FileIOFactory getFileIOFactory() { /** * @throws Exception If failed. */ + @Test public void testPageCompression_Zstd_Max() throws Exception { compression = ZSTD; compressionLevel = ZSTD_MAX_LEVEL; @@ -122,6 +127,7 @@ public void testPageCompression_Zstd_Max() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPageCompression_Zstd_Default() throws Exception { compression = ZSTD; compressionLevel = null; @@ -132,6 +138,7 @@ public void testPageCompression_Zstd_Default() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPageCompression_Zstd_Min() throws Exception { compression = ZSTD; compressionLevel = ZSTD_MIN_LEVEL; @@ -142,6 +149,7 @@ public void testPageCompression_Zstd_Min() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPageCompression_Lz4_Max() throws Exception { compression = LZ4; compressionLevel = LZ4_MAX_LEVEL; @@ -152,6 +160,7 @@ public void testPageCompression_Lz4_Max() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPageCompression_Lz4_Default() throws Exception { compression = LZ4; compressionLevel = null; @@ -162,6 +171,7 @@ public void testPageCompression_Lz4_Default() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPageCompression_Lz4_Min() throws Exception { assertEquals(LZ4_MIN_LEVEL, LZ4_DEFAULT_LEVEL); } @@ -169,6 +179,7 @@ public void testPageCompression_Lz4_Min() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPageCompression_SkipGarbage() throws Exception { compression = SKIP_GARBAGE; @@ -178,6 +189,7 @@ public void testPageCompression_SkipGarbage() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPageCompression_Snappy() throws Exception { compression = SNAPPY; diff --git a/modules/compress/src/test/java/org/apache/ignite/internal/processors/compress/FileSystemUtilsTest.java b/modules/compress/src/test/java/org/apache/ignite/internal/processors/compress/FileSystemUtilsTest.java index 70dda0b09a9ce..c473633719506 100644 --- a/modules/compress/src/test/java/org/apache/ignite/internal/processors/compress/FileSystemUtilsTest.java +++ b/modules/compress/src/test/java/org/apache/ignite/internal/processors/compress/FileSystemUtilsTest.java @@ -26,6 +26,9 @@ import junit.framework.TestCase; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.util.typedef.internal.U; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.nio.file.StandardOpenOption.READ; import static java.nio.file.StandardOpenOption.TRUNCATE_EXISTING; @@ -37,10 +40,12 @@ /** */ +@RunWith(JUnit4.class) public class FileSystemUtilsTest extends TestCase { /** * @throws Exception If failed. */ + @Test public void testSparseFiles() throws Exception { if (!U.isLinux()) return; From 61b8a2c579528cdc4b2fad13bae6232c60ec0894 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Fri, 7 Dec 2018 11:24:54 +0300 Subject: [PATCH 055/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - some corrections per review and self-review -- verified with diffs overview and rebuild --- .../internal/GridContinuousJobAnnotationSelfTest.java | 1 + .../DeploymentRequestOfUnknownClassProcessingTest.java | 7 ++++++- .../processors/cache/CacheConnectionLeakStoreTxTest.java | 2 ++ .../CacheGetEntryPessimisticRepeatableReadSelfTest.java | 8 ++++++++ .../cache/CacheTxNotAllowReadFromBackupTest.java | 4 ++++ .../processors/cache/GridCacheVersionMultinodeTest.java | 1 + .../cache/IgniteCacheInvokeReadThroughSingleNodeTest.java | 2 ++ .../cache/IgniteCacheInvokeReadThroughTest.java | 3 +++ .../processors/cache/IgniteDynamicCacheStartSelfTest.java | 1 + .../GridCacheAbstractDataStructuresFailoverSelfTest.java | 1 + .../distributed/IgniteCacheFailedUpdateResponseTest.java | 1 + .../cache/distributed/IgniteCacheReadFromBackupTest.java | 4 ++++ .../distributed/IgniteCacheSingleGetMessageTest.java | 1 + .../distributed/dht/IgniteCrossCacheMvccTxSelfTest.java | 5 +++++ .../IgniteRebalanceOnCachesStoppingOrDestroyingTest.java | 7 +++++++ .../ignite/testframework/assertions/AlwaysAssertion.java | 3 +-- .../test/ConfigVariationsTestSuiteBuilderTest.java | 3 +-- .../org/apache/ignite/util/GridCommandHandlerTest.java | 3 +++ 18 files changed, 52 insertions(+), 5 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousJobAnnotationSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousJobAnnotationSelfTest.java index 50173605d6594..55040062ebfdf 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousJobAnnotationSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousJobAnnotationSelfTest.java @@ -91,6 +91,7 @@ public void testJobChildAnnotation() throws Exception { * @param jobCls Job class. * @throws Exception If test failed. */ + @Test public void testContinuousJobAnnotation(Class jobCls) throws Exception { try { Ignite ignite = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/DeploymentRequestOfUnknownClassProcessingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/DeploymentRequestOfUnknownClassProcessingTest.java index f1f080bff7e98..833c56c98373f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/DeploymentRequestOfUnknownClassProcessingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/DeploymentRequestOfUnknownClassProcessingTest.java @@ -34,12 +34,16 @@ import org.apache.ignite.testframework.LogListener; import org.apache.ignite.testframework.config.GridTestProperties; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.GridTopic.TOPIC_CLASSLOAD; /** * Tests the processing of deployment request with an attempt to load a class with an unknown class name. */ +@RunWith(JUnit4.class) public class DeploymentRequestOfUnknownClassProcessingTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -91,6 +95,7 @@ public class DeploymentRequestOfUnknownClassProcessingTest extends GridCommonAbs /** * @throws Exception If failed. */ + @Test public void testResponseReceivingOnDeploymentRequestOfUnknownClass() throws Exception { IgniteEx locNode = grid(0); IgniteEx remNode = grid(1); @@ -148,4 +153,4 @@ public void testResponseReceivingOnDeploymentRequestOfUnknownClass() throws Exce // Checks that error has been logged on remote node. assertTrue(remNodeLogLsnr.check()); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheConnectionLeakStoreTxTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheConnectionLeakStoreTxTest.java index 39dd634393e19..29efe81063856 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheConnectionLeakStoreTxTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheConnectionLeakStoreTxTest.java @@ -185,6 +185,7 @@ public void testConnectionLeakOneBackupPessimisticReadCommittedLoadFromStore() t /** * @throws Exception If failed. */ + @Test public void testConnectionLeakOneBackupMvccPessimisticRepeatableRead() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-8582"); @@ -194,6 +195,7 @@ public void testConnectionLeakOneBackupMvccPessimisticRepeatableRead() throws Ex /** * @throws Exception If failed. */ + @Test public void testConnectionLeakOneBackupMvccPessimisticRepeatableReadLoadFromStore() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-8582"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryPessimisticRepeatableReadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryPessimisticRepeatableReadSelfTest.java index 906b726a296ca..ad1114b21d9f4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryPessimisticRepeatableReadSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryPessimisticRepeatableReadSelfTest.java @@ -21,6 +21,9 @@ import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT; import static org.apache.ignite.cache.CacheMode.LOCAL; @@ -31,6 +34,7 @@ /** * Test getEntry and getEntries methods. */ +@RunWith(JUnit4.class) public class CacheGetEntryPessimisticRepeatableReadSelfTest extends CacheGetEntryAbstractTest { /** {@inheritDoc} */ @Override protected TransactionConcurrency concurrency() { @@ -45,6 +49,7 @@ public class CacheGetEntryPessimisticRepeatableReadSelfTest extends CacheGetEntr /** * @throws Exception If failed. */ + @Test public void testNearTransactionalMvcc() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-7187"); @@ -62,6 +67,7 @@ public void testNearTransactionalMvcc() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPartitionedTransactionalMvcc() throws Exception { CacheConfiguration cfg = new CacheConfiguration(DEFAULT_CACHE_NAME); @@ -76,6 +82,7 @@ public void testPartitionedTransactionalMvcc() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLocalTransactionalMvcc() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-9530"); @@ -92,6 +99,7 @@ public void testLocalTransactionalMvcc() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReplicatedTransactionalMvcc() throws Exception { CacheConfiguration cfg = new CacheConfiguration(DEFAULT_CACHE_NAME); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheTxNotAllowReadFromBackupTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheTxNotAllowReadFromBackupTest.java index ae938266af9f9..e6bf92c0a54cd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheTxNotAllowReadFromBackupTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheTxNotAllowReadFromBackupTest.java @@ -199,6 +199,7 @@ public void testBackupConsistencyPartitionedFullSync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBackupConsistencyReplicatedMvcc() throws Exception { CacheConfiguration cfg = new CacheConfiguration<>("test-cache"); @@ -215,6 +216,7 @@ public void testBackupConsistencyReplicatedMvcc() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBackupConsistencyReplicatedFullSyncMvcc() throws Exception { CacheConfiguration cfg = new CacheConfiguration<>("test-cache"); @@ -231,6 +233,7 @@ public void testBackupConsistencyReplicatedFullSyncMvcc() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBackupConsistencyPartitionedMvcc() throws Exception { CacheConfiguration cfg = new CacheConfiguration<>("test-cache"); @@ -248,6 +251,7 @@ public void testBackupConsistencyPartitionedMvcc() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBackupConsistencyPartitionedFullSyncMvcc() throws Exception { CacheConfiguration cfg = new CacheConfiguration<>("test-cache"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionMultinodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionMultinodeTest.java index f4c6780f763d4..c89c7ad215df2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionMultinodeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionMultinodeTest.java @@ -128,6 +128,7 @@ public void testVersionMvccTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testVersionMvccTxNearEnabled() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-7187"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughSingleNodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughSingleNodeTest.java index 86086ba916924..c82e6175cfd5f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughSingleNodeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughSingleNodeTest.java @@ -134,6 +134,7 @@ public void testInvokeReadThroughMvccTxNearCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeReadThroughMvccTxReplicated() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-8582"); @@ -143,6 +144,7 @@ public void testInvokeReadThroughMvccTxReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeReadThroughMvccTxLocal() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-8582"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughTest.java index ed79cfd864baf..d2d21767c038d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughTest.java @@ -153,6 +153,7 @@ public void testInvokeReadThroughMvccTx1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeReadThroughMvccTx2() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-8582"); @@ -162,6 +163,7 @@ public void testInvokeReadThroughMvccTx2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeReadThroughMvccTxNearCache() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-8582"); @@ -171,6 +173,7 @@ public void testInvokeReadThroughMvccTxNearCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeReadThroughMvccTxReplicated() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-8582"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java index 19e47e35cf7e8..3fd8a5850f471 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java @@ -675,6 +675,7 @@ public void testClientCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStartFromClientNode() throws Exception { try { testAttribute = false; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java index db64dabab9edf..e6c8bdd458a11 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java @@ -757,6 +757,7 @@ public void testFairReentrantLockFailsWhenServersLeft() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReentrantLockFailsWhenServersLeft(final boolean fair) throws Exception { client = true; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheFailedUpdateResponseTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheFailedUpdateResponseTest.java index 18d52bc86fa34..84e575dbec8c9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheFailedUpdateResponseTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheFailedUpdateResponseTest.java @@ -162,6 +162,7 @@ public void testInvokeTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeMvccTx() throws Exception { testInvoke(mvccTxCache); testInvokeAll(mvccTxCache); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheReadFromBackupTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheReadFromBackupTest.java index fce4aceaac255..b68ed96779bbd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheReadFromBackupTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheReadFromBackupTest.java @@ -99,6 +99,7 @@ public void testGetFromBackupStoreReadThroughEnabled() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccGetFromBackupStoreReadThroughEnabled() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10274"); @@ -160,6 +161,7 @@ public void testGetFromBackupStoreReadThroughDisabled() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccGetFromBackupStoreReadThroughDisabled() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10274"); @@ -205,6 +207,7 @@ public void testGetFromPrimaryPreloadInProgress() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccGetFromPrimaryPreloadInProgress() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10274"); @@ -308,6 +311,7 @@ public void testNoPrimaryReadPreloadFinished() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccNoPrimaryReadPreloadFinished() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10274"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSingleGetMessageTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSingleGetMessageTest.java index b6bbb2a68a6eb..3e8f113927a12 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSingleGetMessageTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSingleGetMessageTest.java @@ -100,6 +100,7 @@ public void testSingleGetMessage() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccSingleGetMessage() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-7371"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCrossCacheMvccTxSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCrossCacheMvccTxSelfTest.java index 63a255e922d5d..e8cb36bbb7ed6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCrossCacheMvccTxSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCrossCacheMvccTxSelfTest.java @@ -17,6 +17,9 @@ package org.apache.ignite.internal.processors.cache.distributed.dht; import org.apache.ignite.cache.CacheAtomicityMode; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ; @@ -24,6 +27,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCrossCacheMvccTxSelfTest extends IgniteCrossCacheTxAbstractSelfTest { /** {@inheritDoc} */ @Override public CacheAtomicityMode atomicityMode() { @@ -33,6 +37,7 @@ public class IgniteCrossCacheMvccTxSelfTest extends IgniteCrossCacheTxAbstractSe /** * @throws Exception If failed. */ + @Test public void testPessimisticRepeatableRead() throws Exception { checkTxsSingleOp(PESSIMISTIC, REPEATABLE_READ); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/IgniteRebalanceOnCachesStoppingOrDestroyingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/IgniteRebalanceOnCachesStoppingOrDestroyingTest.java index 97f8d455e77d4..eb7a1abc13f65 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/IgniteRebalanceOnCachesStoppingOrDestroyingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/IgniteRebalanceOnCachesStoppingOrDestroyingTest.java @@ -53,10 +53,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteRebalanceOnCachesStoppingOrDestroyingTest extends GridCommonAbstractTest { /** */ private static final String CACHE_1 = "cache_1"; @@ -131,6 +135,7 @@ public class IgniteRebalanceOnCachesStoppingOrDestroyingTest extends GridCommonA /** * */ + @Test public void testStopCachesOnDeactivation() throws Exception { performTest(ig -> { ig.cluster().active(false); @@ -145,6 +150,7 @@ public void testStopCachesOnDeactivation() throws Exception { /** * */ + @Test public void testDestroySpecificCachesInDifferentCacheGroups() throws Exception { performTest(ig -> { ig.destroyCaches(Arrays.asList(CACHE_1, CACHE_3)); @@ -156,6 +162,7 @@ public void testDestroySpecificCachesInDifferentCacheGroups() throws Exception { /** * */ + @Test public void testDestroySpecificCacheAndCacheGroup() throws Exception { performTest(ig -> { ig.destroyCaches(Arrays.asList(CACHE_1, CACHE_3, CACHE_4)); diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/assertions/AlwaysAssertion.java b/modules/core/src/test/java/org/apache/ignite/testframework/assertions/AlwaysAssertion.java index 797ae2b93f2d2..f786d4dfda858 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/assertions/AlwaysAssertion.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/assertions/AlwaysAssertion.java @@ -23,8 +23,7 @@ public class AlwaysAssertion implements Assertion { public static final Assertion INSTANCE = new AlwaysAssertion(); /** {@inheritDoc} */ - @Override - public void test() throws AssertionError { + @Override public void test() throws AssertionError { // No-op. } } diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/test/ConfigVariationsTestSuiteBuilderTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/test/ConfigVariationsTestSuiteBuilderTest.java index 1b338fd2c4c48..c6edeb3ea1d4e 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/test/ConfigVariationsTestSuiteBuilderTest.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/test/ConfigVariationsTestSuiteBuilderTest.java @@ -112,8 +112,7 @@ private static class NoopTest extends IgniteConfigVariationsAbstractTest { /** * @throws Exception If failed. */ - @Test - public void test1() throws Exception { + public void test1() throws Exception { // No-op. } } diff --git a/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java b/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java index 4e4e2a9510813..d14d292363348 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java @@ -1132,6 +1132,7 @@ private void corruptingAndCheckDefaultCache(IgniteEx ignite, int parts, CacheFil * * @throws Exception If failed. */ + @Test public void testCacheIdleVerifyDumpForCorruptedDataOnSystemCache() throws Exception { int parts = 32; @@ -1192,6 +1193,7 @@ public void testCacheIdleVerifyDumpForCorruptedDataOnSystemCache() throws Except * * @throws Exception If failed. */ + @Test public void testCacheIdleVerifyDumpForCorruptedDataOnPersistenceClientCache() throws Exception { int parts = 32; @@ -1222,6 +1224,7 @@ public void testCacheIdleVerifyDumpForCorruptedDataOnPersistenceClientCache() th * * @throws Exception If failed. */ + @Test public void testCacheIdleVerifyDumpForCorruptedDataOnNonePersistenceClientCache() throws Exception { int parts = 32; From d3dfae6cfec5d9f824f71d39fa50d870e3b042cf Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Fri, 7 Dec 2018 12:07:46 +0300 Subject: [PATCH 056/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - corrections per review // JUnit4TestAdapter -- verified with diffs overview and rebuild --- .../IgniteCacheExpiryPolicyTestSuite.java | 42 +-- .../testsuites/IgniteBasicTestSuite.java | 122 ++++---- .../IgniteBasicWithPersistenceTestSuite.java | 43 ++- .../IgniteBinaryCacheTestSuite.java | 25 +- ...niteBinaryObjectsComputeGridTestSuite.java | 3 +- .../IgniteBinaryObjectsTestSuite.java | 140 ++++----- ...lockExchangeOnReadOperationsTestSuite.java | 10 +- ...gniteCacheDataStructuresSelfTestSuite.java | 5 +- .../IgniteCacheFailoverTestSuite.java | 39 +-- .../IgniteCacheFailoverTestSuite2.java | 36 +-- .../IgniteCacheFailoverTestSuite3.java | 10 +- .../IgniteCacheFailoverTestSuiteSsl.java | 6 +- ...niteCacheFullApiMultiJvmSelfTestSuite.java | 54 ++-- .../IgniteCacheFullApiSelfTestSuite.java | 144 ++++----- .../IgniteCacheLoadConsistencyTestSuite.java | 10 +- .../IgniteCacheMetricsSelfTestSuite.java | 44 +-- .../testsuites/IgniteCacheMvccTestSuite.java | 43 +-- .../testsuites/IgniteCacheMvccTestSuite2.java | 11 +- .../testsuites/IgniteCacheMvccTestSuite3.java | 7 +- .../testsuites/IgniteCacheMvccTestSuite4.java | 3 +- .../testsuites/IgniteCacheMvccTestSuite6.java | 5 +- .../testsuites/IgniteCacheMvccTestSuite7.java | 5 +- .../IgniteCacheRestartTestSuite.java | 18 +- .../IgniteCacheRestartTestSuite2.java | 18 +- .../testsuites/IgniteCacheTestSuite.java | 293 +++++++++--------- .../testsuites/IgniteCacheTestSuite8.java | 15 +- .../IgniteCacheTxRecoverySelfTestSuite.java | 28 +- .../IgniteClientNodesTestSuite.java | 12 +- .../IgniteClientReconnectTestSuite.java | 34 +- .../IgniteComputeGridTestSuite.java | 143 ++++----- .../testsuites/IgniteDatabaseTestSuite.java | 8 +- .../IgniteDbMemoryLeakTestSuite.java | 16 +- .../testsuites/IgniteIgfsTestSuite.java | 47 ++- .../testsuites/IgniteKernalSelfTestSuite.java | 131 ++++---- .../IgniteLostAndFoundTestSuite.java | 27 +- .../ignite/testsuites/IgnitePdsTestSuite.java | 82 ++--- .../testsuites/IgnitePdsTestSuite2.java | 103 +++--- .../testsuites/IgnitePdsTestSuite3.java | 5 +- .../testsuites/IgnitePdsTestSuite4.java | 25 +- .../IgnitePerformanceTestSuite.java | 49 +-- .../testsuites/IgniteReproducingSuite.java | 2 +- .../IgniteRestHandlerTestSuite.java | 14 +- .../IgniteSpiCollisionSelfTestSuite.java | 28 +- .../IgniteSpiLoadBalancingSelfTestSuite.java | 31 +- .../ignite/testsuites/IgniteSpiTestSuite.java | 7 +- .../testsuites/IgniteStandByClusterSuite.java | 43 +-- .../testsuites/IgniteUtilSelfTestSuite.java | 85 +++-- .../TxDeadlockDetectionTestSuite.java | 24 +- 48 files changed, 1055 insertions(+), 1040 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyTestSuite.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyTestSuite.java index 61d9b4c296de6..4a1d1209a270e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.internal.processors.cache.expiry; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.cache.store.IgniteCacheExpiryStoreLoadSelfTest; import org.apache.ignite.internal.processors.cache.GridCacheTtlManagerNotificationTest; @@ -29,39 +30,38 @@ public class IgniteCacheExpiryPolicyTestSuite extends TestSuite { /** * @return Cache Expiry Policy test suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Cache Expiry Policy Test Suite"); - suite.addTestSuite(IgniteCacheLargeValueExpireTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheLargeValueExpireTest.class)); - suite.addTestSuite(IgniteCacheAtomicLocalExpiryPolicyTest.class); - //suite.addTestSuite(IgniteCacheAtomicLocalOnheapExpiryPolicyTest.class); - suite.addTestSuite(IgniteCacheAtomicExpiryPolicyTest.class); - //suite.addTestSuite(IgniteCacheAtomicOnheapExpiryPolicyTest.class); - suite.addTestSuite(IgniteCacheAtomicWithStoreExpiryPolicyTest.class); - suite.addTestSuite(IgniteCacheAtomicReplicatedExpiryPolicyTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheAtomicLocalExpiryPolicyTest.class)); + //suite.addTest(new JUnit4TestAdapter(IgniteCacheAtomicLocalOnheapExpiryPolicyTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheAtomicExpiryPolicyTest.class)); + //suite.addTest(new JUnit4TestAdapter(IgniteCacheAtomicOnheapExpiryPolicyTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheAtomicWithStoreExpiryPolicyTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheAtomicReplicatedExpiryPolicyTest.class)); - suite.addTestSuite(IgniteCacheTxLocalExpiryPolicyTest.class); - suite.addTestSuite(IgniteCacheTxExpiryPolicyTest.class); - suite.addTestSuite(IgniteCacheTxWithStoreExpiryPolicyTest.class); - suite.addTestSuite(IgniteCacheTxReplicatedExpiryPolicyTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheTxLocalExpiryPolicyTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheTxExpiryPolicyTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheTxWithStoreExpiryPolicyTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheTxReplicatedExpiryPolicyTest.class)); - suite.addTestSuite(IgniteCacheAtomicExpiryPolicyWithStoreTest.class); - suite.addTestSuite(IgniteCacheTxExpiryPolicyWithStoreTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheAtomicExpiryPolicyWithStoreTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheTxExpiryPolicyWithStoreTest.class)); - suite.addTestSuite(IgniteCacheExpiryStoreLoadSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheExpiryStoreLoadSelfTest.class)); - suite.addTestSuite(IgniteCacheClientNearCacheExpiryTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheClientNearCacheExpiryTest.class)); - suite.addTestSuite(IgniteCacheEntryListenerExpiredEventsTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheEntryListenerExpiredEventsTest.class)); - suite.addTestSuite(IgniteCacheExpireAndUpdateConsistencyTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheExpireAndUpdateConsistencyTest.class)); // Eager ttl expiration tests. - suite.addTestSuite(GridCacheTtlManagerNotificationTest.class); - suite.addTestSuite(IgniteCacheOnlyOneTtlCleanupThreadExistsTest.class); + suite.addTest(new JUnit4TestAdapter(GridCacheTtlManagerNotificationTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheOnlyOneTtlCleanupThreadExistsTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java index 4998c4e50137f..6db526524fa97 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java @@ -136,87 +136,87 @@ public static TestSuite suite(@Nullable final Set ignoredTests) throws Ex GridTestUtils.addTestIfNeeded(suite, GridMessagingNoPeerClassLoadingSelfTest.class, ignoredTests); GridTestUtils.addTestIfNeeded(suite, GridReleaseTypeSelfTest.class, ignoredTests); - suite.addTestSuite(GridProductVersionSelfTest.class); - suite.addTestSuite(GridAffinityProcessorRendezvousSelfTest.class); - suite.addTestSuite(GridAffinityProcessorMemoryLeakTest.class); - suite.addTestSuite(GridClosureProcessorSelfTest.class); - suite.addTestSuite(GridClosureProcessorRemoteTest.class); - suite.addTestSuite(GridClosureSerializationTest.class); - suite.addTestSuite(ClosureServiceClientsNodesTest.class); - suite.addTestSuite(GridStartStopSelfTest.class); - suite.addTestSuite(GridProjectionForCachesSelfTest.class); - suite.addTestSuite(GridProjectionForCachesOnDaemonNodeSelfTest.class); - suite.addTestSuite(GridSpiLocalHostInjectionTest.class); - suite.addTestSuite(GridLifecycleBeanSelfTest.class); - suite.addTestSuite(GridStopWithCancelSelfTest.class); - suite.addTestSuite(GridReduceSelfTest.class); - suite.addTestSuite(GridEventConsumeSelfTest.class); - suite.addTestSuite(GridSuppressedExceptionSelfTest.class); - suite.addTestSuite(GridLifecycleAwareSelfTest.class); - suite.addTestSuite(GridMessageListenSelfTest.class); - suite.addTestSuite(GridFailFastNodeFailureDetectionSelfTest.class); - suite.addTestSuite(IgniteSlowClientDetectionSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridProductVersionSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridAffinityProcessorRendezvousSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridAffinityProcessorMemoryLeakTest.class)); + suite.addTest(new JUnit4TestAdapter(GridClosureProcessorSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridClosureProcessorRemoteTest.class)); + suite.addTest(new JUnit4TestAdapter(GridClosureSerializationTest.class)); + suite.addTest(new JUnit4TestAdapter(ClosureServiceClientsNodesTest.class)); + suite.addTest(new JUnit4TestAdapter(GridStartStopSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridProjectionForCachesSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridProjectionForCachesOnDaemonNodeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridSpiLocalHostInjectionTest.class)); + suite.addTest(new JUnit4TestAdapter(GridLifecycleBeanSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridStopWithCancelSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridReduceSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridEventConsumeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridSuppressedExceptionSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridLifecycleAwareSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridMessageListenSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridFailFastNodeFailureDetectionSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteSlowClientDetectionSelfTest.class)); GridTestUtils.addTestIfNeeded(suite, IgniteDaemonNodeMarshallerCacheTest.class, ignoredTests); - suite.addTestSuite(IgniteMarshallerCacheConcurrentReadWriteTest.class); - suite.addTestSuite(GridNodeMetricsLogSelfTest.class); - suite.addTestSuite(GridLocalIgniteSerializationTest.class); - suite.addTestSuite(GridMBeansTest.class); - suite.addTestSuite(TransactionsMXBeanImplTest.class); - suite.addTestSuite(SetTxTimeoutOnPartitionMapExchangeTest.class); - - suite.addTestSuite(IgniteExceptionInNioWorkerSelfTest.class); - suite.addTestSuite(IgniteLocalNodeMapBeforeStartTest.class); - suite.addTestSuite(OdbcConfigurationValidationSelfTest.class); - suite.addTestSuite(OdbcEscapeSequenceSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteMarshallerCacheConcurrentReadWriteTest.class)); + suite.addTest(new JUnit4TestAdapter(GridNodeMetricsLogSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridLocalIgniteSerializationTest.class)); + suite.addTest(new JUnit4TestAdapter(GridMBeansTest.class)); + suite.addTest(new JUnit4TestAdapter(TransactionsMXBeanImplTest.class)); + suite.addTest(new JUnit4TestAdapter(SetTxTimeoutOnPartitionMapExchangeTest.class)); + + suite.addTest(new JUnit4TestAdapter(IgniteExceptionInNioWorkerSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteLocalNodeMapBeforeStartTest.class)); + suite.addTest(new JUnit4TestAdapter(OdbcConfigurationValidationSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(OdbcEscapeSequenceSelfTest.class)); GridTestUtils.addTestIfNeeded(suite, DynamicProxySerializationMultiJvmSelfTest.class, ignoredTests); // Tests against configuration variations framework. - suite.addTestSuite(ParametersTest.class); - suite.addTestSuite(VariationsIteratorTest.class); - suite.addTestSuite(ConfigVariationsTestSuiteBuilderTest.class); - suite.addTestSuite(NotStringSystemPropertyTest.class); + suite.addTest(new JUnit4TestAdapter(ParametersTest.class)); + suite.addTest(new JUnit4TestAdapter(VariationsIteratorTest.class)); + suite.addTest(new JUnit4TestAdapter(ConfigVariationsTestSuiteBuilderTest.class)); + suite.addTest(new JUnit4TestAdapter(NotStringSystemPropertyTest.class)); - suite.addTestSuite(MarshallerContextLockingSelfTest.class); - suite.addTestSuite(MarshallerContextSelfTest.class); + suite.addTest(new JUnit4TestAdapter(MarshallerContextLockingSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(MarshallerContextSelfTest.class)); - suite.addTestSuite(SecurityPermissionSetBuilderTest.class); + suite.addTest(new JUnit4TestAdapter(SecurityPermissionSetBuilderTest.class)); - suite.addTestSuite(AttributeNodeFilterSelfTest.class); + suite.addTest(new JUnit4TestAdapter(AttributeNodeFilterSelfTest.class)); // Basic DB data structures. - suite.addTestSuite(BPlusTreeSelfTest.class); - suite.addTestSuite(BPlusTreeFakeReuseSelfTest.class); - suite.addTestSuite(BPlusTreeReuseSelfTest.class); - suite.addTestSuite(IndexStorageSelfTest.class); - suite.addTestSuite(CacheFreeListImplSelfTest.class); - suite.addTestSuite(DataRegionMetricsSelfTest.class); - suite.addTestSuite(SwapPathConstructionSelfTest.class); + suite.addTest(new JUnit4TestAdapter(BPlusTreeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(BPlusTreeFakeReuseSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(BPlusTreeReuseSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IndexStorageSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheFreeListImplSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(DataRegionMetricsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(SwapPathConstructionSelfTest.class)); - suite.addTestSuite(IgniteMarshallerCacheFSRestoreTest.class); - suite.addTestSuite(IgniteMarshallerCacheClassNameConflictTest.class); - suite.addTestSuite(IgniteMarshallerCacheClientRequestsMappingOnMissTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteMarshallerCacheFSRestoreTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteMarshallerCacheClassNameConflictTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteMarshallerCacheClientRequestsMappingOnMissTest.class)); - suite.addTestSuite(IgniteDiagnosticMessagesTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteDiagnosticMessagesTest.class)); - suite.addTestSuite(IgniteRejectConnectOnNodeStopTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteRejectConnectOnNodeStopTest.class)); - suite.addTestSuite(GridCleanerTest.class); + suite.addTest(new JUnit4TestAdapter(GridCleanerTest.class)); - suite.addTestSuite(ClassSetTest.class); + suite.addTest(new JUnit4TestAdapter(ClassSetTest.class)); // Basic failure handlers. - suite.addTestSuite(FailureHandlerTriggeredTest.class); - suite.addTestSuite(StopNodeFailureHandlerTest.class); - suite.addTestSuite(StopNodeOrHaltFailureHandlerTest.class); - suite.addTestSuite(OomFailureHandlerTest.class); - suite.addTestSuite(TransactionIntegrityWithSystemWorkerDeathTest.class); + suite.addTest(new JUnit4TestAdapter(FailureHandlerTriggeredTest.class)); + suite.addTest(new JUnit4TestAdapter(StopNodeFailureHandlerTest.class)); + suite.addTest(new JUnit4TestAdapter(StopNodeOrHaltFailureHandlerTest.class)); + suite.addTest(new JUnit4TestAdapter(OomFailureHandlerTest.class)); + suite.addTest(new JUnit4TestAdapter(TransactionIntegrityWithSystemWorkerDeathTest.class)); - suite.addTestSuite(AtomicOperationsInTxTest.class); + suite.addTest(new JUnit4TestAdapter(AtomicOperationsInTxTest.class)); - suite.addTestSuite(CacheRebalanceConfigValidationTest.class); + suite.addTest(new JUnit4TestAdapter(CacheRebalanceConfigValidationTest.class)); - suite.addTestSuite(ListeningTestLoggerTest.class); + suite.addTest(new JUnit4TestAdapter(ListeningTestLoggerTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicWithPersistenceTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicWithPersistenceTestSuite.java index 36f77ccc96912..edc0b1fb8e958 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicWithPersistenceTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicWithPersistenceTestSuite.java @@ -18,6 +18,7 @@ package org.apache.ignite.testsuites; import java.util.Set; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.failure.FailureHandlingConfigurationTest; import org.apache.ignite.failure.IoomFailureHandlerTest; @@ -45,41 +46,39 @@ public class IgniteBasicWithPersistenceTestSuite extends TestSuite { /** * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { return suite(null); } /** * @param ignoredTests Tests don't include in the execution. Providing null means nothing to exclude. * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite(@Nullable final Set ignoredTests) throws Exception { + public static TestSuite suite(@Nullable final Set ignoredTests) { TestSuite suite = new TestSuite("Ignite Basic With Persistence Test Suite"); - suite.addTestSuite(IoomFailureHandlerTest.class); - suite.addTestSuite(ClusterBaselineNodesMetricsSelfTest.class); - suite.addTestSuite(ServiceDeploymentOnActivationTest.class); - suite.addTestSuite(ServiceDeploymentOutsideBaselineTest.class); - suite.addTestSuite(GridMarshallerMappingConsistencyTest.class); - suite.addTestSuite(SystemWorkersTerminationTest.class); - suite.addTestSuite(FailureHandlingConfigurationTest.class); + suite.addTest(new JUnit4TestAdapter(IoomFailureHandlerTest.class)); + suite.addTest(new JUnit4TestAdapter(ClusterBaselineNodesMetricsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(ServiceDeploymentOnActivationTest.class)); + suite.addTest(new JUnit4TestAdapter(ServiceDeploymentOutsideBaselineTest.class)); + suite.addTest(new JUnit4TestAdapter(GridMarshallerMappingConsistencyTest.class)); + suite.addTest(new JUnit4TestAdapter(SystemWorkersTerminationTest.class)); + suite.addTest(new JUnit4TestAdapter(FailureHandlingConfigurationTest.class)); - suite.addTestSuite(GridCommandHandlerTest.class); - suite.addTestSuite(GridCommandHandlerSslTest.class); - suite.addTestSuite(GridInternalTaskUnusedWalSegmentsTest.class); + suite.addTest(new JUnit4TestAdapter(GridCommandHandlerTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCommandHandlerSslTest.class)); + suite.addTest(new JUnit4TestAdapter(GridInternalTaskUnusedWalSegmentsTest.class)); - suite.addTestSuite(GridNodeMetricsLogPdsSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridNodeMetricsLogPdsSelfTest.class)); - suite.addTestSuite(EncryptedCacheBigEntryTest.class); - suite.addTestSuite(EncryptedCacheCreateTest.class); - suite.addTestSuite(EncryptedCacheDestroyTest.class); - suite.addTestSuite(EncryptedCacheGroupCreateTest.class); - suite.addTestSuite(EncryptedCacheNodeJoinTest.class); - suite.addTestSuite(EncryptedCacheRestartTest.class); - suite.addTestSuite(EncryptedCachePreconfiguredRestartTest.class); + suite.addTest(new JUnit4TestAdapter(EncryptedCacheBigEntryTest.class)); + suite.addTest(new JUnit4TestAdapter(EncryptedCacheCreateTest.class)); + suite.addTest(new JUnit4TestAdapter(EncryptedCacheDestroyTest.class)); + suite.addTest(new JUnit4TestAdapter(EncryptedCacheGroupCreateTest.class)); + suite.addTest(new JUnit4TestAdapter(EncryptedCacheNodeJoinTest.class)); + suite.addTest(new JUnit4TestAdapter(EncryptedCacheRestartTest.class)); + suite.addTest(new JUnit4TestAdapter(EncryptedCachePreconfiguredRestartTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheTestSuite.java index 5cfe534d4c3b6..8da6fadd599ac 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheTestSuite.java @@ -18,6 +18,7 @@ package org.apache.ignite.testsuites; import java.util.HashSet; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.GridCacheAffinityRoutingSelfTest; import org.apache.ignite.internal.processors.cache.GridCacheEntryMemorySizeSelfTest; @@ -63,22 +64,22 @@ public static TestSuite suite() throws Exception { suite.addTest(IgniteCacheTestSuite.suite(ignoredTests)); // TODO GG-11148 - // suite.addTestSuite(GridCacheMemoryModeBinarySelfTest.class); + // suite.addTest(new JUnit4TestAdapter(GridCacheMemoryModeBinarySelfTest.class); - suite.addTestSuite(GridCacheBinariesPartitionedOnlyByteArrayValuesSelfTest.class); - suite.addTestSuite(GridCacheBinariesNearPartitionedByteArrayValuesSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridCacheBinariesPartitionedOnlyByteArrayValuesSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheBinariesNearPartitionedByteArrayValuesSelfTest.class)); - suite.addTestSuite(GridDataStreamerImplSelfTest.class); - suite.addTestSuite(DataStreamProcessorBinarySelfTest.class); - suite.addTestSuite(GridCacheAtomicPartitionedOnlyBinaryDataStreamerMultiNodeSelfTest.class); - suite.addTestSuite(GridCacheAtomicPartitionedOnlyBinaryDataStreamerMultithreadedSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridDataStreamerImplSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(DataStreamProcessorBinarySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheAtomicPartitionedOnlyBinaryDataStreamerMultiNodeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheAtomicPartitionedOnlyBinaryDataStreamerMultithreadedSelfTest.class)); - suite.addTestSuite(GridCacheAtomicPartitionedOnlyBinaryMultiNodeSelfTest.class); - suite.addTestSuite(GridCacheAtomicPartitionedOnlyBinaryMultithreadedSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridCacheAtomicPartitionedOnlyBinaryMultiNodeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheAtomicPartitionedOnlyBinaryMultithreadedSelfTest.class)); - suite.addTestSuite(GridCacheAffinityRoutingBinarySelfTest.class); - suite.addTestSuite(GridBinaryCacheEntryMemorySizeSelfTest.class); - suite.addTestSuite(CacheKeepBinaryWithInterceptorTest.class); + suite.addTest(new JUnit4TestAdapter(GridCacheAffinityRoutingBinarySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridBinaryCacheEntryMemorySizeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheKeepBinaryWithInterceptorTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryObjectsComputeGridTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryObjectsComputeGridTestSuite.java index 8798db9b1d667..84d0461f3d840 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryObjectsComputeGridTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryObjectsComputeGridTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.GridComputationBinarylizableClosuresSelfTest; @@ -31,7 +32,7 @@ public class IgniteBinaryObjectsComputeGridTestSuite { public static TestSuite suite() throws Exception { TestSuite suite = IgniteComputeGridTestSuite.suite(); - suite.addTestSuite(GridComputationBinarylizableClosuresSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridComputationBinarylizableClosuresSelfTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryObjectsTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryObjectsTestSuite.java index 79313e68a7a49..c7f0622f80c76 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryObjectsTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryObjectsTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.binary.BinaryArrayIdentityResolverSelfTest; import org.apache.ignite.internal.binary.BinaryBasicIdMapperSelfTest; @@ -79,84 +80,83 @@ public class IgniteBinaryObjectsTestSuite extends TestSuite { /** * @return Suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite Binary Objects Test Suite"); - suite.addTestSuite(BinarySimpleNameTestPropertySelfTest.class); - - suite.addTestSuite(BinaryBasicIdMapperSelfTest.class); - suite.addTestSuite(BinaryBasicNameMapperSelfTest.class); - - suite.addTestSuite(BinaryTreeSelfTest.class); - suite.addTestSuite(BinaryMarshallerSelfTest.class); - suite.addTestSuite(BinaryObjectExceptionSelfTest.class); - - suite.addTestSuite(BinarySerialiedFieldComparatorSelfTest.class); - suite.addTestSuite(BinaryArrayIdentityResolverSelfTest.class); - - suite.addTestSuite(BinaryConfigurationConsistencySelfTest.class); - suite.addTestSuite(BinaryConfigurationCustomSerializerSelfTest.class); - suite.addTestSuite(GridBinaryMarshallerCtxDisabledSelfTest.class); - suite.addTestSuite(BinaryObjectBuilderDefaultMappersSelfTest.class); - suite.addTestSuite(BinaryObjectBuilderSimpleNameLowerCaseMappersSelfTest.class); - suite.addTestSuite(BinaryObjectBuilderAdditionalSelfTest.class); - //suite.addTestSuite(BinaryFieldExtractionSelfTest.class); - suite.addTestSuite(BinaryFieldsHeapSelfTest.class); - suite.addTestSuite(BinaryFieldsOffheapSelfTest.class); - suite.addTestSuite(BinaryFooterOffsetsHeapSelfTest.class); - suite.addTestSuite(BinaryFooterOffsetsOffheapSelfTest.class); - suite.addTestSuite(BinaryEnumsSelfTest.class); - suite.addTestSuite(GridDefaultBinaryMappersBinaryMetaDataSelfTest.class); - suite.addTestSuite(GridSimpleLowerCaseBinaryMappersBinaryMetaDataSelfTest.class); - suite.addTestSuite(GridBinaryAffinityKeySelfTest.class); - suite.addTestSuite(GridBinaryWildcardsSelfTest.class); - suite.addTestSuite(BinaryObjectToStringSelfTest.class); - suite.addTestSuite(BinaryObjectTypeCompatibilityTest.class); + suite.addTest(new JUnit4TestAdapter(BinarySimpleNameTestPropertySelfTest.class)); + + suite.addTest(new JUnit4TestAdapter(BinaryBasicIdMapperSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(BinaryBasicNameMapperSelfTest.class)); + + suite.addTest(new JUnit4TestAdapter(BinaryTreeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(BinaryMarshallerSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(BinaryObjectExceptionSelfTest.class)); + + suite.addTest(new JUnit4TestAdapter(BinarySerialiedFieldComparatorSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(BinaryArrayIdentityResolverSelfTest.class)); + + suite.addTest(new JUnit4TestAdapter(BinaryConfigurationConsistencySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(BinaryConfigurationCustomSerializerSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridBinaryMarshallerCtxDisabledSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(BinaryObjectBuilderDefaultMappersSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(BinaryObjectBuilderSimpleNameLowerCaseMappersSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(BinaryObjectBuilderAdditionalSelfTest.class)); + //suite.addTest(new JUnit4TestAdapter(BinaryFieldExtractionSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(BinaryFieldsHeapSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(BinaryFieldsOffheapSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(BinaryFooterOffsetsHeapSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(BinaryFooterOffsetsOffheapSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(BinaryEnumsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridDefaultBinaryMappersBinaryMetaDataSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridSimpleLowerCaseBinaryMappersBinaryMetaDataSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridBinaryAffinityKeySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridBinaryWildcardsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(BinaryObjectToStringSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(BinaryObjectTypeCompatibilityTest.class)); // Tests for objects with non-compact footers. - suite.addTestSuite(BinaryMarshallerNonCompactSelfTest.class); - suite.addTestSuite(BinaryObjectBuilderNonCompactDefaultMappersSelfTest.class); - suite.addTestSuite(BinaryObjectBuilderNonCompactSimpleNameLowerCaseMappersSelfTest.class); - suite.addTestSuite(BinaryObjectBuilderAdditionalNonCompactSelfTest.class); - suite.addTestSuite(BinaryFieldsHeapNonCompactSelfTest.class); - suite.addTestSuite(BinaryFieldsOffheapNonCompactSelfTest.class); - suite.addTestSuite(BinaryFooterOffsetsHeapNonCompactSelfTest.class); - suite.addTestSuite(BinaryFooterOffsetsOffheapNonCompactSelfTest.class); - - suite.addTestSuite(GridCacheBinaryObjectsLocalSelfTest.class); - //suite.addTestSuite(GridCacheBinaryObjectsLocalOnheapSelfTest.class); - suite.addTestSuite(GridCacheBinaryObjectsAtomicLocalSelfTest.class); - suite.addTestSuite(GridCacheBinaryObjectsReplicatedSelfTest.class); - suite.addTestSuite(GridCacheBinaryObjectsPartitionedSelfTest.class); - suite.addTestSuite(GridCacheBinaryObjectsPartitionedNearDisabledSelfTest.class); - //suite.addTestSuite(GridCacheBinaryObjectsPartitionedNearDisabledOnheapSelfTest.class); - //suite.addTestSuite(GridCacheBinaryObjectsPartitionedOnheapSelfTest.class); - suite.addTestSuite(GridCacheBinaryObjectsAtomicSelfTest.class); - //suite.addTestSuite(GridCacheBinaryObjectsAtomicOnheapSelfTest.class); - suite.addTestSuite(GridCacheBinaryObjectsAtomicNearDisabledSelfTest.class); - //suite.addTestSuite(GridCacheBinaryObjectsAtomicNearDisabledOnheapSelfTest.class); - - suite.addTestSuite(GridCacheBinaryStoreObjectsSelfTest.class); - suite.addTestSuite(GridCacheBinaryStoreBinariesDefaultMappersSelfTest.class); - suite.addTestSuite(GridCacheBinaryStoreBinariesSimpleNameMappersSelfTest.class); - - suite.addTestSuite(GridCacheClientNodeBinaryObjectMetadataTest.class); - suite.addTestSuite(GridCacheBinaryObjectMetadataExchangeMultinodeTest.class); - suite.addTestSuite(BinaryMetadataUpdatesFlowTest.class); - suite.addTestSuite(GridCacheClientNodeBinaryObjectMetadataMultinodeTest.class); - suite.addTestSuite(IgniteBinaryMetadataUpdateChangingTopologySelfTest.class); - - suite.addTestSuite(BinaryTxCacheLocalEntriesSelfTest.class); - suite.addTestSuite(BinaryAtomicCacheLocalEntriesSelfTest.class); + suite.addTest(new JUnit4TestAdapter(BinaryMarshallerNonCompactSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(BinaryObjectBuilderNonCompactDefaultMappersSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(BinaryObjectBuilderNonCompactSimpleNameLowerCaseMappersSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(BinaryObjectBuilderAdditionalNonCompactSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(BinaryFieldsHeapNonCompactSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(BinaryFieldsOffheapNonCompactSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(BinaryFooterOffsetsHeapNonCompactSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(BinaryFooterOffsetsOffheapNonCompactSelfTest.class)); + + suite.addTest(new JUnit4TestAdapter(GridCacheBinaryObjectsLocalSelfTest.class)); + //suite.addTest(new JUnit4TestAdapter(GridCacheBinaryObjectsLocalOnheapSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheBinaryObjectsAtomicLocalSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheBinaryObjectsReplicatedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheBinaryObjectsPartitionedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheBinaryObjectsPartitionedNearDisabledSelfTest.class)); + //suite.addTest(new JUnit4TestAdapter(GridCacheBinaryObjectsPartitionedNearDisabledOnheapSelfTest.class)); + //suite.addTest(new JUnit4TestAdapter(GridCacheBinaryObjectsPartitionedOnheapSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheBinaryObjectsAtomicSelfTest.class)); + //suite.addTest(new JUnit4TestAdapter(GridCacheBinaryObjectsAtomicOnheapSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheBinaryObjectsAtomicNearDisabledSelfTest.class)); + //suite.addTest(new JUnit4TestAdapter(GridCacheBinaryObjectsAtomicNearDisabledOnheapSelfTest.class)); + + suite.addTest(new JUnit4TestAdapter(GridCacheBinaryStoreObjectsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheBinaryStoreBinariesDefaultMappersSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheBinaryStoreBinariesSimpleNameMappersSelfTest.class)); + + suite.addTest(new JUnit4TestAdapter(GridCacheClientNodeBinaryObjectMetadataTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheBinaryObjectMetadataExchangeMultinodeTest.class)); + suite.addTest(new JUnit4TestAdapter(BinaryMetadataUpdatesFlowTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheClientNodeBinaryObjectMetadataMultinodeTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteBinaryMetadataUpdateChangingTopologySelfTest.class)); + + suite.addTest(new JUnit4TestAdapter(BinaryTxCacheLocalEntriesSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(BinaryAtomicCacheLocalEntriesSelfTest.class)); // Byte order - suite.addTestSuite(BinaryHeapStreamByteOrderSelfTest.class); - suite.addTestSuite(BinaryAbstractOutputStreamTest.class); - suite.addTestSuite(BinaryOffheapStreamByteOrderSelfTest.class); + suite.addTest(new JUnit4TestAdapter(BinaryHeapStreamByteOrderSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(BinaryAbstractOutputStreamTest.class)); + suite.addTest(new JUnit4TestAdapter(BinaryOffheapStreamByteOrderSelfTest.class)); - suite.addTestSuite(GridCacheBinaryObjectUserClassloaderSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridCacheBinaryObjectUserClassloaderSelfTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheBlockExchangeOnReadOperationsTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheBlockExchangeOnReadOperationsTestSuite.java index 79ec18b3323b4..0fa0165c30ce6 100755 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheBlockExchangeOnReadOperationsTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheBlockExchangeOnReadOperationsTestSuite.java @@ -18,6 +18,7 @@ package org.apache.ignite.testsuites; import java.util.Set; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.distributed.CacheBlockOnGetAllTest; import org.apache.ignite.internal.processors.cache.distributed.CacheBlockOnScanTest; @@ -29,9 +30,8 @@ public class IgniteCacheBlockExchangeOnReadOperationsTestSuite extends TestSuite { /** * @return IgniteCache test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { return suite(null); } @@ -42,9 +42,9 @@ public static TestSuite suite() throws Exception { public static TestSuite suite(Set ignoredTests) { TestSuite suite = new TestSuite("Do Not Block Read Operations Test Suite"); - suite.addTestSuite(CacheBlockOnSingleGetTest.class); - suite.addTestSuite(CacheBlockOnGetAllTest.class); - suite.addTestSuite(CacheBlockOnScanTest.class); + suite.addTest(new JUnit4TestAdapter(CacheBlockOnSingleGetTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheBlockOnGetAllTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheBlockOnScanTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheDataStructuresSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheDataStructuresSelfTestSuite.java index 3732754a16d2a..457ec8a43afa1 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheDataStructuresSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheDataStructuresSelfTestSuite.java @@ -93,9 +93,8 @@ public class IgniteCacheDataStructuresSelfTestSuite extends TestSuite { /** * @return Cache test suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite Cache Data Structures Test Suite"); // Data structures. @@ -189,7 +188,7 @@ public static TestSuite suite() throws Exception { suite.addTest(new JUnit4TestAdapter(IgniteSequenceInternalCleanupTest.class)); - suite.addTestSuite(AtomicCacheAffinityConfigurationTest.class); + suite.addTest(new JUnit4TestAdapter(AtomicCacheAffinityConfigurationTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite.java index 99dd828246a0c..4e1cbe566424c 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite.java @@ -18,6 +18,7 @@ package org.apache.ignite.testsuites; import java.util.Set; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.GridCacheIncrementTransformTest; import org.apache.ignite.internal.processors.cache.distributed.IgniteCacheAtomicNodeJoinTest; @@ -61,36 +62,36 @@ public static TestSuite suite() throws Exception { public static TestSuite suite(Set ignoredTests) throws Exception { TestSuite suite = new TestSuite("Cache Failover Test Suite"); - suite.addTestSuite(GridCacheAtomicInvalidPartitionHandlingSelfTest.class); - suite.addTestSuite(GridCacheAtomicClientInvalidPartitionHandlingSelfTest.class); - suite.addTestSuite(GridCacheRebalancingPartitionDistributionTest.class); + suite.addTest(new JUnit4TestAdapter(GridCacheAtomicInvalidPartitionHandlingSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheAtomicClientInvalidPartitionHandlingSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheRebalancingPartitionDistributionTest.class)); GridTestUtils.addTestIfNeeded(suite, GridCacheIncrementTransformTest.class, ignoredTests); // Failure consistency tests. - suite.addTestSuite(GridCacheAtomicRemoveFailureTest.class); - suite.addTestSuite(GridCacheAtomicClientRemoveFailureTest.class); + suite.addTest(new JUnit4TestAdapter(GridCacheAtomicRemoveFailureTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheAtomicClientRemoveFailureTest.class)); - suite.addTestSuite(GridCacheDhtAtomicRemoveFailureTest.class); - suite.addTestSuite(GridCacheDhtRemoveFailureTest.class); - suite.addTestSuite(GridCacheDhtClientRemoveFailureTest.class); - suite.addTestSuite(GridCacheNearRemoveFailureTest.class); - suite.addTestSuite(GridCacheAtomicNearRemoveFailureTest.class); - suite.addTestSuite(IgniteChangingBaselineUpCacheRemoveFailoverTest.class); - suite.addTestSuite(IgniteChangingBaselineDownCacheRemoveFailoverTest.class); + suite.addTest(new JUnit4TestAdapter(GridCacheDhtAtomicRemoveFailureTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheDhtRemoveFailureTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheDhtClientRemoveFailureTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheNearRemoveFailureTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheAtomicNearRemoveFailureTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteChangingBaselineUpCacheRemoveFailoverTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteChangingBaselineDownCacheRemoveFailoverTest.class)); - suite.addTestSuite(IgniteCacheAtomicNodeJoinTest.class); - suite.addTestSuite(IgniteCacheTxNodeJoinTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheAtomicNodeJoinTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheTxNodeJoinTest.class)); - suite.addTestSuite(IgniteCacheTxNearDisabledPutGetRestartTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheTxNearDisabledPutGetRestartTest.class)); - suite.addTestSuite(IgniteCacheSizeFailoverTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheSizeFailoverTest.class)); - suite.addTestSuite(IgniteAtomicLongChangingTopologySelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteAtomicLongChangingTopologySelfTest.class)); - suite.addTestSuite(GridCacheTxNodeFailureSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridCacheTxNodeFailureSelfTest.class)); - suite.addTestSuite(AtomicPutAllChangingTopologyTest.class); + suite.addTest(new JUnit4TestAdapter(AtomicPutAllChangingTopologyTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite2.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite2.java index 444c0b4aab929..6734130096907 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite2.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite2.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.CacheGetFromJobTest; import org.apache.ignite.internal.processors.cache.distributed.CacheAsyncOperationsFailoverAtomicTest; @@ -39,32 +40,31 @@ public class IgniteCacheFailoverTestSuite2 { /** * @return Suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Cache Failover Test Suite2"); - suite.addTestSuite(GridCachePartitionedTxSalvageSelfTest.class); - suite.addTestSuite(CacheGetFromJobTest.class); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedTxSalvageSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheGetFromJobTest.class)); - suite.addTestSuite(GridCacheAtomicFailoverSelfTest.class); - suite.addTestSuite(GridCacheAtomicReplicatedFailoverSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridCacheAtomicFailoverSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheAtomicReplicatedFailoverSelfTest.class)); - suite.addTestSuite(GridCachePartitionedFailoverSelfTest.class); - suite.addTestSuite(GridCacheColocatedFailoverSelfTest.class); - suite.addTestSuite(GridCacheReplicatedFailoverSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedFailoverSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheColocatedFailoverSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedFailoverSelfTest.class)); - suite.addTestSuite(IgniteCacheCrossCacheTxFailoverTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheCrossCacheTxFailoverTest.class)); - suite.addTestSuite(CacheAsyncOperationsFailoverAtomicTest.class); - suite.addTestSuite(CacheAsyncOperationsFailoverTxTest.class); + suite.addTest(new JUnit4TestAdapter(CacheAsyncOperationsFailoverAtomicTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheAsyncOperationsFailoverTxTest.class)); - suite.addTestSuite(CachePutAllFailoverAtomicTest.class); - suite.addTestSuite(CachePutAllFailoverTxTest.class); - //suite.addTestSuite(IgniteStableBaselineCachePutAllFailoverTest.class); - //suite.addTestSuite(IgniteStableBaselineCacheRemoveFailoverTest.class); - suite.addTestSuite(IgniteChangingBaselineDownCachePutAllFailoverTest.class); - suite.addTestSuite(IgniteChangingBaselineUpCachePutAllFailoverTest.class); + suite.addTest(new JUnit4TestAdapter(CachePutAllFailoverAtomicTest.class)); + suite.addTest(new JUnit4TestAdapter(CachePutAllFailoverTxTest.class)); + //suite.addTest(new JUnit4TestAdapter(IgniteStableBaselineCachePutAllFailoverTest.class)); + //suite.addTest(new JUnit4TestAdapter(IgniteStableBaselineCacheRemoveFailoverTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteChangingBaselineDownCachePutAllFailoverTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteChangingBaselineUpCachePutAllFailoverTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite3.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite3.java index f1cf2676b7531..ce2d5abc4b483 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite3.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite3.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.distributed.CacheGetInsideLockChangingTopologyTest; import org.apache.ignite.internal.processors.cache.distributed.dht.IgniteCachePutRetryAtomicSelfTest; @@ -28,14 +29,13 @@ public class IgniteCacheFailoverTestSuite3 extends TestSuite { /** * @return Ignite Cache Failover test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Cache Failover Test Suite3"); - suite.addTestSuite(IgniteCachePutRetryAtomicSelfTest.class); - suite.addTestSuite(IgniteCachePutRetryTransactionalSelfTest.class); - suite.addTestSuite(CacheGetInsideLockChangingTopologyTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCachePutRetryAtomicSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCachePutRetryTransactionalSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheGetInsideLockChangingTopologyTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuiteSsl.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuiteSsl.java index 99a1463deca5b..aed2392965365 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuiteSsl.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuiteSsl.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.util.IgniteUtils; import org.apache.ignite.spi.communication.tcp.IgniteCacheSslStartStopSelfTest; @@ -27,14 +28,13 @@ public class IgniteCacheFailoverTestSuiteSsl extends TestSuite { /** * @return Ignite Cache Failover test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Cache Failover Test Suite SSL"); // Disable SSL test with old JDK because of https://bugs.openjdk.java.net/browse/JDK-8013809. if (!IgniteUtils.isHotSpot() || IgniteUtils.isJavaVersionAtLeast("1.7.0_65")) - suite.addTestSuite(IgniteCacheSslStartStopSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheSslStartStopSelfTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiMultiJvmSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiMultiJvmSelfTestSuite.java index daab8c6f2196e..b3b26be0cf7d6 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiMultiJvmSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiMultiJvmSelfTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicClientOnlyMultiJvmFullApiSelfTest; import org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicClientOnlyMultiJvmP2PDisabledFullApiSelfTest; @@ -49,45 +50,44 @@ public class IgniteCacheFullApiMultiJvmSelfTestSuite extends TestSuite { /** * @return Multi-JVM tests suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Cache Full API Multi Jvm Test Suite"); System.setProperty("H2_JDBC_CONNECTIONS", "500"); // Multi-node. - suite.addTestSuite(GridCacheReplicatedMultiJvmFullApiSelfTest.class); - suite.addTestSuite(GridCacheReplicatedMultiJvmP2PDisabledFullApiSelfTest.class); - suite.addTestSuite(GridCacheReplicatedAtomicMultiJvmFullApiSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedMultiJvmFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedMultiJvmP2PDisabledFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedAtomicMultiJvmFullApiSelfTest.class)); - suite.addTestSuite(GridCachePartitionedMultiJvmFullApiSelfTest.class); - suite.addTestSuite(GridCachePartitionedCopyOnReadDisabledMultiJvmFullApiSelfTest.class); - suite.addTestSuite(GridCacheAtomicMultiJvmFullApiSelfTest.class); - suite.addTestSuite(GridCacheAtomicCopyOnReadDisabledMultiJvmFullApiSelfTest.class); - suite.addTestSuite(GridCachePartitionedMultiJvmP2PDisabledFullApiSelfTest.class); - suite.addTestSuite(GridCacheAtomicMultiJvmP2PDisabledFullApiSelfTest.class); - suite.addTestSuite(GridCacheAtomicNearEnabledMultiJvmFullApiSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedMultiJvmFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedCopyOnReadDisabledMultiJvmFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheAtomicMultiJvmFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheAtomicCopyOnReadDisabledMultiJvmFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedMultiJvmP2PDisabledFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheAtomicMultiJvmP2PDisabledFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheAtomicNearEnabledMultiJvmFullApiSelfTest.class)); - suite.addTestSuite(GridCachePartitionedNearDisabledMultiJvmFullApiSelfTest.class); - suite.addTestSuite(GridCachePartitionedNearDisabledMultiJvmP2PDisabledFullApiSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedNearDisabledMultiJvmFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedNearDisabledMultiJvmP2PDisabledFullApiSelfTest.class)); - suite.addTestSuite(GridCacheNearOnlyMultiJvmFullApiSelfTest.class); - suite.addTestSuite(GridCacheNearOnlyMultiJvmP2PDisabledFullApiSelfTest.class); - suite.addTestSuite(GridCacheReplicatedNearOnlyMultiJvmFullApiSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridCacheNearOnlyMultiJvmFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheNearOnlyMultiJvmP2PDisabledFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedNearOnlyMultiJvmFullApiSelfTest.class)); - suite.addTestSuite(GridCacheAtomicClientOnlyMultiJvmFullApiSelfTest.class); - suite.addTestSuite(GridCacheAtomicClientOnlyMultiJvmP2PDisabledFullApiSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridCacheAtomicClientOnlyMultiJvmFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheAtomicClientOnlyMultiJvmP2PDisabledFullApiSelfTest.class)); - suite.addTestSuite(GridCacheAtomicNearOnlyMultiJvmFullApiSelfTest.class); - suite.addTestSuite(GridCacheAtomicNearOnlyMultiJvmP2PDisabledFullApiSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridCacheAtomicNearOnlyMultiJvmFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheAtomicNearOnlyMultiJvmP2PDisabledFullApiSelfTest.class)); - suite.addTestSuite(GridCacheAtomicOnheapMultiJvmFullApiSelfTest.class); - suite.addTestSuite(GridCachePartitionedNearDisabledAtomicOnheapMultiJvmFullApiSelfTest.class); - suite.addTestSuite(GridCachePartitionedNearDisabledOnheapMultiJvmFullApiSelfTest.class); - suite.addTestSuite(GridCachePartitionedOnheapMultiJvmFullApiSelfTest.class); - suite.addTestSuite(GridCacheReplicatedOnheapMultiJvmFullApiSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridCacheAtomicOnheapMultiJvmFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedNearDisabledAtomicOnheapMultiJvmFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedNearDisabledOnheapMultiJvmFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedOnheapMultiJvmFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedOnheapMultiJvmFullApiSelfTest.class)); return suite; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java index 9f75b45bb3c89..e2d0e8f0d6828 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.GridCacheClearSelfTest; import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheAtomicFullApiSelfTest; @@ -85,92 +86,91 @@ public class IgniteCacheFullApiSelfTestSuite extends TestSuite { /** * @return Cache API test suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Cache Full API Test Suite"); // One node. - suite.addTestSuite(GridCacheLocalFullApiSelfTest.class); - suite.addTestSuite(GridCacheLocalAtomicFullApiSelfTest.class); - suite.addTestSuite(GridCacheReplicatedFullApiSelfTest.class); - suite.addTestSuite(GridCachePartitionedFullApiSelfTest.class); - suite.addTestSuite(GridCacheAtomicFullApiSelfTest.class); - suite.addTestSuite(GridCachePartitionedNearDisabledFullApiSelfTest.class); - suite.addTestSuite(GridCachePartitionedFilteredPutSelfTest.class); - suite.addTestSuite(GridCacheReplicatedAtomicFullApiSelfTest.class); - suite.addTestSuite(GridCacheAtomicNearEnabledFullApiSelfTest.class); - suite.addTestSuite(GridCacheAtomicOnheapFullApiSelfTest.class); - - suite.addTestSuite(GridCachePartitionedOnheapFullApiSelfTest.class); - suite.addTestSuite(GridCachePartitionedAtomicOnheapFullApiSelfTest.class); - suite.addTestSuite(GridCachePartitionedNearDisabledOnheapFullApiSelfTest.class); - suite.addTestSuite(GridCachePartitionedNearDisabledAtomicOnheapFullApiSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridCacheLocalFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheLocalAtomicFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheAtomicFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedNearDisabledFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedFilteredPutSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedAtomicFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheAtomicNearEnabledFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheAtomicOnheapFullApiSelfTest.class)); + + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedOnheapFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedAtomicOnheapFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedNearDisabledOnheapFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedNearDisabledAtomicOnheapFullApiSelfTest.class)); // No primary. - suite.addTestSuite(GridCachePartitionedClientOnlyNoPrimaryFullApiSelfTest.class); - suite.addTestSuite(GridCachePartitionedNearOnlyNoPrimaryFullApiSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedClientOnlyNoPrimaryFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedNearOnlyNoPrimaryFullApiSelfTest.class)); // Multi-node. - suite.addTestSuite(GridCacheReplicatedMultiNodeFullApiSelfTest.class); - suite.addTestSuite(GridCacheReplicatedMultiNodeP2PDisabledFullApiSelfTest.class); - suite.addTestSuite(GridCacheReplicatedAtomicMultiNodeFullApiSelfTest.class); - - suite.addTestSuite(GridCachePartitionedMultiNodeFullApiSelfTest.class); - suite.addTestSuite(GridCachePartitionedCopyOnReadDisabledMultiNodeFullApiSelfTest.class); - suite.addTestSuite(GridCacheAtomicMultiNodeFullApiSelfTest.class); - suite.addTestSuite(GridCacheAtomicCopyOnReadDisabledMultiNodeFullApiSelfTest.class); - suite.addTestSuite(GridCachePartitionedMultiNodeP2PDisabledFullApiSelfTest.class); - suite.addTestSuite(GridCacheAtomicMultiNodeP2PDisabledFullApiSelfTest.class); - suite.addTestSuite(GridCacheAtomicNearEnabledMultiNodeFullApiSelfTest.class); - suite.addTestSuite(CachePartitionedMultiNodeLongTxTimeoutFullApiTest.class); - suite.addTestSuite(CachePartitionedMultiNodeLongTxTimeout2FullApiTest.class); - suite.addTestSuite(CachePartitionedNearEnabledMultiNodeLongTxTimeoutFullApiTest.class); - - suite.addTestSuite(GridCachePartitionedNearDisabledMultiNodeFullApiSelfTest.class); - suite.addTestSuite(GridCachePartitionedNearDisabledMultiNodeP2PDisabledFullApiSelfTest.class); - - suite.addTestSuite(GridCacheNearOnlyMultiNodeFullApiSelfTest.class); - suite.addTestSuite(GridCacheNearOnlyMultiNodeP2PDisabledFullApiSelfTest.class); - suite.addTestSuite(GridCacheReplicatedNearOnlyMultiNodeFullApiSelfTest.class); - - suite.addTestSuite(GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest.class); - suite.addTestSuite(GridCacheAtomicClientOnlyMultiNodeP2PDisabledFullApiSelfTest.class); - - suite.addTestSuite(GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest.class); - suite.addTestSuite(GridCacheAtomicNearOnlyMultiNodeP2PDisabledFullApiSelfTest.class); - - suite.addTestSuite(CacheReplicatedRendezvousAffinityExcludeNeighborsMultiNodeFullApiSelfTest.class); - suite.addTestSuite(CacheReplicatedRendezvousAffinityMultiNodeFullApiSelfTest.class); - - suite.addTestSuite(GridCacheNearReloadAllSelfTest.class); - suite.addTestSuite(GridCacheColocatedReloadAllSelfTest.class); - suite.addTestSuite(GridCacheAtomicReloadAllSelfTest.class); - suite.addTestSuite(GridCacheNearTxMultiNodeSelfTest.class); - suite.addTestSuite(GridCachePartitionedMultiNodeCounterSelfTest.class); - - suite.addTestSuite(GridCachePartitionedOnheapMultiNodeFullApiSelfTest.class); - suite.addTestSuite(GridCachePartitionedAtomicOnheapMultiNodeFullApiSelfTest.class); - suite.addTestSuite(GridCachePartitionedNearDisabledOnheapMultiNodeFullApiSelfTest.class); - suite.addTestSuite(GridCachePartitionedNearDisabledAtomicOnheapMultiNodeFullApiSelfTest.class); - suite.addTestSuite(GridCacheAtomicOnheapMultiNodeFullApiSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedMultiNodeFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedMultiNodeP2PDisabledFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedAtomicMultiNodeFullApiSelfTest.class)); + + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedMultiNodeFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedCopyOnReadDisabledMultiNodeFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheAtomicMultiNodeFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheAtomicCopyOnReadDisabledMultiNodeFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedMultiNodeP2PDisabledFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheAtomicMultiNodeP2PDisabledFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheAtomicNearEnabledMultiNodeFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CachePartitionedMultiNodeLongTxTimeoutFullApiTest.class)); + suite.addTest(new JUnit4TestAdapter(CachePartitionedMultiNodeLongTxTimeout2FullApiTest.class)); + suite.addTest(new JUnit4TestAdapter(CachePartitionedNearEnabledMultiNodeLongTxTimeoutFullApiTest.class)); + + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedNearDisabledMultiNodeFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedNearDisabledMultiNodeP2PDisabledFullApiSelfTest.class)); + + suite.addTest(new JUnit4TestAdapter(GridCacheNearOnlyMultiNodeFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheNearOnlyMultiNodeP2PDisabledFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedNearOnlyMultiNodeFullApiSelfTest.class)); + + suite.addTest(new JUnit4TestAdapter(GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheAtomicClientOnlyMultiNodeP2PDisabledFullApiSelfTest.class)); + + suite.addTest(new JUnit4TestAdapter(GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheAtomicNearOnlyMultiNodeP2PDisabledFullApiSelfTest.class)); + + suite.addTest(new JUnit4TestAdapter(CacheReplicatedRendezvousAffinityExcludeNeighborsMultiNodeFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheReplicatedRendezvousAffinityMultiNodeFullApiSelfTest.class)); + + suite.addTest(new JUnit4TestAdapter(GridCacheNearReloadAllSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheColocatedReloadAllSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheAtomicReloadAllSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheNearTxMultiNodeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedMultiNodeCounterSelfTest.class)); + + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedOnheapMultiNodeFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedAtomicOnheapMultiNodeFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedNearDisabledOnheapMultiNodeFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedNearDisabledAtomicOnheapMultiNodeFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheAtomicOnheapMultiNodeFullApiSelfTest.class)); // Multithreaded. - suite.addTestSuite(GridCacheLocalFullApiMultithreadedSelfTest.class); - suite.addTestSuite(GridCacheReplicatedFullApiMultithreadedSelfTest.class); - suite.addTestSuite(GridCachePartitionedFullApiMultithreadedSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridCacheLocalFullApiMultithreadedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedFullApiMultithreadedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedFullApiMultithreadedSelfTest.class)); // Other. - suite.addTestSuite(GridCacheClearSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridCacheClearSelfTest.class)); - suite.addTestSuite(GridCacheLocalWithGroupFullApiSelfTest.class); - suite.addTestSuite(GridCacheLocalAtomicWithGroupFullApiSelfTest.class); - suite.addTestSuite(GridCacheAtomicMultiNodeWithGroupFullApiSelfTest.class); - suite.addTestSuite(GridCacheAtomicNearEnabledMultiNodeWithGroupFullApiSelfTest.class); - suite.addTestSuite(GridCachePartitionedMultiNodeWithGroupFullApiSelfTest.class); - suite.addTestSuite(GridCachePartitionedNearDisabledMultiNodeWithGroupFullApiSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridCacheLocalWithGroupFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheLocalAtomicWithGroupFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheAtomicMultiNodeWithGroupFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheAtomicNearEnabledMultiNodeWithGroupFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedMultiNodeWithGroupFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedNearDisabledMultiNodeWithGroupFullApiSelfTest.class)); - //suite.addTestSuite(GridActivateExtensionTest.class); + //suite.addTest(new JUnit4TestAdapter(GridActivateExtensionTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheLoadConsistencyTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheLoadConsistencyTestSuite.java index cd0be9ce23b4c..9575e49ddc5d2 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheLoadConsistencyTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheLoadConsistencyTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.distributed.CacheNearDisabledAtomicInvokeRestartSelfTest; import org.apache.ignite.internal.processors.cache.distributed.CacheNearDisabledTransactionalInvokeRestartSelfTest; @@ -28,14 +29,13 @@ public class IgniteCacheLoadConsistencyTestSuite extends TestSuite { /** * @return Ignite Cache Failover test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Cache Load Consistency Test Suite"); - suite.addTestSuite(CacheNearDisabledAtomicInvokeRestartSelfTest.class); - suite.addTestSuite(CacheNearDisabledTransactionalInvokeRestartSelfTest.class); - suite.addTestSuite(CacheNearDisabledTransactionalWriteReadRestartSelfTest.class); + suite.addTest(new JUnit4TestAdapter(CacheNearDisabledAtomicInvokeRestartSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheNearDisabledTransactionalInvokeRestartSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheNearDisabledTransactionalWriteReadRestartSelfTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMetricsSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMetricsSelfTestSuite.java index b6dcb21af8595..e6ad567359ac6 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMetricsSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMetricsSelfTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.TransactionMetricsMxBeanImplTest; import org.apache.ignite.internal.processors.cache.CacheGroupsMetricsRebalanceTest; @@ -45,38 +46,37 @@ public class IgniteCacheMetricsSelfTestSuite extends TestSuite { /** * @return Cache metrics test suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Cache Metrics Test Suite"); - suite.addTestSuite(GridCacheLocalMetricsSelfTest.class); - suite.addTestSuite(GridCacheLocalAtomicMetricsNoReadThroughSelfTest.class); - suite.addTestSuite(GridCacheNearMetricsSelfTest.class); - suite.addTestSuite(GridCacheNearAtomicMetricsSelfTest.class); - suite.addTestSuite(GridCacheReplicatedMetricsSelfTest.class); - suite.addTestSuite(GridCachePartitionedMetricsSelfTest.class); - suite.addTestSuite(GridCachePartitionedHitsAndMissesSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridCacheLocalMetricsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheLocalAtomicMetricsNoReadThroughSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheNearMetricsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheNearAtomicMetricsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedMetricsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedMetricsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedHitsAndMissesSelfTest.class)); // Atomic cache. - suite.addTestSuite(GridCacheAtomicLocalMetricsSelfTest.class); - suite.addTestSuite(GridCacheAtomicLocalMetricsNoStoreSelfTest.class); - suite.addTestSuite(GridCacheAtomicReplicatedMetricsSelfTest.class); - suite.addTestSuite(GridCacheAtomicPartitionedMetricsSelfTest.class); - suite.addTestSuite(GridCacheAtomicPartitionedTckMetricsSelfTestImpl.class); - suite.addTestSuite(GridCacheAtomicLocalTckMetricsSelfTestImpl.class); + suite.addTest(new JUnit4TestAdapter(GridCacheAtomicLocalMetricsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheAtomicLocalMetricsNoStoreSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheAtomicReplicatedMetricsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheAtomicPartitionedMetricsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheAtomicPartitionedTckMetricsSelfTestImpl.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheAtomicLocalTckMetricsSelfTestImpl.class)); - suite.addTestSuite(CacheGroupsMetricsRebalanceTest.class); - suite.addTestSuite(CacheValidatorMetricsTest.class); - suite.addTestSuite(CacheMetricsEntitiesCountTest.class); + suite.addTest(new JUnit4TestAdapter(CacheGroupsMetricsRebalanceTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheValidatorMetricsTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheMetricsEntitiesCountTest.class)); // Cluster wide metrics. - suite.addTestSuite(CacheMetricsForClusterGroupSelfTest.class); - suite.addTestSuite(OffheapCacheMetricsForClusterGroupSelfTest.class); + suite.addTest(new JUnit4TestAdapter(CacheMetricsForClusterGroupSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(OffheapCacheMetricsForClusterGroupSelfTest.class)); - suite.addTestSuite(TransactionMetricsMxBeanImplTest.class); + suite.addTest(new JUnit4TestAdapter(TransactionMetricsMxBeanImplTest.class)); - suite.addTestSuite(GridEvictionPolicyMBeansTest.class); + suite.addTest(new JUnit4TestAdapter(GridEvictionPolicyMBeansTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite.java index 930706d497b45..c97d2293ea840 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.internal.processors.cache.IgniteCacheTxPeekModesTest; @@ -54,36 +55,36 @@ public static TestSuite suite() { TestSuite suite = new TestSuite("IgniteCache MVCC Test Suite"); // Basic tests. - suite.addTestSuite(CacheMvccTransactionsTest.class); - suite.addTestSuite(CacheMvccProcessorTest.class); - suite.addTestSuite(CacheMvccVacuumTest.class); - suite.addTestSuite(CacheMvccConfigurationValidationTest.class); + suite.addTest(new JUnit4TestAdapter(CacheMvccTransactionsTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheMvccProcessorTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheMvccVacuumTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheMvccConfigurationValidationTest.class)); - suite.addTestSuite(DataStreamProcessorMvccSelfTest.class); - suite.addTestSuite(DataStreamProcessorMvccPersistenceSelfTest.class); - suite.addTestSuite(CacheMvccOperationChecksTest.class); + suite.addTest(new JUnit4TestAdapter(DataStreamProcessorMvccSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(DataStreamProcessorMvccPersistenceSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheMvccOperationChecksTest.class)); - suite.addTestSuite(CacheMvccRemoteTxOnNearNodeStartTest.class); + suite.addTest(new JUnit4TestAdapter(CacheMvccRemoteTxOnNearNodeStartTest.class)); - suite.addTestSuite(MvccUnsupportedTxModesTest.class); + suite.addTest(new JUnit4TestAdapter(MvccUnsupportedTxModesTest.class)); - suite.addTestSuite(MvccCachePeekTest.class); + suite.addTest(new JUnit4TestAdapter(MvccCachePeekTest.class)); - suite.addTestSuite(MvccIgniteCacheTxPeekModesTest.class); - suite.addTestSuite(MvccIgniteCacheTxReplicatedPeekModesTest.class); + suite.addTest(new JUnit4TestAdapter(MvccIgniteCacheTxPeekModesTest.class)); + suite.addTest(new JUnit4TestAdapter(MvccIgniteCacheTxReplicatedPeekModesTest.class)); // Concurrent ops tests. - suite.addTestSuite(CacheMvccIteratorWithConcurrentTransactionTest.class); - suite.addTestSuite(CacheMvccLocalEntriesWithConcurrentTransactionTest.class); - suite.addTestSuite(CacheMvccScanQueryWithConcurrentTransactionTest.class); - suite.addTestSuite(CacheMvccSizeWithConcurrentTransactionTest.class); + suite.addTest(new JUnit4TestAdapter(CacheMvccIteratorWithConcurrentTransactionTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheMvccLocalEntriesWithConcurrentTransactionTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheMvccScanQueryWithConcurrentTransactionTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheMvccSizeWithConcurrentTransactionTest.class)); // Failover tests. - suite.addTestSuite(CacheMvccTxFailoverTest.class); - suite.addTestSuite(CacheMvccClusterRestartTest.class); - suite.addTestSuite(CacheMvccPartitionedCoordinatorFailoverTest.class); - suite.addTestSuite(CacheMvccReplicatedCoordinatorFailoverTest.class); - suite.addTestSuite(CacheMvccProcessorLazyStartTest.class); + suite.addTest(new JUnit4TestAdapter(CacheMvccTxFailoverTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheMvccClusterRestartTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheMvccPartitionedCoordinatorFailoverTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheMvccReplicatedCoordinatorFailoverTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheMvccProcessorLazyStartTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite2.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite2.java index 3c070bc033e10..877a48b4e0b42 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite2.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite2.java @@ -18,6 +18,7 @@ package org.apache.ignite.testsuites; import java.util.HashSet; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.IgniteSystemProperties; import org.apache.ignite.cache.affinity.rendezvous.ClusterNodeAttributeAffinityBackupFilterSelfTest; @@ -186,11 +187,11 @@ public static TestSuite suite() { suite.addTest(IgniteCacheTestSuite2.suite(ignoredTests)); // Add Mvcc clones. - suite.addTestSuite(GridCachePartitionedMvccTxSingleThreadedSelfTest.class); - suite.addTestSuite(GridCacheColocatedMvccTxSingleThreadedSelfTest.class); - suite.addTestSuite(GridCachePartitionedMvccTxMultiThreadedSelfTest.class); - suite.addTestSuite(GridCachePartitionedNearDisabledMvccTxMultiThreadedSelfTest.class); - suite.addTestSuite(GridCachePartitionedMvccTxTimeoutSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedMvccTxSingleThreadedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheColocatedMvccTxSingleThreadedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedMvccTxMultiThreadedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedNearDisabledMvccTxMultiThreadedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedMvccTxTimeoutSelfTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite3.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite3.java index 55dddbed34855..31c1f031274bd 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite3.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite3.java @@ -18,6 +18,7 @@ package org.apache.ignite.testsuites; import java.util.HashSet; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.IgniteSystemProperties; import org.apache.ignite.internal.processors.cache.CacheInterceptorPartitionCounterLocalSanityTest; @@ -124,9 +125,9 @@ public static TestSuite suite() { suite.addTest(IgniteBinaryObjectsCacheTestSuite3.suite(ignoredTests)); // Add Mvcc clones. - suite.addTestSuite(GridCacheReplicatedMvccTxSingleThreadedSelfTest.class); - suite.addTestSuite(GridCacheReplicatedMvccTxMultiThreadedSelfTest.class); - suite.addTestSuite(GridCacheReplicatedMvccTxTimeoutSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedMvccTxSingleThreadedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedMvccTxMultiThreadedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedMvccTxTimeoutSelfTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite4.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite4.java index 99336337e71bd..608163db80ad1 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite4.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite4.java @@ -18,6 +18,7 @@ package org.apache.ignite.testsuites; import java.util.HashSet; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.IgniteSystemProperties; import org.apache.ignite.cache.store.CacheStoreListenerRWThroughDisabledAtomicCacheTest; @@ -190,7 +191,7 @@ public static TestSuite suite() { suite.addTest(IgniteCacheTestSuite4.suite(ignoredTests)); // Add Mvcc clones. - suite.addTestSuite(IgniteCrossCacheMvccTxSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCrossCacheMvccTxSelfTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite6.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite6.java index 262f3b9aec58c..025692eb75c18 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite6.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite6.java @@ -19,6 +19,7 @@ import java.util.HashSet; import java.util.Set; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.IgniteSystemProperties; import org.apache.ignite.internal.processors.cache.PartitionedAtomicCacheGetsDistributionTest; @@ -84,8 +85,8 @@ public static TestSuite suite() { suite.addTest(IgniteCacheTestSuite6.suite(ignoredTests)); // Add mvcc versions for skipped tests. - suite.addTestSuite(PartitionedMvccTxPessimisticCacheGetsDistributionTest.class); - suite.addTestSuite(ReplicatedMvccTxPessimisticCacheGetsDistributionTest.class); + suite.addTest(new JUnit4TestAdapter(PartitionedMvccTxPessimisticCacheGetsDistributionTest.class)); + suite.addTest(new JUnit4TestAdapter(ReplicatedMvccTxPessimisticCacheGetsDistributionTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite7.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite7.java index 403b5a026f05a..139c54bcd78ef 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite7.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite7.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; import java.util.HashSet; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.IgniteSystemProperties; import org.apache.ignite.internal.processors.authentication.Authentication1kUsersNodeRestartTest; @@ -66,8 +67,8 @@ public static TestSuite suite() { suite.addTest(IgniteCacheTestSuite7.suite(ignoredTests)); // Add Mvcc clones. - suite.addTestSuite(MvccCacheGroupMetricsMBeanTest.class); - suite.addTestSuite(GridCacheRebalancingPartitionCountersMvccTest.class); + suite.addTest(new JUnit4TestAdapter(MvccCacheGroupMetricsMBeanTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheRebalancingPartitionCountersMvccTest.class)); return suite; diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheRestartTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheRestartTestSuite.java index 9040ea575f1d5..619185bca967a 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheRestartTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheRestartTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.IgniteCacheCreateRestartSelfTest; import org.apache.ignite.internal.processors.cache.distributed.IgniteCacheNearRestartRollbackSelfTest; @@ -31,19 +32,18 @@ public class IgniteCacheRestartTestSuite extends TestSuite { /** * @return Suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Cache Restart Test Suite"); - suite.addTestSuite(GridCachePartitionedNodeRestartTest.class); - suite.addTestSuite(GridCachePartitionedOptimisticTxNodeRestartTest.class); - suite.addTestSuite(GridCacheReplicatedNodeRestartSelfTest.class); - suite.addTestSuite(GridCachePartitionedNearDisabledOptimisticTxNodeRestartTest.class); - suite.addTestSuite(IgniteCacheNearRestartRollbackSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedNodeRestartTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedOptimisticTxNodeRestartTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedNodeRestartSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedNearDisabledOptimisticTxNodeRestartTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheNearRestartRollbackSelfTest.class)); - suite.addTestSuite(IgniteCacheCreateRestartSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheCreateRestartSelfTest.class)); return suite; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheRestartTestSuite2.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheRestartTestSuite2.java index 0db8e8e351442..5ab920f51a2f2 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheRestartTestSuite2.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheRestartTestSuite2.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.GridCachePutAllFailoverSelfTest; import org.apache.ignite.internal.processors.cache.IgniteCacheAtomicPutAllFailoverSelfTest; @@ -31,22 +32,21 @@ public class IgniteCacheRestartTestSuite2 extends TestSuite { /** * @return Suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Cache Restart Test Suite2"); - suite.addTestSuite(IgniteCacheAtomicNodeRestartTest.class); - suite.addTestSuite(IgniteCacheAtomicReplicatedNodeRestartSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheAtomicNodeRestartTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheAtomicReplicatedNodeRestartSelfTest.class)); - suite.addTestSuite(IgniteCacheAtomicPutAllFailoverSelfTest.class); - suite.addTestSuite(IgniteCachePutAllRestartTest.class); - suite.addTestSuite(GridCachePutAllFailoverSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheAtomicPutAllFailoverSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCachePutAllRestartTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePutAllFailoverSelfTest.class)); // TODO IGNITE-4768. - //suite.addTestSuite(IgniteBinaryMetadataUpdateNodeRestartTest.class); + //suite.addTest(new JUnit4TestAdapter(IgniteBinaryMetadataUpdateNodeRestartTest.class)); - suite.addTestSuite(IgniteCacheGetRestartTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheGetRestartTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java index 9781b853543c1..4ab43a8d30e61 100755 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java @@ -18,6 +18,7 @@ package org.apache.ignite.testsuites; import java.util.Set; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.cache.IgniteCacheEntryProcessorSequentialCallTest; import org.apache.ignite.cache.IgniteWarmupClosureSelfTest; @@ -175,37 +176,37 @@ public static TestSuite suite() throws Exception { public static TestSuite suite(Set ignoredTests) throws Exception { TestSuite suite = new TestSuite("IgniteCache Test Suite"); - suite.addTestSuite(IgniteCacheEntryListenerAtomicTest.class); - suite.addTestSuite(IgniteCacheEntryListenerAtomicReplicatedTest.class); - suite.addTestSuite(IgniteCacheEntryListenerAtomicLocalTest.class); - suite.addTestSuite(IgniteCacheEntryListenerTxTest.class); - suite.addTestSuite(IgniteCacheEntryListenerTxReplicatedTest.class); - suite.addTestSuite(IgniteCacheEntryListenerTxLocalTest.class); - suite.addTestSuite(IgniteCacheEntryListenerEagerTtlDisabledTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheEntryListenerAtomicTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheEntryListenerAtomicReplicatedTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheEntryListenerAtomicLocalTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheEntryListenerTxTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheEntryListenerTxReplicatedTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheEntryListenerTxLocalTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheEntryListenerEagerTtlDisabledTest.class)); - suite.addTestSuite(IgniteClientAffinityAssignmentSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteClientAffinityAssignmentSelfTest.class)); - suite.addTestSuite(IgniteCacheAtomicInvokeTest.class); - suite.addTestSuite(IgniteCacheAtomicNearEnabledInvokeTest.class); - suite.addTestSuite(IgniteCacheAtomicWithStoreInvokeTest.class); - suite.addTestSuite(IgniteCacheAtomicLocalInvokeTest.class); - suite.addTestSuite(IgniteCacheAtomicLocalWithStoreInvokeTest.class); - suite.addTestSuite(IgniteCacheTxInvokeTest.class); - suite.addTestSuite(CacheEntryProcessorNonSerializableTest.class); - suite.addTestSuite(CacheEntryProcessorExternalizableFailedTest.class); - suite.addTestSuite(IgniteCacheEntryProcessorCallTest.class); - suite.addTestSuite(IgniteCacheTxNearEnabledInvokeTest.class); - suite.addTestSuite(IgniteCacheTxLocalInvokeTest.class); - suite.addTestSuite(IgniteCrossCacheTxStoreSelfTest.class); - suite.addTestSuite(IgniteCacheEntryProcessorSequentialCallTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheAtomicInvokeTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheAtomicNearEnabledInvokeTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheAtomicWithStoreInvokeTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheAtomicLocalInvokeTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheAtomicLocalWithStoreInvokeTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheTxInvokeTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheEntryProcessorNonSerializableTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheEntryProcessorExternalizableFailedTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheEntryProcessorCallTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheTxNearEnabledInvokeTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheTxLocalInvokeTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCrossCacheTxStoreSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheEntryProcessorSequentialCallTest.class)); // TODO GG-11148: include test when implemented. // Test fails due to incorrect handling of CacheConfiguration#getCopyOnRead() and // CacheObjectContext#storeValue() properties. Heap storage should be redesigned in this ticket. //GridTestUtils.addTestIfNeeded(suite, CacheEntryProcessorCopySelfTest.class, ignoredTests); - suite.addTestSuite(IgnitePutAllLargeBatchSelfTest.class); - suite.addTestSuite(IgnitePutAllUpdateNonPreloadedPartitionSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgnitePutAllLargeBatchSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgnitePutAllUpdateNonPreloadedPartitionSelfTest.class)); // User's class loader tests. GridTestUtils.addTestIfNeeded(suite, IgniteCacheAtomicExecutionContextTest.class, ignoredTests); @@ -219,155 +220,155 @@ public static TestSuite suite(Set ignoredTests) throws Exception { GridTestUtils.addTestIfNeeded(suite, IgniteCacheSharedExecutionContextTest.class, ignoredTests); // Warmup closure tests. - suite.addTestSuite(IgniteWarmupClosureSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteWarmupClosureSelfTest.class)); // Swap tests. - suite.addTestSuite(GridCacheSwapPreloadSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridCacheSwapPreloadSelfTest.class)); // Common tests. - suite.addTestSuite(CacheNamesSelfTest.class); - suite.addTestSuite(CacheNamesWithSpecialCharactersTest.class); - suite.addTestSuite(GridCacheConcurrentMapSelfTest.class); - suite.addTestSuite(GridCacheAffinityMapperSelfTest.class); - suite.addTestSuite(CacheAffinityCallSelfTest.class); + suite.addTest(new JUnit4TestAdapter(CacheNamesSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheNamesWithSpecialCharactersTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheConcurrentMapSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheAffinityMapperSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheAffinityCallSelfTest.class)); GridTestUtils.addTestIfNeeded(suite, GridCacheAffinityRoutingSelfTest.class, ignoredTests); GridTestUtils.addTestIfNeeded(suite, GridCacheMvccSelfTest.class, ignoredTests); - suite.addTestSuite(GridCacheMvccPartitionedSelfTest.class); - suite.addTestSuite(GridCacheMvccManagerSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridCacheMvccPartitionedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheMvccManagerSelfTest.class)); // TODO GG-11141. - // suite.addTestSuite(GridCacheP2PUndeploySelfTest.class); - suite.addTestSuite(GridCacheConfigurationValidationSelfTest.class); - suite.addTestSuite(GridCacheConfigurationConsistencySelfTest.class); - suite.addTestSuite(GridDataStorageConfigurationConsistencySelfTest.class); - suite.addTestSuite(DataStorageConfigurationValidationTest.class); - suite.addTestSuite(GridCacheJdbcBlobStoreSelfTest.class); - suite.addTestSuite(GridCacheJdbcBlobStoreMultithreadedSelfTest.class); - suite.addTestSuite(JdbcTypesDefaultTransformerTest.class); - suite.addTestSuite(CacheJdbcPojoStoreTest.class); - suite.addTestSuite(CacheJdbcPojoStoreBinaryMarshallerSelfTest.class); - suite.addTestSuite(CacheJdbcPojoStoreBinaryMarshallerStoreKeepBinarySelfTest.class); - suite.addTestSuite(CacheJdbcPojoStoreBinaryMarshallerWithSqlEscapeSelfTest.class); - suite.addTestSuite(CacheJdbcPojoStoreBinaryMarshallerStoreKeepBinaryWithSqlEscapeSelfTest.class); - suite.addTestSuite(CacheJdbcPojoStoreMultitreadedSelfTest.class); - suite.addTestSuite(GridCacheBalancingStoreSelfTest.class); - suite.addTestSuite(GridCacheAffinityApiSelfTest.class); - suite.addTestSuite(GridCacheStoreValueBytesSelfTest.class); + // suite.addTest(new JUnit4TestAdapter(GridCacheP2PUndeploySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheConfigurationValidationSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheConfigurationConsistencySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridDataStorageConfigurationConsistencySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(DataStorageConfigurationValidationTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheJdbcBlobStoreSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheJdbcBlobStoreMultithreadedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcTypesDefaultTransformerTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheJdbcPojoStoreTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheJdbcPojoStoreBinaryMarshallerSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheJdbcPojoStoreBinaryMarshallerStoreKeepBinarySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheJdbcPojoStoreBinaryMarshallerWithSqlEscapeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheJdbcPojoStoreBinaryMarshallerStoreKeepBinaryWithSqlEscapeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheJdbcPojoStoreMultitreadedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheBalancingStoreSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheAffinityApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheStoreValueBytesSelfTest.class)); GridTestUtils.addTestIfNeeded(suite, DataStreamProcessorPersistenceSelfTest.class, ignoredTests); GridTestUtils.addTestIfNeeded(suite, DataStreamProcessorSelfTest.class, ignoredTests); GridTestUtils.addTestIfNeeded(suite, DataStreamerUpdateAfterLoadTest.class, ignoredTests); - suite.addTestSuite(DataStreamerMultiThreadedSelfTest.class); - suite.addTestSuite(DataStreamerMultinodeCreateCacheTest.class); - suite.addTestSuite(DataStreamerImplSelfTest.class); - suite.addTestSuite(DataStreamerTimeoutTest.class); - suite.addTestSuite(DataStreamerClientReconnectAfterClusterRestartTest.class); + suite.addTest(new JUnit4TestAdapter(DataStreamerMultiThreadedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(DataStreamerMultinodeCreateCacheTest.class)); + suite.addTest(new JUnit4TestAdapter(DataStreamerImplSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(DataStreamerTimeoutTest.class)); + suite.addTest(new JUnit4TestAdapter(DataStreamerClientReconnectAfterClusterRestartTest.class)); GridTestUtils.addTestIfNeeded(suite, GridCacheEntryMemorySizeSelfTest.class, ignoredTests); - suite.addTestSuite(GridCacheClearAllSelfTest.class); - suite.addTestSuite(GridCacheObjectToStringSelfTest.class); - suite.addTestSuite(GridCacheLoadOnlyStoreAdapterSelfTest.class); - suite.addTestSuite(GridCacheGetStoreErrorSelfTest.class); - suite.addTestSuite(StoreResourceInjectionSelfTest.class); - suite.addTestSuite(CacheFutureExceptionSelfTest.class); - suite.addTestSuite(GridCacheAsyncOperationsLimitSelfTest.class); - suite.addTestSuite(IgniteCacheManyAsyncOperationsTest.class); - suite.addTestSuite(GridCacheTtlManagerSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridCacheClearAllSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheObjectToStringSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheLoadOnlyStoreAdapterSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheGetStoreErrorSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(StoreResourceInjectionSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheFutureExceptionSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheAsyncOperationsLimitSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheManyAsyncOperationsTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheTtlManagerSelfTest.class)); // TODO: ignite-4534 -// suite.addTestSuite(GridCacheTtlManagerEvictionSelfTest.class); - suite.addTestSuite(GridCacheLifecycleAwareSelfTest.class); - suite.addTestSuite(IgniteCacheAtomicStopBusySelfTest.class); - suite.addTestSuite(IgniteCacheTransactionalStopBusySelfTest.class); - suite.addTestSuite(GridCacheAtomicNearCacheSelfTest.class); - suite.addTestSuite(CacheAtomicNearUpdateTopologyChangeTest.class); - suite.addTestSuite(CacheTxNearUpdateTopologyChangeTest.class); - suite.addTestSuite(GridCacheStorePutxSelfTest.class); - suite.addTestSuite(GridCacheOffHeapMultiThreadedUpdateSelfTest.class); - suite.addTestSuite(GridCacheOffHeapAtomicMultiThreadedUpdateSelfTest.class); - suite.addTestSuite(GridCacheColocatedTxStoreExceptionSelfTest.class); - suite.addTestSuite(GridCacheReplicatedTxStoreExceptionSelfTest.class); - suite.addTestSuite(GridCacheLocalTxStoreExceptionSelfTest.class); - suite.addTestSuite(GridCacheNearTxStoreExceptionSelfTest.class); - suite.addTestSuite(GridCacheMissingCommitVersionSelfTest.class); - suite.addTestSuite(GridCacheEntrySetIterationPreloadingSelfTest.class); - suite.addTestSuite(GridCacheMixedPartitionExchangeSelfTest.class); - suite.addTestSuite(IgniteCacheAtomicMessageRecoveryTest.class); - suite.addTestSuite(IgniteCacheAtomicMessageRecoveryPairedConnectionsTest.class); - suite.addTestSuite(IgniteCacheAtomicMessageRecovery10ConnectionsTest.class); - suite.addTestSuite(IgniteCacheTxMessageRecoveryTest.class); - suite.addTestSuite(IgniteCacheMessageWriteTimeoutTest.class); - suite.addTestSuite(IgniteCacheMessageRecoveryIdleConnectionTest.class); - suite.addTestSuite(IgniteCacheConnectionRecoveryTest.class); - suite.addTestSuite(IgniteCacheConnectionRecovery10ConnectionsTest.class); - suite.addTestSuite(GridCacheGlobalLoadTest.class); - suite.addTestSuite(GridCachePartitionedLocalStoreSelfTest.class); - suite.addTestSuite(GridCacheReplicatedLocalStoreSelfTest.class); - suite.addTestSuite(GridCacheTxPartitionedLocalStoreSelfTest.class); - suite.addTestSuite(IgniteCacheSystemTransactionsSelfTest.class); - suite.addTestSuite(CacheDeferredDeleteSanitySelfTest.class); - suite.addTestSuite(CacheDeferredDeleteQueueTest.class); - suite.addTestSuite(GridCachePartitionsStateValidatorSelfTest.class); - suite.addTestSuite(GridCachePartitionsStateValidationTest.class); +// suite.addTest(new JUnit4TestAdapter(GridCacheTtlManagerEvictionSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheLifecycleAwareSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheAtomicStopBusySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheTransactionalStopBusySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheAtomicNearCacheSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheAtomicNearUpdateTopologyChangeTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheTxNearUpdateTopologyChangeTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheStorePutxSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheOffHeapMultiThreadedUpdateSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheOffHeapAtomicMultiThreadedUpdateSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheColocatedTxStoreExceptionSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedTxStoreExceptionSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheLocalTxStoreExceptionSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheNearTxStoreExceptionSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheMissingCommitVersionSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheEntrySetIterationPreloadingSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheMixedPartitionExchangeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheAtomicMessageRecoveryTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheAtomicMessageRecoveryPairedConnectionsTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheAtomicMessageRecovery10ConnectionsTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheTxMessageRecoveryTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheMessageWriteTimeoutTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheMessageRecoveryIdleConnectionTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheConnectionRecoveryTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheConnectionRecovery10ConnectionsTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheGlobalLoadTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedLocalStoreSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedLocalStoreSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheTxPartitionedLocalStoreSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheSystemTransactionsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheDeferredDeleteSanitySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheDeferredDeleteQueueTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionsStateValidatorSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionsStateValidationTest.class)); suite.addTest(IgniteCacheTcpClientDiscoveryTestSuite.suite()); // Heuristic exception handling. - suite.addTestSuite(GridCacheColocatedTxExceptionSelfTest.class); - suite.addTestSuite(GridCacheReplicatedTxExceptionSelfTest.class); - suite.addTestSuite(GridCacheLocalTxExceptionSelfTest.class); - suite.addTestSuite(GridCacheNearTxExceptionSelfTest.class); - suite.addTestSuite(GridCacheStopSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridCacheColocatedTxExceptionSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedTxExceptionSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheLocalTxExceptionSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheNearTxExceptionSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheStopSelfTest.class)); - suite.addTestSuite(IgniteCacheNearLockValueSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheNearLockValueSelfTest.class)); - suite.addTestSuite(CachePutEventListenerErrorSelfTest.class); + suite.addTest(new JUnit4TestAdapter(CachePutEventListenerErrorSelfTest.class)); - suite.addTestSuite(IgniteTxConfigCacheSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteTxConfigCacheSelfTest.class)); - suite.addTestSuite(CacheTxFastFinishTest.class); + suite.addTest(new JUnit4TestAdapter(CacheTxFastFinishTest.class)); - //suite.addTestSuite(GridIoManagerSelfTest.class); - suite.addTestSuite(IgniteVariousConnectionNumberTest.class); - suite.addTestSuite(IgniteCommunicationBalanceTest.class); - suite.addTestSuite(IgniteCommunicationBalancePairedConnectionsTest.class); - suite.addTestSuite(IgniteCommunicationBalanceMultipleConnectionsTest.class); - suite.addTestSuite(IgniteCommunicationSslBalanceTest.class); - suite.addTestSuite(IgniteIoTestMessagesTest.class); - suite.addTestSuite(IgniteDiagnosticMessagesTest.class); - suite.addTestSuite(IgniteDiagnosticMessagesMultipleConnectionsTest.class); + //suite.addTest(new JUnit4TestAdapter(GridIoManagerSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteVariousConnectionNumberTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCommunicationBalanceTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCommunicationBalancePairedConnectionsTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCommunicationBalanceMultipleConnectionsTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCommunicationSslBalanceTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteIoTestMessagesTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteDiagnosticMessagesTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteDiagnosticMessagesMultipleConnectionsTest.class)); - suite.addTestSuite(IgniteIncompleteCacheObjectSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteIncompleteCacheObjectSelfTest.class)); - suite.addTestSuite(GridStoreLoadCacheTest.class); - suite.addTestSuite(CacheStoreReadFromBackupTest.class); - suite.addTestSuite(CacheStoreWriteErrorTest.class); - suite.addTestSuite(CacheTransactionalStoreReadFromBackupTest.class); + suite.addTest(new JUnit4TestAdapter(GridStoreLoadCacheTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheStoreReadFromBackupTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheStoreWriteErrorTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheTransactionalStoreReadFromBackupTest.class)); - //suite.addTestSuite(CacheAtomicSingleMessageCountSelfTest.class); - //suite.addTestSuite(GridCacheAtomicUsersAffinityMapperSelfTest.class); - //suite.addTestSuite(GridCacheClearLocallySelfTest.class); - //suite.addTestSuite(GridCacheConcurrentGetCacheOnClientTest.class); - //suite.addTestSuite(GridCacheFullTextQueryMultithreadedSelfTest.class); - //suite.addTestSuite(GridCacheKeyCheckNearEnabledSelfTest.class); - //suite.addTestSuite(GridCacheKeyCheckSelfTest.class); - //suite.addTestSuite(GridCacheLeakTest.class); - //suite.addTestSuite(GridCacheMultiUpdateLockSelfTest.class); - //suite.addTestSuite(GridCacheMvccFlagsTest.class); - //suite.addTestSuite(GridCacheReplicatedUsersAffinityMapperSelfTest.class); - //suite.addTestSuite(GridCacheReturnValueTransferSelfTest.class); - //suite.addTestSuite(GridCacheSlowTxWarnTest.class); - //suite.addTestSuite(GridCacheTtlManagerLoadTest.class); - //suite.addTestSuite(GridCacheTxUsersAffinityMapperSelfTest.class); - //suite.addTestSuite(IgniteInternalCacheRemoveTest.class); - //suite.addTestSuite(IgniteCacheBinaryEntryProcessorSelfTest.class); - //suite.addTestSuite(IgniteCacheObjectPutSelfTest.class); - //suite.addTestSuite(IgniteCacheSerializationSelfTest.class); - //suite.addTestSuite(IgniteCacheStartStopLoadTest.class); - //suite.addTestSuite(IgniteCachingProviderSelfTest.class); - //suite.addTestSuite(IgniteOnePhaseCommitNearSelfTest.class); - //suite.addTestSuite(IgniteStaticCacheStartSelfTest.class); - //suite.addTestSuite(InterceptorWithKeepBinaryCacheFullApiTest.class); + //suite.addTest(new JUnit4TestAdapter(CacheAtomicSingleMessageCountSelfTest.class)); + //suite.addTest(new JUnit4TestAdapter(GridCacheAtomicUsersAffinityMapperSelfTest.class)); + //suite.addTest(new JUnit4TestAdapter(GridCacheClearLocallySelfTest.class)); + //suite.addTest(new JUnit4TestAdapter(GridCacheConcurrentGetCacheOnClientTest.class)); + //suite.addTest(new JUnit4TestAdapter(GridCacheFullTextQueryMultithreadedSelfTest.class)); + //suite.addTest(new JUnit4TestAdapter(GridCacheKeyCheckNearEnabledSelfTest.class)); + //suite.addTest(new JUnit4TestAdapter(GridCacheKeyCheckSelfTest.class)); + //suite.addTest(new JUnit4TestAdapter(GridCacheLeakTest.class)); + //suite.addTest(new JUnit4TestAdapter(GridCacheMultiUpdateLockSelfTest.class)); + //suite.addTest(new JUnit4TestAdapter(GridCacheMvccFlagsTest.class)); + //suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedUsersAffinityMapperSelfTest.class)); + //suite.addTest(new JUnit4TestAdapter(GridCacheReturnValueTransferSelfTest.class)); + //suite.addTest(new JUnit4TestAdapter(GridCacheSlowTxWarnTest.class)); + //suite.addTest(new JUnit4TestAdapter(GridCacheTtlManagerLoadTest.class)); + //suite.addTest(new JUnit4TestAdapter(GridCacheTxUsersAffinityMapperSelfTest.class)); + //suite.addTest(new JUnit4TestAdapter(IgniteInternalCacheRemoveTest.class)); + //suite.addTest(new JUnit4TestAdapter(IgniteCacheBinaryEntryProcessorSelfTest.class)); + //suite.addTest(new JUnit4TestAdapter(IgniteCacheObjectPutSelfTest.class)); + //suite.addTest(new JUnit4TestAdapter(IgniteCacheSerializationSelfTest.class)); + //suite.addTest(new JUnit4TestAdapter(IgniteCacheStartStopLoadTest.class)); + //suite.addTest(new JUnit4TestAdapter(IgniteCachingProviderSelfTest.class)); + //suite.addTest(new JUnit4TestAdapter(IgniteOnePhaseCommitNearSelfTest.class)); + //suite.addTest(new JUnit4TestAdapter(IgniteStaticCacheStartSelfTest.class)); + //suite.addTest(new JUnit4TestAdapter(InterceptorWithKeepBinaryCacheFullApiTest.class)); - suite.addTestSuite(BinaryMetadataRegistrationInsideEntryProcessorTest.class); + suite.addTest(new JUnit4TestAdapter(BinaryMetadataRegistrationInsideEntryProcessorTest.class)); - suite.addTestSuite(IgniteGetNonPlainKeyReadThroughSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteGetNonPlainKeyReadThroughSelfTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite8.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite8.java index 8ba955efe3a49..8f98f548a0ef4 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite8.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite8.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.GridCacheOrderedPreloadingSelfTest; import org.apache.ignite.internal.processors.cache.distributed.rebalancing.GridCacheRabalancingDelayedPartitionMapExchangeSelfTest; @@ -50,13 +51,13 @@ public static TestSuite suite() throws Exception { suite.addTest(IgniteCacheIteratorsSelfTestSuite.suite()); // Rebalancing. - suite.addTestSuite(GridCacheOrderedPreloadingSelfTest.class); - suite.addTestSuite(GridCacheRebalancingSyncSelfTest.class); - suite.addTestSuite(GridCacheRebalancingSyncCheckDataTest.class); - suite.addTestSuite(GridCacheRebalancingUnmarshallingFailedSelfTest.class); - suite.addTestSuite(GridCacheRebalancingAsyncSelfTest.class); - suite.addTestSuite(GridCacheRabalancingDelayedPartitionMapExchangeSelfTest.class); - suite.addTestSuite(GridCacheRebalancingCancelTest.class); + suite.addTest(new JUnit4TestAdapter(GridCacheOrderedPreloadingSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheRebalancingSyncSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheRebalancingSyncCheckDataTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheRebalancingUnmarshallingFailedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheRebalancingAsyncSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheRabalancingDelayedPartitionMapExchangeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheRebalancingCancelTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTxRecoverySelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTxRecoverySelfTestSuite.java index 0cdd0c4add84a..ef1b4d914d9bd 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTxRecoverySelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTxRecoverySelfTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheColocatedTxPessimisticOriginatingNodeFailureSelfTest; import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledTxOriginatingNodeFailureSelfTest; @@ -37,27 +38,26 @@ public class IgniteCacheTxRecoverySelfTestSuite extends TestSuite { /** * @return Cache API test suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Cache tx recovery test suite"); - suite.addTestSuite(IgniteCacheCommitDelayTxRecoveryTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheCommitDelayTxRecoveryTest.class)); - suite.addTestSuite(IgniteCachePartitionedPrimaryNodeFailureRecoveryTest.class); - suite.addTestSuite(IgniteCachePartitionedNearDisabledPrimaryNodeFailureRecoveryTest.class); - suite.addTestSuite(IgniteCachePartitionedTwoBackupsPrimaryNodeFailureRecoveryTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCachePartitionedPrimaryNodeFailureRecoveryTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCachePartitionedNearDisabledPrimaryNodeFailureRecoveryTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCachePartitionedTwoBackupsPrimaryNodeFailureRecoveryTest.class)); - suite.addTestSuite(GridCachePartitionedTxOriginatingNodeFailureSelfTest.class); - suite.addTestSuite(GridCachePartitionedNearDisabledTxOriginatingNodeFailureSelfTest.class); - suite.addTestSuite(GridCacheReplicatedTxOriginatingNodeFailureSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedTxOriginatingNodeFailureSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedNearDisabledTxOriginatingNodeFailureSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedTxOriginatingNodeFailureSelfTest.class)); - suite.addTestSuite(GridCacheColocatedTxPessimisticOriginatingNodeFailureSelfTest.class); - suite.addTestSuite(GridCacheNearTxPessimisticOriginatingNodeFailureSelfTest.class); - suite.addTestSuite(GridCacheReplicatedTxPessimisticOriginatingNodeFailureSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridCacheColocatedTxPessimisticOriginatingNodeFailureSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheNearTxPessimisticOriginatingNodeFailureSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedTxPessimisticOriginatingNodeFailureSelfTest.class)); - suite.addTestSuite(IgniteCacheTxRecoveryRollbackTest.class); - suite.addTestSuite(TxRecoveryStoreEnabledTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheTxRecoveryRollbackTest.class)); + suite.addTest(new JUnit4TestAdapter(TxRecoveryStoreEnabledTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteClientNodesTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteClientNodesTestSuite.java index c9405fa00152d..1f205052a0ecd 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteClientNodesTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteClientNodesTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.distributed.IgniteCacheClientNodeConcurrentStart; import org.apache.ignite.internal.processors.cache.distributed.IgniteCacheClientReconnectTest; @@ -28,17 +29,16 @@ public class IgniteClientNodesTestSuite extends TestSuite { /** * @return Test suite. - * @throws Exception In case of error. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite Client Nodes Reconnect Test Suite"); suite.addTest(IgniteClientReconnectTestSuite.suite()); - suite.addTestSuite(IgniteCacheManyClientsTest.class); - suite.addTestSuite(IgniteCacheClientNodeConcurrentStart.class); - suite.addTestSuite(IgniteCacheClientReconnectTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheManyClientsTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheClientNodeConcurrentStart.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheClientReconnectTest.class)); return suite; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteClientReconnectTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteClientReconnectTestSuite.java index d5ebd15a3d417..7b001e04d9981 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteClientReconnectTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteClientReconnectTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.IgniteClientConnectAfterCommunicationFailureTest; import org.apache.ignite.internal.IgniteClientReconnectApiExceptionTest; @@ -40,26 +41,25 @@ public class IgniteClientReconnectTestSuite extends TestSuite { /** * @return Test suite. - * @throws Exception In case of error. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite Client Reconnect Test Suite"); - suite.addTestSuite(IgniteClientConnectAfterCommunicationFailureTest.class); - suite.addTestSuite(IgniteClientReconnectStopTest.class); - suite.addTestSuite(IgniteClientReconnectApiExceptionTest.class); - suite.addTestSuite(IgniteClientReconnectDiscoveryStateTest.class); - suite.addTestSuite(IgniteClientReconnectCacheTest.class); - suite.addTestSuite(IgniteClientReconnectDelayedSpiTest.class); - suite.addTestSuite(IgniteClientReconnectBinaryContexTest.class); - suite.addTestSuite(IgniteClientReconnectContinuousProcessorTest.class); - suite.addTestSuite(IgniteClientReconnectComputeTest.class); - suite.addTestSuite(IgniteClientReconnectAtomicsTest.class); - suite.addTestSuite(IgniteClientReconnectCollectionsTest.class); - suite.addTestSuite(IgniteClientReconnectServicesTest.class); - suite.addTestSuite(IgniteClientReconnectStreamerTest.class); - suite.addTestSuite(IgniteClientReconnectFailoverTest.class); - suite.addTestSuite(IgniteClientRejoinTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteClientConnectAfterCommunicationFailureTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteClientReconnectStopTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteClientReconnectApiExceptionTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteClientReconnectDiscoveryStateTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteClientReconnectCacheTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteClientReconnectDelayedSpiTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteClientReconnectBinaryContexTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteClientReconnectContinuousProcessorTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteClientReconnectComputeTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteClientReconnectAtomicsTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteClientReconnectCollectionsTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteClientReconnectServicesTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteClientReconnectStreamerTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteClientReconnectFailoverTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteClientRejoinTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteComputeGridTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteComputeGridTestSuite.java index 47c46bf1fd9d7..2b6fddf2bfe4c 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteComputeGridTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteComputeGridTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.ClusterNodeMetricsSelfTest; import org.apache.ignite.internal.ClusterNodeMetricsUpdateTest; @@ -103,80 +104,80 @@ public static TestSuite suite() throws Exception { suite.addTest(IgniteJobMetricsSelfTestSuite.suite()); suite.addTest(IgniteContinuousTaskSelfTestSuite.suite()); - suite.addTestSuite(GridTaskCancelSingleNodeSelfTest.class); - suite.addTestSuite(GridTaskFailoverSelfTest.class); - suite.addTestSuite(GridJobCollisionCancelSelfTest.class); - suite.addTestSuite(GridTaskTimeoutSelfTest.class); - suite.addTestSuite(GridCancelUnusedJobSelfTest.class); - suite.addTestSuite(GridTaskJobRejectSelfTest.class); - suite.addTestSuite(GridTaskExecutionSelfTest.class); - //suite.addTestSuite(GridTaskExecutionContextSelfTest.class); - suite.addTestSuite(GridTaskExecutionWithoutPeerClassLoadingSelfTest.class); - suite.addTestSuite(GridFailoverSelfTest.class); - suite.addTestSuite(GridTaskListenerSelfTest.class); - suite.addTestSuite(GridFailoverTopologySelfTest.class); - suite.addTestSuite(GridTaskResultCacheSelfTest.class); - suite.addTestSuite(GridTaskMapAsyncSelfTest.class); - suite.addTestSuite(GridJobContextSelfTest.class); - suite.addTestSuite(GridJobMasterLeaveAwareSelfTest.class); - suite.addTestSuite(GridJobStealingSelfTest.class); - suite.addTestSuite(GridJobSubjectIdSelfTest.class); - suite.addTestSuite(GridMultithreadedJobStealingSelfTest.class); - suite.addTestSuite(GridAlwaysFailoverSpiFailSelfTest.class); - suite.addTestSuite(GridTaskInstanceExecutionSelfTest.class); - suite.addTestSuite(ClusterNodeMetricsSelfTest.class); - suite.addTestSuite(ClusterNodeMetricsUpdateTest.class); - suite.addTestSuite(GridNonHistoryMetricsSelfTest.class); - suite.addTestSuite(GridCancelledJobsMetricsSelfTest.class); - suite.addTestSuite(GridCollisionJobsContextSelfTest.class); - suite.addTestSuite(GridJobStealingZeroActiveJobsSelfTest.class); - suite.addTestSuite(GridTaskFutureImplStopGridSelfTest.class); - suite.addTestSuite(GridFailoverCustomTopologySelfTest.class); - suite.addTestSuite(GridMultipleSpisSelfTest.class); - suite.addTestSuite(GridStopWithWaitSelfTest.class); - suite.addTestSuite(GridCancelOnGridStopSelfTest.class); - suite.addTestSuite(GridDeploymentSelfTest.class); - suite.addTestSuite(GridDeploymentMultiThreadedSelfTest.class); - suite.addTestSuite(GridMultipleVersionsDeploymentSelfTest.class); - suite.addTestSuite(IgniteExplicitImplicitDeploymentSelfTest.class); - suite.addTestSuite(GridEventStorageCheckAllEventsSelfTest.class); - suite.addTestSuite(GridCommunicationManagerListenersSelfTest.class); - suite.addTestSuite(IgniteExecutorServiceTest.class); - suite.addTestSuite(GridTaskInstantiationSelfTest.class); - suite.addTestSuite(GridMultipleJobsSelfTest.class); - suite.addTestSuite(GridCheckpointManagerSelfTest.class); - suite.addTestSuite(GridCheckpointTaskSelfTest.class); - suite.addTestSuite(GridTaskNameAnnotationSelfTest.class); - suite.addTestSuite(GridJobCheckpointCleanupSelfTest.class); - suite.addTestSuite(GridEventStorageSelfTest.class); - suite.addTestSuite(GridEventStorageDefaultExceptionTest.class); - suite.addTestSuite(GridFailoverTaskWithPredicateSelfTest.class); - suite.addTestSuite(GridProjectionLocalJobMultipleArgumentsSelfTest.class); - suite.addTestSuite(GridAffinitySelfTest.class); - suite.addTestSuite(GridAffinityNoCacheSelfTest.class); - //suite.addTestSuite(GridAffinityMappedTest.class); - //suite.addTestSuite(GridAffinityP2PSelfTest.class); - suite.addTestSuite(GridEventStorageRuntimeConfigurationSelfTest.class); - suite.addTestSuite(GridMultinodeRedeployContinuousModeSelfTest.class); - suite.addTestSuite(GridMultinodeRedeploySharedModeSelfTest.class); - suite.addTestSuite(GridMultinodeRedeployPrivateModeSelfTest.class); - suite.addTestSuite(GridMultinodeRedeployIsolatedModeSelfTest.class); - suite.addTestSuite(IgniteComputeEmptyClusterGroupTest.class); - suite.addTestSuite(IgniteComputeTopologyExceptionTest.class); - suite.addTestSuite(IgniteComputeResultExceptionTest.class); - suite.addTestSuite(GridTaskFailoverAffinityRunTest.class); - suite.addTestSuite(TaskNodeRestartTest.class); - suite.addTestSuite(IgniteRoundRobinErrorAfterClientReconnectTest.class); - suite.addTestSuite(PublicThreadpoolStarvationTest.class); - suite.addTestSuite(StripedExecutorTest.class); - suite.addTestSuite(GridJobServicesAddNodeTest.class); + suite.addTest(new JUnit4TestAdapter(GridTaskCancelSingleNodeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridTaskFailoverSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridJobCollisionCancelSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridTaskTimeoutSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCancelUnusedJobSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridTaskJobRejectSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridTaskExecutionSelfTest.class)); + //suite.addTest(new JUnit4TestAdapter(GridTaskExecutionContextSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridTaskExecutionWithoutPeerClassLoadingSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridFailoverSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridTaskListenerSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridFailoverTopologySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridTaskResultCacheSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridTaskMapAsyncSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridJobContextSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridJobMasterLeaveAwareSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridJobStealingSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridJobSubjectIdSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridMultithreadedJobStealingSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridAlwaysFailoverSpiFailSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridTaskInstanceExecutionSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(ClusterNodeMetricsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(ClusterNodeMetricsUpdateTest.class)); + suite.addTest(new JUnit4TestAdapter(GridNonHistoryMetricsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCancelledJobsMetricsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCollisionJobsContextSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridJobStealingZeroActiveJobsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridTaskFutureImplStopGridSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridFailoverCustomTopologySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridMultipleSpisSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridStopWithWaitSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCancelOnGridStopSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridDeploymentSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridDeploymentMultiThreadedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridMultipleVersionsDeploymentSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteExplicitImplicitDeploymentSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridEventStorageCheckAllEventsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCommunicationManagerListenersSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteExecutorServiceTest.class)); + suite.addTest(new JUnit4TestAdapter(GridTaskInstantiationSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridMultipleJobsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCheckpointManagerSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCheckpointTaskSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridTaskNameAnnotationSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridJobCheckpointCleanupSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridEventStorageSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridEventStorageDefaultExceptionTest.class)); + suite.addTest(new JUnit4TestAdapter(GridFailoverTaskWithPredicateSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridProjectionLocalJobMultipleArgumentsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridAffinitySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridAffinityNoCacheSelfTest.class)); + //suite.addTest(new JUnit4TestAdapter(GridAffinityMappedTest.class)); + //suite.addTest(new JUnit4TestAdapter(GridAffinityP2PSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridEventStorageRuntimeConfigurationSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridMultinodeRedeployContinuousModeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridMultinodeRedeploySharedModeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridMultinodeRedeployPrivateModeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridMultinodeRedeployIsolatedModeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteComputeEmptyClusterGroupTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteComputeTopologyExceptionTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteComputeResultExceptionTest.class)); + suite.addTest(new JUnit4TestAdapter(GridTaskFailoverAffinityRunTest.class)); + suite.addTest(new JUnit4TestAdapter(TaskNodeRestartTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteRoundRobinErrorAfterClientReconnectTest.class)); + suite.addTest(new JUnit4TestAdapter(PublicThreadpoolStarvationTest.class)); + suite.addTest(new JUnit4TestAdapter(StripedExecutorTest.class)); + suite.addTest(new JUnit4TestAdapter(GridJobServicesAddNodeTest.class)); - suite.addTestSuite(IgniteComputeCustomExecutorConfigurationSelfTest.class); - suite.addTestSuite(IgniteComputeCustomExecutorSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteComputeCustomExecutorConfigurationSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteComputeCustomExecutorSelfTest.class)); - suite.addTestSuite(IgniteComputeJobOneThreadTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteComputeJobOneThreadTest.class)); - suite.addTestSuite(VisorManagementEventSelfTest.class); + suite.addTest(new JUnit4TestAdapter(VisorManagementEventSelfTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteDatabaseTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteDatabaseTestSuite.java index 246b23559d6b4..3e677dcb09c2f 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteDatabaseTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteDatabaseTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.database.IgniteDbMultiNodePutGetTest; import org.apache.ignite.internal.processors.database.IgniteDbSingleNodePutGetTest; @@ -27,13 +28,12 @@ public class IgniteDatabaseTestSuite extends TestSuite { /** * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite Database Tests"); - suite.addTestSuite(IgniteDbSingleNodePutGetTest.class); - suite.addTestSuite(IgniteDbMultiNodePutGetTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteDbSingleNodePutGetTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteDbMultiNodePutGetTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteDbMemoryLeakTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteDbMemoryLeakTestSuite.java index f271bd88c4b7d..dc5bd0783e7e3 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteDbMemoryLeakTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteDbMemoryLeakTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.cache.LargeEntryUpdateTest; import org.apache.ignite.internal.processors.database.IgniteDbMemoryLeakLargeObjectsTest; @@ -31,18 +32,17 @@ public class IgniteDbMemoryLeakTestSuite extends TestSuite { /** * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite Db Memory Leaks Test Suite"); - suite.addTestSuite(IgniteDbMemoryLeakTest.class); - suite.addTestSuite(IgniteDbMemoryLeakWithExpirationTest.class); - suite.addTestSuite(IgniteDbMemoryLeakLargePagesTest.class); - suite.addTestSuite(IgniteDbMemoryLeakLargeObjectsTest.class); - suite.addTestSuite(IgniteDbMemoryLeakNonTransactionalTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteDbMemoryLeakTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteDbMemoryLeakWithExpirationTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteDbMemoryLeakLargePagesTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteDbMemoryLeakLargeObjectsTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteDbMemoryLeakNonTransactionalTest.class)); - suite.addTestSuite(LargeEntryUpdateTest.class); + suite.addTest(new JUnit4TestAdapter(LargeEntryUpdateTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteIgfsTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteIgfsTestSuite.java index 38824c280f1f0..b6b1e20be34d1 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteIgfsTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteIgfsTestSuite.java @@ -76,9 +76,8 @@ public class IgniteIgfsTestSuite extends TestSuite { /** * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite FS Test Suite For Platform Independent Tests"); suite.addTest(new JUnit4TestAdapter(IgfsPrimarySelfTest.class)); @@ -122,39 +121,39 @@ public static TestSuite suite() throws Exception { suite.addTest(new JUnit4TestAdapter(IgfsModeResolverSelfTest.class)); - //suite.addTestSuite(IgfsPathSelfTest.class); - suite.addTestSuite(IgfsFragmentizerSelfTest.class); - suite.addTestSuite(IgfsFragmentizerTopologySelfTest.class); - suite.addTestSuite(IgfsFileMapSelfTest.class); + //suite.addTest(new JUnit4TestAdapter(IgfsPathSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgfsFragmentizerSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgfsFragmentizerTopologySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgfsFileMapSelfTest.class)); - suite.addTestSuite(IgfsByteDelimiterRecordResolverSelfTest.class); - suite.addTestSuite(IgfsStringDelimiterRecordResolverSelfTest.class); - suite.addTestSuite(IgfsFixedLengthRecordResolverSelfTest.class); - suite.addTestSuite(IgfsNewLineDelimiterRecordResolverSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgfsByteDelimiterRecordResolverSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgfsStringDelimiterRecordResolverSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgfsFixedLengthRecordResolverSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgfsNewLineDelimiterRecordResolverSelfTest.class)); - suite.addTestSuite(IgfsTaskSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgfsTaskSelfTest.class)); - suite.addTestSuite(IgfsGroupDataBlockKeyMapperHashSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgfsGroupDataBlockKeyMapperHashSelfTest.class)); - suite.addTestSuite(IgfsStartCacheTest.class); + suite.addTest(new JUnit4TestAdapter(IgfsStartCacheTest.class)); - suite.addTestSuite(IgfsBackupsPrimarySelfTest.class); - suite.addTestSuite(IgfsBackupsDualSyncSelfTest.class); - suite.addTestSuite(IgfsBackupsDualAsyncSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgfsBackupsPrimarySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgfsBackupsDualSyncSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgfsBackupsDualAsyncSelfTest.class)); - suite.addTestSuite(IgfsBlockMessageSystemPoolStarvationSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgfsBlockMessageSystemPoolStarvationSelfTest.class)); // TODO: Enable when IGFS failover is fixed. - //suite.addTestSuite(IgfsBackupFailoverSelfTest.class); + //suite.addTest(new JUnit4TestAdapter(IgfsBackupFailoverSelfTest.class)); - suite.addTestSuite(IgfsProxySelfTest.class); - suite.addTestSuite(IgfsLocalSecondaryFileSystemProxySelfTest.class); - suite.addTestSuite(IgfsLocalSecondaryFileSystemProxyClientSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgfsProxySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgfsLocalSecondaryFileSystemProxySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgfsLocalSecondaryFileSystemProxyClientSelfTest.class)); - suite.addTestSuite(IgfsAtomicPrimarySelfTest.class); - suite.addTestSuite(IgfsAtomicPrimaryMultiNodeSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgfsAtomicPrimarySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgfsAtomicPrimaryMultiNodeSelfTest.class)); - suite.addTestSuite(IgfsSecondaryFileSystemInjectionSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgfsSecondaryFileSystemInjectionSelfTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteKernalSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteKernalSelfTestSuite.java index 7e0148ddf1182..6c103294b232a 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteKernalSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteKernalSelfTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.ClusterMetricsSelfTest; import org.apache.ignite.internal.ComputeJobCancelWithServiceSelfTest; @@ -89,87 +90,85 @@ public class IgniteKernalSelfTestSuite extends TestSuite { /** * @return Kernal test suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { return suite(null); } /** * @param ignoredTests Tests don't include in the execution. * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite(Set ignoredTests) throws Exception { + public static TestSuite suite(Set ignoredTests) { TestSuite suite = new TestSuite("Ignite Kernal Test Suite"); - suite.addTestSuite(GridGetOrStartSelfTest.class); - suite.addTestSuite(GridSameVmStartupSelfTest.class); - suite.addTestSuite(GridSpiExceptionSelfTest.class); - suite.addTestSuite(GridRuntimeExceptionSelfTest.class); - suite.addTestSuite(GridFailedInputParametersSelfTest.class); - suite.addTestSuite(GridNodeFilterSelfTest.class); - suite.addTestSuite(GridNodeVisorAttributesSelfTest.class); - suite.addTestSuite(GridDiscoverySelfTest.class); - suite.addTestSuite(GridCommunicationSelfTest.class); - suite.addTestSuite(GridEventStorageManagerSelfTest.class); - suite.addTestSuite(GridCommunicationSendMessageSelfTest.class); - suite.addTestSuite(GridCacheMessageSelfTest.class); - suite.addTestSuite(GridDeploymentManagerStopSelfTest.class); - suite.addTestSuite(GridManagerStopSelfTest.class); - suite.addTestSuite(GridDiscoveryManagerAttributesSelfTest.RegularDiscovery.class); - suite.addTestSuite(GridDiscoveryManagerAttributesSelfTest.ClientDiscovery.class); - suite.addTestSuite(GridDiscoveryManagerAliveCacheSelfTest.class); - suite.addTestSuite(GridDiscoveryEventSelfTest.class); - suite.addTestSuite(GridPortProcessorSelfTest.class); - suite.addTestSuite(GridHomePathSelfTest.class); - suite.addTestSuite(GridStartupWithUndefinedIgniteHomeSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridGetOrStartSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridSameVmStartupSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridSpiExceptionSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridRuntimeExceptionSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridFailedInputParametersSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridNodeFilterSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridNodeVisorAttributesSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridDiscoverySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCommunicationSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridEventStorageManagerSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCommunicationSendMessageSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheMessageSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridDeploymentManagerStopSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridManagerStopSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridDiscoveryManagerAttributesSelfTest.RegularDiscovery.class)); + suite.addTest(new JUnit4TestAdapter(GridDiscoveryManagerAttributesSelfTest.ClientDiscovery.class)); + suite.addTest(new JUnit4TestAdapter(GridDiscoveryManagerAliveCacheSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridDiscoveryEventSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridPortProcessorSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridHomePathSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridStartupWithUndefinedIgniteHomeSelfTest.class)); GridTestUtils.addTestIfNeeded(suite, GridVersionSelfTest.class, ignoredTests); - suite.addTestSuite(GridListenActorSelfTest.class); - suite.addTestSuite(GridNodeLocalSelfTest.class); - suite.addTestSuite(GridKernalConcurrentAccessStopSelfTest.class); - suite.addTestSuite(IgniteConcurrentEntryProcessorAccessStopTest.class); - suite.addTestSuite(GridUpdateNotifierSelfTest.class); - suite.addTestSuite(GridAddressResolverSelfTest.class); - suite.addTestSuite(IgniteUpdateNotifierPerClusterSettingSelfTest.class); - suite.addTestSuite(GridLocalEventListenerSelfTest.class); - suite.addTestSuite(IgniteTopologyPrintFormatSelfTest.class); - suite.addTestSuite(ComputeJobCancelWithServiceSelfTest.class); - suite.addTestSuite(IgniteConnectionConcurrentReserveAndRemoveTest.class); - suite.addTestSuite(LongJVMPauseDetectorTest.class); - suite.addTestSuite(ClusterMetricsSelfTest.class); - suite.addTestSuite(DeploymentRequestOfUnknownClassProcessingTest.class); + suite.addTest(new JUnit4TestAdapter(GridListenActorSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridNodeLocalSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridKernalConcurrentAccessStopSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteConcurrentEntryProcessorAccessStopTest.class)); + suite.addTest(new JUnit4TestAdapter(GridUpdateNotifierSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridAddressResolverSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteUpdateNotifierPerClusterSettingSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridLocalEventListenerSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteTopologyPrintFormatSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(ComputeJobCancelWithServiceSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteConnectionConcurrentReserveAndRemoveTest.class)); + suite.addTest(new JUnit4TestAdapter(LongJVMPauseDetectorTest.class)); + suite.addTest(new JUnit4TestAdapter(ClusterMetricsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(DeploymentRequestOfUnknownClassProcessingTest.class)); // Managed Services. - suite.addTestSuite(GridServiceProcessorSingleNodeSelfTest.class); - suite.addTestSuite(GridServiceProcessorMultiNodeSelfTest.class); - suite.addTestSuite(GridServiceProcessorMultiNodeConfigSelfTest.class); - suite.addTestSuite(GridServiceProcessorProxySelfTest.class); - suite.addTestSuite(GridServiceReassignmentSelfTest.class); - suite.addTestSuite(GridServiceClientNodeTest.class); - suite.addTestSuite(GridServiceProcessorStopSelfTest.class); - suite.addTestSuite(ServicePredicateAccessCacheTest.class); - suite.addTestSuite(GridServicePackagePrivateSelfTest.class); - suite.addTestSuite(GridServiceSerializationSelfTest.class); - suite.addTestSuite(GridServiceProxyNodeStopSelfTest.class); - suite.addTestSuite(GridServiceProxyClientReconnectSelfTest.class); - suite.addTestSuite(IgniteServiceReassignmentTest.class); - suite.addTestSuite(IgniteServiceProxyTimeoutInitializedTest.class); - suite.addTestSuite(IgniteServiceDynamicCachesSelfTest.class); - suite.addTestSuite(GridServiceContinuousQueryRedeployTest.class); - suite.addTestSuite(ServiceThreadPoolSelfTest.class); - suite.addTestSuite(GridServiceProcessorBatchDeploySelfTest.class); - suite.addTestSuite(GridServiceDeploymentCompoundFutureSelfTest.class); - suite.addTestSuite(SystemCacheNotConfiguredTest.class); + suite.addTest(new JUnit4TestAdapter(GridServiceProcessorSingleNodeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridServiceProcessorMultiNodeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridServiceProcessorMultiNodeConfigSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridServiceProcessorProxySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridServiceReassignmentSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridServiceClientNodeTest.class)); + suite.addTest(new JUnit4TestAdapter(GridServiceProcessorStopSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(ServicePredicateAccessCacheTest.class)); + suite.addTest(new JUnit4TestAdapter(GridServicePackagePrivateSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridServiceSerializationSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridServiceProxyNodeStopSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridServiceProxyClientReconnectSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteServiceReassignmentTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteServiceProxyTimeoutInitializedTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteServiceDynamicCachesSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridServiceContinuousQueryRedeployTest.class)); + suite.addTest(new JUnit4TestAdapter(ServiceThreadPoolSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridServiceProcessorBatchDeploySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridServiceDeploymentCompoundFutureSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(SystemCacheNotConfiguredTest.class)); // IGNITE-3392 - //suite.addTestSuite(GridServiceDeploymentExceptionPropagationTest.class); + //suite.addTest(new JUnit4TestAdapter(GridServiceDeploymentExceptionPropagationTest.class)); - suite.addTestSuite(IgniteServiceDeploymentClassLoadingDefaultMarshallerTest.class); - suite.addTestSuite(IgniteServiceDeploymentClassLoadingJdkMarshallerTest.class); - suite.addTestSuite(IgniteServiceDeploymentClassLoadingOptimizedMarshallerTest.class); - suite.addTestSuite(IgniteServiceDeployment2ClassLoadersDefaultMarshallerTest.class); - suite.addTestSuite(IgniteServiceDeployment2ClassLoadersJdkMarshallerTest.class); - suite.addTestSuite(IgniteServiceDeployment2ClassLoadersOptimizedMarshallerTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteServiceDeploymentClassLoadingDefaultMarshallerTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteServiceDeploymentClassLoadingJdkMarshallerTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteServiceDeploymentClassLoadingOptimizedMarshallerTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteServiceDeployment2ClassLoadersDefaultMarshallerTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteServiceDeployment2ClassLoadersJdkMarshallerTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteServiceDeployment2ClassLoadersOptimizedMarshallerTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteLostAndFoundTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteLostAndFoundTestSuite.java index 7f7193026a171..190768f4e5369 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteLostAndFoundTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteLostAndFoundTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.GridFactoryVmShutdownTest; import org.apache.ignite.internal.managers.GridManagerMxBeanIllegalArgumentHandleTest; @@ -50,20 +51,20 @@ public class IgniteLostAndFoundTestSuite extends TestSuite { public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite List And Found Test Suite"); - suite.addTestSuite(FileIOTest.class); - suite.addTestSuite(FileLocksTest.class); - suite.addTestSuite(GridComputeJobExecutionErrorToLogManualTest.class); - suite.addTestSuite(GridManagerMxBeanIllegalArgumentHandleTest.class); - suite.addTestSuite(GridRoundTripTest.class); - suite.addTestSuite(GridServletLoaderTest.class); + suite.addTest(new JUnit4TestAdapter(FileIOTest.class)); + suite.addTest(new JUnit4TestAdapter(FileLocksTest.class)); + suite.addTest(new JUnit4TestAdapter(GridComputeJobExecutionErrorToLogManualTest.class)); + suite.addTest(new JUnit4TestAdapter(GridManagerMxBeanIllegalArgumentHandleTest.class)); + suite.addTest(new JUnit4TestAdapter(GridRoundTripTest.class)); + suite.addTest(new JUnit4TestAdapter(GridServletLoaderTest.class)); - suite.addTestSuite(LinkedHashMapTest.class); - suite.addTestSuite(NetworkFailureTest.class); - suite.addTestSuite(PagesWriteThrottleSandboxTest.class); - suite.addTestSuite(QueueSizeCounterMultiThreadedTest.class); - suite.addTestSuite(ReadWriteLockMultiThreadedTest.class); - suite.addTestSuite(RegExpTest.class); - suite.addTestSuite(ServerSocketMultiThreadedTest.class); + suite.addTest(new JUnit4TestAdapter(LinkedHashMapTest.class)); + suite.addTest(new JUnit4TestAdapter(NetworkFailureTest.class)); + suite.addTest(new JUnit4TestAdapter(PagesWriteThrottleSandboxTest.class)); + suite.addTest(new JUnit4TestAdapter(QueueSizeCounterMultiThreadedTest.class)); + suite.addTest(new JUnit4TestAdapter(ReadWriteLockMultiThreadedTest.class)); + suite.addTest(new JUnit4TestAdapter(RegExpTest.class)); + suite.addTest(new JUnit4TestAdapter(ServerSocketMultiThreadedTest.class)); // Non-JUnit classes with Test in name, which should be either converted to JUnit or removed in the future diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite.java index 4b5327b5c9c90..f6c67971d703a 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.IgniteClusterActivateDeactivateTestWithPersistence; import org.apache.ignite.internal.processors.cache.persistence.IgnitePdsCacheConfigurationFileConsistencyCheckTest; @@ -57,44 +58,43 @@ public class IgnitePdsTestSuite extends TestSuite { /** * @return Suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite Persistent Store Test Suite"); addRealPageStoreTests(suite); addRealPageStoreTestsLongRunning(suite); // Basic PageMemory tests. - //suite.addTestSuite(PageMemoryNoLoadSelfTest.class); - suite.addTestSuite(PageMemoryImplNoLoadTest.class); - suite.addTestSuite(PageMemoryNoStoreLeakTest.class); - suite.addTestSuite(IndexStoragePageMemoryImplTest.class); - suite.addTestSuite(PageMemoryImplTest.class); - //suite.addTestSuite(PageIdDistributionTest.class); - //suite.addTestSuite(TrackingPageIOTest.class); + //suite.addTest(new JUnit4TestAdapter(PageMemoryNoLoadSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(PageMemoryImplNoLoadTest.class)); + suite.addTest(new JUnit4TestAdapter(PageMemoryNoStoreLeakTest.class)); + suite.addTest(new JUnit4TestAdapter(IndexStoragePageMemoryImplTest.class)); + suite.addTest(new JUnit4TestAdapter(PageMemoryImplTest.class)); + //suite.addTest(new JUnit4TestAdapter(PageIdDistributionTest.class)); + //suite.addTest(new JUnit4TestAdapter(TrackingPageIOTest.class)); // BTree tests with store page memory. - suite.addTestSuite(BPlusTreePageMemoryImplTest.class); - suite.addTestSuite(BPlusTreeReuseListPageMemoryImplTest.class); + suite.addTest(new JUnit4TestAdapter(BPlusTreePageMemoryImplTest.class)); + suite.addTest(new JUnit4TestAdapter(BPlusTreeReuseListPageMemoryImplTest.class)); - suite.addTestSuite(SegmentedRingByteBufferTest.class); + suite.addTest(new JUnit4TestAdapter(SegmentedRingByteBufferTest.class)); // Write throttling - suite.addTestSuite(PagesWriteThrottleSmokeTest.class); + suite.addTest(new JUnit4TestAdapter(PagesWriteThrottleSmokeTest.class)); // Metrics - suite.addTestSuite(FillFactorMetricTest.class); + suite.addTest(new JUnit4TestAdapter(FillFactorMetricTest.class)); // WAL delta consistency - suite.addTestSuite(CpTriggeredWalDeltaConsistencyTest.class); - suite.addTestSuite(ExplicitWalDeltaConsistencyTest.class); - suite.addTestSuite(SysPropWalDeltaConsistencyTest.class); + suite.addTest(new JUnit4TestAdapter(CpTriggeredWalDeltaConsistencyTest.class)); + suite.addTest(new JUnit4TestAdapter(ExplicitWalDeltaConsistencyTest.class)); + suite.addTest(new JUnit4TestAdapter(SysPropWalDeltaConsistencyTest.class)); // Binary meta tests. - suite.addTestSuite(IgnitePdsCacheObjectBinaryProcessorOnDiscoveryTest.class); + suite.addTest(new JUnit4TestAdapter(IgnitePdsCacheObjectBinaryProcessorOnDiscoveryTest.class)); - suite.addTestSuite(SegmentAwareTest.class); + suite.addTest(new JUnit4TestAdapter(SegmentAwareTest.class)); return suite; } @@ -107,7 +107,7 @@ public static TestSuite suite() throws Exception { */ private static void addRealPageStoreTestsLongRunning(TestSuite suite) { // Basic PageMemory tests. - suite.addTestSuite(IgnitePdsPageReplacementTest.class); + suite.addTest(new JUnit4TestAdapter(IgnitePdsPageReplacementTest.class)); } /** @@ -120,37 +120,37 @@ private static void addRealPageStoreTestsLongRunning(TestSuite suite) { public static void addRealPageStoreTests(TestSuite suite) { // Checkpointing smoke-test. - suite.addTestSuite(IgnitePdsCheckpointSimulationWithRealCpDisabledTest.class); - //suite.addTestSuite(IgnitePdsCheckpointSimpleTest.class); - //suite.addTestSuite(IgnitePersistenceSequentialCheckpointTest.class); + suite.addTest(new JUnit4TestAdapter(IgnitePdsCheckpointSimulationWithRealCpDisabledTest.class)); + //suite.addTest(new JUnit4TestAdapter(IgnitePdsCheckpointSimpleTest.class)); + //suite.addTest(new JUnit4TestAdapter(IgnitePersistenceSequentialCheckpointTest.class)); // Basic API tests. - suite.addTestSuite(IgniteDbSingleNodePutGetTest.class); - suite.addTestSuite(IgniteDbMultiNodePutGetTest.class); - suite.addTestSuite(IgniteDbSingleNodeTinyPutGetTest.class); - suite.addTestSuite(IgniteDbDynamicCacheSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteDbSingleNodePutGetTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteDbMultiNodePutGetTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteDbSingleNodeTinyPutGetTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteDbDynamicCacheSelfTest.class)); // Persistence-enabled. - suite.addTestSuite(IgnitePdsSingleNodePutGetPersistenceTest.class); - suite.addTestSuite(IgnitePdsDynamicCacheTest.class); + suite.addTest(new JUnit4TestAdapter(IgnitePdsSingleNodePutGetPersistenceTest.class)); + suite.addTest(new JUnit4TestAdapter(IgnitePdsDynamicCacheTest.class)); // TODO uncomment when https://issues.apache.org/jira/browse/IGNITE-7510 is fixed - // suite.addTestSuite(IgnitePdsClientNearCachePutGetTest.class); - suite.addTestSuite(IgniteDbPutGetWithCacheStoreTest.class); - suite.addTestSuite(IgnitePdsWithTtlTest.class); + // suite.addTest(new JUnit4TestAdapter(IgnitePdsClientNearCachePutGetTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteDbPutGetWithCacheStoreTest.class)); + suite.addTest(new JUnit4TestAdapter(IgnitePdsWithTtlTest.class)); - suite.addTestSuite(IgniteClusterActivateDeactivateTestWithPersistence.class); + suite.addTest(new JUnit4TestAdapter(IgniteClusterActivateDeactivateTestWithPersistence.class)); - suite.addTestSuite(IgnitePdsCacheRestoreTest.class); - suite.addTestSuite(IgnitePdsDataRegionMetricsTest.class); + suite.addTest(new JUnit4TestAdapter(IgnitePdsCacheRestoreTest.class)); + suite.addTest(new JUnit4TestAdapter(IgnitePdsDataRegionMetricsTest.class)); - suite.addTestSuite(IgnitePdsDestroyCacheTest.class); - //suite.addTestSuite(IgnitePdsRemoveDuringRebalancingTest.class); - suite.addTestSuite(IgnitePdsDestroyCacheWithoutCheckpointsTest.class); - suite.addTestSuite(IgnitePdsCacheConfigurationFileConsistencyCheckTest.class); + suite.addTest(new JUnit4TestAdapter(IgnitePdsDestroyCacheTest.class)); + //suite.addTest(new JUnit4TestAdapter(IgnitePdsRemoveDuringRebalancingTest.class)); + suite.addTest(new JUnit4TestAdapter(IgnitePdsDestroyCacheWithoutCheckpointsTest.class)); + suite.addTest(new JUnit4TestAdapter(IgnitePdsCacheConfigurationFileConsistencyCheckTest.class)); - suite.addTestSuite(DefaultPageSizeBackwardsCompatibilityTest.class); + suite.addTest(new JUnit4TestAdapter(DefaultPageSizeBackwardsCompatibilityTest.class)); //MetaStorage - suite.addTestSuite(IgniteMetaStorageBasicTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteMetaStorageBasicTest.class)); } } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite2.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite2.java index baaf88254f4f2..c0bfda9a61f14 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite2.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite2.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.persistence.IgniteDataStorageMetricsSelfTest; import org.apache.ignite.internal.processors.cache.persistence.IgnitePdsCacheStartStopWithFreqCheckpointTest; @@ -80,22 +81,22 @@ public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite persistent Store Test Suite 2"); // Integrity test. - suite.addTestSuite(IgniteDataIntegrityTests.class); - suite.addTestSuite(IgniteStandaloneWalIteratorInvalidCrcTest.class); - suite.addTestSuite(IgniteReplayWalIteratorInvalidCrcTest.class); - suite.addTestSuite(IgniteFsyncReplayWalIteratorInvalidCrcTest.class); - suite.addTestSuite(IgnitePureJavaCrcCompatibility.class); + suite.addTest(new JUnit4TestAdapter(IgniteDataIntegrityTests.class)); + suite.addTest(new JUnit4TestAdapter(IgniteStandaloneWalIteratorInvalidCrcTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteReplayWalIteratorInvalidCrcTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteFsyncReplayWalIteratorInvalidCrcTest.class)); + suite.addTest(new JUnit4TestAdapter(IgnitePureJavaCrcCompatibility.class)); addRealPageStoreTests(suite); addRealPageStoreTestsNotForDirectIo(suite); // BaselineTopology tests - suite.addTestSuite(IgniteAllBaselineNodesOnlineFullApiSelfTest.class); - suite.addTestSuite(IgniteOfflineBaselineNodeFullApiSelfTest.class); - suite.addTestSuite(IgniteOnlineNodeOutOfBaselineFullApiSelfTest.class); - suite.addTestSuite(ClientAffinityAssignmentWithBaselineTest.class); - suite.addTestSuite(IgniteAbsentEvictionNodeOutOfBaselineTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteAllBaselineNodesOnlineFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteOfflineBaselineNodeFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteOnlineNodeOutOfBaselineFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(ClientAffinityAssignmentWithBaselineTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteAbsentEvictionNodeOutOfBaselineTest.class)); return suite; } @@ -107,19 +108,19 @@ public static TestSuite suite() { * @param suite suite to add tests into. */ private static void addRealPageStoreTestsNotForDirectIo(TestSuite suite) { - suite.addTestSuite(IgnitePdsPartitionFilesDestroyTest.class); + suite.addTest(new JUnit4TestAdapter(IgnitePdsPartitionFilesDestroyTest.class)); - suite.addTestSuite(LocalWalModeChangeDuringRebalancingSelfTest.class); + suite.addTest(new JUnit4TestAdapter(LocalWalModeChangeDuringRebalancingSelfTest.class)); - suite.addTestSuite(LocalWacModeNoChangeDuringRebalanceOnNonNodeAssignTest.class); + suite.addTest(new JUnit4TestAdapter(LocalWacModeNoChangeDuringRebalanceOnNonNodeAssignTest.class)); - suite.addTestSuite(IgniteWalFlushFsyncSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteWalFlushFsyncSelfTest.class)); - suite.addTestSuite(IgniteWalFlushFsyncWithDedicatedWorkerSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteWalFlushFsyncWithDedicatedWorkerSelfTest.class)); - suite.addTestSuite(IgniteWalFlushFsyncWithMmapBufferSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteWalFlushFsyncWithMmapBufferSelfTest.class)); - suite.addTestSuite(IgnitePdsCacheStartStopWithFreqCheckpointTest.class); + suite.addTest(new JUnit4TestAdapter(IgnitePdsCacheStartStopWithFreqCheckpointTest.class)); } /** @@ -130,75 +131,75 @@ private static void addRealPageStoreTestsNotForDirectIo(TestSuite suite) { * @param suite suite to add tests into. */ public static void addRealPageStoreTests(TestSuite suite) { - suite.addTestSuite(IgnitePdsPageSizesTest.class); + suite.addTest(new JUnit4TestAdapter(IgnitePdsPageSizesTest.class)); // Metrics test. - suite.addTestSuite(IgniteDataStorageMetricsSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteDataStorageMetricsSelfTest.class)); - suite.addTestSuite(IgnitePdsRebalancingOnNotStableTopologyTest.class); + suite.addTest(new JUnit4TestAdapter(IgnitePdsRebalancingOnNotStableTopologyTest.class)); - suite.addTestSuite(IgnitePdsWholeClusterRestartTest.class); + suite.addTest(new JUnit4TestAdapter(IgnitePdsWholeClusterRestartTest.class)); // Rebalancing test - suite.addTestSuite(IgniteWalHistoryReservationsTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteWalHistoryReservationsTest.class)); - suite.addTestSuite(SlowHistoricalRebalanceSmallHistoryTest.class); + suite.addTest(new JUnit4TestAdapter(SlowHistoricalRebalanceSmallHistoryTest.class)); - suite.addTestSuite(IgnitePersistentStoreDataStructuresTest.class); + suite.addTest(new JUnit4TestAdapter(IgnitePersistentStoreDataStructuresTest.class)); // Failover test - suite.addTestSuite(IgniteWalFlushFailoverTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteWalFlushFailoverTest.class)); - suite.addTestSuite(IgniteWalFlushBackgroundSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteWalFlushBackgroundSelfTest.class)); - suite.addTestSuite(IgniteWalFlushBackgroundWithMmapBufferSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteWalFlushBackgroundWithMmapBufferSelfTest.class)); - suite.addTestSuite(IgniteWalFlushLogOnlySelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteWalFlushLogOnlySelfTest.class)); - suite.addTestSuite(IgniteWalFlushLogOnlyWithMmapBufferSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteWalFlushLogOnlyWithMmapBufferSelfTest.class)); - suite.addTestSuite(IgniteWalFormatFileFailoverTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteWalFormatFileFailoverTest.class)); // Test suite uses Standalone WAL iterator to verify PDS content. - suite.addTestSuite(IgniteWalReaderTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteWalReaderTest.class)); - suite.addTestSuite(IgnitePdsExchangeDuringCheckpointTest.class); + suite.addTest(new JUnit4TestAdapter(IgnitePdsExchangeDuringCheckpointTest.class)); - suite.addTestSuite(IgnitePdsReserveWalSegmentsTest.class); - suite.addTestSuite(IgnitePdsReserveWalSegmentsWithCompactionTest.class); + suite.addTest(new JUnit4TestAdapter(IgnitePdsReserveWalSegmentsTest.class)); + suite.addTest(new JUnit4TestAdapter(IgnitePdsReserveWalSegmentsWithCompactionTest.class)); // new style folders with generated consistent ID test - suite.addTestSuite(IgniteUidAsConsistentIdMigrationTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteUidAsConsistentIdMigrationTest.class)); - suite.addTestSuite(IgniteWalSerializerVersionTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteWalSerializerVersionTest.class)); - suite.addTestSuite(WalCompactionTest.class); + suite.addTest(new JUnit4TestAdapter(WalCompactionTest.class)); - suite.addTestSuite(WalDeletionArchiveFsyncTest.class); - suite.addTestSuite(WalDeletionArchiveLogOnlyTest.class); + suite.addTest(new JUnit4TestAdapter(WalDeletionArchiveFsyncTest.class)); + suite.addTest(new JUnit4TestAdapter(WalDeletionArchiveLogOnlyTest.class)); - suite.addTestSuite(IgniteCheckpointDirtyPagesForLowLoadTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCheckpointDirtyPagesForLowLoadTest.class)); - suite.addTestSuite(IgnitePdsCorruptedStoreTest.class); + suite.addTest(new JUnit4TestAdapter(IgnitePdsCorruptedStoreTest.class)); - suite.addTestSuite(IgniteWalIteratorSwitchSegmentTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteWalIteratorSwitchSegmentTest.class)); - suite.addTestSuite(IgniteWalIteratorExceptionDuringReadTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteWalIteratorExceptionDuringReadTest.class)); - suite.addTestSuite(IgniteNodeStoppedDuringDisableWALTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteNodeStoppedDuringDisableWALTest.class)); - suite.addTestSuite(StandaloneWalRecordsIteratorTest.class); + suite.addTest(new JUnit4TestAdapter(StandaloneWalRecordsIteratorTest.class)); - //suite.addTestSuite(IgniteWalRecoverySeveralRestartsTest.class); + //suite.addTest(new JUnit4TestAdapter(IgniteWalRecoverySeveralRestartsTest.class)); - suite.addTestSuite(IgniteRebalanceScheduleResendPartitionsTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteRebalanceScheduleResendPartitionsTest.class)); - suite.addTestSuite(IgniteWALTailIsReachedDuringIterationOverArchiveTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteWALTailIsReachedDuringIterationOverArchiveTest.class)); - suite.addTestSuite(WalRolloverTypesTest.class); + suite.addTest(new JUnit4TestAdapter(WalRolloverTypesTest.class)); - suite.addTestSuite(FsyncWalRolloverDoesNotBlockTest.class); + suite.addTest(new JUnit4TestAdapter(FsyncWalRolloverDoesNotBlockTest.class)); - suite.addTestSuite(IgnitePdsPartitionsStateRecoveryTest.class); + suite.addTest(new JUnit4TestAdapter(IgnitePdsPartitionsStateRecoveryTest.class)); } } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite3.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite3.java index 06ba9c0611851..481670d41e32a 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite3.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite3.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.persistence.IgnitePdsContinuousRestartTest; import org.apache.ignite.internal.processors.cache.persistence.IgnitePdsContinuousRestartTestWithExpiryPolicy; @@ -43,7 +44,7 @@ public static TestSuite suite() { */ private static void addRealPageStoreTestsNotForDirectIo(TestSuite suite) { // Rebalancing test - suite.addTestSuite(IgnitePdsContinuousRestartTest.class); - suite.addTestSuite(IgnitePdsContinuousRestartTestWithExpiryPolicy.class); + suite.addTest(new JUnit4TestAdapter(IgnitePdsContinuousRestartTest.class)); + suite.addTest(new JUnit4TestAdapter(IgnitePdsContinuousRestartTestWithExpiryPolicy.class)); } } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite4.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite4.java index d01f1edf52b6e..c750f107a500b 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite4.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite4.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.cache.ResetLostPartitionTest; import org.apache.ignite.internal.processors.cache.IgniteClusterActivateDeactivateTestWithPersistenceAndMemoryReuse; @@ -43,21 +44,21 @@ public static TestSuite suite() { addRealPageStoreTestsNotForDirectIo(suite); - suite.addTestSuite(FileDownloaderTest.class); + suite.addTest(new JUnit4TestAdapter(FileDownloaderTest.class)); - suite.addTestSuite(IgnitePdsTaskCancelingTest.class); + suite.addTest(new JUnit4TestAdapter(IgnitePdsTaskCancelingTest.class)); - suite.addTestSuite(IgniteClusterActivateDeactivateTestWithPersistenceAndMemoryReuse.class); + suite.addTest(new JUnit4TestAdapter(IgniteClusterActivateDeactivateTestWithPersistenceAndMemoryReuse.class)); - suite.addTestSuite(IgnitePdsPartitionPreloadTest.class); + suite.addTest(new JUnit4TestAdapter(IgnitePdsPartitionPreloadTest.class)); - suite.addTestSuite(ResetLostPartitionTest.class); + suite.addTest(new JUnit4TestAdapter(ResetLostPartitionTest.class)); - suite.addTestSuite(IgniteRebalanceOnCachesStoppingOrDestroyingTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteRebalanceOnCachesStoppingOrDestroyingTest.class)); - suite.addTestSuite(CachePageWriteLockUnlockTest.class); + suite.addTest(new JUnit4TestAdapter(CachePageWriteLockUnlockTest.class)); - suite.addTestSuite(IgnitePdsCacheWalDisabledOnRebalancingTest.class); + suite.addTest(new JUnit4TestAdapter(IgnitePdsCacheWalDisabledOnRebalancingTest.class)); return suite; } @@ -68,14 +69,14 @@ public static TestSuite suite() { * @param suite suite to add tests into. */ private static void addRealPageStoreTestsNotForDirectIo(TestSuite suite) { - suite.addTestSuite(IgnitePdsTransactionsHangTest.class); + suite.addTest(new JUnit4TestAdapter(IgnitePdsTransactionsHangTest.class)); - suite.addTestSuite(IgnitePdsPageEvictionDuringPartitionClearTest.class); + suite.addTest(new JUnit4TestAdapter(IgnitePdsPageEvictionDuringPartitionClearTest.class)); // Rebalancing test - suite.addTestSuite(IgnitePdsContinuousRestartTestWithSharedGroupAndIndexes.class); + suite.addTest(new JUnit4TestAdapter(IgnitePdsContinuousRestartTestWithSharedGroupAndIndexes.class)); // Integrity test. - suite.addTestSuite(IgnitePdsRecoveryAfterFileCorruptionTest.class); + suite.addTest(new JUnit4TestAdapter(IgnitePdsRecoveryAfterFileCorruptionTest.class)); } } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePerformanceTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePerformanceTestSuite.java index 2e829579df9fc..f88c4a8c35f70 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePerformanceTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePerformanceTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.GridCacheConcurrentTxMultiNodeLoadTest; import org.apache.ignite.internal.processors.cache.GridCacheIteratorPerformanceTest; @@ -69,30 +70,30 @@ public class IgnitePerformanceTestSuite extends TestSuite { public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite Load-Test Suite"); - suite.addTestSuite(GridCacheDhtPreloadPerformanceTest.class); - suite.addTestSuite(GridCacheIteratorPerformanceTest.class); - suite.addTestSuite(GridCacheMultiNodeLoadTest.class); - suite.addTestSuite(GridCacheConcurrentTxMultiNodeLoadTest.class); - suite.addTestSuite(GridCachePartitionedAffinityExcludeNeighborsPerformanceTest.class); - suite.addTestSuite(GridCachePartitionedAtomicLongLoadTest.class); - suite.addTestSuite(GridCacheWriteBehindStoreLoadTest.class); - suite.addTestSuite(GridCircularBufferPerformanceTest.class); - suite.addTestSuite(GridFuncPerformanceTest.class); - suite.addTestSuite(GridHashMapLoadTest.class); - suite.addTestSuite(GridLeanMapPerformanceTest.class); - suite.addTestSuite(GridMarshallerPerformanceTest.class); - suite.addTestSuite(GridMetadataAwareAdapterLoadTest.class); - suite.addTestSuite(GridMultiSplitsLoadTest.class); - suite.addTestSuite(GridMultiSplitsRedeployLoadTest.class); - suite.addTestSuite(GridSessionLoadTest.class); - suite.addTestSuite(GridSingleSplitsNewNodesMulticastLoadTest.class); - suite.addTestSuite(GridSingleSplitsRedeployLoadTest.class); - suite.addTestSuite(GridStealingLoadTest.class); - suite.addTestSuite(GridTcpCommunicationSpiLanLoadTest.class); - suite.addTestSuite(GridUnsafeMapPerformanceTest.class); - suite.addTestSuite(GridUnsafePartitionedMapPerformanceTest.class); - suite.addTestSuite(IgniteDataStreamerPerformanceTest.class); - suite.addTestSuite(SortedEvictionPolicyPerformanceTest.class); + suite.addTest(new JUnit4TestAdapter(GridCacheDhtPreloadPerformanceTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheIteratorPerformanceTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheMultiNodeLoadTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheConcurrentTxMultiNodeLoadTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedAffinityExcludeNeighborsPerformanceTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedAtomicLongLoadTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheWriteBehindStoreLoadTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCircularBufferPerformanceTest.class)); + suite.addTest(new JUnit4TestAdapter(GridFuncPerformanceTest.class)); + suite.addTest(new JUnit4TestAdapter(GridHashMapLoadTest.class)); + suite.addTest(new JUnit4TestAdapter(GridLeanMapPerformanceTest.class)); + suite.addTest(new JUnit4TestAdapter(GridMarshallerPerformanceTest.class)); + suite.addTest(new JUnit4TestAdapter(GridMetadataAwareAdapterLoadTest.class)); + suite.addTest(new JUnit4TestAdapter(GridMultiSplitsLoadTest.class)); + suite.addTest(new JUnit4TestAdapter(GridMultiSplitsRedeployLoadTest.class)); + suite.addTest(new JUnit4TestAdapter(GridSessionLoadTest.class)); + suite.addTest(new JUnit4TestAdapter(GridSingleSplitsNewNodesMulticastLoadTest.class)); + suite.addTest(new JUnit4TestAdapter(GridSingleSplitsRedeployLoadTest.class)); + suite.addTest(new JUnit4TestAdapter(GridStealingLoadTest.class)); + suite.addTest(new JUnit4TestAdapter(GridTcpCommunicationSpiLanLoadTest.class)); + suite.addTest(new JUnit4TestAdapter(GridUnsafeMapPerformanceTest.class)); + suite.addTest(new JUnit4TestAdapter(GridUnsafePartitionedMapPerformanceTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteDataStreamerPerformanceTest.class)); + suite.addTest(new JUnit4TestAdapter(SortedEvictionPolicyPerformanceTest.class)); // Non-JUnit classes with Test in name, which should be either converted to JUnit or removed in the future // Main classes: diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteReproducingSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteReproducingSuite.java index 05464590231fb..afd18a3b0a94f 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteReproducingSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteReproducingSuite.java @@ -39,7 +39,7 @@ public static TestSuite suite() throws Exception { //uncomment to add some test //for (int i = 0; i < 100; i++) - // suite.addTestSuite(IgniteCheckpointDirtyPagesForLowLoadTest.class); + // suite.addTest(new JUnit4TestAdapter(IgniteCheckpointDirtyPagesForLowLoadTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteRestHandlerTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteRestHandlerTestSuite.java index f3e5828de031e..3fa6cbde0a089 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteRestHandlerTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteRestHandlerTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.rest.handlers.cache.GridCacheAtomicCommandHandlerSelfTest; import org.apache.ignite.internal.processors.rest.handlers.cache.GridCacheCommandHandlerSelfTest; @@ -30,16 +31,15 @@ public class IgniteRestHandlerTestSuite extends TestSuite { /** * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("REST Support Test Suite"); - suite.addTestSuite(GridCacheCommandHandlerSelfTest.class); - suite.addTestSuite(GridCacheAtomicCommandHandlerSelfTest.class); - suite.addTestSuite(GridLogCommandHandlerTest.class); - suite.addTestSuite(GridQueryCommandHandlerTest.class); - suite.addTestSuite(CacheTopologyCommandHandlerTest.class); + suite.addTest(new JUnit4TestAdapter(GridCacheCommandHandlerSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheAtomicCommandHandlerSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridLogCommandHandlerTest.class)); + suite.addTest(new JUnit4TestAdapter(GridQueryCommandHandlerTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheTopologyCommandHandlerTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiCollisionSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiCollisionSelfTestSuite.java index d5d6ab8a7b526..66561613f9206 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiCollisionSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiCollisionSelfTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.spi.collision.fifoqueue.GridFifoQueueCollisionSpiConfigSelfTest; import org.apache.ignite.spi.collision.fifoqueue.GridFifoQueueCollisionSpiSelfTest; @@ -36,28 +37,27 @@ public class IgniteSpiCollisionSelfTestSuite extends TestSuite { /** * @return Failover SPI tests suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite Collision SPI Test Suite"); // Priority. - suite.addTestSuite(GridPriorityQueueCollisionSpiSelfTest.class); - suite.addTestSuite(GridPriorityQueueCollisionSpiStartStopSelfTest.class); - suite.addTestSuite(GridPriorityQueueCollisionSpiConfigSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridPriorityQueueCollisionSpiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridPriorityQueueCollisionSpiStartStopSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridPriorityQueueCollisionSpiConfigSelfTest.class)); // FIFO. - suite.addTestSuite(GridFifoQueueCollisionSpiSelfTest.class); - suite.addTestSuite(GridFifoQueueCollisionSpiStartStopSelfTest.class); - suite.addTestSuite(GridFifoQueueCollisionSpiConfigSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridFifoQueueCollisionSpiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridFifoQueueCollisionSpiStartStopSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridFifoQueueCollisionSpiConfigSelfTest.class)); // Job Stealing. - suite.addTestSuite(GridJobStealingCollisionSpiSelfTest.class); - suite.addTestSuite(GridJobStealingCollisionSpiAttributesSelfTest.class); - suite.addTestSuite(GridJobStealingCollisionSpiCustomTopologySelfTest.class); - suite.addTestSuite(GridJobStealingCollisionSpiStartStopSelfTest.class); - suite.addTestSuite(GridJobStealingCollisionSpiConfigSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridJobStealingCollisionSpiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridJobStealingCollisionSpiAttributesSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridJobStealingCollisionSpiCustomTopologySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridJobStealingCollisionSpiStartStopSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridJobStealingCollisionSpiConfigSelfTest.class)); return suite; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiLoadBalancingSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiLoadBalancingSelfTestSuite.java index 52d4fddabef24..e843479124c8d 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiLoadBalancingSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiLoadBalancingSelfTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.Test; import junit.framework.TestSuite; import org.apache.ignite.spi.loadbalancing.adaptive.GridAdaptiveLoadBalancingSpiConfigSelfTest; @@ -53,27 +54,27 @@ public static Test suite() { TestSuite suite = new TestSuite("Ignite Load Balancing Test Suite"); // Random. - suite.addTestSuite(GridWeightedRandomLoadBalancingSpiSelfTest.class); - suite.addTestSuite(GridWeightedRandomLoadBalancingSpiWeightedSelfTest.class); - suite.addTestSuite(GridWeightedRandomLoadBalancingSpiStartStopSelfTest.class); - suite.addTestSuite(GridWeightedRandomLoadBalancingSpiConfigSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridWeightedRandomLoadBalancingSpiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridWeightedRandomLoadBalancingSpiWeightedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridWeightedRandomLoadBalancingSpiStartStopSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridWeightedRandomLoadBalancingSpiConfigSelfTest.class)); // Round-robin. - suite.addTestSuite(GridRoundRobinLoadBalancingSpiLocalNodeSelfTest.class); - suite.addTestSuite(GridRoundRobinLoadBalancingSpiMultipleNodesSelfTest.class); - suite.addTestSuite(GridRoundRobinLoadBalancingSpiTopologyChangeSelfTest.class); - suite.addTestSuite(GridRoundRobinLoadBalancingSpiNotPerTaskSelfTest.class); - suite.addTestSuite(GridRoundRobinLoadBalancingSpiStartStopSelfTest.class); - suite.addTestSuite(GridRoundRobinLoadBalancingNotPerTaskMultithreadedSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridRoundRobinLoadBalancingSpiLocalNodeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridRoundRobinLoadBalancingSpiMultipleNodesSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridRoundRobinLoadBalancingSpiTopologyChangeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridRoundRobinLoadBalancingSpiNotPerTaskSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridRoundRobinLoadBalancingSpiStartStopSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridRoundRobinLoadBalancingNotPerTaskMultithreadedSelfTest.class)); // Adaptive. - suite.addTestSuite(GridAdaptiveLoadBalancingSpiSelfTest.class); - suite.addTestSuite(GridAdaptiveLoadBalancingSpiMultipleNodeSelfTest.class); - suite.addTestSuite(GridAdaptiveLoadBalancingSpiStartStopSelfTest.class); - suite.addTestSuite(GridAdaptiveLoadBalancingSpiConfigSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridAdaptiveLoadBalancingSpiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridAdaptiveLoadBalancingSpiMultipleNodeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridAdaptiveLoadBalancingSpiStartStopSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridAdaptiveLoadBalancingSpiConfigSelfTest.class)); // Load balancing for internal tasks. - suite.addTestSuite(GridInternalTasksLoadBalancingSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridInternalTasksLoadBalancingSelfTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiTestSuite.java index d5ded38bff1bd..dd1e6854f2994 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.managers.GridManagerLocalMessageListenerSelfTest; import org.apache.ignite.internal.managers.GridNoopManagerSelfTest; @@ -58,12 +59,12 @@ public static TestSuite suite() throws Exception { suite.addTest(IgniteSpiCommunicationSelfTestSuite.suite()); // All other tests. - suite.addTestSuite(GridNoopManagerSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridNoopManagerSelfTest.class)); // Local Message Listener tests. - suite.addTestSuite(GridManagerLocalMessageListenerSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridManagerLocalMessageListenerSelfTest.class)); - suite.addTestSuite(KeystoreEncryptionSpiSelfTest.class); + suite.addTest(new JUnit4TestAdapter(KeystoreEncryptionSpiSelfTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteStandByClusterSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteStandByClusterSuite.java index f5244207c89af..78a3a729aff7a 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteStandByClusterSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteStandByClusterSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.IgniteClusterActivateDeactivateTest; import org.apache.ignite.internal.processors.cache.distributed.CacheBaselineTopologyTest; @@ -46,34 +47,34 @@ public class IgniteStandByClusterSuite extends TestSuite { public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite Activate/DeActivate Cluster Test Suite"); - suite.addTestSuite(IgniteClusterActivateDeactivateTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteClusterActivateDeactivateTest.class)); - suite.addTestSuite(IgniteStandByClusterTest.class); - suite.addTestSuite(IgniteStandByClientReconnectTest.class); - suite.addTestSuite(IgniteStandByClientReconnectToNewClusterTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteStandByClusterTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteStandByClientReconnectTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteStandByClientReconnectToNewClusterTest.class)); - suite.addTestSuite(JoinActiveNodeToActiveCluster.class); - suite.addTestSuite(JoinActiveNodeToInActiveCluster.class); - suite.addTestSuite(JoinInActiveNodeToActiveCluster.class); - suite.addTestSuite(JoinInActiveNodeToInActiveCluster.class); + suite.addTest(new JUnit4TestAdapter(JoinActiveNodeToActiveCluster.class)); + suite.addTest(new JUnit4TestAdapter(JoinActiveNodeToInActiveCluster.class)); + suite.addTest(new JUnit4TestAdapter(JoinInActiveNodeToActiveCluster.class)); + suite.addTest(new JUnit4TestAdapter(JoinInActiveNodeToInActiveCluster.class)); - suite.addTestSuite(JoinActiveNodeToActiveClusterWithPersistence.class); - suite.addTestSuite(JoinActiveNodeToInActiveClusterWithPersistence.class); - suite.addTestSuite(JoinInActiveNodeToActiveClusterWithPersistence.class); - suite.addTestSuite(JoinInActiveNodeToInActiveClusterWithPersistence.class); + suite.addTest(new JUnit4TestAdapter(JoinActiveNodeToActiveClusterWithPersistence.class)); + suite.addTest(new JUnit4TestAdapter(JoinActiveNodeToInActiveClusterWithPersistence.class)); + suite.addTest(new JUnit4TestAdapter(JoinInActiveNodeToActiveClusterWithPersistence.class)); + suite.addTest(new JUnit4TestAdapter(JoinInActiveNodeToInActiveClusterWithPersistence.class)); -//TODO https://issues.apache.org/jira/browse/IGNITE-9081 suite.addTestSuite(IgniteChangeGlobalStateTest.class); -//TODO https://issues.apache.org/jira/browse/IGNITE-9081 suite.addTestSuite(IgniteChangeGlobalStateCacheTest.class); -//TODO https://issues.apache.org/jira/browse/IGNITE-9081 suite.addTestSuite(IgniteChangeGlobalStateDataStructureTest.class); -//TODO https://issues.apache.org/jira/browse/IGNITE-9081 suite.addTestSuite(IgniteChangeGlobalStateServiceTest.class); +//TODO https://issues.apache.org/jira/browse/IGNITE-9081 suite.addTest(new JUnit4TestAdapter(IgniteChangeGlobalStateTest.class)); +//TODO https://issues.apache.org/jira/browse/IGNITE-9081 suite.addTest(new JUnit4TestAdapter(IgniteChangeGlobalStateCacheTest.class)); +//TODO https://issues.apache.org/jira/browse/IGNITE-9081 suite.addTest(new JUnit4TestAdapter(IgniteChangeGlobalStateDataStructureTest.class)); +//TODO https://issues.apache.org/jira/browse/IGNITE-9081 suite.addTest(new JUnit4TestAdapter(IgniteChangeGlobalStateServiceTest.class)); - suite.addTestSuite(IgniteChangeGlobalStateDataStreamerTest.class); - suite.addTestSuite(IgniteChangeGlobalStateFailOverTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteChangeGlobalStateDataStreamerTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteChangeGlobalStateFailOverTest.class)); - suite.addTestSuite(IgniteNoParrallelClusterIsAllowedTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteNoParrallelClusterIsAllowedTest.class)); - suite.addTestSuite(CacheBaselineTopologyTest.class); - suite.addTestSuite(IgniteBaselineAffinityTopologyActivationTest.class); + suite.addTest(new JUnit4TestAdapter(CacheBaselineTopologyTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteBaselineAffinityTopologyActivationTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteUtilSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteUtilSelfTestSuite.java index a281662db33ec..6951065497406 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteUtilSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteUtilSelfTestSuite.java @@ -18,6 +18,7 @@ package org.apache.ignite.testsuites; import java.util.Set; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.commandline.CommandHandlerParsingTest; import org.apache.ignite.internal.pagemem.impl.PageIdUtilsSelfTest; @@ -69,75 +70,73 @@ public class IgniteUtilSelfTestSuite extends TestSuite { /** * @return Grid utility methods tests suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { return suite(null); } /** * @param ignoredTests Tests don't include in the execution. * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite(Set ignoredTests) throws Exception { + public static TestSuite suite(Set ignoredTests) { TestSuite suite = new TestSuite("Ignite Util Test Suite"); - suite.addTestSuite(GridThreadPoolExecutorServiceSelfTest.class); - suite.addTestSuite(IgniteThreadPoolSizeTest.class); + suite.addTest(new JUnit4TestAdapter(GridThreadPoolExecutorServiceSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteThreadPoolSizeTest.class)); GridTestUtils.addTestIfNeeded(suite, IgniteUtilsSelfTest.class, ignoredTests); - suite.addTestSuite(GridSpinReadWriteLockSelfTest.class); - suite.addTestSuite(GridQueueSelfTest.class); - suite.addTestSuite(GridStringBuilderFactorySelfTest.class); - suite.addTestSuite(GridToStringBuilderSelfTest.class); - suite.addTestSuite(CircularStringBuilderSelfTest.class); - suite.addTestSuite(GridByteArrayListSelfTest.class); - suite.addTestSuite(GridMBeanSelfTest.class); - suite.addTestSuite(GridMBeanDisableSelfTest.class); - suite.addTestSuite(GridMBeanExoticNamesSelfTest.class); - suite.addTestSuite(GridLongListSelfTest.class); - suite.addTestSuite(GridThreadTest.class); - suite.addTestSuite(GridIntListSelfTest.class); - suite.addTestSuite(GridArraysSelfTest.class); - suite.addTestSuite(GridCacheUtilsSelfTest.class); - suite.addTestSuite(IgniteExceptionRegistrySelfTest.class); - suite.addTestSuite(GridMessageCollectionTest.class); - suite.addTestSuite(WorkersControlMXBeanTest.class); - suite.addTestSuite(GridConcurrentLinkedDequeMultiThreadedTest.class); - suite.addTestSuite(GridLogThrottleTest.class); - suite.addTestSuite(GridRandomSelfTest.class); - suite.addTestSuite(GridSnapshotLockSelfTest.class); - suite.addTestSuite(GridTopologyHeapSizeSelfTest.class); - suite.addTestSuite(GridTransientTest.class); - suite.addTestSuite(IgniteDevOnlyLogTest.class); + suite.addTest(new JUnit4TestAdapter(GridSpinReadWriteLockSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridQueueSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridStringBuilderFactorySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridToStringBuilderSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CircularStringBuilderSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridByteArrayListSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridMBeanSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridMBeanDisableSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridMBeanExoticNamesSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridLongListSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridThreadTest.class)); + suite.addTest(new JUnit4TestAdapter(GridIntListSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridArraysSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheUtilsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteExceptionRegistrySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridMessageCollectionTest.class)); + suite.addTest(new JUnit4TestAdapter(WorkersControlMXBeanTest.class)); + suite.addTest(new JUnit4TestAdapter(GridConcurrentLinkedDequeMultiThreadedTest.class)); + suite.addTest(new JUnit4TestAdapter(GridLogThrottleTest.class)); + suite.addTest(new JUnit4TestAdapter(GridRandomSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridSnapshotLockSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridTopologyHeapSizeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridTransientTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteDevOnlyLogTest.class)); // Sensitive toString. - suite.addTestSuite(IncludeSensitiveAtomicTest.class); - suite.addTestSuite(IncludeSensitiveTransactionalTest.class); + suite.addTest(new JUnit4TestAdapter(IncludeSensitiveAtomicTest.class)); + suite.addTest(new JUnit4TestAdapter(IncludeSensitiveTransactionalTest.class)); // Metrics. - suite.addTestSuite(ClusterMetricsSnapshotSerializeSelfTest.class); + suite.addTest(new JUnit4TestAdapter(ClusterMetricsSnapshotSerializeSelfTest.class)); // Unsafe. - suite.addTestSuite(GridUnsafeMemorySelfTest.class); - suite.addTestSuite(GridUnsafeStripedLruSefTest.class); - suite.addTestSuite(GridUnsafeMapSelfTest.class); - suite.addTestSuite(GridUnsafePartitionedMapSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridUnsafeMemorySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridUnsafeStripedLruSefTest.class)); + suite.addTest(new JUnit4TestAdapter(GridUnsafeMapSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridUnsafePartitionedMapSelfTest.class)); // NIO. - suite.addTestSuite(GridNioSessionMetaKeySelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridNioSessionMetaKeySelfTest.class)); GridTestUtils.addTestIfNeeded(suite, GridNioSelfTest.class, ignoredTests); - suite.addTestSuite(GridNioFilterChainSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridNioFilterChainSelfTest.class)); GridTestUtils.addTestIfNeeded(suite, GridNioSslSelfTest.class, ignoredTests); - suite.addTestSuite(GridNioDelimitedBufferSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridNioDelimitedBufferSelfTest.class)); - suite.addTestSuite(GridPartitionMapSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridPartitionMapSelfTest.class)); //dbx - suite.addTestSuite(PageIdUtilsSelfTest.class); + suite.addTest(new JUnit4TestAdapter(PageIdUtilsSelfTest.class)); // control.sh - suite.addTestSuite(CommandHandlerParsingTest.class); + suite.addTest(new JUnit4TestAdapter(CommandHandlerParsingTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/TxDeadlockDetectionTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/TxDeadlockDetectionTestSuite.java index 3018550f46cb0..b0526c02fd320 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/TxDeadlockDetectionTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/TxDeadlockDetectionTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.transactions.DepthFirstSearchTest; import org.apache.ignite.internal.processors.cache.transactions.TxDeadlockDetectionMessageMarshallingTest; @@ -34,21 +35,20 @@ public class TxDeadlockDetectionTestSuite extends TestSuite { /** * @return Test suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite Deadlock Detection Test Suite"); - suite.addTestSuite(DepthFirstSearchTest.class); - suite.addTestSuite(TxOptimisticDeadlockDetectionTest.class); - suite.addTestSuite(TxOptimisticDeadlockDetectionCrossCacheTest.class); - suite.addTestSuite(TxPessimisticDeadlockDetectionTest.class); - suite.addTestSuite(TxPessimisticDeadlockDetectionCrossCacheTest.class); - //suite.addTestSuite(TxDeadlockCauseTest.class); - suite.addTestSuite(TxDeadlockDetectionTest.class); - suite.addTestSuite(TxDeadlockDetectionNoHangsTest.class); - suite.addTestSuite(TxDeadlockDetectionUnmasrhalErrorsTest.class); - suite.addTestSuite(TxDeadlockDetectionMessageMarshallingTest.class); + suite.addTest(new JUnit4TestAdapter(DepthFirstSearchTest.class)); + suite.addTest(new JUnit4TestAdapter(TxOptimisticDeadlockDetectionTest.class)); + suite.addTest(new JUnit4TestAdapter(TxOptimisticDeadlockDetectionCrossCacheTest.class)); + suite.addTest(new JUnit4TestAdapter(TxPessimisticDeadlockDetectionTest.class)); + suite.addTest(new JUnit4TestAdapter(TxPessimisticDeadlockDetectionCrossCacheTest.class)); + //suite.addTest(new JUnit4TestAdapter(TxDeadlockCauseTest.class)); + suite.addTest(new JUnit4TestAdapter(TxDeadlockDetectionTest.class)); + suite.addTest(new JUnit4TestAdapter(TxDeadlockDetectionNoHangsTest.class)); + suite.addTest(new JUnit4TestAdapter(TxDeadlockDetectionUnmasrhalErrorsTest.class)); + suite.addTest(new JUnit4TestAdapter(TxDeadlockDetectionMessageMarshallingTest.class)); return suite; } From 0e0100034eedf8d364a4295fa814e0cc1bf1dc61 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Fri, 7 Dec 2018 12:21:54 +0300 Subject: [PATCH 057/176] IGNITE-10176 migrate non-core modules tests from Junit 3 to 4 - wip - migrating (per review comments of IGNITE-10175) -- verified with diffs overview and rebuild --- .../apache/ignite/testsuites/IgniteExamplesSelfTestSuite.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesSelfTestSuite.java b/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesSelfTestSuite.java index 1c93a4bf37232..7e847d7e05251 100644 --- a/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesSelfTestSuite.java +++ b/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesSelfTestSuite.java @@ -104,7 +104,7 @@ public static TestSuite suite() throws Exception { suite.addTest(IgniteExamplesMLTestSuite.suite()); // Encryption. - suite.addTestSuite(EncryptedCacheExampleSelfTest.class); + suite.addTest(new JUnit4TestAdapter(EncryptedCacheExampleSelfTest.class)); return suite; } From 28c1b017ba9079af57e76fd6316b40a87f410fe6 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Fri, 7 Dec 2018 12:41:10 +0300 Subject: [PATCH 058/176] IGNITE-10176 migrate non-core modules tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview and rebuild --- ...tiveIoLocalWalModeChangeDuringRebalancingSelfTest.java | 6 ++++++ .../cache/persistence/file/IgniteFileIOTest.java | 8 ++++++++ .../file/IgniteNativeIoWithNoPersistenceTest.java | 5 +++++ .../testsuites/IgnitePdsReplacementNativeIoTest.java | 5 +++++ 4 files changed, 24 insertions(+) diff --git a/modules/direct-io/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgniteNativeIoLocalWalModeChangeDuringRebalancingSelfTest.java b/modules/direct-io/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgniteNativeIoLocalWalModeChangeDuringRebalancingSelfTest.java index e2578aee5ca26..248ee31177526 100644 --- a/modules/direct-io/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgniteNativeIoLocalWalModeChangeDuringRebalancingSelfTest.java +++ b/modules/direct-io/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgniteNativeIoLocalWalModeChangeDuringRebalancingSelfTest.java @@ -16,10 +16,15 @@ */ package org.apache.ignite.internal.processors.cache.persistence; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + /** * Version of test to be executed in Direct IO suite. * Contains reduced number of records, because Direct IO does not support tmpfs. */ +@RunWith(JUnit4.class) public class IgniteNativeIoLocalWalModeChangeDuringRebalancingSelfTest extends LocalWalModeChangeDuringRebalancingSelfTest { /** {@inheritDoc} */ @Override protected int getKeysCount() { @@ -27,6 +32,7 @@ public class IgniteNativeIoLocalWalModeChangeDuringRebalancingSelfTest extends L } /** {@inheritDoc} */ + @Test @Override public void testWithExchangesMerge() throws Exception { super.testWithExchangesMerge(); } diff --git a/modules/direct-io/src/test/java/org/apache/ignite/internal/processors/cache/persistence/file/IgniteFileIOTest.java b/modules/direct-io/src/test/java/org/apache/ignite/internal/processors/cache/persistence/file/IgniteFileIOTest.java index 640932dc6c827..95011e2231452 100644 --- a/modules/direct-io/src/test/java/org/apache/ignite/internal/processors/cache/persistence/file/IgniteFileIOTest.java +++ b/modules/direct-io/src/test/java/org/apache/ignite/internal/processors/cache/persistence/file/IgniteFileIOTest.java @@ -23,10 +23,14 @@ import java.util.concurrent.ThreadLocalRandom; import junit.framework.TestCase; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * File IO tests. */ +@RunWith(JUnit4.class) public class IgniteFileIOTest extends TestCase { /** Test data size. */ private static final int TEST_DATA_SIZE = 16 * 1024 * 1024; @@ -186,6 +190,7 @@ private void checkPosition(long position) throws IOException { /** * test for 'full read' functionality. */ + @Test public void testReadFully() throws Exception { byte[] arr = new byte[TEST_DATA_SIZE]; @@ -221,6 +226,7 @@ public void testReadFully() throws Exception { /** * test for 'full read' functionality. */ + @Test public void testReadFullyArray() throws Exception { byte[] arr = new byte[TEST_DATA_SIZE]; @@ -242,6 +248,7 @@ public void testReadFullyArray() throws Exception { /** * test for 'full write' functionality. */ + @Test public void testWriteFully() throws Exception { byte[] arr = new byte[TEST_DATA_SIZE]; @@ -277,6 +284,7 @@ public void testWriteFully() throws Exception { /** * test for 'full write' functionality. */ + @Test public void testWriteFullyArray() throws Exception { byte[] arr = new byte[TEST_DATA_SIZE]; diff --git a/modules/direct-io/src/test/java/org/apache/ignite/internal/processors/cache/persistence/file/IgniteNativeIoWithNoPersistenceTest.java b/modules/direct-io/src/test/java/org/apache/ignite/internal/processors/cache/persistence/file/IgniteNativeIoWithNoPersistenceTest.java index 981e0d59a633b..adef4daf4442c 100644 --- a/modules/direct-io/src/test/java/org/apache/ignite/internal/processors/cache/persistence/file/IgniteNativeIoWithNoPersistenceTest.java +++ b/modules/direct-io/src/test/java/org/apache/ignite/internal/processors/cache/persistence/file/IgniteNativeIoWithNoPersistenceTest.java @@ -25,10 +25,14 @@ import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Checks if Direct IO can be set up if no persistent store is configured */ +@RunWith(JUnit4.class) public class IgniteNativeIoWithNoPersistenceTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @@ -52,6 +56,7 @@ public class IgniteNativeIoWithNoPersistenceTest extends GridCommonAbstractTest * Checks simple launch with native IO. * @throws Exception if failed */ + @Test public void testDirectIoHandlesNoPersistentGrid() throws Exception { IgniteEx ignite = startGrid(0); diff --git a/modules/direct-io/src/test/java/org/apache/ignite/testsuites/IgnitePdsReplacementNativeIoTest.java b/modules/direct-io/src/test/java/org/apache/ignite/testsuites/IgnitePdsReplacementNativeIoTest.java index f9bda769b2f42..1d3f91e1c9a75 100644 --- a/modules/direct-io/src/test/java/org/apache/ignite/testsuites/IgnitePdsReplacementNativeIoTest.java +++ b/modules/direct-io/src/test/java/org/apache/ignite/testsuites/IgnitePdsReplacementNativeIoTest.java @@ -18,10 +18,14 @@ import org.apache.ignite.IgniteSystemProperties; import org.apache.ignite.internal.processors.cache.persistence.db.file.IgnitePdsPageReplacementTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Page replacement light variant of test for native direct IO (wastes real IOPs on agents) */ +@RunWith(JUnit4.class) public class IgnitePdsReplacementNativeIoTest extends IgnitePdsPageReplacementTest { /** {@inheritDoc} */ @@ -36,6 +40,7 @@ public class IgnitePdsReplacementNativeIoTest extends IgnitePdsPageReplacementTe } /** {@inheritDoc} */ + @Test @Override public void testPageReplacement() throws Exception { System.setProperty(IgniteSystemProperties.IGNITE_USE_ASYNC_FILE_IO_FACTORY, "false"); From b23558625c23bea6d691002665cfaf54ae7c11b4 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Fri, 7 Dec 2018 12:47:10 +0300 Subject: [PATCH 059/176] IGNITE-10176 migrate non-core modules tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview and rebuild --- .../apache/ignite/sink/flink/FlinkIgniteSinkSelfTest.java | 8 +++++++- .../org/apache/ignite/stream/flume/IgniteSinkTest.java | 5 +++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/modules/flink/src/test/java/org/apache/ignite/sink/flink/FlinkIgniteSinkSelfTest.java b/modules/flink/src/test/java/org/apache/ignite/sink/flink/FlinkIgniteSinkSelfTest.java index eb5937925caca..3c9e40856ab6b 100644 --- a/modules/flink/src/test/java/org/apache/ignite/sink/flink/FlinkIgniteSinkSelfTest.java +++ b/modules/flink/src/test/java/org/apache/ignite/sink/flink/FlinkIgniteSinkSelfTest.java @@ -23,10 +23,14 @@ import org.apache.flink.streaming.api.datastream.DataStream; import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for {@link IgniteSink}. */ +@RunWith(JUnit4.class) public class FlinkIgniteSinkSelfTest extends GridCommonAbstractTest { /** Cache name. */ private static final String TEST_CACHE = "testCache"; @@ -34,6 +38,7 @@ public class FlinkIgniteSinkSelfTest extends GridCommonAbstractTest { /** Ignite test configuration file. */ private static final String GRID_CONF_FILE = "modules/flink/src/test/resources/example-ignite.xml"; + @Test public void testIgniteSink() throws Exception { Configuration configuration = new Configuration(); @@ -56,6 +61,7 @@ public void testIgniteSink() throws Exception { assertEquals("testValue", igniteSink.getIgnite().getOrCreateCache(TEST_CACHE).get("testData")); } + @Test public void testIgniteSinkStreamExecution() throws Exception { StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment(); @@ -78,4 +84,4 @@ public void testIgniteSinkStreamExecution() throws Exception { fail("Stream execution process failed."); } } -} \ No newline at end of file +} diff --git a/modules/flume/src/test/java/org/apache/ignite/stream/flume/IgniteSinkTest.java b/modules/flume/src/test/java/org/apache/ignite/stream/flume/IgniteSinkTest.java index 73e61e7856205..90d5dd5180856 100644 --- a/modules/flume/src/test/java/org/apache/ignite/stream/flume/IgniteSinkTest.java +++ b/modules/flume/src/test/java/org/apache/ignite/stream/flume/IgniteSinkTest.java @@ -33,12 +33,16 @@ import org.apache.ignite.events.Event; import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_PUT; /** * {@link IgniteSink} test. */ +@RunWith(JUnit4.class) public class IgniteSinkTest extends GridCommonAbstractTest { /** Number of events to be sent to memory channel. */ private static final int EVENT_CNT = 10000; @@ -49,6 +53,7 @@ public class IgniteSinkTest extends GridCommonAbstractTest { /** * @throws Exception {@link Exception}. */ + @Test public void testSink() throws Exception { IgniteConfiguration cfg = loadConfiguration("modules/flume/src/test/resources/example-ignite.xml"); From 5c24cdc3bd91ecf8284153c4277bde85054eb130 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Fri, 7 Dec 2018 14:58:19 +0300 Subject: [PATCH 060/176] IGNITE-10176 migrate non-core modules tests from Junit 3 to 4 - wip - migrating // fixes for bugs discovered by TC bot -- verified with diffs overview and rebuild --- .../ignite/failure/IoomFailureHandlerTest.java | 1 - ...AbstractDataStructuresFailoverSelfTest.java | 1 - .../IgnitePdsContinuousRestartTest.java | 18 ------------------ .../ignite/testsuites/IgnitePdsTestSuite3.java | 5 ++--- 4 files changed, 2 insertions(+), 23 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/failure/IoomFailureHandlerTest.java b/modules/core/src/test/java/org/apache/ignite/failure/IoomFailureHandlerTest.java index c2f5935d2f38f..6c9304bac9c57 100644 --- a/modules/core/src/test/java/org/apache/ignite/failure/IoomFailureHandlerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/failure/IoomFailureHandlerTest.java @@ -134,7 +134,6 @@ public void testIoomErrorMvccPdsHandling() throws Exception { /** * Test IOOME handling. */ - @Test public void testIoomErrorHandling(boolean pds, boolean mvcc) throws Exception { this.pds = pds; this.mvcc = mvcc; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java index e6c8bdd458a11..db64dabab9edf 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java @@ -757,7 +757,6 @@ public void testFairReentrantLockFailsWhenServersLeft() throws Exception { /** * @throws Exception If failed. */ - @Test public void testReentrantLockFailsWhenServersLeft(final boolean fair) throws Exception { client = true; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsContinuousRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsContinuousRestartTest.java index 8edcf3ee55f85..1002c98a8a986 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsContinuousRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsContinuousRestartTest.java @@ -45,14 +45,10 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; /** * Cause by https://issues.apache.org/jira/browse/IGNITE-7278 */ -@RunWith(JUnit4.class) public class IgnitePdsContinuousRestartTest extends GridCommonAbstractTest { /** */ private static final int GRID_CNT = 4; @@ -133,7 +129,6 @@ public IgnitePdsContinuousRestartTest(boolean cancel) { /** * @throws Exception if failed. */ - @Test public void testRebalancingDuringLoad_1000_500_1_1() throws Exception { checkRebalancingDuringLoad(1000, 500, 1, 1); } @@ -141,7 +136,6 @@ public void testRebalancingDuringLoad_1000_500_1_1() throws Exception { /** * @throws Exception if failed. */ - @Test public void testRebalancingDuringLoad_8000_500_1_1() throws Exception { checkRebalancingDuringLoad(8000, 500, 1, 1); } @@ -149,7 +143,6 @@ public void testRebalancingDuringLoad_8000_500_1_1() throws Exception { /** * @throws Exception if failed. */ - @Test public void testRebalancingDuringLoad_1000_20000_1_1() throws Exception { checkRebalancingDuringLoad(1000, 20000, 1, 1); } @@ -157,7 +150,6 @@ public void testRebalancingDuringLoad_1000_20000_1_1() throws Exception { /** * @throws Exception if failed. */ - @Test public void testRebalancingDuringLoad_8000_8000_1_1() throws Exception { checkRebalancingDuringLoad(8000, 8000, 1, 1); } @@ -165,7 +157,6 @@ public void testRebalancingDuringLoad_8000_8000_1_1() throws Exception { /** * @throws Exception if failed. */ - @Test public void testRebalancingDuringLoad_1000_500_8_1() throws Exception { checkRebalancingDuringLoad(1000, 500, 8, 1); } @@ -173,7 +164,6 @@ public void testRebalancingDuringLoad_1000_500_8_1() throws Exception { /** * @throws Exception if failed. */ - @Test public void testRebalancingDuringLoad_8000_500_8_1() throws Exception { checkRebalancingDuringLoad(8000, 500, 8, 1); } @@ -181,7 +171,6 @@ public void testRebalancingDuringLoad_8000_500_8_1() throws Exception { /** * @throws Exception if failed. */ - @Test public void testRebalancingDuringLoad_1000_20000_8_1() throws Exception { checkRebalancingDuringLoad(1000, 20000, 8, 1); } @@ -189,7 +178,6 @@ public void testRebalancingDuringLoad_1000_20000_8_1() throws Exception { /** * @throws Exception if failed. */ - @Test public void testRebalancingDuringLoad_8000_8000_8_1() throws Exception { checkRebalancingDuringLoad(8000, 8000, 8, 1); } @@ -197,7 +185,6 @@ public void testRebalancingDuringLoad_8000_8000_8_1() throws Exception { /** * @throws Exception if failed. */ - @Test public void testRebalancingDuringLoad_1000_500_8_16() throws Exception { checkRebalancingDuringLoad(1000, 500, 8, 16); } @@ -205,7 +192,6 @@ public void testRebalancingDuringLoad_1000_500_8_16() throws Exception { /** * @throws Exception if failed. */ - @Test public void testRebalancingDuringLoad_8000_500_8_16() throws Exception { checkRebalancingDuringLoad(8000, 500, 8, 16); } @@ -213,7 +199,6 @@ public void testRebalancingDuringLoad_8000_500_8_16() throws Exception { /** * @throws Exception if failed. */ - @Test public void testRebalancingDuringLoad_1000_20000_8_16() throws Exception { checkRebalancingDuringLoad(1000, 20000, 8, 16); } @@ -221,7 +206,6 @@ public void testRebalancingDuringLoad_1000_20000_8_16() throws Exception { /** * @throws Exception if failed. */ - @Test public void testRebalancingDuringLoad_8000_8000_8_16() throws Exception { checkRebalancingDuringLoad(8000, 8000, 8, 16); } @@ -229,7 +213,6 @@ public void testRebalancingDuringLoad_8000_8000_8_16() throws Exception { /** * @throws Exception if failed. */ - @Test public void testRebalncingDuringLoad_10_10_1_1() throws Exception { checkRebalancingDuringLoad(10, 10, 1, 1); } @@ -237,7 +220,6 @@ public void testRebalncingDuringLoad_10_10_1_1() throws Exception { /** * @throws Exception if failed. */ - @Test public void testRebalncingDuringLoad_10_500_8_16() throws Exception { checkRebalancingDuringLoad(10, 500, 8, 16); } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite3.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite3.java index 481670d41e32a..06ba9c0611851 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite3.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite3.java @@ -17,7 +17,6 @@ package org.apache.ignite.testsuites; -import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.persistence.IgnitePdsContinuousRestartTest; import org.apache.ignite.internal.processors.cache.persistence.IgnitePdsContinuousRestartTestWithExpiryPolicy; @@ -44,7 +43,7 @@ public static TestSuite suite() { */ private static void addRealPageStoreTestsNotForDirectIo(TestSuite suite) { // Rebalancing test - suite.addTest(new JUnit4TestAdapter(IgnitePdsContinuousRestartTest.class)); - suite.addTest(new JUnit4TestAdapter(IgnitePdsContinuousRestartTestWithExpiryPolicy.class)); + suite.addTestSuite(IgnitePdsContinuousRestartTest.class); + suite.addTestSuite(IgnitePdsContinuousRestartTestWithExpiryPolicy.class); } } From d89253450cf5ef2d3dc782ec462bebd17cd9e126 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Fri, 7 Dec 2018 15:28:49 +0300 Subject: [PATCH 061/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - corrections per review // JUnit4TestAdapter -- verified with diffs overview and rebuild --- .../java/org/apache/ignite/testframework/GridTestUtils.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java b/modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java index ee25b7ae3dbfa..544e8f0058311 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java @@ -65,6 +65,7 @@ import javax.net.ssl.KeyManagerFactory; import javax.net.ssl.SSLContext; import javax.net.ssl.TrustManager; +import junit.framework.JUnit4TestAdapter; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; @@ -1959,7 +1960,7 @@ public static void addTestIfNeeded(@NotNull final TestSuite suite, @NotNull fina if (ignoredTests != null && ignoredTests.contains(test)) return; - suite.addTestSuite(test); + suite.addTest(new JUnit4TestAdapter(test)); } /** From d6c59692edcbd56976722e368efb934a6bb0ee3f Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Fri, 7 Dec 2018 17:53:29 +0300 Subject: [PATCH 062/176] IGNITE-10176 migrate non-core modules tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview and rebuild --- .../h2/H2IndexingAbstractGeoSelfTest.java | 15 +++- .../hadoop/impl/HadoopCommandLineTest.java | 8 +- .../hadoop/impl/HadoopFileSystemsTest.java | 7 +- .../hadoop/impl/HadoopGroupingTest.java | 10 ++- .../hadoop/impl/HadoopJobTrackerSelfTest.java | 8 +- .../impl/HadoopMapReduceEmbeddedSelfTest.java | 8 +- .../HadoopMapReduceErrorResilienceTest.java | 12 ++- .../hadoop/impl/HadoopMapReduceTest.java | 7 +- .../impl/HadoopNoHadoopMapReduceTest.java | 5 ++ .../HadoopSerializationWrapperSelfTest.java | 8 +- .../hadoop/impl/HadoopSnappyTest.java | 5 ++ .../hadoop/impl/HadoopSortingTest.java | 7 +- .../impl/HadoopSplitWrapperSelfTest.java | 7 +- .../impl/HadoopTaskExecutionSelfTest.java | 11 ++- .../impl/HadoopTasksVersionsAbstractTest.java | 8 ++ .../hadoop/impl/HadoopTeraSortTest.java | 6 ++ .../hadoop/impl/HadoopTxConfigCacheTest.java | 9 ++- .../hadoop/impl/HadoopUserLibsSelfTest.java | 10 +++ .../hadoop/impl/HadoopV2JobSelfTest.java | 7 +- .../hadoop/impl/HadoopValidationSelfTest.java | 7 +- .../HadoopWeightedMapReducePlannerTest.java | 7 ++ ...ClientProtocolMultipleServersSelfTest.java | 9 ++- .../client/HadoopClientProtocolSelfTest.java | 7 +- ...rberosHadoopFileSystemFactorySelfTest.java | 8 +- .../impl/igfs/Hadoop1OverIgfsProxyTest.java | 7 +- .../igfs/HadoopFIleSystemFactorySelfTest.java | 5 ++ ...adoopIgfs20FileSystemAbstractSelfTest.java | 62 +++++++++++++++ .../igfs/HadoopIgfsDualAbstractSelfTest.java | 7 +- ...pSecondaryFileSystemConfigurationTest.java | 8 +- .../igfs/IgfsNearOnlyMultiNodeSelfTest.java | 5 ++ ...gniteHadoopFileSystemAbstractSelfTest.java | 78 ++++++++++++++++++- ...FileSystemClientBasedAbstractSelfTest.java | 8 +- ...teHadoopFileSystemClientBasedOpenTest.java | 7 ++ .../IgniteHadoopFileSystemClientSelfTest.java | 5 ++ ...niteHadoopFileSystemHandshakeSelfTest.java | 8 +- ...gniteHadoopFileSystemIpcCacheSelfTest.java | 7 +- .../IgniteHadoopFileSystemLoggerSelfTest.java | 10 ++- ...teHadoopFileSystemLoggerStateSelfTest.java | 14 +++- ...HadoopFileSystemShmemAbstractSelfTest.java | 7 +- ...ShmemExternalToClientAbstractSelfTest.java | 7 +- .../HadoopConcurrentHashMultimapSelftest.java | 8 +- .../collections/HadoopHashMapSelfTest.java | 7 +- .../collections/HadoopSkipListSelfTest.java | 8 +- .../streams/HadoopDataStreamSelfTest.java | 9 ++- .../HadoopExecutorServiceTest.java | 7 +- .../HadoopExternalTaskExecutionSelfTest.java | 8 +- .../HadoopExternalCommunicationSelfTest.java | 8 +- .../util/BasicUserNameMapperSelfTest.java | 7 ++ .../util/ChainedUserNameMapperSelfTest.java | 7 ++ .../util/KerberosUserNameMapperSelfTest.java | 8 ++ ...HibernateL2CacheConfigurationSelfTest.java | 8 +- .../HibernateL2CacheMultiJvmTest.java | 5 ++ .../hibernate/HibernateL2CacheSelfTest.java | 14 +++- .../HibernateL2CacheStrategySelfTest.java | 7 +- .../CacheHibernateStoreFactorySelfTest.java | 9 ++- ...HibernateL2CacheConfigurationSelfTest.java | 8 +- .../HibernateL2CacheMultiJvmTest.java | 5 ++ .../hibernate/HibernateL2CacheSelfTest.java | 14 +++- .../HibernateL2CacheStrategySelfTest.java | 7 +- .../CacheHibernateBlobStoreSelfTest.java | 8 ++ .../CacheHibernateStoreFactorySelfTest.java | 9 ++- 61 files changed, 566 insertions(+), 46 deletions(-) diff --git a/modules/geospatial/src/test/java/org/apache/ignite/internal/processors/query/h2/H2IndexingAbstractGeoSelfTest.java b/modules/geospatial/src/test/java/org/apache/ignite/internal/processors/query/h2/H2IndexingAbstractGeoSelfTest.java index 9c5038ec37851..a1f47b6101751 100644 --- a/modules/geospatial/src/test/java/org/apache/ignite/internal/processors/query/h2/H2IndexingAbstractGeoSelfTest.java +++ b/modules/geospatial/src/test/java/org/apache/ignite/internal/processors/query/h2/H2IndexingAbstractGeoSelfTest.java @@ -36,6 +36,9 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.GridTestUtils; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.locationtech.jts.geom.Geometry; import org.locationtech.jts.io.ParseException; import org.locationtech.jts.io.WKTReader; @@ -57,6 +60,7 @@ /** * Geo-indexing test. */ +@RunWith(JUnit4.class) public abstract class H2IndexingAbstractGeoSelfTest extends GridCacheAbstractSelfTest { /** */ private static final int CNT = 100; @@ -233,6 +237,7 @@ private static void destroy(IgniteCache cache, IgniteEx grid, boolean dynamic) { /** * @throws Exception If failed. */ + @Test public void testPrimitiveGeometry() throws Exception { IgniteCache cache = createCache("geom", true, Long.class, Geometry.class); @@ -258,6 +263,7 @@ public void testPrimitiveGeometry() throws Exception { * * @throws Exception If failed. */ + @Test public void testGeo() throws Exception { checkGeo(false); } @@ -267,6 +273,7 @@ public void testGeo() throws Exception { * * @throws Exception If failed. */ + @Test public void testGeoDynamic() throws Exception { checkGeo(true); } @@ -349,6 +356,7 @@ private void checkGeo(boolean dynamic) throws Exception { * * @throws Exception If failed. */ + @Test public void testGeoMultithreaded() throws Exception { checkGeoMultithreaded(false); } @@ -358,6 +366,7 @@ public void testGeoMultithreaded() throws Exception { * * @throws Exception If failed. */ + @Test public void testGeoMultithreadedDynamic() throws Exception { checkGeoMultithreaded(true); } @@ -493,6 +502,7 @@ private void checkPoints(Collection> res, String * * @throws Exception if fails. */ + @Test public void testSegmentedGeoIndexJoinPartitioned() throws Exception { checkSegmentedGeoIndexJoin(true, false); } @@ -502,6 +512,7 @@ public void testSegmentedGeoIndexJoinPartitioned() throws Exception { * * @throws Exception if fails. */ + @Test public void testSegmentedGeoIndexJoinPartitionedDynamic() throws Exception { checkSegmentedGeoIndexJoin(true, true); } @@ -511,6 +522,7 @@ public void testSegmentedGeoIndexJoinPartitionedDynamic() throws Exception { * * @throws Exception if fails. */ + @Test public void testSegmentedGeoIndexJoinReplicated() throws Exception { checkSegmentedGeoIndexJoin(false, false); } @@ -520,6 +532,7 @@ public void testSegmentedGeoIndexJoinReplicated() throws Exception { * * @throws Exception if fails. */ + @Test public void testSegmentedGeoIndexJoinReplicatedDynamic() throws Exception { checkSegmentedGeoIndexJoin(false, true); } @@ -674,4 +687,4 @@ protected static class EnemyCamp implements Serializable { this.name = name; } } -} \ No newline at end of file +} diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopCommandLineTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopCommandLineTest.java index 7c61e3f523466..76d7605638fda 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopCommandLineTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopCommandLineTest.java @@ -46,10 +46,14 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.lang.IgniteBiTuple; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test of integration with Hadoop client via command line interface. */ +@RunWith(JUnit4.class) public class HadoopCommandLineTest extends GridCommonAbstractTest { /** IGFS instance. */ private IgfsEx igfs; @@ -354,6 +358,7 @@ private int executeHiveQuery(String qry) throws Exception { /** * Tests Hadoop command line integration. */ + @Test public void testHadoopCommandLine() throws Exception { assertEquals(0, executeHadoopCmd("fs", "-ls", "/")); @@ -430,6 +435,7 @@ private void checkQuery(String expRes, String qry) throws Exception { /** * Tests Hive integration. */ + @Test public void testHiveCommandLine() throws Exception { assertEquals(0, executeHiveQuery( "create table table_a (" + @@ -491,4 +497,4 @@ public void testHiveCommandLine() throws Exception { checkQuery("1000\n", "select count(b.id_b) from table_a a inner join table_b b on a.id_b = b.id_b"); } -} \ No newline at end of file +} diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopFileSystemsTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopFileSystemsTest.java index 76806902b4a77..4a4ea6f3a5079 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopFileSystemsTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopFileSystemsTest.java @@ -28,10 +28,14 @@ import org.apache.ignite.internal.processors.hadoop.impl.fs.HadoopFileSystemsUtils; import org.apache.ignite.internal.processors.hadoop.impl.fs.HadoopLocalFileSystemV1; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test file systems for the working directory multi-threading support. */ +@RunWith(JUnit4.class) public class HadoopFileSystemsTest extends HadoopAbstractSelfTest { /** the number of threads */ private static final int THREAD_COUNT = 3; @@ -158,7 +162,8 @@ private void testFileSystem(final URI uri) throws Exception { * * @throws Exception If fails. */ + @Test public void testLocal() throws Exception { testFileSystem(URI.create("file:///")); } -} \ No newline at end of file +} diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopGroupingTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopGroupingTest.java index d27a234323f3b..8ca1b86d80824 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopGroupingTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopGroupingTest.java @@ -47,12 +47,16 @@ import java.util.Random; import java.util.Set; import java.util.UUID; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.processors.hadoop.impl.HadoopUtils.createJobInfo; /** * Grouping test. */ +@RunWith(JUnit4.class) public class HadoopGroupingTest extends HadoopAbstractSelfTest { /** {@inheritDoc} */ @Override protected int gridCount() { @@ -60,7 +64,7 @@ public class HadoopGroupingTest extends HadoopAbstractSelfTest { } /** {@inheritDoc} */ - protected boolean igfsEnabled() { + @Override protected boolean igfsEnabled() { return false; } @@ -87,6 +91,7 @@ protected boolean igfsEnabled() { /** * @throws Exception If failed. */ + @Test public void testGroupingReducer() throws Exception { doTestGrouping(false); } @@ -94,6 +99,7 @@ public void testGroupingReducer() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGroupingCombiner() throws Exception { doTestGrouping(true); } @@ -299,4 +305,4 @@ public static class OutFormat extends OutputFormat { return null; } } -} \ No newline at end of file +} diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopJobTrackerSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopJobTrackerSelfTest.java index 7f94def19eab3..5d69f4155be3d 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopJobTrackerSelfTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopJobTrackerSelfTest.java @@ -43,6 +43,9 @@ import org.apache.ignite.internal.processors.hadoop.HadoopJobId; import org.apache.ignite.internal.processors.hadoop.HadoopJobStatus; import org.apache.ignite.internal.util.typedef.internal.U; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.processors.hadoop.impl.HadoopUtils.createJobInfo; import static org.apache.ignite.internal.processors.hadoop.state.HadoopJobTrackerSelfTestState.combineExecCnt; @@ -53,6 +56,7 @@ /** * Job tracker self test. */ +@RunWith(JUnit4.class) public class HadoopJobTrackerSelfTest extends HadoopAbstractSelfTest { /** */ private static final String PATH_OUTPUT = "/test-out"; @@ -99,6 +103,7 @@ public class HadoopJobTrackerSelfTest extends HadoopAbstractSelfTest { /** * @throws Exception If failed. */ + @Test public void testSimpleTaskSubmit() throws Exception { try { UUID globalId = UUID.randomUUID(); @@ -145,6 +150,7 @@ public void testSimpleTaskSubmit() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTaskWithCombinerPerMap() throws Exception { try { UUID globalId = UUID.randomUUID(); @@ -323,4 +329,4 @@ private static class TestCombiner extends Reducer { System.out.println("Completed task: " + ctx.getTaskAttemptID().getTaskID().getId()); } } -} \ No newline at end of file +} diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopMapReduceEmbeddedSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopMapReduceEmbeddedSelfTest.java index 21b7ee28c1a3a..9d750c9cf25f2 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopMapReduceEmbeddedSelfTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopMapReduceEmbeddedSelfTest.java @@ -37,6 +37,9 @@ import org.apache.ignite.internal.processors.hadoop.HadoopJobProperty; import org.apache.ignite.internal.processors.hadoop.impl.examples.HadoopWordCount1; import org.apache.ignite.internal.processors.hadoop.impl.examples.HadoopWordCount2; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.processors.hadoop.impl.HadoopUtils.createJobInfo; import static org.apache.ignite.internal.processors.hadoop.state.HadoopMapReduceEmbeddedSelfTestState.flags; @@ -44,6 +47,7 @@ /** * Tests map-reduce execution with embedded mode. */ +@RunWith(JUnit4.class) public class HadoopMapReduceEmbeddedSelfTest extends HadoopMapReduceTest { /** {@inheritDoc} */ @Override public HadoopConfiguration hadoopConfiguration(String igniteInstanceName) { @@ -58,6 +62,7 @@ public class HadoopMapReduceEmbeddedSelfTest extends HadoopMapReduceTest { /** * @throws Exception If fails. */ + @Test public void testMultiReducerWholeMapReduceExecution() throws Exception { checkMultiReducerWholeMapReduceExecution(false); } @@ -65,6 +70,7 @@ public void testMultiReducerWholeMapReduceExecution() throws Exception { /** * @throws Exception If fails. */ + @Test public void testMultiReducerWholeMapReduceExecutionStriped() throws Exception { checkMultiReducerWholeMapReduceExecution(true); } @@ -268,4 +274,4 @@ private static class CustomV1OutputFormat extends org.apache.hadoop.mapred.TextO flags.put("outputFormatWasConfigured", true); } } -} \ No newline at end of file +} diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopMapReduceErrorResilienceTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopMapReduceErrorResilienceTest.java index c1143511415b7..b010ca7e959f3 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopMapReduceErrorResilienceTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopMapReduceErrorResilienceTest.java @@ -21,6 +21,9 @@ import org.apache.ignite.failure.NoOpFailureHandler; import org.apache.ignite.igfs.IgfsPath; import org.apache.ignite.internal.processors.hadoop.impl.examples.HadoopWordCount2; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test of error resiliency after an error in a map-reduce job execution. @@ -29,6 +32,7 @@ * x { unchecked exception, checked exception, error } * x { phase where the error happens }. */ +@RunWith(JUnit4.class) public class HadoopMapReduceErrorResilienceTest extends HadoopAbstractMapReduceTest { /** {@inheritDoc} */ @Override protected FailureHandler getFailureHandler(String igniteInstanceName) { @@ -40,6 +44,7 @@ public class HadoopMapReduceErrorResilienceTest extends HadoopAbstractMapReduceT * * @throws Exception If failed. */ + @Test public void testRecoveryAfterAnError0_Runtime() throws Exception { doTestRecoveryAfterAnError(0, HadoopErrorSimulator.Kind.Runtime); } @@ -49,6 +54,7 @@ public void testRecoveryAfterAnError0_Runtime() throws Exception { * * @throws Exception If failed. */ + @Test public void testRecoveryAfterAnError0_IOException() throws Exception { doTestRecoveryAfterAnError(0, HadoopErrorSimulator.Kind.IOException); } @@ -58,6 +64,7 @@ public void testRecoveryAfterAnError0_IOException() throws Exception { * * @throws Exception If failed. */ + @Test public void testRecoveryAfterAnError0_Error() throws Exception { doTestRecoveryAfterAnError(0, HadoopErrorSimulator.Kind.Error); } @@ -67,6 +74,7 @@ public void testRecoveryAfterAnError0_Error() throws Exception { * * @throws Exception If failed. */ + @Test public void testRecoveryAfterAnError7_Runtime() throws Exception { doTestRecoveryAfterAnError(7, HadoopErrorSimulator.Kind.Runtime); } @@ -75,6 +83,7 @@ public void testRecoveryAfterAnError7_Runtime() throws Exception { * * @throws Exception If failed. */ + @Test public void testRecoveryAfterAnError7_IOException() throws Exception { doTestRecoveryAfterAnError(7, HadoopErrorSimulator.Kind.IOException); } @@ -83,6 +92,7 @@ public void testRecoveryAfterAnError7_IOException() throws Exception { * * @throws Exception If failed. */ + @Test public void testRecoveryAfterAnError7_Error() throws Exception { doTestRecoveryAfterAnError(7, HadoopErrorSimulator.Kind.Error); } @@ -158,4 +168,4 @@ private void doTestWithErrorSimulator(HadoopErrorSimulator sim, IgfsPath inFile, // Expect success there: doTest(inFile, useNewMapper, useNewCombiner, useNewReducer); } -} \ No newline at end of file +} diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopMapReduceTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopMapReduceTest.java index feccb59193001..04091d03bf7b4 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopMapReduceTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopMapReduceTest.java @@ -19,15 +19,20 @@ import org.apache.ignite.igfs.IgfsPath; import org.apache.ignite.internal.processors.hadoop.impl.examples.HadoopWordCount2; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test of whole cycle of map-reduce processing via Job tracker. */ +@RunWith(JUnit4.class) public class HadoopMapReduceTest extends HadoopAbstractMapReduceTest { /** * Tests whole job execution with all phases in all combination of new and old versions of API. * @throws Exception If fails. */ + @Test public void testWholeMapReduceExecution() throws Exception { IgfsPath inDir = new IgfsPath(PATH_INPUT); @@ -63,4 +68,4 @@ protected boolean[][] getApiModes() { { true, true, true }, }; } -} \ No newline at end of file +} diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopNoHadoopMapReduceTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopNoHadoopMapReduceTest.java index 382631db45a4e..e59f9dd403273 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopNoHadoopMapReduceTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopNoHadoopMapReduceTest.java @@ -18,10 +18,14 @@ package org.apache.ignite.internal.processors.hadoop.impl; import org.apache.ignite.configuration.IgniteConfiguration; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test attempt to execute a map-reduce task while no Hadoop processor available. */ +@RunWith(JUnit4.class) public class HadoopNoHadoopMapReduceTest extends HadoopMapReduceTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { @@ -34,6 +38,7 @@ public class HadoopNoHadoopMapReduceTest extends HadoopMapReduceTest { } /** {@inheritDoc} */ + @Test @Override public void testWholeMapReduceExecution() throws Exception { try { super.testWholeMapReduceExecution(); diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopSerializationWrapperSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopSerializationWrapperSelfTest.java index 5ccc8cea50115..b1f16e0d4bd2d 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopSerializationWrapperSelfTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopSerializationWrapperSelfTest.java @@ -30,15 +30,20 @@ import org.apache.ignite.internal.processors.hadoop.HadoopSerialization; import org.apache.ignite.internal.processors.hadoop.impl.v2.HadoopSerializationWrapper; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test of wrapper of the native serialization. */ +@RunWith(JUnit4.class) public class HadoopSerializationWrapperSelfTest extends GridCommonAbstractTest { /** * Tests read/write of IntWritable via native WritableSerialization. * @throws Exception If fails. */ + @Test public void testIntWritableSerialization() throws Exception { HadoopSerialization ser = new HadoopSerializationWrapper(new WritableSerialization(), IntWritable.class); @@ -61,6 +66,7 @@ public void testIntWritableSerialization() throws Exception { * Tests read/write of Integer via native JavaleSerialization. * @throws Exception If fails. */ + @Test public void testIntJavaSerialization() throws Exception { HadoopSerialization ser = new HadoopSerializationWrapper(new JavaSerialization(), Integer.class); @@ -77,4 +83,4 @@ public void testIntJavaSerialization() throws Exception { assertEquals(3, ((Integer)ser.read(in, null)).intValue()); assertEquals(-5, ((Integer)ser.read(in, null)).intValue()); } -} \ No newline at end of file +} diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopSnappyTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopSnappyTest.java index 80ff7547e2988..6958520cd807f 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopSnappyTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopSnappyTest.java @@ -32,10 +32,14 @@ import org.apache.ignite.internal.processors.hadoop.HadoopHelperImpl; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests isolated Hadoop Snappy codec usage. */ +@RunWith(JUnit4.class) public class HadoopSnappyTest extends GridCommonAbstractTest { /** Length of data. */ private static final int BYTE_SIZE = 1024 * 50; @@ -45,6 +49,7 @@ public class HadoopSnappyTest extends GridCommonAbstractTest { * * @throws Exception On error. */ + @Test public void testSnappy() throws Throwable { // Run Snappy test in default class loader: checkSnappy(); diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopSortingTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopSortingTest.java index bb11ccb77eeb1..dc84913d6a070 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopSortingTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopSortingTest.java @@ -50,12 +50,16 @@ import org.apache.ignite.configuration.HadoopConfiguration; import org.apache.ignite.internal.processors.hadoop.HadoopJobId; import org.apache.ignite.internal.util.typedef.X; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.processors.hadoop.impl.HadoopUtils.createJobInfo; /** * Tests correct sorting. */ +@RunWith(JUnit4.class) public class HadoopSortingTest extends HadoopAbstractSelfTest { /** */ private static final String PATH_INPUT = "/test-in"; @@ -98,6 +102,7 @@ public class HadoopSortingTest extends HadoopAbstractSelfTest { /** * @throws Exception If failed. */ + @Test public void testSortSimple() throws Exception { // Generate test data. Job job = Job.getInstance(); @@ -301,4 +306,4 @@ public FakeSplit() { len = in.readInt(); } } -} \ No newline at end of file +} diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopSplitWrapperSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopSplitWrapperSelfTest.java index be2bfc2413727..4c661a6755f67 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopSplitWrapperSelfTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopSplitWrapperSelfTest.java @@ -29,15 +29,20 @@ import org.apache.hadoop.mapreduce.lib.input.FileSplit; import org.apache.ignite.internal.processors.hadoop.HadoopSplitWrapper; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Self test of {@link HadoopSplitWrapper}. */ +@RunWith(JUnit4.class) public class HadoopSplitWrapperSelfTest extends HadoopAbstractSelfTest { /** * Tests serialization of wrapper and the wrapped native split. * @throws Exception If fails. */ + @Test public void testSerialization() throws Exception { FileSplit nativeSplit = new FileSplit(new Path("/path/to/file"), 100, 500, new String[]{"host1", "host2"}); @@ -69,4 +74,4 @@ public void testSerialization() throws Exception { } -} \ No newline at end of file +} diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopTaskExecutionSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopTaskExecutionSelfTest.java index bc59c764ed8e2..afd5ac783e3b5 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopTaskExecutionSelfTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopTaskExecutionSelfTest.java @@ -52,6 +52,9 @@ import org.apache.ignite.internal.util.typedef.X; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.processors.hadoop.state.HadoopTaskExecutionSelfTestValues.cancelledTasks; import static org.apache.ignite.internal.processors.hadoop.state.HadoopTaskExecutionSelfTestValues.executedTasks; @@ -64,6 +67,7 @@ /** * Tests map-reduce task execution basics. */ +@RunWith(JUnit4.class) public class HadoopTaskExecutionSelfTest extends HadoopAbstractSelfTest { /** Test param. */ private static final String MAP_WRITE = "test.map.write"; @@ -107,6 +111,7 @@ public class HadoopTaskExecutionSelfTest extends HadoopAbstractSelfTest { /** * @throws Exception If failed. */ + @Test public void testMapRun() throws Exception { int lineCnt = 10000; String fileName = "/testFile"; @@ -148,6 +153,7 @@ public void testMapRun() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMapCombineRun() throws Exception { int lineCnt = 10001; String fileName = "/testFile"; @@ -196,6 +202,7 @@ public void testMapCombineRun() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMapperException() throws Exception { prepareFile("/testFile", 1000); @@ -301,6 +308,7 @@ private static class InFormat extends TextInputFormat { /** * @throws Exception If failed. */ + @Test public void testTaskCancelling() throws Exception { Configuration cfg = prepareJobForCancelling(); @@ -345,6 +353,7 @@ public void testTaskCancelling() throws Exception { /** * @throws Exception If failed. */ + @Test public void testJobKill() throws Exception { Configuration cfg = prepareJobForCancelling(); @@ -541,4 +550,4 @@ private static class TestReducer extends Reducer hadoopCache = getSystemCache(ignite, CU.SYS_CACHE_HADOOP_MR); @@ -39,4 +44,4 @@ public void testSystemCacheTx() throws Exception { checkImplicitTxSuccess(hadoopCache); checkStartTxSuccess(hadoopCache); } -} \ No newline at end of file +} diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopUserLibsSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopUserLibsSelfTest.java index 0e4a0ef1d1a82..cf4ef5e88661e 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopUserLibsSelfTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopUserLibsSelfTest.java @@ -25,10 +25,14 @@ import java.util.Collection; import java.util.Collections; import java.util.HashSet; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for user libs parsing. */ +@RunWith(JUnit4.class) public class HadoopUserLibsSelfTest extends GridCommonAbstractTest { /** Directory 1. */ private static final File DIR_1 = HadoopTestUtils.testDir("dir1"); @@ -89,6 +93,7 @@ public class HadoopUserLibsSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testNullOrEmptyUserLibs() throws Exception { assert parse(null).isEmpty(); assert parse("").isEmpty(); @@ -99,6 +104,7 @@ public void testNullOrEmptyUserLibs() throws Exception { * * @throws Exception If failed. */ + @Test public void testSingle() throws Exception { Collection res = parse(single(FILE_1_1)); @@ -115,6 +121,7 @@ public void testSingle() throws Exception { * * @throws Exception If failed. */ + @Test public void testMultiple() throws Exception { Collection res = parse(merge(single(FILE_1_1), single(FILE_1_2), single(FILE_2_1), single(FILE_2_2), single(MISSING_FILE))); @@ -131,6 +138,7 @@ public void testMultiple() throws Exception { * * @throws Exception If failed. */ + @Test public void testSingleWildcard() throws Exception { Collection res = parse(wildcard(DIR_1)); @@ -148,6 +156,7 @@ public void testSingleWildcard() throws Exception { * * @throws Exception If failed. */ + @Test public void testMultipleWildcards() throws Exception { Collection res = parse(merge(wildcard(DIR_1), wildcard(DIR_2), wildcard(MISSING_DIR))); @@ -163,6 +172,7 @@ public void testMultipleWildcards() throws Exception { * * @throws Exception If failed. */ + @Test public void testMixed() throws Exception { String str = merge( single(FILE_1_1), diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopV2JobSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopV2JobSelfTest.java index 041f0bc7c4634..5eefdf91621a9 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopV2JobSelfTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopV2JobSelfTest.java @@ -40,12 +40,16 @@ import org.apache.ignite.internal.processors.hadoop.HadoopHelperImpl; import org.apache.ignite.internal.processors.hadoop.impl.v2.HadoopSerializationWrapper; import org.apache.ignite.internal.processors.hadoop.impl.v2.HadoopV2Job; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.processors.hadoop.impl.HadoopUtils.createJobInfo; /** * Self test of {@link org.apache.ignite.internal.processors.hadoop.impl.v2.HadoopV2Job}. */ +@RunWith(JUnit4.class) public class HadoopV2JobSelfTest extends HadoopAbstractSelfTest { /** */ private static final String TEST_SERIALIZED_VALUE = "Test serialized value"; @@ -73,6 +77,7 @@ private static class CustomSerialization extends WritableSerialization { * * @throws IgniteCheckedException If fails. */ + @Test public void testCustomSerializationApplying() throws IgniteCheckedException { JobConf cfg = new JobConf(); @@ -105,4 +110,4 @@ public void testCustomSerializationApplying() throws IgniteCheckedException { assertEquals(TEST_SERIALIZED_VALUE, ser.read(in, null).toString()); } -} \ No newline at end of file +} diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopValidationSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopValidationSelfTest.java index ef16762191e6f..58f7f5ebf022d 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopValidationSelfTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopValidationSelfTest.java @@ -18,10 +18,14 @@ package org.apache.ignite.internal.processors.hadoop.impl; import org.apache.ignite.configuration.IgniteConfiguration; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Configuration validation tests. */ +@RunWith(JUnit4.class) public class HadoopValidationSelfTest extends HadoopAbstractSelfTest { /** Peer class loading enabled flag. */ public boolean peerClassLoading; @@ -47,7 +51,8 @@ public class HadoopValidationSelfTest extends HadoopAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testValid() throws Exception { startGrids(1); } -} \ No newline at end of file +} diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopWeightedMapReducePlannerTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopWeightedMapReducePlannerTest.java index 6dcd9980c05b7..c55940aa2bcef 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopWeightedMapReducePlannerTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopWeightedMapReducePlannerTest.java @@ -45,10 +45,14 @@ import java.util.Set; import java.util.TreeMap; import java.util.UUID; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for weighted map-reduce planned. */ +@RunWith(JUnit4.class) public class HadoopWeightedMapReducePlannerTest extends GridCommonAbstractTest { /** ID 1. */ private static final UUID ID_1 = new UUID(0, 1); @@ -111,6 +115,7 @@ public class HadoopWeightedMapReducePlannerTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testOneIgfsSplitAffinity() throws Exception { IgfsMock igfs = LocationsBuilder.create().add(0, NODE_1).add(50, NODE_2).add(100, NODE_3).buildIgfs(); @@ -139,6 +144,7 @@ public void testOneIgfsSplitAffinity() throws Exception { * * @throws Exception If failed. */ + @Test public void testHdfsSplitsAffinity() throws Exception { IgfsMock igfs = LocationsBuilder.create().add(0, NODE_1).add(50, NODE_2).add(100, NODE_3).buildIgfs(); @@ -171,6 +177,7 @@ public void testHdfsSplitsAffinity() throws Exception { * * @throws Exception If failed. */ + @Test public void testHdfsSplitsReplication() throws Exception { IgfsMock igfs = LocationsBuilder.create().add(0, NODE_1).add(50, NODE_2).add(100, NODE_3).buildIgfs(); diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/client/HadoopClientProtocolMultipleServersSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/client/HadoopClientProtocolMultipleServersSelfTest.java index 77d5e8a6ce103..dfebd3fbae6f2 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/client/HadoopClientProtocolMultipleServersSelfTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/client/HadoopClientProtocolMultipleServersSelfTest.java @@ -50,10 +50,14 @@ import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Hadoop client protocol configured with multiple ignite servers tests. */ +@RunWith(JUnit4.class) public class HadoopClientProtocolMultipleServersSelfTest extends HadoopAbstractSelfTest { /** Input path. */ private static final String PATH_INPUT = "/input"; @@ -146,6 +150,7 @@ private void checkJobSubmit(Configuration conf) throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultipleAddresses() throws Exception { restPort = REST_PORT; @@ -161,6 +166,7 @@ public void testMultipleAddresses() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSingleAddress() throws Exception { try { // Don't use REST_PORT to test connection fails if the only this port is configured @@ -186,6 +192,7 @@ public void testSingleAddress() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMixedAddrs() throws Exception { restPort = REST_PORT; @@ -308,4 +315,4 @@ public static class OutFormat extends OutputFormat { return null; } } -} \ No newline at end of file +} diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/client/HadoopClientProtocolSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/client/HadoopClientProtocolSelfTest.java index 83269e360a1e1..59b3ee9245ee2 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/client/HadoopClientProtocolSelfTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/client/HadoopClientProtocolSelfTest.java @@ -56,11 +56,15 @@ import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Hadoop client protocol tests in external process mode. */ @SuppressWarnings("ResultOfMethodCallIgnored") +@RunWith(JUnit4.class) public class HadoopClientProtocolSelfTest extends HadoopAbstractSelfTest { /** Input path. */ private static final String PATH_INPUT = "/input"; @@ -159,6 +163,7 @@ private void tstNextJobId() throws Exception { * * @throws Exception If failed. */ + @Test public void testJobCounters() throws Exception { IgniteFileSystem igfs = grid(0).fileSystem(HadoopAbstractSelfTest.igfsName); @@ -661,4 +666,4 @@ public static class TestReducer extends Reducer() { @Override public Object call() throws Exception { @@ -461,6 +468,7 @@ public void testCreateCheckParameters() throws Exception { } /** @throws Exception If failed. */ + @Test public void testCreateBase() throws Exception { Path fsHome = new Path(primaryFsUri); Path dir = new Path(fsHome, "/someDir1/someDir2/someDir3"); @@ -487,6 +495,7 @@ public void testCreateBase() throws Exception { } /** @throws Exception If failed. */ + @Test public void testCreateCheckOverwrite() throws Exception { Path fsHome = new Path(primaryFsUri); Path dir = new Path(fsHome, "/someDir1/someDir2/someDir3"); @@ -517,6 +526,7 @@ public void testCreateCheckOverwrite() throws Exception { } /** @throws Exception If failed. */ + @Test public void testDeleteIfNoSuchPath() throws Exception { Path fsHome = new Path(primaryFsUri); Path dir = new Path(fsHome, "/someDir1/someDir2/someDir3"); @@ -527,6 +537,7 @@ public void testDeleteIfNoSuchPath() throws Exception { } /** @throws Exception If failed. */ + @Test public void testDeleteSuccessfulIfPathIsOpenedToRead() throws Exception { Path fsHome = new Path(primaryFsUri); final Path file = new Path(fsHome, "myFile"); @@ -560,6 +571,7 @@ public void testDeleteSuccessfulIfPathIsOpenedToRead() throws Exception { } /** @throws Exception If failed. */ + @Test public void testDeleteIfFilePathExists() throws Exception { Path fsHome = new Path(primaryFsUri); Path file = new Path(fsHome, "myFile"); @@ -575,6 +587,7 @@ public void testDeleteIfFilePathExists() throws Exception { } /** @throws Exception If failed. */ + @Test public void testDeleteIfDirectoryPathExists() throws Exception { Path fsHome = new Path(primaryFsUri); Path dir = new Path(fsHome, "/someDir1/someDir2/someDir3"); @@ -590,6 +603,7 @@ public void testDeleteIfDirectoryPathExists() throws Exception { } /** @throws Exception If failed. */ + @Test public void testDeleteFailsIfNonRecursive() throws Exception { Path fsHome = new Path(primaryFsUri); Path someDir3 = new Path(fsHome, "/someDir1/someDir2/someDir3"); @@ -614,6 +628,7 @@ public void testDeleteFailsIfNonRecursive() throws Exception { } /** @throws Exception If failed. */ + @Test public void testDeleteRecursively() throws Exception { Path fsHome = new Path(primaryFsUri); Path someDir3 = new Path(fsHome, "/someDir1/someDir2/someDir3"); @@ -632,6 +647,7 @@ public void testDeleteRecursively() throws Exception { } /** @throws Exception If failed. */ + @Test public void testDeleteRecursivelyFromRoot() throws Exception { Path fsHome = new Path(primaryFsUri); Path someDir3 = new Path(fsHome, "/someDir1/someDir2/someDir3"); @@ -654,6 +670,7 @@ public void testDeleteRecursivelyFromRoot() throws Exception { } /** @throws Exception If failed. */ + @Test public void testSetPermissionCheckDefaultPermission() throws Exception { Path fsHome = new Path(primaryFsUri); Path file = new Path(fsHome, "/tmp/my"); @@ -670,6 +687,7 @@ public void testSetPermissionCheckDefaultPermission() throws Exception { } /** @throws Exception If failed. */ + @Test public void testSetPermissionCheckNonRecursiveness() throws Exception { Path fsHome = new Path(primaryFsUri); Path file = new Path(fsHome, "/tmp/my"); @@ -691,6 +709,7 @@ public void testSetPermissionCheckNonRecursiveness() throws Exception { /** @throws Exception If failed. */ @SuppressWarnings("OctalInteger") + @Test public void testSetPermission() throws Exception { Path fsHome = new Path(primaryFsUri); Path file = new Path(fsHome, "/tmp/my"); @@ -710,6 +729,7 @@ public void testSetPermission() throws Exception { } /** @throws Exception If failed. */ + @Test public void testSetPermissionIfOutputStreamIsNotClosed() throws Exception { Path fsHome = new Path(primaryFsUri); Path file = new Path(fsHome, "myFile"); @@ -727,6 +747,7 @@ public void testSetPermissionIfOutputStreamIsNotClosed() throws Exception { } /** @throws Exception If failed. */ + @Test public void testSetOwnerCheckParametersPathIsNull() throws Exception { Path fsHome = new Path(primaryFsUri); final Path file = new Path(fsHome, "/tmp/my"); @@ -746,6 +767,7 @@ public void testSetOwnerCheckParametersPathIsNull() throws Exception { } /** @throws Exception If failed. */ + @Test public void testSetOwnerCheckParametersUserIsNull() throws Exception { Path fsHome = new Path(primaryFsUri); final Path file = new Path(fsHome, "/tmp/my"); @@ -765,6 +787,7 @@ public void testSetOwnerCheckParametersUserIsNull() throws Exception { } /** @throws Exception If failed. */ + @Test public void testSetOwnerCheckParametersGroupIsNull() throws Exception { Path fsHome = new Path(primaryFsUri); final Path file = new Path(fsHome, "/tmp/my"); @@ -784,6 +807,7 @@ public void testSetOwnerCheckParametersGroupIsNull() throws Exception { } /** @throws Exception If failed. */ + @Test public void testSetOwner() throws Exception { Path fsHome = new Path(primaryFsUri); final Path file = new Path(fsHome, "/tmp/my"); @@ -802,6 +826,7 @@ public void testSetOwner() throws Exception { } /** @throws Exception If failed. */ + @Test public void testSetOwnerIfOutputStreamIsNotClosed() throws Exception { Path fsHome = new Path(primaryFsUri); Path file = new Path(fsHome, "myFile"); @@ -818,6 +843,7 @@ public void testSetOwnerIfOutputStreamIsNotClosed() throws Exception { } /** @throws Exception If failed. */ + @Test public void testSetOwnerCheckNonRecursiveness() throws Exception { Path fsHome = new Path(primaryFsUri); Path file = new Path(fsHome, "/tmp/my"); @@ -840,6 +866,7 @@ public void testSetOwnerCheckNonRecursiveness() throws Exception { } /** @throws Exception If failed. */ + @Test public void testOpenCheckParametersPathIsNull() throws Exception { GridTestUtils.assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -849,6 +876,7 @@ public void testOpenCheckParametersPathIsNull() throws Exception { } /** @throws Exception If failed. */ + @Test public void testOpenNoSuchPath() throws Exception { Path fsHome = new Path(primaryFsUri); final Path file = new Path(fsHome, "someFile"); @@ -861,6 +889,7 @@ public void testOpenNoSuchPath() throws Exception { } /** @throws Exception If failed. */ + @Test public void testOpenIfPathIsAlreadyOpened() throws Exception { Path fsHome = new Path(primaryFsUri); Path file = new Path(fsHome, "someFile"); @@ -878,6 +907,7 @@ public void testOpenIfPathIsAlreadyOpened() throws Exception { } /** @throws Exception If failed. */ + @Test public void testOpen() throws Exception { Path fsHome = new Path(primaryFsUri); Path file = new Path(fsHome, "someFile"); @@ -901,6 +931,7 @@ public void testOpen() throws Exception { } /** @throws Exception If failed. */ + @Test public void testAppendIfPathPointsToDirectory() throws Exception { final Path fsHome = new Path(primaryFsUri); final Path dir = new Path(fsHome, "/tmp"); @@ -920,6 +951,7 @@ public void testAppendIfPathPointsToDirectory() throws Exception { } /** @throws Exception If failed. */ + @Test public void testAppendIfFileIsAlreadyBeingOpenedToWrite() throws Exception { Path fsHome = new Path(primaryFsUri); final Path file = new Path(fsHome, "someFile"); @@ -943,6 +975,7 @@ public void testAppendIfFileIsAlreadyBeingOpenedToWrite() throws Exception { } /** @throws Exception If failed. */ + @Test public void testAppend() throws Exception { Path fsHome = new Path(primaryFsUri); Path file = new Path(fsHome, "someFile"); @@ -974,6 +1007,7 @@ public void testAppend() throws Exception { } /** @throws Exception If failed. */ + @Test public void testRenameCheckParametersSrcPathIsNull() throws Exception { Path fsHome = new Path(primaryFsUri); final Path file = new Path(fsHome, "someFile"); @@ -988,6 +1022,7 @@ public void testRenameCheckParametersSrcPathIsNull() throws Exception { } /** @throws Exception If failed. */ + @Test public void testRenameCheckParametersDstPathIsNull() throws Exception { Path fsHome = new Path(primaryFsUri); final Path file = new Path(fsHome, "someFile"); @@ -1006,6 +1041,7 @@ public Object call() throws Exception { } /** @throws Exception If failed. */ + @Test public void testRenameIfSrcPathDoesNotExist() throws Exception { Path fsHome = new Path(primaryFsUri); final Path srcFile = new Path(fsHome, "srcFile"); @@ -1025,6 +1061,7 @@ public void testRenameIfSrcPathDoesNotExist() throws Exception { } /** @throws Exception If failed. */ + @Test public void testRenameIfSrcPathIsAlreadyBeingOpenedToWrite() throws Exception { Path fsHome = new Path(primaryFsUri); Path srcFile = new Path(fsHome, "srcFile"); @@ -1061,6 +1098,7 @@ public void testRenameIfSrcPathIsAlreadyBeingOpenedToWrite() throws Exception { } /** @throws Exception If failed. */ + @Test public void testRenameFileIfDstPathExists() throws Exception { Path fsHome = new Path(primaryFsUri); final Path srcFile = new Path(fsHome, "srcFile"); @@ -1089,6 +1127,7 @@ public void testRenameFileIfDstPathExists() throws Exception { } /** @throws Exception If failed. */ + @Test public void testRenameFile() throws Exception { Path fsHome = new Path(primaryFsUri); Path srcFile = new Path(fsHome, "/tmp/srcFile"); @@ -1106,6 +1145,7 @@ public void testRenameFile() throws Exception { } /** @throws Exception If failed. */ + @Test public void testRenameIfSrcPathIsAlreadyBeingOpenedToRead() throws Exception { Path fsHome = new Path(primaryFsUri); Path srcFile = new Path(fsHome, "srcFile"); @@ -1141,6 +1181,7 @@ public void testRenameIfSrcPathIsAlreadyBeingOpenedToRead() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRenameDirectoryIfDstPathExists() throws Exception { Path fsHome = new Path(primaryFsUri); Path srcDir = new Path(fsHome, "/tmp/"); @@ -1174,6 +1215,7 @@ public void testRenameDirectoryIfDstPathExists() throws Exception { } /** @throws Exception If failed. */ + @Test public void testRenameDirectory() throws Exception { Path fsHome = new Path(primaryFsUri); Path dir = new Path(fsHome, "/tmp/"); @@ -1191,6 +1233,7 @@ public void testRenameDirectory() throws Exception { } /** @throws Exception If failed. */ + @Test public void testListStatusIfPathIsNull() throws Exception { GridTestUtils.assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -1200,6 +1243,7 @@ public void testListStatusIfPathIsNull() throws Exception { } /** @throws Exception If failed. */ + @Test public void testListStatusIfPathDoesNotExist() throws Exception { GridTestUtils.assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -1213,6 +1257,7 @@ public void testListStatusIfPathDoesNotExist() throws Exception { * * @throws Exception If failed. */ + @Test public void testListStatus() throws Exception { Path igfsHome = new Path(primaryFsUri); @@ -1256,6 +1301,7 @@ public void testListStatus() throws Exception { } /** @throws Exception If failed. */ + @Test public void testMkdirsIfPathIsNull() throws Exception { GridTestUtils.assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -1267,6 +1313,7 @@ public void testMkdirsIfPathIsNull() throws Exception { } /** @throws Exception If failed. */ + @Test public void testMkdirsIfPermissionIsNull() throws Exception { Path dir = new Path("/tmp"); @@ -1277,6 +1324,7 @@ public void testMkdirsIfPermissionIsNull() throws Exception { /** @throws Exception If failed. */ @SuppressWarnings("OctalInteger") + @Test public void testMkdirs() throws Exception { Path fsHome = new Path(primaryFileSystemUriPath()); Path dir = new Path(fsHome, "/tmp/staging"); @@ -1296,6 +1344,7 @@ public void testMkdirs() throws Exception { } /** @throws Exception If failed. */ + @Test public void testGetFileStatusIfPathIsNull() throws Exception { GridTestUtils.assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -1305,6 +1354,7 @@ public void testGetFileStatusIfPathIsNull() throws Exception { } /** @throws Exception If failed. */ + @Test public void testGetFileStatusIfPathDoesNotExist() throws Exception { GridTestUtils.assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -1314,6 +1364,7 @@ public void testGetFileStatusIfPathDoesNotExist() throws Exception { } /** @throws Exception If failed. */ + @Test public void testGetFileBlockLocationsIfFileStatusIsNull() throws Exception { GridTestUtils.assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -1324,6 +1375,7 @@ public void testGetFileBlockLocationsIfFileStatusIsNull() throws Exception { } /** @throws Exception If failed. */ + @Test public void testGetFileBlockLocationsIfFileStatusReferenceNotExistingPath() throws Exception { GridTestUtils.assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -1333,6 +1385,7 @@ public void testGetFileBlockLocationsIfFileStatusReferenceNotExistingPath() thro } /** @throws Exception If failed. */ + @Test public void testGetFileBlockLocations() throws Exception { Path igfsHome = new Path(primaryFsUri); @@ -1371,6 +1424,7 @@ public void testGetFileBlockLocations() throws Exception { } /** @throws Exception If failed. */ + @Test public void testZeroReplicationFactor() throws Exception { // This test doesn't make sense for any mode except of PRIMARY. if (mode == PRIMARY) { @@ -1404,6 +1458,7 @@ public void testZeroReplicationFactor() throws Exception { * * @throws Exception If failed. */ + @Test public void testMultithreadedCreate() throws Exception { Path dir = new Path(new Path(primaryFsUri), "/dir"); @@ -1479,6 +1534,7 @@ public void testMultithreadedCreate() throws Exception { * * @throws Exception If failed. */ + @Test public void testMultithreadedAppend() throws Exception { Path dir = new Path(new Path(primaryFsUri), "/dir"); @@ -1555,6 +1611,7 @@ public void testMultithreadedAppend() throws Exception { * * @throws Exception If failed. */ + @Test public void testMultithreadedOpen() throws Exception { final byte[] dataChunk = new byte[256]; @@ -1627,6 +1684,7 @@ public void run() { * * @throws Exception If failed. */ + @Test public void testMultithreadedMkdirs() throws Exception { final Path dir = new Path(new Path("igfs:///"), "/dir"); @@ -1707,6 +1765,7 @@ public void testMultithreadedMkdirs() throws Exception { * @throws Exception If failed. */ @SuppressWarnings("TooBroadScope") + @Test public void testMultithreadedDelete() throws Exception { final Path dir = new Path(new Path(primaryFsUri), "/dir"); @@ -1780,6 +1839,7 @@ public void testMultithreadedDelete() throws Exception { } /** @throws Exception If failed. */ + @Test public void testConsistency() throws Exception { // Default buffers values checkConsistency(-1, 1, -1, -1, 1, -1); @@ -1805,6 +1865,7 @@ public void testConsistency() throws Exception { * * @throws Exception If error occurs. */ + @Test public void testClientReconnect() throws Exception { final Path igfsHome = new Path(primaryFsUri); @@ -1850,6 +1911,7 @@ public void testClientReconnect() throws Exception { * * @throws Exception If error occurs. */ + @Test public void testClientReconnectMultithreaded() throws Exception { final ConcurrentLinkedQueue q = new ConcurrentLinkedQueue<>(); diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopIgfsDualAbstractSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopIgfsDualAbstractSelfTest.java index 3ffdf23cbb0fd..1c450f3bc9500 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopIgfsDualAbstractSelfTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopIgfsDualAbstractSelfTest.java @@ -51,6 +51,9 @@ import java.io.IOException; import java.net.URI; import java.util.concurrent.Callable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -66,6 +69,7 @@ /** * Tests for IGFS working in mode when remote file system exists: DUAL_SYNC, DUAL_ASYNC. */ +@RunWith(JUnit4.class) public abstract class HadoopIgfsDualAbstractSelfTest extends IgfsCommonAbstractTest { /** IGFS block size. */ protected static final int IGFS_BLOCK_SIZE = 512 * 1024; @@ -240,6 +244,7 @@ protected IgfsPath[] paths(IgfsPath... paths) { * * @throws Exception IF failed. */ + @Test public void testOpenPrefetchOverride() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR), paths(FILE)); @@ -324,4 +329,4 @@ public void testOpenPrefetchOverride() throws Exception { }, IOException.class, "Failed to read data due to secondary file system exception: /dir/subdir/file"); } -} \ No newline at end of file +} diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopSecondaryFileSystemConfigurationTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopSecondaryFileSystemConfigurationTest.java index 7cc5212152364..040071e6b3282 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopSecondaryFileSystemConfigurationTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopSecondaryFileSystemConfigurationTest.java @@ -53,6 +53,9 @@ import java.io.IOException; import java.net.URI; import java.util.concurrent.Callable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -67,6 +70,7 @@ /** * Tests secondary file system configuration. */ +@RunWith(JUnit4.class) public class HadoopSecondaryFileSystemConfigurationTest extends IgfsCommonAbstractTest { /** IGFS scheme */ static final String IGFS_SCHEME = "igfs"; @@ -420,6 +424,7 @@ private CommunicationSpi communicationSpi() { * * @throws Exception On failure. */ + @Test public void testFsConfigurationOnly() throws Exception { primaryCfgScheme = IGFS_SCHEME; primaryCfgAuthority = PRIMARY_AUTHORITY; @@ -441,6 +446,7 @@ public void testFsConfigurationOnly() throws Exception { * * @throws Exception On failure. */ + @Test public void testFsUriOverridesUriInConfiguration() throws Exception { // wrong primary URI in the configuration: primaryCfgScheme = "foo"; @@ -598,4 +604,4 @@ static String mkUri(String scheme, String authority) { static String mkUri(String scheme, String authority, String path) { return scheme + "://" + authority + "/" + path; } -} \ No newline at end of file +} diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgfsNearOnlyMultiNodeSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgfsNearOnlyMultiNodeSelfTest.java index 20699f195d613..6a07b756dab82 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgfsNearOnlyMultiNodeSelfTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgfsNearOnlyMultiNodeSelfTest.java @@ -43,6 +43,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -53,6 +56,7 @@ /** * Test hadoop file system implementation. */ +@RunWith(JUnit4.class) public class IgfsNearOnlyMultiNodeSelfTest extends GridCommonAbstractTest { /** Path to the default hadoop configuration. */ public static final String HADOOP_FS_CFG = "examples/config/filesystem/core-site.xml"; @@ -164,6 +168,7 @@ protected URI getFileSystemURI(int grid) { } /** @throws Exception If failed. */ + @Test public void testContentsConsistency() throws Exception { try (FileSystem fs = FileSystem.get(getFileSystemURI(0), getFileSystemConfig())) { Collection> files = F.asList( diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemAbstractSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemAbstractSelfTest.java index 6eef5985e995f..434074fe928e8 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemAbstractSelfTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemAbstractSelfTest.java @@ -87,6 +87,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -101,6 +104,7 @@ * Test hadoop file system implementation. */ @SuppressWarnings("all") +@RunWith(JUnit4.class) public abstract class IgniteHadoopFileSystemAbstractSelfTest extends IgfsCommonAbstractTest { /** Primary file system authority. */ private static final String PRIMARY_AUTHORITY = "igfs@"; @@ -451,6 +455,7 @@ protected FileSystemConfiguration igfsConfiguration(String igniteInstanceName) t } /** @throws Exception If failed. */ + @Test public void testGetUriIfFSIsNotInitialized() throws Exception { GridTestUtils.assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -462,6 +467,7 @@ public void testGetUriIfFSIsNotInitialized() throws Exception { /** @throws Exception If failed. */ @SuppressWarnings("NullableProblems") + @Test public void testInitializeCheckParametersNameIsNull() throws Exception { GridTestUtils.assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -474,6 +480,7 @@ public void testInitializeCheckParametersNameIsNull() throws Exception { /** @throws Exception If failed. */ @SuppressWarnings("NullableProblems") + @Test public void testInitializeCheckParametersCfgIsNull() throws Exception { GridTestUtils.assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -485,6 +492,7 @@ public void testInitializeCheckParametersCfgIsNull() throws Exception { } /** @throws Exception If failed. */ + @Test public void testInitialize() throws Exception { final IgniteHadoopFileSystem fs = new IgniteHadoopFileSystem(); @@ -512,6 +520,7 @@ public void testInitialize() throws Exception { * * @throws Exception If failed. */ + @Test public void testIpcCache() throws Exception { HadoopIgfsEx hadoop = GridTestUtils.getFieldValue(fs, "rmtClient", "delegateRef", "value", "hadoop"); @@ -576,6 +585,7 @@ public void testIpcCache() throws Exception { } /** @throws Exception If failed. */ + @Test public void testCloseIfNotInitialized() throws Exception { final FileSystem fs = new IgniteHadoopFileSystem(); @@ -584,6 +594,7 @@ public void testCloseIfNotInitialized() throws Exception { } /** @throws Exception If failed. */ + @Test public void testClose() throws Exception { final Path path = new Path("dir"); @@ -672,6 +683,7 @@ public void testClose() throws Exception { } /** @throws Exception If failed. */ + @Test public void testCreateCheckParameters() throws Exception { GridTestUtils.assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -682,6 +694,7 @@ public void testCreateCheckParameters() throws Exception { /** @throws Exception If failed. */ @SuppressWarnings("deprecation") + @Test public void testCreateBase() throws Exception { Path fsHome = new Path(primaryFsUri); Path dir = new Path(fsHome, "/someDir1/someDir2/someDir3"); @@ -708,6 +721,7 @@ public void testCreateBase() throws Exception { /** @throws Exception If failed. */ @SuppressWarnings("deprecation") + @Test public void testCreateCheckOverwrite() throws Exception { Path fsHome = new Path(primaryFsUri); Path dir = new Path(fsHome, "/someDir1/someDir2/someDir3"); @@ -736,6 +750,7 @@ public void testCreateCheckOverwrite() throws Exception { } /** @throws Exception If failed. */ + @Test public void testDeleteIfNoSuchPath() throws Exception { Path fsHome = new Path(primaryFsUri); Path dir = new Path(fsHome, "/someDir1/someDir2/someDir3"); @@ -746,6 +761,7 @@ public void testDeleteIfNoSuchPath() throws Exception { } /** @throws Exception If failed. */ + @Test public void testDeleteSuccessfulIfPathIsOpenedToRead() throws Exception { Path fsHome = new Path(primaryFsUri); final Path file = new Path(fsHome, "myFile"); @@ -772,6 +788,7 @@ public void testDeleteSuccessfulIfPathIsOpenedToRead() throws Exception { } /** @throws Exception If failed. */ + @Test public void testDeleteIfFilePathExists() throws Exception { Path fsHome = new Path(primaryFsUri); Path file = new Path(fsHome, "myFile"); @@ -786,6 +803,7 @@ public void testDeleteIfFilePathExists() throws Exception { } /** @throws Exception If failed. */ + @Test public void testDeleteIfDirectoryPathExists() throws Exception { Path fsHome = new Path(primaryFsUri); Path dir = new Path(fsHome, "/someDir1/someDir2/someDir3"); @@ -800,6 +818,7 @@ public void testDeleteIfDirectoryPathExists() throws Exception { } /** @throws Exception If failed. */ + @Test public void testDeleteFailsIfNonRecursive() throws Exception { Path fsHome = new Path(primaryFsUri); Path someDir3 = new Path(fsHome, "/someDir1/someDir2/someDir3"); @@ -815,6 +834,7 @@ public void testDeleteFailsIfNonRecursive() throws Exception { } /** @throws Exception If failed. */ + @Test public void testDeleteRecursively() throws Exception { Path fsHome = new Path(primaryFsUri); Path someDir3 = new Path(fsHome, "/someDir1/someDir2/someDir3"); @@ -832,6 +852,7 @@ public void testDeleteRecursively() throws Exception { } /** @throws Exception If failed. */ + @Test public void testDeleteRecursivelyFromRoot() throws Exception { Path fsHome = new Path(primaryFsUri); Path someDir3 = new Path(fsHome, "/someDir1/someDir2/someDir3"); @@ -853,6 +874,7 @@ public void testDeleteRecursivelyFromRoot() throws Exception { /** @throws Exception If failed. */ @SuppressWarnings("deprecation") + @Test public void testSetPermissionCheckDefaultPermission() throws Exception { Path fsHome = new Path(primaryFsUri); Path file = new Path(fsHome, "/tmp/my"); @@ -870,6 +892,7 @@ public void testSetPermissionCheckDefaultPermission() throws Exception { /** @throws Exception If failed. */ @SuppressWarnings("deprecation") + @Test public void testSetPermissionCheckNonRecursiveness() throws Exception { Path fsHome = new Path(primaryFsUri); Path file = new Path(fsHome, "/tmp/my"); @@ -891,6 +914,7 @@ public void testSetPermissionCheckNonRecursiveness() throws Exception { /** @throws Exception If failed. */ @SuppressWarnings("OctalInteger") + @Test public void testSetPermission() throws Exception { Path fsHome = new Path(primaryFsUri); Path file = new Path(fsHome, "/tmp/my"); @@ -909,6 +933,7 @@ public void testSetPermission() throws Exception { } /** @throws Exception If failed. */ + @Test public void testSetPermissionIfOutputStreamIsNotClosed() throws Exception { Path fsHome = new Path(primaryFsUri); Path file = new Path(fsHome, "myFile"); @@ -925,6 +950,7 @@ public void testSetPermissionIfOutputStreamIsNotClosed() throws Exception { } /** @throws Exception If failed. */ + @Test public void testSetOwnerCheckParametersPathIsNull() throws Exception { Path fsHome = new Path(primaryFsUri); final Path file = new Path(fsHome, "/tmp/my"); @@ -943,6 +969,7 @@ public void testSetOwnerCheckParametersPathIsNull() throws Exception { } /** @throws Exception If failed. */ + @Test public void testSetOwnerCheckParametersUserIsNull() throws Exception { Path fsHome = new Path(primaryFsUri); final Path file = new Path(fsHome, "/tmp/my"); @@ -961,6 +988,7 @@ public void testSetOwnerCheckParametersUserIsNull() throws Exception { } /** @throws Exception If failed. */ + @Test public void testSetOwnerCheckParametersGroupIsNull() throws Exception { Path fsHome = new Path(primaryFsUri); final Path file = new Path(fsHome, "/tmp/my"); @@ -979,6 +1007,7 @@ public void testSetOwnerCheckParametersGroupIsNull() throws Exception { } /** @throws Exception If failed. */ + @Test public void testSetOwner() throws Exception { Path fsHome = new Path(primaryFsUri); final Path file = new Path(fsHome, "/tmp/my"); @@ -998,6 +1027,7 @@ public void testSetOwner() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSetTimes() throws Exception { Path fsHome = new Path(primaryFsUri); final Path file = new Path(fsHome, "/heartbeatTs"); @@ -1041,6 +1071,7 @@ public void testSetTimes() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSetOwnerIfOutputStreamIsNotClosed() throws Exception { Path fsHome = new Path(primaryFsUri); Path file = new Path(fsHome, "myFile"); @@ -1056,6 +1087,7 @@ public void testSetOwnerIfOutputStreamIsNotClosed() throws Exception { } /** @throws Exception If failed. */ + @Test public void testSetOwnerCheckNonRecursiveness() throws Exception { Path fsHome = new Path(primaryFsUri); Path file = new Path(fsHome, "/tmp/my"); @@ -1077,6 +1109,7 @@ public void testSetOwnerCheckNonRecursiveness() throws Exception { } /** @throws Exception If failed. */ + @Test public void testOpenCheckParametersPathIsNull() throws Exception { GridTestUtils.assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -1086,6 +1119,7 @@ public void testOpenCheckParametersPathIsNull() throws Exception { } /** @throws Exception If failed. */ + @Test public void testOpenNoSuchPath() throws Exception { Path fsHome = new Path(primaryFsUri); final Path file = new Path(fsHome, "someFile"); @@ -1098,6 +1132,7 @@ public void testOpenNoSuchPath() throws Exception { } /** @throws Exception If failed. */ + @Test public void testOpenIfPathIsAlreadyOpened() throws Exception { Path fsHome = new Path(primaryFsUri); Path file = new Path(fsHome, "someFile"); @@ -1114,6 +1149,7 @@ public void testOpenIfPathIsAlreadyOpened() throws Exception { } /** @throws Exception If failed. */ + @Test public void testOpen() throws Exception { Path fsHome = new Path(primaryFsUri); Path file = new Path(fsHome, "someFile"); @@ -1136,6 +1172,7 @@ public void testOpen() throws Exception { } /** @throws Exception If failed. */ + @Test public void testAppendCheckParametersPathIsNull() throws Exception { GridTestUtils.assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -1145,6 +1182,7 @@ public void testAppendCheckParametersPathIsNull() throws Exception { } /** @throws Exception If failed. */ + @Test public void testAppendIfPathPointsToDirectory() throws Exception { final Path fsHome = new Path(primaryFsUri); final Path dir = new Path(fsHome, "/tmp"); @@ -1162,6 +1200,7 @@ public void testAppendIfPathPointsToDirectory() throws Exception { } /** @throws Exception If failed. */ + @Test public void testAppendIfFileIsAlreadyBeingOpenedToWrite() throws Exception { Path fsHome = new Path(primaryFsUri); final Path file = new Path(fsHome, "someFile"); @@ -1182,6 +1221,7 @@ public void testAppendIfFileIsAlreadyBeingOpenedToWrite() throws Exception { } /** @throws Exception If failed. */ + @Test public void testAppend() throws Exception { Path fsHome = new Path(primaryFsUri); Path file = new Path(fsHome, "someFile"); @@ -1211,6 +1251,7 @@ public void testAppend() throws Exception { } /** @throws Exception If failed. */ + @Test public void testRenameCheckParametersSrcPathIsNull() throws Exception { Path fsHome = new Path(primaryFsUri); final Path file = new Path(fsHome, "someFile"); @@ -1223,6 +1264,7 @@ public void testRenameCheckParametersSrcPathIsNull() throws Exception { } /** @throws Exception If failed. */ + @Test public void testRenameCheckParametersDstPathIsNull() throws Exception { Path fsHome = new Path(primaryFsUri); final Path file = new Path(fsHome, "someFile"); @@ -1236,6 +1278,7 @@ public Object call() throws Exception { } /** @throws Exception If failed. */ + @Test public void testRenameIfSrcPathDoesNotExist() throws Exception { Path fsHome = new Path(primaryFsUri); Path srcFile = new Path(fsHome, "srcFile"); @@ -1249,6 +1292,7 @@ public void testRenameIfSrcPathDoesNotExist() throws Exception { } /** @throws Exception If failed. */ + @Test public void testRenameIfSrcPathIsAlreadyBeingOpenedToWrite() throws Exception { Path fsHome = new Path(primaryFsUri); Path srcFile = new Path(fsHome, "srcFile"); @@ -1283,6 +1327,7 @@ public void testRenameIfSrcPathIsAlreadyBeingOpenedToWrite() throws Exception { } /** @throws Exception If failed. */ + @Test public void testRenameFileIfDstPathExists() throws Exception { Path fsHome = new Path(primaryFsUri); Path srcFile = new Path(fsHome, "srcFile"); @@ -1303,6 +1348,7 @@ public void testRenameFileIfDstPathExists() throws Exception { } /** @throws Exception If failed. */ + @Test public void testRenameFile() throws Exception { Path fsHome = new Path(primaryFsUri); Path srcFile = new Path(fsHome, "/tmp/srcFile"); @@ -1319,6 +1365,7 @@ public void testRenameFile() throws Exception { } /** @throws Exception If failed. */ + @Test public void testRenameIfSrcPathIsAlreadyBeingOpenedToRead() throws Exception { Path fsHome = new Path(primaryFsUri); Path srcFile = new Path(fsHome, "srcFile"); @@ -1351,6 +1398,7 @@ public void testRenameIfSrcPathIsAlreadyBeingOpenedToRead() throws Exception { } /** @throws Exception If failed. */ + @Test public void testRenameDirectoryIfDstPathExists() throws Exception { Path fsHome = new Path(primaryFsUri); Path srcDir = new Path(fsHome, "/tmp/"); @@ -1372,6 +1420,7 @@ public void testRenameDirectoryIfDstPathExists() throws Exception { } /** @throws Exception If failed. */ + @Test public void testRenameDirectory() throws Exception { Path fsHome = new Path(primaryFsUri); Path dir = new Path(fsHome, "/tmp/"); @@ -1388,6 +1437,7 @@ public void testRenameDirectory() throws Exception { } /** @throws Exception If failed. */ + @Test public void testListStatusIfPathIsNull() throws Exception { GridTestUtils.assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -1397,6 +1447,7 @@ public void testListStatusIfPathIsNull() throws Exception { } /** @throws Exception If failed. */ + @Test public void testListStatusIfPathDoesNotExist() throws Exception { GridTestUtils.assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -1410,6 +1461,7 @@ public void testListStatusIfPathDoesNotExist() throws Exception { * * @throws Exception If failed. */ + @Test public void testListStatus() throws Exception { Path igfsHome = new Path(PRIMARY_URI); @@ -1452,6 +1504,7 @@ public void testListStatus() throws Exception { } /** @throws Exception If failed. */ + @Test public void testSetWorkingDirectoryIfPathIsNull() throws Exception { fs.setWorkingDirectory(null); @@ -1466,12 +1519,14 @@ public void testSetWorkingDirectoryIfPathIsNull() throws Exception { } /** @throws Exception If failed. */ + @Test public void testSetWorkingDirectoryIfPathDoesNotExist() throws Exception { // Should not throw any exceptions. fs.setWorkingDirectory(new Path("/someDir")); } /** @throws Exception If failed. */ + @Test public void testSetWorkingDirectory() throws Exception { Path dir = new Path("/tmp/nested/dir"); Path file = new Path("file"); @@ -1489,6 +1544,7 @@ public void testSetWorkingDirectory() throws Exception { } /** @throws Exception If failed. */ + @Test public void testGetWorkingDirectoryIfDefault() throws Exception { String path = fs.getWorkingDirectory().toString(); @@ -1496,6 +1552,7 @@ public void testGetWorkingDirectoryIfDefault() throws Exception { } /** @throws Exception If failed. */ + @Test public void testGetWorkingDirectory() throws Exception { Path dir = new Path("/tmp/some/dir"); @@ -1509,6 +1566,7 @@ public void testGetWorkingDirectory() throws Exception { } /** @throws Exception If failed. */ + @Test public void testMkdirsIfPathIsNull() throws Exception { GridTestUtils.assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -1518,6 +1576,7 @@ public void testMkdirsIfPathIsNull() throws Exception { } /** @throws Exception If failed. */ + @Test public void testMkdirsIfPermissionIsNull() throws Exception { Path dir = new Path("/tmp"); @@ -1528,6 +1587,7 @@ public void testMkdirsIfPermissionIsNull() throws Exception { /** @throws Exception If failed. */ @SuppressWarnings("OctalInteger") + @Test public void testMkdirs() throws Exception { Path fsHome = new Path(PRIMARY_URI); final Path dir = new Path(fsHome, "/tmp/staging"); @@ -1547,6 +1607,7 @@ public void testMkdirs() throws Exception { } /** @throws Exception If failed. */ + @Test public void testGetFileStatusIfPathIsNull() throws Exception { GridTestUtils.assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -1556,6 +1617,7 @@ public void testGetFileStatusIfPathIsNull() throws Exception { } /** @throws Exception If failed. */ + @Test public void testGetFileStatusIfPathDoesNotExist() throws Exception { GridTestUtils.assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -1565,6 +1627,7 @@ public void testGetFileStatusIfPathDoesNotExist() throws Exception { } /** @throws Exception If failed. */ + @Test public void testGetFileBlockLocationsIfFileStatusIsNull() throws Exception { GridTestUtils.assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -1575,6 +1638,7 @@ public void testGetFileBlockLocationsIfFileStatusIsNull() throws Exception { } /** @throws Exception If failed. */ + @Test public void testGetFileBlockLocationsIfFileStatusReferenceNotExistingPath() throws Exception { Path path = new Path("someFile"); @@ -1590,6 +1654,7 @@ public void testGetFileBlockLocationsIfFileStatusReferenceNotExistingPath() thro } /** @throws Exception If failed. */ + @Test public void testGetFileBlockLocations() throws Exception { Path igfsHome = new Path(PRIMARY_URI); @@ -1628,11 +1693,13 @@ public void testGetFileBlockLocations() throws Exception { /** @throws Exception If failed. */ @SuppressWarnings("deprecation") + @Test public void testGetDefaultBlockSize() throws Exception { assertEquals(1L << 26, fs.getDefaultBlockSize()); } /** @throws Exception If failed. */ + @Test public void testZeroReplicationFactor() throws Exception { // This test doesn't make sense for any mode except of PRIMARY. if (mode == PRIMARY) { @@ -1667,6 +1734,7 @@ public void testZeroReplicationFactor() throws Exception { * * @throws Exception If failed. */ + @Test public void testMultithreadedCreate() throws Exception { Path dir = new Path(new Path(PRIMARY_URI), "/dir"); @@ -1751,6 +1819,7 @@ public void run() { * * @throws Exception If failed. */ + @Test public void testMultithreadedAppend() throws Exception { Path dir = new Path(new Path(PRIMARY_URI), "/dir"); @@ -1835,6 +1904,7 @@ public void testMultithreadedAppend() throws Exception { * * @throws Exception If failed. */ + @Test public void testMultithreadedOpen() throws Exception { final byte[] dataChunk = new byte[256]; @@ -1906,6 +1976,7 @@ public void run() { * * @throws Exception If failed. */ + @Test public void testMultithreadedMkdirs() throws Exception { final Path dir = new Path(new Path(PRIMARY_URI), "/dir"); @@ -1985,6 +2056,7 @@ public void testMultithreadedMkdirs() throws Exception { * @throws Exception If failed. */ @SuppressWarnings("TooBroadScope") + @Test public void testMultithreadedDelete() throws Exception { final Path dir = new Path(new Path(PRIMARY_URI), "/dir"); @@ -2058,6 +2130,7 @@ public void testMultithreadedDelete() throws Exception { } /** @throws Exception If failed. */ + @Test public void testConsistency() throws Exception { // Default buffers values checkConsistency(-1, 1, -1, -1, 1, -1); @@ -2083,6 +2156,7 @@ public void testConsistency() throws Exception { * * @throws Exception If error occurs. */ + @Test public void testClientReconnect() throws Exception { Path filePath = new Path(PRIMARY_URI, "file1"); @@ -2117,6 +2191,7 @@ public void testClientReconnect() throws Exception { /** * @throws Exception If failed. */ + @Test public void testModeResolver() throws Exception { IgfsModeResolver mr = ((IgniteHadoopFileSystem)fs).getModeResolver(); @@ -2128,6 +2203,7 @@ public void testModeResolver() throws Exception { * * @throws Exception If error occurs. */ + @Test public void testClientReconnectMultithreaded() throws Exception { final ConcurrentLinkedQueue q = new ConcurrentLinkedQueue<>(); @@ -2506,4 +2582,4 @@ protected Configuration configurationSecondary(String authority) { return cfg; } -} \ No newline at end of file +} diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemClientBasedAbstractSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemClientBasedAbstractSelfTest.java index 8198cd3243b7b..eb743476d5ef9 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemClientBasedAbstractSelfTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemClientBasedAbstractSelfTest.java @@ -31,10 +31,14 @@ import org.apache.ignite.igfs.IgfsMode; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * IGFS Hadoop file system Ignite client -based self test. */ +@RunWith(JUnit4.class) public abstract class IgniteHadoopFileSystemClientBasedAbstractSelfTest extends IgniteHadoopFileSystemAbstractSelfTest { /** Alive node index. */ private static final int ALIVE_NODE_IDX = GRID_COUNT - 1; @@ -88,6 +92,7 @@ public abstract class IgniteHadoopFileSystemClientBasedAbstractSelfTest extends } /** {@inheritDoc} */ + @Test @Override public void testClientReconnect() throws Exception { Path filePath = new Path(PRIMARY_URI, "file1"); @@ -115,6 +120,7 @@ public abstract class IgniteHadoopFileSystemClientBasedAbstractSelfTest extends * * @throws Exception If error occurs. */ + @Test @Override public void testClientReconnectMultithreaded() throws Exception { final ConcurrentLinkedQueue q = new ConcurrentLinkedQueue<>(); @@ -190,4 +196,4 @@ private void startAllNodesExcept(int nodeIdx) throws Exception { if (i != nodeIdx) startGrid(i); } -} \ No newline at end of file +} diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemClientBasedOpenTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemClientBasedOpenTest.java index 700cc6418c293..d141d8e26c955 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemClientBasedOpenTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemClientBasedOpenTest.java @@ -32,10 +32,14 @@ import org.apache.ignite.internal.util.typedef.internal.S; import org.apache.ignite.lang.IgniteBiTuple; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * IGFS Hadoop file system Ignite client -based self test for PROXY mode. */ +@RunWith(JUnit4.class) public class IgniteHadoopFileSystemClientBasedOpenTest extends GridCommonAbstractTest { /** Config root path. */ private static final String [] CONFIGS = { @@ -164,6 +168,7 @@ private static String authority(int idx) { /** * @throws Exception If failed. */ + @Test public void testFsOpenMultithreaded() throws Exception { skipInProc = false; @@ -193,6 +198,7 @@ private void checkFsOpenWithAllNodesTypes() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFsOpenMultithreadedSkipInProc() throws Exception { skipInProc = true; @@ -202,6 +208,7 @@ public void testFsOpenMultithreadedSkipInProc() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIgniteClientWithIgfsMisconfigure() throws Exception { startNodes(new NodeType[] {NodeType.REMOTE, NodeType.REMOTE, NodeType.REMOTE}); diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemClientSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemClientSelfTest.java index 96ef6bbbdf6bc..5ee95b0726ab8 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemClientSelfTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemClientSelfTest.java @@ -45,6 +45,9 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -55,6 +58,7 @@ /** * Test interaction between a IGFS client and a IGFS server. */ +@RunWith(JUnit4.class) public class IgniteHadoopFileSystemClientSelfTest extends IgfsCommonAbstractTest { /** Logger. */ private static final Log LOG = LogFactory.getLog(IgniteHadoopFileSystemClientSelfTest.class); @@ -139,6 +143,7 @@ protected CacheConfiguration metaCacheConfiguration() { * * @throws Exception If failed. */ + @Test public void testOutputStreamDeferredException() throws Exception { final byte[] data = "test".getBytes(); diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemHandshakeSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemHandshakeSelfTest.java index cab318c039e3b..7acc359260e3d 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemHandshakeSelfTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemHandshakeSelfTest.java @@ -40,6 +40,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -54,6 +57,7 @@ /** * Tests for IGFS file system handshake. */ +@RunWith(JUnit4.class) public class IgniteHadoopFileSystemHandshakeSelfTest extends IgfsCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -83,6 +87,7 @@ public class IgniteHadoopFileSystemHandshakeSelfTest extends IgfsCommonAbstractT * * @throws Exception If failed. */ + @Test public void testHandshake() throws Exception { startUp(false, false); @@ -111,6 +116,7 @@ public void testHandshake() throws Exception { * * @throws Exception If failed. */ + @Test public void testHandshakeDefaultGrid() throws Exception { startUp(true, false); @@ -279,4 +285,4 @@ private static Configuration configuration(String authority, boolean tcp) { return cfg; } -} \ No newline at end of file +} diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemIpcCacheSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemIpcCacheSelfTest.java index e9de332511638..397e687282af3 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemIpcCacheSelfTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemIpcCacheSelfTest.java @@ -38,6 +38,9 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -49,6 +52,7 @@ /** * IPC cache test. */ +@RunWith(JUnit4.class) public class IgniteHadoopFileSystemIpcCacheSelfTest extends IgfsCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -155,6 +159,7 @@ private CacheConfiguration metaCacheConfiguration() { * @throws Exception If failed. */ @SuppressWarnings("unchecked") + @Test public void testIpcCache() throws Exception { Field cacheField = HadoopIgfsIpcIo.class.getDeclaredField("ipcCache"); @@ -221,4 +226,4 @@ public void testIpcCache() throws Exception { assert (Boolean)stopField.get(io); } -} \ No newline at end of file +} diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemLoggerSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemLoggerSelfTest.java index 6de033f274419..22c66b14859db 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemLoggerSelfTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemLoggerSelfTest.java @@ -30,6 +30,9 @@ import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.igfs.common.IgfsLogger.DELIM_FIELD; import static org.apache.ignite.internal.igfs.common.IgfsLogger.DELIM_FIELD_VAL; @@ -51,6 +54,7 @@ /** * Grid IGFS client logger test. */ +@RunWith(JUnit4.class) public class IgniteHadoopFileSystemLoggerSelfTest extends IgfsCommonAbstractTest { /** Path string. */ private static final String PATH_STR = "/dir1/dir2/file;test"; @@ -107,6 +111,7 @@ private void removeLogs() throws Exception { * * @throws Exception If failed. */ + @Test public void testCreateDelete() throws Exception { IgfsLogger log = IgfsLogger.logger(ENDPOINT, IGFS_NAME, LOG_DIR, 10); @@ -162,6 +167,7 @@ public void testCreateDelete() throws Exception { * * @throws Exception If failed. */ + @Test public void testLogRead() throws Exception { IgfsLogger log = IgfsLogger.logger(ENDPOINT, IGFS_NAME, LOG_DIR, 10); @@ -192,6 +198,7 @@ public void testLogRead() throws Exception { * * @throws Exception If failed. */ + @Test public void testLogWrite() throws Exception { IgfsLogger log = IgfsLogger.logger(ENDPOINT, IGFS_NAME, LOG_DIR, 10); @@ -217,6 +224,7 @@ public void testLogWrite() throws Exception { * @throws Exception If failed. */ @SuppressWarnings("TooBroadScope") + @Test public void testLogMisc() throws Exception { IgfsLogger log = IgfsLogger.logger(ENDPOINT, IGFS_NAME, LOG_DIR, 10); @@ -296,4 +304,4 @@ private String d(int cnt) { return buf.toString(); } -} \ No newline at end of file +} diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemLoggerStateSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemLoggerStateSelfTest.java index 9eeff33f3f2af..1eadea1b75afe 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemLoggerStateSelfTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemLoggerStateSelfTest.java @@ -38,6 +38,9 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -49,6 +52,7 @@ /** * Ensures that sampling is really turned on/off. */ +@RunWith(JUnit4.class) public class IgniteHadoopFileSystemLoggerStateSelfTest extends IgfsCommonAbstractTest { /** IGFS. */ private IgfsEx igfs; @@ -142,6 +146,7 @@ private void startUp() throws Exception { * * @throws Exception If failed. */ + @Test public void testLoggingDisabledSamplingNotSet() throws Exception { startUp(); @@ -153,6 +158,7 @@ public void testLoggingDisabledSamplingNotSet() throws Exception { * * @throws Exception If failed. */ + @Test public void testLoggingEnabledSamplingNotSet() throws Exception { logging = true; @@ -166,6 +172,7 @@ public void testLoggingEnabledSamplingNotSet() throws Exception { * * @throws Exception If failed. */ + @Test public void testLoggingDisabledSamplingDisabled() throws Exception { sampling = false; @@ -179,6 +186,7 @@ public void testLoggingDisabledSamplingDisabled() throws Exception { * * @throws Exception If failed. */ + @Test public void testLoggingEnabledSamplingDisabled() throws Exception { logging = true; sampling = false; @@ -193,6 +201,7 @@ public void testLoggingEnabledSamplingDisabled() throws Exception { * * @throws Exception If failed. */ + @Test public void testLoggingDisabledSamplingEnabled() throws Exception { sampling = true; @@ -206,6 +215,7 @@ public void testLoggingDisabledSamplingEnabled() throws Exception { * * @throws Exception If failed. */ + @Test public void testLoggingEnabledSamplingEnabled() throws Exception { logging = true; sampling = true; @@ -220,6 +230,7 @@ public void testLoggingEnabledSamplingEnabled() throws Exception { * * @throws Exception If failed. */ + @Test public void testSamplingChange() throws Exception { // Start with sampling not set. startUp(); @@ -286,6 +297,7 @@ public void testSamplingChange() throws Exception { * @throws Exception If failed. */ @SuppressWarnings("ConstantConditions") + @Test public void testLogDirectory() throws Exception { startUp(); @@ -329,4 +341,4 @@ private boolean logEnabled() throws Exception { return ((IgfsLogger)field.get(fs)).isLogEnabled(); } -} \ No newline at end of file +} diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemShmemAbstractSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemShmemAbstractSelfTest.java index 1c75cfb3b9dfe..6850e720cbf8c 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemShmemAbstractSelfTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemShmemAbstractSelfTest.java @@ -28,12 +28,16 @@ import org.apache.ignite.internal.util.ipc.IpcEndpointFactory; import org.apache.ignite.internal.util.typedef.X; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.util.ipc.shmem.IpcSharedMemoryServerEndpoint.DFLT_IPC_PORT; /** * IGFS Hadoop file system IPC self test. */ +@RunWith(JUnit4.class) public abstract class IgniteHadoopFileSystemShmemAbstractSelfTest extends IgniteHadoopFileSystemAbstractSelfTest { /** * Constructor. @@ -61,6 +65,7 @@ protected IgniteHadoopFileSystemShmemAbstractSelfTest(IgfsMode mode, boolean ski * * @throws Exception If error occurred. */ + @Test public void testOutOfResources() throws Exception { final Collection eps = new LinkedList<>(); @@ -90,4 +95,4 @@ public void testOutOfResources() throws Exception { ep.close(); } } -} \ No newline at end of file +} diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemShmemExternalToClientAbstractSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemShmemExternalToClientAbstractSelfTest.java index bef23c0710bde..24bab6b2817ac 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemShmemExternalToClientAbstractSelfTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemShmemExternalToClientAbstractSelfTest.java @@ -29,12 +29,16 @@ import org.apache.ignite.internal.util.ipc.IpcEndpointFactory; import org.apache.ignite.internal.util.typedef.X; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.util.ipc.shmem.IpcSharedMemoryServerEndpoint.DFLT_IPC_PORT; /** * IGFS Hadoop file system IPC self test. */ +@RunWith(JUnit4.class) public abstract class IgniteHadoopFileSystemShmemExternalToClientAbstractSelfTest extends IgniteHadoopFileSystemAbstractSelfTest { /** @@ -73,6 +77,7 @@ protected IgniteHadoopFileSystemShmemExternalToClientAbstractSelfTest(IgfsMode m * * @throws Exception If error occurred. */ + @Test public void testOutOfResources() throws Exception { final Collection eps = new LinkedList<>(); @@ -102,4 +107,4 @@ public void testOutOfResources() throws Exception { ep.close(); } } -} \ No newline at end of file +} diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/shuffle/collections/HadoopConcurrentHashMultimapSelftest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/shuffle/collections/HadoopConcurrentHashMultimapSelftest.java index 7862d6eff3595..82cf90e63a4c2 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/shuffle/collections/HadoopConcurrentHashMultimapSelftest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/shuffle/collections/HadoopConcurrentHashMultimapSelftest.java @@ -43,12 +43,17 @@ import org.apache.ignite.internal.util.io.GridUnsafeDataInput; import org.apache.ignite.internal.util.offheap.unsafe.GridUnsafeMemory; import org.apache.ignite.internal.util.typedef.X; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class HadoopConcurrentHashMultimapSelftest extends HadoopAbstractMapTest { /** */ + @Test public void testMapSimple() throws Exception { GridUnsafeMemory mem = new GridUnsafeMemory(0); @@ -185,6 +190,7 @@ private void read(long ptr, int size, Writable w) { /** * @throws Exception if failed. */ + @Test public void testMultiThreaded() throws Exception { GridUnsafeMemory mem = new GridUnsafeMemory(0); @@ -277,4 +283,4 @@ public void testMultiThreaded() throws Exception { assertEquals(0, mem.allocatedSize()); } } -} \ No newline at end of file +} diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/shuffle/collections/HadoopHashMapSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/shuffle/collections/HadoopHashMapSelfTest.java index 195bcbbfcb752..9adb4961a925c 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/shuffle/collections/HadoopHashMapSelfTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/shuffle/collections/HadoopHashMapSelfTest.java @@ -33,16 +33,21 @@ import java.util.Iterator; import java.util.Map; import java.util.Random; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class HadoopHashMapSelfTest extends HadoopAbstractMapTest { /** * Test simple map. * * @throws Exception If failed. */ + @Test public void testMapSimple() throws Exception { GridUnsafeMemory mem = new GridUnsafeMemory(0); @@ -130,4 +135,4 @@ private GridLongList sorted(Collection col) { return lst.sort(); } -} \ No newline at end of file +} diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/shuffle/collections/HadoopSkipListSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/shuffle/collections/HadoopSkipListSelfTest.java index 21575c545bdb4..720a18782d139 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/shuffle/collections/HadoopSkipListSelfTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/shuffle/collections/HadoopSkipListSelfTest.java @@ -43,14 +43,19 @@ import org.apache.ignite.internal.util.io.GridUnsafeDataInput; import org.apache.ignite.internal.util.offheap.unsafe.GridUnsafeMemory; import org.apache.ignite.internal.util.typedef.X; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Skip list tests. */ +@RunWith(JUnit4.class) public class HadoopSkipListSelfTest extends HadoopAbstractMapTest { /** * @throws Exception On error. */ + @Test public void testMapSimple() throws Exception { GridUnsafeMemory mem = new GridUnsafeMemory(0); @@ -200,6 +205,7 @@ private void read(long ptr, int size, Writable w) { /** * @throws Exception if failed. */ + @Test public void testMultiThreaded() throws Exception { GridUnsafeMemory mem = new GridUnsafeMemory(0); @@ -292,4 +298,4 @@ public void testMultiThreaded() throws Exception { assertEquals(0, mem.allocatedSize()); } } -} \ No newline at end of file +} diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/shuffle/streams/HadoopDataStreamSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/shuffle/streams/HadoopDataStreamSelfTest.java index c7d4dce0fdec1..eb011ef3ef8d5 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/shuffle/streams/HadoopDataStreamSelfTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/shuffle/streams/HadoopDataStreamSelfTest.java @@ -34,16 +34,21 @@ import org.apache.ignite.internal.util.offheap.unsafe.GridUnsafeMemory; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class HadoopDataStreamSelfTest extends GridCommonAbstractTest { private static final int BUFF_SIZE = 4 * 1024; /** * @throws IOException If failed. */ + @Test public void testStreams() throws IOException { GridUnsafeMemory mem = new GridUnsafeMemory(0); @@ -65,6 +70,7 @@ public void testStreams() throws IOException { /** * @throws IOException If failed. */ + @Test public void testDirectStreams() throws IOException { HadoopDirectDataOutput out = new HadoopDirectDataOutput(BUFF_SIZE); @@ -80,6 +86,7 @@ public void testDirectStreams() throws IOException { /** * @throws IOException If failed. */ + @Test public void testReadline() throws IOException { checkReadLine("String1\rString2\r\nString3\nString4"); checkReadLine("String1\rString2\r\nString3\nString4\r\n"); @@ -295,4 +302,4 @@ private void checkRead(DataInput in) throws IOException { assertEquals("mom washes rum", in.readUTF()); } -} \ No newline at end of file +} diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/taskexecutor/HadoopExecutorServiceTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/taskexecutor/HadoopExecutorServiceTest.java index 171da85ac3a57..119f6e5978bfe 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/taskexecutor/HadoopExecutorServiceTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/taskexecutor/HadoopExecutorServiceTest.java @@ -25,10 +25,14 @@ import java.util.concurrent.Callable; import java.util.concurrent.atomic.LongAdder; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class HadoopExecutorServiceTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected FailureHandler getFailureHandler(String igniteInstanceName) { @@ -38,6 +42,7 @@ public class HadoopExecutorServiceTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testExecutesAll() throws Exception { final HadoopExecutorService exec = new HadoopExecutorService(log, "_GRID_NAME_", 10, 5); @@ -76,4 +81,4 @@ public void testExecutesAll() throws Exception { assertTrue(exec.shutdown(0)); } -} \ No newline at end of file +} diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/taskexecutor/external/HadoopExternalTaskExecutionSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/taskexecutor/external/HadoopExternalTaskExecutionSelfTest.java index 12460787702df..84fb7fc16c5ca 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/taskexecutor/external/HadoopExternalTaskExecutionSelfTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/taskexecutor/external/HadoopExternalTaskExecutionSelfTest.java @@ -41,12 +41,16 @@ import org.apache.ignite.internal.processors.hadoop.HadoopJobId; import org.apache.ignite.internal.util.typedef.X; import org.apache.ignite.marshaller.jdk.JdkMarshaller; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.processors.hadoop.impl.HadoopUtils.createJobInfo; /** * Job tracker self test. */ +@RunWith(JUnit4.class) public class HadoopExternalTaskExecutionSelfTest extends HadoopAbstractSelfTest { /** {@inheritDoc} */ @Override protected boolean igfsEnabled() { @@ -89,6 +93,7 @@ public class HadoopExternalTaskExecutionSelfTest extends HadoopAbstractSelfTest /** * @throws Exception If failed. */ + @Test public void testSimpleTaskSubmit() throws Exception { String testInputFile = "/test"; @@ -125,6 +130,7 @@ public void testSimpleTaskSubmit() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMapperException() throws Exception { String testInputFile = "/test"; @@ -231,4 +237,4 @@ private static class TestReducer extends Reducer()); } @@ -83,6 +89,7 @@ private void checkNullOrEmptyMappings(@Nullable Map map) throws * * @throws Exception If failed. */ + @Test public void testMappings() throws Exception { Map map = new HashMap<>(); diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/util/ChainedUserNameMapperSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/util/ChainedUserNameMapperSelfTest.java index 0434ebb109ea4..a839654a1a493 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/util/ChainedUserNameMapperSelfTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/util/ChainedUserNameMapperSelfTest.java @@ -28,10 +28,14 @@ import java.util.Collections; import java.util.concurrent.Callable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for chained user name mapper. */ +@RunWith(JUnit4.class) public class ChainedUserNameMapperSelfTest extends GridCommonAbstractTest { /** Test instance. */ private static final String INSTANCE = "test_instance"; @@ -44,6 +48,7 @@ public class ChainedUserNameMapperSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testNullMappers() throws Exception { GridTestUtils.assertThrows(null, new Callable() { @Override public Void call() throws Exception { @@ -59,6 +64,7 @@ public void testNullMappers() throws Exception { * * @throws Exception If failed. */ + @Test public void testNullMapperElement() throws Exception { GridTestUtils.assertThrows(null, new Callable() { @Override public Void call() throws Exception { @@ -74,6 +80,7 @@ public void testNullMapperElement() throws Exception { * * @throws Exception If failed. */ + @Test public void testChaining() throws Exception { BasicUserNameMapper mapper1 = new BasicUserNameMapper(); diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/util/KerberosUserNameMapperSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/util/KerberosUserNameMapperSelfTest.java index bd76b51a1685b..a32245e5b0ba1 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/util/KerberosUserNameMapperSelfTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/util/KerberosUserNameMapperSelfTest.java @@ -21,10 +21,14 @@ import org.apache.ignite.internal.processors.igfs.IgfsUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for Kerberos name mapper. */ +@RunWith(JUnit4.class) public class KerberosUserNameMapperSelfTest extends GridCommonAbstractTest { /** Test instance. */ private static final String INSTANCE = "test_instance"; @@ -37,6 +41,7 @@ public class KerberosUserNameMapperSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testMapper() throws Exception { KerberosUserNameMapper mapper = create(null, null); @@ -49,6 +54,7 @@ public void testMapper() throws Exception { * * @throws Exception If failed. */ + @Test public void testMapperInstance() throws Exception { KerberosUserNameMapper mapper = create(INSTANCE, null); @@ -61,6 +67,7 @@ public void testMapperInstance() throws Exception { * * @throws Exception If failed. */ + @Test public void testMapperRealm() throws Exception { KerberosUserNameMapper mapper = create(null, REALM); @@ -73,6 +80,7 @@ public void testMapperRealm() throws Exception { * * @throws Exception If failed. */ + @Test public void testMapperInstanceAndRealm() throws Exception { KerberosUserNameMapper mapper = create(INSTANCE, REALM); diff --git a/modules/hibernate-4.2/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheConfigurationSelfTest.java b/modules/hibernate-4.2/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheConfigurationSelfTest.java index a28c5da31a257..eb09c59faa9ca 100644 --- a/modules/hibernate-4.2/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheConfigurationSelfTest.java +++ b/modules/hibernate-4.2/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheConfigurationSelfTest.java @@ -40,6 +40,9 @@ import org.hibernate.cache.spi.access.AccessType; import org.hibernate.cfg.Configuration; import org.hibernate.service.ServiceRegistryBuilder; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -57,6 +60,7 @@ /** * Tests Hibernate L2 cache configuration. */ +@RunWith(JUnit4.class) public class HibernateL2CacheConfigurationSelfTest extends GridCommonAbstractTest { /** */ public static final String ENTITY1_NAME = Entity1.class.getName(); @@ -168,6 +172,7 @@ protected Configuration hibernateConfiguration(String igniteInstanceName) { /** * Tests property {@link HibernateAccessStrategyFactory#REGION_CACHE_PROPERTY}. */ + @Test public void testPerRegionCacheProperty() { testCacheUsage(1, 1, 0, 1, 1); } @@ -175,6 +180,7 @@ public void testPerRegionCacheProperty() { /** * Tests property {@link HibernateAccessStrategyFactory#DFLT_CACHE_NAME_PROPERTY}. */ + @Test public void testDefaultCache() { dfltCache = true; @@ -401,4 +407,4 @@ public void setId(int id) { this.id = id; } } -} \ No newline at end of file +} diff --git a/modules/hibernate-4.2/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheMultiJvmTest.java b/modules/hibernate-4.2/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheMultiJvmTest.java index ed092aa248333..43c54b24abaa7 100644 --- a/modules/hibernate-4.2/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheMultiJvmTest.java +++ b/modules/hibernate-4.2/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheMultiJvmTest.java @@ -36,6 +36,9 @@ import org.hibernate.annotations.CacheConcurrencyStrategy; import org.hibernate.cfg.Configuration; import org.hibernate.service.ServiceRegistryBuilder; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; import static org.apache.ignite.cache.hibernate.HibernateAccessStrategyFactory.DFLT_CACHE_NAME_PROPERTY; @@ -46,6 +49,7 @@ /** * */ +@RunWith(JUnit4.class) public class HibernateL2CacheMultiJvmTest extends GridCommonAbstractTest { /** */ private static final String CACHE_NAME = "hibernateCache"; @@ -89,6 +93,7 @@ public class HibernateL2CacheMultiJvmTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testL2Cache() throws Exception { Ignite srv = ignite(0); diff --git a/modules/hibernate-4.2/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheSelfTest.java b/modules/hibernate-4.2/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheSelfTest.java index d69c61a10584d..04fa9c2750e2a 100644 --- a/modules/hibernate-4.2/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheSelfTest.java +++ b/modules/hibernate-4.2/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheSelfTest.java @@ -55,6 +55,9 @@ import org.hibernate.service.ServiceRegistryBuilder; import org.hibernate.stat.NaturalIdCacheStatistics; import org.hibernate.stat.SecondLevelCacheStatistics; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -74,6 +77,7 @@ * * Tests Hibernate L2 cache. */ +@RunWith(JUnit4.class) public class HibernateL2CacheSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -535,6 +539,7 @@ protected AccessType[] accessTypes() { /** * @throws Exception If failed. */ + @Test public void testCollectionCache() throws Exception { for (AccessType accessType : accessTypes()) testCollectionCache(accessType); @@ -655,6 +660,7 @@ private void testCollectionCache(AccessType accessType) throws Exception { /** * @throws Exception If failed. */ + @Test public void testEntityCache() throws Exception { for (AccessType accessType : accessTypes()) testEntityCache(accessType); @@ -815,6 +821,7 @@ private void testEntityCache(AccessType accessType) throws Exception { /** * @throws Exception If failed. */ + @Test public void testTwoEntitiesSameCache() throws Exception { for (AccessType accessType : accessTypes()) testTwoEntitiesSameCache(accessType); @@ -1018,6 +1025,7 @@ private void testTwoEntitiesSameCache(AccessType accessType) throws Exception { /** * @throws Exception If failed. */ + @Test public void testVersionedEntity() throws Exception { for (AccessType accessType : accessTypes()) testVersionedEntity(accessType); @@ -1128,6 +1136,7 @@ private void testVersionedEntity(AccessType accessType) throws Exception { /** * @throws Exception If failed. */ + @Test public void testNaturalIdCache() throws Exception { for (AccessType accessType : accessTypes()) testNaturalIdCache(accessType); @@ -1282,6 +1291,7 @@ private void testNaturalIdCache(AccessType accessType) throws Exception { /** * @throws Exception If failed. */ + @Test public void testEntityCacheTransactionFails() throws Exception { for (AccessType accessType : accessTypes()) testEntityCacheTransactionFails(accessType); @@ -1456,6 +1466,7 @@ private void testEntityCacheTransactionFails(AccessType accessType) throws Excep /** * @throws Exception If failed. */ + @Test public void testQueryCache() throws Exception { for (AccessType accessType : accessTypes()) testQueryCache(accessType); @@ -1620,6 +1631,7 @@ private void testQueryCache(AccessType accessType) throws Exception { /** * @throws Exception If failed. */ + @Test public void testRegionClear() throws Exception { for (AccessType accessType : accessTypes()) testRegionClear(accessType); @@ -1945,4 +1957,4 @@ static Map hibernateProperties(String igniteInstanceName, String return map; } -} \ No newline at end of file +} diff --git a/modules/hibernate-4.2/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheStrategySelfTest.java b/modules/hibernate-4.2/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheStrategySelfTest.java index 5e1fd32fb10b9..44d77011c2821 100644 --- a/modules/hibernate-4.2/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheStrategySelfTest.java +++ b/modules/hibernate-4.2/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheStrategySelfTest.java @@ -36,6 +36,9 @@ import org.hibernate.cache.spi.access.AccessType; import org.hibernate.cfg.Configuration; import org.hibernate.service.ServiceRegistryBuilder; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -55,6 +58,7 @@ * Tests Hibernate L2 cache configuration. */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class HibernateL2CacheStrategySelfTest extends GridCommonAbstractTest { /** */ private static final String ENTITY1_NAME = Entity1.class.getName(); @@ -168,6 +172,7 @@ private Configuration hibernateConfiguration(AccessType accessType, String ignit /** * @throws Exception If failed. */ + @Test public void testEntityCacheReadWrite() throws Exception { for (AccessType accessType : new AccessType[]{AccessType.READ_WRITE, AccessType.NONSTRICT_READ_WRITE}) testEntityCacheReadWrite(accessType); @@ -589,4 +594,4 @@ private void cleanup() throws Exception { for (IgniteCacheProxy cache : ((IgniteKernal)grid(0)).caches()) cache.clear(); } -} \ No newline at end of file +} diff --git a/modules/hibernate-4.2/src/test/java/org/apache/ignite/cache/store/hibernate/CacheHibernateStoreFactorySelfTest.java b/modules/hibernate-4.2/src/test/java/org/apache/ignite/cache/store/hibernate/CacheHibernateStoreFactorySelfTest.java index db0e1bebe8026..4ed346fdf81b4 100644 --- a/modules/hibernate-4.2/src/test/java/org/apache/ignite/cache/store/hibernate/CacheHibernateStoreFactorySelfTest.java +++ b/modules/hibernate-4.2/src/test/java/org/apache/ignite/cache/store/hibernate/CacheHibernateStoreFactorySelfTest.java @@ -43,10 +43,14 @@ import org.hibernate.metadata.ClassMetadata; import org.hibernate.metadata.CollectionMetadata; import org.hibernate.stat.Statistics; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for Cache jdbc blob store factory. */ +@RunWith(JUnit4.class) public class CacheHibernateStoreFactorySelfTest extends GridCommonAbstractTest { /** Cache name. */ private static final String CACHE_NAME = "test"; @@ -57,6 +61,7 @@ public class CacheHibernateStoreFactorySelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCacheConfiguration() throws Exception { try (Ignite ignite1 = startGrid(0)) { IgniteCache cache1 = ignite1.getOrCreateCache(cacheConfiguration()); @@ -68,6 +73,7 @@ public void testCacheConfiguration() throws Exception { /** * @throws Exception If failed. */ + @Test public void testXmlConfiguration() throws Exception { try (Ignite ignite = Ignition.start(MODULE_PATH + "/src/test/config/factory-cache.xml")) { try(Ignite ignite1 = Ignition.start(MODULE_PATH + "/src/test/config/factory-cache1.xml")) { @@ -82,6 +88,7 @@ public void testXmlConfiguration() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIncorrectBeanConfiguration() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-1094"); @@ -287,4 +294,4 @@ public static class DummySessionFactory implements SessionFactory { return null; } } -} \ No newline at end of file +} diff --git a/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheConfigurationSelfTest.java b/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheConfigurationSelfTest.java index 2268b06886518..f828d04c83753 100644 --- a/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheConfigurationSelfTest.java +++ b/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheConfigurationSelfTest.java @@ -40,6 +40,9 @@ import org.hibernate.boot.registry.StandardServiceRegistryBuilder; import org.hibernate.cache.spi.access.AccessType; import org.hibernate.cfg.Configuration; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -55,6 +58,7 @@ /** * Tests Hibernate L2 cache configuration. */ +@RunWith(JUnit4.class) public class HibernateL2CacheConfigurationSelfTest extends GridCommonAbstractTest { /** */ public static final String ENTITY1_NAME = Entity1.class.getName(); @@ -165,6 +169,7 @@ protected Configuration hibernateConfiguration(String igniteInstanceName) { /** * Tests property {@link HibernateAccessStrategyFactory#REGION_CACHE_PROPERTY}. */ + @Test public void testPerRegionCacheProperty() { testCacheUsage(1, 1, 0, 1, 1); } @@ -172,6 +177,7 @@ public void testPerRegionCacheProperty() { /** * Tests property {@link HibernateAccessStrategyFactory#DFLT_CACHE_NAME_PROPERTY}. */ + @Test public void testDefaultCache() { dfltCache = true; @@ -399,4 +405,4 @@ public void setId(int id) { this.id = id; } } -} \ No newline at end of file +} diff --git a/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheMultiJvmTest.java b/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheMultiJvmTest.java index 268ea8ccf04b2..b3da8bbfaf59d 100644 --- a/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheMultiJvmTest.java +++ b/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheMultiJvmTest.java @@ -36,6 +36,9 @@ import org.hibernate.annotations.CacheConcurrencyStrategy; import org.hibernate.boot.MetadataSources; import org.hibernate.boot.registry.StandardServiceRegistryBuilder; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; import static org.apache.ignite.cache.hibernate.HibernateAccessStrategyFactory.DFLT_CACHE_NAME_PROPERTY; @@ -46,6 +49,7 @@ /** * */ +@RunWith(JUnit4.class) public class HibernateL2CacheMultiJvmTest extends GridCommonAbstractTest { /** */ private static final String CACHE_NAME = "hibernateCache"; @@ -89,6 +93,7 @@ public class HibernateL2CacheMultiJvmTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testL2Cache() throws Exception { Ignite srv = ignite(0); diff --git a/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheSelfTest.java b/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheSelfTest.java index 2e0d2066a6a19..0c351cd02f700 100644 --- a/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheSelfTest.java +++ b/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheSelfTest.java @@ -59,6 +59,9 @@ import org.hibernate.mapping.RootClass; import org.hibernate.stat.NaturalIdCacheStatistics; import org.hibernate.stat.SecondLevelCacheStatistics; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -78,6 +81,7 @@ * * Tests Hibernate L2 cache. */ +@RunWith(JUnit4.class) public class HibernateL2CacheSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -513,6 +517,7 @@ protected AccessType[] accessTypes() { /** * @throws Exception If failed. */ + @Test public void testCollectionCache() throws Exception { for (AccessType accessType : accessTypes()) testCollectionCache(accessType); @@ -633,6 +638,7 @@ private void testCollectionCache(AccessType accessType) throws Exception { /** * @throws Exception If failed. */ + @Test public void testEntityCache() throws Exception { for (AccessType accessType : accessTypes()) testEntityCache(accessType); @@ -793,6 +799,7 @@ private void testEntityCache(AccessType accessType) throws Exception { /** * @throws Exception If failed. */ + @Test public void testTwoEntitiesSameCache() throws Exception { for (AccessType accessType : accessTypes()) testTwoEntitiesSameCache(accessType); @@ -996,6 +1003,7 @@ private void testTwoEntitiesSameCache(AccessType accessType) throws Exception { /** * @throws Exception If failed. */ + @Test public void testVersionedEntity() throws Exception { for (AccessType accessType : accessTypes()) testVersionedEntity(accessType); @@ -1106,6 +1114,7 @@ private void testVersionedEntity(AccessType accessType) throws Exception { /** * @throws Exception If failed. */ + @Test public void testNaturalIdCache() throws Exception { for (AccessType accessType : accessTypes()) testNaturalIdCache(accessType); @@ -1260,6 +1269,7 @@ private void testNaturalIdCache(AccessType accessType) throws Exception { /** * @throws Exception If failed. */ + @Test public void testEntityCacheTransactionFails() throws Exception { for (AccessType accessType : accessTypes()) testEntityCacheTransactionFails(accessType); @@ -1434,6 +1444,7 @@ private void testEntityCacheTransactionFails(AccessType accessType) throws Excep /** * @throws Exception If failed. */ + @Test public void testQueryCache() throws Exception { for (AccessType accessType : accessTypes()) testQueryCache(accessType); @@ -1598,6 +1609,7 @@ private void testQueryCache(AccessType accessType) throws Exception { /** * @throws Exception If failed. */ + @Test public void testRegionClear() throws Exception { for (AccessType accessType : accessTypes()) testRegionClear(accessType); @@ -1949,4 +1961,4 @@ static Map hibernateProperties(String igniteInstanceName, String return map; } -} \ No newline at end of file +} diff --git a/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheStrategySelfTest.java b/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheStrategySelfTest.java index 8bd80da5c2ece..0efb815d68648 100644 --- a/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheStrategySelfTest.java +++ b/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheStrategySelfTest.java @@ -40,6 +40,9 @@ import org.hibernate.cache.spi.access.AccessType; import org.hibernate.mapping.PersistentClass; import org.hibernate.mapping.RootClass; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -51,6 +54,7 @@ * Tests Hibernate L2 cache configuration. */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class HibernateL2CacheStrategySelfTest extends GridCommonAbstractTest { /** */ private static final String ENTITY1_NAME = Entity1.class.getName(); @@ -120,6 +124,7 @@ private CacheConfiguration cacheConfiguration(String cacheName) { /** * @throws Exception If failed. */ + @Test public void testEntityCacheReadWrite() throws Exception { for (AccessType accessType : new AccessType[]{AccessType.READ_WRITE, AccessType.NONSTRICT_READ_WRITE}) testEntityCacheReadWrite(accessType); @@ -561,4 +566,4 @@ private void cleanup() throws Exception { for (IgniteCacheProxy cache : ((IgniteKernal)grid(0)).caches()) cache.clear(); } -} \ No newline at end of file +} diff --git a/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/store/hibernate/CacheHibernateBlobStoreSelfTest.java b/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/store/hibernate/CacheHibernateBlobStoreSelfTest.java index c62db4ab619c2..9deaeece85ff8 100644 --- a/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/store/hibernate/CacheHibernateBlobStoreSelfTest.java +++ b/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/store/hibernate/CacheHibernateBlobStoreSelfTest.java @@ -25,10 +25,14 @@ import org.hibernate.Session; import org.hibernate.Transaction; import org.hibernate.resource.transaction.spi.TransactionStatus; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Cache store test. */ +@RunWith(JUnit4.class) public class CacheHibernateBlobStoreSelfTest extends GridAbstractCacheStoreSelfTest> { /** @@ -69,6 +73,7 @@ public CacheHibernateBlobStoreSelfTest() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConfigurationByUrl() throws Exception { URL url = U.resolveIgniteUrl(CacheHibernateStoreFactorySelfTest.MODULE_PATH + "/src/test/java/org/apache/ignite/cache/store/hibernate/hibernate.cfg.xml"); @@ -84,6 +89,7 @@ public void testConfigurationByUrl() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConfigurationByFile() throws Exception { URL url = U.resolveIgniteUrl(CacheHibernateStoreFactorySelfTest.MODULE_PATH + "/src/test/java/org/apache/ignite/cache/store/hibernate/hibernate.cfg.xml"); @@ -101,6 +107,7 @@ public void testConfigurationByFile() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConfigurationByResource() throws Exception { store.setHibernateConfigurationPath("/org/apache/ignite/cache/store/hibernate/hibernate.cfg.xml"); @@ -108,6 +115,7 @@ public void testConfigurationByResource() throws Exception { store.load("key"); } + @Test @Override public void testSimpleMultithreading() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-1757"); } diff --git a/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/store/hibernate/CacheHibernateStoreFactorySelfTest.java b/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/store/hibernate/CacheHibernateStoreFactorySelfTest.java index 0ffe52ef1176f..a358d25c8a300 100644 --- a/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/store/hibernate/CacheHibernateStoreFactorySelfTest.java +++ b/modules/hibernate-5.1/src/test/java/org/apache/ignite/cache/store/hibernate/CacheHibernateStoreFactorySelfTest.java @@ -43,10 +43,14 @@ import org.hibernate.metadata.ClassMetadata; import org.hibernate.metadata.CollectionMetadata; import org.hibernate.stat.Statistics; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for Cache jdbc blob store factory. */ +@RunWith(JUnit4.class) public class CacheHibernateStoreFactorySelfTest extends GridCommonAbstractTest { /** Cache name. */ private static final String CACHE_NAME = "test"; @@ -57,6 +61,7 @@ public class CacheHibernateStoreFactorySelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCacheConfiguration() throws Exception { try (Ignite ignite1 = startGrid(0)) { IgniteCache cache1 = ignite1.getOrCreateCache(cacheConfiguration()); @@ -68,6 +73,7 @@ public void testCacheConfiguration() throws Exception { /** * @throws Exception If failed. */ + @Test public void testXmlConfiguration() throws Exception { try (Ignite ignite = Ignition.start(MODULE_PATH + "/src/test/config/factory-cache.xml")) { try(Ignite ignite1 = Ignition.start(MODULE_PATH + "/src/test/config/factory-cache1.xml")) { @@ -82,6 +88,7 @@ public void testXmlConfiguration() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIncorrectBeanConfiguration() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-1094"); @@ -255,4 +262,4 @@ public static class DummySessionFactory implements SessionFactory { return null; } } -} \ No newline at end of file +} From 4cee942f0d530ecab9c7245056cf5a763e10bee4 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Fri, 7 Dec 2018 20:21:17 +0300 Subject: [PATCH 063/176] IGNITE-10176 migrate non-core modules tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview and rebuild --- ...yKeyNameAndValueFieldNameConflictTest.java | 10 ++- .../processors/cache/BigEntryQueryTest.java | 5 ++ ...tadataConcurrentUpdateWithIndexesTest.java | 5 ++ .../BinarySerializationQuerySelfTest.java | 9 +++ .../cache/BinaryTypeMismatchLoggingTest.java | 15 +++- ...cheAbstractQueryDetailMetricsSelfTest.java | 20 +++++ .../CacheAbstractQueryMetricsSelfTest.java | 19 +++++ .../CacheBinaryKeyConcurrentQueryTest.java | 5 ++ .../cache/CacheConfigurationP2PTest.java | 7 +- .../cache/CacheIndexStreamerTest.java | 6 ++ .../cache/CacheIteratorScanQueryTest.java | 6 ++ ...acheOffheapBatchIndexingMultiTypeTest.java | 8 +- ...cheOffheapBatchIndexingSingleTypeTest.java | 9 ++- .../CacheOperationsWithExpirationTest.java | 6 ++ .../cache/CacheQueryBuildValueTest.java | 5 ++ .../cache/CacheQueryEvictDataLostTest.java | 5 ++ .../cache/CacheQueryFilterExpiredTest.java | 5 ++ .../cache/CacheQueryNewClientSelfTest.java | 6 ++ ...acheRandomOperationsMultithreadedTest.java | 8 ++ ...cheScanPartitionQueryFallbackSelfTest.java | 13 +++- .../cache/CacheSqlQueryValueCopySelfTest.java | 12 +++ ...lientReconnectAfterClusterRestartTest.java | 5 ++ .../cache/ClusterReadOnlyModeSqlTest.java | 5 ++ .../cache/DdlTransactionSelfTest.java | 10 +++ .../GridCacheCrossCacheQuerySelfTest.java | 7 ++ .../GridCacheDynamicLoadOnClientTest.java | 12 +++ .../cache/GridCacheFullTextQuerySelfTest.java | 11 ++- ...idCacheLazyQueryPartitionsReleaseTest.java | 6 ++ .../cache/GridCacheOffHeapSelfTest.java | 7 +- .../GridCacheOffheapIndexEntryEvictTest.java | 8 +- .../GridCacheOffheapIndexGetSelfTest.java | 9 ++- .../GridCacheQueryIndexDisabledSelfTest.java | 12 +++ .../GridCacheQuerySerializationSelfTest.java | 7 +- .../cache/GridCacheQuerySimpleBenchmark.java | 7 +- .../GridIndexingWithNoopSwapSelfTest.java | 7 +- ...IgniteBinaryObjectFieldsQuerySelfTest.java | 12 +++ .../IgniteBinaryObjectQueryArgumentsTest.java | 13 ++++ ...inaryWrappedObjectFieldsQuerySelfTest.java | 2 +- ...gniteCacheAbstractFieldsQuerySelfTest.java | 26 +++++++ .../IgniteCacheAbstractQuerySelfTest.java | 44 +++++++++++ .../IgniteCacheCollocatedQuerySelfTest.java | 6 ++ .../IgniteCacheConfigVariationsQueryTest.java | 10 +++ ...heConfigurationPrimitiveTypesSelfTest.java | 7 +- .../IgniteCacheCrossCacheJoinRandomTest.java | 8 ++ .../IgniteCacheDeleteSqlQuerySelfTest.java | 7 ++ ...heDistributedJoinCollocatedAndNotTest.java | 5 ++ ...heDistributedJoinCustomAffinityMapper.java | 5 ++ ...IgniteCacheDistributedJoinNoIndexTest.java | 5 ++ ...butedJoinPartitionedAndReplicatedTest.java | 7 ++ ...cheDistributedJoinQueryConditionsTest.java | 9 +++ .../cache/IgniteCacheDistributedJoinTest.java | 5 ++ ...eDuplicateEntityConfigurationSelfTest.java | 6 ++ .../IgniteCacheFieldsQueryNoDataSelfTest.java | 7 +- ...CacheFullTextQueryNodeJoiningSelfTest.java | 7 +- .../cache/IgniteCacheGroupsSqlTest.java | 11 +++ .../IgniteCacheInsertSqlQuerySelfTest.java | 15 ++++ ...rtitionedAndReplicatedCollocationTest.java | 5 ++ ...CacheJoinPartitionedAndReplicatedTest.java | 6 ++ ...niteCacheJoinQueryWithAffinityKeyTest.java | 10 +++ .../cache/IgniteCacheLargeResultSelfTest.java | 7 +- ...rtitionOnAffinityRunAtomicCacheOpTest.java | 7 ++ ...teCacheLockPartitionOnAffinityRunTest.java | 13 ++++ ...tionOnAffinityRunWithCollisionSpiTest.java | 6 ++ .../IgniteCacheMergeSqlQuerySelfTest.java | 11 +++ .../IgniteCacheMultipleIndexedTypesTest.java | 5 ++ .../IgniteCacheNoClassQuerySelfTest.java | 5 ++ .../IgniteCacheObjectKeyIndexingSelfTest.java | 9 ++- .../IgniteCacheOffheapEvictQueryTest.java | 5 ++ .../IgniteCacheOffheapIndexScanTest.java | 7 +- ...teCacheP2pUnmarshallingQueryErrorTest.java | 6 ++ ...PartitionedQueryMultiThreadedSelfTest.java | 7 +- ...niteCachePrimitiveFieldsQuerySelfTest.java | 7 +- .../cache/IgniteCacheQueriesLoadTest1.java | 5 ++ .../IgniteCacheQueryH2IndexingLeakTest.java | 8 +- .../cache/IgniteCacheQueryIndexSelfTest.java | 8 +- .../cache/IgniteCacheQueryLoadSelfTest.java | 12 ++- ...IgniteCacheQueryMultiThreadedSelfTest.java | 12 +++ .../IgniteCacheSqlQueryErrorSelfTest.java | 13 ++++ ...iteCacheSqlQueryMultiThreadedSelfTest.java | 8 +- .../IgniteCacheStarvationOnRebalanceTest.java | 7 +- .../cache/IgniteCacheUnionDuplicatesTest.java | 5 ++ .../IgniteCacheUpdateSqlQuerySelfTest.java | 10 +++ ...eckClusterStateBeforeExecuteQueryTest.java | 5 ++ ...ientReconnectCacheQueriesFailoverTest.java | 6 ++ .../IgniteClientReconnectQueriesTest.java | 11 ++- .../IgniteCrossCachesJoinsQueryTest.java | 10 +++ .../cache/IgniteDynamicSqlRestoreTest.java | 13 ++++ .../cache/IgniteErrorOnRebalanceTest.java | 5 ++ .../cache/IncorrectQueryEntityTest.java | 5 ++ .../cache/QueryEntityCaseMismatchTest.java | 5 ++ ...QueryJoinWithDifferentNodeFiltersTest.java | 7 +- .../cache/SqlFieldsQuerySelfTest.java | 7 ++ .../cache/StartCachesInParallelTest.java | 9 ++- .../SqlUserCommandSelfTest.java | 11 +++ .../CacheBlockOnCreateDestoryIndexTest.java | 36 +++++++++ .../distributed/CacheBlockOnSqlQueryTest.java | 14 ++++ ...entQueryReplicatedNodeRestartSelfTest.java | 7 +- ...edPartitionQueryConfigurationSelfTest.java | 7 +- ...tedPartitionQueryNodeRestartsSelfTest.java | 7 +- ...acheDistributedPartitionQuerySelfTest.java | 13 +++- ...teCacheDistributedQueryCancelSelfTest.java | 6 ++ ...tedQueryStopOnCancelOrTimeoutSelfTest.java | 19 +++++ ...teCachePartitionedFieldsQuerySelfTest.java | 8 +- .../IgniteCachePartitionedQuerySelfTest.java | 9 ++- .../IgniteCacheQueryNoRebalanceSelfTest.java | 5 ++ .../near/IgniteCacheQueryNodeFailTest.java | 6 ++ ...eryNodeRestartDistributedJoinSelfTest.java | 8 +- .../IgniteCacheQueryNodeRestartSelfTest.java | 7 +- .../IgniteCacheQueryNodeRestartSelfTest2.java | 5 ++ ...ancelOrTimeoutDistributedJoinSelfTest.java | 12 +++ .../near/IgniteSqlQueryWithBaselineTest.java | 9 ++- ...sQueryJoinNoPrimaryPartitionsSelfTest.java | 7 +- ...iteCacheReplicatedFieldsQuerySelfTest.java | 7 +- .../IgniteCacheReplicatedQuerySelfTest.java | 12 +++ .../cache/index/BasicIndexTest.java | 13 ++++ .../ComplexPrimaryKeyUnwrapSelfTest.java | 9 +++ .../ComplexSecondaryKeyUnwrapSelfTest.java | 6 ++ .../DuplicateKeyValueClassesSelfTest.java | 6 ++ ...amicColumnsAbstractConcurrentSelfTest.java | 20 +++++ .../DynamicIndexAbstractBasicSelfTest.java | 73 +++++++++++++++++++ ...ynamicIndexAbstractConcurrentSelfTest.java | 18 ++++- .../index/H2ConnectionLeaksSelfTest.java | 6 ++ ...H2DynamicColumnsAbstractBasicSelfTest.java | 32 ++++++++ .../index/H2DynamicIndexAbstractSelfTest.java | 11 +++ .../H2DynamicIndexingComplexAbstractTest.java | 5 ++ .../cache/index/H2DynamicTableSelfTest.java | 69 +++++++++++++++++- .../index/H2RowCachePageEvictionTest.java | 8 ++ .../cache/index/H2RowCacheSelfTest.java | 12 +++ .../cache/index/IgniteDecimalSelfTest.java | 9 +++ .../cache/index/LongIndexNameTest.java | 5 ++ .../index/MvccEmptyTransactionSelfTest.java | 5 ++ .../OptimizedMarshallerIndexNameTest.java | 5 ++ .../index/QueryEntityValidationSelfTest.java | 7 ++ .../cache/index/SchemaExchangeSelfTest.java | 16 ++++ ...ctionCommandsWithMvccDisabledSelfTest.java | 7 ++ ...ctionsCommandsWithMvccEnabledSelfTest.java | 10 +++ .../cache/index/SqlTransactionsSelfTest.java | 11 +++ .../IgniteCacheLocalFieldsQuerySelfTest.java | 7 +- ...acheLocalQueryCancelOrTimeoutSelfTest.java | 9 ++- .../local/IgniteCacheLocalQuerySelfTest.java | 7 ++ ...heMvccAbstractContinuousQuerySelfTest.java | 16 +++- ...vccAbstractSqlCoordinatorFailoverTest.java | 18 +++++ .../mvcc/CacheMvccBackupsAbstractTest.java | 17 +++++ .../CacheMvccBasicContinuousQueryTest.java | 10 +++ .../cache/mvcc/CacheMvccBulkLoadTest.java | 7 ++ ...ntinuousWithTransformerClientSelfTest.java | 5 ++ ...ousWithTransformerPartitionedSelfTest.java | 5 ++ ...uousWithTransformerReplicatedSelfTest.java | 5 ++ .../cache/mvcc/CacheMvccDmlSimpleTest.java | 8 ++ ...ccPartitionedSelectForUpdateQueryTest.java | 8 +- ...PartitionedSqlCoordinatorFailoverTest.java | 22 ++++++ ...artitionedSqlTxQueriesWithReducerTest.java | 7 +- .../CacheMvccReplicatedSqlTxQueriesTest.java | 9 ++- ...eMvccSelectForUpdateQueryAbstractTest.java | 13 ++++ .../cache/mvcc/CacheMvccSizeTest.java | 11 +++ ...cheMvccSqlConfigurationValidationTest.java | 7 ++ .../mvcc/CacheMvccSqlLockTimeoutTest.java | 10 +++ .../mvcc/CacheMvccSqlQueriesAbstractTest.java | 31 ++++++++ .../CacheMvccSqlTxQueriesAbstractTest.java | 58 +++++++++++++++ ...ccSqlTxQueriesWithReducerAbstractTest.java | 20 +++++ .../mvcc/CacheMvccSqlUpdateCountersTest.java | 9 +++ .../mvcc/CacheMvccStreamingInsertTest.java | 6 ++ .../mvcc/CacheMvccTxNodeMappingTest.java | 6 ++ .../cache/mvcc/CacheMvccTxRecoveryTest.java | 15 ++++ .../mvcc/MvccRepeatableReadBulkOpsTest.java | 16 ++++ .../MvccRepeatableReadOperationsTest.java | 9 ++- .../db/wal/IgniteWalRecoveryTest.java | 29 ++++++++ .../transaction/DmlInsideTransactionTest.java | 8 ++ .../cache/ttl/CacheTtlAbstractSelfTest.java | 13 +++- 169 files changed, 1744 insertions(+), 56 deletions(-) diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/AffinityKeyNameAndValueFieldNameConflictTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/AffinityKeyNameAndValueFieldNameConflictTest.java index 67db94c69d97e..ff147e7ba7a76 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/AffinityKeyNameAndValueFieldNameConflictTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/AffinityKeyNameAndValueFieldNameConflictTest.java @@ -37,10 +37,14 @@ import org.apache.ignite.internal.util.typedef.internal.S; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * IGNITE-7793 SQL does not work if value has sql field which name equals to affinity keyProducer name */ +@RunWith(JUnit4.class) public class AffinityKeyNameAndValueFieldNameConflictTest extends GridCommonAbstractTest { /** */ private static final String PERSON_CACHE = "person"; @@ -92,6 +96,7 @@ public class AffinityKeyNameAndValueFieldNameConflictTest extends GridCommonAbst /** * @throws Exception If failed. */ + @Test public void testQueryEntityConfig() throws Exception { qryEntityCfg = true; keyCls = PersonKey1.class; @@ -102,6 +107,7 @@ public void testQueryEntityConfig() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryEntityConfigKeySpecified() throws Exception { qryEntityCfg = true; keyFieldSpecified = true; @@ -113,6 +119,7 @@ public void testQueryEntityConfigKeySpecified() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAnnotationConfig() throws Exception { keyCls = PersonKey1.class; keyProducer = PersonKey1::new; @@ -122,6 +129,7 @@ public void testAnnotationConfig() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAnnotationConfigCollision() throws Exception { keyCls = PersonKey2.class; keyProducer = PersonKey2::new; @@ -258,4 +266,4 @@ public Person(String name) { return S.toString(Person.class, this); } } -} \ No newline at end of file +} diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/BigEntryQueryTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/BigEntryQueryTest.java index 3b5562a3035b8..4e443f9b113cb 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/BigEntryQueryTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/BigEntryQueryTest.java @@ -39,10 +39,14 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.events.EventType; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * This is a specific test for IGNITE-8900. */ +@RunWith(JUnit4.class) public class BigEntryQueryTest extends GridCommonAbstractTest { /** */ public static final String CACHE = "cache"; @@ -55,6 +59,7 @@ public class BigEntryQueryTest extends GridCommonAbstractTest { /** * @throws Exception if failed. */ + @Test public void testBigEntriesSelect() throws Exception { startGrids(2); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/BinaryMetadataConcurrentUpdateWithIndexesTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/BinaryMetadataConcurrentUpdateWithIndexesTest.java index 9bbdfad55ee81..ac4c2eb7f2efb 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/BinaryMetadataConcurrentUpdateWithIndexesTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/BinaryMetadataConcurrentUpdateWithIndexesTest.java @@ -61,6 +61,9 @@ import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryCustomEventMessage; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.testframework.GridTestUtils.runAsync; @@ -81,6 +84,7 @@ * nodes or tx will fail on commit. * */ +@RunWith(JUnit4.class) public class BinaryMetadataConcurrentUpdateWithIndexesTest extends GridCommonAbstractTest { /** */ private static final int FIELDS = 2; @@ -152,6 +156,7 @@ public class BinaryMetadataConcurrentUpdateWithIndexesTest extends GridCommonAbs public static final CountDownLatch localMetaUpdatedLatch = new CountDownLatch(1); /** */ + @Test public void testMissingSchemaUpdate() throws Exception { // Start order is important. Ignite node0 = startGrid("node0"); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/BinarySerializationQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/BinarySerializationQuerySelfTest.java index 4b3c881bf217d..74c834a25e803 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/BinarySerializationQuerySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/BinarySerializationQuerySelfTest.java @@ -56,10 +56,14 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for query with BinaryMarshaller and different serialization modes. */ +@RunWith(JUnit4.class) public class BinarySerializationQuerySelfTest extends GridCommonAbstractTest { /** Ignite instance. */ private Ignite ignite; @@ -159,6 +163,7 @@ private static QueryEntity entityForClass(Class cls) { * * @throws Exception If failed. */ + @Test public void testPlain() throws Exception { check(EntityPlain.class); } @@ -168,6 +173,7 @@ public void testPlain() throws Exception { * * @throws Exception If failed. */ + @Test public void testSerializable() throws Exception { check(EntitySerializable.class); } @@ -177,6 +183,7 @@ public void testSerializable() throws Exception { * * @throws Exception If failed. */ + @Test public void testExternalizable() throws Exception { check(EntityExternalizable.class); } @@ -186,6 +193,7 @@ public void testExternalizable() throws Exception { * * @throws Exception If failed. */ + @Test public void testBinarylizable() throws Exception { check(EntityBinarylizable.class); } @@ -195,6 +203,7 @@ public void testBinarylizable() throws Exception { * * @throws Exception If failed. */ + @Test public void testWriteReadObject() throws Exception { check(EntityWriteReadObject.class); } diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/BinaryTypeMismatchLoggingTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/BinaryTypeMismatchLoggingTest.java index 7a41a6ab726b6..bf9796da3c23e 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/BinaryTypeMismatchLoggingTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/BinaryTypeMismatchLoggingTest.java @@ -34,11 +34,14 @@ import org.apache.ignite.testframework.GridStringLogger; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; - +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests of binary type mismatch logging. */ +@RunWith(JUnit4.class) public class BinaryTypeMismatchLoggingTest extends GridCommonAbstractTest { /** */ public static final String MESSAGE_PAYLOAD_VALUE = "expValType=Payload, actualValType=o.a.i.i.processors.cache.BinaryTypeMismatchLoggingTest$Payload"; @@ -49,6 +52,7 @@ public class BinaryTypeMismatchLoggingTest extends GridCommonAbstractTest { /** * @throws Exception In case of an error. */ + @Test public void testValueReadCreateTable() throws Exception { Ignite ignite = startGrid(0); @@ -74,6 +78,7 @@ public void testValueReadCreateTable() throws Exception { /** * @throws Exception In case of an error. */ + @Test public void testValueReadQueryEntities() throws Exception { Ignite ignite = startGrid(0); @@ -102,6 +107,7 @@ public void testValueReadQueryEntities() throws Exception { /** * @throws Exception In case of an error. */ + @Test public void testEntryReadCreateTable() throws Exception { Ignite ignite = startGrid(0); @@ -127,6 +133,7 @@ public void testEntryReadCreateTable() throws Exception { /** * @throws Exception In case of an error. */ + @Test public void testEntryReadQueryEntities() throws Exception { Ignite ignite = startGrid(0); @@ -156,6 +163,7 @@ public void testEntryReadQueryEntities() throws Exception { /** * @throws Exception In case of an error. */ + @Test public void testValueWriteCreateTable() throws Exception { Ignite ignite = startGridWithLogCapture(); @@ -185,6 +193,7 @@ public void testValueWriteCreateTable() throws Exception { /** * @throws Exception In case of an error. */ + @Test public void testValueWriteQueryEntities() throws Exception { Ignite ignite = startGridWithLogCapture(); @@ -209,6 +218,7 @@ public void testValueWriteQueryEntities() throws Exception { /** * @throws Exception In case of an error. */ + @Test public void testEntryWriteCreateTable() throws Exception { Ignite ignite = startGridWithLogCapture(); @@ -242,6 +252,7 @@ public void testEntryWriteCreateTable() throws Exception { /** * @throws Exception In case of an error. */ + @Test public void testEntryWriteQueryEntities() throws Exception { Ignite ignite = startGridWithLogCapture(); @@ -277,6 +288,7 @@ public void testEntryWriteQueryEntities() throws Exception { /** * @throws Exception In case of an error. */ + @Test public void testEntryWriteCacheIsolation() throws Exception { Ignite ignite = startGridWithLogCapture(); @@ -309,6 +321,7 @@ public void testEntryWriteCacheIsolation() throws Exception { /** * @throws Exception In case of an error. */ + @Test public void testValueWriteMultipleQueryEntities() throws Exception { Ignite ignite = startGridWithLogCapture(); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheAbstractQueryDetailMetricsSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheAbstractQueryDetailMetricsSelfTest.java index e1d71545cc087..151fcea70a6f1 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheAbstractQueryDetailMetricsSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheAbstractQueryDetailMetricsSelfTest.java @@ -36,12 +36,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * Tests for cache query details metrics. */ +@RunWith(JUnit4.class) public abstract class CacheAbstractQueryDetailMetricsSelfTest extends GridCommonAbstractTest { /** */ private static final int QRY_DETAIL_METRICS_SIZE = 3; @@ -110,6 +114,7 @@ private CacheConfiguration configureCache(String cacheName) { * * @throws Exception In case of error. */ + @Test public void testSqlFieldsQueryMetrics() throws Exception { IgniteCache cache = grid(0).context().cache().jcache("A"); @@ -123,6 +128,7 @@ public void testSqlFieldsQueryMetrics() throws Exception { * * @throws Exception In case of error. */ + @Test public void testSqlFieldsQueryNotFullyFetchedMetrics() throws Exception { IgniteCache cache = grid(0).context().cache().jcache("A"); @@ -137,6 +143,7 @@ public void testSqlFieldsQueryNotFullyFetchedMetrics() throws Exception { * * @throws Exception In case of error. */ + @Test public void testSqlFieldsQueryFailedMetrics() throws Exception { IgniteCache cache = grid(0).context().cache().jcache("A"); @@ -150,6 +157,7 @@ public void testSqlFieldsQueryFailedMetrics() throws Exception { * * @throws Exception In case of error. */ + @Test public void testQueryMetricsEviction() throws Exception { IgniteCache cache = grid(0).context().cache().jcache("A"); @@ -258,6 +266,7 @@ private static class Worker extends Thread { * * @throws Exception In case of error. */ + @Test public void testQueryMetricsMultithreaded() throws Exception { IgniteCache cache = grid(0).context().cache().jcache("A"); @@ -286,6 +295,7 @@ public void testQueryMetricsMultithreaded() throws Exception { * * @throws Exception In case of error. */ + @Test public void testScanQueryMetrics() throws Exception { IgniteCache cache = grid(0).context().cache().jcache("A"); @@ -299,6 +309,7 @@ public void testScanQueryMetrics() throws Exception { * * @throws Exception In case of error. */ + @Test public void testScanQueryNotFullyFetchedMetrics() throws Exception { IgniteCache cache = grid(0).context().cache().jcache("A"); @@ -313,6 +324,7 @@ public void testScanQueryNotFullyFetchedMetrics() throws Exception { * * @throws Exception In case of error. */ + @Test public void testScanQueryFailedMetrics() throws Exception { IgniteCache cache = grid(0).context().cache().jcache("A"); @@ -326,6 +338,7 @@ public void testScanQueryFailedMetrics() throws Exception { * * @throws Exception In case of error. */ + @Test public void testSqlQueryMetrics() throws Exception { IgniteCache cache = grid(0).context().cache().jcache("A"); @@ -339,6 +352,7 @@ public void testSqlQueryMetrics() throws Exception { * * @throws Exception In case of error. */ + @Test public void testSqlQueryNotFullyFetchedMetrics() throws Exception { IgniteCache cache = grid(0).context().cache().jcache("A"); @@ -353,6 +367,7 @@ public void testSqlQueryNotFullyFetchedMetrics() throws Exception { * * @throws Exception In case of error. */ + @Test public void testTextQueryMetrics() throws Exception { IgniteCache cache = grid(0).context().cache().jcache("A"); @@ -366,6 +381,7 @@ public void testTextQueryMetrics() throws Exception { * * @throws Exception In case of error. */ + @Test public void testTextQueryNotFullyFetchedMetrics() throws Exception { IgniteCache cache = grid(0).context().cache().jcache("A"); @@ -380,6 +396,7 @@ public void testTextQueryNotFullyFetchedMetrics() throws Exception { * * @throws Exception In case of error. */ + @Test public void testTextQueryFailedMetrics() throws Exception { IgniteCache cache = grid(0).context().cache().jcache("A"); @@ -393,6 +410,7 @@ public void testTextQueryFailedMetrics() throws Exception { * * @throws Exception In case of error. */ + @Test public void testSqlFieldsCrossCacheQueryMetrics() throws Exception { IgniteCache cache = grid(0).context().cache().jcache("A"); @@ -406,6 +424,7 @@ public void testSqlFieldsCrossCacheQueryMetrics() throws Exception { * * @throws Exception In case of error. */ + @Test public void testSqlFieldsCrossCacheQueryNotFullyFetchedMetrics() throws Exception { IgniteCache cache = grid(0).context().cache().jcache("A"); @@ -420,6 +439,7 @@ public void testSqlFieldsCrossCacheQueryNotFullyFetchedMetrics() throws Exceptio * * @throws Exception In case of error. */ + @Test public void testSqlFieldsCrossCacheQueryFailedMetrics() throws Exception { IgniteCache cache = grid(0).context().cache().jcache("A"); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheAbstractQueryMetricsSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheAbstractQueryMetricsSelfTest.java index e1c796b62ad2a..27e61e56bc2a3 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheAbstractQueryMetricsSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheAbstractQueryMetricsSelfTest.java @@ -36,12 +36,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * Tests for cache query metrics. */ +@RunWith(JUnit4.class) public abstract class CacheAbstractQueryMetricsSelfTest extends GridCommonAbstractTest { /** Grid count. */ protected int gridCnt; @@ -106,6 +110,7 @@ public abstract class CacheAbstractQueryMetricsSelfTest extends GridCommonAbstra * * @throws Exception In case of error. */ + @Test public void testSqlFieldsQueryMetrics() throws Exception { IgniteCache cache = grid(0).context().cache().jcache("A"); @@ -119,6 +124,7 @@ public void testSqlFieldsQueryMetrics() throws Exception { * * @throws Exception In case of error. */ + @Test public void testSqlFieldsQueryNotFullyFetchedMetrics() throws Exception { IgniteCache cache = grid(0).context().cache().jcache("A"); @@ -133,6 +139,7 @@ public void testSqlFieldsQueryNotFullyFetchedMetrics() throws Exception { * * @throws Exception In case of error. */ + @Test public void testSqlFieldsQueryFailedMetrics() throws Exception { IgniteCache cache = grid(0).context().cache().jcache("A"); @@ -146,6 +153,7 @@ public void testSqlFieldsQueryFailedMetrics() throws Exception { * * @throws Exception In case of error. */ + @Test public void testScanQueryMetrics() throws Exception { IgniteCache cache = grid(0).context().cache().jcache("A"); @@ -159,6 +167,7 @@ public void testScanQueryMetrics() throws Exception { * * @throws Exception In case of error. */ + @Test public void testScanQueryNotFullyFetchedMetrics() throws Exception { IgniteCache cache = grid(0).context().cache().jcache("A"); @@ -173,6 +182,7 @@ public void testScanQueryNotFullyFetchedMetrics() throws Exception { * * @throws Exception In case of error. */ + @Test public void testScanQueryFailedMetrics() throws Exception { IgniteCache cache = grid(0).context().cache().jcache("A"); @@ -186,6 +196,7 @@ public void testScanQueryFailedMetrics() throws Exception { * * @throws Exception In case of error. */ + @Test public void testSqlQueryMetrics() throws Exception { IgniteCache cache = grid(0).context().cache().jcache("A"); @@ -199,6 +210,7 @@ public void testSqlQueryMetrics() throws Exception { * * @throws Exception In case of error. */ + @Test public void testSqlQueryNotFullyFetchedMetrics() throws Exception { IgniteCache cache = grid(0).context().cache().jcache("A"); @@ -213,6 +225,7 @@ public void testSqlQueryNotFullyFetchedMetrics() throws Exception { * * @throws Exception In case of error. */ + @Test public void testTextQueryMetrics() throws Exception { IgniteCache cache = grid(0).context().cache().jcache("A"); @@ -226,6 +239,7 @@ public void testTextQueryMetrics() throws Exception { * * @throws Exception In case of error. */ + @Test public void testTextQueryNotFullyFetchedMetrics() throws Exception { IgniteCache cache = grid(0).context().cache().jcache("A"); @@ -240,6 +254,7 @@ public void testTextQueryNotFullyFetchedMetrics() throws Exception { * * @throws Exception In case of error. */ + @Test public void testTextQueryFailedMetrics() throws Exception { IgniteCache cache = grid(0).context().cache().jcache("A"); @@ -253,6 +268,7 @@ public void testTextQueryFailedMetrics() throws Exception { * * @throws Exception In case of error. */ + @Test public void testSqlFieldsCrossCacheQueryMetrics() throws Exception { IgniteCache cache = grid(0).context().cache().jcache("A"); @@ -266,6 +282,7 @@ public void testSqlFieldsCrossCacheQueryMetrics() throws Exception { * * @throws Exception In case of error. */ + @Test public void testSqlFieldsCrossCacheQueryNotFullyFetchedMetrics() throws Exception { IgniteCache cache = grid(0).context().cache().jcache("A"); @@ -280,6 +297,7 @@ public void testSqlFieldsCrossCacheQueryNotFullyFetchedMetrics() throws Exceptio * * @throws Exception In case of error. */ + @Test public void testSqlFieldsCrossCacheQueryFailedMetrics() throws Exception { IgniteCache cache = grid(0).context().cache().jcache("A"); @@ -313,6 +331,7 @@ private static class Worker extends Thread { * * @throws Exception In case of error. */ + @Test public void testQueryMetricsMultithreaded() throws Exception { IgniteCache cache = grid(0).context().cache().jcache("A"); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheBinaryKeyConcurrentQueryTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheBinaryKeyConcurrentQueryTest.java index 0582132acedb3..f99da27ac6216 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheBinaryKeyConcurrentQueryTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheBinaryKeyConcurrentQueryTest.java @@ -43,6 +43,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -53,6 +56,7 @@ * */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class CacheBinaryKeyConcurrentQueryTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -84,6 +88,7 @@ public class CacheBinaryKeyConcurrentQueryTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPutAndQueries() throws Exception { Ignite ignite = ignite(0); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheConfigurationP2PTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheConfigurationP2PTest.java index 3777154780487..765e3f73d03ca 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheConfigurationP2PTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheConfigurationP2PTest.java @@ -33,12 +33,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.SECONDS; /** * */ +@RunWith(JUnit4.class) public class CacheConfigurationP2PTest extends GridCommonAbstractTest { /** */ public static final String NODE_START_MSG = "Test external node started"; @@ -75,6 +79,7 @@ static IgniteConfiguration createConfiguration() { /** * @throws Exception If failed. */ + @Test public void testCacheConfigurationP2P() throws Exception { fail("Enable when IGNITE-537 is fixed."); @@ -181,4 +186,4 @@ public void testCacheConfigurationP2P() throws Exception { } } } -} \ No newline at end of file +} diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheIndexStreamerTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheIndexStreamerTest.java index dda7eedc30c23..ae5879ad65be5 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheIndexStreamerTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheIndexStreamerTest.java @@ -33,6 +33,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -41,6 +44,7 @@ /** * */ +@RunWith(JUnit4.class) public class CacheIndexStreamerTest extends GridCommonAbstractTest { /** */ private final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -57,6 +61,7 @@ public class CacheIndexStreamerTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testStreamerAtomic() throws Exception { checkStreamer(ATOMIC); } @@ -64,6 +69,7 @@ public void testStreamerAtomic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStreamerTx() throws Exception { checkStreamer(TRANSACTIONAL); } diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheIteratorScanQueryTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheIteratorScanQueryTest.java index f0d1f371de294..47b8e247ad0d6 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheIteratorScanQueryTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheIteratorScanQueryTest.java @@ -30,6 +30,9 @@ import javax.cache.Cache; import java.util.Collections; import java.util.List; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -37,6 +40,7 @@ /** * Node filter test. */ +@RunWith(JUnit4.class) public class CacheIteratorScanQueryTest extends GridCommonAbstractTest { /** Client mode. */ private boolean client = false; @@ -74,6 +78,7 @@ public CacheIteratorScanQueryTest() { /** * @throws Exception If failed. */ + @Test public void testScanQuery() throws Exception { Ignite server = startGrid(0); @@ -107,6 +112,7 @@ public void testScanQuery() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryGetAllClientSide() throws Exception { Ignite server = startGrid(0); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapBatchIndexingMultiTypeTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapBatchIndexingMultiTypeTest.java index c422a7406af44..f0a68ad10741a 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapBatchIndexingMultiTypeTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapBatchIndexingMultiTypeTest.java @@ -21,15 +21,20 @@ import java.util.TreeMap; import org.apache.ignite.Ignite; import org.apache.ignite.IgniteCache; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests various cache operations with indexing enabled. * Cache contain multiple types. */ +@RunWith(JUnit4.class) public class CacheOffheapBatchIndexingMultiTypeTest extends CacheOffheapBatchIndexingBaseTest { /** * Tests putAll with multiple indexed entities and streamer pre-loading with low off-heap cache size. */ + @Test public void testPutAllMultupleEntitiesAndStreamer() { doStreamerBatchTest(50, 1_000, new Class[] { Integer.class, CacheOffheapBatchIndexingBaseTest.Person.class, @@ -40,6 +45,7 @@ public void testPutAllMultupleEntitiesAndStreamer() { /** * Tests putAll after with streamer batch load with one entity. */ + @Test public void testPuAllSingleEntity() { doStreamerBatchTest(50, 1_000, @@ -89,4 +95,4 @@ private void doStreamerBatchTest(int iterations, cache.destroy(); } } -} \ No newline at end of file +} diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapBatchIndexingSingleTypeTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapBatchIndexingSingleTypeTest.java index acf33dc380db0..f07e041dfddfb 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapBatchIndexingSingleTypeTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapBatchIndexingSingleTypeTest.java @@ -27,17 +27,22 @@ import org.apache.ignite.cache.query.QueryCursor; import org.apache.ignite.cache.query.SqlFieldsQuery; import org.apache.ignite.configuration.CacheConfiguration; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests various cache operations with indexing enabled. * Cache contains single type. */ +@RunWith(JUnit4.class) public class CacheOffheapBatchIndexingSingleTypeTest extends CacheOffheapBatchIndexingBaseTest { /** * Tests removal using EntryProcessor. * * @throws Exception If failed. */ + @Test public void testBatchRemove() throws Exception { Ignite ignite = grid(0); @@ -84,6 +89,7 @@ public void testBatchRemove() throws Exception { /** * */ + @Test public void testPutAllAndStreamer() { doStreamerBatchTest(50, 1_000, @@ -94,6 +100,7 @@ public void testPutAllAndStreamer() { /** * */ + @Test public void testPuAllSingleEntity() { doStreamerBatchTest(50, 1_000, @@ -144,4 +151,4 @@ private void doStreamerBatchTest(int iterations, cache.destroy(); } } -} \ No newline at end of file +} diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOperationsWithExpirationTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOperationsWithExpirationTest.java index 6a04126d37ebf..7167fcfd206b7 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOperationsWithExpirationTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOperationsWithExpirationTest.java @@ -36,6 +36,9 @@ import org.apache.ignite.lang.IgniteInClosure; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; @@ -44,6 +47,7 @@ /** * */ +@RunWith(JUnit4.class) public class CacheOperationsWithExpirationTest extends GridCommonAbstractTest { /** */ private static final int KEYS = 10_000; @@ -78,6 +82,7 @@ private CacheConfiguration cacheConfiguration(CacheAtom /** * @throws Exception If failed. */ + @Test public void testAtomicIndexEnabled() throws Exception { concurrentPutGetRemoveExpireAndQuery(cacheConfiguration(ATOMIC, true)); } @@ -85,6 +90,7 @@ public void testAtomicIndexEnabled() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAtomic() throws Exception { concurrentPutGetRemoveExpireAndQuery(cacheConfiguration(ATOMIC, false)); } diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheQueryBuildValueTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheQueryBuildValueTest.java index 3bbb007e776d2..f49631744b0e1 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheQueryBuildValueTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheQueryBuildValueTest.java @@ -38,10 +38,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class CacheQueryBuildValueTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -99,6 +103,7 @@ public class CacheQueryBuildValueTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testBuilderAndQuery() throws Exception { Ignite node = ignite(0); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheQueryEvictDataLostTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheQueryEvictDataLostTest.java index 254b59ce8bf0c..99bb20be940c0 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheQueryEvictDataLostTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheQueryEvictDataLostTest.java @@ -31,10 +31,14 @@ import org.apache.ignite.lang.IgniteInClosure; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class CacheQueryEvictDataLostTest extends GridCommonAbstractTest { /** */ private static final int KEYS = 100_000; @@ -71,6 +75,7 @@ public CacheQueryEvictDataLostTest() { /** * @throws Exception If failed. */ + @Test public void testQueryDataLost() throws Exception { final long stopTime = U.currentTimeMillis() + 30_000; diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheQueryFilterExpiredTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheQueryFilterExpiredTest.java index 47c87fa1cddc2..691731330aa89 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheQueryFilterExpiredTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheQueryFilterExpiredTest.java @@ -32,6 +32,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -39,6 +42,7 @@ /** * */ +@RunWith(JUnit4.class) public class CacheQueryFilterExpiredTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -55,6 +59,7 @@ public class CacheQueryFilterExpiredTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testFilterExpired() throws Exception { try (Ignite ignite = startGrid(0)) { checkFilterExpired(ignite, ATOMIC, false); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheQueryNewClientSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheQueryNewClientSelfTest.java index d33084026a72e..4aaa67b754bc5 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheQueryNewClientSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheQueryNewClientSelfTest.java @@ -28,10 +28,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for the case when client is started after the cache is already created. */ +@RunWith(JUnit4.class) public class CacheQueryNewClientSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -53,6 +57,7 @@ public class CacheQueryNewClientSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testQueryFromNewClient() throws Exception { Ignite srv = startGrid("server"); @@ -88,6 +93,7 @@ public void testQueryFromNewClient() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryFromNewClientCustomSchemaName() throws Exception { Ignite srv = startGrid("server"); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheRandomOperationsMultithreadedTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheRandomOperationsMultithreadedTest.java index c2f31f73f060d..0662d50da546d 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheRandomOperationsMultithreadedTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheRandomOperationsMultithreadedTest.java @@ -46,6 +46,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -55,6 +58,7 @@ /** * */ +@RunWith(JUnit4.class) public class CacheRandomOperationsMultithreadedTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -93,6 +97,7 @@ public class CacheRandomOperationsMultithreadedTest extends GridCommonAbstractTe /** * @throws Exception If failed. */ + @Test public void testAtomicOffheapEviction() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, ATOMIC, @@ -105,6 +110,7 @@ public void testAtomicOffheapEviction() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAtomicOffheapEvictionIndexing() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, ATOMIC, @@ -117,6 +123,7 @@ public void testAtomicOffheapEvictionIndexing() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxOffheapEviction() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, TRANSACTIONAL, @@ -129,6 +136,7 @@ public void testTxOffheapEviction() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxOffheapEvictionIndexing() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, TRANSACTIONAL, diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheScanPartitionQueryFallbackSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheScanPartitionQueryFallbackSelfTest.java index 2e66b71457d21..7265c2c956c0b 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheScanPartitionQueryFallbackSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheScanPartitionQueryFallbackSelfTest.java @@ -60,10 +60,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests partition scan query fallback. */ +@RunWith(JUnit4.class) public class CacheScanPartitionQueryFallbackSelfTest extends GridCommonAbstractTest { /** Grid count. */ private static final int GRID_CNT = 3; @@ -128,6 +132,7 @@ public class CacheScanPartitionQueryFallbackSelfTest extends GridCommonAbstractT * * @throws Exception If failed. */ + @Test public void testScanLocal() throws Exception { cacheMode = CacheMode.PARTITIONED; backups = 0; @@ -155,6 +160,7 @@ public void testScanLocal() throws Exception { * * @throws Exception If failed. */ + @Test public void testScanLocalExplicit() throws Exception { cacheMode = CacheMode.PARTITIONED; backups = 0; @@ -190,6 +196,7 @@ public void testScanLocalExplicit() throws Exception { * * @throws Exception If failed. */ + @Test public void testScanLocalExplicitNoPart() throws Exception { cacheMode = CacheMode.PARTITIONED; backups = 0; @@ -215,6 +222,7 @@ public void testScanLocalExplicitNoPart() throws Exception { * * @throws Exception If failed. */ + @Test public void testScanRemote() throws Exception { cacheMode = CacheMode.PARTITIONED; backups = 0; @@ -244,6 +252,7 @@ public void testScanRemote() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testScanFallbackOnRebalancing() throws Exception { scanFallbackOnRebalancing(false); } @@ -341,6 +350,7 @@ private void scanFallbackOnRebalancing(final boolean cur) throws Exception { * * @throws Exception In case of error. */ + @Test public void testScanFallbackOnRebalancingCursor1() throws Exception { cacheMode = CacheMode.PARTITIONED; clientMode = false; @@ -408,6 +418,7 @@ public void testScanFallbackOnRebalancingCursor1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testScanFallbackOnRebalancingCursor2() throws Exception { scanFallbackOnRebalancing(true); } @@ -577,4 +588,4 @@ private static class TestFallbackOnRebalancingCommunicationSpiFactory implements return new TcpCommunicationSpi(); } } -} \ No newline at end of file +} diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheSqlQueryValueCopySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheSqlQueryValueCopySelfTest.java index 5b92726f85a11..5647d090d795b 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheSqlQueryValueCopySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheSqlQueryValueCopySelfTest.java @@ -38,10 +38,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests modification of values returned by query iterators with enabled copy on read. */ +@RunWith(JUnit4.class) public class CacheSqlQueryValueCopySelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -98,6 +102,7 @@ public class CacheSqlQueryValueCopySelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testTwoStepSqlClientQuery() throws Exception { try (Ignite client = startGrid("client")) { IgniteCache cache = client.cache(DEFAULT_CACHE_NAME); @@ -128,6 +133,7 @@ public void testTwoStepSqlClientQuery() throws Exception { /** * Test two step query without local reduce phase. */ + @Test public void testTwoStepSkipReduceSqlQuery() { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -145,6 +151,7 @@ public void testTwoStepSkipReduceSqlQuery() { /** * Test two step query value copy. */ + @Test public void testTwoStepReduceSqlQuery() { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -163,6 +170,7 @@ public void testTwoStepReduceSqlQuery() { /** * Tests local sql query. */ + @Test public void testLocalSqlQuery() { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -182,6 +190,7 @@ public void testLocalSqlQuery() { /** * Tests local sql query. */ + @Test public void testLocalSqlFieldsQuery() { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -224,6 +233,7 @@ private IgniteInternalFuture runQueryAsync(final Query qry) throws Excepti * * @throws Exception If failed. */ + @Test public void testRunningSqlFieldsQuery() throws Exception { IgniteInternalFuture fut = runQueryAsync(new SqlFieldsQuery("select _val, sleep(1000) from Value limit 3")); @@ -264,6 +274,7 @@ public void testRunningSqlFieldsQuery() throws Exception { * * @throws Exception If failed. */ + @Test public void testRunningSqlQuery() throws Exception { IgniteInternalFuture fut = runQueryAsync(new SqlQuery(Value.class, "id > sleep(100)")); @@ -304,6 +315,7 @@ public void testRunningSqlQuery() throws Exception { * * @throws Exception If failed. */ + @Test public void testCancelingSqlFieldsQuery() throws Exception { runQueryAsync(new SqlFieldsQuery("select * from (select _val, sleep(100) from Value limit 50)")); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ClientReconnectAfterClusterRestartTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ClientReconnectAfterClusterRestartTest.java index 02e6238b79010..b4e5663f04dd0 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ClientReconnectAfterClusterRestartTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ClientReconnectAfterClusterRestartTest.java @@ -41,9 +41,13 @@ import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** */ +@RunWith(JUnit4.class) public class ClientReconnectAfterClusterRestartTest extends GridCommonAbstractTest { /** Server id. */ private static final int SERVER_ID = 0; @@ -120,6 +124,7 @@ public class ClientReconnectAfterClusterRestartTest extends GridCommonAbstractTe } /** */ + @Test public void testReconnectClient() throws Exception { try { startGrid(SERVER_ID); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ClusterReadOnlyModeSqlTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ClusterReadOnlyModeSqlTest.java index d431f73fb0576..9a91fe215cb2b 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ClusterReadOnlyModeSqlTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ClusterReadOnlyModeSqlTest.java @@ -24,14 +24,19 @@ import org.apache.ignite.cache.query.FieldsQueryCursor; import org.apache.ignite.cache.query.SqlFieldsQuery; import org.apache.ignite.internal.util.typedef.G; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests SQL queries in read-only cluster mode. */ +@RunWith(JUnit4.class) public class ClusterReadOnlyModeSqlTest extends ClusterReadOnlyModeAbstractTest { /** * */ + @Test public void testSqlReadOnly() { assertSqlReadOnlyMode(false); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/DdlTransactionSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/DdlTransactionSelfTest.java index 6652559a15060..97c9696c154dd 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/DdlTransactionSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/DdlTransactionSelfTest.java @@ -34,10 +34,14 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.apache.ignite.transactions.TransactionState; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class DdlTransactionSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -84,6 +88,7 @@ private CacheConfiguration getCacheConfiguration() { /** * @throws Exception If failed. */ + @Test public void testTxIsCommittedOnDdlRequestMultinodeClient() throws Exception { startGridsMultiThreaded(4, false); @@ -132,6 +137,7 @@ public void testTxIsCommittedOnDdlRequestMultinodeClient() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxIsCommittedOnDdlRequestMultinode() throws Exception { Ignite node = startGridsMultiThreaded(4); @@ -174,6 +180,7 @@ public void testTxIsCommittedOnDdlRequestMultinode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxIsCommittedOnDdlRequest() throws Exception { Ignite node = startGrid(); @@ -216,6 +223,7 @@ public void testTxIsCommittedOnDdlRequest() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDdlRequestWithoutTxMultinodeClient() throws Exception { startGridsMultiThreaded(4, false); @@ -260,6 +268,7 @@ public void testDdlRequestWithoutTxMultinodeClient() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDdlRequestWithoutTxMultinode() throws Exception { Ignite node = startGridsMultiThreaded(4); @@ -298,6 +307,7 @@ public void testDdlRequestWithoutTxMultinode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDdlRequestWithoutTx() throws Exception { Ignite node = startGrid(); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTest.java index cf8bb2ebe6b09..098bf659d58df 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTest.java @@ -45,6 +45,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; @@ -52,6 +55,7 @@ /** * Tests cross cache queries. */ +@RunWith(JUnit4.class) public class GridCacheCrossCacheQuerySelfTest extends GridCommonAbstractTest { /** */ private static final String PART_CACHE_NAME = "partitioned"; @@ -128,6 +132,7 @@ private static CacheConfiguration createCache(String name, CacheMode mode, Class /** * @throws Exception If failed. */ + @Test public void testTwoStepGroupAndAggregates() throws Exception { IgniteInternalCache cache = ((IgniteKernal)ignite).getCache(PART_CACHE_NAME); @@ -228,6 +233,7 @@ public void testTwoStepGroupAndAggregates() throws Exception { /** * @throws Exception If failed. */ + @Test public void testApiQueries() throws Exception { IgniteCache c = ignite.cache(PART_CACHE_NAME); @@ -243,6 +249,7 @@ public void testApiQueries() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultiStatement() throws Exception { final IgniteInternalCache cache = ((IgniteKernal)ignite).getCache(PART_CACHE_NAME); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDynamicLoadOnClientTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDynamicLoadOnClientTest.java index 5cc559ee5622b..179b94737e0a5 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDynamicLoadOnClientTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDynamicLoadOnClientTest.java @@ -38,10 +38,14 @@ import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test lazy cache start on client nodes with inmemory cache. */ +@RunWith(JUnit4.class) public class GridCacheDynamicLoadOnClientTest extends GridCommonAbstractTest { /** Cache name. */ private static final String PERSON_CACHE = "Person"; @@ -103,6 +107,7 @@ public class GridCacheDynamicLoadOnClientTest extends GridCommonAbstractTest { * * @throws Exception If failure. */ + @Test public void testBatchMerge() throws Exception { final int BATCH_SIZE = 7; @@ -127,6 +132,7 @@ public void testBatchMerge() throws Exception { * * @throws Exception If failure. */ + @Test public void testClientJdbcDelete() throws Exception { try (Connection con = connect(clientNode); Statement stmt = con.createStatement()) { @@ -145,6 +151,7 @@ public void testClientJdbcDelete() throws Exception { * * @throws Exception If failure. */ + @Test public void testClientJdbcInsert() throws Exception { try (Connection con = connect(clientNode); Statement stmt = con.createStatement()) { @@ -164,6 +171,7 @@ public void testClientJdbcInsert() throws Exception { * * @throws Exception If failure. */ + @Test public void testClientJdbcUpdate() throws Exception { try (Connection con = connect(clientNode); Statement stmt = con.createStatement()) { @@ -182,6 +190,7 @@ public void testClientJdbcUpdate() throws Exception { * * @throws Exception If failure. */ + @Test public void testClientJdbc() throws Exception { try (Connection con = connect(clientNode); Statement st = con.createStatement()) { @@ -196,6 +205,7 @@ public void testClientJdbc() throws Exception { /** * Test from client node to put cache elements through cache API. */ + @Test public void testClientPut() { clientNode.cache(PERSON_CACHE).put(-100, new Person(-100, "name-")); @@ -205,6 +215,7 @@ public void testClientPut() { /** * Test from client node to get cache elements through cache API. */ + @Test public void testClientSqlFieldsQuery() { SqlFieldsQuery qry = new SqlFieldsQuery("SELECT * FROM " + FULL_TABLE_NAME); @@ -214,6 +225,7 @@ public void testClientSqlFieldsQuery() { /** * Test from client node to get cache elements through cache API. */ + @Test public void testClientSqlQuery() { SqlQuery qry = new SqlQuery<>(PERSON_CACHE, "FROM " + PERSON_CACHE); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFullTextQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFullTextQuerySelfTest.java index 14ad39a5c7736..7027de6c187b2 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFullTextQuerySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFullTextQuerySelfTest.java @@ -47,6 +47,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -54,6 +57,7 @@ /** * FullTest queries left test. */ +@RunWith(JUnit4.class) public class GridCacheFullTextQuerySelfTest extends GridCommonAbstractTest { /** Cache size. */ private static final int MAX_ITEM_COUNT = 100; @@ -102,6 +106,7 @@ public class GridCacheFullTextQuerySelfTest extends GridCommonAbstractTest { /** * @throws Exception In case of error. */ + @Test public void testTextQueryWithField() throws Exception { checkTextQuery("name:1*", false, false); } @@ -109,6 +114,7 @@ public void testTextQueryWithField() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testLocalTextQueryWithKeepBinary() throws Exception { checkTextQuery(true, true); } @@ -116,6 +122,7 @@ public void testLocalTextQueryWithKeepBinary() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testLocalTextQuery() throws Exception { checkTextQuery(true, false); } @@ -123,6 +130,7 @@ public void testLocalTextQuery() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testTextQueryWithKeepBinary() throws Exception { checkTextQuery(false, true); } @@ -130,6 +138,7 @@ public void testTextQueryWithKeepBinary() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testTextQuery() throws Exception { checkTextQuery(false, true); } @@ -371,4 +380,4 @@ public Person(String name, int age) { birthday = cal.getTime(); } } -} \ No newline at end of file +} diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLazyQueryPartitionsReleaseTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLazyQueryPartitionsReleaseTest.java index a11296966c938..fd2d9ed0df39f 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLazyQueryPartitionsReleaseTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLazyQueryPartitionsReleaseTest.java @@ -38,10 +38,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test to lazy query partitions has not been released too early. */ +@RunWith(JUnit4.class) public class GridCacheLazyQueryPartitionsReleaseTest extends GridCommonAbstractTest { /** IP finder */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -84,6 +88,7 @@ public class GridCacheLazyQueryPartitionsReleaseTest extends GridCommonAbstractT * * @throws Exception If failed. */ + @Test public void testLazyQueryPartitionsRelease() throws Exception { Ignite node1 = startGrid(0); @@ -131,6 +136,7 @@ public void testLazyQueryPartitionsRelease() throws Exception { * * @throws Exception If failed. */ + @Test public void testLazyQueryPartitionsReleaseOnClose() throws Exception { Ignite node1 = startGrid(0); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapSelfTest.java index e06f6a6a3b660..f39c916d91810 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapSelfTest.java @@ -30,6 +30,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.REPLICATED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -38,6 +41,7 @@ /** * Test for cache swap. */ +@RunWith(JUnit4.class) public class GridCacheOffHeapSelfTest extends GridCommonAbstractTest { /** Saved versions. */ private final Map versions = new HashMap<>(); @@ -78,6 +82,7 @@ public class GridCacheOffHeapSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testOffHeapIterator() throws Exception { try { startGrids(1); @@ -142,4 +147,4 @@ public int value() { return S.toString(CacheValue.class, this); } } -} \ No newline at end of file +} diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapIndexEntryEvictTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapIndexEntryEvictTest.java index e14da4a22918c..5614c2e7b0a2d 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapIndexEntryEvictTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapIndexEntryEvictTest.java @@ -33,6 +33,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -41,6 +44,7 @@ /** * */ +@RunWith(JUnit4.class) public class GridCacheOffheapIndexEntryEvictTest extends GridCommonAbstractTest { /** */ private final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -80,6 +84,7 @@ public class GridCacheOffheapIndexEntryEvictTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testQueryWhenLocked() throws Exception { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -112,6 +117,7 @@ public void testQueryWhenLocked() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUpdates() throws Exception { final int ENTRIES = 500; @@ -189,4 +195,4 @@ public TestValue(int val) { val = in.readInt(); } } -} \ No newline at end of file +} diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapIndexGetSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapIndexGetSelfTest.java index 321a201297374..ae83d0cc9780c 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapIndexGetSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapIndexGetSelfTest.java @@ -36,6 +36,9 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -45,6 +48,7 @@ /** * Tests off heap storage when both offheaped and swapped entries exists. */ +@RunWith(JUnit4.class) public class GridCacheOffheapIndexGetSelfTest extends GridCommonAbstractTest { /** */ private final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -100,6 +104,7 @@ protected CacheConfiguration cacheConfiguration() { * * @throws Exception If failed. */ + @Test public void testGet() throws Exception { IgniteCache cache = jcache(grid(0), cacheConfiguration(), Long.class, Long.class); @@ -124,6 +129,7 @@ public void testGet() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutGet() throws Exception { IgniteCache cache = jcache(grid(0), cacheConfiguration(), Object.class, Object.class); @@ -151,6 +157,7 @@ public void testPutGet() throws Exception { /** * @throws Exception If failed. */ + @Test public void testWithExpiryPolicy() throws Exception { IgniteCache cache = jcache(grid(0), cacheConfiguration(), Long.class, Long.class); @@ -223,4 +230,4 @@ public void setValue(String val) { this.val = val; } } -} \ No newline at end of file +} diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryIndexDisabledSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryIndexDisabledSelfTest.java index 14b1f67233118..4fb3202636883 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryIndexDisabledSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryIndexDisabledSelfTest.java @@ -34,9 +34,13 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** */ +@RunWith(JUnit4.class) public class GridCacheQueryIndexDisabledSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -68,6 +72,7 @@ public GridCacheQueryIndexDisabledSelfTest() { /** * @throws Exception If failed. */ + @Test public void testSqlQuery() throws Exception { IgniteCache cache = grid().getOrCreateCache(SqlValue.class.getSimpleName()); @@ -87,6 +92,7 @@ public void testSqlQuery() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSqlFieldsQuery() throws Exception { IgniteCache cache = grid().getOrCreateCache(SqlValue.class.getSimpleName()); @@ -118,6 +124,7 @@ public void testSqlFieldsQuery() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFullTextQuery() throws Exception { IgniteCache cache = grid().getOrCreateCache(String.class.getSimpleName()); @@ -137,6 +144,7 @@ public void testFullTextQuery() throws Exception { /** * @throws Exception If failed. */ + @Test public void testScanLocalQuery() throws Exception { IgniteCache cache = grid().getOrCreateCache(String.class.getSimpleName()); @@ -154,6 +162,7 @@ public void testScanLocalQuery() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSqlLocalQuery() throws Exception { IgniteCache cache = grid().getOrCreateCache(SqlValue.class.getSimpleName()); @@ -173,6 +182,7 @@ public void testSqlLocalQuery() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSqlLocalFieldsQuery() throws Exception { IgniteCache cache = grid().getOrCreateCache(SqlValue.class.getSimpleName()); @@ -192,6 +202,7 @@ public void testSqlLocalFieldsQuery() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFullTextLocalQuery() throws Exception { IgniteCache cache = grid().getOrCreateCache(String.class.getSimpleName()); @@ -211,6 +222,7 @@ public void testFullTextLocalQuery() throws Exception { /** * @throws Exception If failed. */ + @Test public void testScanQuery() throws Exception { IgniteCache cache = grid().getOrCreateCache(String.class.getSimpleName()); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQuerySerializationSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQuerySerializationSelfTest.java index 85fd6db977b03..c19e1853a71d4 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQuerySerializationSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQuerySerializationSelfTest.java @@ -32,6 +32,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -39,6 +42,7 @@ /** * Tests for cache query results serialization. */ +@RunWith(JUnit4.class) public class GridCacheQuerySerializationSelfTest extends GridCommonAbstractTest { /** */ private static final int GRID_CNT = 2; @@ -102,6 +106,7 @@ private GridCacheQueryTestValue value(String f1, int f2, long f3) { * * @throws Exception In case of error. */ + @Test public void testSerialization() throws Exception { IgniteEx g0 = grid(0); @@ -142,4 +147,4 @@ private static class QueryCallable implements IgniteCallable cache = ignite.cache(DEFAULT_CACHE_NAME); @@ -111,4 +116,4 @@ public void testQuery() throws Exception { assertEquals(10, cache.query(qry.setArgs(0)).getAll().size()); } -} \ No newline at end of file +} diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryObjectFieldsQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryObjectFieldsQuerySelfTest.java index 21e4852c30bae..565cb27913d7e 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryObjectFieldsQuerySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryObjectFieldsQuerySelfTest.java @@ -37,10 +37,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests that server nodes do not need class definitions to execute queries. */ +@RunWith(JUnit4.class) public class IgniteBinaryObjectFieldsQuerySelfTest extends GridCommonAbstractTest { /** */ public static final String PERSON_KEY_CLS_NAME = "org.apache.ignite.tests.p2p.cache.PersonKey"; @@ -121,6 +125,7 @@ protected void initExtClassLoader() { /** * @throws Exception If failed. */ + @Test public void testQueryPartitionedAtomic() throws Exception { checkQuery(CacheMode.PARTITIONED, CacheAtomicityMode.ATOMIC); } @@ -128,6 +133,7 @@ public void testQueryPartitionedAtomic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryReplicatedAtomic() throws Exception { checkQuery(CacheMode.REPLICATED, CacheAtomicityMode.ATOMIC); } @@ -135,6 +141,7 @@ public void testQueryReplicatedAtomic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryPartitionedTransactional() throws Exception { checkQuery(CacheMode.PARTITIONED, CacheAtomicityMode.TRANSACTIONAL); } @@ -142,6 +149,7 @@ public void testQueryPartitionedTransactional() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryReplicatedTransactional() throws Exception { checkQuery(CacheMode.REPLICATED, CacheAtomicityMode.TRANSACTIONAL); } @@ -149,6 +157,7 @@ public void testQueryReplicatedTransactional() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFieldsQueryPartitionedAtomic() throws Exception { checkFieldsQuery(CacheMode.PARTITIONED, CacheAtomicityMode.ATOMIC); } @@ -156,6 +165,7 @@ public void testFieldsQueryPartitionedAtomic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFieldsQueryReplicatedAtomic() throws Exception { checkFieldsQuery(CacheMode.REPLICATED, CacheAtomicityMode.ATOMIC); } @@ -163,6 +173,7 @@ public void testFieldsQueryReplicatedAtomic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFieldsQueryPartitionedTransactional() throws Exception { checkFieldsQuery(CacheMode.PARTITIONED, CacheAtomicityMode.TRANSACTIONAL); } @@ -170,6 +181,7 @@ public void testFieldsQueryPartitionedTransactional() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFieldsQueryReplicatedTransactional() throws Exception { checkFieldsQuery(CacheMode.REPLICATED, CacheAtomicityMode.TRANSACTIONAL); } diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryObjectQueryArgumentsTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryObjectQueryArgumentsTest.java index e23935324b221..11afcf931575a 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryObjectQueryArgumentsTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryObjectQueryArgumentsTest.java @@ -41,12 +41,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * */ +@RunWith(JUnit4.class) public class IgniteBinaryObjectQueryArgumentsTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -185,6 +189,7 @@ private CacheConfiguration getCacheConfiguration(final String cacheName, final C /** * @throws Exception If failed. */ + @Test public void testObjectArgument() throws Exception { testKeyQuery(OBJECT_CACHE, new TestKey(1), new TestKey(2)); } @@ -192,6 +197,7 @@ public void testObjectArgument() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPrimitiveObjectArgument() throws Exception { testKeyValQuery(PRIM_CACHE, 1, 2); } @@ -199,6 +205,7 @@ public void testPrimitiveObjectArgument() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStringObjectArgument() throws Exception { testKeyValQuery(STR_CACHE, "str1", "str2"); } @@ -206,6 +213,7 @@ public void testStringObjectArgument() throws Exception { /** * @throws Exception If failed. */ + @Test public void testEnumObjectArgument() throws Exception { testKeyValQuery(ENUM_CACHE, EnumKey.KEY1, EnumKey.KEY2); } @@ -213,6 +221,7 @@ public void testEnumObjectArgument() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUuidObjectArgument() throws Exception { final UUID uuid1 = UUID.randomUUID(); UUID uuid2 = UUID.randomUUID(); @@ -226,6 +235,7 @@ public void testUuidObjectArgument() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDateObjectArgument() throws Exception { testKeyValQuery(DATE_CACHE, new Date(0), new Date(1)); } @@ -233,6 +243,7 @@ public void testDateObjectArgument() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTimestampArgument() throws Exception { testKeyValQuery(TIMESTAMP_CACHE, new Timestamp(0), new Timestamp(1)); } @@ -241,6 +252,7 @@ public void testTimestampArgument() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBigDecimalArgument() throws Exception { final ThreadLocalRandom rnd = ThreadLocalRandom.current(); @@ -353,6 +365,7 @@ private void testValQuery(final String cacheName, final T val1, final T val2 /** * @throws Exception If failed. */ + @Test public void testFieldSearch() throws Exception { final IgniteCache cache = ignite(0).cache(FIELD_CACHE); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryWrappedObjectFieldsQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryWrappedObjectFieldsQuerySelfTest.java index bff725c2eadd6..8313e7432b802 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryWrappedObjectFieldsQuerySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryWrappedObjectFieldsQuerySelfTest.java @@ -23,7 +23,7 @@ public class IgniteBinaryWrappedObjectFieldsQuerySelfTest extends IgniteBinaryObjectFieldsQuerySelfTest { /** {@inheritDoc} */ - protected String getPersonClassName() { + @Override protected String getPersonClassName() { return "org.apache.ignite.tests.p2p.cache.PersonWrapper$Person"; } } diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractFieldsQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractFieldsQuerySelfTest.java index dbae0939781f9..ceb6e1279a3c9 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractFieldsQuerySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractFieldsQuerySelfTest.java @@ -61,6 +61,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -69,6 +72,7 @@ /** * Tests for fields queries. */ +@RunWith(JUnit4.class) public abstract class IgniteCacheAbstractFieldsQuerySelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -221,6 +225,7 @@ protected CacheAtomicityMode atomicityMode() { protected abstract int gridCount(); /** @throws Exception If failed. */ + @Test public void testCacheMetaData() throws Exception { // Put internal key to test filtering of internal objects. @@ -364,6 +369,7 @@ else if (!"cacheWithCustomKeyPrecision".equalsIgnoreCase(meta.cacheName())) /** * */ + @Test public void testExplain() { List> res = grid(0).cache(personCache.getName()).query(sqlFieldsQuery( String.format("explain select p.age, p.name, o.name " + @@ -384,6 +390,7 @@ public void testExplain() { /** @throws Exception If failed. */ @SuppressWarnings("unchecked") + @Test public void testExecuteWithMetaDataAndPrecision() throws Exception { QueryEntity qeWithPrecision = new QueryEntity() .setKeyType("java.lang.Long") @@ -422,6 +429,7 @@ public void testExecuteWithMetaDataAndPrecision() throws Exception { } } + @Test public void testExecuteWithMetaDataAndCustomKeyPrecision() throws Exception { QueryEntity qeWithPrecision = new QueryEntity() .setKeyType("java.lang.String") @@ -479,6 +487,7 @@ public void testExecuteWithMetaDataAndCustomKeyPrecision() throws Exception { } /** @throws Exception If failed. */ + @Test public void testExecuteWithMetaData() throws Exception { QueryCursorImpl> cursor = (QueryCursorImpl>)personCache.query(sqlFieldsQuery( String.format("select p._KEY, p.name, p.age, o.name " + @@ -579,11 +588,13 @@ else if (cnt == 1) { } /** @throws Exception If failed. */ + @Test public void testExecute() throws Exception { doTestExecute(personCache, sqlFieldsQuery("select _KEY, name, age from Person")); } /** @throws Exception If failed. */ + @Test public void testExecuteNoOpCache() throws Exception { doTestExecute(noOpCache, sqlFieldsQuery("select _KEY, name, age from \"AffinityKey-Person\".Person")); } @@ -639,6 +650,7 @@ else if (cnt == 1) { } /** @throws Exception If failed. */ + @Test public void testExecuteWithArguments() throws Exception { QueryCursor> qry = personCache .query(sqlFieldsQuery("select _KEY, name, age from Person where age > ?").setArgs(30)); @@ -691,6 +703,7 @@ private SqlFieldsQuery sqlFieldsQuery(String sql) { } /** @throws Exception If failed. */ + @Test public void testSelectAllJoined() throws Exception { QueryCursor> qry = personCache.query(sqlFieldsQuery( @@ -755,6 +768,7 @@ else if (cnt == 1) { } /** @throws Exception If failed. */ + @Test public void testEmptyResult() throws Exception { QueryCursor> qry = personCache.query(sqlFieldsQuery("select name from Person where age = 0")); @@ -771,6 +785,7 @@ public void testEmptyResult() throws Exception { * * @throws Exception If failed. */ + @Test public void testSingleResultUsesFindOne() throws Exception { QueryCursor> qry = intCache.query(sqlFieldsQuery("select _val from Integer where _key = 25")); @@ -790,6 +805,7 @@ public void testSingleResultUsesFindOne() throws Exception { * * @throws Exception If failed. */ + @Test public void testEmptyResultUsesFindOne() throws Exception { QueryCursor> qry = intCache.query(sqlFieldsQuery("select _val from Integer where _key = -10")); @@ -801,6 +817,7 @@ public void testEmptyResultUsesFindOne() throws Exception { } /** @throws Exception If failed. */ + @Test public void testQueryString() throws Exception { QueryCursor> qry = strCache.query(sqlFieldsQuery("select * from String")); @@ -818,6 +835,7 @@ public void testQueryString() throws Exception { } /** @throws Exception If failed. */ + @Test public void testQueryIntegersWithJoin() throws Exception { QueryCursor> qry = intCache.query(sqlFieldsQuery( "select i._KEY, i._VAL, j._KEY, j._VAL from Integer i join Integer j where i._VAL >= 100")); @@ -840,6 +858,7 @@ public void testQueryIntegersWithJoin() throws Exception { } /** @throws Exception If failed. */ + @Test public void testPagination() throws Exception { // Query with page size 20. QueryCursor> qry = @@ -862,6 +881,7 @@ public void testPagination() throws Exception { } /** @throws Exception If failed. */ + @Test public void testNamedCache() throws Exception { try { IgniteCache cache = jcache("tmp_int", Integer.class, Integer.class); @@ -882,6 +902,7 @@ public void testNamedCache() throws Exception { } /** @throws Exception If failed. */ + @Test public void testNoPrimitives() throws Exception { try { final IgniteCache cache = grid(0).getOrCreateCache("tmp_without_index"); @@ -900,6 +921,7 @@ public void testNoPrimitives() throws Exception { } /** @throws Exception If failed. */ + @Test public void testComplexKeys() throws Exception { IgniteCache cache = jcache(PersonKey.class, Person.class); @@ -941,6 +963,7 @@ else if (cnt == 5) /** * @throws Exception If failed. */ + @Test public void testPaginationIterator() throws Exception { QueryCursor> qry = intCache.query(sqlFieldsQuery("select _key, _val from Integer").setPageSize(10)); @@ -961,6 +984,7 @@ public void testPaginationIterator() throws Exception { } /** @throws Exception If failed. */ + @Test public void testPaginationIteratorKeepAll() throws Exception { QueryCursor> qry = intCache.query(sqlFieldsQuery("select _key, _val from Integer").setPageSize(10)); @@ -1002,6 +1026,7 @@ public void testPaginationIteratorKeepAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPaginationGet() throws Exception { QueryCursor> qry = intCache.query(sqlFieldsQuery("select _key, _val from Integer").setPageSize(10)); @@ -1025,6 +1050,7 @@ public void testPaginationGet() throws Exception { } /** @throws Exception If failed. */ + @Test public void testEmptyGrid() throws Exception { QueryCursor> qry = personCache .query(sqlFieldsQuery("select name, age from Person where age = 25")); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java index d5b8cccd3225e..d2f48c461785d 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java @@ -86,6 +86,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -103,6 +106,7 @@ /** * Various tests for cache queries. */ +@RunWith(JUnit4.class) public abstract class IgniteCacheAbstractQuerySelfTest extends GridCommonAbstractTest { /** Key count. */ private static final int KEY_CNT = 5000; @@ -286,6 +290,7 @@ protected Ignite ignite() { * * @throws Exception In case of error. */ + @Test public void testDifferentKeyTypes() throws Exception { final IgniteCache cache = jcache(Object.class, Object.class); @@ -299,6 +304,7 @@ public void testDifferentKeyTypes() throws Exception { * * @throws Exception In case of error. */ + @Test public void testDifferentValueTypes() throws Exception { IgniteCache cache = jcache(Integer.class, Object.class); @@ -314,6 +320,7 @@ public void testDifferentValueTypes() throws Exception { * * @throws Exception In case of error. */ + @Test public void testStringType() throws Exception { IgniteCache cache = jcache(Integer.class, String.class); @@ -333,6 +340,7 @@ public void testStringType() throws Exception { * * @throws Exception In case of error. */ + @Test public void testIntegerType() throws Exception { IgniteCache cache = jcache(Integer.class, Integer.class); @@ -358,6 +366,7 @@ public void testIntegerType() throws Exception { * * @throws Exception In case of error. */ + @Test public void testTableAliasInSqlQuery() throws Exception { IgniteCache cache = jcache(Integer.class, Integer.class); @@ -395,6 +404,7 @@ public void testTableAliasInSqlQuery() throws Exception { * * @throws IgniteCheckedException If failed. */ + @Test public void testUserDefinedFunction() throws IgniteCheckedException { // Without alias. final IgniteCache cache = jcache(Object.class, Object.class); @@ -442,6 +452,7 @@ public void testUserDefinedFunction() throws IgniteCheckedException { * * @throws Exception If failed. */ + @Test public void testExpiration() throws Exception { IgniteCache cache = jcache(Integer.class, Integer.class); @@ -474,6 +485,7 @@ public void testExpiration() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIllegalBounds() throws Exception { IgniteCache cache = jcache(Integer.class, Integer.class); @@ -491,6 +503,7 @@ public void testIllegalBounds() throws Exception { * * @throws Exception In case of error. */ + @Test public void testComplexType() throws Exception { IgniteCache cache = jcache(Key.class, GridCacheQueryTestValue.class); @@ -524,6 +537,7 @@ public void testComplexType() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testComplexTypeKeepBinary() throws Exception { if (ignite().configuration().getMarshaller() == null || ignite().configuration().getMarshaller() instanceof BinaryMarshaller) { IgniteCache cache = jcache(Key.class, GridCacheQueryTestValue.class); @@ -596,6 +610,7 @@ private Key(long id) { * * @throws Exception In case of error. */ + @Test public void testSelectQuery() throws Exception { IgniteCache cache = jcache(Integer.class, String.class); @@ -613,6 +628,7 @@ public void testSelectQuery() throws Exception { /** * JUnit. */ + @Test public void testSimpleCustomTableName() { CacheConfiguration cacheConf = new CacheConfiguration(cacheConfiguration()) .setName(DEFAULT_CACHE_NAME) @@ -654,6 +670,7 @@ public void testSimpleCustomTableName() { * * @throws Exception In case of error. */ + @Test public void testMixedCustomTableName() throws Exception { final IgniteCache cache = jcache(Integer.class, Object.class); @@ -700,6 +717,7 @@ public void testMixedCustomTableName() throws Exception { * * @throws Exception In case of error. */ + @Test public void testDistributedJoinCustomTableName() throws Exception { IgniteCache cache = jcache(Integer.class, Object.class); @@ -727,6 +745,7 @@ public void testDistributedJoinCustomTableName() throws Exception { * * @throws Exception In case of error. */ + @Test public void testObjectQuery() throws Exception { IgniteCache cache = jcache(Integer.class, ObjectValue.class); @@ -765,6 +784,7 @@ public void testObjectQuery() throws Exception { * * @throws Exception In case of error. */ + @Test public void testObjectWithString() throws Exception { IgniteCache cache = jcache(Integer.class, ObjectValue2.class); @@ -799,6 +819,7 @@ public void testObjectWithString() throws Exception { * * @throws Exception In case of error. */ + @Test public void testEnumObjectQuery() throws Exception { final IgniteCache cache = jcache(Long.class, EnumObject.class); @@ -934,6 +955,7 @@ private void assertEnumType(final List> enumObject /** * JUnit. */ + @Test public void testObjectQueryWithSwap() { CacheConfiguration config = new CacheConfiguration(cacheConfiguration()); @@ -1029,6 +1051,7 @@ public void testObjectQueryWithSwap() { * * @throws Exception In case of error. */ + @Test public void testFullTextSearch() throws Exception { IgniteCache cache = jcache(Integer.class, ObjectValue.class); @@ -1075,6 +1098,7 @@ public void testFullTextSearch() throws Exception { * * @throws Exception In case of error. */ + @Test public void testScanQuery() throws Exception { IgniteCache c1 = jcache(Integer.class, String.class); @@ -1113,6 +1137,7 @@ public void testScanQuery() throws Exception { /** * @throws Exception In case of error. */ + @Test public void testScanPartitionQuery() throws Exception { IgniteCache cache = jcache(Integer.class, Integer.class); @@ -1155,6 +1180,7 @@ public void testScanPartitionQuery() throws Exception { /** * JUnit. */ + @Test public void testTwoObjectsTextSearch() { CacheConfiguration conf = new CacheConfiguration<>(cacheConfiguration()); @@ -1185,6 +1211,7 @@ public void testTwoObjectsTextSearch() { /** * @throws Exception If failed. */ + @Test public void testPrimitiveType() throws Exception { IgniteCache cache = jcache(Integer.class, Integer.class); cache.put(1, 1); @@ -1206,6 +1233,7 @@ public void testPrimitiveType() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPaginationIteratorDefaultCache() throws Exception { testPaginationIterator(jcache(ignite(), cacheConfiguration(), DEFAULT_CACHE_NAME, Integer.class, Integer.class)); } @@ -1213,6 +1241,7 @@ public void testPaginationIteratorDefaultCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPaginationIteratorNamedCache() throws Exception { testPaginationIterator(jcache(ignite(), cacheConfiguration(), Integer.class, Integer.class)); } @@ -1246,6 +1275,7 @@ private void testPaginationIterator(IgniteCache cache) throws /** * @throws Exception If failed. */ + @Test public void testPaginationGetDefaultCache() throws Exception { testPaginationGet(jcache(ignite(), cacheConfiguration(), DEFAULT_CACHE_NAME, Integer.class, Integer.class)); } @@ -1253,6 +1283,7 @@ public void testPaginationGetDefaultCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPaginationGetNamedCache() throws Exception { testPaginationGet(jcache(ignite(), cacheConfiguration(), Integer.class, Integer.class)); } @@ -1287,6 +1318,7 @@ private void testPaginationGet(IgniteCache cache) throws Excep /** * @throws Exception If failed. */ + @Test public void testScanFilters() throws Exception { IgniteCache cache = jcache(Integer.class, Integer.class); @@ -1323,6 +1355,7 @@ public void testScanFilters() throws Exception { /** * @throws IgniteCheckedException if failed. */ + @Test public void testBadHashObjectKey() throws IgniteCheckedException { IgniteCache cache = jcache(BadHashKeyObject.class, Byte.class); @@ -1337,6 +1370,7 @@ public void testBadHashObjectKey() throws IgniteCheckedException { /** * @throws IgniteCheckedException if failed. */ + @Test public void testTextIndexedKey() throws IgniteCheckedException { IgniteCache cache = jcache(ObjectValue.class, Long.class); @@ -1352,6 +1386,7 @@ public void testTextIndexedKey() throws IgniteCheckedException { /** * @throws Exception If failed. */ + @Test public void testOrderByOnly() throws Exception { IgniteCache cache = jcache(Integer.class, Integer.class); @@ -1382,6 +1417,7 @@ public void testOrderByOnly() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLimitOnly() throws Exception { IgniteCache cache = jcache(Integer.class, Integer.class); @@ -1410,6 +1446,7 @@ public void testLimitOnly() throws Exception { /** * @throws Exception If failed. */ + @Test public void testArray() throws Exception { IgniteCache cache = jcache(Integer.class, ArrayObject.class); @@ -1433,6 +1470,7 @@ public void testArray() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSqlQueryEvents() throws Exception { checkSqlQueryEvents(); } @@ -1440,6 +1478,7 @@ public void testSqlQueryEvents() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFieldsQueryMetadata() throws Exception { IgniteCache cache = jcache(UUID.class, Person.class); @@ -1519,6 +1558,7 @@ private void checkSqlQueryEvents() throws Exception { /** * @throws Exception If failed. */ + @Test public void testScanQueryEvents() throws Exception { final Map map = new ConcurrentHashMap<>(); final IgniteCache cache = jcache(Integer.class, Integer.class); @@ -1623,6 +1663,7 @@ public void testScanQueryEvents() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTextQueryEvents() throws Exception { final Map map = new ConcurrentHashMap<>(); final IgniteCache cache = jcache(UUID.class, Person.class); @@ -1726,6 +1767,7 @@ public void testTextQueryEvents() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFieldsQueryEvents() throws Exception { final IgniteCache cache = jcache(UUID.class, Person.class); final boolean evtsDisabled = cache.getConfiguration(CacheConfiguration.class).isEventsDisabled(); @@ -1780,6 +1822,7 @@ public void testFieldsQueryEvents() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLocalSqlQueryFromClient() throws Exception { try { Ignite g = startGrid("client"); @@ -1803,6 +1846,7 @@ public void testLocalSqlQueryFromClient() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLocalSqlFieldsQueryFromClient() throws Exception { try { Ignite g = startGrid("client"); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheCollocatedQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheCollocatedQuerySelfTest.java index 2b3076c143bc8..8038798700c84 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheCollocatedQuerySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheCollocatedQuerySelfTest.java @@ -34,12 +34,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** */ +@RunWith(JUnit4.class) public class IgniteCacheCollocatedQuerySelfTest extends GridCommonAbstractTest { /** */ private static final String QRY = @@ -113,6 +117,7 @@ private static List> query(IgniteCache c, boolean /** * Correct affinity. */ + @Test public void testColocatedQueryRight() { IgniteCache c = ignite(0).cache(DEFAULT_CACHE_NAME); @@ -140,6 +145,7 @@ public void testColocatedQueryRight() { /** * Correct affinity. */ + @Test public void testColocatedQueryWrong() { IgniteCache c = ignite(0).cache(DEFAULT_CACHE_NAME); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsQueryTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsQueryTest.java index 152a325ab7018..7b6a07f8d3343 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsQueryTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsQueryTest.java @@ -38,6 +38,9 @@ import org.apache.ignite.lang.IgniteBiPredicate; import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.testframework.junits.IgniteCacheConfigVariationsAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -49,6 +52,7 @@ /** * Config Variations query tests. */ +@RunWith(JUnit4.class) public class IgniteCacheConfigVariationsQueryTest extends IgniteCacheConfigVariationsAbstractTest { /** */ public static final int CNT = 50; @@ -75,6 +79,7 @@ public class IgniteCacheConfigVariationsQueryTest extends IgniteCacheConfigVaria * @throws Exception If failed. */ @SuppressWarnings("serial") + @Test public void testScanQuery() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -106,6 +111,7 @@ public void testScanQuery() throws Exception { /** * @throws Exception If failed. */ + @Test public void testScanPartitionQuery() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -164,6 +170,7 @@ public void testScanPartitionQuery() throws Exception { /** * @throws Exception If failed. */ + @Test public void testScanFilters() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -207,6 +214,7 @@ public void testScanFilters() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLocalScanQuery() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -244,6 +252,7 @@ public void testLocalScanQuery() throws Exception { /** * @throws Exception If failed. */ + @Test public void testScanQueryLocalFilter() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { @@ -290,6 +299,7 @@ public void testScanQueryLocalFilter() throws Exception { /** * @throws Exception If failed. */ + @Test public void testScanQueryPartitionFilter() throws Exception { runInAllDataModes(new TestRunnable() { @Override public void run() throws Exception { diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationPrimitiveTypesSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationPrimitiveTypesSelfTest.java index 10fc58eb03af3..eaa44202f6ae2 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationPrimitiveTypesSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationPrimitiveTypesSelfTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteCacheConfigurationPrimitiveTypesSelfTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -55,6 +59,7 @@ public class IgniteCacheConfigurationPrimitiveTypesSelfTest extends GridCommonAb /** * @throws Exception If failed. */ + @Test public void testPrimitiveTypes() throws Exception { Ignite ignite = startGrid(1); @@ -95,4 +100,4 @@ public void testPrimitiveTypes() throws Exception { assertEquals(cacheDouble.query(new SqlQuery<>(Double.class, "1 = 1")).getAll().size(), 1); assertEquals(cacheBoolean.query(new SqlQuery<>(Boolean.class, "1 = 1")).getAll().size(), 1); } -} \ No newline at end of file +} diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheCrossCacheJoinRandomTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheCrossCacheJoinRandomTest.java index 3ebb3b4bb894c..a34d33cadcb99 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheCrossCacheJoinRandomTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheCrossCacheJoinRandomTest.java @@ -42,6 +42,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -51,6 +54,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheCrossCacheJoinRandomTest extends AbstractH2CompareQueryTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -195,6 +199,7 @@ private CacheConfiguration configuration(String name, CacheMode cacheMode, int b /** * @throws Exception If failed. */ + @Test public void testJoin2Caches() throws Exception { testJoin(2, MODES_1); } @@ -202,6 +207,7 @@ public void testJoin2Caches() throws Exception { /** * @throws Exception If failed. */ + @Test public void testJoin3Caches() throws Exception { testJoin(3, MODES_1); } @@ -209,6 +215,7 @@ public void testJoin3Caches() throws Exception { /** * @throws Exception If failed. */ + @Test public void testJoin4Caches() throws Exception { testJoin(4, MODES_2); } @@ -216,6 +223,7 @@ public void testJoin4Caches() throws Exception { /** * @throws Exception If failed. */ + @Test public void testJoin5Caches() throws Exception { testJoin(5, MODES_2); } diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDeleteSqlQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDeleteSqlQuerySelfTest.java index 92c40b8a8ed29..1baedf81bd951 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDeleteSqlQuerySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDeleteSqlQuerySelfTest.java @@ -22,15 +22,20 @@ import org.apache.ignite.IgniteCache; import org.apache.ignite.cache.query.QueryCursor; import org.apache.ignite.cache.query.SqlFieldsQuery; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class IgniteCacheDeleteSqlQuerySelfTest extends IgniteCacheAbstractSqlDmlQuerySelfTest { /** * */ + @Test public void testDeleteSimple() { IgniteCache p = cache(); @@ -55,6 +60,7 @@ public void testDeleteSimple() { /** * */ + @Test public void testDeleteSingle() { IgniteCache p = cache(); @@ -83,6 +89,7 @@ public void testDeleteSingle() { * In binary mode, this test checks that inner forcing of keepBinary works - without it, EntryProcessors * inside DML engine would compare binary and non-binary objects with the same keys and thus fail. */ + @Test public void testDeleteSimpleWithoutKeepBinary() { IgniteCache p = ignite(0).cache("S2P"); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDistributedJoinCollocatedAndNotTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDistributedJoinCollocatedAndNotTest.java index f53f2633cd832..80923a76e57db 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDistributedJoinCollocatedAndNotTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDistributedJoinCollocatedAndNotTest.java @@ -39,6 +39,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -46,6 +49,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheDistributedJoinCollocatedAndNotTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -156,6 +160,7 @@ private CacheConfiguration configuration(String name) { /** * @throws Exception If failed. */ + @Test public void testJoin() throws Exception { Ignite client = grid(2); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDistributedJoinCustomAffinityMapper.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDistributedJoinCustomAffinityMapper.java index b8aa4cb985861..ab0605f39dca9 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDistributedJoinCustomAffinityMapper.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDistributedJoinCustomAffinityMapper.java @@ -37,6 +37,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -45,6 +48,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheDistributedJoinCustomAffinityMapper extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -156,6 +160,7 @@ private CacheConfiguration configuration(String name) { /** * @throws Exception If failed. */ + @Test public void testJoinCustomAffinityMapper() throws Exception { Ignite ignite = ignite(0); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDistributedJoinNoIndexTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDistributedJoinNoIndexTest.java index f8bc0888792d0..abff110f849cb 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDistributedJoinNoIndexTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDistributedJoinNoIndexTest.java @@ -39,6 +39,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -46,6 +49,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheDistributedJoinNoIndexTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -132,6 +136,7 @@ private CacheConfiguration configuration(String name) { /** * @throws Exception If failed. */ + @Test public void testJoin() throws Exception { Ignite client = grid(2); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDistributedJoinPartitionedAndReplicatedTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDistributedJoinPartitionedAndReplicatedTest.java index 462a0082050a1..145b076d13776 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDistributedJoinPartitionedAndReplicatedTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDistributedJoinPartitionedAndReplicatedTest.java @@ -38,6 +38,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -47,6 +50,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheDistributedJoinPartitionedAndReplicatedTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -179,6 +183,7 @@ private List caches(boolean idx, /** * @throws Exception If failed. */ + @Test public void testJoin1() throws Exception { join(true, REPLICATED, PARTITIONED, PARTITIONED); } @@ -186,6 +191,7 @@ public void testJoin1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testJoin2() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-5956"); @@ -195,6 +201,7 @@ public void testJoin2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testJoin3() throws Exception { join(true, PARTITIONED, PARTITIONED, REPLICATED); } diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDistributedJoinQueryConditionsTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDistributedJoinQueryConditionsTest.java index 6f20923b0f69b..88ea0947d8687 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDistributedJoinQueryConditionsTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDistributedJoinQueryConditionsTest.java @@ -36,6 +36,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -43,6 +46,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheDistributedJoinQueryConditionsTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -86,6 +90,7 @@ public class IgniteCacheDistributedJoinQueryConditionsTest extends GridCommonAbs /** * @throws Exception If failed. */ + @Test public void testJoinQuery1() throws Exception { joinQuery1(true); } @@ -173,6 +178,7 @@ private void joinQuery1(boolean idx) throws Exception { /** * @throws Exception If failed. */ + @Test public void testJoinQuery2() throws Exception { Ignite client = grid(2); @@ -283,6 +289,7 @@ public void _testJoinQuery3() throws Exception { /** * @throws Exception If failed. */ + @Test public void testJoinQuery4() throws Exception { Ignite client = grid(2); @@ -334,6 +341,7 @@ public void testJoinQuery4() throws Exception { /** * @throws Exception If failed. */ + @Test public void testJoinQuery5() throws Exception { Ignite client = grid(2); @@ -375,6 +383,7 @@ public void testJoinQuery5() throws Exception { /** * @throws Exception If failed. */ + @Test public void testJoinQuery6() throws Exception { Ignite client = grid(2); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDistributedJoinTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDistributedJoinTest.java index dee8e64e82c44..1d438e4658b27 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDistributedJoinTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDistributedJoinTest.java @@ -39,9 +39,13 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** */ +@RunWith(JUnit4.class) public class IgniteCacheDistributedJoinTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -200,6 +204,7 @@ private static Z insert(Statement s, Z z) throws SQLException { /** * @throws Exception If failed. */ + @Test public void testJoins() throws Exception { Ignite ignite = ignite(0); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDuplicateEntityConfigurationSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDuplicateEntityConfigurationSelfTest.java index d5c0f0a08785d..8947b08311e46 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDuplicateEntityConfigurationSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDuplicateEntityConfigurationSelfTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteCacheDuplicateEntityConfigurationSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -55,6 +59,7 @@ public class IgniteCacheDuplicateEntityConfigurationSelfTest extends GridCommonA /** * @throws Exception If failed. */ + @Test public void testClassDuplicatesQueryEntity() throws Exception { String cacheName = "duplicate"; @@ -86,6 +91,7 @@ public void testClassDuplicatesQueryEntity() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClassDuplicatesQueryReverse() throws Exception { String cacheName = "duplicate"; diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheFieldsQueryNoDataSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheFieldsQueryNoDataSelfTest.java index 75c0cd4966a5a..ccea5b6090e97 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheFieldsQueryNoDataSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheFieldsQueryNoDataSelfTest.java @@ -26,6 +26,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -33,6 +36,7 @@ /** * Test for local query on partitioned cache without data. */ +@RunWith(JUnit4.class) public class IgniteCacheFieldsQueryNoDataSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -69,6 +73,7 @@ public class IgniteCacheFieldsQueryNoDataSelfTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testQuery() throws Exception { Collection> res = grid().cache(DEFAULT_CACHE_NAME) .query(new SqlQuery("Integer", "from Integer")).getAll(); @@ -76,4 +81,4 @@ public void testQuery() throws Exception { assert res != null; assert res.isEmpty(); } -} \ No newline at end of file +} diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheFullTextQueryNodeJoiningSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheFullTextQueryNodeJoiningSelfTest.java index 162b1e5bacaaa..a356f8b5e6480 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheFullTextQueryNodeJoiningSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheFullTextQueryNodeJoiningSelfTest.java @@ -36,6 +36,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -44,6 +47,7 @@ /** * Tests cache in-place modification logic with iterative value increment. */ +@RunWith(JUnit4.class) public class IgniteCacheFullTextQueryNodeJoiningSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -105,6 +109,7 @@ protected CacheAtomicityMode atomicityMode() { /** * @throws Exception If failed. */ + @Test public void testFullTextQueryNodeJoin() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-2229"); @@ -145,4 +150,4 @@ private IndexedEntity(String val) { this.val = val; } } -} \ No newline at end of file +} diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheGroupsSqlTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheGroupsSqlTest.java index 617909db3027a..dee50e03c5e14 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheGroupsSqlTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheGroupsSqlTest.java @@ -40,6 +40,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -50,6 +53,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheGroupsSqlTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -86,6 +90,7 @@ public class IgniteCacheGroupsSqlTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testSqlQuery() throws Exception { Ignite node = ignite(0); @@ -112,6 +117,7 @@ public void testSqlQuery() throws Exception { /** * @throws Exception If failed. */ + @Test public void testJoinQuery1() throws Exception { joinQuery(GROUP1, GROUP2, REPLICATED, PARTITIONED, TRANSACTIONAL, TRANSACTIONAL); } @@ -119,6 +125,7 @@ public void testJoinQuery1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testJoinQuery2() throws Exception { GridTestUtils.assertThrows(log, new Callable() { @Override public Void call() throws Exception { @@ -131,6 +138,7 @@ public void testJoinQuery2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testJoinQuery3() throws Exception { joinQuery(GROUP1, GROUP1, PARTITIONED, PARTITIONED, TRANSACTIONAL, ATOMIC); } @@ -138,6 +146,7 @@ public void testJoinQuery3() throws Exception { /** * @throws Exception If failed. */ + @Test public void testJoinQuery4() throws Exception { joinQuery(GROUP1, GROUP1, REPLICATED, REPLICATED, ATOMIC, TRANSACTIONAL); } @@ -145,6 +154,7 @@ public void testJoinQuery4() throws Exception { /** * @throws Exception If failed. */ + @Test public void testJoinQuery5() throws Exception { joinQuery(GROUP1, null, REPLICATED, PARTITIONED, TRANSACTIONAL, TRANSACTIONAL); } @@ -152,6 +162,7 @@ public void testJoinQuery5() throws Exception { /** * @throws Exception If failed. */ + @Test public void testJoinQuery6() throws Exception { joinQuery(GROUP1, null, PARTITIONED, PARTITIONED, TRANSACTIONAL, ATOMIC); } diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInsertSqlQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInsertSqlQuerySelfTest.java index bc5686d83ae81..55eac7d4cd307 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInsertSqlQuerySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInsertSqlQuerySelfTest.java @@ -29,6 +29,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.processors.cache.IgniteCacheUpdateSqlQuerySelfTest.AllTypes; @@ -36,6 +39,7 @@ * */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class IgniteCacheInsertSqlQuerySelfTest extends IgniteCacheAbstractInsertSqlQuerySelfTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -58,6 +62,7 @@ public class IgniteCacheInsertSqlQuerySelfTest extends IgniteCacheAbstractInsert /** * */ + @Test public void testInsertWithExplicitKey() { IgniteCache p = ignite(0).cache("S2P").withKeepBinary(); @@ -72,6 +77,7 @@ public void testInsertWithExplicitKey() { /** * */ + @Test public void testInsertFromSubquery() { IgniteCache p = ignite(0).cache("S2P").withKeepBinary(); @@ -92,6 +98,7 @@ public void testInsertFromSubquery() { /** * */ + @Test public void testInsertWithExplicitPrimitiveKey() { IgniteCache p = ignite(0).cache("I2P").withKeepBinary(); @@ -107,6 +114,7 @@ public void testInsertWithExplicitPrimitiveKey() { /** * */ + @Test public void testInsertWithDynamicKeyInstantiation() { IgniteCache p = ignite(0).cache("K2P").withKeepBinary(); @@ -121,6 +129,7 @@ public void testInsertWithDynamicKeyInstantiation() { /** * Test insert with implicit column names. */ + @Test public void testImplicitColumnNames() { IgniteCache p = ignite(0).cache("K2P").withKeepBinary(); @@ -139,6 +148,7 @@ public void testImplicitColumnNames() { /** * */ + @Test public void testFieldsCaseSensitivity() { IgniteCache p = ignite(0).cache("K22P").withKeepBinary(); @@ -153,6 +163,7 @@ public void testFieldsCaseSensitivity() { /** * */ + @Test public void testPrimitives() { IgniteCache p = ignite(0).cache("I2I"); @@ -167,6 +178,7 @@ public void testPrimitives() { /** * */ + @Test public void testDuplicateKeysException() { final IgniteCache p = ignite(0).cache("I2I"); @@ -192,6 +204,7 @@ public void testDuplicateKeysException() { /** * */ + @Test public void testUuidHandling() { IgniteCache p = ignite(0).cache("U2I"); @@ -205,6 +218,7 @@ public void testUuidHandling() { /** * */ + @Test public void testNestedFieldsHandling() { IgniteCache p = ignite(0).cache("I2AT"); @@ -230,6 +244,7 @@ public void testNestedFieldsHandling() { /** * Check that few sequential start-stops of the cache do not affect work of DML. */ + @Test public void testCacheRestartHandling() { for (int i = 0; i < 4; i++) { IgniteCache p = diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheJoinPartitionedAndReplicatedCollocationTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheJoinPartitionedAndReplicatedCollocationTest.java index 3d3f27b07c573..1e87c85d6f68b 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheJoinPartitionedAndReplicatedCollocationTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheJoinPartitionedAndReplicatedCollocationTest.java @@ -37,6 +37,9 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -45,6 +48,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheJoinPartitionedAndReplicatedCollocationTest extends AbstractH2CompareQueryTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -176,6 +180,7 @@ private CacheConfiguration configuration(String name, int backups) { /** * @throws Exception If failed. */ + @Test public void testJoin() throws Exception { Ignite client = grid(SRVS); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheJoinPartitionedAndReplicatedTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheJoinPartitionedAndReplicatedTest.java index 4f080e6c7545b..2cfc6a4f34c91 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheJoinPartitionedAndReplicatedTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheJoinPartitionedAndReplicatedTest.java @@ -37,6 +37,9 @@ import java.util.ArrayList; import java.util.List; import java.util.concurrent.Callable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -46,6 +49,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheJoinPartitionedAndReplicatedTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -171,6 +175,7 @@ private CacheConfiguration configuration(String name) { /** * @throws Exception If failed. */ + @Test public void testJoin() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-5016"); @@ -224,6 +229,7 @@ public void testJoin() throws Exception { /** */ + @Test public void testReplicatedToPartitionedLeftJoin() { fail("https://issues.apache.org/jira/browse/IGNITE-5016"); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheJoinQueryWithAffinityKeyTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheJoinQueryWithAffinityKeyTest.java index be111531320a0..e0cd542822740 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheJoinQueryWithAffinityKeyTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheJoinQueryWithAffinityKeyTest.java @@ -41,6 +41,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -50,6 +53,7 @@ * */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class IgniteCacheJoinQueryWithAffinityKeyTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -95,6 +99,7 @@ public class IgniteCacheJoinQueryWithAffinityKeyTest extends GridCommonAbstractT /** * @throws Exception If failed. */ + @Test public void testJoinQuery() throws Exception { testJoinQuery(PARTITIONED, 0, false, true); @@ -106,6 +111,7 @@ public void testJoinQuery() throws Exception { /** * @throws Exception If failed. */ + @Test public void testJoinQueryEscapeAll() throws Exception { escape = true; @@ -115,6 +121,7 @@ public void testJoinQueryEscapeAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testJoinQueryWithAffinityKey() throws Exception { testJoinQuery(PARTITIONED, 0, true, true); @@ -126,6 +133,7 @@ public void testJoinQueryWithAffinityKey() throws Exception { /** * @throws Exception If failed. */ + @Test public void testJoinQueryWithAffinityKeyEscapeAll() throws Exception { escape = true; @@ -135,6 +143,7 @@ public void testJoinQueryWithAffinityKeyEscapeAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testJoinQueryWithAffinityKeyNotQueryField() throws Exception { testJoinQuery(PARTITIONED, 0, true, false); @@ -146,6 +155,7 @@ public void testJoinQueryWithAffinityKeyNotQueryField() throws Exception { /** * @throws Exception If failed. */ + @Test public void testJoinQueryWithAffinityKeyNotQueryFieldEscapeAll() throws Exception { escape = true; diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLargeResultSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLargeResultSelfTest.java index bac8d1d177273..9e5cc52b0c3c5 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLargeResultSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLargeResultSelfTest.java @@ -29,12 +29,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** */ +@RunWith(JUnit4.class) public class IgniteCacheLargeResultSelfTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -71,6 +75,7 @@ public class IgniteCacheLargeResultSelfTest extends GridCommonAbstractTest { /** */ + @Test public void testLargeResult() { // Fill cache. try (IgniteDataStreamer streamer = ignite(0).dataStreamer(DEFAULT_CACHE_NAME)) { @@ -103,4 +108,4 @@ public void testLargeResult() { // Currently we have no ways to do multiple passes through a merge table. } -} \ No newline at end of file +} diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLockPartitionOnAffinityRunAtomicCacheOpTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLockPartitionOnAffinityRunAtomicCacheOpTest.java index a4f398fceff18..c9002f94169ea 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLockPartitionOnAffinityRunAtomicCacheOpTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLockPartitionOnAffinityRunAtomicCacheOpTest.java @@ -34,10 +34,14 @@ import org.apache.ignite.resources.IgniteInstanceResource; import org.apache.ignite.resources.LoggerResource; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test to validate https://issues.apache.org/jira/browse/IGNITE-2310 */ +@RunWith(JUnit4.class) public class IgniteCacheLockPartitionOnAffinityRunAtomicCacheOpTest extends IgniteCacheLockPartitionOnAffinityRunAbstractTest { /** Atomic cache. */ private static final String ATOMIC_CACHE = "atomic"; @@ -137,6 +141,7 @@ protected void destroyCaches() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNotReservedAtomicCacheOp() throws Exception { notReservedCacheOp(ATOMIC_CACHE); } @@ -144,6 +149,7 @@ public void testNotReservedAtomicCacheOp() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNotReservedTxCacheOp() throws Exception { notReservedCacheOp(TRANSACT_CACHE); } @@ -202,6 +208,7 @@ private void notReservedCacheOp(final String cacheName) throws Exception { /** * @throws Exception If failed. */ + @Test public void testReservedPartitionCacheOp() throws Exception { // Workaround for initial update job metadata. grid(0).cache(Person.class.getSimpleName()).clear(); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLockPartitionOnAffinityRunTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLockPartitionOnAffinityRunTest.java index d0cfbd9930ea8..af0154cd8a368 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLockPartitionOnAffinityRunTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLockPartitionOnAffinityRunTest.java @@ -45,10 +45,14 @@ import org.apache.ignite.resources.IgniteInstanceResource; import org.apache.ignite.resources.LoggerResource; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test to validate https://issues.apache.org/jira/browse/IGNITE-2310 */ +@RunWith(JUnit4.class) public class IgniteCacheLockPartitionOnAffinityRunTest extends IgniteCacheLockPartitionOnAffinityRunAbstractTest { /** * @param ignite Ignite. @@ -290,6 +294,7 @@ private static int getPersonsCountMultipleCache(final IgniteEx ignite, IgniteLog /** * @throws Exception If failed. */ + @Test public void testSingleCache() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-7692"); @@ -346,6 +351,7 @@ public void testSingleCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultipleCaches() throws Exception { final PersonsCountGetter personsCntGetter = new PersonsCountGetter() { @Override public int getPersonsCount(IgniteEx ignite, IgniteLogger log, int orgId) throws Exception { @@ -404,6 +410,7 @@ public void testMultipleCaches() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCheckReservePartitionException() throws Exception { int orgId = primaryKey(grid(1).cache(Organization.class.getSimpleName())); @@ -426,6 +433,7 @@ public void testCheckReservePartitionException() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReleasePartitionJobCompletesNormally() throws Exception { final int orgId = primaryKey(grid(1).cache(Organization.class.getSimpleName())); @@ -474,6 +482,7 @@ public void testReleasePartitionJobCompletesNormally() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReleasePartitionJobThrowsException() throws Exception { final int orgId = primaryKey(grid(1).cache(Organization.class.getSimpleName())); @@ -534,6 +543,7 @@ public void testReleasePartitionJobThrowsException() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReleasePartitionJobThrowsError() throws Exception { final int orgId = primaryKey(grid(1).cache(Organization.class.getSimpleName())); @@ -593,6 +603,7 @@ public void testReleasePartitionJobThrowsError() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReleasePartitionJobUnmarshalingFails() throws Exception { final int orgId = primaryKey(grid(1).cache(Organization.class.getSimpleName())); @@ -611,6 +622,7 @@ public void testReleasePartitionJobUnmarshalingFails() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReleasePartitionJobMasterLeave() throws Exception { final int orgId = primaryKey(grid(0).cache(Organization.class.getSimpleName())); @@ -700,6 +712,7 @@ public void testReleasePartitionJobMasterLeave() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReleasePartitionJobImplementMasterLeave() throws Exception { final int orgId = primaryKey(grid(0).cache(Organization.class.getSimpleName())); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLockPartitionOnAffinityRunWithCollisionSpiTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLockPartitionOnAffinityRunWithCollisionSpiTest.java index a05e10ec77cc2..73b467a612927 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLockPartitionOnAffinityRunWithCollisionSpiTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLockPartitionOnAffinityRunWithCollisionSpiTest.java @@ -35,10 +35,14 @@ import org.apache.ignite.spi.collision.CollisionJobContext; import org.apache.ignite.spi.collision.CollisionSpi; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test to validate https://issues.apache.org/jira/browse/IGNITE-2310 */ +@RunWith(JUnit4.class) public class IgniteCacheLockPartitionOnAffinityRunWithCollisionSpiTest extends IgniteCacheLockPartitionOnAffinityRunAbstractTest { @@ -58,6 +62,7 @@ public class IgniteCacheLockPartitionOnAffinityRunWithCollisionSpiTest /** * @throws Exception If failed. */ + @Test public void testPartitionReservation() throws Exception { int orgId = 0; cancelAllJobs = true; @@ -81,6 +86,7 @@ public void testPartitionReservation() throws Exception { /** * @throws Exception If failed. */ + @Test public void testJobFinishing() throws Exception { final AtomicInteger jobNum = new AtomicInteger(0); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheMergeSqlQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheMergeSqlQuerySelfTest.java index c92c7dcf1f004..cab011990434f 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheMergeSqlQuerySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheMergeSqlQuerySelfTest.java @@ -21,6 +21,9 @@ import java.util.Arrays; import org.apache.ignite.IgniteCache; import org.apache.ignite.cache.query.SqlFieldsQuery; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.processors.cache.IgniteCacheUpdateSqlQuerySelfTest.AllTypes; @@ -28,10 +31,12 @@ * */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class IgniteCacheMergeSqlQuerySelfTest extends IgniteCacheAbstractInsertSqlQuerySelfTest { /** * */ + @Test public void testMergeWithExplicitKey() { IgniteCache p = ignite(0).cache("S2P").withKeepBinary(); @@ -46,6 +51,7 @@ public void testMergeWithExplicitKey() { /** * */ + @Test public void testMergeFromSubquery() { IgniteCache p = ignite(0).cache("S2P").withKeepBinary(); @@ -66,6 +72,7 @@ public void testMergeFromSubquery() { /** * */ + @Test public void testMergeWithExplicitPrimitiveKey() { IgniteCache p = ignite(0).cache("I2P").withKeepBinary(); @@ -81,6 +88,7 @@ public void testMergeWithExplicitPrimitiveKey() { /** * */ + @Test public void testMergeWithDynamicKeyInstantiation() { IgniteCache p = ignite(0).cache("K2P").withKeepBinary(); @@ -95,6 +103,7 @@ public void testMergeWithDynamicKeyInstantiation() { /** * */ + @Test public void testFieldsCaseSensitivity() { IgniteCache p = ignite(0).cache("K22P").withKeepBinary(); @@ -109,6 +118,7 @@ public void testFieldsCaseSensitivity() { /** * */ + @Test public void testPrimitives() { IgniteCache p = ignite(0).cache("I2I").withKeepBinary(); @@ -123,6 +133,7 @@ public void testPrimitives() { /** * */ + @Test public void testNestedFieldsHandling() { IgniteCache p = ignite(0).cache("I2AT"); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheMultipleIndexedTypesTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheMultipleIndexedTypesTest.java index 0614a050a9048..b3d410f750570 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheMultipleIndexedTypesTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheMultipleIndexedTypesTest.java @@ -29,10 +29,14 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteCacheMultipleIndexedTypesTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { @@ -49,6 +53,7 @@ public class IgniteCacheMultipleIndexedTypesTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testMultipleIndexedTypes() throws Exception { CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheNoClassQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheNoClassQuerySelfTest.java index 4dc9116d87079..558a0c32b389f 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheNoClassQuerySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheNoClassQuerySelfTest.java @@ -29,6 +29,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; @@ -37,6 +40,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheNoClassQuerySelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -91,6 +95,7 @@ public class IgniteCacheNoClassQuerySelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testNoClass() throws Exception { try { startGrid(); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheObjectKeyIndexingSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheObjectKeyIndexingSelfTest.java index 2865767fb04d4..e9766f1aeeb82 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheObjectKeyIndexingSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheObjectKeyIndexingSelfTest.java @@ -28,10 +28,14 @@ import org.apache.ignite.cache.query.annotations.QuerySqlField; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test index behavior when key is of plain Object type per indexing settings. */ +@RunWith(JUnit4.class) public class IgniteCacheObjectKeyIndexingSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { @@ -52,6 +56,7 @@ protected static CacheConfiguration cacheCfg() { } /** */ + @Test public void testObjectKeyHandling() throws Exception { Ignite ignite = grid(); @@ -92,7 +97,7 @@ public void testObjectKeyHandling() throws Exception { Arrays.asList(uid, "C") ) ); - + cache.remove(uid); // Removal has worked for both keys although the table was the same and keys were of different type @@ -107,7 +112,7 @@ private void assertItemsNumber(long num) { assertEquals(num, grid().cache(DEFAULT_CACHE_NAME).query(new SqlFieldsQuery("select count(*) from TestObject")).getAll() .get(0).get(0)); } - + /** */ private static class TestObject { /** */ diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapEvictQueryTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapEvictQueryTest.java index 6a22f052f2bff..be47260d65c39 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapEvictQueryTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapEvictQueryTest.java @@ -39,12 +39,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** */ +@RunWith(JUnit4.class) public class IgniteCacheOffheapEvictQueryTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -87,6 +91,7 @@ public class IgniteCacheOffheapEvictQueryTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testEvictAndRemove() throws Exception { final int KEYS_CNT = 3000; final int THREADS_CNT = 250; diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapIndexScanTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapIndexScanTest.java index c0cc46dfc5a02..f9d68ef6537ab 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapIndexScanTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapIndexScanTest.java @@ -30,12 +30,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.LOCAL; /** * Based scanCount with offheap index issue. */ +@RunWith(JUnit4.class) public class IgniteCacheOffheapIndexScanTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -75,6 +79,7 @@ public class IgniteCacheOffheapIndexScanTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testQueryPlan() throws Exception { for (int i = 0 ; i < 1000; i++) cache.put(i, new Person(i, "firstName" + i, "lastName" + i, i % 100)); @@ -184,4 +189,4 @@ public Person(int id, int orgId, String firstName, String lastName, double salar ']'; } } -} \ No newline at end of file +} diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingQueryErrorTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingQueryErrorTest.java index a2f1d1dedf52c..fbf5adb720863 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingQueryErrorTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingQueryErrorTest.java @@ -25,10 +25,14 @@ import org.apache.ignite.cache.query.SqlQuery; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.lang.IgniteBiPredicate; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Checks behavior on exception while unmarshalling key. */ +@RunWith(JUnit4.class) public class IgniteCacheP2pUnmarshallingQueryErrorTest extends IgniteCacheP2pUnmarshallingErrorTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { @@ -41,6 +45,7 @@ public class IgniteCacheP2pUnmarshallingQueryErrorTest extends IgniteCacheP2pUnm } /** {@inheritDoc} */ + @Test @Override public void testResponseMessageOnUnmarshallingFailed() { readCnt.set(Integer.MAX_VALUE); @@ -62,6 +67,7 @@ public class IgniteCacheP2pUnmarshallingQueryErrorTest extends IgniteCacheP2pUnm /** * @throws Exception If failed. */ + @Test public void testResponseMessageOnRequestUnmarshallingFailed() throws Exception { readCnt.set(Integer.MAX_VALUE); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePartitionedQueryMultiThreadedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePartitionedQueryMultiThreadedSelfTest.java index dc8f8d3696828..0b118d9af61f5 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePartitionedQueryMultiThreadedSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePartitionedQueryMultiThreadedSelfTest.java @@ -45,6 +45,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -52,6 +55,7 @@ /** * Tests for partitioned cache queries. */ +@RunWith(JUnit4.class) public class IgniteCachePartitionedQueryMultiThreadedSelfTest extends GridCommonAbstractTest { /** */ private static final boolean TEST_INFO = true; @@ -123,6 +127,7 @@ public IgniteCachePartitionedQueryMultiThreadedSelfTest() { * @throws Exception If failed. */ @SuppressWarnings({"TooBroadScope"}) + @Test public void testLuceneAndSqlMultithreaded() throws Exception { // ---------- Test parameters ---------- // int luceneThreads = 10; @@ -292,4 +297,4 @@ String degree() { return S.toString(PersonObj.class, this); } } -} \ No newline at end of file +} diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePrimitiveFieldsQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePrimitiveFieldsQuerySelfTest.java index cf098b1ea403a..658ba39fea880 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePrimitiveFieldsQuerySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePrimitiveFieldsQuerySelfTest.java @@ -31,10 +31,14 @@ import java.util.LinkedHashMap; import java.util.List; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteCachePrimitiveFieldsQuerySelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -93,6 +97,7 @@ private CacheConfiguration cacheConfiguration(String cache /** * @throws Exception if failed. */ + @Test public void testStaticCache() throws Exception { checkCache(ignite(0).cache(CACHE_NAME)); } @@ -112,7 +117,7 @@ private void checkCache(IgniteCache cache) throws Exceptio } /** - * + * */ @SuppressWarnings("unused") private static class IndexedType { diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueriesLoadTest1.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueriesLoadTest1.java index 889d331b56836..935e148fc60b7 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueriesLoadTest1.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueriesLoadTest1.java @@ -54,6 +54,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -65,6 +68,7 @@ * */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class IgniteCacheQueriesLoadTest1 extends GridCommonAbstractTest { /** Operation. */ private static final String OPERATION = "Operation"; @@ -173,6 +177,7 @@ public class IgniteCacheQueriesLoadTest1 extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testQueries() throws Exception { runQueries(1, true, 10_000); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryH2IndexingLeakTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryH2IndexingLeakTest.java index 9458887ab6262..db4c4f4a932f3 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryH2IndexingLeakTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryH2IndexingLeakTest.java @@ -34,6 +34,9 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_H2_INDEXING_CACHE_CLEANUP_PERIOD; import static org.apache.ignite.IgniteSystemProperties.IGNITE_H2_INDEXING_CACHE_THREAD_USAGE_TIMEOUT; @@ -44,6 +47,7 @@ /** * Tests leaks at the IgniteH2Indexing */ +@RunWith(JUnit4.class) public class IgniteCacheQueryH2IndexingLeakTest extends GridCommonAbstractTest { /** */ private static final long TEST_TIMEOUT = 2 * 60 * 1000; @@ -135,6 +139,7 @@ private static int getStatementCacheSize(GridQueryProcessor qryProcessor) { /** * @throws Exception If failed. */ + @Test public void testLeaksInIgniteH2IndexingOnTerminatedThread() throws Exception { final IgniteCache c = grid(0).cache(DEFAULT_CACHE_NAME); @@ -187,6 +192,7 @@ public void testLeaksInIgniteH2IndexingOnTerminatedThread() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLeaksInIgniteH2IndexingOnUnusedThread() throws Exception { final IgniteCache c = grid(0).cache(DEFAULT_CACHE_NAME); @@ -220,4 +226,4 @@ public void testLeaksInIgniteH2IndexingOnUnusedThread() throws Exception { fut.get(); } } -} \ No newline at end of file +} diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryIndexSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryIndexSelfTest.java index f9916aeb1e3c3..73b8eb0893445 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryIndexSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryIndexSelfTest.java @@ -27,6 +27,9 @@ import org.apache.ignite.cache.query.SqlQuery; import org.apache.ignite.cache.query.annotations.QuerySqlField; import org.apache.ignite.internal.util.typedef.internal.S; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CachePeekMode.ALL; @@ -34,6 +37,7 @@ /** * Tests for cache query index. */ +@RunWith(JUnit4.class) public class IgniteCacheQueryIndexSelfTest extends GridCacheAbstractSelfTest { /** Grid count. */ private static final int GRID_CNT = 2; @@ -54,6 +58,7 @@ public class IgniteCacheQueryIndexSelfTest extends GridCacheAbstractSelfTest { /** * @throws Exception If failed. */ + @Test public void testWithoutStoreLoad() throws Exception { IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -72,6 +77,7 @@ public void testWithoutStoreLoad() throws Exception { /** * @throws Exception If failed. */ + @Test public void testWithStoreLoad() throws Exception { for (int i = 0; i < ENTRY_CNT; i++) storeStgy.putToStore(i, new CacheValue(i)); @@ -133,4 +139,4 @@ int value() { return S.toString(CacheValue.class, this); } } -} \ No newline at end of file +} diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryLoadSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryLoadSelfTest.java index 70f350cd332b7..7183b51e0d252 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryLoadSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryLoadSelfTest.java @@ -41,6 +41,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.REPLICATED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -48,6 +51,7 @@ /** * Test that entries are indexed on load/reload methods. */ +@RunWith(JUnit4.class) public class IgniteCacheQueryLoadSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -117,6 +121,7 @@ private long size(Class cls) throws IgniteCheckedException { /** * @throws Exception If failed. */ + @Test public void testLoadCache() throws Exception { IgniteCache cache = grid().cache(DEFAULT_CACHE_NAME); @@ -135,6 +140,7 @@ public void testLoadCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLoadCacheAsync() throws Exception { IgniteCache cache = grid().cache(DEFAULT_CACHE_NAME); @@ -153,6 +159,7 @@ public void testLoadCacheAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLoadCacheFiltered() throws Exception { IgniteCache cache = grid().cache(DEFAULT_CACHE_NAME); @@ -176,6 +183,7 @@ public boolean apply(Integer key, ValueObject val) { /** * @throws Exception If failed. */ + @Test public void testLoadCacheAsyncFiltered() throws Exception { IgniteCache cache = grid().cache(DEFAULT_CACHE_NAME); @@ -199,6 +207,7 @@ public boolean apply(Integer key, ValueObject val) { /** * @throws Exception If failed. */ + @Test public void testReloadAsync() throws Exception { STORE_MAP.put(1, new ValueObject(1)); @@ -219,6 +228,7 @@ public void testReloadAsync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReloadAll() throws Exception { for (int i = 0; i < PUT_CNT; i++) STORE_MAP.put(i, new ValueObject(i)); @@ -328,4 +338,4 @@ int value() { return S.toString(ValueObject.class, this); } } -} \ No newline at end of file +} diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedSelfTest.java index e9ebc1841048f..80e2b578dca59 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedSelfTest.java @@ -48,6 +48,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -56,6 +59,7 @@ /** * Multi-threaded tests for cache queries. */ +@RunWith(JUnit4.class) public class IgniteCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTest { /** */ private static final boolean TEST_INFO = true; @@ -219,6 +223,7 @@ private Set affinityNodes(Iterable> entries, * @throws Exception If failed. */ @SuppressWarnings({"TooBroadScope"}) + @Test public void testMultiThreadedSwapUnswapString() throws Exception { int threadCnt = 50; final int keyCnt = 2000; @@ -289,6 +294,7 @@ public void testMultiThreadedSwapUnswapString() throws Exception { * @throws Exception If failed. */ @SuppressWarnings({"TooBroadScope"}) + @Test public void testMultiThreadedSwapUnswapLong() throws Exception { int threadCnt = 50; final int keyCnt = 2000; @@ -360,6 +366,7 @@ public void testMultiThreadedSwapUnswapLong() throws Exception { * @throws Exception If failed. */ @SuppressWarnings({"TooBroadScope"}) + @Test public void testMultiThreadedSwapUnswapLongString() throws Exception { int threadCnt = 50; final int keyCnt = 2000; @@ -431,6 +438,7 @@ public void testMultiThreadedSwapUnswapLongString() throws Exception { * @throws Exception If failed. */ @SuppressWarnings({"TooBroadScope"}) + @Test public void testMultiThreadedSwapUnswapObject() throws Exception { int threadCnt = 50; final int keyCnt = 4000; @@ -503,6 +511,7 @@ public void testMultiThreadedSwapUnswapObject() throws Exception { * @throws Exception If failed. */ @SuppressWarnings({"TooBroadScope"}) + @Test public void testMultiThreadedSameQuery() throws Exception { int threadCnt = 50; final int keyCnt = 10; @@ -566,6 +575,7 @@ public void testMultiThreadedSameQuery() throws Exception { * @throws Exception If failed. */ @SuppressWarnings({"TooBroadScope"}) + @Test public void testMultiThreadedNewQueries() throws Exception { int threadCnt = 50; final int keyCnt = 10; @@ -625,6 +635,7 @@ public void testMultiThreadedNewQueries() throws Exception { * @throws Exception If failed. */ @SuppressWarnings({"TooBroadScope"}) + @Test public void testMultiThreadedScanQuery() throws Exception { int threadCnt = 50; final int keyCnt = 500; @@ -683,6 +694,7 @@ public void testMultiThreadedScanQuery() throws Exception { * @throws Exception If failed. */ @SuppressWarnings({"TooBroadScope"}) + @Test public void testMultiThreadedSqlFieldsQuery() throws Throwable { int threadCnt = 16; final int keyCnt = 1100; // set resultSet size bigger than page size diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheSqlQueryErrorSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheSqlQueryErrorSelfTest.java index 09790854b2d03..a89ed29db1f97 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheSqlQueryErrorSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheSqlQueryErrorSelfTest.java @@ -21,10 +21,14 @@ import javax.cache.CacheException; import org.apache.ignite.cache.query.SqlFieldsQuery; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Java API query error messages test. */ +@RunWith(JUnit4.class) public class IgniteCacheSqlQueryErrorSelfTest extends GridCacheAbstractSelfTest { /** {@inheritDoc} */ @Override protected int gridCount() { @@ -36,6 +40,7 @@ public class IgniteCacheSqlQueryErrorSelfTest extends GridCacheAbstractSelfTest * * @throws Exception If failed. */ + @Test public void testSelectWrongTable() throws Exception { checkSqlErrorMessage("select from wrong", "Failed to parse query. Table \"WRONG\" not found"); @@ -46,6 +51,7 @@ public void testSelectWrongTable() throws Exception { * * @throws Exception If failed. */ + @Test public void testSelectWrongColumnName() throws Exception { checkSqlErrorMessage("select wrong from test", "Failed to parse query. Column \"WRONG\" not found"); @@ -56,6 +62,7 @@ public void testSelectWrongColumnName() throws Exception { * * @throws Exception If failed. */ + @Test public void testSelectWrongSyntax() throws Exception { checkSqlErrorMessage("select from test where", "Failed to parse query. Syntax error in SQL statement \"SELECT FROM TEST WHERE[*]"); @@ -66,6 +73,7 @@ public void testSelectWrongSyntax() throws Exception { * * @throws Exception If failed. */ + @Test public void testDmlWrongTable() throws Exception { checkSqlErrorMessage("insert into wrong (id, val) values (3, 'val3')", "Failed to parse query. Table \"WRONG\" not found"); @@ -85,6 +93,7 @@ public void testDmlWrongTable() throws Exception { * * @throws Exception If failed. */ + @Test public void testDmlWrongColumnName() throws Exception { checkSqlErrorMessage("insert into test (id, wrong) values (3, 'val3')", "Failed to parse query. Column \"WRONG\" not found"); @@ -104,6 +113,7 @@ public void testDmlWrongColumnName() throws Exception { * * @throws Exception If failed. */ + @Test public void testDmlWrongSyntax() throws Exception { checkSqlErrorMessage("insert test (id, val) values (3, 'val3')", "Failed to parse query. Syntax error in SQL statement \"INSERT TEST[*] (ID, VAL)"); @@ -123,6 +133,7 @@ public void testDmlWrongSyntax() throws Exception { * * @throws Exception If failed. */ + @Test public void testDdlWrongTable() throws Exception { checkSqlErrorMessage("create table test (id int primary key, val varchar)", "Table already exists: TEST"); @@ -145,6 +156,7 @@ public void testDdlWrongTable() throws Exception { * * @throws Exception If failed. */ + @Test public void testDdlWrongColumnName() throws Exception { checkSqlErrorMessage("create index idx1 on test (wrong)", "Column doesn't exist: WRONG"); @@ -158,6 +170,7 @@ public void testDdlWrongColumnName() throws Exception { * * @throws Exception If failed. */ + @Test public void testDdlWrongSyntax() throws Exception { checkSqlErrorMessage("create table wrong (id int wrong key, val varchar)", "Failed to parse query. Syntax error in SQL statement \"CREATE TABLE WRONG (ID INT WRONG[*]"); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheSqlQueryMultiThreadedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheSqlQueryMultiThreadedSelfTest.java index 7241196b502ee..e1a1f57a0181f 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheSqlQueryMultiThreadedSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheSqlQueryMultiThreadedSelfTest.java @@ -38,6 +38,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -45,6 +48,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteCacheSqlQueryMultiThreadedSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -86,6 +90,7 @@ public class IgniteCacheSqlQueryMultiThreadedSelfTest extends GridCommonAbstract /** * @throws Exception If failed. */ + @Test public void testQuery() throws Exception { final IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -117,6 +122,7 @@ public void testQuery() throws Exception { * Test put and parallel query. * @throws Exception If failed. */ + @Test public void testQueryPut() throws Exception { final IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -189,4 +195,4 @@ public int age() { return age; } } -} \ No newline at end of file +} diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStarvationOnRebalanceTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStarvationOnRebalanceTest.java index 85d463f1e05c4..667613b854325 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStarvationOnRebalanceTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStarvationOnRebalanceTest.java @@ -30,6 +30,9 @@ import org.apache.ignite.internal.util.typedef.internal.S; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.GridTestUtils.SF; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -37,6 +40,7 @@ /** * Test to reproduce https://issues.apache.org/jira/browse/IGNITE-3073. */ +@RunWith(JUnit4.class) public class IgniteCacheStarvationOnRebalanceTest extends GridCacheAbstractSelfTest { /** Grid count. */ private static final int GRID_CNT = 4; @@ -87,6 +91,7 @@ public class IgniteCacheStarvationOnRebalanceTest extends GridCacheAbstractSelfT /** * @throws Exception If failed. */ + @Test public void testLoadSystemWithPutAndStartRebalancing() throws Exception { final IgniteCache cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -164,4 +169,4 @@ int value() { return S.toString(CacheValue.class, this); } } -} \ No newline at end of file +} diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheUnionDuplicatesTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheUnionDuplicatesTest.java index be25c83577435..dfb65f5f71f8f 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheUnionDuplicatesTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheUnionDuplicatesTest.java @@ -26,12 +26,16 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.processors.query.h2.sql.AbstractH2CompareQueryTest; import org.apache.ignite.internal.processors.query.h2.sql.BaseH2CompareQueryTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** * */ +@RunWith(JUnit4.class) public class IgniteCacheUnionDuplicatesTest extends AbstractH2CompareQueryTest { /** */ private static IgniteCache pCache; @@ -73,6 +77,7 @@ public class IgniteCacheUnionDuplicatesTest extends AbstractH2CompareQueryTest { /** * @throws Exception If failed. */ + @Test public void testUnionDuplicateFilter() throws Exception { compareQueryRes0(pCache, "select name from \"part\".Organization " + "union " + diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheUpdateSqlQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheUpdateSqlQuerySelfTest.java index fcc6c1c78f8ca..d943f9d87d32d 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheUpdateSqlQuerySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheUpdateSqlQuerySelfTest.java @@ -31,11 +31,15 @@ import org.apache.ignite.cache.query.SqlFieldsQuery; import org.apache.ignite.cache.query.annotations.QuerySqlField; import org.apache.ignite.configuration.CacheConfiguration; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class IgniteCacheUpdateSqlQuerySelfTest extends IgniteCacheAbstractSqlDmlQuerySelfTest { /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { @@ -64,6 +68,7 @@ private static CacheConfiguration createAllTypesCacheConfig() { /** * */ + @Test public void testUpdateSimple() { IgniteCache p = cache(); @@ -94,6 +99,7 @@ public void testUpdateSimple() { /** * */ + @Test public void testUpdateSingle() { IgniteCache p = cache(); @@ -124,6 +130,7 @@ public void testUpdateSingle() { /** * */ + @Test public void testUpdateValueAndFields() { IgniteCache p = cache(); @@ -154,6 +161,7 @@ public void testUpdateValueAndFields() { /** * */ + @Test public void testDefault() { IgniteCache p = cache(); @@ -182,6 +190,7 @@ public void testDefault() { } /** */ + @Test public void testTypeConversions() throws ParseException { IgniteCache cache = ignite(0).cache("L2AT"); @@ -226,6 +235,7 @@ public void testTypeConversions() throws ParseException { } /** */ + @Test public void testSingleInnerFieldUpdate() throws ParseException { IgniteCache cache = ignite(0).cache("L2AT"); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCheckClusterStateBeforeExecuteQueryTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCheckClusterStateBeforeExecuteQueryTest.java index 7f155ed61a117..79ce60a05f3f4 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCheckClusterStateBeforeExecuteQueryTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCheckClusterStateBeforeExecuteQueryTest.java @@ -28,12 +28,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.testframework.GridTestUtils.assertThrows; /** * */ +@RunWith(JUnit4.class) public class IgniteCheckClusterStateBeforeExecuteQueryTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -73,6 +77,7 @@ public class IgniteCheckClusterStateBeforeExecuteQueryTest extends GridCommonAbs /** * @throws Exception On failed. */ + @Test public void testDynamicSchemaChangesPersistence() throws Exception { final IgniteEx ig = startGrid(0); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientReconnectCacheQueriesFailoverTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientReconnectCacheQueriesFailoverTest.java index cc96c7d864987..b415d8d41dd6d 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientReconnectCacheQueriesFailoverTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientReconnectCacheQueriesFailoverTest.java @@ -36,12 +36,16 @@ import org.apache.ignite.internal.IgniteClientReconnectFailoverAbstractTest; import org.apache.ignite.internal.util.typedef.internal.S; import org.apache.ignite.lang.IgniteBiPredicate; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** * */ +@RunWith(JUnit4.class) public class IgniteClientReconnectCacheQueriesFailoverTest extends IgniteClientReconnectFailoverAbstractTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { @@ -73,6 +77,7 @@ public class IgniteClientReconnectCacheQueriesFailoverTest extends IgniteClientR /** * @throws Exception If failed. */ + @Test public void testReconnectCacheQueries() throws Exception { final Ignite client = grid(serverCount()); @@ -120,6 +125,7 @@ public void testReconnectCacheQueries() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReconnectScanQuery() throws Exception { final Ignite client = grid(serverCount()); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientReconnectQueriesTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientReconnectQueriesTest.java index 5f45d80eb317a..1f72741e7c756 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientReconnectQueriesTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientReconnectQueriesTest.java @@ -37,6 +37,9 @@ import org.apache.ignite.internal.util.typedef.internal.S; import org.apache.ignite.lang.IgniteBiPredicate; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.SECONDS; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; @@ -45,6 +48,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteClientReconnectQueriesTest extends IgniteClientReconnectAbstractTest { /** */ public static final String QUERY_CACHE = "query"; @@ -84,6 +88,7 @@ public class IgniteClientReconnectQueriesTest extends IgniteClientReconnectAbstr /** * @throws Exception If failed. */ + @Test public void testQueryReconnect() throws Exception { Ignite cln = grid(serverCount()); @@ -128,6 +133,7 @@ public void testQueryReconnect() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReconnectQueryInProgress() throws Exception { Ignite cln = grid(serverCount()); @@ -187,6 +193,7 @@ public void testReconnectQueryInProgress() throws Exception { /** * @throws Exception If failed. */ + @Test public void testScanQueryReconnect() throws Exception { Ignite cln = grid(serverCount()); @@ -244,6 +251,7 @@ public void testScanQueryReconnect() throws Exception { /** * @throws Exception If failed. */ + @Test public void testScanQueryReconnectInProgress1() throws Exception { scanQueryReconnectInProgress(false); } @@ -251,6 +259,7 @@ public void testScanQueryReconnectInProgress1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testScanQueryReconnectInProgress2() throws Exception { scanQueryReconnectInProgress(true); } @@ -437,4 +446,4 @@ public void setSurname(String surname) { return S.toString(Person.class, this); } } -} \ No newline at end of file +} diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCrossCachesJoinsQueryTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCrossCachesJoinsQueryTest.java index 805924ecfdcd8..6139ce64152a5 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCrossCachesJoinsQueryTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCrossCachesJoinsQueryTest.java @@ -53,6 +53,9 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -62,6 +65,7 @@ * */ @SuppressWarnings({"unchecked", "PackageVisibleField", "serial"}) +@RunWith(JUnit4.class) public class IgniteCrossCachesJoinsQueryTest extends AbstractH2CompareQueryTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -324,6 +328,7 @@ private boolean useCollocatedData() { /** * @throws Exception If failed. */ + @Test public void testDistributedJoins1() throws Exception { distributedJoins = true; @@ -333,6 +338,7 @@ public void testDistributedJoins1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDistributedJoins2() throws Exception { distributedJoins = true; @@ -342,6 +348,7 @@ public void testDistributedJoins2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDistributedJoins3() throws Exception { distributedJoins = true; @@ -351,6 +358,7 @@ public void testDistributedJoins3() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCollocatedJoins1() throws Exception { distributedJoins = false; @@ -360,6 +368,7 @@ public void testCollocatedJoins1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCollocatedJoins2() throws Exception { distributedJoins = false; @@ -369,6 +378,7 @@ public void testCollocatedJoins2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCollocatedJoins3() throws Exception { distributedJoins = false; diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicSqlRestoreTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicSqlRestoreTest.java index d009f33f24a6b..1c2aa20507016 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicSqlRestoreTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicSqlRestoreTest.java @@ -47,6 +47,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.MatcherAssert.assertThat; @@ -55,6 +58,7 @@ * */ @SuppressWarnings("Duplicates") +@RunWith(JUnit4.class) public class IgniteDynamicSqlRestoreTest extends GridCommonAbstractTest implements Serializable { public static final String TEST_CACHE_NAME = "test"; @@ -95,6 +99,7 @@ public class IgniteDynamicSqlRestoreTest extends GridCommonAbstractTest implemen /** * @throws Exception if failed. */ + @Test public void testMergeChangedConfigOnCoordinator() throws Exception { { //given: two started nodes with test table @@ -167,6 +172,7 @@ public void testMergeChangedConfigOnCoordinator() throws Exception { * @throws Exception If failed. */ @SuppressWarnings("AssertWithSideEffects") + @Test public void testIndexCreationWhenNodeStopped() throws Exception { // Start topology. startGrid(0); @@ -286,6 +292,7 @@ private static void executeJdbc(Connection conn, String sql) throws Exception { /** * @throws Exception if failed. */ + @Test public void testTakeConfigFromJoiningNodeOnInactiveGrid() throws Exception { { //given: two started nodes with test table @@ -325,6 +332,7 @@ public void testTakeConfigFromJoiningNodeOnInactiveGrid() throws Exception { /** * @throws Exception if failed. */ + @Test public void testResaveConfigAfterMerge() throws Exception { { //given: two started nodes with test table @@ -373,6 +381,7 @@ public void testResaveConfigAfterMerge() throws Exception { * @throws Exception if failed. */ @SuppressWarnings("ArraysAsListWithZeroOrOneArgument") + @Test public void testMergeChangedConfigOnInactiveGrid() throws Exception { { //given: two started nodes with test table @@ -460,6 +469,7 @@ private void assertIndexUsed(IgniteCache cache, String sql, Stri /** * @throws Exception if failed. */ + @Test public void testTakeChangedConfigOnActiveGrid() throws Exception { { //given: two started nodes with test table @@ -515,6 +525,7 @@ public void testTakeChangedConfigOnActiveGrid() throws Exception { * @throws Exception if failed. */ @SuppressWarnings("ConstantConditions") + @Test public void testFailJoiningNodeBecauseDifferentSql() throws Exception { { //given: two started nodes with test table @@ -560,6 +571,7 @@ public void testFailJoiningNodeBecauseDifferentSql() throws Exception { * @throws Exception if failed. */ @SuppressWarnings("ConstantConditions") + @Test public void testFailJoiningNodeBecauseFieldInlineSizeIsDifferent() throws Exception { { //given: two started nodes with test table @@ -601,6 +613,7 @@ public void testFailJoiningNodeBecauseFieldInlineSizeIsDifferent() throws Except * @throws Exception if failed. */ @SuppressWarnings("ConstantConditions") + @Test public void testFailJoiningNodeBecauseNeedConfigUpdateOnActiveGrid() throws Exception { { startGrid(0); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteErrorOnRebalanceTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteErrorOnRebalanceTest.java index 9b7d206780c7b..3887f0800c3b8 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteErrorOnRebalanceTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteErrorOnRebalanceTest.java @@ -40,6 +40,9 @@ import org.apache.ignite.spi.indexing.IndexingSpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -49,6 +52,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteErrorOnRebalanceTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -96,6 +100,7 @@ public class IgniteErrorOnRebalanceTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testErrorOnRebalance() throws Exception { Ignite srv0 = startGrid(0); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IncorrectQueryEntityTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IncorrectQueryEntityTest.java index 0dd237d8e8d3a..4cfd05cea0cad 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IncorrectQueryEntityTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IncorrectQueryEntityTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.internal.processors.query.QueryUtils; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * A test for {@link QueryEntity} initialization with incorrect query field name */ +@RunWith(JUnit4.class) public class IncorrectQueryEntityTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { @@ -63,6 +67,7 @@ public class IncorrectQueryEntityTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testIncorrectQueryField() throws Exception { try { startGrid(); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/QueryEntityCaseMismatchTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/QueryEntityCaseMismatchTest.java index 77f41f9f079bf..fb93a37efafd7 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/QueryEntityCaseMismatchTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/QueryEntityCaseMismatchTest.java @@ -34,12 +34,16 @@ import java.util.HashSet; import java.util.LinkedHashMap; import java.util.concurrent.Callable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test reveals issue of null values in SQL query resultset columns that correspond to compound key. * That happens when QueryEntity.keyFields has wrong register compared to QueryEntity.fields. * Issue only manifests for BinaryMarshaller case. Otherwise the keyFields aren't taken into account. */ +@RunWith(JUnit4.class) public class QueryEntityCaseMismatchTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected void afterTest() throws Exception { @@ -101,6 +105,7 @@ public class QueryEntityCaseMismatchTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testCacheInitializationFailure() throws Exception { GridTestUtils.assertThrows(log, new Callable() { @Override public Void call() throws Exception { diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/QueryJoinWithDifferentNodeFiltersTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/QueryJoinWithDifferentNodeFiltersTest.java index 47666b93cc04b..4702995be4684 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/QueryJoinWithDifferentNodeFiltersTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/QueryJoinWithDifferentNodeFiltersTest.java @@ -30,10 +30,14 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class QueryJoinWithDifferentNodeFiltersTest extends GridCommonAbstractTest { /** */ private static final String CACHE_NAME = "cache"; @@ -89,6 +93,7 @@ public class QueryJoinWithDifferentNodeFiltersTest extends GridCommonAbstractTes /** * @throws Exception if failed. */ + @Test public void testSize() throws Exception { startGrids(NODE_COUNT); @@ -160,4 +165,4 @@ private static class TestFilter implements IgnitePredicate { return clusterNode.attribute("DATA") != null; } } -} \ No newline at end of file +} diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/SqlFieldsQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/SqlFieldsQuerySelfTest.java index 5cd599849b164..bf3474127ea7a 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/SqlFieldsQuerySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/SqlFieldsQuerySelfTest.java @@ -28,10 +28,14 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.internal.processors.query.h2.sql.GridSqlQueryParser; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class SqlFieldsQuerySelfTest extends GridCommonAbstractTest { /** INSERT statement. */ private static final String INSERT = "insert into Person(_key, name) values (5, 'x')"; @@ -44,6 +48,7 @@ public class SqlFieldsQuerySelfTest extends GridCommonAbstractTest { /** * @throws Exception If error. */ + @Test public void testSqlFieldsQuery() throws Exception { startGrids(2); @@ -55,6 +60,7 @@ public void testSqlFieldsQuery() throws Exception { /** * @throws Exception If error. */ + @Test public void testSqlFieldsQueryWithTopologyChanges() throws Exception { startGrid(0); @@ -68,6 +74,7 @@ public void testSqlFieldsQueryWithTopologyChanges() throws Exception { /** * @throws Exception If error. */ + @Test public void testQueryCaching() throws Exception { startGrid(0); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/StartCachesInParallelTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/StartCachesInParallelTest.java index e48c294a5127b..30bb018330344 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/StartCachesInParallelTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/StartCachesInParallelTest.java @@ -25,12 +25,16 @@ import org.apache.ignite.failure.StopNodeFailureHandler; import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_ALLOW_START_CACHES_IN_PARALLEL; /** * Tests, that cluster could start and activate with all possible values of IGNITE_ALLOW_START_CACHES_IN_PARALLEL. */ +@RunWith(JUnit4.class) public class StartCachesInParallelTest extends GridCommonAbstractTest { /** IGNITE_ALLOW_START_CACHES_IN_PARALLEL option value before tests. */ private String allowParallel; @@ -93,16 +97,19 @@ public class StartCachesInParallelTest extends GridCommonAbstractTest { } /** */ + @Test public void testWithEnabledOption() throws Exception { doTest("true"); } /** */ + @Test public void testWithDisabledOption() throws Exception { doTest("false"); } /** */ + @Test public void testWithoutOption() throws Exception { doTest(null); } @@ -145,4 +152,4 @@ private static class TestStopNodeFailureHandler extends StopNodeFailureHandler { return super.handle(ignite, failureCtx); } } -} \ No newline at end of file +} diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/authentication/SqlUserCommandSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/authentication/SqlUserCommandSelfTest.java index 64819f3173449..bd7fb7c5ecb9e 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/authentication/SqlUserCommandSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/authentication/SqlUserCommandSelfTest.java @@ -33,10 +33,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for leaks JdbcConnection on SqlFieldsQuery execute. */ +@RunWith(JUnit4.class) public class SqlUserCommandSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -101,6 +105,7 @@ public class SqlUserCommandSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCreateUpdateDropUser() throws Exception { AuthorizationContext.context(actxDflt); @@ -128,6 +133,7 @@ public void testCreateUpdateDropUser() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCreateWithAlreadyExistUser() throws Exception { AuthorizationContext.context(actxDflt); userSql(0, "CREATE USER test WITH PASSWORD 'test'"); @@ -148,6 +154,7 @@ public void testCreateWithAlreadyExistUser() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAlterDropNotExistUser() throws Exception { AuthorizationContext.context(actxDflt); @@ -175,6 +182,7 @@ public void testAlterDropNotExistUser() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNotAuthenticateOperation() throws Exception { for (int i = 0; i < NODES_COUNT; ++i) { final int idx = i; @@ -208,6 +216,7 @@ public void testNotAuthenticateOperation() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNotAuthorizedOperation() throws Exception { AuthorizationContext.context(actxDflt); @@ -250,6 +259,7 @@ public void testNotAuthorizedOperation() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDropDefaultUser() throws Exception { AuthorizationContext.context(actxDflt); @@ -269,6 +279,7 @@ public void testDropDefaultUser() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQuotedUsername() throws Exception { AuthorizationContext.context(actxDflt); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnCreateDestoryIndexTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnCreateDestoryIndexTest.java index 469ec93931818..2d1082d158908 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnCreateDestoryIndexTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnCreateDestoryIndexTest.java @@ -36,6 +36,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -45,6 +48,7 @@ /** * */ +@RunWith(JUnit4.class) public class CacheBlockOnCreateDestoryIndexTest extends GridCommonAbstractTest { /** */ private final List tests = Arrays.asList( @@ -89,6 +93,7 @@ public class CacheBlockOnCreateDestoryIndexTest extends GridCommonAbstractTest { */ @TestIndex(0) @Params(atomicityMode = ATOMIC, cacheMode = PARTITIONED) + @Test public void testCreateIndexAtomicPartitionedGet() throws Exception { doTestCreateIndex(); } @@ -98,6 +103,7 @@ public void testCreateIndexAtomicPartitionedGet() throws Exception { */ @TestIndex(0) @Params(atomicityMode = ATOMIC, cacheMode = REPLICATED) + @Test public void testCreateIndexAtomicReplicatedGet() throws Exception { doTestCreateIndex(); } @@ -107,6 +113,7 @@ public void testCreateIndexAtomicReplicatedGet() throws Exception { */ @TestIndex(0) @Params(atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) + @Test public void testCreateIndexTransactionalPartitionedGet() throws Exception { doTestCreateIndex(); } @@ -116,6 +123,7 @@ public void testCreateIndexTransactionalPartitionedGet() throws Exception { */ @TestIndex(0) @Params(atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) + @Test public void testCreateIndexTransactionalReplicatedGet() throws Exception { doTestCreateIndex(); } @@ -125,6 +133,7 @@ public void testCreateIndexTransactionalReplicatedGet() throws Exception { */ @TestIndex(1) @Params(atomicityMode = ATOMIC, cacheMode = PARTITIONED) + @Test public void testCreateIndexAtomicPartitionedGetAll() throws Exception { doTestCreateIndex(); } @@ -134,6 +143,7 @@ public void testCreateIndexAtomicPartitionedGetAll() throws Exception { */ @TestIndex(1) @Params(atomicityMode = ATOMIC, cacheMode = REPLICATED) + @Test public void testCreateIndexAtomicReplicatedGetAll() throws Exception { doTestCreateIndex(); } @@ -143,6 +153,7 @@ public void testCreateIndexAtomicReplicatedGetAll() throws Exception { */ @TestIndex(1) @Params(atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) + @Test public void testCreateIndexTransactionalPartitionedGetAll() throws Exception { doTestCreateIndex(); } @@ -152,6 +163,7 @@ public void testCreateIndexTransactionalPartitionedGetAll() throws Exception { */ @TestIndex(1) @Params(atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) + @Test public void testCreateIndexTransactionalReplicatedGetAll() throws Exception { doTestCreateIndex(); } @@ -161,6 +173,7 @@ public void testCreateIndexTransactionalReplicatedGetAll() throws Exception { */ @TestIndex(2) @Params(atomicityMode = ATOMIC, cacheMode = PARTITIONED) + @Test public void testCreateIndexAtomicPartitionedScan() throws Exception { doTestCreateIndex(); } @@ -170,6 +183,7 @@ public void testCreateIndexAtomicPartitionedScan() throws Exception { */ @TestIndex(2) @Params(atomicityMode = ATOMIC, cacheMode = REPLICATED) + @Test public void testCreateIndexAtomicReplicatedScan() throws Exception { doTestCreateIndex(); } @@ -179,6 +193,7 @@ public void testCreateIndexAtomicReplicatedScan() throws Exception { */ @TestIndex(2) @Params(atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) + @Test public void testCreateIndexTransactionalPartitionedScan() throws Exception { doTestCreateIndex(); } @@ -188,6 +203,7 @@ public void testCreateIndexTransactionalPartitionedScan() throws Exception { */ @TestIndex(2) @Params(atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) + @Test public void testCreateIndexTransactionalReplicatedScan() throws Exception { doTestCreateIndex(); } @@ -197,6 +213,7 @@ public void testCreateIndexTransactionalReplicatedScan() throws Exception { */ @TestIndex(3) @Params(atomicityMode = ATOMIC, cacheMode = PARTITIONED) + @Test public void testCreateIndexAtomicPartitionedSqlQuery() throws Exception { doTestCreateIndex(); } @@ -206,6 +223,7 @@ public void testCreateIndexAtomicPartitionedSqlQuery() throws Exception { */ @TestIndex(3) @Params(atomicityMode = ATOMIC, cacheMode = REPLICATED) + @Test public void testCreateIndexAtomicReplicatedSqlQuery() throws Exception { doTestCreateIndex(); } @@ -215,6 +233,7 @@ public void testCreateIndexAtomicReplicatedSqlQuery() throws Exception { */ @TestIndex(3) @Params(atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) + @Test public void testCreateIndexTransactionalPartitionedSqlQuery() throws Exception { doTestCreateIndex(); } @@ -224,6 +243,7 @@ public void testCreateIndexTransactionalPartitionedSqlQuery() throws Exception { */ @TestIndex(3) @Params(atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) + @Test public void testCreateIndexTransactionalReplicatedSqlQuery() throws Exception { doTestCreateIndex(); } @@ -233,6 +253,7 @@ public void testCreateIndexTransactionalReplicatedSqlQuery() throws Exception { */ @TestIndex(0) @Params(atomicityMode = ATOMIC, cacheMode = PARTITIONED) + @Test public void testDestroyIndexAtomicPartitionedGet() throws Exception { doTestDestroyIndex(); } @@ -242,6 +263,7 @@ public void testDestroyIndexAtomicPartitionedGet() throws Exception { */ @TestIndex(0) @Params(atomicityMode = ATOMIC, cacheMode = REPLICATED) + @Test public void testDestroyIndexAtomicReplicatedGet() throws Exception { doTestDestroyIndex(); } @@ -251,6 +273,7 @@ public void testDestroyIndexAtomicReplicatedGet() throws Exception { */ @TestIndex(0) @Params(atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) + @Test public void testDestroyIndexTransactionalPartitionedGet() throws Exception { doTestDestroyIndex(); } @@ -260,6 +283,7 @@ public void testDestroyIndexTransactionalPartitionedGet() throws Exception { */ @TestIndex(0) @Params(atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) + @Test public void testDestroyIndexTransactionalReplicatedGet() throws Exception { doTestDestroyIndex(); } @@ -269,6 +293,7 @@ public void testDestroyIndexTransactionalReplicatedGet() throws Exception { */ @TestIndex(1) @Params(atomicityMode = ATOMIC, cacheMode = PARTITIONED) + @Test public void testDestroyIndexAtomicPartitionedGetAll() throws Exception { doTestDestroyIndex(); } @@ -278,6 +303,7 @@ public void testDestroyIndexAtomicPartitionedGetAll() throws Exception { */ @TestIndex(1) @Params(atomicityMode = ATOMIC, cacheMode = REPLICATED) + @Test public void testDestroyIndexAtomicReplicatedGetAll() throws Exception { doTestDestroyIndex(); } @@ -287,6 +313,7 @@ public void testDestroyIndexAtomicReplicatedGetAll() throws Exception { */ @TestIndex(1) @Params(atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) + @Test public void testDestroyIndexTransactionalPartitionedGetAll() throws Exception { doTestDestroyIndex(); } @@ -296,6 +323,7 @@ public void testDestroyIndexTransactionalPartitionedGetAll() throws Exception { */ @TestIndex(1) @Params(atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) + @Test public void testDestroyIndexTransactionalReplicatedGetAll() throws Exception { doTestDestroyIndex(); } @@ -305,6 +333,7 @@ public void testDestroyIndexTransactionalReplicatedGetAll() throws Exception { */ @TestIndex(2) @Params(atomicityMode = ATOMIC, cacheMode = PARTITIONED) + @Test public void testDestroyIndexAtomicPartitionedScan() throws Exception { doTestDestroyIndex(); } @@ -314,6 +343,7 @@ public void testDestroyIndexAtomicPartitionedScan() throws Exception { */ @TestIndex(2) @Params(atomicityMode = ATOMIC, cacheMode = REPLICATED) + @Test public void testDestroyIndexAtomicReplicatedScan() throws Exception { doTestDestroyIndex(); } @@ -323,6 +353,7 @@ public void testDestroyIndexAtomicReplicatedScan() throws Exception { */ @TestIndex(2) @Params(atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) + @Test public void testDestroyIndexTransactionalPartitionedScan() throws Exception { doTestDestroyIndex(); } @@ -332,6 +363,7 @@ public void testDestroyIndexTransactionalPartitionedScan() throws Exception { */ @TestIndex(2) @Params(atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) + @Test public void testDestroyIndexTransactionalReplicatedScan() throws Exception { doTestDestroyIndex(); } @@ -341,6 +373,7 @@ public void testDestroyIndexTransactionalReplicatedScan() throws Exception { */ @TestIndex(3) @Params(atomicityMode = ATOMIC, cacheMode = PARTITIONED) + @Test public void testDestroyIndexAtomicPartitionedSqlQuery() throws Exception { doTestDestroyIndex(); } @@ -350,6 +383,7 @@ public void testDestroyIndexAtomicPartitionedSqlQuery() throws Exception { */ @TestIndex(3) @Params(atomicityMode = ATOMIC, cacheMode = REPLICATED) + @Test public void testDestroyIndexAtomicReplicatedSqlQuery() throws Exception { doTestDestroyIndex(); } @@ -359,6 +393,7 @@ public void testDestroyIndexAtomicReplicatedSqlQuery() throws Exception { */ @TestIndex(3) @Params(atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) + @Test public void testDestroyIndexTransactionalPartitionedSqlQuery() throws Exception { doTestDestroyIndex(); } @@ -368,6 +403,7 @@ public void testDestroyIndexTransactionalPartitionedSqlQuery() throws Exception */ @TestIndex(3) @Params(atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) + @Test public void testDestroyIndexTransactionalReplicatedSqlQuery() throws Exception { doTestDestroyIndex(); } diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnSqlQueryTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnSqlQueryTest.java index e9645b22fb076..9f126ef94a799 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnSqlQueryTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnSqlQueryTest.java @@ -22,6 +22,9 @@ import org.apache.ignite.cache.query.annotations.QuerySqlField; import org.apache.ignite.configuration.CacheConfiguration; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -30,6 +33,7 @@ /** * */ +@RunWith(JUnit4.class) public class CacheBlockOnSqlQueryTest extends CacheBlockOnReadAbstractTest { /** {@inheritDoc} */ @@ -95,60 +99,70 @@ public TestingEntity(Integer id, double val) { /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = PARTITIONED) + @Test @Override public void testStartServerAtomicPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9916"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) + @Test @Override public void testStartServerTransactionalPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9916"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = PARTITIONED) + @Test @Override public void testStopServerAtomicPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9916"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) + @Test @Override public void testStopServerTransactionalPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9916"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = PARTITIONED) + @Test @Override public void testStopBaselineAtomicPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9916"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) + @Test @Override public void testStopBaselineTransactionalPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9916"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = PARTITIONED) + @Test @Override public void testStartClientAtomicPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9916"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) + @Test @Override public void testStartClientTransactionalPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9916"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = PARTITIONED) + @Test @Override public void testStopClientAtomicPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9916"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) + @Test @Override public void testStopClientTransactionalPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9916"); } diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheClientQueryReplicatedNodeRestartSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheClientQueryReplicatedNodeRestartSelfTest.java index 996d6a7c583de..3d3cab134896e 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheClientQueryReplicatedNodeRestartSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheClientQueryReplicatedNodeRestartSelfTest.java @@ -48,6 +48,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -57,6 +60,7 @@ /** * Test for distributed queries with replicated client cache and node restarts. */ +@RunWith(JUnit4.class) public class IgniteCacheClientQueryReplicatedNodeRestartSelfTest extends GridCommonAbstractTest { /** */ private static final String QRY = "select co.id, count(*) cnt\n" + @@ -208,6 +212,7 @@ private void assertClient(IgniteCache c, boolean client) { /** * @throws Exception If failed. */ + @Test public void testRestarts() throws Exception { int duration = 90 * 1000; int qryThreadNum = 5; @@ -437,4 +442,4 @@ private static class Product implements Serializable { this.companyId = companyId; } } -} \ No newline at end of file +} diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheDistributedPartitionQueryConfigurationSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheDistributedPartitionQueryConfigurationSelfTest.java index 0253fe873ed12..af0ddd62cc9a6 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheDistributedPartitionQueryConfigurationSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheDistributedPartitionQueryConfigurationSelfTest.java @@ -20,12 +20,17 @@ import java.util.Arrays; import org.apache.ignite.cache.query.SqlFieldsQuery; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests cache query configuration. */ +@RunWith(JUnit4.class) public class IgniteCacheDistributedPartitionQueryConfigurationSelfTest extends GridCommonAbstractTest { /** Tests partition validation. */ + @Test public void testPartitions() { final SqlFieldsQuery qry = new SqlFieldsQuery("select 1"); @@ -89,4 +94,4 @@ private void failIfNotThrown(Runnable r) { // No-op. } } -} \ No newline at end of file +} diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheDistributedPartitionQueryNodeRestartsSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheDistributedPartitionQueryNodeRestartsSelfTest.java index 8b85d2760ec82..b0a4d679bf92f 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheDistributedPartitionQueryNodeRestartsSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheDistributedPartitionQueryNodeRestartsSelfTest.java @@ -27,10 +27,14 @@ import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor; import org.apache.ignite.internal.util.typedef.internal.U; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests distributed queries over set of partitions on unstable topology. */ +@RunWith(JUnit4.class) public class IgniteCacheDistributedPartitionQueryNodeRestartsSelfTest extends IgniteCacheDistributedPartitionQueryAbstractSelfTest { /** {@inheritDoc} */ @@ -51,6 +55,7 @@ public class IgniteCacheDistributedPartitionQueryNodeRestartsSelfTest extends /** * Tests join query within region on unstable topology. */ + @Test public void testJoinQueryUnstableTopology() throws Exception { final AtomicBoolean stop = new AtomicBoolean(); @@ -126,4 +131,4 @@ public void testJoinQueryUnstableTopology() throws Exception { restartStats.get(i)); } } -} \ No newline at end of file +} diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheDistributedPartitionQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheDistributedPartitionQuerySelfTest.java index 00c384870e580..b4e656d9046ea 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheDistributedPartitionQuerySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheDistributedPartitionQuerySelfTest.java @@ -24,42 +24,53 @@ import org.apache.ignite.cache.affinity.Affinity; import org.apache.ignite.cache.query.SqlFieldsQuery; import org.apache.ignite.cache.query.SqlQuery; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests distributed queries over set of partitions on stable topology. */ +@RunWith(JUnit4.class) public class IgniteCacheDistributedPartitionQuerySelfTest extends IgniteCacheDistributedPartitionQueryAbstractSelfTest { /** Tests query within region. */ + @Test public void testRegionQuery() { doTestRegionQuery(grid(0)); } /** Tests query within region (client). */ + @Test public void testRegionQueryClient() throws Exception { doTestRegionQuery(grid("client")); } /** Test query within partitions. */ + @Test public void testPartitionsQuery() { doTestPartitionsQuery(grid(0)); } /** Test query within partitions (client). */ + @Test public void testPartitionsQueryClient() throws Exception { doTestPartitionsQuery(grid("client")); } /** Tests join query within region. */ + @Test public void testJoinQuery() { doTestJoinQuery(grid(0)); } /** Tests join query within region. */ + @Test public void testJoinQueryClient() throws Exception { doTestJoinQuery(grid("client")); } /** Tests local query over partitions. */ + @Test public void testLocalQuery() { Affinity affinity = grid(0).affinity("cl"); @@ -87,4 +98,4 @@ public void testLocalQuery() { for (List row : rows) assertEquals("Incorrect partition", parts[0], affinity.partition(row.get(0))); } -} \ No newline at end of file +} diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheDistributedQueryCancelSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheDistributedQueryCancelSelfTest.java index d5ee0e978f874..5499fe38c0f2e 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheDistributedQueryCancelSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheDistributedQueryCancelSelfTest.java @@ -33,10 +33,14 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests distributed SQL query cancel related scenarios. */ +@RunWith(JUnit4.class) public class IgniteCacheDistributedQueryCancelSelfTest extends GridCommonAbstractTest { /** Grids count. */ private static final int GRIDS_COUNT = 3; @@ -85,6 +89,7 @@ public class IgniteCacheDistributedQueryCancelSelfTest extends GridCommonAbstrac } /** */ + @Test public void testQueryCancelsOnGridShutdown() throws Exception { try (Ignite client = startGrid("client")) { @@ -138,6 +143,7 @@ public void testQueryCancelsOnGridShutdown() throws Exception { } /** */ + @Test public void testQueryResponseFailCode() throws Exception { try (Ignite client = startGrid("client")) { diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheDistributedQueryStopOnCancelOrTimeoutSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheDistributedQueryStopOnCancelOrTimeoutSelfTest.java index c0e91f8f78598..3a58346c32792 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheDistributedQueryStopOnCancelOrTimeoutSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheDistributedQueryStopOnCancelOrTimeoutSelfTest.java @@ -40,10 +40,14 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests distributed SQL queries cancel by user or timeout. */ +@RunWith(JUnit4.class) public class IgniteCacheDistributedQueryStopOnCancelOrTimeoutSelfTest extends GridCommonAbstractTest { /** Grids count. */ private static final int GRIDS_CNT = 3; @@ -99,76 +103,91 @@ public class IgniteCacheDistributedQueryStopOnCancelOrTimeoutSelfTest extends Gr } /** */ + @Test public void testRemoteQueryExecutionTimeout() throws Exception { testQueryCancel(CACHE_SIZE, VAL_SIZE, QRY_1, 500, TimeUnit.MILLISECONDS, true); } /** */ + @Test public void testRemoteQueryWithMergeTableTimeout() throws Exception { testQueryCancel(CACHE_SIZE, VAL_SIZE, QRY_2, 500, TimeUnit.MILLISECONDS, true); } /** */ + @Test public void testRemoteQueryExecutionCancel0() throws Exception { testQueryCancel(CACHE_SIZE, VAL_SIZE, QRY_1, 1, TimeUnit.MILLISECONDS, false); } /** */ + @Test public void testRemoteQueryExecutionCancel1() throws Exception { testQueryCancel(CACHE_SIZE, VAL_SIZE, QRY_1, 500, TimeUnit.MILLISECONDS, false); } /** */ + @Test public void testRemoteQueryExecutionCancel2() throws Exception { testQueryCancel(CACHE_SIZE, VAL_SIZE, QRY_1, 1, TimeUnit.SECONDS, false); } /** */ + @Test public void testRemoteQueryExecutionCancel3() throws Exception { testQueryCancel(CACHE_SIZE, VAL_SIZE, QRY_1, 3, TimeUnit.SECONDS, false); } /** */ + @Test public void testRemoteQueryWithMergeTableCancel0() throws Exception { testQueryCancel(CACHE_SIZE, VAL_SIZE, QRY_2, 1, TimeUnit.MILLISECONDS, false); } /** */ + @Test public void testRemoteQueryWithMergeTableCancel1() throws Exception { testQueryCancel(CACHE_SIZE, VAL_SIZE, QRY_2, 500, TimeUnit.MILLISECONDS, false); } /** */ + @Test public void testRemoteQueryWithMergeTableCancel2() throws Exception { testQueryCancel(CACHE_SIZE, VAL_SIZE, QRY_2, 1_500, TimeUnit.MILLISECONDS, false); } /** */ + @Test public void testRemoteQueryWithMergeTableCancel3() throws Exception { testQueryCancel(CACHE_SIZE, VAL_SIZE, QRY_2, 3, TimeUnit.SECONDS, false); } /** */ + @Test public void testRemoteQueryWithoutMergeTableCancel0() throws Exception { testQueryCancel(CACHE_SIZE, VAL_SIZE, QRY_3, 1, TimeUnit.MILLISECONDS, false); } /** */ + @Test public void testRemoteQueryWithoutMergeTableCancel1() throws Exception { testQueryCancel(CACHE_SIZE, VAL_SIZE, QRY_3, 500, TimeUnit.MILLISECONDS, false); } /** */ + @Test public void testRemoteQueryWithoutMergeTableCancel2() throws Exception { testQueryCancel(CACHE_SIZE, VAL_SIZE, QRY_3, 1_000, TimeUnit.MILLISECONDS, false); } /** */ + @Test public void testRemoteQueryWithoutMergeTableCancel3() throws Exception { testQueryCancel(CACHE_SIZE, VAL_SIZE, QRY_3, 3, TimeUnit.SECONDS, false); } /** */ + @Test public void testRemoteQueryAlreadyFinishedStop() throws Exception { testQueryCancel(100, VAL_SIZE, QRY_3, 3, TimeUnit.SECONDS, false); } diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCachePartitionedFieldsQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCachePartitionedFieldsQuerySelfTest.java index 7f9989ddeaefc..3a478ed2e3888 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCachePartitionedFieldsQuerySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCachePartitionedFieldsQuerySelfTest.java @@ -27,12 +27,16 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.internal.processors.cache.IgniteCacheAbstractFieldsQuerySelfTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** * Tests for fields queries. */ +@RunWith(JUnit4.class) public class IgniteCachePartitionedFieldsQuerySelfTest extends IgniteCacheAbstractFieldsQuerySelfTest { /** {@inheritDoc} */ @Override protected CacheMode cacheMode() { @@ -62,11 +66,13 @@ protected NearCacheConfiguration nearConfiguration() { } /** @throws Exception If failed. */ + @Test public void testLocalQuery() throws Exception { doTestLocalQuery(intCache, new SqlFieldsQuery("select _key, _val from Integer")); } /** @throws Exception If failed. */ + @Test public void testLocalQueryNoOpCache() throws Exception { doTestLocalQuery(noOpCache, new SqlFieldsQuery("select _key, _val from \"Integer-Integer\".Integer")); } @@ -90,4 +96,4 @@ private void doTestLocalQuery(IgniteCache cache, SqlFieldsQuery fldsQry) t assertEquals(exp, qry.getAll().size()); } -} \ No newline at end of file +} diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCachePartitionedQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCachePartitionedQuerySelfTest.java index fd2ca763671ea..47de06acfe3c4 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCachePartitionedQuerySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCachePartitionedQuerySelfTest.java @@ -40,6 +40,9 @@ import org.apache.ignite.plugin.extensions.communication.Message; import org.apache.ignite.spi.communication.CommunicationSpi; import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CachePeekMode.ALL; @@ -47,6 +50,7 @@ /** * Tests for partitioned cache queries. */ +@RunWith(JUnit4.class) public class IgniteCachePartitionedQuerySelfTest extends IgniteCacheAbstractQuerySelfTest { /** {@inheritDoc} */ @Override protected int gridCount() { @@ -66,6 +70,7 @@ public class IgniteCachePartitionedQuerySelfTest extends IgniteCacheAbstractQuer /** * @throws Exception If failed. */ + @Test public void testFieldsQuery() throws Exception { Person p1 = new Person("Jon", 1500); Person p2 = new Person("Jane", 2000); @@ -105,6 +110,7 @@ public void testFieldsQuery() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultipleNodesQuery() throws Exception { Person p1 = new Person("Jon", 1500); Person p2 = new Person("Jane", 2000); @@ -153,6 +159,7 @@ private void checkResult(Iterable> entries, Person... /** * @throws Exception If failed. */ + @Test public void testScanQueryPagination() throws Exception { final int pageSize = 5; @@ -217,4 +224,4 @@ private static class TestTcpCommunicationSpi extends TcpCommunicationSpi { super.sendMessage(node, msg, ackC); } } -} \ No newline at end of file +} diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNoRebalanceSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNoRebalanceSelfTest.java index 7b4d400778aa8..17395629fa450 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNoRebalanceSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNoRebalanceSelfTest.java @@ -28,10 +28,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test added to check for https://issues.apache.org/jira/browse/IGNITE-3326. */ +@RunWith(JUnit4.class) public class IgniteCacheQueryNoRebalanceSelfTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -62,6 +66,7 @@ public IgniteCacheQueryNoRebalanceSelfTest() { /** * Tests correct query execution with disabled re-balancing. */ + @Test public void testQueryNoRebalance() { IgniteCache cache = grid().cache(DEFAULT_CACHE_NAME); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeFailTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeFailTest.java index 6e47399b46854..d756d165da004 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeFailTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeFailTest.java @@ -32,10 +32,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test added to check for https://issues.apache.org/jira/browse/IGNITE-2542. */ +@RunWith(JUnit4.class) public class IgniteCacheQueryNodeFailTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -76,6 +80,7 @@ public class IgniteCacheQueryNodeFailTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testNodeFailedSimpleQuery()throws Exception { checkNodeFailed("select _key from Integer"); } @@ -83,6 +88,7 @@ public void testNodeFailedSimpleQuery()throws Exception { /** * @throws Exception If failed. */ + @Test public void testNodeFailedReduceQuery()throws Exception { checkNodeFailed("select avg(_key) from Integer"); } diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartDistributedJoinSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartDistributedJoinSelfTest.java index bad53030d26dd..634af06a8f775 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartDistributedJoinSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartDistributedJoinSelfTest.java @@ -33,10 +33,14 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicIntegerArray; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for distributed queries with node restarts. */ +@RunWith(JUnit4.class) public class IgniteCacheQueryNodeRestartDistributedJoinSelfTest extends IgniteCacheQueryAbstractDistributedJoinSelfTest { /** Total nodes. */ private int totalNodes = 6; @@ -64,6 +68,7 @@ public class IgniteCacheQueryNodeRestartDistributedJoinSelfTest extends IgniteCa /** * @throws Exception If failed. */ + @Test public void testRestarts() throws Exception { restarts(false); } @@ -71,6 +76,7 @@ public void testRestarts() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRestartsBroadcast() throws Exception { restarts(true); } @@ -278,4 +284,4 @@ private void restarts(final boolean broadcastQry) throws Exception { info("Stopped."); } -} \ No newline at end of file +} diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartSelfTest.java index dd495cfb216a9..841bd5ccecbe1 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartSelfTest.java @@ -41,6 +41,9 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -49,6 +52,7 @@ /** * Test for distributed queries with node restarts. */ +@RunWith(JUnit4.class) public class IgniteCacheQueryNodeRestartSelfTest extends GridCacheAbstractSelfTest { /** */ private static final int GRID_CNT = 3; @@ -104,6 +108,7 @@ public class IgniteCacheQueryNodeRestartSelfTest extends GridCacheAbstractSelfTe * @throws Exception If failed. */ @SuppressWarnings({"TooBroadScope"}) + @Test public void testRestarts() throws Exception { int duration = 60 * 1000; int qryThreadNum = 10; @@ -259,4 +264,4 @@ public synchronized boolean awaitEvents(int cnt, long timeout) throws Interrupte return false; } } -} \ No newline at end of file +} diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartSelfTest2.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartSelfTest2.java index 834a7324ef066..6b78c214eceac 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartSelfTest2.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartSelfTest2.java @@ -51,6 +51,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.TransactionException; import org.apache.ignite.transactions.TransactionTimeoutException; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -61,6 +64,7 @@ /** * Test for distributed queries with node restarts. */ +@RunWith(JUnit4.class) public class IgniteCacheQueryNodeRestartSelfTest2 extends GridCommonAbstractTest { /** */ private static final String PARTITIONED_QRY = "select co.id, count(*) cnt\n" + @@ -199,6 +203,7 @@ private void fillCaches() { /** * @throws Exception If failed. */ + @Test public void testRestarts() throws Exception { int duration = 90 * 1000; int qryThreadNum = 4; diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryStopOnCancelOrTimeoutDistributedJoinSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryStopOnCancelOrTimeoutDistributedJoinSelfTest.java index 6c989dd73ad06..24516c8450a1c 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryStopOnCancelOrTimeoutDistributedJoinSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryStopOnCancelOrTimeoutDistributedJoinSelfTest.java @@ -33,47 +33,59 @@ import org.apache.ignite.internal.processors.GridProcessor; import org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing; import org.apache.ignite.internal.util.typedef.internal.U; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for cancel of query containing distributed joins. */ +@RunWith(JUnit4.class) public class IgniteCacheQueryStopOnCancelOrTimeoutDistributedJoinSelfTest extends IgniteCacheQueryAbstractDistributedJoinSelfTest { /** */ + @Test public void testCancel1() throws Exception { testQueryCancel(grid(0), "pe", QRY_0, 1, TimeUnit.MILLISECONDS, false); } /** */ + @Test public void testCancel2() throws Exception { testQueryCancel(grid(0), "pe", QRY_0, 50, TimeUnit.MILLISECONDS, false); } /** */ + @Test public void testCancel3() throws Exception { testQueryCancel(grid(0), "pe", QRY_0, 100, TimeUnit.MILLISECONDS, false); } /** */ + @Test public void testCancel4() throws Exception { testQueryCancel(grid(0), "pe", QRY_0, 500, TimeUnit.MILLISECONDS, false); } /** */ + @Test public void testTimeout1() throws Exception { testQueryCancel(grid(0), "pe", QRY_0, 1, TimeUnit.MILLISECONDS, true); } /** */ + @Test public void testTimeout2() throws Exception { testQueryCancel(grid(0), "pe", QRY_0, 50, TimeUnit.MILLISECONDS, true); } /** */ + @Test public void testTimeout3() throws Exception { testQueryCancel(grid(0), "pe", QRY_0, 100, TimeUnit.MILLISECONDS, true); } /** */ + @Test public void testTimeout4() throws Exception { testQueryCancel(grid(0), "pe", QRY_0, 500, TimeUnit.MILLISECONDS, true); } diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteSqlQueryWithBaselineTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteSqlQueryWithBaselineTest.java index 203a319a3c6b7..5c0f38dd0db58 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteSqlQueryWithBaselineTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteSqlQueryWithBaselineTest.java @@ -33,10 +33,14 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import javax.cache.Cache; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteSqlQueryWithBaselineTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -110,6 +114,7 @@ public static class C2 implements Serializable { /** * @throws Exception If failed. */ + @Test public void testQueryWithNodeNotInBLT() throws Exception { startGrids(2); @@ -123,6 +128,7 @@ public void testQueryWithNodeNotInBLT() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryWithoutBLTNode() throws Exception { startGrids(2); @@ -137,6 +143,7 @@ public void testQueryWithoutBLTNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryFromNotBLTNode() throws Exception { startGrid(1); @@ -181,4 +188,4 @@ private void doQuery() { log.info("result size: " + res.size()); } -} \ No newline at end of file +} diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheReplicatedFieldsQueryJoinNoPrimaryPartitionsSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheReplicatedFieldsQueryJoinNoPrimaryPartitionsSelfTest.java index a5b3706105112..d97e50b487a2f 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheReplicatedFieldsQueryJoinNoPrimaryPartitionsSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheReplicatedFieldsQueryJoinNoPrimaryPartitionsSelfTest.java @@ -26,6 +26,9 @@ import org.apache.ignite.internal.processors.query.QueryUtils; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -36,6 +39,7 @@ * Tests non-collocated join with REPLICATED cache and no primary partitions for that cache on some nodes. */ @SuppressWarnings("unused") +@RunWith(JUnit4.class) public class IgniteCacheReplicatedFieldsQueryJoinNoPrimaryPartitionsSelfTest extends GridCommonAbstractTest { /** Client node name. */ public static final String NODE_CLI = "client"; @@ -103,6 +107,7 @@ public class IgniteCacheReplicatedFieldsQueryJoinNoPrimaryPartitionsSelfTest ext * * @throws Exception If failed. */ + @Test public void testJoinNonCollocated() throws Exception { SqlFieldsQuery qry = new SqlFieldsQuery("SELECT COUNT(*) FROM PartValue p, RepValue r WHERE p.repId=r.id"); @@ -148,4 +153,4 @@ public RepValue(int id) { this.id = id; } } -} \ No newline at end of file +} diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheReplicatedFieldsQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheReplicatedFieldsQuerySelfTest.java index 953e5fafa05a9..c4b5c054f208c 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheReplicatedFieldsQuerySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheReplicatedFieldsQuerySelfTest.java @@ -27,12 +27,16 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.internal.processors.cache.IgniteCacheAbstractFieldsQuerySelfTest; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.REPLICATED; /** * Tests for fields queries. */ +@RunWith(JUnit4.class) public class IgniteCacheReplicatedFieldsQuerySelfTest extends IgniteCacheAbstractFieldsQuerySelfTest { /** {@inheritDoc} */ @Override protected CacheMode cacheMode() { @@ -47,6 +51,7 @@ public class IgniteCacheReplicatedFieldsQuerySelfTest extends IgniteCacheAbstrac /** * @throws Exception If failed. */ + @Test public void testLostIterator() throws Exception { IgniteCache cache = intCache; @@ -77,4 +82,4 @@ public void testLostIterator() throws Exception { } }, IgniteException.class, null); } -} \ No newline at end of file +} diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheReplicatedQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheReplicatedQuerySelfTest.java index f741ef22c00c5..4b10536a4820d 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheReplicatedQuerySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheReplicatedQuerySelfTest.java @@ -48,6 +48,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testsuites.IgniteIgnore; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.REPLICATED; import static org.apache.ignite.cache.CachePeekMode.ALL; @@ -56,6 +59,7 @@ /** * Tests replicated query. */ +@RunWith(JUnit4.class) public class IgniteCacheReplicatedQuerySelfTest extends IgniteCacheAbstractQuerySelfTest { /** */ private static final boolean TEST_DEBUG = false; @@ -116,6 +120,7 @@ public class IgniteCacheReplicatedQuerySelfTest extends IgniteCacheAbstractQuery /** * @throws Exception If failed. */ + @Test public void testClientOnlyNode() throws Exception { try { Ignite g = startGrid("client"); @@ -152,6 +157,7 @@ public void testClientOnlyNode() throws Exception { * * @throws Exception If failed. */ + @Test public void testIterator() throws Exception { int keyCnt = 100; @@ -183,6 +189,7 @@ public void testIterator() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testLocalQueryWithExplicitFlag() throws Exception { doTestLocalQuery(true); } @@ -190,6 +197,7 @@ public void testLocalQueryWithExplicitFlag() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testLocalQueryWithoutExplicitFlag() throws Exception { doTestLocalQuery(false); } @@ -227,6 +235,7 @@ private void doTestLocalQuery(boolean loc) throws Exception { /** * @throws Exception If test failed. */ + @Test public void testDistributedQuery() throws Exception { final int keyCnt = 4; @@ -279,6 +288,7 @@ public void testDistributedQuery() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testToString() throws Exception { int keyCnt = 4; @@ -296,6 +306,7 @@ public void testToString() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLostIterator() throws Exception { IgniteCache cache = jcache(Integer.class, Integer.class); @@ -334,6 +345,7 @@ public void testLostIterator() throws Exception { * @throws Exception If failed. */ @IgniteIgnore(value = "https://issues.apache.org/jira/browse/IGNITE-613", forceFailure = true) + @Test public void testNodeLeft() throws Exception { Ignite g = startGrid("client"); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/BasicIndexTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/BasicIndexTest.java index feb330bcaef87..6425dbfb85cdd 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/BasicIndexTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/BasicIndexTest.java @@ -42,10 +42,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * A set of basic tests for caches with indexes. */ +@RunWith(JUnit4.class) public class BasicIndexTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -145,6 +149,7 @@ public class BasicIndexTest extends GridCommonAbstractTest { } /** */ + @Test public void testNoIndexesNoPersistence() throws Exception { indexes = Collections.emptyList(); @@ -168,6 +173,7 @@ public void testNoIndexesNoPersistence() throws Exception { } /** */ + @Test public void testAllIndexesNoPersistence() throws Exception { indexes = Arrays.asList( new QueryIndex("keyStr"), @@ -198,6 +204,7 @@ public void testAllIndexesNoPersistence() throws Exception { } /** */ + @Test public void testDynamicIndexesNoPersistence() throws Exception { indexes = Collections.emptyList(); @@ -230,6 +237,7 @@ public void testDynamicIndexesNoPersistence() throws Exception { } /** */ + @Test public void testNoIndexesWithPersistence() throws Exception { indexes = Collections.emptyList(); @@ -265,6 +273,7 @@ public void testNoIndexesWithPersistence() throws Exception { } /** */ + @Test public void testAllIndexesWithPersistence() throws Exception { indexes = Arrays.asList( new QueryIndex("keyStr"), @@ -307,6 +316,7 @@ public void testAllIndexesWithPersistence() throws Exception { } /** */ + @Test public void testDynamicIndexesWithPersistence() throws Exception { indexes = Collections.emptyList(); @@ -351,6 +361,7 @@ public void testDynamicIndexesWithPersistence() throws Exception { } /** */ + @Test public void testNoIndexesWithPersistenceIndexRebuild() throws Exception { indexes = Collections.emptyList(); @@ -396,6 +407,7 @@ public void testNoIndexesWithPersistenceIndexRebuild() throws Exception { } /** */ + @Test public void testAllIndexesWithPersistenceIndexRebuild() throws Exception { indexes = Arrays.asList( new QueryIndex("keyStr"), @@ -448,6 +460,7 @@ public void testAllIndexesWithPersistenceIndexRebuild() throws Exception { } /** */ + @Test public void testDynamicIndexesWithPersistenceIndexRebuild() throws Exception { indexes = Collections.emptyList(); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/ComplexPrimaryKeyUnwrapSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/ComplexPrimaryKeyUnwrapSelfTest.java index 376a0d4b52981..b17ea33f3315f 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/ComplexPrimaryKeyUnwrapSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/ComplexPrimaryKeyUnwrapSelfTest.java @@ -27,11 +27,15 @@ import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test of creating and using PK indexes for tables created through SQL. */ @SuppressWarnings({"unchecked", "ThrowableResultOfMethodCallIgnored"}) +@RunWith(JUnit4.class) public class ComplexPrimaryKeyUnwrapSelfTest extends GridCommonAbstractTest { /** Counter to generate unique table names. */ @@ -54,6 +58,7 @@ public class ComplexPrimaryKeyUnwrapSelfTest extends GridCommonAbstractTest { /** * Test using PK indexes for complex primary key. */ + @Test public void testComplexPk() { String tblName = createTableName(); @@ -66,6 +71,7 @@ public void testComplexPk() { /** * Test using PK indexes for simple primary key. */ + @Test public void testSimplePk() { //ToDo: IGNITE-8386: need to add DATE type into the test. HashMap types = new HashMap() { @@ -107,6 +113,7 @@ public void testSimplePk() { /** * Test using PK indexes for simple primary key and affinity key. */ + @Test public void testSimplePkWithAffinityKey() { //ToDo: IGNITE-8386: need to add DATE type into the test. HashMap types = new HashMap() { @@ -148,6 +155,7 @@ public void testSimplePkWithAffinityKey() { /** * Test using PK indexes for wrapped primary key. */ + @Test public void testWrappedPk() { String tblName = createTableName(); @@ -181,6 +189,7 @@ private void checkUsingIndexes(String tblName, String idVal) { /** * Test don't using PK indexes for table created through cache API. */ + @Test public void testIndexesForCachesCreatedThroughCashApi() { String tblName = TestValue.class.getSimpleName(); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/ComplexSecondaryKeyUnwrapSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/ComplexSecondaryKeyUnwrapSelfTest.java index fe3cbfa6a1d75..e54c514d43fbe 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/ComplexSecondaryKeyUnwrapSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/ComplexSecondaryKeyUnwrapSelfTest.java @@ -25,11 +25,15 @@ import org.apache.ignite.cache.query.annotations.QuerySqlField; import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test of creating and using secondary indexes for tables created through SQL. */ @SuppressWarnings({"unchecked", "ThrowableResultOfMethodCallIgnored"}) +@RunWith(JUnit4.class) public class ComplexSecondaryKeyUnwrapSelfTest extends GridCommonAbstractTest { /** Counter to generate unique table names. */ @@ -52,6 +56,7 @@ public class ComplexSecondaryKeyUnwrapSelfTest extends GridCommonAbstractTest { /** * Test secondary index with complex PK. Columns for secondary and PK indexes are intersect. */ + @Test public void testSecondaryIndexWithIntersectColumnsComplexPk() { String tblName = createTableName(); @@ -66,6 +71,7 @@ public void testSecondaryIndexWithIntersectColumnsComplexPk() { /** * Test using secondary index with simple PK. */ + @Test public void testSecondaryIndexSimplePk() { HashMap types = new HashMap() { { diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/DuplicateKeyValueClassesSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/DuplicateKeyValueClassesSelfTest.java index 6eb1bb982df7f..2b67214b90bed 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/DuplicateKeyValueClassesSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/DuplicateKeyValueClassesSelfTest.java @@ -22,11 +22,15 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import java.util.UUID; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Make sure that cache can start with multiple key-value classes of the same type. */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class DuplicateKeyValueClassesSelfTest extends GridCommonAbstractTest { /** Cache name. */ private static final String CACHE_NAME = "cache"; @@ -48,6 +52,7 @@ public class DuplicateKeyValueClassesSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testDuplicateKeyClass() throws Exception { CacheConfiguration ccfg = new CacheConfiguration() .setName(CACHE_NAME) @@ -61,6 +66,7 @@ public void testDuplicateKeyClass() throws Exception { * * @throws Exception If failed. */ + @Test public void testDuplicateValueClass() throws Exception { CacheConfiguration ccfg = new CacheConfiguration() .setName(CACHE_NAME) diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/DynamicColumnsAbstractConcurrentSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/DynamicColumnsAbstractConcurrentSelfTest.java index fb1da7218ce06..a9eeedda0d9f3 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/DynamicColumnsAbstractConcurrentSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/DynamicColumnsAbstractConcurrentSelfTest.java @@ -61,6 +61,9 @@ import org.apache.ignite.internal.util.typedef.T3; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.lang.IgnitePredicate; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.IgniteClientReconnectAbstractTest.TestTcpDiscoverySpi; @@ -68,6 +71,7 @@ * Concurrency tests for dynamic index create/drop. */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public abstract class DynamicColumnsAbstractConcurrentSelfTest extends DynamicColumnsAbstractTest { /** Test duration. */ private static final long TEST_DUR = 10_000L; @@ -170,6 +174,7 @@ public abstract class DynamicColumnsAbstractConcurrentSelfTest extends DynamicCo * * @throws Exception If failed. */ + @Test public void testAddColumnCoordinatorChange() throws Exception { checkCoordinatorChange(true); } @@ -179,6 +184,7 @@ public void testAddColumnCoordinatorChange() throws Exception { * * @throws Exception If failed. */ + @Test public void testDropColumnCoordinatorChange() throws Exception { checkCoordinatorChange(false); } @@ -258,6 +264,7 @@ public void checkCoordinatorChange(boolean addOrRemove) throws Exception { * * @throws Exception If failed. */ + @Test public void testOperationChaining() throws Exception { // 7 nodes * 2 columns = 14 latch countdowns. CountDownLatch finishLatch = new CountDownLatch(14); @@ -312,6 +319,7 @@ public void testOperationChaining() throws Exception { * * @throws Exception If failed. */ + @Test public void testNodeJoinOnPendingAddOperation() throws Exception { checkNodeJoinOnPendingOperation(true); } @@ -321,6 +329,7 @@ public void testNodeJoinOnPendingAddOperation() throws Exception { * * @throws Exception If failed. */ + @Test public void testNodeJoinOnPendingDropOperation() throws Exception { checkNodeJoinOnPendingOperation(false); } @@ -368,6 +377,7 @@ private void checkNodeJoinOnPendingOperation(boolean addOrRemove) throws Excepti * * @throws Exception If failed, */ + @Test public void testConcurrentPutRemove() throws Exception { CountDownLatch finishLatch = new CountDownLatch(4); @@ -498,6 +508,7 @@ private Object key(int id) { * * @throws Exception If failed. */ + @Test public void testAddConcurrentRebalance() throws Exception { checkConcurrentRebalance(true); } @@ -507,6 +518,7 @@ public void testAddConcurrentRebalance() throws Exception { * * @throws Exception If failed. */ + @Test public void testDropConcurrentRebalance() throws Exception { checkConcurrentRebalance(false); } @@ -574,6 +586,7 @@ private void put(Ignite node, int startIdx, int endIdx) { * * @throws Exception If failed. */ + @Test public void testAddConcurrentCacheDestroy() throws Exception { checkConcurrentCacheDestroy(true); } @@ -583,6 +596,7 @@ public void testAddConcurrentCacheDestroy() throws Exception { * * @throws Exception If failed. */ + @Test public void testDropConcurrentCacheDestroy() throws Exception { checkConcurrentCacheDestroy(false); } @@ -643,6 +657,7 @@ private void checkConcurrentCacheDestroy(boolean addOrRemove) throws Exception { * * @throws Exception If failed. */ + @Test public void testQueryConsistencyMultithreaded() throws Exception { // Start complex topology. ignitionStart(serverConfiguration(1)); @@ -734,6 +749,7 @@ public void testQueryConsistencyMultithreaded() throws Exception { * * @throws Exception If failed. */ + @Test public void testClientReconnect() throws Exception { checkClientReconnect(false, true); } @@ -743,6 +759,7 @@ public void testClientReconnect() throws Exception { * * @throws Exception If failed. */ + @Test public void testClientReconnectWithCacheRestart() throws Exception { checkClientReconnect(true, true); } @@ -752,6 +769,7 @@ public void testClientReconnectWithCacheRestart() throws Exception { * * @throws Exception If failed. */ + @Test public void testClientReconnectWithNonDynamicCache() throws Exception { checkClientReconnect(false, false); } @@ -761,6 +779,7 @@ public void testClientReconnectWithNonDynamicCache() throws Exception { * * @throws Exception If failed. */ + @Test public void testClientReconnectWithNonDynamicCacheRestart() throws Exception { checkClientReconnect(true, false); } @@ -861,6 +880,7 @@ private void reconnectClientNode(final Ignite srvNode, final Ignite cliNode, fin * @throws Exception If failed. */ @SuppressWarnings("StringConcatenationInLoop") + @Test public void testConcurrentOperationsAndNodeStartStopMultithreaded() throws Exception { noOpFailureHnd = true; diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/DynamicIndexAbstractBasicSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/DynamicIndexAbstractBasicSelfTest.java index dfc353b882f7c..176744b183977 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/DynamicIndexAbstractBasicSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/DynamicIndexAbstractBasicSelfTest.java @@ -38,6 +38,9 @@ import org.apache.ignite.internal.processors.query.schema.SchemaOperationException; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -48,6 +51,7 @@ * Tests for dynamic index creation. */ @SuppressWarnings({"unchecked"}) +@RunWith(JUnit4.class) public abstract class DynamicIndexAbstractBasicSelfTest extends DynamicIndexAbstractSelfTest { /** Node index for regular server (coordinator). */ protected static final int IDX_SRV_CRD = 0; @@ -136,6 +140,7 @@ private void loadInitialData() { * * @throws Exception If failed. */ + @Test public void testCreatePartitionedAtomic() throws Exception { checkCreate(PARTITIONED, ATOMIC, false); } @@ -145,6 +150,7 @@ public void testCreatePartitionedAtomic() throws Exception { * * @throws Exception If failed. */ + @Test public void testCreatePartitionedAtomicNear() throws Exception { checkCreate(PARTITIONED, ATOMIC, true); } @@ -154,6 +160,7 @@ public void testCreatePartitionedAtomicNear() throws Exception { * * @throws Exception If failed. */ + @Test public void testCreatePartitionedTransactional() throws Exception { checkCreate(PARTITIONED, TRANSACTIONAL, false); } @@ -163,6 +170,7 @@ public void testCreatePartitionedTransactional() throws Exception { * * @throws Exception If failed. */ + @Test public void testCreatePartitionedTransactionalNear() throws Exception { checkCreate(PARTITIONED, TRANSACTIONAL, true); } @@ -172,6 +180,7 @@ public void testCreatePartitionedTransactionalNear() throws Exception { * * @throws Exception If failed. */ + @Test public void testCreateReplicatedAtomic() throws Exception { checkCreate(REPLICATED, ATOMIC, false); } @@ -181,6 +190,7 @@ public void testCreateReplicatedAtomic() throws Exception { * * @throws Exception If failed. */ + @Test public void testCreateReplicatedTransactional() throws Exception { checkCreate(REPLICATED, TRANSACTIONAL, false); } @@ -220,6 +230,7 @@ private void checkCreate(CacheMode mode, CacheAtomicityMode atomicityMode, boole * * @throws Exception If failed. */ + @Test public void testCreateCompositePartitionedAtomic() throws Exception { checkCreateComposite(PARTITIONED, ATOMIC, false); } @@ -229,6 +240,7 @@ public void testCreateCompositePartitionedAtomic() throws Exception { * * @throws Exception If failed. */ + @Test public void testCreateCompositePartitionedAtomicNear() throws Exception { checkCreateComposite(PARTITIONED, ATOMIC, true); } @@ -238,6 +250,7 @@ public void testCreateCompositePartitionedAtomicNear() throws Exception { * * @throws Exception If failed. */ + @Test public void testCreateCompositePartitionedTransactional() throws Exception { checkCreateComposite(PARTITIONED, TRANSACTIONAL, false); } @@ -247,6 +260,7 @@ public void testCreateCompositePartitionedTransactional() throws Exception { * * @throws Exception If failed. */ + @Test public void testCreateCompositePartitionedTransactionalNear() throws Exception { checkCreateComposite(PARTITIONED, TRANSACTIONAL, true); } @@ -256,6 +270,7 @@ public void testCreateCompositePartitionedTransactionalNear() throws Exception { * * @throws Exception If failed. */ + @Test public void testCreateCompositeReplicatedAtomic() throws Exception { checkCreateComposite(REPLICATED, ATOMIC, false); } @@ -265,6 +280,7 @@ public void testCreateCompositeReplicatedAtomic() throws Exception { * * @throws Exception If failed. */ + @Test public void testCreateCompositeReplicatedTransactional() throws Exception { checkCreateComposite(REPLICATED, TRANSACTIONAL, false); } @@ -296,6 +312,7 @@ private void checkCreateComposite(CacheMode mode, CacheAtomicityMode atomicityMo * * @throws Exception If failed. */ + @Test public void testCreateIndexNoCachePartitionedAtomic() throws Exception { checkCreateNotCache(PARTITIONED, ATOMIC, false); } @@ -305,6 +322,7 @@ public void testCreateIndexNoCachePartitionedAtomic() throws Exception { * * @throws Exception If failed. */ + @Test public void testCreateIndexNoCachePartitionedAtomicNear() throws Exception { checkCreateNotCache(PARTITIONED, ATOMIC, true); } @@ -314,6 +332,7 @@ public void testCreateIndexNoCachePartitionedAtomicNear() throws Exception { * * @throws Exception If failed. */ + @Test public void testCreateIndexNoCachePartitionedTransactional() throws Exception { checkCreateNotCache(PARTITIONED, TRANSACTIONAL, false); } @@ -323,6 +342,7 @@ public void testCreateIndexNoCachePartitionedTransactional() throws Exception { * * @throws Exception If failed. */ + @Test public void testCreateIndexNoCachePartitionedTransactionalNear() throws Exception { checkCreateNotCache(PARTITIONED, TRANSACTIONAL, true); } @@ -332,6 +352,7 @@ public void testCreateIndexNoCachePartitionedTransactionalNear() throws Exceptio * * @throws Exception If failed. */ + @Test public void testCreateIndexNoCacheReplicatedAtomic() throws Exception { checkCreateNotCache(REPLICATED, ATOMIC, false); } @@ -341,6 +362,7 @@ public void testCreateIndexNoCacheReplicatedAtomic() throws Exception { * * @throws Exception If failed. */ + @Test public void testCreateIndexNoCacheReplicatedTransactional() throws Exception { checkCreateNotCache(REPLICATED, TRANSACTIONAL, false); } @@ -382,6 +404,7 @@ private void checkCreateNotCache(CacheMode mode, CacheAtomicityMode atomicityMod * * @throws Exception If failed. */ + @Test public void testCreateNoTablePartitionedAtomic() throws Exception { checkCreateNoTable(PARTITIONED, ATOMIC, false); } @@ -391,6 +414,7 @@ public void testCreateNoTablePartitionedAtomic() throws Exception { * * @throws Exception If failed. */ + @Test public void testCreateNoTablePartitionedAtomicNear() throws Exception { checkCreateNoTable(PARTITIONED, ATOMIC, true); } @@ -400,6 +424,7 @@ public void testCreateNoTablePartitionedAtomicNear() throws Exception { * * @throws Exception If failed. */ + @Test public void testCreateNoTablePartitionedTransactional() throws Exception { checkCreateNoTable(PARTITIONED, TRANSACTIONAL, false); } @@ -409,6 +434,7 @@ public void testCreateNoTablePartitionedTransactional() throws Exception { * * @throws Exception If failed. */ + @Test public void testCreateNoTablePartitionedTransactionalNear() throws Exception { checkCreateNoTable(PARTITIONED, TRANSACTIONAL, true); } @@ -418,6 +444,7 @@ public void testCreateNoTablePartitionedTransactionalNear() throws Exception { * * @throws Exception If failed. */ + @Test public void testCreateNoTableReplicatedAtomic() throws Exception { checkCreateNoTable(REPLICATED, ATOMIC, false); } @@ -427,6 +454,7 @@ public void testCreateNoTableReplicatedAtomic() throws Exception { * * @throws Exception If failed. */ + @Test public void testCreateNoTableReplicatedTransactional() throws Exception { checkCreateNoTable(REPLICATED, TRANSACTIONAL, false); } @@ -458,6 +486,7 @@ private void checkCreateNoTable(CacheMode mode, CacheAtomicityMode atomicityMode * * @throws Exception If failed. */ + @Test public void testCreateIndexNoColumnPartitionedAtomic() throws Exception { checkCreateIndexNoColumn(PARTITIONED, ATOMIC, false); } @@ -467,6 +496,7 @@ public void testCreateIndexNoColumnPartitionedAtomic() throws Exception { * * @throws Exception If failed. */ + @Test public void testCreateIndexNoColumnPartitionedAtomicNear() throws Exception { checkCreateIndexNoColumn(PARTITIONED, ATOMIC, true); } @@ -476,6 +506,7 @@ public void testCreateIndexNoColumnPartitionedAtomicNear() throws Exception { * * @throws Exception If failed. */ + @Test public void testCreateIndexNoColumnPartitionedTransactional() throws Exception { checkCreateIndexNoColumn(PARTITIONED, TRANSACTIONAL, false); } @@ -485,6 +516,7 @@ public void testCreateIndexNoColumnPartitionedTransactional() throws Exception { * * @throws Exception If failed. */ + @Test public void testCreateIndexNoColumnPartitionedTransactionalNear() throws Exception { checkCreateIndexNoColumn(PARTITIONED, TRANSACTIONAL, true); } @@ -494,6 +526,7 @@ public void testCreateIndexNoColumnPartitionedTransactionalNear() throws Excepti * * @throws Exception If failed. */ + @Test public void testCreateIndexNoColumnReplicatedAtomic() throws Exception { checkCreateIndexNoColumn(REPLICATED, ATOMIC, false); } @@ -503,6 +536,7 @@ public void testCreateIndexNoColumnReplicatedAtomic() throws Exception { * * @throws Exception If failed. */ + @Test public void testCreateIndexNoColumnReplicatedTransactional() throws Exception { checkCreateIndexNoColumn(REPLICATED, TRANSACTIONAL, false); } @@ -534,6 +568,7 @@ private void checkCreateIndexNoColumn(CacheMode mode, CacheAtomicityMode atomici * * @throws Exception If failed. */ + @Test public void testCreateIndexOnColumnWithAliasPartitionedAtomic() throws Exception { checkCreateIndexOnColumnWithAlias(PARTITIONED, ATOMIC, false); } @@ -543,6 +578,7 @@ public void testCreateIndexOnColumnWithAliasPartitionedAtomic() throws Exception * * @throws Exception If failed. */ + @Test public void testCreateIndexOnColumnWithAliasPartitionedAtomicNear() throws Exception { checkCreateIndexOnColumnWithAlias(PARTITIONED, ATOMIC, true); } @@ -552,6 +588,7 @@ public void testCreateIndexOnColumnWithAliasPartitionedAtomicNear() throws Excep * * @throws Exception If failed. */ + @Test public void testCreateIndexOnColumnWithAliasPartitionedTransactional() throws Exception { checkCreateIndexOnColumnWithAlias(PARTITIONED, TRANSACTIONAL, false); } @@ -561,6 +598,7 @@ public void testCreateIndexOnColumnWithAliasPartitionedTransactional() throws Ex * * @throws Exception If failed. */ + @Test public void testCreateColumnWithAliasPartitionedTransactionalNear() throws Exception { checkCreateIndexOnColumnWithAlias(PARTITIONED, TRANSACTIONAL, true); } @@ -570,6 +608,7 @@ public void testCreateColumnWithAliasPartitionedTransactionalNear() throws Excep * * @throws Exception If failed. */ + @Test public void testCreateColumnWithAliasReplicatedAtomic() throws Exception { checkCreateIndexOnColumnWithAlias(REPLICATED, ATOMIC, false); } @@ -579,6 +618,7 @@ public void testCreateColumnWithAliasReplicatedAtomic() throws Exception { * * @throws Exception If failed. */ + @Test public void testCreateColumnWithAliasReplicatedTransactional() throws Exception { checkCreateIndexOnColumnWithAlias(REPLICATED, TRANSACTIONAL, false); } @@ -620,6 +660,7 @@ private void checkCreateIndexOnColumnWithAlias(CacheMode mode, CacheAtomicityMod * * @throws Exception If failed. */ + @Test public void testCreateIndexWithInlineSizePartitionedAtomic() throws Exception { checkCreateIndexWithInlineSize(PARTITIONED, ATOMIC, false); } @@ -629,6 +670,7 @@ public void testCreateIndexWithInlineSizePartitionedAtomic() throws Exception { * * @throws Exception If failed. */ + @Test public void testCreateIndexWithInlineSizePartitionedAtomicNear() throws Exception { checkCreateIndexWithInlineSize(PARTITIONED, ATOMIC, true); } @@ -638,6 +680,7 @@ public void testCreateIndexWithInlineSizePartitionedAtomicNear() throws Exceptio * * @throws Exception If failed. */ + @Test public void testCreateIndexWithInlineSizePartitionedTransactional() throws Exception { checkCreateIndexWithInlineSize(PARTITIONED, TRANSACTIONAL, false); } @@ -647,6 +690,7 @@ public void testCreateIndexWithInlineSizePartitionedTransactional() throws Excep * * @throws Exception If failed. */ + @Test public void testCreateIndexWithInlineSizePartitionedTransactionalNear() throws Exception { checkCreateIndexWithInlineSize(PARTITIONED, TRANSACTIONAL, true); } @@ -656,6 +700,7 @@ public void testCreateIndexWithInlineSizePartitionedTransactionalNear() throws E * * @throws Exception If failed. */ + @Test public void testCreateIndexWithInlineSizeReplicatedAtomic() throws Exception { checkCreateIndexWithInlineSize(REPLICATED, ATOMIC, false); } @@ -665,6 +710,7 @@ public void testCreateIndexWithInlineSizeReplicatedAtomic() throws Exception { * * @throws Exception If failed. */ + @Test public void testCreateIndexWithInlineSizeReplicatedTransactional() throws Exception { checkCreateIndexWithInlineSize(REPLICATED, TRANSACTIONAL, false); } @@ -750,6 +796,7 @@ private void checkNoIndexIsCreatedForInlineSize(final int inlineSize, int ignite * * @throws Exception If failed. */ + @Test public void testCreateIndexWithParallelismPartitionedAtomic() throws Exception { checkCreateIndexWithParallelism(PARTITIONED, ATOMIC, false); } @@ -759,6 +806,7 @@ public void testCreateIndexWithParallelismPartitionedAtomic() throws Exception { * * @throws Exception If failed. */ + @Test public void testCreateIndexWithParallelismPartitionedAtomicNear() throws Exception { checkCreateIndexWithParallelism(PARTITIONED, ATOMIC, true); } @@ -768,6 +816,7 @@ public void testCreateIndexWithParallelismPartitionedAtomicNear() throws Excepti * * @throws Exception If failed. */ + @Test public void testCreateIndexWithParallelismPartitionedTransactional() throws Exception { checkCreateIndexWithParallelism(PARTITIONED, TRANSACTIONAL, false); } @@ -777,6 +826,7 @@ public void testCreateIndexWithParallelismPartitionedTransactional() throws Exce * * @throws Exception If failed. */ + @Test public void testCreateIndexWithParallelismPartitionedTransactionalNear() throws Exception { checkCreateIndexWithParallelism(PARTITIONED, TRANSACTIONAL, true); } @@ -786,6 +836,7 @@ public void testCreateIndexWithParallelismPartitionedTransactionalNear() throws * * @throws Exception If failed. */ + @Test public void testCreateIndexWithParallelismReplicatedAtomic() throws Exception { checkCreateIndexWithParallelism(REPLICATED, ATOMIC, false); } @@ -795,6 +846,7 @@ public void testCreateIndexWithParallelismReplicatedAtomic() throws Exception { * * @throws Exception If failed. */ + @Test public void testCreateIndexWithParallelismReplicatedTransactional() throws Exception { checkCreateIndexWithParallelism(REPLICATED, TRANSACTIONAL, false); } @@ -879,6 +931,7 @@ private void checkNoIndexIsCreatedForParallelism(final int parallel, int igniteQ * * @throws Exception If failed. */ + @Test public void testDropPartitionedAtomic() throws Exception { checkDrop(PARTITIONED, ATOMIC, false); } @@ -888,6 +941,7 @@ public void testDropPartitionedAtomic() throws Exception { * * @throws Exception If failed. */ + @Test public void testDropPartitionedAtomicNear() throws Exception { checkDrop(PARTITIONED, ATOMIC, true); } @@ -897,6 +951,7 @@ public void testDropPartitionedAtomicNear() throws Exception { * * @throws Exception If failed. */ + @Test public void testDropPartitionedTransactional() throws Exception { checkDrop(PARTITIONED, TRANSACTIONAL, false); } @@ -906,6 +961,7 @@ public void testDropPartitionedTransactional() throws Exception { * * @throws Exception If failed. */ + @Test public void testDropPartitionedTransactionalNear() throws Exception { checkDrop(PARTITIONED, TRANSACTIONAL, true); } @@ -915,6 +971,7 @@ public void testDropPartitionedTransactionalNear() throws Exception { * * @throws Exception If failed. */ + @Test public void testDropReplicatedAtomic() throws Exception { checkDrop(REPLICATED, ATOMIC, false); } @@ -924,6 +981,7 @@ public void testDropReplicatedAtomic() throws Exception { * * @throws Exception If failed. */ + @Test public void testDropReplicatedTransactional() throws Exception { checkDrop(REPLICATED, TRANSACTIONAL, false); } @@ -975,6 +1033,7 @@ public void checkDrop(CacheMode mode, CacheAtomicityMode atomicityMode, boolean * * @throws Exception If failed. */ + @Test public void testDropNoIndexPartitionedAtomic() throws Exception { checkDropNoIndex(PARTITIONED, ATOMIC, false); } @@ -984,6 +1043,7 @@ public void testDropNoIndexPartitionedAtomic() throws Exception { * * @throws Exception If failed. */ + @Test public void testDropNoIndexPartitionedAtomicNear() throws Exception { checkDropNoIndex(PARTITIONED, ATOMIC, true); } @@ -993,6 +1053,7 @@ public void testDropNoIndexPartitionedAtomicNear() throws Exception { * * @throws Exception If failed. */ + @Test public void testDropNoIndexPartitionedTransactional() throws Exception { checkDropNoIndex(PARTITIONED, TRANSACTIONAL, false); } @@ -1002,6 +1063,7 @@ public void testDropNoIndexPartitionedTransactional() throws Exception { * * @throws Exception If failed. */ + @Test public void testDropNoIndexPartitionedTransactionalNear() throws Exception { checkDropNoIndex(PARTITIONED, TRANSACTIONAL, true); } @@ -1011,6 +1073,7 @@ public void testDropNoIndexPartitionedTransactionalNear() throws Exception { * * @throws Exception If failed. */ + @Test public void testDropNoIndexReplicatedAtomic() throws Exception { checkDropNoIndex(REPLICATED, ATOMIC, false); } @@ -1020,6 +1083,7 @@ public void testDropNoIndexReplicatedAtomic() throws Exception { * * @throws Exception If failed. */ + @Test public void testDropNoIndexReplicatedTransactional() throws Exception { checkDropNoIndex(REPLICATED, TRANSACTIONAL, false); } @@ -1050,6 +1114,7 @@ private void checkDropNoIndex(CacheMode mode, CacheAtomicityMode atomicityMode, * * @throws Exception If failed. */ + @Test public void testDropNoCachePartitionedAtomic() throws Exception { checkDropNoCache(PARTITIONED, ATOMIC, false); } @@ -1059,6 +1124,7 @@ public void testDropNoCachePartitionedAtomic() throws Exception { * * @throws Exception If failed. */ + @Test public void testDropNoCachePartitionedAtomicNear() throws Exception { checkDropNoCache(PARTITIONED, ATOMIC, true); } @@ -1068,6 +1134,7 @@ public void testDropNoCachePartitionedAtomicNear() throws Exception { * * @throws Exception If failed. */ + @Test public void testDropNoCachePartitionedTransactional() throws Exception { checkDropNoCache(PARTITIONED, TRANSACTIONAL, false); } @@ -1077,6 +1144,7 @@ public void testDropNoCachePartitionedTransactional() throws Exception { * * @throws Exception If failed. */ + @Test public void testDropNoCachePartitionedTransactionalNear() throws Exception { checkDropNoCache(PARTITIONED, TRANSACTIONAL, true); } @@ -1086,6 +1154,7 @@ public void testDropNoCachePartitionedTransactionalNear() throws Exception { * * @throws Exception If failed. */ + @Test public void testDropNoCacheReplicatedAtomic() throws Exception { checkDropNoCache(REPLICATED, ATOMIC, false); } @@ -1095,6 +1164,7 @@ public void testDropNoCacheReplicatedAtomic() throws Exception { * * @throws Exception If failed. */ + @Test public void testDropNoCacheReplicatedTransactional() throws Exception { checkDropNoCache(REPLICATED, TRANSACTIONAL, false); } @@ -1136,6 +1206,7 @@ private void checkDropNoCache(CacheMode mode, CacheAtomicityMode atomicityMode, * * @throws Exception If failed. */ + @Test public void testFailOnLocalCache() throws Exception { for (Ignite node : Ignition.allGrids()) { if (!node.configuration().isClientMode()) @@ -1164,6 +1235,7 @@ public void testFailOnLocalCache() throws Exception { * * @throws Exception If failed. */ + @Test public void testNonSqlCache() throws Exception { final QueryIndex idx = index(IDX_NAME_2, field(FIELD_NAME_1)); @@ -1177,6 +1249,7 @@ public void testNonSqlCache() throws Exception { /** * Test behavior depending on index name case sensitivity. */ + @Test public void testIndexNameCaseSensitivity() throws Exception { doTestIndexNameCaseSensitivity("myIdx", false); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/DynamicIndexAbstractConcurrentSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/DynamicIndexAbstractConcurrentSelfTest.java index ca47c7f181e1a..807e01bd78554 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/DynamicIndexAbstractConcurrentSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/DynamicIndexAbstractConcurrentSelfTest.java @@ -51,6 +51,9 @@ import org.apache.ignite.internal.util.typedef.T3; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.IgniteClientReconnectAbstractTest.TestTcpDiscoverySpi; @@ -58,6 +61,7 @@ * Concurrency tests for dynamic index create/drop. */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public abstract class DynamicIndexAbstractConcurrentSelfTest extends DynamicIndexAbstractSelfTest { /** Test duration. */ private static final long TEST_DUR = 10_000L; @@ -136,6 +140,7 @@ public abstract class DynamicIndexAbstractConcurrentSelfTest extends DynamicInde * * @throws Exception If failed. */ + @Test public void testCoordinatorChange() throws Exception { // Start servers. Ignite srv1 = ignitionStart(serverConfiguration(1)); @@ -201,6 +206,7 @@ public void testCoordinatorChange() throws Exception { * * @throws Exception If failed. */ + @Test public void testOperationChaining() throws Exception { Ignite srv1 = ignitionStart(serverConfiguration(1)); @@ -253,6 +259,7 @@ public void testOperationChaining() throws Exception { * * @throws Exception If failed. */ + @Test public void testNodeJoinOnPendingOperation() throws Exception { Ignite srv1 = ignitionStart(serverConfiguration(1)); @@ -290,6 +297,7 @@ public void testNodeJoinOnPendingOperation() throws Exception { * * @throws Exception If failed, */ + @Test public void testConcurrentPutRemove() throws Exception { // Start several nodes. Ignite srv1 = ignitionStart(serverConfiguration(1)); @@ -387,6 +395,7 @@ public void testConcurrentPutRemove() throws Exception { * * @throws Exception If failed. */ + @Test public void testConcurrentRebalance() throws Exception { // Start cache and populate it with data. Ignite srv1 = ignitionStart(serverConfiguration(1)); @@ -434,6 +443,7 @@ public void testConcurrentRebalance() throws Exception { * * @throws Exception If failed. */ + @Test public void testConcurrentCacheDestroy() throws Exception { // Start complex topology. Ignite srv1 = ignitionStart(serverConfiguration(1)); @@ -479,6 +489,7 @@ public void testConcurrentCacheDestroy() throws Exception { * * @throws Exception If failed. */ + @Test public void testConcurrentOperationsMultithreaded() throws Exception { // Start complex topology. ignitionStart(serverConfiguration(1)); @@ -553,6 +564,7 @@ public void testConcurrentOperationsMultithreaded() throws Exception { * * @throws Exception If failed. */ + @Test public void testQueryConsistencyMultithreaded() throws Exception { // Start complex topology. ignitionStart(serverConfiguration(1)); @@ -631,6 +643,7 @@ public void testQueryConsistencyMultithreaded() throws Exception { * * @throws Exception If failed. */ + @Test public void testClientReconnect() throws Exception { checkClientReconnect(false); } @@ -640,6 +653,7 @@ public void testClientReconnect() throws Exception { * * @throws Exception If failed. */ + @Test public void testClientReconnectWithCacheRestart() throws Exception { checkClientReconnect(true); } @@ -753,6 +767,7 @@ private void reconnectClientNode(final Ignite srvNode, final Ignite cliNode, fin * * @throws Exception If failed. */ + @Test public void testConcurrentOperationsAndNodeStartStopMultithreaded() throws Exception { // Start several stable nodes. ignitionStart(serverConfiguration(1)); @@ -878,6 +893,7 @@ public void testConcurrentOperationsAndNodeStartStopMultithreaded() throws Excep * * @throws Exception If failed. */ + @Test public void testConcurrentOperationsAndCacheStartStopMultithreaded() throws Exception { // Start complex topology. ignitionStart(serverConfiguration(1)); @@ -1096,7 +1112,7 @@ private static class BlockingIndexing extends IgniteH2Indexing { /** * Start a node. - * + * * @param cfg Configuration. * @return Ignite instance. */ diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/H2ConnectionLeaksSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/H2ConnectionLeaksSelfTest.java index d8d673592cc2f..8dc0b62ae9068 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/H2ConnectionLeaksSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/H2ConnectionLeaksSelfTest.java @@ -28,10 +28,14 @@ import org.apache.ignite.internal.util.lang.GridAbsPredicate; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for leaks JdbcConnection on SqlFieldsQuery execute. */ +@RunWith(JUnit4.class) public class H2ConnectionLeaksSelfTest extends GridCommonAbstractTest { /** Cache name. */ private static final String CACHE_NAME = "cache"; @@ -73,6 +77,7 @@ public class H2ConnectionLeaksSelfTest extends GridCommonAbstractTest { /** * @throws Exception On failed. */ + @Test public void testConnectionLeaks() throws Exception { final IgniteCache cache = grid(1).cache(CACHE_NAME); @@ -98,6 +103,7 @@ public void testConnectionLeaks() throws Exception { /** * @throws Exception On failed. */ + @Test public void testConnectionLeaksOnSqlException() throws Exception { final CountDownLatch latch = new CountDownLatch(THREAD_CNT); final CountDownLatch latch2 = new CountDownLatch(1); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/H2DynamicColumnsAbstractBasicSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/H2DynamicColumnsAbstractBasicSelfTest.java index ef7b1503b3dce..846e9f1e1694a 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/H2DynamicColumnsAbstractBasicSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/H2DynamicColumnsAbstractBasicSelfTest.java @@ -33,12 +33,16 @@ import org.apache.ignite.internal.processors.query.QueryUtils; import org.apache.ignite.testframework.config.GridTestProperties; import org.h2.jdbc.JdbcSQLException; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.testframework.config.GridTestProperties.BINARY_MARSHALLER_USE_SIMPLE_NAME_MAPPER; /** * Test to check dynamic columns related features. */ +@RunWith(JUnit4.class) public abstract class H2DynamicColumnsAbstractBasicSelfTest extends DynamicColumnsAbstractTest { /** * Index of coordinator node. @@ -105,6 +109,7 @@ private int checkTableState(String schemaName, String tblName, QueryField... col /** * Test column addition to the end of the columns list. */ + @Test public void testAddColumnSimple() throws SQLException { run("ALTER TABLE Person ADD COLUMN age int"); @@ -118,6 +123,7 @@ public void testAddColumnSimple() throws SQLException { /** * Test column addition to the end of the columns list. */ + @Test public void testAddFewColumnsSimple() throws SQLException { run("ALTER TABLE Person ADD COLUMN (age int, \"city\" varchar)"); @@ -130,6 +136,7 @@ public void testAddFewColumnsSimple() throws SQLException { /** * Test {@code IF EXISTS} handling. */ + @Test public void testIfTableExists() { run("ALTER TABLE if exists City ADD COLUMN population int"); } @@ -137,6 +144,7 @@ public void testIfTableExists() { /** * Test {@code IF NOT EXISTS} handling. */ + @Test public void testIfColumnNotExists() { run("ALTER TABLE Person ADD COLUMN if not exists name varchar"); } @@ -144,6 +152,7 @@ public void testIfColumnNotExists() { /** * Test {@code IF NOT EXISTS} handling. */ + @Test public void testDuplicateColumnName() { assertThrows("ALTER TABLE Person ADD COLUMN name varchar", "Column already exists: NAME"); } @@ -151,12 +160,14 @@ public void testDuplicateColumnName() { /** * Test behavior in case of missing table. */ + @Test public void testMissingTable() { assertThrows("ALTER TABLE City ADD COLUMN name varchar", "Table doesn't exist: CITY"); } /** */ @SuppressWarnings("unchecked") + @Test public void testComplexOperations() { IgniteCache cache = ignite(nodeIndex()) .cache(QueryUtils.createTableCacheName(QueryUtils.DFLT_SCHEMA, "PERSON")); @@ -229,6 +240,7 @@ public void testComplexOperations() { /** * Test that we can add columns dynamically to tables associated with non dynamic caches as well. */ + @Test public void testAddColumnToNonDynamicCache() throws SQLException { run("ALTER TABLE \"idx\".PERSON ADD COLUMN CITY varchar"); @@ -243,6 +255,7 @@ public void testAddColumnToNonDynamicCache() throws SQLException { * Test that we can add columns dynamically to tables associated with non dynamic caches storing user types as well. */ @SuppressWarnings("unchecked") + @Test public void testAddColumnToNonDynamicCacheWithRealValueType() throws SQLException { CacheConfiguration ccfg = defaultCacheConfiguration().setName("City") .setIndexedTypes(Integer.class, City.class); @@ -289,6 +302,7 @@ public void testAddColumnToNonDynamicCacheWithRealValueType() throws SQLExceptio * @throws SQLException If failed. */ @SuppressWarnings("unchecked") + @Test public void testAddColumnUUID() throws SQLException { CacheConfiguration ccfg = defaultCacheConfiguration().setName("GuidTest") .setIndexedTypes(Integer.class, GuidTest.class); @@ -356,6 +370,7 @@ public void testAddColumnUUID() throws SQLException { /** * Test addition of column with not null constraint. */ + @Test public void testAddNotNullColumn() throws SQLException { run("ALTER TABLE Person ADD COLUMN age int NOT NULL"); @@ -369,6 +384,7 @@ public void testAddNotNullColumn() throws SQLException { /** * Test addition of column explicitly defined as nullable. */ + @Test public void testAddNullColumn() throws SQLException { run("ALTER TABLE Person ADD COLUMN age int NULL"); @@ -383,6 +399,7 @@ public void testAddNullColumn() throws SQLException { * Test that {@code ADD COLUMN} fails for non dynamic table that has flat value. */ @SuppressWarnings({"unchecked"}) + @Test public void testTestAlterTableOnFlatValueNonDynamicTable() { CacheConfiguration c = new CacheConfiguration("ints").setIndexedTypes(Integer.class, Integer.class) @@ -401,6 +418,7 @@ public void testTestAlterTableOnFlatValueNonDynamicTable() { /** * Test that {@code ADD COLUMN} fails for dynamic table that has flat value. */ + @Test public void testTestAlterTableOnFlatValueDynamicTable() { try { run("CREATE TABLE TEST (id int primary key, x varchar) with \"wrap_value=false\""); @@ -416,6 +434,7 @@ public void testTestAlterTableOnFlatValueDynamicTable() { * * @throws Exception if failed. */ + @Test public void testDropColumn() throws Exception { try { run("CREATE TABLE test (id INT PRIMARY KEY, a INT, b CHAR)"); @@ -444,6 +463,7 @@ public void testDropColumn() throws Exception { * * @throws Exception if failed. */ + @Test public void testDroppedColumnMeta() throws Exception { try { run("CREATE TABLE test (id INT PRIMARY KEY, a INT, b CHAR)"); @@ -466,6 +486,7 @@ public void testDroppedColumnMeta() throws Exception { * * @throws Exception if failed. */ + @Test public void testDropMultipleColumns() throws Exception { try { run("CREATE TABLE test (id INT PRIMARY KEY, a INT, b CHAR, c INT)"); @@ -491,6 +512,7 @@ public void testDropMultipleColumns() throws Exception { * * @throws Exception if failed. */ + @Test public void testDropNonExistingColumn() throws Exception { try { run("CREATE TABLE test (id INT PRIMARY KEY, a INT)"); @@ -506,6 +528,7 @@ public void testDropNonExistingColumn() throws Exception { * * @throws Exception if failed. */ + @Test public void testDropColumnNonExistingTable() throws Exception { assertThrowsAnyCause("ALTER TABLE nosuchtable DROP COLUMN a", JdbcSQLException.class, "Table \"NOSUCHTABLE\" not found"); @@ -515,6 +538,7 @@ public void testDropColumnNonExistingTable() throws Exception { * * @throws Exception if failed. */ + @Test public void testDropColumnIfTableExists() throws Exception { try { run("CREATE TABLE test (id INT PRIMARY KEY, a INT, b CHAR)"); @@ -534,6 +558,7 @@ public void testDropColumnIfTableExists() throws Exception { * * @throws Exception if failed. */ + @Test public void testDropColumnIfExists() throws Exception { try { run("CREATE TABLE test (id INT PRIMARY KEY, a INT)"); @@ -554,6 +579,7 @@ public void testDropColumnIfExists() throws Exception { * * @throws Exception if failed. */ + @Test public void testDropColumnIndexPresent() throws Exception { try { run("CREATE TABLE test (id INT PRIMARY KEY, a INT, b INT)"); @@ -580,6 +606,7 @@ public void testDropColumnIndexPresent() throws Exception { * * @throws Exception if failed. */ + @Test public void testDropColumnOnRealClassValuedTable() throws Exception { try { run("CREATE TABLE test (id INT PRIMARY KEY, x VARCHAR) with \"wrap_value=false\""); @@ -596,6 +623,7 @@ public void testDropColumnOnRealClassValuedTable() throws Exception { * * @throws Exception if failed. */ + @Test public void testDropColumnThatIsPartOfKey() throws Exception { try { run("CREATE TABLE test(id INT, a INT, b CHAR, PRIMARY KEY(id, a))"); @@ -612,6 +640,7 @@ public void testDropColumnThatIsPartOfKey() throws Exception { * * @throws Exception if failed. */ + @Test public void testDropColumnThatIsKey() throws Exception { try { run("CREATE TABLE test(id INT PRIMARY KEY, a INT, b CHAR)"); @@ -628,6 +657,7 @@ public void testDropColumnThatIsKey() throws Exception { * * @throws Exception if failed. */ + @Test public void testDropColumnThatIsValue() throws Exception { try { run("CREATE TABLE test(id INT PRIMARY KEY, a INT, b CHAR)"); @@ -647,6 +677,7 @@ public void testDropColumnThatIsValue() throws Exception { * @throws SQLException if failed. */ @SuppressWarnings("unchecked") + @Test public void testDropColumnFromNonDynamicCacheWithRealValueType() throws SQLException { CacheConfiguration ccfg = defaultCacheConfiguration().setName("City") .setIndexedTypes(Integer.class, City.class); @@ -712,6 +743,7 @@ public void testDropColumnFromNonDynamicCacheWithRealValueType() throws SQLExcep * * @throws Exception if failed. */ + @Test public void testDropColumnPriorToIndexedColumn() throws Exception { try { run("CREATE TABLE test(id INT PRIMARY KEY, a CHAR, b INT)"); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/H2DynamicIndexAbstractSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/H2DynamicIndexAbstractSelfTest.java index 2d7a636d16e01..d8e6a70fa66f6 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/H2DynamicIndexAbstractSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/H2DynamicIndexAbstractSelfTest.java @@ -34,10 +34,14 @@ import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.internal.processors.cache.query.IgniteQueryErrorCode; import org.apache.ignite.internal.util.typedef.F; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test that checks indexes handling on H2 side. */ +@RunWith(JUnit4.class) public abstract class H2DynamicIndexAbstractSelfTest extends AbstractSchemaSelfTest { /** Client node index. */ private static final int CLIENT = 2; @@ -75,6 +79,7 @@ public abstract class H2DynamicIndexAbstractSelfTest extends AbstractSchemaSelfT /** * Test that after index creation index is used by queries. */ + @Test public void testCreateIndex() throws Exception { IgniteCache cache = cache(); @@ -114,6 +119,7 @@ public void testCreateIndex() throws Exception { /** * Test that creating an index with duplicate name yields an error. */ + @Test public void testCreateIndexWithDuplicateName() { final IgniteCache cache = cache(); @@ -131,6 +137,7 @@ public void testCreateIndexWithDuplicateName() { /** * Test that creating an index with duplicate name does not yield an error with {@code IF NOT EXISTS}. */ + @Test public void testCreateIndexIfNotExists() { final IgniteCache cache = cache(); @@ -144,6 +151,7 @@ public void testCreateIndexIfNotExists() { /** * Test that after index drop there are no attempts to use it, and data state remains intact. */ + @Test public void testDropIndex() { IgniteCache cache = cache(); @@ -179,6 +187,7 @@ public void testDropIndex() { /** * Test that dropping a non-existent index yields an error. */ + @Test public void testDropMissingIndex() { final IgniteCache cache = cache(); @@ -192,6 +201,7 @@ public void testDropMissingIndex() { /** * Test that dropping a non-existent index does not yield an error with {@code IF EXISTS}. */ + @Test public void testDropMissingIndexIfExists() { final IgniteCache cache = cache(); @@ -201,6 +211,7 @@ public void testDropMissingIndexIfExists() { /** * Test that changes in cache affect index, and vice versa. */ + @Test public void testIndexState() { IgniteCache cache = cache(); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/H2DynamicIndexingComplexAbstractTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/H2DynamicIndexingComplexAbstractTest.java index 6fa595f3d4308..fd6728faa2876 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/H2DynamicIndexingComplexAbstractTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/H2DynamicIndexingComplexAbstractTest.java @@ -31,10 +31,14 @@ import org.apache.ignite.lang.IgniteCallable; import org.apache.ignite.lang.IgniteInClosure; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Base class for testing work of combinations of DML and DDL operations. */ +@RunWith(JUnit4.class) public abstract class H2DynamicIndexingComplexAbstractTest extends DynamicIndexAbstractSelfTest { /** Cache mode to test with. */ private final CacheMode cacheMode; @@ -88,6 +92,7 @@ public abstract class H2DynamicIndexingComplexAbstractTest extends DynamicIndexA } /** Do test. */ + @Test public void testOperations() { executeSql("CREATE TABLE person (id int, name varchar, age int, company varchar, city varchar, " + "primary key (id, name, city)) WITH \"template=" + cacheMode.name() + ",atomicity=" + atomicityMode.name() + diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/H2DynamicTableSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/H2DynamicTableSelfTest.java index 563474842e485..01bff8857ceac 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/H2DynamicTableSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/H2DynamicTableSelfTest.java @@ -33,7 +33,6 @@ import java.util.Random; import java.util.UUID; import java.util.concurrent.Callable; -import javax.cache.CacheException; import org.apache.ignite.IgniteException; import org.apache.ignite.Ignition; import org.apache.ignite.binary.BinaryObject; @@ -67,11 +66,15 @@ import org.apache.ignite.testframework.GridTestUtils; import org.h2.jdbc.JdbcSQLException; import org.h2.value.DataType; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for CREATE/DROP TABLE. */ @SuppressWarnings("ThrowableNotThrown") +@RunWith(JUnit4.class) public class H2DynamicTableSelfTest extends AbstractSchemaSelfTest { /** Client node index. */ private static final int CLIENT = 2; @@ -132,6 +135,7 @@ public class H2DynamicTableSelfTest extends AbstractSchemaSelfTest { * Test that {@code CREATE TABLE} actually creates new cache, H2 table and type descriptor on all nodes. * @throws Exception if failed. */ + @Test public void testCreateTable() throws Exception { doTestCreateTable(CACHE_NAME, null, null, null); } @@ -140,6 +144,7 @@ public void testCreateTable() throws Exception { * Test that {@code CREATE TABLE} actually creates new cache, H2 table and type descriptor on all nodes. * @throws Exception if failed. */ + @Test public void testCreateTableWithCacheGroup() throws Exception { doTestCreateTable(CACHE_NAME, "MyGroup", null, null); } @@ -148,6 +153,7 @@ public void testCreateTableWithCacheGroup() throws Exception { * Test that {@code CREATE TABLE} actually creates new cache, H2 table and type descriptor on all nodes. * @throws Exception if failed. */ + @Test public void testCreateTableWithCacheGroupAndLegacyParamName() throws Exception { doTestCreateTable(CACHE_NAME, "MyGroup", null, null, true); } @@ -157,6 +163,7 @@ public void testCreateTableWithCacheGroupAndLegacyParamName() throws Exception { * H2 table and type descriptor on all nodes. * @throws Exception if failed. */ + @Test public void testCreateTableWithWriteSyncMode() throws Exception { doTestCreateTable(CACHE_NAME + "_async", null, null, CacheWriteSynchronizationMode.FULL_ASYNC); } @@ -166,6 +173,7 @@ public void testCreateTableWithWriteSyncMode() throws Exception { * H2 table and type descriptor on all nodes. * @throws Exception if failed. */ + @Test public void testCreateTableReplicated() throws Exception { doTestCreateTable("REPLICATED", null, CacheMode.REPLICATED, CacheWriteSynchronizationMode.FULL_SYNC); } @@ -175,6 +183,7 @@ public void testCreateTableReplicated() throws Exception { * H2 table and type descriptor on all nodes. * @throws Exception if failed. */ + @Test public void testCreateTablePartitioned() throws Exception { doTestCreateTable("PARTITIONED", null, CacheMode.PARTITIONED, CacheWriteSynchronizationMode.FULL_SYNC); } @@ -184,6 +193,7 @@ public void testCreateTablePartitioned() throws Exception { * H2 table and type descriptor on all nodes. * @throws Exception if failed. */ + @Test public void testCreateTableReplicatedCaseInsensitive() throws Exception { doTestCreateTable("replicated", null, CacheMode.REPLICATED, CacheWriteSynchronizationMode.FULL_SYNC); } @@ -193,6 +203,7 @@ public void testCreateTableReplicatedCaseInsensitive() throws Exception { * H2 table and type descriptor on all nodes. * @throws Exception if failed. */ + @Test public void testCreateTablePartitionedCaseInsensitive() throws Exception { doTestCreateTable("partitioned", null, CacheMode.PARTITIONED, CacheWriteSynchronizationMode.FULL_SYNC); } @@ -202,6 +213,7 @@ public void testCreateTablePartitionedCaseInsensitive() throws Exception { * H2 table and type descriptor on all nodes, when no cache template name is given. * @throws Exception if failed. */ + @Test public void testCreateTableNoTemplate() throws Exception { doTestCreateTable(null, null, CacheMode.PARTITIONED, CacheWriteSynchronizationMode.FULL_SYNC); } @@ -209,6 +221,7 @@ public void testCreateTableNoTemplate() throws Exception { /** * Test behavior depending on table name case sensitivity. */ + @Test public void testTableNameCaseSensitivity() { doTestTableNameCaseSensitivity("Person", false); @@ -219,6 +232,7 @@ public void testTableNameCaseSensitivity() { * Test that {@code CREATE TABLE} with given write sync mode actually creates new cache as needed. * @throws Exception if failed. */ + @Test public void testFullSyncWriteMode() throws Exception { doTestCreateTable(null, null, null, CacheWriteSynchronizationMode.FULL_SYNC, "write_synchronization_mode=full_sync"); @@ -228,6 +242,7 @@ public void testFullSyncWriteMode() throws Exception { * Test that {@code CREATE TABLE} with given write sync mode actually creates new cache as needed. * @throws Exception if failed. */ + @Test public void testPrimarySyncWriteMode() throws Exception { doTestCreateTable(null, null, null, CacheWriteSynchronizationMode.PRIMARY_SYNC, "write_synchronization_mode=primary_sync"); @@ -237,6 +252,7 @@ public void testPrimarySyncWriteMode() throws Exception { * Test that {@code CREATE TABLE} with given write sync mode actually creates new cache as needed. * @throws Exception if failed. */ + @Test public void testFullAsyncWriteMode() throws Exception { doTestCreateTable(null, null, null, CacheWriteSynchronizationMode.FULL_ASYNC, "write_synchronization_mode=full_async"); @@ -245,6 +261,7 @@ public void testFullAsyncWriteMode() throws Exception { /** * Test behavior only in case of cache name override. */ + @Test public void testCustomCacheName() { doTestCustomNames("cname", null, null); } @@ -252,6 +269,7 @@ public void testCustomCacheName() { /** * Test behavior only in case of key type name override. */ + @Test public void testCustomKeyTypeName() { doTestCustomNames(null, "keytype", null); } @@ -259,6 +277,7 @@ public void testCustomKeyTypeName() { /** * Test behavior only in case of value type name override. */ + @Test public void testCustomValueTypeName() { doTestCustomNames(null, null, "valtype"); } @@ -266,6 +285,7 @@ public void testCustomValueTypeName() { /** * Test behavior only in case of cache and key type name override. */ + @Test public void testCustomCacheAndKeyTypeName() { doTestCustomNames("cname", "keytype", null); } @@ -273,6 +293,7 @@ public void testCustomCacheAndKeyTypeName() { /** * Test behavior only in case of cache and value type name override. */ + @Test public void testCustomCacheAndValueTypeName() { doTestCustomNames("cname", null, "valtype"); } @@ -280,6 +301,7 @@ public void testCustomCacheAndValueTypeName() { /** * Test behavior only in case of key and value type name override. */ + @Test public void testCustomKeyAndValueTypeName() { doTestCustomNames(null, "keytype", "valtype"); } @@ -287,6 +309,7 @@ public void testCustomKeyAndValueTypeName() { /** * Test behavior only in case of cache, key, and value type name override. */ + @Test public void testCustomCacheAndKeyAndValueTypeName() { doTestCustomNames("cname", "keytype", "valtype"); } @@ -295,6 +318,7 @@ public void testCustomCacheAndKeyAndValueTypeName() { * Test that attempting to create a cache with a pre-existing name yields an error. * @throws Exception if failed. */ + @Test public void testDuplicateCustomCacheName() throws Exception { client().getOrCreateCache("new"); @@ -314,6 +338,7 @@ public void testDuplicateCustomCacheName() throws Exception { * Test that {@code CREATE TABLE} with given write sync mode actually creates new cache as needed. * @throws Exception if failed. */ + @Test public void testPlainKey() throws Exception { doTestCreateTable(null, null, null, CacheWriteSynchronizationMode.FULL_SYNC); } @@ -501,6 +526,7 @@ private void doTestCreateTable(String tplCacheName, String cacheGrp, CacheMode c * @throws Exception If failed. */ @SuppressWarnings("unchecked") + @Test public void testBackups() throws Exception { String cacheName = "BackupTestCache"; @@ -622,6 +648,7 @@ private void doTestCreateTable(String tplCacheName, String cacheGrp, CacheMode c /** * Test that attempting to specify negative number of backups yields exception. */ + @Test public void testNegativeBackups() { assertCreateTableWithParamsThrows("bAckUPs = -5 ", "\"BACKUPS\" cannot be negative: -5"); } @@ -629,6 +656,7 @@ public void testNegativeBackups() { /** * Test that attempting to omit mandatory value of BACKUPS parameter yields an error. */ + @Test public void testEmptyBackups() { assertCreateTableWithParamsThrows(" bAckUPs = ", "Parameter value cannot be empty: BACKUPS"); } @@ -636,6 +664,7 @@ public void testEmptyBackups() { /** * Test that attempting to omit mandatory value of ATOMICITY parameter yields an error. */ + @Test public void testEmptyAtomicity() { assertCreateTableWithParamsThrows("AtomicitY= ", "Parameter value cannot be empty: ATOMICITY"); } @@ -643,6 +672,7 @@ public void testEmptyAtomicity() { /** * Test that providing an invalid value of ATOMICITY parameter yields an error. */ + @Test public void testInvalidAtomicity() { assertCreateTableWithParamsThrows("atomicity=InvalidValue", "Invalid value of \"ATOMICITY\" parameter (should be either TRANSACTIONAL or ATOMIC): InvalidValue"); @@ -651,6 +681,7 @@ public void testInvalidAtomicity() { /** * Test that attempting to omit mandatory value of CACHEGROUP parameter yields an error. */ + @Test public void testEmptyCacheGroup() { assertCreateTableWithParamsThrows("cache_group=", "Parameter value cannot be empty: CACHE_GROUP"); } @@ -658,6 +689,7 @@ public void testEmptyCacheGroup() { /** * Test that attempting to omit mandatory value of WRITE_SYNCHRONIZATION_MODE parameter yields an error. */ + @Test public void testEmptyWriteSyncMode() { assertCreateTableWithParamsThrows("write_synchronization_mode=", "Parameter value cannot be empty: WRITE_SYNCHRONIZATION_MODE"); @@ -666,6 +698,7 @@ public void testEmptyWriteSyncMode() { /** * Test that attempting to provide invalid value of WRITE_SYNCHRONIZATION_MODE parameter yields an error. */ + @Test public void testInvalidWriteSyncMode() { assertCreateTableWithParamsThrows("write_synchronization_mode=invalid", "Invalid value of \"WRITE_SYNCHRONIZATION_MODE\" parameter " + @@ -677,6 +710,7 @@ public void testInvalidWriteSyncMode() { * contains {@code IF NOT EXISTS} clause. * @throws Exception if failed. */ + @Test public void testCreateTableIfNotExists() throws Exception { execute("CREATE TABLE \"Person\" (\"id\" int, \"city\" varchar," + " \"name\" varchar, \"surname\" varchar, \"age\" int, PRIMARY KEY (\"id\", \"city\")) WITH " + @@ -691,6 +725,7 @@ public void testCreateTableIfNotExists() throws Exception { * Test that attempting to {@code CREATE TABLE} that already exists yields an error. * @throws Exception if failed. */ + @Test public void testCreateExistingTable() throws Exception { execute("CREATE TABLE \"Person\" (\"id\" int, \"city\" varchar," + " \"name\" varchar, \"surname\" varchar, \"age\" int, PRIMARY KEY (\"id\", \"city\")) WITH " + @@ -712,6 +747,7 @@ public void testCreateExistingTable() throws Exception { * yields an error. * @throws Exception if failed. */ + @Test public void testCreateTableWithWrongColumnNameAsKey() throws Exception { GridTestUtils.assertThrows(null, new Callable() { @Override public Object call() throws Exception { @@ -728,6 +764,7 @@ public void testCreateTableWithWrongColumnNameAsKey() throws Exception { * Test that {@code DROP TABLE} executed at client node actually removes specified cache and type descriptor on all nodes. * @throws Exception if failed. */ + @Test public void testDropTableFromClient() throws Exception { execute(grid(0),"CREATE TABLE IF NOT EXISTS \"Person\" (\"id\" int, \"city\" varchar," + " \"name\" varchar, \"surname\" varchar, \"age\" int, PRIMARY KEY (\"id\", \"city\")) WITH " + @@ -750,6 +787,7 @@ public void testDropTableFromClient() throws Exception { * Test that {@code DROP TABLE} actually removes specified cache and type descriptor on all nodes. * @throws Exception if failed. */ + @Test public void testDropTable() throws Exception { execute("CREATE TABLE IF NOT EXISTS \"Person\" (\"id\" int, \"city\" varchar," + " \"name\" varchar, \"surname\" varchar, \"age\" int, PRIMARY KEY (\"id\", \"city\")) WITH " + @@ -772,6 +810,7 @@ public void testDropTable() throws Exception { * Test that attempting to execute {@code DROP TABLE} via API of cache being dropped yields an error. * @throws Exception if failed. */ + @Test public void testCacheSelfDrop() throws Exception { execute("CREATE TABLE IF NOT EXISTS \"Person\" (\"id\" int, \"city\" varchar," + " \"name\" varchar, \"surname\" varchar, \"age\" int, PRIMARY KEY (\"id\", \"city\")) WITH " + @@ -796,6 +835,7 @@ public void testCacheSelfDrop() throws Exception { * * @throws Exception if failed. */ + @Test public void testDropMissingTableIfExists() throws Exception { execute("DROP TABLE IF EXISTS \"City\""); } @@ -804,6 +844,7 @@ public void testDropMissingTableIfExists() throws Exception { * Test that attempting to {@code DROP TABLE} that does not exist yields an error. * @throws Exception if failed. */ + @Test public void testDropMissingTable() throws Exception { GridTestUtils.assertThrows(null, new Callable() { @Override public Object call() throws Exception { @@ -818,6 +859,7 @@ public void testDropMissingTable() throws Exception { * Check that {@code DROP TABLE} for caches not created with {@code CREATE TABLE} yields an error. * @throws Exception if failed. */ + @Test public void testDropNonDynamicTable() throws Exception { GridTestUtils.assertThrows(null, new Callable() { @Override public Object call() throws Exception { @@ -833,6 +875,7 @@ public void testDropNonDynamicTable() throws Exception { * Test that attempting to destroy via cache API a cache created via SQL finishes successfully. * @throws Exception if failed. */ + @Test public void testDestroyDynamicSqlCache() throws Exception { execute("CREATE TABLE \"Person\" (\"id\" int, \"city\" varchar," + " \"name\" varchar, \"surname\" varchar, \"age\" int, PRIMARY KEY (\"id\", \"city\")) WITH " + @@ -846,6 +889,7 @@ public void testDestroyDynamicSqlCache() throws Exception { * SQL flag does not match that of cache with the same name that is already started, yields an error. * @throws Exception if failed. */ + @Test public void testSqlFlagCompatibilityCheck() throws Exception { execute("CREATE TABLE \"Person\" (\"id\" int, \"city\" varchar, \"name\" varchar, \"surname\" varchar, " + "\"age\" int, PRIMARY KEY (\"id\", \"city\")) WITH \"template=cache\""); @@ -866,6 +910,7 @@ public void testSqlFlagCompatibilityCheck() throws Exception { * Tests index name conflict check in discovery thread. * @throws Exception if failed. */ + @Test public void testIndexNameConflictCheckDiscovery() throws Exception { execute(grid(0), "CREATE TABLE \"Person\" (id int primary key, name varchar)"); @@ -894,6 +939,7 @@ public void testIndexNameConflictCheckDiscovery() throws Exception { * Tests table name conflict check in {@link DdlStatementsProcessor}. * @throws Exception if failed. */ + @Test public void testTableNameConflictCheckSql() throws Exception { execute(grid(0), "CREATE TABLE \"Person\" (id int primary key, name varchar)"); @@ -909,6 +955,7 @@ public void testTableNameConflictCheckSql() throws Exception { /** * @throws Exception if failed. */ + @Test public void testAffinityKey() throws Exception { execute("CREATE TABLE \"City\" (\"name\" varchar primary key, \"code\" int) WITH wrap_key,wrap_value," + "\"affinity_key='name'\""); @@ -970,6 +1017,7 @@ public void testAffinityKey() throws Exception { * @throws Exception If failed. */ @SuppressWarnings({"ThrowableNotThrown", "unchecked"}) + @Test public void testDataRegion() throws Exception { // Empty region name. GridTestUtils.assertThrows(log, new Callable() { @@ -994,6 +1042,7 @@ public void testDataRegion() throws Exception { /** * Test various cases of affinity key column specification. */ + @Test public void testAffinityKeyCaseSensitivity() { execute("CREATE TABLE \"A\" (\"name\" varchar primary key, \"code\" int) WITH wrap_key,wrap_value," + "\"affinity_key='name'\""); @@ -1055,6 +1104,7 @@ public void testAffinityKeyCaseSensitivity() { /** * Tests that attempting to specify an affinity key that actually is a value column yields an error. */ + @Test public void testAffinityKeyNotKeyColumn() { // Error arises because user has specified case sensitive affinity column name GridTestUtils.assertThrows(null, new Callable() { @@ -1069,6 +1119,7 @@ public void testAffinityKeyNotKeyColumn() { /** * Tests that attempting to specify an affinity key that actually is a value column yields an error. */ + @Test public void testAffinityKeyNotFound() { // Error arises because user has specified case sensitive affinity column name GridTestUtils.assertThrows(null, new Callable() { @@ -1083,6 +1134,7 @@ public void testAffinityKeyNotFound() { /** * Tests behavior on sequential create and drop of a table and its index. */ + @Test public void testTableAndIndexRecreate() { execute("drop table if exists \"PUBLIC\".t"); @@ -1126,6 +1178,7 @@ public void testTableAndIndexRecreate() { /** * @throws Exception If test failed. */ + @Test public void testQueryLocalWithRecreate() throws Exception { execute("CREATE TABLE A(id int primary key, name varchar, surname varchar) WITH \"cache_name=cache," + "template=replicated\""); @@ -1159,6 +1212,7 @@ public void testQueryLocalWithRecreate() throws Exception { /** * Test that it's impossible to create tables with same name regardless of key/value wrapping settings. */ + @Test public void testWrappedAndUnwrappedKeyTablesInteroperability() { { execute("create table a (id int primary key, x varchar)"); @@ -1224,6 +1278,7 @@ public void testWrappedAndUnwrappedKeyTablesInteroperability() { /** * Test that it's possible to create tables with matching key and/or value primitive types. */ + @Test public void testDynamicTablesInteroperability() { execute("create table a (id int primary key, x varchar) with \"wrap_value=false\""); @@ -1245,6 +1300,7 @@ public void testDynamicTablesInteroperability() { /** * Test that when key or value has more than one column, wrap=false is forbidden. */ + @Test public void testWrappingAlwaysOnWithComplexObjects() { assertDdlCommandThrows("create table a (id int, x varchar, c long, primary key(id, c)) with \"wrap_key=false\"", "WRAP_KEY cannot be false when composite primary key exists."); @@ -1257,6 +1313,7 @@ public void testWrappingAlwaysOnWithComplexObjects() { * Test behavior when neither key nor value should be wrapped. * @throws SQLException if failed. */ + @Test public void testNoWrap() throws SQLException { doTestKeyValueWrap(false, false, false); } @@ -1265,6 +1322,7 @@ public void testNoWrap() throws SQLException { * Test behavior when only key is wrapped. * @throws SQLException if failed. */ + @Test public void testKeyWrap() throws SQLException { doTestKeyValueWrap(true, false, false); } @@ -1273,6 +1331,7 @@ public void testKeyWrap() throws SQLException { * Test behavior when only value is wrapped. * @throws SQLException if failed. */ + @Test public void testValueWrap() throws SQLException { doTestKeyValueWrap(false, true, false); } @@ -1281,6 +1340,7 @@ public void testValueWrap() throws SQLException { * Test behavior when both key and value is wrapped. * @throws SQLException if failed. */ + @Test public void testKeyAndValueWrap() throws SQLException { doTestKeyValueWrap(true, true, false); } @@ -1290,6 +1350,7 @@ public void testKeyAndValueWrap() throws SQLException { * Key and value are UUID. * @throws SQLException if failed. */ + @Test public void testUuidNoWrap() throws SQLException { doTestKeyValueWrap(false, false, true); } @@ -1299,6 +1360,7 @@ public void testUuidNoWrap() throws SQLException { * Key and value are UUID. * @throws SQLException if failed. */ + @Test public void testUuidKeyWrap() throws SQLException { doTestKeyValueWrap(true, false, true); } @@ -1308,6 +1370,7 @@ public void testUuidKeyWrap() throws SQLException { * Key and value are UUID. * @throws SQLException if failed. */ + @Test public void testUuidValueWrap() throws SQLException { doTestKeyValueWrap(false, true, true); } @@ -1317,6 +1380,7 @@ public void testUuidValueWrap() throws SQLException { * Key and value are UUID. * @throws SQLException if failed. */ + @Test public void testUuidKeyAndValueWrap() throws SQLException { doTestKeyValueWrap(true, true, true); } @@ -1508,6 +1572,7 @@ private void assertDdlCommandThrows(final String cmd, String expErrMsg) { * * @throws Exception if failed. */ + @Test public void testGetTablesForCache() throws Exception { try { execute("create table t1(id int primary key, name varchar)"); @@ -1604,7 +1669,7 @@ private IgniteConfiguration clientConfiguration(int idx) throws Exception { * @return Configuration. * @throws Exception If failed. */ - protected IgniteConfiguration commonConfiguration(int idx) throws Exception { + @Override protected IgniteConfiguration commonConfiguration(int idx) throws Exception { IgniteConfiguration cfg = super.commonConfiguration(idx); DataRegionConfiguration dataRegionCfg = new DataRegionConfiguration().setName(DATA_REGION_NAME); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/H2RowCachePageEvictionTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/H2RowCachePageEvictionTest.java index ba5edc9f1125b..85769ef52abbb 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/H2RowCachePageEvictionTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/H2RowCachePageEvictionTest.java @@ -36,10 +36,14 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for H2RowCacheRegistry with page eviction. */ +@RunWith(JUnit4.class) public class H2RowCachePageEvictionTest extends GridCommonAbstractTest { /** Entries count. */ private static final int ENTRIES = 10_000; @@ -147,6 +151,7 @@ private void checkRowCacheOnPageEviction() { /** * @throws Exception On error. */ + @Test public void testEvictPagesWithDiskStorageSingleCacheInGroup() throws Exception { persistenceEnabled = true; @@ -160,6 +165,7 @@ public void testEvictPagesWithDiskStorageSingleCacheInGroup() throws Exception { /** * @throws Exception On error. */ + @Test public void testEvictPagesWithDiskStorageWithOtherCacheInGroup() throws Exception { persistenceEnabled = true; @@ -175,6 +181,7 @@ public void testEvictPagesWithDiskStorageWithOtherCacheInGroup() throws Exceptio /** * @throws Exception On error. */ + @Test public void testEvictPagesWithoutDiskStorageSingleCacheInGroup() throws Exception { persistenceEnabled = false; @@ -186,6 +193,7 @@ public void testEvictPagesWithoutDiskStorageSingleCacheInGroup() throws Exceptio /** * @throws Exception On error. */ + @Test public void testEvictPagesWithoutDiskStorageWithOtherCacheInGroup() throws Exception { persistenceEnabled = false; diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/H2RowCacheSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/H2RowCacheSelfTest.java index 5db8231394bc5..6a177f022f0ca 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/H2RowCacheSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/H2RowCacheSelfTest.java @@ -39,11 +39,15 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jsr166.ConcurrentLinkedHashMap; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests H2RowCacheRegistry. */ @SuppressWarnings({"unchecked", "ConstantConditions"}) +@RunWith(JUnit4.class) public class H2RowCacheSelfTest extends GridCommonAbstractTest { /** Keys count. */ private static final int ENTRIES = 1_000; @@ -79,6 +83,7 @@ private CacheConfiguration cacheConfiguration(String name, boolean enableOnheapC /** */ + @Test public void testDestroyCacheCreation() { final String cacheName0 = "cache0"; final String cacheName1 = "cache1"; @@ -99,6 +104,7 @@ public void testDestroyCacheCreation() { /** * @throws IgniteCheckedException If failed. */ + @Test public void testDestroyCacheSingleCacheInGroup() throws IgniteCheckedException { checkDestroyCache(); } @@ -106,6 +112,7 @@ public void testDestroyCacheSingleCacheInGroup() throws IgniteCheckedException { /** * @throws IgniteCheckedException If failed. */ + @Test public void testDestroyCacheWithOtherCacheInGroup() throws IgniteCheckedException { grid().getOrCreateCache(cacheConfiguration("cacheWithoutOnheapCache", false)); @@ -115,6 +122,7 @@ public void testDestroyCacheWithOtherCacheInGroup() throws IgniteCheckedExceptio /** * @throws Exception If failed. */ + @Test public void testDeleteEntryCacheSingleCacheInGroup() throws Exception { checkDeleteEntry(); } @@ -122,6 +130,7 @@ public void testDeleteEntryCacheSingleCacheInGroup() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeleteEntryWithOtherCacheInGroup() throws Exception { grid().getOrCreateCache(cacheConfiguration("cacheWithoutOnheapCache", false)); @@ -131,6 +140,7 @@ public void testDeleteEntryWithOtherCacheInGroup() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUpdateEntryCacheSingleCacheInGroup() throws Exception { checkDeleteEntry(); } @@ -138,6 +148,7 @@ public void testUpdateEntryCacheSingleCacheInGroup() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUpdateEntryWithOtherCacheInGroup() throws Exception { grid().getOrCreateCache(cacheConfiguration("cacheWithoutOnheapCache", false)); @@ -147,6 +158,7 @@ public void testUpdateEntryWithOtherCacheInGroup() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFixedSize() throws Exception { int maxSize = 100; String cacheName = "cacheWithLimitedSize"; diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/IgniteDecimalSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/IgniteDecimalSelfTest.java index b3743de0bd8d1..aaeb030ecb7b1 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/IgniteDecimalSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/IgniteDecimalSelfTest.java @@ -33,12 +33,16 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.IgniteEx; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.Arrays.asList; /** * Test to check decimal columns. */ +@RunWith(JUnit4.class) public class IgniteDecimalSelfTest extends AbstractSchemaSelfTest { /** */ private static final int PRECISION = 9; @@ -122,6 +126,7 @@ public class IgniteDecimalSelfTest extends AbstractSchemaSelfTest { /** * @throws Exception If failed. */ + @Test public void testConfiguredFromDdl() throws Exception { checkPrecisionAndScale(DEC_TAB_NAME, VALUE, PRECISION, SCALE); } @@ -129,6 +134,7 @@ public void testConfiguredFromDdl() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConfiguredFromQueryEntity() throws Exception { checkPrecisionAndScale(SALARY_TAB_NAME, "amount", PRECISION, SCALE); } @@ -136,6 +142,7 @@ public void testConfiguredFromQueryEntity() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConfiguredFromQueryEntityInDynamicallyCreatedCache() throws Exception { IgniteEx grid = grid(0); @@ -151,6 +158,7 @@ public void testConfiguredFromQueryEntityInDynamicallyCreatedCache() throws Exce /** * @throws Exception If failed. */ + @Test public void testConfiguredFromAnnotations() throws Exception { IgniteEx grid = grid(0); @@ -164,6 +172,7 @@ public void testConfiguredFromAnnotations() throws Exception { } /** */ + @Test public void testSelectDecimal() throws Exception { IgniteEx grid = grid(0); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/LongIndexNameTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/LongIndexNameTest.java index 0b96ce0946c95..c1d6eea83cfe2 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/LongIndexNameTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/LongIndexNameTest.java @@ -32,10 +32,14 @@ import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class LongIndexNameTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { @@ -63,6 +67,7 @@ public class LongIndexNameTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testLongIndexNames() throws Exception { try { Ignite ignite = startGrid(0); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/MvccEmptyTransactionSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/MvccEmptyTransactionSelfTest.java index 5a660625283e8..7704c723883d8 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/MvccEmptyTransactionSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/MvccEmptyTransactionSelfTest.java @@ -31,10 +31,14 @@ import java.sql.DriverManager; import java.sql.Statement; import java.util.List; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for empty transaction while is then enlisted with real value. */ +@RunWith(JUnit4.class) public class MvccEmptyTransactionSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryVmIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -48,6 +52,7 @@ public class MvccEmptyTransactionSelfTest extends GridCommonAbstractTest { * @throws Exception If failed. */ @SuppressWarnings("unchecked") + @Test public void testEmptyTransaction() throws Exception { Ignition.start(config("srv", false)); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/OptimizedMarshallerIndexNameTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/OptimizedMarshallerIndexNameTest.java index 57a55f391b30b..fb5e2d0a019cf 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/OptimizedMarshallerIndexNameTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/OptimizedMarshallerIndexNameTest.java @@ -40,6 +40,9 @@ import java.io.ObjectOutput; import java.util.List; import java.util.UUID; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -50,6 +53,7 @@ * See IGNITE-6915 for details. */ +@RunWith(JUnit4.class) public class OptimizedMarshallerIndexNameTest extends GridCommonAbstractTest { /** Test name 1 */ private static final String TEST_NAME1 = "Name1"; @@ -111,6 +115,7 @@ protected static CacheConfiguration cacheConfiguration(String na * Verifies that BPlusTree are not erroneously shared between tables in the same cache * due to IGNITE-6915 bug. */ + @Test public void testOptimizedMarshallerIndex() { // Put objects of different types into the same cache diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/QueryEntityValidationSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/QueryEntityValidationSelfTest.java index 5f24191792866..ace76354f1189 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/QueryEntityValidationSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/QueryEntityValidationSelfTest.java @@ -29,10 +29,14 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.concurrent.Callable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for query entity validation. */ +@RunWith(JUnit4.class) public class QueryEntityValidationSelfTest extends GridCommonAbstractTest { /** Cache name. */ private static final String CACHE_NAME = "cache"; @@ -47,6 +51,7 @@ public class QueryEntityValidationSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testValueTypeNull() throws Exception { final CacheConfiguration ccfg = new CacheConfiguration().setName(CACHE_NAME); @@ -70,6 +75,7 @@ public void testValueTypeNull() throws Exception { * * @throws Exception If failed. */ + @Test public void testIndexTypeNull() throws Exception { final CacheConfiguration ccfg = new CacheConfiguration().setName(CACHE_NAME); @@ -112,6 +118,7 @@ public void testIndexTypeNull() throws Exception { * * @throws Exception If failed. */ + @Test public void testIndexNameDuplicate() throws Exception { final CacheConfiguration ccfg = new CacheConfiguration().setName(CACHE_NAME); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/SchemaExchangeSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/SchemaExchangeSelfTest.java index bd2b578552ab1..8e11b3d1914ca 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/SchemaExchangeSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/SchemaExchangeSelfTest.java @@ -40,6 +40,9 @@ import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.IgniteClientReconnectAbstractTest.TestTcpDiscoverySpi; import static org.apache.ignite.internal.IgniteClientReconnectAbstractTest.reconnectClientNode; @@ -47,6 +50,7 @@ /** * Tests for schema exchange between nodes. */ +@RunWith(JUnit4.class) public class SchemaExchangeSelfTest extends AbstractSchemaSelfTest { /** Node on which filter should be applied (if any). */ private static String filterNodeName; @@ -68,6 +72,7 @@ public class SchemaExchangeSelfTest extends AbstractSchemaSelfTest { * * @throws Exception If failed. */ + @Test public void testEmptyStatic() throws Exception { checkEmpty(false); } @@ -77,6 +82,7 @@ public void testEmptyStatic() throws Exception { * * @throws Exception If failed. */ + @Test public void testEmptyDynamic() throws Exception { checkEmpty(true); } @@ -117,6 +123,7 @@ private void checkEmpty(boolean dynamic) throws Exception { * * @throws Exception If failed. */ + @Test public void testNonEmptyStatic() throws Exception { checkNonEmpty(false); } @@ -126,6 +133,7 @@ public void testNonEmptyStatic() throws Exception { * * @throws Exception If failed. */ + @Test public void testNonEmptyDynamic() throws Exception { checkNonEmpty(true); } @@ -166,6 +174,7 @@ private void checkNonEmpty(boolean dynamic) throws Exception { * * @throws Exception If failed. */ + @Test public void testDynamicRestarts() throws Exception { IgniteEx node1 = start(1, KeyClass.class, ValueClass.class); IgniteEx node2 = startNoCache(2); @@ -260,6 +269,7 @@ public void testDynamicRestarts() throws Exception { * * @throws Exception If failed. */ + @Test public void testClientJoinStatic() throws Exception { checkClientJoin(false); } @@ -269,6 +279,7 @@ public void testClientJoinStatic() throws Exception { * * @throws Exception If failed. */ + @Test public void testClientJoinDynamic() throws Exception { checkClientJoin(true); } @@ -323,6 +334,7 @@ private void checkClientJoin(boolean dynamic) throws Exception { * * @throws Exception If failed. */ + @Test public void testClientCacheStartStatic() throws Exception { checkClientCacheStart(false); } @@ -332,6 +344,7 @@ public void testClientCacheStartStatic() throws Exception { * * @throws Exception If failed. */ + @Test public void testClientCacheStartDynamic() throws Exception { checkClientCacheStart(true); } @@ -397,6 +410,7 @@ private void checkClientCacheStart(boolean dynamic) throws Exception { * * @throws Exception If failed. */ + @Test public void testNodeFilter() throws Exception { filterNodeName = getTestIgniteInstanceName(1); @@ -425,6 +439,7 @@ public void testNodeFilter() throws Exception { * * @throws Exception If failed. */ + @Test public void testServerRestartWithNewTypes() throws Exception { IgniteEx node1 = start(1, KeyClass.class, ValueClass.class); assertTypes(node1, ValueClass.class); @@ -480,6 +495,7 @@ public void testServerRestartWithNewTypes() throws Exception { * @throws Exception If failed. */ @SuppressWarnings("unchecked") + @Test public void testClientReconnect() throws Exception { final IgniteEx node1 = start(1, KeyClass.class, ValueClass.class); assertTypes(node1, ValueClass.class); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/SqlTransactionCommandsWithMvccDisabledSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/SqlTransactionCommandsWithMvccDisabledSelfTest.java index b8b9360f03454..95fd2d14fa137 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/SqlTransactionCommandsWithMvccDisabledSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/SqlTransactionCommandsWithMvccDisabledSelfTest.java @@ -20,10 +20,14 @@ import java.util.concurrent.Callable; import org.apache.ignite.internal.processors.query.IgniteSQLException; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class SqlTransactionCommandsWithMvccDisabledSelfTest extends AbstractSchemaSelfTest { /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { @@ -46,6 +50,7 @@ public class SqlTransactionCommandsWithMvccDisabledSelfTest extends AbstractSche /** * @throws Exception if failed. */ + @Test public void testBeginWithMvccDisabled() throws Exception { GridTestUtils.assertThrows(null, new Callable() { @Override public Object call() throws Exception { @@ -59,6 +64,7 @@ public void testBeginWithMvccDisabled() throws Exception { /** * @throws Exception if failed. */ + @Test public void testCommitWithMvccDisabled() throws Exception { execute(grid(0), "COMMIT"); // assert no exception @@ -67,6 +73,7 @@ public void testCommitWithMvccDisabled() throws Exception { /** * @throws Exception if failed. */ + @Test public void testRollbackWithMvccDisabled() throws Exception { execute(grid(0), "ROLLBACK"); // assert no exception diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/SqlTransactionsCommandsWithMvccEnabledSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/SqlTransactionsCommandsWithMvccEnabledSelfTest.java index 3ac94c876d5bc..d47d98875ef0e 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/SqlTransactionsCommandsWithMvccEnabledSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/SqlTransactionsCommandsWithMvccEnabledSelfTest.java @@ -40,10 +40,14 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionState; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests to check behavior regarding transactions started via SQL. */ +@RunWith(JUnit4.class) public class SqlTransactionsCommandsWithMvccEnabledSelfTest extends AbstractSchemaSelfTest { /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { @@ -65,6 +69,7 @@ public class SqlTransactionsCommandsWithMvccEnabledSelfTest extends AbstractSche /** * Test that BEGIN opens a transaction. */ + @Test public void testBegin() { execute(node(), "BEGIN"); @@ -76,6 +81,7 @@ public void testBegin() { /** * Test that COMMIT commits a transaction. */ + @Test public void testCommit() { execute(node(), "BEGIN WORK"); @@ -95,6 +101,7 @@ public void testCommit() { /** * Test that COMMIT without a transaction yields nothing. */ + @Test public void testCommitNoTransaction() { execute(node(), "COMMIT"); } @@ -102,6 +109,7 @@ public void testCommitNoTransaction() { /** * Test that ROLLBACK without a transaction yields nothing. */ + @Test public void testRollbackNoTransaction() { execute(node(), "ROLLBACK"); } @@ -109,6 +117,7 @@ public void testRollbackNoTransaction() { /** * Test that ROLLBACK rolls back a transaction. */ + @Test public void testRollback() { execute(node(), "BEGIN TRANSACTION"); @@ -128,6 +137,7 @@ public void testRollback() { /** * Test that attempting to perform various SQL operations within non SQL transaction yields an exception. */ + @Test public void testSqlOperationsWithinNonSqlTransaction() { fail("https://issues.apache.org/jira/browse/IGNITE-9470"); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/SqlTransactionsSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/SqlTransactionsSelfTest.java index e225f2825c6fd..c3853881eff84 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/SqlTransactionsSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/SqlTransactionsSelfTest.java @@ -43,10 +43,14 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionState; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests to check behavior regarding transactions started via SQL. */ +@RunWith(JUnit4.class) public class SqlTransactionsSelfTest extends AbstractSchemaSelfTest { /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { @@ -68,6 +72,7 @@ public class SqlTransactionsSelfTest extends AbstractSchemaSelfTest { /** * Test that BEGIN opens a transaction. */ + @Test public void testBegin() { execute(node(), "BEGIN"); @@ -79,6 +84,7 @@ public void testBegin() { /** * Test that COMMIT commits a transaction. */ + @Test public void testCommit() { execute(node(), "BEGIN WORK"); @@ -98,6 +104,7 @@ public void testCommit() { /** * Test that COMMIT without a transaction yields nothing. */ + @Test public void testCommitNoTransaction() { execute(node(), "COMMIT"); } @@ -105,6 +112,7 @@ public void testCommitNoTransaction() { /** * Test that ROLLBACK without a transaction yields nothing. */ + @Test public void testRollbackNoTransaction() { execute(node(), "ROLLBACK"); } @@ -112,6 +120,7 @@ public void testRollbackNoTransaction() { /** * Test that ROLLBACK rolls back a transaction. */ + @Test public void testRollback() { execute(node(), "BEGIN TRANSACTION"); @@ -131,6 +140,7 @@ public void testRollback() { /** * Test that attempting to perform various SQL operations within non SQL transaction yields an exception. */ + @Test public void testSqlOperationsWithinNonSqlTransaction() { assertSqlOperationWithinNonSqlTransactionThrows("COMMIT"); @@ -263,6 +273,7 @@ else if (arg instanceof EntryProcessor) /** * Test that attempting to perform a cache PUT operation from within an SQL transaction fails. */ + @Test public void testCacheOperationsFromSqlTransaction() { checkCacheOperationThrows("get", 1); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/local/IgniteCacheLocalFieldsQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/local/IgniteCacheLocalFieldsQuerySelfTest.java index e668c0659f1f4..62bb429de0939 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/local/IgniteCacheLocalFieldsQuerySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/local/IgniteCacheLocalFieldsQuerySelfTest.java @@ -20,12 +20,16 @@ import org.apache.ignite.cache.CacheMode; import org.apache.ignite.cache.query.SqlFieldsQuery; import org.apache.ignite.internal.processors.cache.IgniteCacheAbstractFieldsQuerySelfTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.LOCAL; /** * Tests for fields queries. */ +@RunWith(JUnit4.class) public class IgniteCacheLocalFieldsQuerySelfTest extends IgniteCacheAbstractFieldsQuerySelfTest { // static { // System.setProperty(IgniteSystemProperties.IGNITE_H2_DEBUG_CONSOLE, "1"); @@ -44,8 +48,9 @@ public class IgniteCacheLocalFieldsQuerySelfTest extends IgniteCacheAbstractFiel /** * @throws Exception If failed. */ + @Test public void testInformationSchema() throws Exception { jcache(String.class, String.class).query( new SqlFieldsQuery("SELECT VALUE FROM INFORMATION_SCHEMA.SETTINGS").setLocal(true)).getAll(); } -} \ No newline at end of file +} diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/local/IgniteCacheLocalQueryCancelOrTimeoutSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/local/IgniteCacheLocalQueryCancelOrTimeoutSelfTest.java index fc681a4f33009..d4f76425ff4fe 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/local/IgniteCacheLocalQueryCancelOrTimeoutSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/local/IgniteCacheLocalQueryCancelOrTimeoutSelfTest.java @@ -29,12 +29,16 @@ import org.apache.ignite.cache.query.QueryCancelledException; import org.apache.ignite.internal.util.typedef.G; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.LOCAL; /** * Tests local query cancellations and timeouts. */ +@RunWith(JUnit4.class) public class IgniteCacheLocalQueryCancelOrTimeoutSelfTest extends GridCommonAbstractTest { /** Cache size. */ private static final int CACHE_SIZE = 10_000; @@ -92,6 +96,7 @@ private void loadCache(IgniteCache cache) { /** * Tests cancellation. */ + @Test public void testQueryCancel() { testQuery(false, 1, TimeUnit.SECONDS); } @@ -99,6 +104,7 @@ public void testQueryCancel() { /** * Tests cancellation with zero timeout. */ + @Test public void testQueryCancelZeroTimeout() { testQuery(false, 1, TimeUnit.MILLISECONDS); } @@ -106,6 +112,7 @@ public void testQueryCancelZeroTimeout() { /** * Tests timeout. */ + @Test public void testQueryTimeout() { testQuery(true, 1, TimeUnit.SECONDS); } @@ -148,4 +155,4 @@ private void testQuery(boolean timeout, int timeoutUnits, TimeUnit timeUnit) { // Test must exit gracefully. } -} \ No newline at end of file +} diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/local/IgniteCacheLocalQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/local/IgniteCacheLocalQuerySelfTest.java index 2272f27d158dd..f5f171f4f3ad5 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/local/IgniteCacheLocalQuerySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/local/IgniteCacheLocalQuerySelfTest.java @@ -29,12 +29,16 @@ import org.apache.ignite.cache.query.SqlFieldsQuery; import org.apache.ignite.cache.query.SqlQuery; import org.apache.ignite.internal.processors.cache.IgniteCacheAbstractQuerySelfTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.LOCAL; /** * Tests local query. */ +@RunWith(JUnit4.class) public class IgniteCacheLocalQuerySelfTest extends IgniteCacheAbstractQuerySelfTest { /** {@inheritDoc} */ @Override protected int gridCount() { @@ -49,6 +53,7 @@ public class IgniteCacheLocalQuerySelfTest extends IgniteCacheAbstractQuerySelfT /** * @throws Exception If test failed. */ + @Test public void testQueryLocal() throws Exception { // Let's do it twice to see how prepared statement caching behaves - without recompilation // check for cached prepared statements this would fail. @@ -98,6 +103,7 @@ public void testQueryLocal() throws Exception { } /** {@inheritDoc} */ + @Test @Override public void testLocalSqlQueryFromClient() throws Exception { try { Ignite g = startGrid("client"); @@ -127,6 +133,7 @@ public void testQueryLocal() throws Exception { } /** {@inheritDoc} */ + @Test @Override public void testLocalSqlFieldsQueryFromClient() throws Exception { try { Ignite g = startGrid("client"); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractContinuousQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractContinuousQuerySelfTest.java index 1418d47451fd6..073bfb0b8cc36 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractContinuousQuerySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractContinuousQuerySelfTest.java @@ -19,12 +19,16 @@ import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryAbstractSelfTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT; /** * */ +@RunWith(JUnit4.class) public abstract class CacheMvccAbstractContinuousQuerySelfTest extends GridCacheContinuousQueryAbstractSelfTest { /** {@inheritDoc} */ @Override protected CacheAtomicityMode atomicityMode() { @@ -42,22 +46,26 @@ public abstract class CacheMvccAbstractContinuousQuerySelfTest extends GridCache } /** {@inheritDoc} */ + @Test @Override public void testInternalKey() throws Exception { // No-op. } /** {@inheritDoc} */ - public void testExpired() throws Exception { + @Test + @Override public void testExpired() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-7311"); } /** {@inheritDoc} */ - public void testLoadCache() throws Exception { + @Test + @Override public void testLoadCache() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-7954"); } /** {@inheritDoc} */ - public void testEvents() throws Exception { + @Test + @Override public void testEvents() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-9321"); } -} \ No newline at end of file +} diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractSqlCoordinatorFailoverTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractSqlCoordinatorFailoverTest.java index 5eac352548dd9..b14dc074279c7 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractSqlCoordinatorFailoverTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractSqlCoordinatorFailoverTest.java @@ -17,6 +17,10 @@ package org.apache.ignite.internal.processors.cache.mvcc; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + import static org.apache.ignite.internal.processors.cache.mvcc.CacheMvccAbstractTest.ReadMode.SCAN; import static org.apache.ignite.internal.processors.cache.mvcc.CacheMvccAbstractTest.ReadMode.SQL; import static org.apache.ignite.internal.processors.cache.mvcc.CacheMvccAbstractTest.WriteMode.DML; @@ -26,10 +30,12 @@ /** * Mvcc SQL API coordinator failover test. */ +@RunWith(JUnit4.class) public abstract class CacheMvccAbstractSqlCoordinatorFailoverTest extends CacheMvccAbstractBasicCoordinatorFailoverTest { /** * @throws Exception If failed. */ + @Test public void testAccountsTxSql_Server_Backups0_CoordinatorFails() throws Exception { accountsTxReadAll(2, 1, 0, 64, new InitIndexing(Integer.class, MvccTestAccount.class), true, SQL, DML, DFLT_TEST_TIME, RestartMode.RESTART_CRD); @@ -38,6 +44,7 @@ public void testAccountsTxSql_Server_Backups0_CoordinatorFails() throws Exceptio /** * @throws Exception If failed. */ + @Test public void testAccountsTxSql_SingleNode_CoordinatorFails_Persistence() throws Exception { persistence = true; @@ -48,6 +55,7 @@ public void testAccountsTxSql_SingleNode_CoordinatorFails_Persistence() throws E /** * @throws Exception If failed. */ + @Test public void testPutAllGetAll_ClientServer_Backups0_RestartCoordinator_ScanDml() throws Exception { putAllGetAll(RestartMode.RESTART_CRD , 2, 1, 0, 64, new InitIndexing(Integer.class, Integer.class), SCAN, DML); @@ -56,6 +64,7 @@ public void testPutAllGetAll_ClientServer_Backups0_RestartCoordinator_ScanDml() /** * @throws Exception If failed. */ + @Test public void testPutAllGetAll_SingleNode_RestartCoordinator_ScanDml_Persistence() throws Exception { persistence = true; @@ -66,6 +75,7 @@ public void testPutAllGetAll_SingleNode_RestartCoordinator_ScanDml_Persistence() /** * @throws Exception If failed. */ + @Test public void testPutAllGetAll_ClientServer_Backups0_RestartCoordinator_SqlDml() throws Exception { putAllGetAll(RestartMode.RESTART_CRD, 2, 1, 0, DFLT_PARTITION_COUNT, new InitIndexing(Integer.class, Integer.class), SQL, DML); @@ -74,6 +84,7 @@ public void testPutAllGetAll_ClientServer_Backups0_RestartCoordinator_SqlDml() t /** * @throws Exception If failed. */ + @Test public void testPutAllGetAll_SingleNode_RestartCoordinator_SqlDml_Persistence() throws Exception { persistence = true; @@ -84,6 +95,7 @@ public void testPutAllGetAll_SingleNode_RestartCoordinator_SqlDml_Persistence() /** * @throws Exception If failed. */ + @Test public void testUpdate_N_Objects_ClientServer_Backups0_Sql_Persistence() throws Exception { persistence = true; @@ -94,6 +106,7 @@ public void testUpdate_N_Objects_ClientServer_Backups0_Sql_Persistence() throws /** * @throws Exception If failed. */ + @Test public void testUpdate_N_Objects_SingleNode_Sql_Persistence() throws Exception { updateNObjectsTest(3, 1, 0, 0, 1, DFLT_TEST_TIME, new InitIndexing(Integer.class, Integer.class), SQL, DML, RestartMode.RESTART_CRD); @@ -102,6 +115,7 @@ public void testUpdate_N_Objects_SingleNode_Sql_Persistence() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCoordinatorFailureSimplePessimisticTxSql() throws Exception { coordinatorFailureSimple(PESSIMISTIC, REPEATABLE_READ, SQL, DML); } @@ -109,6 +123,7 @@ public void testCoordinatorFailureSimplePessimisticTxSql() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxInProgressCoordinatorChangeSimple_Readonly() throws Exception { txInProgressCoordinatorChangeSimple(PESSIMISTIC, REPEATABLE_READ, new InitIndexing(Integer.class, Integer.class), SQL, DML); @@ -117,6 +132,7 @@ public void testTxInProgressCoordinatorChangeSimple_Readonly() throws Exception /** * @throws Exception If failed. */ + @Test public void testReadInProgressCoordinatorFailsSimple_FromClient() throws Exception { readInProgressCoordinatorFailsSimple(true, new InitIndexing(Integer.class, Integer.class), SQL, DML); } @@ -124,6 +140,7 @@ public void testReadInProgressCoordinatorFailsSimple_FromClient() throws Excepti /** * @throws Exception If failed. */ + @Test public void testCoordinatorChangeActiveQueryClientFails_Simple() throws Exception { checkCoordinatorChangeActiveQueryClientFails_Simple(new InitIndexing(Integer.class, Integer.class), SQL, DML); } @@ -131,6 +148,7 @@ public void testCoordinatorChangeActiveQueryClientFails_Simple() throws Exceptio /** * @throws Exception If failed. */ + @Test public void testCoordinatorChangeActiveQueryClientFails_SimpleScan() throws Exception { checkCoordinatorChangeActiveQueryClientFails_Simple(new InitIndexing(Integer.class, Integer.class), SCAN, DML); } diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccBackupsAbstractTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccBackupsAbstractTest.java index 894e4bb56eb5d..b0573b9c9957e 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccBackupsAbstractTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccBackupsAbstractTest.java @@ -46,6 +46,9 @@ import org.apache.ignite.lang.IgniteBiTuple; import org.apache.ignite.plugin.extensions.communication.Message; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; import static org.apache.ignite.internal.processors.cache.mvcc.CacheMvccAbstractTest.ReadMode.SQL; @@ -58,6 +61,7 @@ * Backups tests. */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public abstract class CacheMvccBackupsAbstractTest extends CacheMvccAbstractTest { /** Test timeout. */ @@ -68,6 +72,7 @@ public abstract class CacheMvccBackupsAbstractTest extends CacheMvccAbstractTest * * @throws Exception If fails. */ + @Test public void testBackupsCoherenceSimple() throws Exception { disableScheduledVacuum = true; @@ -181,6 +186,7 @@ public void testBackupsCoherenceSimple() throws Exception { * * @throws Exception If failed. */ + @Test public void testBackupsCoherenceWithLargeOperations() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10104"); @@ -279,6 +285,7 @@ public void testBackupsCoherenceWithLargeOperations() throws Exception { * * @throws Exception If failed. */ + @Test public void testBackupsCoherenceWithInFlightBatchesOverflow() throws Exception { testSpi = true; @@ -389,6 +396,7 @@ public void testBackupsCoherenceWithInFlightBatchesOverflow() throws Exception { * * @throws Exception If failed. */ + @Test public void testBackupsCoherenceWithConcurrentUpdates2ServersNoClients() throws Exception { checkBackupsCoherenceWithConcurrentUpdates(2, 0); } @@ -398,6 +406,7 @@ public void testBackupsCoherenceWithConcurrentUpdates2ServersNoClients() throws * * @throws Exception If failed. */ + @Test public void testBackupsCoherenceWithConcurrentUpdates4ServersNoClients() throws Exception { checkBackupsCoherenceWithConcurrentUpdates(4, 0); } @@ -407,6 +416,7 @@ public void testBackupsCoherenceWithConcurrentUpdates4ServersNoClients() throws * * @throws Exception If failed. */ + @Test public void testBackupsCoherenceWithConcurrentUpdates3Servers1Client() throws Exception { checkBackupsCoherenceWithConcurrentUpdates(3, 1); } @@ -416,6 +426,7 @@ public void testBackupsCoherenceWithConcurrentUpdates3Servers1Client() throws Ex * * @throws Exception If failed. */ + @Test public void testBackupsCoherenceWithConcurrentUpdates5Servers2Clients() throws Exception { checkBackupsCoherenceWithConcurrentUpdates(5, 2); } @@ -463,6 +474,7 @@ private void checkBackupsCoherenceWithConcurrentUpdates(int srvs, int clients) t /** * @throws Exception If failed. */ + @Test public void testNoForceKeyRequestDelayedRebalanceNoVacuum() throws Exception { disableScheduledVacuum = true; @@ -472,6 +484,7 @@ public void testNoForceKeyRequestDelayedRebalanceNoVacuum() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNoForceKeyRequestDelayedRebalance() throws Exception { doTestRebalanceNodeAdd(true); } @@ -479,6 +492,7 @@ public void testNoForceKeyRequestDelayedRebalance() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNoForceKeyRequestNoVacuum() throws Exception { disableScheduledVacuum = true; @@ -488,6 +502,7 @@ public void testNoForceKeyRequestNoVacuum() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNoForceKeyRequest() throws Exception { doTestRebalanceNodeAdd(false); } @@ -571,6 +586,7 @@ private void doTestRebalanceNodeAdd(boolean delayRebalance) throws Exception { /** * @throws Exception If failed. */ + @Test public void testRebalanceNodeLeaveClient() throws Exception { doTestRebalanceNodeLeave(true); } @@ -578,6 +594,7 @@ public void testRebalanceNodeLeaveClient() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRebalanceNodeLeaveServer() throws Exception { doTestRebalanceNodeLeave(false); } diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccBasicContinuousQueryTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccBasicContinuousQueryTest.java index e08341a24a033..5df177a571f2d 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccBasicContinuousQueryTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccBasicContinuousQueryTest.java @@ -52,6 +52,9 @@ import org.apache.ignite.plugin.extensions.communication.Message; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.SECONDS; @@ -65,6 +68,7 @@ /** * Basic continuous queries test with enabled mvcc. */ +@RunWith(JUnit4.class) public class CacheMvccBasicContinuousQueryTest extends CacheMvccAbstractTest { /** */ private static final long LATCH_TIMEOUT = 5000; @@ -115,6 +119,7 @@ public class CacheMvccBasicContinuousQueryTest extends CacheMvccAbstractTest { /** * @throws Exception If failed. */ + @Test public void testAllEntries() throws Exception { Ignite node = startGrids(3); @@ -211,6 +216,7 @@ public void testAllEntries() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCachingMaxSize() throws Exception { Ignite node = startGrids(1); @@ -246,6 +252,7 @@ public void testCachingMaxSize() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUpdateCountersGapClosedSimplePartitioned() throws Exception { checkUpdateCountersGapIsProcessedSimple(CacheMode.PARTITIONED); } @@ -253,6 +260,7 @@ public void testUpdateCountersGapClosedSimplePartitioned() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUpdateCountersGapClosedSimpleReplicated() throws Exception { checkUpdateCountersGapIsProcessedSimple(CacheMode.REPLICATED); } @@ -383,6 +391,7 @@ private void checkUpdateCountersGapIsProcessedSimple(CacheMode cacheMode) throws /** * @throws Exception If failed. */ + @Test public void testUpdateCountersGapClosedPartitioned() throws Exception { checkUpdateCountersGapsClosed(CacheMode.PARTITIONED); } @@ -390,6 +399,7 @@ public void testUpdateCountersGapClosedPartitioned() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUpdateCountersGapClosedReplicated() throws Exception { checkUpdateCountersGapsClosed(CacheMode.REPLICATED); } diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccBulkLoadTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccBulkLoadTest.java index 98bbdfc400346..bff6e9781a844 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccBulkLoadTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccBulkLoadTest.java @@ -28,6 +28,9 @@ import org.apache.ignite.cache.CacheMode; import org.apache.ignite.cache.query.SqlFieldsQuery; import org.apache.ignite.configuration.CacheConfiguration; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.Arrays.asList; import static java.util.Collections.singletonList; @@ -35,6 +38,7 @@ /** * */ +@RunWith(JUnit4.class) public class CacheMvccBulkLoadTest extends CacheMvccAbstractTest { /** */ private IgniteCache sqlNexus; @@ -65,6 +69,7 @@ public class CacheMvccBulkLoadTest extends CacheMvccAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCopyStoresData() throws Exception { String csvFilePath = new File(getClass().getResource("mvcc_person.csv").toURI()).getAbsolutePath(); stmt.executeUpdate("copy from '" + csvFilePath + "' into person (id, name) format csv"); @@ -81,6 +86,7 @@ public void testCopyStoresData() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCopyDoesNotOverwrite() throws Exception { sqlNexus.query(q("insert into person values(1, 'Old')")); String csvFilePath = new File(getClass().getResource("mvcc_person.csv").toURI()).getAbsolutePath(); @@ -98,6 +104,7 @@ public void testCopyDoesNotOverwrite() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCopyLeavesPartialResultsInCaseOfFailure() throws Exception { String csvFilePath = new File(getClass().getResource("mvcc_person_broken.csv").toURI()).getAbsolutePath(); try { diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccContinuousWithTransformerClientSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccContinuousWithTransformerClientSelfTest.java index a3ea0e812d5c8..ae1e37513feda 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccContinuousWithTransformerClientSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccContinuousWithTransformerClientSelfTest.java @@ -18,10 +18,14 @@ import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousWithTransformerClientSelfTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class CacheMvccContinuousWithTransformerClientSelfTest extends CacheContinuousWithTransformerClientSelfTest { /** {@inheritDoc} */ @Override protected CacheAtomicityMode atomicityMode() { @@ -29,6 +33,7 @@ public class CacheMvccContinuousWithTransformerClientSelfTest extends CacheConti } /** {@inheritDoc} */ + @Test @Override public void testExpired() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-7311"); } diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccContinuousWithTransformerPartitionedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccContinuousWithTransformerPartitionedSelfTest.java index d029143220cbf..c38cc7c025728 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccContinuousWithTransformerPartitionedSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccContinuousWithTransformerPartitionedSelfTest.java @@ -19,10 +19,14 @@ import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.cache.CacheMode; import org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousWithTransformerReplicatedSelfTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class CacheMvccContinuousWithTransformerPartitionedSelfTest extends CacheContinuousWithTransformerReplicatedSelfTest { /** {@inheritDoc} */ @Override protected CacheAtomicityMode atomicityMode() { @@ -35,6 +39,7 @@ public class CacheMvccContinuousWithTransformerPartitionedSelfTest extends Cache } /** {@inheritDoc} */ + @Test @Override public void testExpired() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-7311"); } diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccContinuousWithTransformerReplicatedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccContinuousWithTransformerReplicatedSelfTest.java index a294e17a42053..b40972b63e5e3 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccContinuousWithTransformerReplicatedSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccContinuousWithTransformerReplicatedSelfTest.java @@ -18,10 +18,14 @@ import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousWithTransformerReplicatedSelfTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class CacheMvccContinuousWithTransformerReplicatedSelfTest extends CacheContinuousWithTransformerReplicatedSelfTest { /** {@inheritDoc} */ @@ -30,6 +34,7 @@ public class CacheMvccContinuousWithTransformerReplicatedSelfTest } /** {@inheritDoc} */ + @Test @Override public void testExpired() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-7311"); } diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccDmlSimpleTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccDmlSimpleTest.java index 7f141ca36c4b1..dcd19a64aca4d 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccDmlSimpleTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccDmlSimpleTest.java @@ -28,12 +28,16 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.internal.processors.cache.query.IgniteQueryErrorCode; import org.apache.ignite.internal.processors.query.IgniteSQLException; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.Arrays.asList; /** * */ +@RunWith(JUnit4.class) public class CacheMvccDmlSimpleTest extends CacheMvccAbstractTest { /** */ private IgniteCache cache; @@ -58,6 +62,7 @@ public class CacheMvccDmlSimpleTest extends CacheMvccAbstractTest { /** * @throws Exception if failed. */ + @Test public void testInsert() throws Exception { int cnt = update("insert into Integer(_key, _val) values(1, 1),(2, 2)"); @@ -78,6 +83,7 @@ public void testInsert() throws Exception { /** * @throws Exception if failed. */ + @Test public void testMerge() throws Exception { { int cnt = update("merge into Integer(_key, _val) values(1, 1),(2, 2)"); @@ -97,6 +103,7 @@ public void testMerge() throws Exception { /** * @throws Exception if failed. */ + @Test public void testUpdate() throws Exception { { int cnt = update("update Integer set _val = 42 where _key = 42"); @@ -139,6 +146,7 @@ public void testUpdate() throws Exception { /** * @throws Exception if failed. */ + @Test public void testDelete() throws Exception { { int cnt = update("delete from Integer where _key = 42"); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccPartitionedSelectForUpdateQueryTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccPartitionedSelectForUpdateQueryTest.java index 12209abd4f389..3e849edfefb23 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccPartitionedSelectForUpdateQueryTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccPartitionedSelectForUpdateQueryTest.java @@ -18,19 +18,24 @@ package org.apache.ignite.internal.processors.cache.mvcc; import org.apache.ignite.cache.CacheMode; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** */ +@RunWith(JUnit4.class) public class CacheMvccPartitionedSelectForUpdateQueryTest extends CacheMvccSelectForUpdateQueryAbstractTest { /** {@inheritDoc} */ - public CacheMode cacheMode() { + @Override public CacheMode cacheMode() { return PARTITIONED; } /** * */ + @Test public void testSelectForUpdateDistributedSegmented() throws Exception { doTestSelectForUpdateDistributed("PersonSeg", false); } @@ -38,6 +43,7 @@ public void testSelectForUpdateDistributedSegmented() throws Exception { /** * */ + @Test public void testSelectForUpdateLocalSegmented() throws Exception { doTestSelectForUpdateLocal("PersonSeg", false); } diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccPartitionedSqlCoordinatorFailoverTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccPartitionedSqlCoordinatorFailoverTest.java index eee270c7e35c8..1f684943fe158 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccPartitionedSqlCoordinatorFailoverTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccPartitionedSqlCoordinatorFailoverTest.java @@ -18,6 +18,9 @@ package org.apache.ignite.internal.processors.cache.mvcc; import org.apache.ignite.cache.CacheMode; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.processors.cache.mvcc.CacheMvccAbstractTest.ReadMode.SCAN; import static org.apache.ignite.internal.processors.cache.mvcc.CacheMvccAbstractTest.ReadMode.SQL; @@ -28,6 +31,7 @@ /** * SQL Mvcc coordinator failover test for partitioned caches. */ +@RunWith(JUnit4.class) public class CacheMvccPartitionedSqlCoordinatorFailoverTest extends CacheMvccAbstractSqlCoordinatorFailoverTest { /** {@inheritDoc} */ @Override protected CacheMode cacheMode() { @@ -37,6 +41,7 @@ public class CacheMvccPartitionedSqlCoordinatorFailoverTest extends CacheMvccAbs /** * @throws Exception If failed. */ + @Test public void testAccountsTxSql_ClientServer_Backups2_CoordinatorFails() throws Exception { accountsTxReadAll(4, 2, 2, DFLT_PARTITION_COUNT, new InitIndexing(Integer.class, MvccTestAccount.class), true, SQL, DML, DFLT_TEST_TIME, RestartMode.RESTART_CRD); @@ -45,6 +50,7 @@ public void testAccountsTxSql_ClientServer_Backups2_CoordinatorFails() throws Ex /** * @throws Exception If failed. */ + @Test public void testAccountsTxSql_Server_Backups1_CoordinatorFails_Persistence() throws Exception { persistence = true; @@ -55,6 +61,7 @@ public void testAccountsTxSql_Server_Backups1_CoordinatorFails_Persistence() thr /** * @throws Exception If failed. */ + @Test public void testPutAllGetAll_ClientServer_Backups3_RestartCoordinator_ScanDml() throws Exception { putAllGetAll(RestartMode.RESTART_CRD , 5, 2, 3, DFLT_PARTITION_COUNT, new InitIndexing(Integer.class, Integer.class), SCAN, DML); @@ -63,6 +70,7 @@ public void testPutAllGetAll_ClientServer_Backups3_RestartCoordinator_ScanDml() /** * @throws Exception If failed. */ + @Test public void testPutAllGetAll_ClientServer_Backups1_RestartCoordinator_ScanDml_Persistence() throws Exception { persistence = true; @@ -73,6 +81,7 @@ public void testPutAllGetAll_ClientServer_Backups1_RestartCoordinator_ScanDml_Pe /** * @throws Exception If failed. */ + @Test public void testPutAllGetAll_ClientServer_Backups2_RestartCoordinator_SqlDml_Persistence() throws Exception { persistence = true; @@ -83,6 +92,7 @@ public void testPutAllGetAll_ClientServer_Backups2_RestartCoordinator_SqlDml_Per /** * @throws Exception If failed. */ + @Test public void testPutAllGetAll_ClientServer_Backups1_RestartCoordinator_SqlDml() throws Exception { putAllGetAll(RestartMode.RESTART_CRD, 2, 1, 1, 64, new InitIndexing(Integer.class, Integer.class), SQL, DML); @@ -91,6 +101,7 @@ public void testPutAllGetAll_ClientServer_Backups1_RestartCoordinator_SqlDml() t /** * @throws Exception If failed. */ + @Test public void testPutAllGetAll_ClientServer_Backups1_RestartRandomSrv_SqlDml() throws Exception { putAllGetAll(RestartMode.RESTART_RND_SRV, 3, 1, 1, DFLT_PARTITION_COUNT, new InitIndexing(Integer.class, Integer.class), SQL, DML); @@ -99,6 +110,7 @@ public void testPutAllGetAll_ClientServer_Backups1_RestartRandomSrv_SqlDml() thr /** * @throws Exception If failed. */ + @Test public void testPutAllGetAll_ClientServer_Backups2_RestartRandomSrv_SqlDml() throws Exception { putAllGetAll(RestartMode.RESTART_RND_SRV, 4, 1, 2, DFLT_PARTITION_COUNT, new InitIndexing(Integer.class, Integer.class), SQL, DML); @@ -107,6 +119,7 @@ public void testPutAllGetAll_ClientServer_Backups2_RestartRandomSrv_SqlDml() thr /** * @throws Exception If failed. */ + @Test public void testPutAllGetAll_Server_Backups2_RestartRandomSrv_SqlDml() throws Exception { putAllGetAll(RestartMode.RESTART_RND_SRV, 4, 0, 2, DFLT_PARTITION_COUNT, new InitIndexing(Integer.class, Integer.class), SQL, DML); @@ -115,6 +128,7 @@ public void testPutAllGetAll_Server_Backups2_RestartRandomSrv_SqlDml() throws Ex /** * @throws Exception If failed. */ + @Test public void testPutAllGetAll_Server_Backups1_SinglePartition_RestartRandomSrv_SqlDml() throws Exception { putAllGetAll(RestartMode.RESTART_RND_SRV, 4, 0, 1, 1, new InitIndexing(Integer.class, Integer.class), SQL, DML); @@ -123,6 +137,7 @@ public void testPutAllGetAll_Server_Backups1_SinglePartition_RestartRandomSrv_Sq /** * @throws Exception If failed. */ + @Test public void testPutAllGetAll_ClientServer_Backups1_SinglePartition_RestartRandomSrv_SqlDml() throws Exception { putAllGetAll(RestartMode.RESTART_RND_SRV, 3, 1, 1, 1, new InitIndexing(Integer.class, Integer.class), SQL, DML); @@ -131,6 +146,7 @@ public void testPutAllGetAll_ClientServer_Backups1_SinglePartition_RestartRandom /** * @throws Exception If failed. */ + @Test public void testUpdate_N_Objects_ClientServer_Backups2_Sql() throws Exception { updateNObjectsTest(7, 3, 2, 2, DFLT_PARTITION_COUNT, DFLT_TEST_TIME, new InitIndexing(Integer.class, Integer.class), SQL, DML, RestartMode.RESTART_CRD); @@ -139,6 +155,7 @@ public void testUpdate_N_Objects_ClientServer_Backups2_Sql() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUpdate_N_Objects_ClientServer_Backups1_Sql_Persistence() throws Exception { persistence = true; @@ -149,6 +166,7 @@ public void testUpdate_N_Objects_ClientServer_Backups1_Sql_Persistence() throws /** * @throws Exception If failed. */ + @Test public void testSqlReadInProgressCoordinatorFails() throws Exception { readInProgressCoordinatorFails(false, false, PESSIMISTIC, REPEATABLE_READ, SQL, DML, new InitIndexing(Integer.class, Integer.class)); } @@ -156,6 +174,7 @@ public void testSqlReadInProgressCoordinatorFails() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSqlReadInsideTxInProgressCoordinatorFails() throws Exception { readInProgressCoordinatorFails(false, true, PESSIMISTIC, REPEATABLE_READ, SQL, DML, new InitIndexing(Integer.class, Integer.class)); } @@ -163,6 +182,7 @@ public void testSqlReadInsideTxInProgressCoordinatorFails() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSqlReadInProgressCoordinatorFails_ReadDelay() throws Exception { readInProgressCoordinatorFails(true, false, PESSIMISTIC, REPEATABLE_READ, SQL, DML, new InitIndexing(Integer.class, Integer.class)); } @@ -170,6 +190,7 @@ public void testSqlReadInProgressCoordinatorFails_ReadDelay() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSqlReadInsideTxInProgressCoordinatorFails_ReadDelay() throws Exception { readInProgressCoordinatorFails(true, true, PESSIMISTIC, REPEATABLE_READ, SQL, DML, new InitIndexing(Integer.class, Integer.class)); } @@ -177,6 +198,7 @@ public void testSqlReadInsideTxInProgressCoordinatorFails_ReadDelay() throws Exc /** * @throws Exception If failed. */ + @Test public void testReadInProgressCoordinatorFailsSimple_FromServer() throws Exception { readInProgressCoordinatorFailsSimple(false, new InitIndexing(Integer.class, Integer.class), SQL, DML); } diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccPartitionedSqlTxQueriesWithReducerTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccPartitionedSqlTxQueriesWithReducerTest.java index b98715895f06b..86966c199f2f7 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccPartitionedSqlTxQueriesWithReducerTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccPartitionedSqlTxQueriesWithReducerTest.java @@ -25,20 +25,25 @@ import org.apache.ignite.cache.query.SqlFieldsQuery; import org.apache.ignite.internal.TestRecordingCommunicationSpi; import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsSingleMessage; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** */ +@RunWith(JUnit4.class) public class CacheMvccPartitionedSqlTxQueriesWithReducerTest extends CacheMvccSqlTxQueriesWithReducerAbstractTest { /** {@inheritDoc} */ - protected CacheMode cacheMode() { + @Override protected CacheMode cacheMode() { return PARTITIONED; } /** * @throws Exception If failed. */ + @Test public void testQueryUpdateOnUnstableTopologyDoesNotCauseDeadlock() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, CacheMvccSqlTxQueriesAbstractTest.MvccTestSqlIndexValue.class); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccReplicatedSqlTxQueriesTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccReplicatedSqlTxQueriesTest.java index bde2c5dd6d9e3..7dce522413e03 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccReplicatedSqlTxQueriesTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccReplicatedSqlTxQueriesTest.java @@ -28,6 +28,9 @@ import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.processors.query.GridQueryProcessor; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -36,9 +39,10 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ; /** */ +@RunWith(JUnit4.class) public class CacheMvccReplicatedSqlTxQueriesTest extends CacheMvccSqlTxQueriesAbstractTest { /** {@inheritDoc} */ - protected CacheMode cacheMode() { + @Override protected CacheMode cacheMode() { return REPLICATED; } @@ -53,6 +57,7 @@ protected CacheMode cacheMode() { /** * @throws Exception If failed. */ + @Test public void testReplicatedJoinPartitionedClient() throws Exception { checkReplicatedJoinPartitioned(true); } @@ -60,6 +65,7 @@ public void testReplicatedJoinPartitionedClient() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReplicatedJoinPartitionedServer() throws Exception { checkReplicatedJoinPartitioned(false); } @@ -144,6 +150,7 @@ public void checkReplicatedJoinPartitioned(boolean client) throws Exception { * * @throws Exception If failed. */ + @Test public void testReplicatedAndPartitionedUpdateSingleTransaction() throws Exception { ccfgs = new CacheConfiguration[] { cacheConfiguration(REPLICATED, FULL_SYNC, 0, DFLT_PARTITION_COUNT) diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSelectForUpdateQueryAbstractTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSelectForUpdateQueryAbstractTest.java index 0d3ff7e84d7ce..2bf0cec98df0a 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSelectForUpdateQueryAbstractTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSelectForUpdateQueryAbstractTest.java @@ -39,6 +39,9 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.internal.processors.cache.index.AbstractSchemaSelfTest.connect; @@ -47,6 +50,7 @@ /** * Test for {@code SELECT FOR UPDATE} queries. */ +@RunWith(JUnit4.class) public abstract class CacheMvccSelectForUpdateQueryAbstractTest extends CacheMvccAbstractTest { /** */ private static final int CACHE_SIZE = 50; @@ -96,6 +100,7 @@ public abstract class CacheMvccSelectForUpdateQueryAbstractTest extends CacheMvc /** * */ + @Test public void testSelectForUpdateDistributed() throws Exception { doTestSelectForUpdateDistributed("Person", false); } @@ -104,6 +109,7 @@ public void testSelectForUpdateDistributed() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSelectForUpdateLocal() throws Exception { doTestSelectForUpdateLocal("Person", false); } @@ -111,6 +117,7 @@ public void testSelectForUpdateLocal() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSelectForUpdateOutsideTxDistributed() throws Exception { doTestSelectForUpdateDistributed("Person", true); } @@ -118,6 +125,7 @@ public void testSelectForUpdateOutsideTxDistributed() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSelectForUpdateOutsideTxLocal() throws Exception { doTestSelectForUpdateLocal("Person", true); } @@ -193,6 +201,7 @@ void doTestSelectForUpdateDistributed(String cacheName, boolean outsideTx) throw /** * */ + @Test public void testSelectForUpdateWithUnion() { assertQueryThrows("select id from person union select 1 for update", "SELECT UNION FOR UPDATE is not supported."); @@ -201,6 +210,7 @@ public void testSelectForUpdateWithUnion() { /** * */ + @Test public void testSelectForUpdateWithJoin() { assertQueryThrows("select p1.id from person p1 join person p2 on p1.id = p2.id for update", "SELECT FOR UPDATE with joins is not supported."); @@ -209,6 +219,7 @@ public void testSelectForUpdateWithJoin() { /** * */ + @Test public void testSelectForUpdateWithLimit() { assertQueryThrows("select id from person limit 0,5 for update", "LIMIT/OFFSET clauses are not supported for SELECT FOR UPDATE."); @@ -217,6 +228,7 @@ public void testSelectForUpdateWithLimit() { /** * */ + @Test public void testSelectForUpdateWithGroupings() { assertQueryThrows("select count(*) from person for update", "SELECT FOR UPDATE with aggregates and/or GROUP BY is not supported."); @@ -228,6 +240,7 @@ public void testSelectForUpdateWithGroupings() { /** * @throws Exception If failed. */ + @Test public void testSelectForUpdateAfterAbortedTx() throws Exception { assert disableScheduledVacuum; diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSizeTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSizeTest.java index 36a23224e2044..acb3d34f21f6b 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSizeTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSizeTest.java @@ -34,12 +34,16 @@ import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.processors.cache.query.IgniteQueryErrorCode; import org.apache.ignite.internal.processors.query.IgniteSQLException; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CachePeekMode.BACKUP; /** * */ +@RunWith(JUnit4.class) public class CacheMvccSizeTest extends CacheMvccAbstractTest { /** {@inheritDoc} */ @Override protected CacheMode cacheMode() { @@ -100,6 +104,7 @@ private void checkSizeModificationByOperation(Consumer> before /** * @throws Exception if failed. */ + @Test public void testSql() throws Exception { startGridsMultiThreaded(2); @@ -215,6 +220,7 @@ public void testSql() throws Exception { /** * @throws Exception if failed. */ + @Test public void testInsertDeleteConcurrent() throws Exception { startGridsMultiThreaded(2); @@ -263,6 +269,7 @@ private int update(SqlFieldsQuery qry, IgniteCache cache) { /** * @throws Exception if failed. */ + @Test public void testWriteConflictDoesNotChangeSize() throws Exception { startGridsMultiThreaded(2); @@ -316,6 +323,7 @@ public void testWriteConflictDoesNotChangeSize() throws Exception { /** * @throws Exception if failed. */ + @Test public void testDeleteChangesSizeAfterUnlock() throws Exception { startGridsMultiThreaded(2); @@ -362,6 +370,7 @@ public void testDeleteChangesSizeAfterUnlock() throws Exception { /** * @throws Exception if failed. */ + @Test public void testDataStreamerModifiesReplicatedCacheSize() throws Exception { startGridsMultiThreaded(2); @@ -391,6 +400,7 @@ public void testDataStreamerModifiesReplicatedCacheSize() throws Exception { /** * @throws Exception if failed. */ + @Test public void testSizeIsConsistentAfterRebalance() throws Exception { IgniteEx ignite = startGrid(0); @@ -415,6 +425,7 @@ public void testSizeIsConsistentAfterRebalance() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSizeIsConsistentAfterRebalanceDuringInsert() throws Exception { IgniteEx ignite = startGrid(0); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlConfigurationValidationTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlConfigurationValidationTest.java index 7e6c9e884fff5..b10a847e50503 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlConfigurationValidationTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlConfigurationValidationTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Configuration validation for SQL configured caches. */ +@RunWith(JUnit4.class) public class CacheMvccSqlConfigurationValidationTest extends CacheMvccAbstractTest { /** {@inheritDoc} */ @Override protected CacheMode cacheMode() { @@ -39,6 +43,7 @@ public class CacheMvccSqlConfigurationValidationTest extends CacheMvccAbstractTe /** * @throws Exception If failed. */ + @Test public void testCacheGroupAtomicityModeMismatch1() throws Exception { Ignite node = startGrid(); @@ -62,6 +67,7 @@ public void testCacheGroupAtomicityModeMismatch1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheGroupAtomicityModeMismatch2() throws Exception { Ignite node = startGrid(); @@ -84,6 +90,7 @@ public void testCacheGroupAtomicityModeMismatch2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTxDifferentMvccSettingsTransactional() throws Exception { ccfg = defaultCacheConfiguration().setSqlSchema("PUBLIC"); Ignite node = startGrid(); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlLockTimeoutTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlLockTimeoutTest.java index bdd9a762e3a57..5cc6efebdb677 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlLockTimeoutTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlLockTimeoutTest.java @@ -34,6 +34,9 @@ import org.apache.ignite.configuration.TransactionConfiguration; import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -41,6 +44,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ; /** */ +@RunWith(JUnit4.class) public class CacheMvccSqlLockTimeoutTest extends CacheMvccAbstractTest { /** */ private static final int TIMEOUT_MILLIS = 200; @@ -61,6 +65,7 @@ public class CacheMvccSqlLockTimeoutTest extends CacheMvccAbstractTest { /** * @throws Exception if failed. */ + @Test public void testLockTimeoutsForPartitionedCache() throws Exception { checkLockTimeouts(partitionedCacheConfig()); } @@ -68,6 +73,7 @@ public void testLockTimeoutsForPartitionedCache() throws Exception { /** * @throws Exception if failed. */ + @Test public void testLockTimeoutsForReplicatedCache() throws Exception { checkLockTimeouts(replicatedCacheConfig()); } @@ -75,6 +81,7 @@ public void testLockTimeoutsForReplicatedCache() throws Exception { /** * @throws Exception if failed. */ + @Test public void testLockTimeoutsAfterDefaultTxTimeoutForPartitionedCache() throws Exception { checkLockTimeoutsAfterDefaultTxTimeout(partitionedCacheConfig()); } @@ -82,6 +89,7 @@ public void testLockTimeoutsAfterDefaultTxTimeoutForPartitionedCache() throws Ex /** * @throws Exception if failed. */ + @Test public void testLockTimeoutsAfterDefaultTxTimeoutForReplicatedCache() throws Exception { checkLockTimeoutsAfterDefaultTxTimeout(replicatedCacheConfig()); } @@ -89,6 +97,7 @@ public void testLockTimeoutsAfterDefaultTxTimeoutForReplicatedCache() throws Exc /** * @throws Exception if failed. */ + @Test public void testConcurrentForPartitionedCache() throws Exception { checkTimeoutsConcurrent(partitionedCacheConfig()); } @@ -96,6 +105,7 @@ public void testConcurrentForPartitionedCache() throws Exception { /** * @throws Exception if failed. */ + @Test public void testConcurrentForReplicatedCache() throws Exception { checkTimeoutsConcurrent(replicatedCacheConfig()); } diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlQueriesAbstractTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlQueriesAbstractTest.java index 313b58f594ea8..5d81753ea81de 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlQueriesAbstractTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlQueriesAbstractTest.java @@ -42,6 +42,9 @@ import org.apache.ignite.internal.util.typedef.internal.S; import org.apache.ignite.lang.IgniteInClosure; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; import static org.apache.ignite.internal.processors.cache.mvcc.CacheMvccAbstractTest.ReadMode.SQL; @@ -57,10 +60,12 @@ * TODO IGNITE-6739: dynamic index create. */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public abstract class CacheMvccSqlQueriesAbstractTest extends CacheMvccAbstractTest { /** * @throws Exception If failed. */ + @Test public void testAccountsTxSql_SingleNode_SinglePartition() throws Exception { accountsTxReadAll(1, 0, 0, 1, new InitIndexing(Integer.class, MvccTestAccount.class), false, SQL, PUT); @@ -69,6 +74,7 @@ public void testAccountsTxSql_SingleNode_SinglePartition() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAccountsTxSql_WithRemoves_SingleNode_SinglePartition() throws Exception { accountsTxReadAll(1, 0, 0, 1, new InitIndexing(Integer.class, MvccTestAccount.class), true, SQL, PUT); @@ -77,6 +83,7 @@ public void testAccountsTxSql_WithRemoves_SingleNode_SinglePartition() throws Ex /** * @throws Exception If failed. */ + @Test public void testAccountsTxSql_SingleNode() throws Exception { accountsTxReadAll(1, 0, 0, 64, new InitIndexing(Integer.class, MvccTestAccount.class), false, SQL, PUT); @@ -85,6 +92,7 @@ public void testAccountsTxSql_SingleNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAccountsTxSql_SingleNode_Persistence() throws Exception { persistence = true; @@ -94,6 +102,7 @@ public void testAccountsTxSql_SingleNode_Persistence() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAccountsTxSumSql_SingleNode() throws Exception { accountsTxReadAll(1, 0, 0, 64, new InitIndexing(Integer.class, MvccTestAccount.class), false, SQL_SUM, PUT); @@ -102,6 +111,7 @@ public void testAccountsTxSumSql_SingleNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAccountsTxSql_WithRemoves_SingleNode() throws Exception { accountsTxReadAll(1, 0, 0, 64, new InitIndexing(Integer.class, MvccTestAccount.class), true, SQL, PUT); @@ -110,6 +120,7 @@ public void testAccountsTxSql_WithRemoves_SingleNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAccountsTxSql_WithRemoves_SingleNode_Persistence() throws Exception { persistence = true; @@ -119,6 +130,7 @@ public void testAccountsTxSql_WithRemoves_SingleNode_Persistence() throws Except /** * @throws Exception If failed. */ + @Test public void testAccountsTxSql_ClientServer_Backups2() throws Exception { accountsTxReadAll(4, 2, 2, 64, new InitIndexing(Integer.class, MvccTestAccount.class), false, SQL, PUT); @@ -127,6 +139,7 @@ public void testAccountsTxSql_ClientServer_Backups2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUpdateSingleValue_SingleNode() throws Exception { updateSingleValue(true, false); } @@ -134,6 +147,7 @@ public void testUpdateSingleValue_SingleNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUpdateSingleValue_LocalQuery_SingleNode() throws Exception { updateSingleValue(true, true); } @@ -141,6 +155,7 @@ public void testUpdateSingleValue_LocalQuery_SingleNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUpdateSingleValue_ClientServer() throws Exception { updateSingleValue(false, false); } @@ -355,6 +370,7 @@ private void updateSingleValue(boolean singleNode, final boolean locQry) throws /** * @throws Exception If failed. */ + @Test public void testJoinTransactional_SingleNode() throws Exception { joinTransactional(true, false); } @@ -362,6 +378,7 @@ public void testJoinTransactional_SingleNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testJoinTransactional_ClientServer() throws Exception { joinTransactional(false, false); } @@ -369,6 +386,7 @@ public void testJoinTransactional_ClientServer() throws Exception { /** * @throws Exception If failed. */ + @Test public void testJoinTransactional_DistributedJoins_ClientServer() throws Exception { joinTransactional(false, true); } @@ -524,6 +542,7 @@ private void joinTransactional(boolean singleNode, final boolean distributedJoin /** * @throws Exception If failed. */ + @Test public void testJoinTransactional_DistributedJoins_ClientServer2() throws Exception { final int KEYS = 100; @@ -632,6 +651,7 @@ public void testJoinTransactional_DistributedJoins_ClientServer2() throws Except /** * @throws Exception If failed. */ + @Test public void testDistributedJoinSimple() throws Exception { startGridsMultiThreaded(4); @@ -693,6 +713,7 @@ public void testDistributedJoinSimple() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheRecreate() throws Exception { cacheRecreate(new InitIndexing(Integer.class, MvccTestAccount.class)); } @@ -700,6 +721,7 @@ public void testCacheRecreate() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheRecreateChangeIndexedType() throws Exception { Ignite srv0 = startGrid(0); @@ -775,6 +797,7 @@ public void testCacheRecreateChangeIndexedType() throws Exception { /** * @throws Exception If failed. */ + @Test public void testChangeValueType1() throws Exception { Ignite srv0 = startGrid(0); @@ -802,6 +825,7 @@ public void testChangeValueType1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testChangeValueType2() throws Exception { Ignite srv0 = startGrid(0); @@ -833,6 +857,7 @@ public void testChangeValueType2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCountTransactional_SingleNode() throws Exception { countTransactional(true); } @@ -840,6 +865,7 @@ public void testCountTransactional_SingleNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCountTransactional_ClientServer() throws Exception { countTransactional(false); } @@ -979,6 +1005,7 @@ private void countTransactional(boolean singleNode) throws Exception { /** * @throws Exception If failed. */ + @Test public void testMaxMinTransactional_SingleNode() throws Exception { maxMinTransactional(true); } @@ -986,6 +1013,7 @@ public void testMaxMinTransactional_SingleNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMaxMinTransactional_ClientServer() throws Exception { maxMinTransactional(false); } @@ -1140,6 +1168,7 @@ private void maxMinTransactional(boolean singleNode) throws Exception { /** * @throws Exception If failed. */ + @Test public void testSqlQueriesWithMvcc() throws Exception { Ignite srv0 = startGrid(0); @@ -1243,6 +1272,7 @@ private void checkSingleResult(IgniteCache cache, SqlFieldsQuery qry, Object exp /** * @throws Exception If failed. */ + @Test public void testSqlSimple() throws Exception { startGrid(0); @@ -1310,6 +1340,7 @@ private void sqlSimple(int inlineSize) throws Exception { /** * @throws Exception If failed. */ + @Test public void testSqlSimplePutRemoveRandom() throws Exception { startGrid(0); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlTxQueriesAbstractTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlTxQueriesAbstractTest.java index 62cd5b5e499e6..d66af27058a48 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlTxQueriesAbstractTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlTxQueriesAbstractTest.java @@ -62,6 +62,9 @@ import org.apache.ignite.lang.IgniteBiTuple; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; import static org.apache.ignite.internal.processors.cache.mvcc.CacheMvccAbstractTest.ReadMode.SQL; @@ -75,10 +78,12 @@ /** * Tests for transactional SQL. */ +@RunWith(JUnit4.class) public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstractTest { /** * @throws Exception If failed. */ + @Test public void testAccountsTxDmlSql_SingleNode_SinglePartition() throws Exception { accountsTxReadAll(1, 0, 0, 1, new InitIndexing(Integer.class, MvccTestAccount.class), false, SQL, DML); @@ -87,6 +92,7 @@ public void testAccountsTxDmlSql_SingleNode_SinglePartition() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAccountsTxDmlSql_WithRemoves_SingleNode_SinglePartition() throws Exception { accountsTxReadAll(1, 0, 0, 1, new InitIndexing(Integer.class, MvccTestAccount.class), true, SQL, DML); @@ -95,6 +101,7 @@ public void testAccountsTxDmlSql_WithRemoves_SingleNode_SinglePartition() throws /** * @throws Exception If failed. */ + @Test public void testAccountsTxDmlSql_SingleNode() throws Exception { accountsTxReadAll(1, 0, 0, 64, new InitIndexing(Integer.class, MvccTestAccount.class), false, SQL, DML); @@ -103,6 +110,7 @@ public void testAccountsTxDmlSql_SingleNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAccountsTxDmlSql_SingleNode_Persistence() throws Exception { persistence = true; @@ -112,6 +120,7 @@ public void testAccountsTxDmlSql_SingleNode_Persistence() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAccountsTxDmlSumSql_SingleNode() throws Exception { accountsTxReadAll(1, 0, 0, 64, new InitIndexing(Integer.class, MvccTestAccount.class), false, SQL_SUM, DML); @@ -120,6 +129,7 @@ public void testAccountsTxDmlSumSql_SingleNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAccountsTxDmlSumSql_WithRemoves_SingleNode() throws Exception { accountsTxReadAll(1, 0, 0, 64, new InitIndexing(Integer.class, MvccTestAccount.class), true, SQL_SUM, DML); @@ -128,6 +138,7 @@ public void testAccountsTxDmlSumSql_WithRemoves_SingleNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAccountsTxDmlSumSql_WithRemoves__ClientServer_Backups0() throws Exception { accountsTxReadAll(4, 2, 0, 64, new InitIndexing(Integer.class, MvccTestAccount.class), true, SQL_SUM, DML); @@ -136,6 +147,7 @@ public void testAccountsTxDmlSumSql_WithRemoves__ClientServer_Backups0() throws /** * @throws Exception If failed. */ + @Test public void testAccountsTxDmlSumSql_ClientServer_Backups2() throws Exception { accountsTxReadAll(4, 2, 2, 64, new InitIndexing(Integer.class, MvccTestAccount.class), true, SQL_SUM, DML); @@ -144,6 +156,7 @@ public void testAccountsTxDmlSumSql_ClientServer_Backups2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAccountsTxDmlSql_WithRemoves_SingleNode() throws Exception { accountsTxReadAll(1, 0, 0, 64, new InitIndexing(Integer.class, MvccTestAccount.class), true, SQL, DML); @@ -152,6 +165,7 @@ public void testAccountsTxDmlSql_WithRemoves_SingleNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAccountsTxDmlSql_WithRemoves_SingleNode_Persistence() throws Exception { persistence = true; @@ -161,6 +175,7 @@ public void testAccountsTxDmlSql_WithRemoves_SingleNode_Persistence() throws Exc /** * @throws Exception If failed. */ + @Test public void testAccountsTxDmlSql_ClientServer_Backups0() throws Exception { accountsTxReadAll(4, 2, 0, 64, new InitIndexing(Integer.class, MvccTestAccount.class), false, SQL, DML); @@ -169,6 +184,7 @@ public void testAccountsTxDmlSql_ClientServer_Backups0() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAccountsTxDmlSql_WithRemoves_ClientServer_Backups0() throws Exception { accountsTxReadAll(4, 2, 0, 64, new InitIndexing(Integer.class, MvccTestAccount.class), true, SQL, DML); @@ -177,6 +193,7 @@ public void testAccountsTxDmlSql_WithRemoves_ClientServer_Backups0() throws Exce /** * @throws Exception If failed. */ + @Test public void testAccountsTxDmlSql_WithRemoves_ClientServer_Backups0_Persistence() throws Exception { persistence = true; @@ -186,6 +203,7 @@ public void testAccountsTxDmlSql_WithRemoves_ClientServer_Backups0_Persistence() /** * @throws Exception If failed. */ + @Test public void testAccountsTxDmlSql_ClientServer_Backups1() throws Exception { accountsTxReadAll(3, 0, 1, 64, new InitIndexing(Integer.class, MvccTestAccount.class), false, SQL, DML); @@ -194,6 +212,7 @@ public void testAccountsTxDmlSql_ClientServer_Backups1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAccountsTxDmlSql_WithRemoves_ClientServer_Backups1() throws Exception { accountsTxReadAll(4, 2, 1, 64, new InitIndexing(Integer.class, MvccTestAccount.class), true, SQL, DML); @@ -202,6 +221,7 @@ public void testAccountsTxDmlSql_WithRemoves_ClientServer_Backups1() throws Exce /** * @throws Exception If failed. */ + @Test public void testAccountsTxDmlSql_WithRemoves_ClientServer_Backups1_Persistence() throws Exception { persistence = true; @@ -211,6 +231,7 @@ public void testAccountsTxDmlSql_WithRemoves_ClientServer_Backups1_Persistence() /** * @throws Exception If failed. */ + @Test public void testAccountsTxDmlSql_ClientServer_Backups2() throws Exception { accountsTxReadAll(4, 2, 2, 64, new InitIndexing(Integer.class, MvccTestAccount.class), false, SQL, DML); @@ -219,6 +240,7 @@ public void testAccountsTxDmlSql_ClientServer_Backups2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAccountsTxDmlSql_WithRemoves_ClientServer_Backups2() throws Exception { accountsTxReadAll(4, 2, 2, 64, new InitIndexing(Integer.class, MvccTestAccount.class), true, SQL, DML); @@ -227,6 +249,7 @@ public void testAccountsTxDmlSql_WithRemoves_ClientServer_Backups2() throws Exce /** * @throws Exception If failed. */ + @Test public void testAccountsTxDmlSql_ClientServer_Backups2_Persistence() throws Exception { persistence = true; @@ -236,6 +259,7 @@ public void testAccountsTxDmlSql_ClientServer_Backups2_Persistence() throws Exce /** * @throws Exception If failed. */ + @Test public void testParsingErrorHasNoSideEffect() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 0, 4) .setIndexedTypes(Integer.class, Integer.class); @@ -283,6 +307,7 @@ public void testParsingErrorHasNoSideEffect() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryInsertStaticCache() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); @@ -328,6 +353,7 @@ public void testQueryInsertStaticCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryInsertStaticCacheImplicit() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); @@ -358,6 +384,7 @@ public void testQueryInsertStaticCacheImplicit() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryDeleteStaticCache() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); @@ -404,6 +431,7 @@ public void testQueryDeleteStaticCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryFastDeleteStaticCache() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); @@ -449,6 +477,7 @@ public void testQueryFastDeleteStaticCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryFastUpdateStaticCache() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); @@ -494,6 +523,7 @@ public void testQueryFastUpdateStaticCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryFastDeleteObjectStaticCache() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, MvccTestSqlIndexValue.class); @@ -538,6 +568,7 @@ public void testQueryFastDeleteObjectStaticCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryFastUpdateObjectStaticCache() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, MvccTestSqlIndexValue.class); @@ -582,6 +613,7 @@ public void testQueryFastUpdateObjectStaticCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryDeleteStaticCacheImplicit() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); @@ -618,6 +650,7 @@ public void testQueryDeleteStaticCacheImplicit() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryUpdateStaticCache() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); @@ -659,6 +692,7 @@ public void testQueryUpdateStaticCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryUpdateStaticCacheImplicit() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); @@ -695,6 +729,7 @@ public void testQueryUpdateStaticCacheImplicit() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryDeadlockWithTxTimeout() throws Exception { checkQueryDeadlock(TimeoutMode.TX); } @@ -702,6 +737,7 @@ public void testQueryDeadlockWithTxTimeout() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryDeadlockWithStmtTimeout() throws Exception { checkQueryDeadlock(TimeoutMode.STMT); } @@ -785,6 +821,7 @@ private void checkQueryDeadlock(TimeoutMode timeoutMode) throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryDeadlockImplicit() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 0, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); @@ -853,6 +890,7 @@ public void testQueryDeadlockImplicit() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryInsertClient() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); @@ -902,6 +940,7 @@ public void testQueryInsertClient() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryInsertClientImplicit() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); @@ -936,6 +975,7 @@ public void testQueryInsertClientImplicit() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryInsertSubquery() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class, Integer.class, MvccTestSqlIndexValue.class); @@ -979,6 +1019,7 @@ public void testQueryInsertSubquery() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryInsertSubqueryImplicit() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class, Integer.class, MvccTestSqlIndexValue.class); @@ -1017,6 +1058,7 @@ public void testQueryInsertSubqueryImplicit() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryUpdateSubquery() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class, Integer.class, MvccTestSqlIndexValue.class); @@ -1060,6 +1102,7 @@ public void testQueryUpdateSubquery() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryUpdateSubqueryImplicit() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class, Integer.class, MvccTestSqlIndexValue.class); @@ -1098,6 +1141,7 @@ public void testQueryUpdateSubqueryImplicit() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryInsertMultithread() throws Exception { final int THREAD_CNT = 8; final int BATCH_SIZE = 1000; @@ -1165,6 +1209,7 @@ public void testQueryInsertMultithread() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryInsertUpdateMultithread() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-9470"); @@ -1274,6 +1319,7 @@ public Void process(MutableEntry entry, /** * @throws Exception If failed. */ + @Test public void testQueryInsertVersionConflict() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); @@ -1339,6 +1385,7 @@ public void testQueryInsertVersionConflict() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInsertAndFastDeleteWithoutVersionConflict() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); @@ -1369,6 +1416,7 @@ public void testInsertAndFastDeleteWithoutVersionConflict() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInsertAndFastUpdateWithoutVersionConflict() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); @@ -1399,6 +1447,7 @@ public void testInsertAndFastUpdateWithoutVersionConflict() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInsertFastUpdateConcurrent() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-9292"); @@ -1432,6 +1481,7 @@ public void testInsertFastUpdateConcurrent() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryInsertRollback() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); @@ -1472,6 +1522,7 @@ public void testQueryInsertRollback() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryInsertUpdateSameKeys() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); @@ -1513,6 +1564,7 @@ public void testQueryInsertUpdateSameKeys() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryInsertUpdateSameKeysInSameOperation() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); @@ -1545,6 +1597,7 @@ public void testQueryInsertUpdateSameKeysInSameOperation() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryPendingUpdates() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); @@ -1613,6 +1666,7 @@ public void testQueryPendingUpdates() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSelectProducesTransaction() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, MvccTestSqlIndexValue.class); @@ -1647,6 +1701,7 @@ public void testSelectProducesTransaction() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRepeatableRead() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, MvccTestSqlIndexValue.class); @@ -1698,6 +1753,7 @@ public void testRepeatableRead() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFastInsertUpdateConcurrent() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); @@ -1722,6 +1778,7 @@ public void testFastInsertUpdateConcurrent() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIterator() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); @@ -1792,6 +1849,7 @@ public void testIterator() throws Exception { /** * @throws Exception If failed. */ + @Test public void testHints() throws Exception { persistence = true; diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlTxQueriesWithReducerAbstractTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlTxQueriesWithReducerAbstractTest.java index 7826e5fa13b87..e6b0fd7aa2c6a 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlTxQueriesWithReducerAbstractTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlTxQueriesWithReducerAbstractTest.java @@ -39,6 +39,9 @@ import org.apache.ignite.internal.util.typedef.X; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; import static org.apache.ignite.testframework.GridTestUtils.assertThrowsWithCause; @@ -49,6 +52,7 @@ /** * Tests for transactional SQL. */ +@RunWith(JUnit4.class) public abstract class CacheMvccSqlTxQueriesWithReducerAbstractTest extends CacheMvccAbstractTest { /** */ private static final int TIMEOUT = 3000; @@ -64,6 +68,7 @@ public abstract class CacheMvccSqlTxQueriesWithReducerAbstractTest extends Cache /** * @throws Exception If failed. */ + @Test public void testQueryReducerInsert() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, CacheMvccSqlTxQueriesAbstractTest.MvccTestSqlIndexValue.class); @@ -117,6 +122,7 @@ public void testQueryReducerInsert() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryReducerInsertDuplicateKey() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, CacheMvccSqlTxQueriesAbstractTest.MvccTestSqlIndexValue.class); @@ -165,6 +171,7 @@ public void testQueryReducerInsertDuplicateKey() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryReducerMerge() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, CacheMvccSqlTxQueriesAbstractTest.MvccTestSqlIndexValue.class); @@ -217,6 +224,7 @@ public void testQueryReducerMerge() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryReducerMultiBatchPerNodeServer() throws Exception { checkMultiBatchPerNode(false); } @@ -224,6 +232,7 @@ public void testQueryReducerMultiBatchPerNodeServer() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryReducerMultiBatchPerNodeClient() throws Exception { checkMultiBatchPerNode(true); } @@ -292,6 +301,7 @@ private void checkMultiBatchPerNode(boolean client) throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryReducerDelete() throws Exception { ccfgs = new CacheConfiguration[] { cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) @@ -343,6 +353,7 @@ public void testQueryReducerDelete() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryReducerUpdate() throws Exception { ccfgs = new CacheConfiguration[] { cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) @@ -395,6 +406,7 @@ public void testQueryReducerUpdate() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryReducerImplicitTxInsert() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, CacheMvccSqlTxQueriesAbstractTest.MvccTestSqlIndexValue.class); @@ -444,6 +456,7 @@ public void testQueryReducerImplicitTxInsert() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryReducerRollbackInsert() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, CacheMvccSqlTxQueriesAbstractTest.MvccTestSqlIndexValue.class); @@ -506,6 +519,7 @@ private List sqlGet(int key, IgniteCache cache) { /** * @throws Exception If failed. */ + @Test public void testQueryReducerDeadlockInsertWithTxTimeout() throws Exception { checkQueryReducerDeadlockInsert(TimeoutMode.TX); } @@ -513,6 +527,7 @@ public void testQueryReducerDeadlockInsertWithTxTimeout() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryReducerDeadlockInsertWithStmtTimeout() throws Exception { checkQueryReducerDeadlockInsert(TimeoutMode.STMT); } @@ -612,6 +627,7 @@ public void checkQueryReducerDeadlockInsert(TimeoutMode timeoutMode) throws Exce /** * @throws Exception If failed. */ + @Test public void testQueryReducerInsertVersionConflict() throws Exception { ccfgs = new CacheConfiguration[] { cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) @@ -686,6 +702,7 @@ public void testQueryReducerInsertVersionConflict() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryReducerInsertValues() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, CacheMvccSqlTxQueriesAbstractTest.MvccTestSqlIndexValue.class); @@ -723,6 +740,7 @@ public void testQueryReducerInsertValues() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryReducerMergeValues() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, CacheMvccSqlTxQueriesAbstractTest.MvccTestSqlIndexValue.class); @@ -763,6 +781,7 @@ public void testQueryReducerMergeValues() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryReducerFastUpdate() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); @@ -804,6 +823,7 @@ public void testQueryReducerFastUpdate() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryReducerFastDelete() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, CacheMvccSqlTxQueriesAbstractTest.MvccTestSqlIndexValue.class); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlUpdateCountersTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlUpdateCountersTest.java index 943f5a42afe52..3b5f8e447e1e1 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlUpdateCountersTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlUpdateCountersTest.java @@ -36,6 +36,9 @@ import org.apache.ignite.internal.util.typedef.G; import org.apache.ignite.lang.IgniteInClosure; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; import static org.apache.ignite.internal.processors.cache.mvcc.CacheMvccAbstractTest.ReadMode.SQL; @@ -46,6 +49,7 @@ * Test for MVCC caches update counters behaviour. */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class CacheMvccSqlUpdateCountersTest extends CacheMvccAbstractTest { /** {@inheritDoc} */ @Override protected CacheMode cacheMode() { @@ -55,6 +59,7 @@ public class CacheMvccSqlUpdateCountersTest extends CacheMvccAbstractTest { /** * @throws Exception If failed. */ + @Test public void testUpdateCountersInsertSimple() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); @@ -93,6 +98,7 @@ public void testUpdateCountersInsertSimple() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUpdateCountersDoubleUpdate() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); @@ -139,6 +145,7 @@ public void testUpdateCountersDoubleUpdate() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUpdateCountersRollback() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); @@ -185,6 +192,7 @@ public void testUpdateCountersRollback() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeleteOwnKey() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, 1) .setCacheMode(CacheMode.REPLICATED) @@ -320,6 +328,7 @@ public void testDeleteOwnKey() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUpdateCountersMultithreaded() throws Exception { final int writers = 4; diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccStreamingInsertTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccStreamingInsertTest.java index b07a187a579af..e0415b8c55a64 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccStreamingInsertTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccStreamingInsertTest.java @@ -29,12 +29,16 @@ import org.apache.ignite.cache.CacheMode; import org.apache.ignite.cache.query.SqlFieldsQuery; import org.apache.ignite.configuration.CacheConfiguration; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.Arrays.asList; /** * */ +@RunWith(JUnit4.class) public class CacheMvccStreamingInsertTest extends CacheMvccAbstractTest { /** */ private IgniteCache sqlNexus; @@ -68,6 +72,7 @@ public class CacheMvccStreamingInsertTest extends CacheMvccAbstractTest { /** * @throws Exception If failed. */ + @Test public void testStreamingInsertWithoutOverwrite() throws Exception { conn.createStatement().execute("SET STREAMING 1 BATCH_SIZE 2 ALLOW_OVERWRITE 0 " + " PER_NODE_BUFFER_SIZE 1000 FLUSH_FREQUENCY 100"); @@ -93,6 +98,7 @@ public void testStreamingInsertWithoutOverwrite() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUpdateWithOverwrite() throws Exception { conn.createStatement().execute("SET STREAMING 1 BATCH_SIZE 2 ALLOW_OVERWRITE 1 " + " PER_NODE_BUFFER_SIZE 1000 FLUSH_FREQUENCY 100"); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTxNodeMappingTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTxNodeMappingTest.java index a329609447efd..6df21437a54d8 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTxNodeMappingTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTxNodeMappingTest.java @@ -39,6 +39,9 @@ import org.apache.ignite.internal.processors.cache.transactions.TransactionProxyImpl; import org.apache.ignite.internal.processors.cache.version.GridCacheVersion; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -48,6 +51,7 @@ /** * Test checks that transactions started on nodes collect all nodes participating in distributed transaction. */ +@RunWith(JUnit4.class) public class CacheMvccTxNodeMappingTest extends CacheMvccAbstractTest { /** {@inheritDoc} */ @Override protected CacheMode cacheMode() { @@ -57,6 +61,7 @@ public class CacheMvccTxNodeMappingTest extends CacheMvccAbstractTest { /** * @throws Exception if failed. */ + @Test public void testAllTxNodesAreTrackedCli() throws Exception { checkAllTxNodesAreTracked(false); } @@ -64,6 +69,7 @@ public void testAllTxNodesAreTrackedCli() throws Exception { /** * @throws Exception if failed. */ + @Test public void testAllTxNodesAreTrackedSrv() throws Exception { checkAllTxNodesAreTracked(true); } diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTxRecoveryTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTxRecoveryTest.java index 01f50cc4801b5..61f63954d9a48 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTxRecoveryTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTxRecoveryTest.java @@ -54,6 +54,9 @@ import org.apache.ignite.plugin.extensions.communication.Message; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -69,6 +72,7 @@ import static org.apache.ignite.transactions.TransactionState.ROLLED_BACK; /** */ +@RunWith(JUnit4.class) public class CacheMvccTxRecoveryTest extends CacheMvccAbstractTest { /** */ public enum TxEndResult { @@ -99,6 +103,7 @@ public enum NodeMode { /** * @throws Exception if failed. */ + @Test public void testRecoveryCommitNearFailure1() throws Exception { checkRecoveryNearFailure(COMMIT, CLIENT); } @@ -106,6 +111,7 @@ public void testRecoveryCommitNearFailure1() throws Exception { /** * @throws Exception if failed. */ + @Test public void testRecoveryCommitNearFailure2() throws Exception { checkRecoveryNearFailure(COMMIT, SERVER); } @@ -113,6 +119,7 @@ public void testRecoveryCommitNearFailure2() throws Exception { /** * @throws Exception if failed. */ + @Test public void testRecoveryRollbackNearFailure1() throws Exception { checkRecoveryNearFailure(ROLLBAK, CLIENT); } @@ -120,6 +127,7 @@ public void testRecoveryRollbackNearFailure1() throws Exception { /** * @throws Exception if failed. */ + @Test public void testRecoveryRollbackNearFailure2() throws Exception { checkRecoveryNearFailure(ROLLBAK, SERVER); } @@ -127,6 +135,7 @@ public void testRecoveryRollbackNearFailure2() throws Exception { /** * @throws Exception if failed. */ + @Test public void testRecoveryCommitPrimaryFailure1() throws Exception { checkRecoveryPrimaryFailure(COMMIT, false); } @@ -134,6 +143,7 @@ public void testRecoveryCommitPrimaryFailure1() throws Exception { /** * @throws Exception if failed. */ + @Test public void testRecoveryRollbackPrimaryFailure1() throws Exception { checkRecoveryPrimaryFailure(ROLLBAK, false); } @@ -141,6 +151,7 @@ public void testRecoveryRollbackPrimaryFailure1() throws Exception { /** * @throws Exception if failed. */ + @Test public void testRecoveryCommitPrimaryFailure2() throws Exception { checkRecoveryPrimaryFailure(COMMIT, true); } @@ -148,6 +159,7 @@ public void testRecoveryCommitPrimaryFailure2() throws Exception { /** * @throws Exception if failed. */ + @Test public void testRecoveryRollbackPrimaryFailure2() throws Exception { checkRecoveryPrimaryFailure(ROLLBAK, true); } @@ -344,6 +356,7 @@ private void checkRecoveryPrimaryFailure(TxEndResult endRes, boolean mvccCrd) th /** * @throws Exception if failed. */ + @Test public void testRecoveryCommit() throws Exception { startGridsMultiThreaded(2); @@ -387,6 +400,7 @@ public void testRecoveryCommit() throws Exception { /** * @throws Exception if failed. */ + @Test public void testCountersNeighborcastServerFailed() throws Exception { int srvCnt = 4; @@ -493,6 +507,7 @@ public void testCountersNeighborcastServerFailed() throws Exception { /** * @throws Exception if failed. */ + @Test public void testUpdateCountersGapIsClosed() throws Exception { int srvCnt = 3; diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccRepeatableReadBulkOpsTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccRepeatableReadBulkOpsTest.java index fef84870196f6..0f4b918f763cc 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccRepeatableReadBulkOpsTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccRepeatableReadBulkOpsTest.java @@ -44,6 +44,9 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; import static org.apache.ignite.internal.processors.cache.mvcc.CacheMvccAbstractTest.ReadMode.GET; @@ -55,6 +58,7 @@ /** * Test basic mvcc bulk cache operations. */ +@RunWith(JUnit4.class) public class MvccRepeatableReadBulkOpsTest extends CacheMvccAbstractTest { /** {@inheritDoc} */ @Override protected CacheMode cacheMode() { @@ -102,6 +106,7 @@ private int nodesCount() { /** * @throws Exception If failed. */ + @Test public void testRepeatableReadIsolationGetPut() throws Exception { checkOperations(GET, GET, PUT, true); checkOperations(GET, GET, PUT, false); @@ -110,6 +115,7 @@ public void testRepeatableReadIsolationGetPut() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRepeatableReadIsolationInvoke() throws Exception { checkOperations(GET, GET, WriteMode.INVOKE, true); checkOperations(GET, GET, WriteMode.INVOKE, false); @@ -118,6 +124,7 @@ public void testRepeatableReadIsolationInvoke() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRepeatableReadIsolationSqlPut() throws Exception { checkOperations(SQL, SQL, PUT, true); checkOperations(SQL, SQL, PUT, false); @@ -126,6 +133,7 @@ public void testRepeatableReadIsolationSqlPut() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRepeatableReadIsolationSqlInvoke() throws Exception { checkOperations(SQL, SQL, WriteMode.INVOKE, true); checkOperations(SQL, SQL, WriteMode.INVOKE, false); @@ -134,6 +142,7 @@ public void testRepeatableReadIsolationSqlInvoke() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRepeatableReadIsolationSqlDml() throws Exception { checkOperations(SQL, SQL, DML, true); checkOperations(SQL, SQL, DML, false); @@ -142,6 +151,7 @@ public void testRepeatableReadIsolationSqlDml() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRepeatableReadIsolationGetDml() throws Exception { checkOperations(GET, GET, DML, true); checkOperations(GET, GET, DML, false); @@ -150,6 +160,7 @@ public void testRepeatableReadIsolationGetDml() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRepeatableReadIsolationMixedPut() throws Exception { checkOperations(SQL, GET, PUT, false); checkOperations(SQL, GET, PUT, true); @@ -160,6 +171,7 @@ public void testRepeatableReadIsolationMixedPut() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRepeatableReadIsolationMixedPut2() throws Exception { checkOperations(GET, SQL, PUT, false); checkOperations(GET, SQL, PUT, true); @@ -170,6 +182,7 @@ public void testRepeatableReadIsolationMixedPut2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRepeatableReadIsolationMixedDml() throws Exception { checkOperations(SQL, GET, DML, false); checkOperations(SQL, GET, DML, true); @@ -178,6 +191,7 @@ public void testRepeatableReadIsolationMixedDml() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRepeatableReadIsolationMixedDml2() throws Exception { checkOperations(GET, SQL, DML, false); checkOperations(GET, SQL, DML, true); @@ -186,6 +200,7 @@ public void testRepeatableReadIsolationMixedDml2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOperationConsistency() throws Exception { checkOperationsConsistency(PUT, false); checkOperationsConsistency(DML, false); @@ -198,6 +213,7 @@ public void testOperationConsistency() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvokeConsistency() throws Exception { Ignite node = grid(/*requestFromClient ? nodesCount() - 1 :*/ 0); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccRepeatableReadOperationsTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccRepeatableReadOperationsTest.java index 72f0396d86b6c..72e877b1eed72 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccRepeatableReadOperationsTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccRepeatableReadOperationsTest.java @@ -29,6 +29,9 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.processors.cache.mvcc.CacheMvccAbstractTest.ReadMode.GET; import static org.apache.ignite.internal.processors.cache.mvcc.CacheMvccAbstractTest.ReadMode.SQL; @@ -36,6 +39,7 @@ /** * Test basic mvcc cache operation operations. */ +@RunWith(JUnit4.class) public class MvccRepeatableReadOperationsTest extends MvccRepeatableReadBulkOpsTest { /** {@inheritDoc} */ @Override protected Map getEntries( @@ -164,6 +168,7 @@ public class MvccRepeatableReadOperationsTest extends MvccRepeatableReadBulkOpsT * * @throws IgniteCheckedException If failed. */ + @Test public void testGetAndUpdateOperations() throws IgniteCheckedException { Ignite node1 = grid(0); @@ -225,6 +230,7 @@ public void testGetAndUpdateOperations() throws IgniteCheckedException { * * @throws IgniteCheckedException If failed. */ + @Test public void testPutIfAbsentConsistency() throws IgniteCheckedException { Ignite node1 = grid(0); @@ -265,6 +271,7 @@ public void testPutIfAbsentConsistency() throws IgniteCheckedException { * * @throws IgniteCheckedException If failed. */ + @Test public void testReplaceConsistency() throws IgniteCheckedException { Ignite node1 = grid(0); @@ -309,4 +316,4 @@ public void testReplaceConsistency() throws IgniteCheckedException { assertEquals(updateMap, getEntries(cache1, allKeys, SQL)); assertEquals(updateMap, getEntries(cache1, allKeys, GET)); } -} \ No newline at end of file +} diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoveryTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoveryTest.java index e64800a6daf7d..cc35b57a22a5c 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoveryTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoveryTest.java @@ -108,6 +108,9 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.configuration.DataStorageConfiguration.DFLT_CHECKPOINT_FREQ; import static org.apache.ignite.internal.IgniteNodeAttributes.ATTR_IGNITE_INSTANCE_NAME; @@ -117,6 +120,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteWalRecoveryTest extends GridCommonAbstractTest { /** */ private static final String HAS_CACHE = "HAS_CACHE"; @@ -254,6 +258,7 @@ public class IgniteWalRecoveryTest extends GridCommonAbstractTest { /** * @throws Exception if failed. */ + @Test public void testWalBig() throws Exception { IgniteEx ignite = startGrid(1); @@ -296,6 +301,7 @@ public void testWalBig() throws Exception { /** * @throws Exception if failed. */ + @Test public void testWalBigObjectNodeCancel() throws Exception { final int MAX_SIZE_POWER = 21; @@ -334,6 +340,7 @@ public void testWalBigObjectNodeCancel() throws Exception { /** * @throws Exception If fail. */ + @Test public void testSwitchClassLoader() throws Exception { final IgniteEx igniteEx = startGrid(1); @@ -370,6 +377,7 @@ public void testSwitchClassLoader() throws Exception { /** * @throws Exception if failed. */ + @Test public void testWalSimple() throws Exception { IgniteEx ignite = startGrid(1); @@ -442,6 +450,7 @@ else if (i % 2 == 0) /** * @throws Exception If fail. */ + @Test public void testWalLargeValue() throws Exception { IgniteEx ignite = startGrid(1); @@ -491,6 +500,7 @@ public void testWalLargeValue() throws Exception { * * @throws Exception if failed. */ + @Test public void testBinaryRecoverBeforePMEWhenMiddleCheckpoint() throws Exception { startGrids(3); @@ -591,6 +601,7 @@ public void testBinaryRecoverBeforePMEWhenMiddleCheckpoint() throws Exception { /** * @throws Exception if failed. */ + @Test public void testWalRolloverMultithreadedDefault() throws Exception { logOnly = false; @@ -600,6 +611,7 @@ public void testWalRolloverMultithreadedDefault() throws Exception { /** * @throws Exception if failed. */ + @Test public void testWalRolloverMultithreadedLogOnly() throws Exception { logOnly = true; @@ -609,6 +621,7 @@ public void testWalRolloverMultithreadedLogOnly() throws Exception { /** * @throws Exception if failed. */ + @Test public void testHugeCheckpointRecord() throws Exception { long prevFDTimeout = customFailureDetectionTimeout; @@ -688,6 +701,7 @@ private void checkWalRolloverMultithreaded() throws Exception { /** * @throws Exception If fail. */ + @Test public void testWalRenameDirSimple() throws Exception { IgniteEx ignite = startGrid(1); @@ -746,6 +760,7 @@ private File cacheDir(final String cacheName, final String consId) throws Ignite /** * @throws Exception if failed. */ + @Test public void testRecoveryNoCheckpoint() throws Exception { IgniteEx ctrlGrid = startGrid(0); @@ -794,6 +809,7 @@ public void testRecoveryNoCheckpoint() throws Exception { /** * @throws Exception if failed. */ + @Test public void testRecoveryLargeNoCheckpoint() throws Exception { IgniteEx ctrlGrid = startGrid(0); @@ -844,6 +860,7 @@ public void testRecoveryLargeNoCheckpoint() throws Exception { /** * @throws Exception if failed. */ + @Test public void testRandomCrash() throws Exception { checkpointFrequency = 2_000 + new Random().nextInt(4_000); @@ -879,6 +896,7 @@ public void testRandomCrash() throws Exception { /** * @throws Exception if failed. */ + @Test public void testLargeRandomCrash() throws Exception { checkpointFrequency = 2_000 + new Random().nextInt(4_000); @@ -924,6 +942,7 @@ private static class RemoteNodeFilter implements IgnitePredicate { /** * @throws Exception If failed. */ + @Test public void testDestroyCache() throws Exception { IgniteEx ignite = startGrid(1); @@ -944,6 +963,7 @@ public void testDestroyCache() throws Exception { /** * @throws Exception If fail. */ + @Test public void testEvictPartition() throws Exception { Ignite ignite1 = startGrid("node1"); @@ -983,6 +1003,7 @@ public void testEvictPartition() throws Exception { /** * @throws Exception If fail. */ + @Test public void testMetastorage() throws Exception { int cnt = 5000; @@ -1042,6 +1063,7 @@ public void testMetastorage() throws Exception { /** * @throws Exception If fail. */ + @Test public void testMetastorageLargeArray() throws Exception { int cnt = 5000; int arraySize = 32_768; @@ -1083,6 +1105,7 @@ public void testMetastorageLargeArray() throws Exception { /** * @throws Exception If fail. */ + @Test public void testMetastorageRemove() throws Exception { int cnt = 400; @@ -1130,6 +1153,7 @@ public void testMetastorageRemove() throws Exception { /** * @throws Exception If fail. */ + @Test public void testMetastorageUpdate() throws Exception { try { int cnt = 2000; @@ -1182,6 +1206,7 @@ public void testMetastorageUpdate() throws Exception { /** * @throws Exception If fail. */ + @Test public void testMetastorageWalRestore() throws Exception { int cnt = 2000; @@ -1233,6 +1258,7 @@ public void testMetastorageWalRestore() throws Exception { /** * @throws Exception if failed. */ + @Test public void testAbsentDeadlock_Iterator_RollOver_Archivation() throws Exception { walSegments = 2; @@ -1296,6 +1322,7 @@ public void testAbsentDeadlock_Iterator_RollOver_Archivation() throws Exception /** * @throws Exception if failed. */ + @Test public void testApplyDeltaRecords() throws Exception { IgniteEx ignite0 = (IgniteEx)startGrid("node0"); @@ -1428,6 +1455,7 @@ else if (rec instanceof PageDeltaRecord) { * * @throws Exception If fail. */ + @Test public void testRecoveryOnTransactionalAndPartitionedCache() throws Exception { IgniteEx ignite = (IgniteEx)startGrids(3); ignite.cluster().active(true); @@ -1499,6 +1527,7 @@ public void testRecoveryOnTransactionalAndPartitionedCache() throws Exception { * * @throws Exception If any fail. */ + @Test public void testTxRecordsConsistency() throws Exception { System.setProperty(IgniteSystemProperties.IGNITE_WAL_LOG_TX_RECORDS, "true"); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/transaction/DmlInsideTransactionTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/transaction/DmlInsideTransactionTest.java index 633bb6f7a5ce7..ee8c899ae3e90 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/transaction/DmlInsideTransactionTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/transaction/DmlInsideTransactionTest.java @@ -30,12 +30,16 @@ import org.apache.ignite.testframework.GridTestUtils.SystemProperty; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.testframework.GridTestUtils.assertThrows; /** * Tests DML allow/disallow operation inside transaction. */ +@RunWith(JUnit4.class) public class DmlInsideTransactionTest extends GridCommonAbstractTest { /** Person cache name. */ private static final String CACHE_PERSON = "PersonCache"; @@ -61,6 +65,7 @@ public class DmlInsideTransactionTest extends GridCommonAbstractTest { * * @throws Exception In case failure. */ + @Test public void testDmlInTransactionByDefault() throws Exception { prepareIgnite(); @@ -76,6 +81,7 @@ public void testDmlInTransactionByDefault() throws Exception { * * @throws Exception In case failure. */ + @Test public void testDmlInTransactionInDisabledCompatibilityMode() throws Exception { try (SystemProperty ignored = new SystemProperty(IgniteSystemProperties.IGNITE_ALLOW_DML_INSIDE_TRANSACTION, "false")) { prepareIgnite(); @@ -93,6 +99,7 @@ public void testDmlInTransactionInDisabledCompatibilityMode() throws Exception { * * @throws Exception In case failure. */ + @Test public void testDmlInTransactionInCompatibilityMode() throws Exception { try (SystemProperty ignored = new SystemProperty(IgniteSystemProperties.IGNITE_ALLOW_DML_INSIDE_TRANSACTION, "true")) { prepareIgnite(); @@ -110,6 +117,7 @@ public void testDmlInTransactionInCompatibilityMode() throws Exception { * * @throws Exception In case failure. */ + @Test public void testDmlNotInTransaction() throws Exception { prepareIgnite(); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAbstractSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAbstractSelfTest.java index c9a5bf6ff9652..0573756b24bfe 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAbstractSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAbstractSelfTest.java @@ -42,6 +42,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.cache.CacheMode.LOCAL; @@ -56,6 +59,7 @@ /** * TTL test. */ +@RunWith(JUnit4.class) public abstract class CacheTtlAbstractSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -145,6 +149,7 @@ public abstract class CacheTtlAbstractSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testDefaultTimeToLiveLoadCache() throws Exception { IgniteCache cache = jcache(0); @@ -160,6 +165,7 @@ public void testDefaultTimeToLiveLoadCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDefaultTimeToLiveLoadAll() throws Exception { defaultTimeToLiveLoadAll(false); @@ -194,6 +200,7 @@ private void defaultTimeToLiveLoadAll(boolean replaceExisting) throws Exception /** * @throws Exception If failed. */ + @Test public void testDefaultTimeToLiveStreamerAdd() throws Exception { try (IgniteDataStreamer streamer = ignite(0).dataStreamer(DEFAULT_CACHE_NAME)) { for (int i = 0; i < SIZE; i++) @@ -223,6 +230,7 @@ public void testDefaultTimeToLiveStreamerAdd() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDefaultTimeToLivePut() throws Exception { IgniteCache cache = jcache(0); @@ -240,6 +248,7 @@ public void testDefaultTimeToLivePut() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDefaultTimeToLivePutAll() throws Exception { IgniteCache cache = jcache(0); @@ -260,6 +269,7 @@ public void testDefaultTimeToLivePutAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDefaultTimeToLivePreload() throws Exception { if (cacheMode() == LOCAL) return; @@ -285,6 +295,7 @@ public void testDefaultTimeToLivePreload() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTimeToLiveTtl() throws Exception { long time = DEFAULT_TIME_TO_LIVE + 2000; @@ -360,4 +371,4 @@ private void checkSizeAfterLive(int gridCnt) throws Exception { assertNull(cache.localPeek(key)); } } -} \ No newline at end of file +} From f3df731b3cf712eb38c4660a9a4b3a276d922283 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Fri, 7 Dec 2018 20:21:34 +0300 Subject: [PATCH 064/176] IGNITE-10176 migrate non-core modules tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview and rebuild --- ...nectorConfigurationValidationSelfTest.java | 21 +++++++++++++++++++ .../client/IgniteDataStreamerTest.java | 5 +++++ 2 files changed, 26 insertions(+) diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/client/ClientConnectorConfigurationValidationSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/client/ClientConnectorConfigurationValidationSelfTest.java index 6ca30309323f7..593952f8e5349 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/client/ClientConnectorConfigurationValidationSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/client/ClientConnectorConfigurationValidationSelfTest.java @@ -40,11 +40,15 @@ import java.sql.Statement; import java.util.concurrent.Callable; import java.util.concurrent.atomic.AtomicInteger; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Client connector configuration validation tests. */ @SuppressWarnings("deprecation") +@RunWith(JUnit4.class) public class ClientConnectorConfigurationValidationSelfTest extends GridCommonAbstractTest { /** Node index generator. */ private static final AtomicInteger NODE_IDX_GEN = new AtomicInteger(); @@ -62,6 +66,7 @@ public class ClientConnectorConfigurationValidationSelfTest extends GridCommonAb * * @throws Exception If failed. */ + @Test public void testDefault() throws Exception { check(new ClientConnectorConfiguration(), true); checkJdbc(null, ClientConnectorConfiguration.DFLT_PORT); @@ -72,6 +77,7 @@ public void testDefault() throws Exception { * * @throws Exception If failed. */ + @Test public void testHost() throws Exception { check(new ClientConnectorConfiguration().setHost("126.0.0.1"), false); @@ -88,6 +94,7 @@ public void testHost() throws Exception { * * @throws Exception If failed. */ + @Test public void testPort() throws Exception { check(new ClientConnectorConfiguration().setPort(-1), false); check(new ClientConnectorConfiguration().setPort(0), false); @@ -107,6 +114,7 @@ public void testPort() throws Exception { * * @throws Exception If failed. */ + @Test public void testPortRange() throws Exception { check(new ClientConnectorConfiguration().setPortRange(-1), false); @@ -122,6 +130,7 @@ public void testPortRange() throws Exception { * * @throws Exception If failed. */ + @Test public void testSocketBuffers() throws Exception { check(new ClientConnectorConfiguration().setSocketSendBufferSize(-4 * 1024), false); check(new ClientConnectorConfiguration().setSocketReceiveBufferSize(-4 * 1024), false); @@ -138,6 +147,7 @@ public void testSocketBuffers() throws Exception { * * @throws Exception If failed. */ + @Test public void testMaxOpenCusrorsPerConnection() throws Exception { check(new ClientConnectorConfiguration().setMaxOpenCursorsPerConnection(-1), false); @@ -153,6 +163,7 @@ public void testMaxOpenCusrorsPerConnection() throws Exception { * * @throws Exception If failed. */ + @Test public void testThreadPoolSize() throws Exception { check(new ClientConnectorConfiguration().setThreadPoolSize(0), false); check(new ClientConnectorConfiguration().setThreadPoolSize(-1), false); @@ -166,6 +177,7 @@ public void testThreadPoolSize() throws Exception { * * @throws Exception If failed. */ + @Test public void testOdbcConnectorConversion() throws Exception { int port = ClientConnectorConfiguration.DFLT_PORT - 1; @@ -183,6 +195,7 @@ public void testOdbcConnectorConversion() throws Exception { * * @throws Exception If failed. */ + @Test public void testSqlConnectorConversion() throws Exception { int port = ClientConnectorConfiguration.DFLT_PORT - 1; @@ -200,6 +213,7 @@ public void testSqlConnectorConversion() throws Exception { * * @throws Exception If failed. */ + @Test public void testIgnoreOdbcWhenSqlSet() throws Exception { int port = ClientConnectorConfiguration.DFLT_PORT - 1; @@ -218,6 +232,7 @@ public void testIgnoreOdbcWhenSqlSet() throws Exception { * * @throws Exception If failed. */ + @Test public void testIgnoreOdbcAndSqlWhenClientSet() throws Exception { int cliPort = ClientConnectorConfiguration.DFLT_PORT - 1; int sqlPort = ClientConnectorConfiguration.DFLT_PORT - 2; @@ -239,6 +254,7 @@ public void testIgnoreOdbcAndSqlWhenClientSet() throws Exception { * * @throws Exception If failed. */ + @Test public void testIgnoreOdbcWhenClientSet() throws Exception { int cliPort = ClientConnectorConfiguration.DFLT_PORT - 1; int odbcPort = ClientConnectorConfiguration.DFLT_PORT - 2; @@ -258,6 +274,7 @@ public void testIgnoreOdbcWhenClientSet() throws Exception { * * @throws Exception If failed. */ + @Test public void testIgnoreSqlWhenClientSet() throws Exception { int cliPort = ClientConnectorConfiguration.DFLT_PORT - 1; int sqlPort = ClientConnectorConfiguration.DFLT_PORT - 2; @@ -277,6 +294,7 @@ public void testIgnoreSqlWhenClientSet() throws Exception { * * @throws Exception If failed. */ + @Test public void testDisabled() throws Exception { IgniteConfiguration cfg = baseConfiguration(); @@ -298,6 +316,7 @@ public void testDisabled() throws Exception { * * @throws Exception If failed. */ + @Test public void testJdbcConnectionEnabled() throws Exception { IgniteConfiguration cfg = baseConfiguration(); @@ -316,6 +335,7 @@ public void testJdbcConnectionEnabled() throws Exception { * * @throws Exception If failed. */ + @Test public void testJdbcConnectionDisabled() throws Exception { IgniteConfiguration cfg = baseConfiguration(); @@ -340,6 +360,7 @@ public void testJdbcConnectionDisabled() throws Exception { * * @throws Exception If failed. */ + @Test public void testJdbcConnectionDisabledForDaemon() throws Exception { final IgniteConfiguration cfg = baseConfiguration().setDaemon(true); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/client/IgniteDataStreamerTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/client/IgniteDataStreamerTest.java index 1bfb02e192952..415c05b000d82 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/client/IgniteDataStreamerTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/client/IgniteDataStreamerTest.java @@ -28,11 +28,15 @@ import org.apache.ignite.lang.IgniteFuture; import org.apache.ignite.lang.IgniteUuid; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CachePeekMode.ALL; /** */ +@RunWith(JUnit4.class) public class IgniteDataStreamerTest extends GridCommonAbstractTest { public static final String CACHE_NAME = "UUID_CACHE"; @@ -83,6 +87,7 @@ private CacheConfiguration cacheConfiguration(Class key, Class Date: Fri, 7 Dec 2018 20:21:50 +0300 Subject: [PATCH 065/176] IGNITE-10176 migrate non-core modules tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview and rebuild --- .../database/IgniteDbSingleNodeWithIndexingPutGetTest.java | 6 ++++++ .../IgniteDbSingleNodeWithIndexingWalRestoreTest.java | 6 ++++++ ...ersistentStoreQueryWithMultipleClassesPerCacheTest.java | 7 ++++++- .../database/IgnitePersistentStoreSchemaLoadTest.java | 7 +++++++ .../database/IgniteTwoRegionsRebuildIndexTest.java | 5 +++++ 5 files changed, 30 insertions(+), 1 deletion(-) diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbSingleNodeWithIndexingPutGetTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbSingleNodeWithIndexingPutGetTest.java index 2971fff3e9767..0fd9ff171143a 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbSingleNodeWithIndexingPutGetTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbSingleNodeWithIndexingPutGetTest.java @@ -34,10 +34,14 @@ import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.internal.S; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteDbSingleNodeWithIndexingPutGetTest extends IgniteDbSingleNodePutGetTest { /** {@inheritDoc} */ @Override protected boolean indexingEnabled() { @@ -46,6 +50,7 @@ public class IgniteDbSingleNodeWithIndexingPutGetTest extends IgniteDbSingleNode /** */ + @Test public void testGroupIndexes() { IgniteEx ig = grid(0); @@ -74,6 +79,7 @@ public void testGroupIndexes() { /** */ + @Test public void testGroupIndexes2() { IgniteEx ig = grid(0); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbSingleNodeWithIndexingWalRestoreTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbSingleNodeWithIndexingWalRestoreTest.java index 6d8021997f121..c9e20f5376075 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbSingleNodeWithIndexingWalRestoreTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbSingleNodeWithIndexingWalRestoreTest.java @@ -35,11 +35,15 @@ import org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test verifies that binary metadata of values stored in cache and indexes upon these values * is handled correctly on cluster restart when persistent store is enabled and compact footer is turned on. */ +@RunWith(JUnit4.class) public class IgniteDbSingleNodeWithIndexingWalRestoreTest extends GridCommonAbstractTest { /** */ private static final String BINARY_TYPE_NAME = "BinaryPerson"; @@ -125,6 +129,7 @@ public RegularPerson(String regName) { /** * Test for values without class created with BinaryObjectBuilder. */ + @Test public void testClasslessBinaryValuesRestored() throws Exception { IgniteEx ig = startGrid(0); @@ -162,6 +167,7 @@ public void testClasslessBinaryValuesRestored() throws Exception { * Test for regular objects stored in cache with compactFooter=true setting * (no metainformation to deserialize values is stored with values themselves). */ + @Test public void testRegularClassesRestored() throws Exception { IgniteEx ig = startGrid(0); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/database/IgnitePersistentStoreQueryWithMultipleClassesPerCacheTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/database/IgnitePersistentStoreQueryWithMultipleClassesPerCacheTest.java index b0bcff0b0c360..493edbf93e6aa 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/database/IgnitePersistentStoreQueryWithMultipleClassesPerCacheTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/database/IgnitePersistentStoreQueryWithMultipleClassesPerCacheTest.java @@ -32,12 +32,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_SKIP_CONFIGURATION_CONSISTENCY_CHECK; /** * */ +@RunWith(JUnit4.class) public class IgnitePersistentStoreQueryWithMultipleClassesPerCacheTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -104,6 +108,7 @@ private CacheConfiguration cacheCfg(String name) { /** * @throws Exception If failed. */ + @Test public void testSimple() throws Exception { IgniteEx ig0 = startGrid(0); @@ -173,4 +178,4 @@ public static class Country { @QuerySqlField private UUID uuid = UUID.randomUUID(); } -} \ No newline at end of file +} diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/database/IgnitePersistentStoreSchemaLoadTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/database/IgnitePersistentStoreSchemaLoadTest.java index 4671698eb5ffe..53c3dd9252bd0 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/database/IgnitePersistentStoreSchemaLoadTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/database/IgnitePersistentStoreSchemaLoadTest.java @@ -39,12 +39,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_SKIP_CONFIGURATION_CONSISTENCY_CHECK; /** * */ +@RunWith(JUnit4.class) public class IgnitePersistentStoreSchemaLoadTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -134,16 +138,19 @@ private CacheConfiguration cacheCfg(String name) { } /** */ + @Test public void testDynamicSchemaChangesPersistence() throws Exception { checkSchemaStateAfterNodeRestart(false); } /** */ + @Test public void testDynamicSchemaChangesPersistenceWithAliveCluster() throws Exception { checkSchemaStateAfterNodeRestart(true); } /** */ + @Test public void testDynamicSchemaChangesPersistenceWithStaticCache() throws Exception { IgniteEx node = startGrid(getConfigurationWithStaticCache(getTestIgniteInstanceName(0))); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/database/IgniteTwoRegionsRebuildIndexTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/database/IgniteTwoRegionsRebuildIndexTest.java index 7d5b296f931ca..293ad0908d0d3 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/database/IgniteTwoRegionsRebuildIndexTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/database/IgniteTwoRegionsRebuildIndexTest.java @@ -24,10 +24,14 @@ import org.apache.ignite.configuration.DataStorageConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests the case when preformed index rebuild for created by client in-memory cache. */ +@RunWith(JUnit4.class) public class IgniteTwoRegionsRebuildIndexTest extends GridCommonAbstractTest { /** */ private static final String PERSISTED_CACHE = "persisted"; @@ -93,6 +97,7 @@ public class IgniteTwoRegionsRebuildIndexTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRebuildIndexes() throws Exception { startGrid("server"); Ignite client = startGrid("client"); From 04c1e28bc4d747e1fc8e37f83ccb3d2d63b8ef59 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Fri, 7 Dec 2018 20:22:26 +0300 Subject: [PATCH 066/176] IGNITE-10176 migrate non-core modules tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview and rebuild --- ...artitionedAtomicColumnConstraintsTest.java | 31 +++++++++++++++++++ ...nedTransactionalColumnConstraintsTest.java | 4 +-- ...sactionalSnapshotColumnConstraintTest.java | 22 +++++++++++++ ...sactionalSnapshotColumnConstraintTest.java | 22 +++++++++++++ .../sql/IgniteSQLColumnConstraintsTest.java | 19 +++++++++++- ...iteTransactionSQLColumnConstraintTest.java | 6 ++++ ...nectorConfigurationValidationSelfTest.java | 11 +++++++ 7 files changed, 112 insertions(+), 3 deletions(-) diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteCachePartitionedAtomicColumnConstraintsTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteCachePartitionedAtomicColumnConstraintsTest.java index 71bedaa5ac890..2e7effef667f2 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteCachePartitionedAtomicColumnConstraintsTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteCachePartitionedAtomicColumnConstraintsTest.java @@ -38,6 +38,9 @@ import org.apache.ignite.internal.util.typedef.T2; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT; @@ -48,6 +51,7 @@ import static org.apache.ignite.testframework.GridTestUtils.assertThrowsWithCause; /** */ +@RunWith(JUnit4.class) public class IgniteCachePartitionedAtomicColumnConstraintsTest extends GridCommonAbstractTest { /** */ private static final long FUT_TIMEOUT = 10_000L; @@ -213,6 +217,7 @@ private void createCachesForDecimalScaleTests() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutTooLongStringValueFail() throws Exception { IgniteCache cache = jcache(0, STR_CACHE_NAME); @@ -228,6 +233,7 @@ public void testPutTooLongStringValueFail() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutTooLongStringKeyFail() throws Exception { IgniteCache cache = jcache(0, STR_CACHE_NAME); @@ -241,6 +247,7 @@ public void testPutTooLongStringKeyFail() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutTooLongStringValueFieldFail() throws Exception { IgniteCache cache = jcache(0, OBJ_CACHE_NAME); @@ -256,6 +263,7 @@ public void testPutTooLongStringValueFieldFail() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutTooLongStringKeyFieldFail() throws Exception { IgniteCache cache = jcache(0, OBJ_CACHE_NAME); @@ -269,6 +277,7 @@ public void testPutTooLongStringKeyFieldFail() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutTooLongStringKeyFail2() throws Exception { doCheckPutTooLongStringKeyFail2(STR_ORG_CACHE_NAME); } @@ -276,6 +285,7 @@ public void testPutTooLongStringKeyFail2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutTooLongStringKeyFail3() throws Exception { doCheckPutTooLongStringKeyFail2(STR_ORG_WITH_FIELDS_CACHE_NAME); } @@ -296,6 +306,7 @@ private void doCheckPutTooLongStringKeyFail2(String cacheName) { /** * @throws Exception If failed. */ + @Test public void testPutLongStringValue() throws Exception { IgniteCache cache = jcache(0, STR_CACHE_NAME); @@ -311,6 +322,7 @@ public void testPutLongStringValue() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutLongStringKey() throws Exception { IgniteCache cache = jcache(0, STR_CACHE_NAME); @@ -324,6 +336,7 @@ public void testPutLongStringKey() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutLongStringValueField() throws Exception { IgniteCache cache = jcache(0, OBJ_CACHE_NAME); @@ -339,6 +352,7 @@ public void testPutLongStringValueField() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutLongStringKeyField() throws Exception { IgniteCache cache = jcache(0, OBJ_CACHE_NAME); @@ -352,6 +366,7 @@ public void testPutLongStringKeyField() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutLongStringKey2() throws Exception { doCheckPutLongStringKey2(STR_ORG_CACHE_NAME); } @@ -359,6 +374,7 @@ public void testPutLongStringKey2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutLongStringKey3() throws Exception { doCheckPutLongStringKey2(STR_ORG_WITH_FIELDS_CACHE_NAME); } @@ -379,6 +395,7 @@ private void doCheckPutLongStringKey2(String cacheName) { /** * @throws Exception If failed. */ + @Test public void testPutTooLongDecimalValueFail() throws Exception { IgniteCache cache = jcache(0, DEC_CACHE_NAME_FOR_PREC); @@ -394,6 +411,7 @@ public void testPutTooLongDecimalValueFail() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutTooLongDecimalKeyFail() throws Exception { IgniteCache cache = jcache(0, DEC_CACHE_NAME_FOR_PREC); @@ -407,6 +425,7 @@ public void testPutTooLongDecimalKeyFail() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutTooLongDecimalKeyFail2() throws Exception { IgniteCache cache = jcache(0, DEC_EMPL_CACHE_NAME_FOR_PREC); @@ -420,6 +439,7 @@ public void testPutTooLongDecimalKeyFail2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutTooLongDecimalValueFieldFail() throws Exception { IgniteCache cache = jcache(0, OBJ_CACHE_NAME_FOR_PREC); @@ -435,6 +455,7 @@ public void testPutTooLongDecimalValueFieldFail() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutTooLongDecimalValueFieldFail2() throws Exception { IgniteCache cache = jcache(0, DEC_EMPL_CACHE_NAME_FOR_PREC); @@ -450,6 +471,7 @@ public void testPutTooLongDecimalValueFieldFail2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutTooLongDecimalKeyFieldFail() throws Exception { IgniteCache cache = jcache(0, OBJ_CACHE_NAME_FOR_PREC); @@ -463,6 +485,7 @@ public void testPutTooLongDecimalKeyFieldFail() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutTooLongDecimalValueScaleFail() throws Exception { IgniteCache cache = jcache(0, DEC_CACHE_NAME_FOR_SCALE); @@ -478,6 +501,7 @@ public void testPutTooLongDecimalValueScaleFail() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutTooLongDecimalKeyScaleFail() throws Exception { IgniteCache cache = jcache(0, DEC_CACHE_NAME_FOR_SCALE); @@ -491,6 +515,7 @@ public void testPutTooLongDecimalKeyScaleFail() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutTooLongDecimalKeyScaleFail2() throws Exception { IgniteCache cache = jcache(0, DEC_EMPL_CACHE_NAME_FOR_SCALE); @@ -504,6 +529,7 @@ public void testPutTooLongDecimalKeyScaleFail2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutTooLongDecimalValueFieldScaleFail() throws Exception { IgniteCache cache = jcache(0, OBJ_CACHE_NAME_FOR_SCALE); @@ -519,6 +545,7 @@ public void testPutTooLongDecimalValueFieldScaleFail() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutTooLongDecimalValueFieldScaleFail2() throws Exception { IgniteCache cache = jcache(0, DEC_EMPL_CACHE_NAME_FOR_SCALE); @@ -534,6 +561,7 @@ public void testPutTooLongDecimalValueFieldScaleFail2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutTooLongDecimalKeyFieldScaleFail() throws Exception { IgniteCache cache = jcache(0, OBJ_CACHE_NAME_FOR_SCALE); @@ -547,6 +575,7 @@ public void testPutTooLongDecimalKeyFieldScaleFail() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutValidDecimalKeyAndValue() throws Exception { IgniteCache cache = jcache(0, DEC_CACHE_NAME_FOR_SCALE); @@ -562,6 +591,7 @@ public void testPutValidDecimalKeyAndValue() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutValidDecimalKeyAndValueField() throws Exception { IgniteCache cache = jcache(0, OBJ_CACHE_NAME_FOR_SCALE); @@ -577,6 +607,7 @@ public void testPutValidDecimalKeyAndValueField() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutValidDecimalKeyAndValueField2() throws Exception { IgniteCache cache = jcache(0, DEC_EMPL_CACHE_NAME_FOR_SCALE); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteCachePartitionedTransactionalColumnConstraintsTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteCachePartitionedTransactionalColumnConstraintsTest.java index cd5c979e9636f..c73c04ec24fee 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteCachePartitionedTransactionalColumnConstraintsTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteCachePartitionedTransactionalColumnConstraintsTest.java @@ -21,10 +21,10 @@ import org.jetbrains.annotations.NotNull; /** */ -public class IgniteCachePartitionedTransactionalColumnConstraintsTest +public class IgniteCachePartitionedTransactionalColumnConstraintsTest extends IgniteCachePartitionedAtomicColumnConstraintsTest { /** {@inheritDoc} */ - @NotNull protected CacheAtomicityMode atomicityMode() { + @Override @NotNull protected CacheAtomicityMode atomicityMode() { return CacheAtomicityMode.TRANSACTIONAL; } } diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteCachePartitionedTransactionalSnapshotColumnConstraintTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteCachePartitionedTransactionalSnapshotColumnConstraintTest.java index a636a3c11cb1d..0eceaed068df5 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteCachePartitionedTransactionalSnapshotColumnConstraintTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteCachePartitionedTransactionalSnapshotColumnConstraintTest.java @@ -19,8 +19,12 @@ import org.apache.ignite.cache.CacheAtomicityMode; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** */ +@RunWith(JUnit4.class) public class IgniteCachePartitionedTransactionalSnapshotColumnConstraintTest extends IgniteCachePartitionedAtomicColumnConstraintsTest { /** {@inheritDoc} */ @@ -29,91 +33,109 @@ public class IgniteCachePartitionedTransactionalSnapshotColumnConstraintTest } /** */ + @Test @Override public void testPutTooLongStringValueFail() { fail("https://issues.apache.org/jira/browse/IGNITE-10066"); } /** */ + @Test @Override public void testPutTooLongStringKeyFail() { fail("https://issues.apache.org/jira/browse/IGNITE-10066"); } /** */ + @Test @Override public void testPutTooLongStringValueFieldFail() { fail("https://issues.apache.org/jira/browse/IGNITE-10066"); } /** */ + @Test @Override public void testPutTooLongStringKeyFieldFail() { fail("https://issues.apache.org/jira/browse/IGNITE-10066"); } /** */ + @Test @Override public void testPutTooLongStringKeyFail2() { fail("https://issues.apache.org/jira/browse/IGNITE-10066"); } /** */ + @Test @Override public void testPutTooLongStringKeyFail3() { fail("https://issues.apache.org/jira/browse/IGNITE-10066"); } /** */ + @Test @Override public void testPutTooLongDecimalValueFail() { fail("https://issues.apache.org/jira/browse/IGNITE-10066"); } /** */ + @Test @Override public void testPutTooLongDecimalKeyFail() { fail("https://issues.apache.org/jira/browse/IGNITE-10066"); } /** */ + @Test @Override public void testPutTooLongDecimalKeyFail2() { fail("https://issues.apache.org/jira/browse/IGNITE-10066"); } /** */ + @Test @Override public void testPutTooLongDecimalValueFieldFail() { fail("https://issues.apache.org/jira/browse/IGNITE-10066"); } /** */ + @Test @Override public void testPutTooLongDecimalValueFieldFail2() { fail("https://issues.apache.org/jira/browse/IGNITE-10066"); } /** */ + @Test @Override public void testPutTooLongDecimalKeyFieldFail() { fail("https://issues.apache.org/jira/browse/IGNITE-10066"); } /** */ + @Test @Override public void testPutTooLongDecimalValueScaleFail() { fail("https://issues.apache.org/jira/browse/IGNITE-10066"); } /** */ + @Test @Override public void testPutTooLongDecimalKeyScaleFail() { fail("https://issues.apache.org/jira/browse/IGNITE-10066"); } /** */ + @Test @Override public void testPutTooLongDecimalKeyScaleFail2() { fail("https://issues.apache.org/jira/browse/IGNITE-10066"); } /** */ + @Test @Override public void testPutTooLongDecimalValueFieldScaleFail() { fail("https://issues.apache.org/jira/browse/IGNITE-10066"); } /** */ + @Test @Override public void testPutTooLongDecimalValueFieldScaleFail2() { fail("https://issues.apache.org/jira/browse/IGNITE-10066"); } /** */ + @Test @Override public void testPutTooLongDecimalKeyFieldScaleFail() { fail("https://issues.apache.org/jira/browse/IGNITE-10066"); } diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteCacheReplicatedTransactionalSnapshotColumnConstraintTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteCacheReplicatedTransactionalSnapshotColumnConstraintTest.java index 2a7f6b5375aeb..6994cfbebd09f 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteCacheReplicatedTransactionalSnapshotColumnConstraintTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteCacheReplicatedTransactionalSnapshotColumnConstraintTest.java @@ -19,8 +19,12 @@ import org.apache.ignite.cache.CacheAtomicityMode; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** */ +@RunWith(JUnit4.class) public class IgniteCacheReplicatedTransactionalSnapshotColumnConstraintTest extends IgniteCacheReplicatedAtomicColumnConstraintsTest { /** {@inheritDoc} */ @@ -29,91 +33,109 @@ public class IgniteCacheReplicatedTransactionalSnapshotColumnConstraintTest } /** */ + @Test @Override public void testPutTooLongStringValueFail() { fail("https://issues.apache.org/jira/browse/IGNITE-10066"); } /** */ + @Test @Override public void testPutTooLongStringKeyFail() { fail("https://issues.apache.org/jira/browse/IGNITE-10066"); } /** */ + @Test @Override public void testPutTooLongStringValueFieldFail() { fail("https://issues.apache.org/jira/browse/IGNITE-10066"); } /** */ + @Test @Override public void testPutTooLongStringKeyFieldFail() { fail("https://issues.apache.org/jira/browse/IGNITE-10066"); } /** */ + @Test @Override public void testPutTooLongStringKeyFail2() { fail("https://issues.apache.org/jira/browse/IGNITE-10066"); } /** */ + @Test @Override public void testPutTooLongStringKeyFail3() { fail("https://issues.apache.org/jira/browse/IGNITE-10066"); } /** */ + @Test @Override public void testPutTooLongDecimalValueFail() { fail("https://issues.apache.org/jira/browse/IGNITE-10066"); } /** */ + @Test @Override public void testPutTooLongDecimalKeyFail() { fail("https://issues.apache.org/jira/browse/IGNITE-10066"); } /** */ + @Test @Override public void testPutTooLongDecimalKeyFail2() { fail("https://issues.apache.org/jira/browse/IGNITE-10066"); } /** */ + @Test @Override public void testPutTooLongDecimalValueFieldFail() { fail("https://issues.apache.org/jira/browse/IGNITE-10066"); } /** */ + @Test @Override public void testPutTooLongDecimalValueFieldFail2() { fail("https://issues.apache.org/jira/browse/IGNITE-10066"); } /** */ + @Test @Override public void testPutTooLongDecimalKeyFieldFail() { fail("https://issues.apache.org/jira/browse/IGNITE-10066"); } /** */ + @Test @Override public void testPutTooLongDecimalValueScaleFail() { fail("https://issues.apache.org/jira/browse/IGNITE-10066"); } /** */ + @Test @Override public void testPutTooLongDecimalKeyScaleFail() { fail("https://issues.apache.org/jira/browse/IGNITE-10066"); } /** */ + @Test @Override public void testPutTooLongDecimalKeyScaleFail2() { fail("https://issues.apache.org/jira/browse/IGNITE-10066"); } /** */ + @Test @Override public void testPutTooLongDecimalValueFieldScaleFail() { fail("https://issues.apache.org/jira/browse/IGNITE-10066"); } /** */ + @Test @Override public void testPutTooLongDecimalValueFieldScaleFail2() { fail("https://issues.apache.org/jira/browse/IGNITE-10066"); } /** */ + @Test @Override public void testPutTooLongDecimalKeyFieldScaleFail() { fail("https://issues.apache.org/jira/browse/IGNITE-10066"); } diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteSQLColumnConstraintsTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteSQLColumnConstraintsTest.java index 8e82063ab59bc..0080bf0171a8c 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteSQLColumnConstraintsTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteSQLColumnConstraintsTest.java @@ -24,12 +24,16 @@ import org.apache.ignite.internal.processors.query.IgniteSQLException; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.processors.odbc.SqlStateCode.CONSTRAINT_VIOLATION; import static org.apache.ignite.internal.processors.odbc.SqlStateCode.INTERNAL_ERROR; /** */ +@RunWith(JUnit4.class) public class IgniteSQLColumnConstraintsTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { @@ -71,6 +75,7 @@ public class IgniteSQLColumnConstraintsTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCreateTableWithTooLongCharDefault() throws Exception { checkSQLThrows("CREATE TABLE too_long_default(id INT PRIMARY KEY, str CHAR(5) DEFAULT '123456')", INTERNAL_ERROR); @@ -79,11 +84,13 @@ public void testCreateTableWithTooLongCharDefault() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCreateTableWithTooLongScaleDecimalDefault() throws Exception { checkSQLThrows("CREATE TABLE too_long_decimal_default_scale(id INT PRIMARY KEY, val DECIMAL(4, 2)" + " DEFAULT 1.345)", INTERNAL_ERROR); } + @Test public void testCreateTableWithTooLongDecimalDefault() throws Exception { checkSQLThrows("CREATE TABLE too_long_decimal_default(id INT PRIMARY KEY, val DECIMAL(4, 2)" + " DEFAULT 123.45)", INTERNAL_ERROR); @@ -92,6 +99,7 @@ public void testCreateTableWithTooLongDecimalDefault() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInsertTooLongDecimal() throws Exception { checkSQLThrows("INSERT INTO decimal_table VALUES(?, ?)", CONSTRAINT_VIOLATION, 2, 123.45); @@ -109,6 +117,7 @@ public void testInsertTooLongDecimal() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInsertTooLongScaleDecimal() throws Exception { checkSQLThrows("INSERT INTO decimal_table VALUES(?, ?)", CONSTRAINT_VIOLATION, 3, 1.234); @@ -126,6 +135,7 @@ public void testInsertTooLongScaleDecimal() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInsertTooLongVarchar() throws Exception { checkSQLThrows("INSERT INTO varchar_table VALUES(?, ?)", CONSTRAINT_VIOLATION, 2, "123456"); @@ -143,6 +153,7 @@ public void testInsertTooLongVarchar() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInsertTooLongChar() throws Exception { checkSQLThrows("INSERT INTO char_table VALUES(?, ?)", CONSTRAINT_VIOLATION, 2, "123456"); @@ -160,9 +171,10 @@ public void testInsertTooLongChar() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCharConstraintsAfterAlterTable() throws Exception { execSQL("ALTER TABLE char_table_2 ADD COLUMN str CHAR(5) NOT NULL"); - + execSQL("INSERT INTO char_table_2(id, str) VALUES(?, ?)", 1, "1"); checkSQLResults("SELECT * FROM char_table_2 WHERE id = 1", 1, null, "1"); @@ -183,6 +195,7 @@ public void testCharConstraintsAfterAlterTable() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDecimalConstraintsAfterAlterTable() throws Exception { execSQL("ALTER TABLE decimal_table_2 ADD COLUMN val DECIMAL(4, 2) NOT NULL"); @@ -218,6 +231,7 @@ public void testDecimalConstraintsAfterAlterTable() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCharDropColumnWithConstraint() throws Exception { execSQL("INSERT INTO char_table_3(id, field, field2) VALUES(?, ?, ?)", 1, "12345", 1); @@ -238,6 +252,7 @@ public void testCharDropColumnWithConstraint() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDecimalDropColumnWithConstraint() throws Exception { execSQL("INSERT INTO decimal_table_3(id, field, field2) VALUES(?, ?, ?)", 1, 12.34, 1); @@ -258,6 +273,7 @@ public void testDecimalDropColumnWithConstraint() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCharSqlState() throws Exception { checkSQLThrows("INSERT INTO char_table_4(id, field) VALUES(?, ?)", CONSTRAINT_VIOLATION, 1, "123456"); @@ -279,6 +295,7 @@ public void testCharSqlState() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDecimalSqlState() throws Exception { checkSQLThrows("INSERT INTO decimal_table_4 VALUES(?, ?)", CONSTRAINT_VIOLATION, 1, BigDecimal.valueOf(1234.56)); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteTransactionSQLColumnConstraintTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteTransactionSQLColumnConstraintTest.java index 5239e1fb36165..1cb4c9d9f2f60 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteTransactionSQLColumnConstraintTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteTransactionSQLColumnConstraintTest.java @@ -20,9 +20,13 @@ import java.util.List; import org.apache.ignite.internal.processors.query.IgniteSQLException; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** */ +@RunWith(JUnit4.class) public class IgniteTransactionSQLColumnConstraintTest extends IgniteSQLColumnConstraintsTest { /** {@inheritDoc} */ @Override protected void checkSQLThrows(String sql, String sqlStateCode, Object... args) { @@ -53,6 +57,7 @@ public class IgniteTransactionSQLColumnConstraintTest extends IgniteSQLColumnCon /** * That test is ignored due to drop column(s) operation is unsupported for the MVCC tables. */ + @Test @Override public void testCharDropColumnWithConstraint() { // No-op. } @@ -60,6 +65,7 @@ public class IgniteTransactionSQLColumnConstraintTest extends IgniteSQLColumnCon /** * That test is ignored due to drop column(s) operation is unsupported for the MVCC tables. */ + @Test @Override public void testDecimalDropColumnWithConstraint() { // No-op. } diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/SqlConnectorConfigurationValidationSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/SqlConnectorConfigurationValidationSelfTest.java index 7890ab6dfd88a..cb3307e9f4e65 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/SqlConnectorConfigurationValidationSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/SqlConnectorConfigurationValidationSelfTest.java @@ -36,11 +36,15 @@ import java.sql.Statement; import java.util.concurrent.Callable; import java.util.concurrent.atomic.AtomicInteger; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * SQL connector configuration validation tests. */ @SuppressWarnings("deprecation") +@RunWith(JUnit4.class) public class SqlConnectorConfigurationValidationSelfTest extends GridCommonAbstractTest { /** Node index generator. */ private static final AtomicInteger NODE_IDX_GEN = new AtomicInteger(); @@ -58,6 +62,7 @@ public class SqlConnectorConfigurationValidationSelfTest extends GridCommonAbstr * * @throws Exception If failed. */ + @Test public void testDefault() throws Exception { check(new SqlConnectorConfiguration(), true); assertJdbc(null, SqlConnectorConfiguration.DFLT_PORT); @@ -68,6 +73,7 @@ public void testDefault() throws Exception { * * @throws Exception If failed. */ + @Test public void testHost() throws Exception { check(new SqlConnectorConfiguration().setHost("126.0.0.1"), false); @@ -84,6 +90,7 @@ public void testHost() throws Exception { * * @throws Exception If failed. */ + @Test public void testPort() throws Exception { check(new SqlConnectorConfiguration().setPort(-1), false); check(new SqlConnectorConfiguration().setPort(0), false); @@ -103,6 +110,7 @@ public void testPort() throws Exception { * * @throws Exception If failed. */ + @Test public void testPortRange() throws Exception { check(new SqlConnectorConfiguration().setPortRange(-1), false); @@ -118,6 +126,7 @@ public void testPortRange() throws Exception { * * @throws Exception If failed. */ + @Test public void testSocketBuffers() throws Exception { check(new SqlConnectorConfiguration().setSocketSendBufferSize(-4 * 1024), false); check(new SqlConnectorConfiguration().setSocketReceiveBufferSize(-4 * 1024), false); @@ -134,6 +143,7 @@ public void testSocketBuffers() throws Exception { * * @throws Exception If failed. */ + @Test public void testMaxOpenCusrorsPerConnection() throws Exception { check(new SqlConnectorConfiguration().setMaxOpenCursorsPerConnection(-1), false); @@ -149,6 +159,7 @@ public void testMaxOpenCusrorsPerConnection() throws Exception { * * @throws Exception If failed. */ + @Test public void testThreadPoolSize() throws Exception { check(new SqlConnectorConfiguration().setThreadPoolSize(0), false); check(new SqlConnectorConfiguration().setThreadPoolSize(-1), false); From 3c8c8a6226c27338b1c0410f6a71bb1c97ed0270 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Fri, 7 Dec 2018 20:22:52 +0300 Subject: [PATCH 067/176] IGNITE-10176 migrate non-core modules tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview and rebuild --- .../tcp/GridOrderedMessageCancelSelfTest.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/indexing/src/test/java/org/apache/ignite/spi/communication/tcp/GridOrderedMessageCancelSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/spi/communication/tcp/GridOrderedMessageCancelSelfTest.java index cfb56b0d4ea77..1c9c2b2002149 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/spi/communication/tcp/GridOrderedMessageCancelSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/spi/communication/tcp/GridOrderedMessageCancelSelfTest.java @@ -46,6 +46,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -54,6 +57,7 @@ /** * */ +@RunWith(JUnit4.class) public class GridOrderedMessageCancelSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -106,6 +110,7 @@ public class GridOrderedMessageCancelSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testTask() throws Exception { Map map = U.field(((IgniteKernal)grid(0)).context().io(), "msgSetMap"); @@ -119,6 +124,7 @@ public void testTask() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTaskException() throws Exception { Map map = U.field(((IgniteKernal)grid(0)).context().io(), "msgSetMap"); @@ -236,4 +242,4 @@ private static class FailTask extends ComputeTaskSplitAdapter { return null; } } -} \ No newline at end of file +} From ed5958846c5809e74dd4b07a480eb358fd065dd1 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Fri, 7 Dec 2018 20:23:10 +0300 Subject: [PATCH 068/176] IGNITE-10176 migrate non-core modules tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview and rebuild --- .../apache/ignite/sqltests/BaseSqlTest.java | 23 +++++++++++++++++++ .../ignite/sqltests/PartitionedSqlTest.java | 10 ++++++++ .../ignite/sqltests/ReplicatedSqlTest.java | 19 +++++++++++++++ 3 files changed, 52 insertions(+) diff --git a/modules/indexing/src/test/java/org/apache/ignite/sqltests/BaseSqlTest.java b/modules/indexing/src/test/java/org/apache/ignite/sqltests/BaseSqlTest.java index 83d35a84788fb..2e206c92e5e5c 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/sqltests/BaseSqlTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/sqltests/BaseSqlTest.java @@ -58,10 +58,14 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test base for test for sql features. */ +@RunWith(JUnit4.class) public class BaseSqlTest extends GridCommonAbstractTest { /** Number of all employees. */ public static final long EMP_CNT = 1000L; @@ -621,6 +625,7 @@ protected void testAllNodes(Consumer consumer) { /** * Check basic SELECT * query. */ + @Test public void testBasicSelect() { testAllNodes(node -> { Result emps = executeFrom("SELECT * FROM Employee", node); @@ -636,6 +641,7 @@ public void testBasicSelect() { /** * Check SELECT query with projection (fields). */ + @Test public void testSelectFields() { testAllNodes(node -> { Result res = executeFrom("SELECT firstName, id, age FROM Employee;", node); @@ -653,6 +659,7 @@ public void testSelectFields() { /** * Check basic BETWEEN operator usage. */ + @Test public void testSelectBetween() { testAllNodes(node -> { Result emps = executeFrom("SELECT * FROM Employee e WHERE e.id BETWEEN 101 and 200", node); @@ -677,6 +684,7 @@ public void testSelectBetween() { /** * Check BETWEEN operator filters out all the result (empty result set is expected). */ + @Test public void testEmptyBetween() { testAllNodes(node -> { Result emps = executeFrom("SELECT * FROM Employee e WHERE e.id BETWEEN 200 AND 101", node); @@ -688,6 +696,7 @@ public void testEmptyBetween() { /** * Check SELECT IN with fixed values. */ + @Test public void testSelectInStatic() { testAllNodes(node -> { Result actual = executeFrom("SELECT age FROM Employee WHERE id IN (1, 256, 42)", node); @@ -707,6 +716,7 @@ public void testSelectInStatic() { /** * Check SELECT IN with simple subquery values. */ + @Test public void testSelectInSubquery() { testAllNodes(node -> { Result actual = executeFrom("SELECT lastName FROM Employee WHERE id in (SELECT id FROM Employee WHERE age < 30)", node); @@ -720,6 +730,7 @@ public void testSelectInSubquery() { /** * Check ORDER BY operator with varchar field. */ + @Test public void testBasicOrderByLastName() { testAllNodes(node -> { Result result = executeFrom("SELECT * FROM Employee e ORDER BY e.lastName", node); @@ -738,6 +749,7 @@ public void testBasicOrderByLastName() { /** * Check DISTINCT operator selecting not unique field. */ + @Test public void testBasicDistinct() { testAllNodes(node -> { Result ages = executeFrom("SELECT DISTINCT age FROM Employee", node); @@ -751,6 +763,7 @@ public void testBasicDistinct() { /** * Check simple WHERE operator. */ + @Test public void testDistinctWithWhere() { testAllNodes(node -> { Result ages = executeFrom("SELECT DISTINCT age FROM Employee WHERE id < 100", node); @@ -764,6 +777,7 @@ public void testDistinctWithWhere() { /** * Check greater operator in where clause with both indexed and non-indexed field. */ + @Test public void testWhereGreater() { testAllNodes(node -> { Result idxActual = executeFrom("SELECT firstName FROM Employee WHERE age > 30", node); @@ -782,6 +796,7 @@ public void testWhereGreater() { /** * Check less operator in where clause with both indexed and non-indexed field. */ + @Test public void testWhereLess() { testAllNodes(node -> { Result idxActual = executeFrom("SELECT firstName FROM Employee WHERE age < 30", node); @@ -800,6 +815,7 @@ public void testWhereLess() { /** * Check equals operator in where clause with both indexed and non-indexed field. */ + @Test public void testWhereEq() { testAllNodes(node -> { Result idxActual = executeFrom("SELECT firstName FROM Employee WHERE age = 30", node); @@ -818,6 +834,7 @@ public void testWhereEq() { /** * Check GROUP BY operator with indexed field. */ + @Test public void testGroupByIndexedField() { testAllNodes(node -> { // Need to filter out only part of records (each one is a count of employees @@ -850,6 +867,7 @@ public void testGroupByIndexedField() { /** * Check GROUP BY operator with indexed field. */ + @Test public void testGroupByNonIndexedField() { testAllNodes(node -> { // Need to filter out only part of records (each one is a count of employees @@ -1039,6 +1057,7 @@ public void checkInnerJoinEmployeeDepartment(String depTab) { /** * Check INNER JOIN with collocated data. */ + @Test public void testInnerJoinEmployeeDepartment() { checkInnerJoinEmployeeDepartment(DEP_TAB); } @@ -1137,6 +1156,7 @@ public void checkLeftJoinDepartmentEmployee(String depTab) { /** * Check LEFT JOIN with collocated data. */ + @Test public void testLeftJoin() { checkLeftJoinEmployeeDepartment(DEP_TAB); } @@ -1206,6 +1226,7 @@ public void checkRightJoinDepartmentEmployee(String depTab) { /** * Check RIGHT JOIN with collocated data. */ + @Test public void testRightJoin() { checkRightJoinEmployeeDepartment(DEP_TAB); } @@ -1214,6 +1235,7 @@ public void testRightJoin() { * Check that FULL OUTER JOIN (which is currently unsupported) causes valid error message. */ @SuppressWarnings("ThrowableNotThrown") + @Test public void testFullOuterJoinIsNotSupported() { testAllNodes(node -> { String fullOuterJoinQry = "SELECT e.id as EmpId, e.firstName as EmpName, d.id as DepId, d.name as DepName " + @@ -1234,6 +1256,7 @@ public void testFullOuterJoinIsNotSupported() { * Check that distributed FULL OUTER JOIN (which is currently unsupported) causes valid error message. */ @SuppressWarnings("ThrowableNotThrown") + @Test public void testFullOuterDistributedJoinIsNotSupported() { testAllNodes(node -> { String qry = "SELECT d.id, d.name, a.address " + diff --git a/modules/indexing/src/test/java/org/apache/ignite/sqltests/PartitionedSqlTest.java b/modules/indexing/src/test/java/org/apache/ignite/sqltests/PartitionedSqlTest.java index 83e70157d359d..8899b38290b36 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/sqltests/PartitionedSqlTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/sqltests/PartitionedSqlTest.java @@ -19,10 +19,14 @@ import java.util.Arrays; import java.util.List; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Includes all base sql test plus tests that make sense in partitioned mode. */ +@RunWith(JUnit4.class) public class PartitionedSqlTest extends BaseSqlTest { /** {@inheritDoc} */ @Override protected void setupData() { @@ -34,6 +38,7 @@ public class PartitionedSqlTest extends BaseSqlTest { /** * Check distributed INNER JOIN. */ + @Test public void testInnerDistributedJoin() { Arrays.asList(true, false).forEach(forceOrder -> testAllNodes(node -> { final String qryTpl = "SELECT d.id, d.name, a.address " + @@ -57,6 +62,7 @@ public void testInnerDistributedJoin() { /** * Check that if required index is missed, correct exception will be thrown. */ + @Test public void testInnerDistJoinMissedIndex() { Arrays.asList(true, false).forEach(forceOrder -> testAllNodes(node -> { String qryTpl = "SELECT d.id, d.name, a.address " + @@ -74,6 +80,7 @@ public void testInnerDistJoinMissedIndex() { /** * Check distributed LEFT JOIN. */ + @Test public void testLeftDistributedJoin() { Arrays.asList(true, false).forEach(forceOrder -> testAllNodes(node -> { final String qryTpl = "SELECT d.id, d.name, a.depId, a.address " + @@ -97,6 +104,7 @@ public void testLeftDistributedJoin() { /** * Check that if required index is missed, correct exception will be thrown. */ + @Test public void testLeftDistributedJoinMissedIndex() { Arrays.asList(true, false).forEach(forceOrder -> testAllNodes(node -> { String qryTpl = "SELECT d.id, d.name, a.address " + @@ -114,6 +122,7 @@ public void testLeftDistributedJoinMissedIndex() { /** * Check distributed RIGHT JOIN. */ + @Test public void testRightDistributedJoin() { setExplain(true); @@ -140,6 +149,7 @@ public void testRightDistributedJoin() { /** * Check that if required index is missed, correct exception will be thrown. */ + @Test public void testRightDistributedJoinMissedIndex() { Arrays.asList(true, false).forEach(forceOrder -> testAllNodes(node -> { String qryTpl = "SELECT d.id, d.name, a.address " + diff --git a/modules/indexing/src/test/java/org/apache/ignite/sqltests/ReplicatedSqlTest.java b/modules/indexing/src/test/java/org/apache/ignite/sqltests/ReplicatedSqlTest.java index a71f217ba1afc..954b911318a6c 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/sqltests/ReplicatedSqlTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/sqltests/ReplicatedSqlTest.java @@ -19,10 +19,14 @@ import java.util.Arrays; import java.util.List; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Includes all base sql test plus tests that make sense in replicated mode. */ +@RunWith(JUnit4.class) public class ReplicatedSqlTest extends BaseSqlTest { /** Name of the department table created in partitioned mode. */ private String DEP_PART_TAB = "DepartmentPart"; @@ -45,6 +49,7 @@ public class ReplicatedSqlTest extends BaseSqlTest { /** * Checks distributed INNER JOIN of replicated and replicated tables. */ + @Test public void testInnerDistributedJoinReplicatedReplicated() { checkInnerDistJoinWithReplicated(DEP_TAB); } @@ -52,6 +57,7 @@ public void testInnerDistributedJoinReplicatedReplicated() { /** * Checks distributed INNER JOIN of partitioned and replicated tables. */ + @Test public void testInnerDistJoinPartitionedReplicated() { checkInnerDistJoinWithReplicated(DEP_PART_TAB); } @@ -90,6 +96,7 @@ private void checkInnerDistJoinWithReplicated(String depTab) { /** * Checks distributed INNER JOIN of replicated and partitioned tables. */ + @Test public void testMixedInnerDistJoinReplicatedPartitioned() { checkInnerDistJoinReplicatedWith(DEP_PART_TAB); } @@ -129,6 +136,7 @@ private void checkInnerDistJoinReplicatedWith(String depTab) { /** * Checks distributed LEFT JOIN of replicated and replicated tables. */ + @Test public void testLeftDistributedJoinReplicatedReplicated() { checkLeftDistributedJoinWithReplicated(DEP_TAB); } @@ -136,6 +144,7 @@ public void testLeftDistributedJoinReplicatedReplicated() { /** * Checks distributed LEFT JOIN of partitioned and replicated tables. */ + @Test public void testLeftDistributedJoinPartitionedReplicated() { setExplain(true); checkLeftDistributedJoinWithReplicated(DEP_PART_TAB); @@ -144,6 +153,7 @@ public void testLeftDistributedJoinPartitionedReplicated() { /** * Checks distributed LEFT JOIN of replicated and partitioned tables. */ + @Test public void testLeftDistributedJoinReplicatedPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-8732"); @@ -215,6 +225,7 @@ private void checkLeftDistributedJoinReplicatedWith(String depTab) { /** * Checks distributed RIGHT JOIN of replicated and replicated tables. */ + @Test public void testRightDistributedJoinReplicatedReplicated() { checkRightDistributedJoinWithReplicated(DEP_TAB); } @@ -222,6 +233,7 @@ public void testRightDistributedJoinReplicatedReplicated() { /** * Checks distributed RIGHT JOIN of partitioned and replicated tables. */ + @Test public void testRightDistributedJoinPartitionedReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-8732"); @@ -231,6 +243,7 @@ public void testRightDistributedJoinPartitionedReplicated() { /** * Checks distributed RIGHT JOIN of replicated and partitioned tables. */ + @Test public void testRightDistributedJoinReplicatedPartitioned() { setExplain(true); checkRightDistributedJoinReplicatedWith(DEP_PART_TAB); @@ -304,6 +317,7 @@ public void checkRightDistributedJoinReplicatedWith(String depTab) { /** * Check INNER JOIN with collocated data of replicated and partitioned tables. */ + @Test public void testInnerJoinReplicatedPartitioned() { checkInnerJoinEmployeeDepartment(DEP_PART_TAB); } @@ -311,6 +325,7 @@ public void testInnerJoinReplicatedPartitioned() { /** * Check INNER JOIN with collocated data of partitioned and replicated tables. */ + @Test public void testInnerJoinPartitionedReplicated() { checkInnerJoinDepartmentEmployee(DEP_PART_TAB); } @@ -318,6 +333,7 @@ public void testInnerJoinPartitionedReplicated() { /** * Check LEFT JOIN with collocated data of replicated and partitioned tables. */ + @Test public void testLeftJoinReplicatedPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-8732"); @@ -327,6 +343,7 @@ public void testLeftJoinReplicatedPartitioned() { /** * Check LEFT JOIN with collocated data of partitioned and replicated tables. */ + @Test public void testLeftJoinPartitionedReplicated() { checkLeftJoinDepartmentEmployee(DEP_PART_TAB); } @@ -334,6 +351,7 @@ public void testLeftJoinPartitionedReplicated() { /** * Check RIGHT JOIN with collocated data of replicated and partitioned tables. */ + @Test public void testRightJoinReplicatedPartitioned() { checkRightJoinEmployeeDepartment(DEP_PART_TAB); } @@ -341,6 +359,7 @@ public void testRightJoinReplicatedPartitioned() { /** * Check RIGHT JOIN with collocated data of partitioned and replicated tables. */ + @Test public void testRightJoinPartitionedReplicated() { fail("https://issues.apache.org/jira/browse/IGNITE-8732"); From d20ceaa606757f0d82940ce14ce9a553c87d067e Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Fri, 7 Dec 2018 20:23:20 +0300 Subject: [PATCH 069/176] IGNITE-10176 migrate non-core modules tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview and rebuild --- .../ignite/util/GridCommandHandlerIndexingTest.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/indexing/src/test/java/org/apache/ignite/util/GridCommandHandlerIndexingTest.java b/modules/indexing/src/test/java/org/apache/ignite/util/GridCommandHandlerIndexingTest.java index dc5011ffe170b..181ae32e3f493 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/util/GridCommandHandlerIndexingTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/util/GridCommandHandlerIndexingTest.java @@ -49,6 +49,9 @@ import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.internal.CU; import org.apache.ignite.internal.util.typedef.internal.U; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.commandline.CommandHandler.EXIT_CODE_OK; import static org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager.INDEX_FILE_NAME; @@ -56,6 +59,7 @@ /** * */ +@RunWith(JUnit4.class) public class GridCommandHandlerIndexingTest extends GridCommandHandlerTest { /** Test cache name. */ private static final String CACHE_NAME = "persons-cache-vi"; @@ -63,6 +67,7 @@ public class GridCommandHandlerIndexingTest extends GridCommandHandlerTest { /** * Tests that validation doesn't fail if nothing is broken. */ + @Test public void testValidateIndexesNoErrors() throws Exception { prepareGridForTest(); @@ -76,6 +81,7 @@ public void testValidateIndexesNoErrors() throws Exception { /** * Tests that missing rows in CacheDataTree are detected. */ + @Test public void testBrokenCacheDataTreeShouldFailValidation() throws Exception { Ignite ignite = prepareGridForTest(); @@ -100,6 +106,7 @@ public void testBrokenCacheDataTreeShouldFailValidation() throws Exception { /** * Tests that missing rows in H2 indexes are detected. */ + @Test public void testBrokenSqlIndexShouldFailValidation() throws Exception { Ignite ignite = prepareGridForTest(); @@ -115,6 +122,7 @@ public void testBrokenSqlIndexShouldFailValidation() throws Exception { /** * Tests that corrupted pages in the index partition are detected. */ + @Test public void testCorruptedIndexPartitionShouldFailValidation() throws Exception { Ignite ignite = prepareGridForTest(); From afac3d063a346ed981bbd6d1230c0e6d0fe5ec8e Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Fri, 7 Dec 2018 20:24:14 +0300 Subject: [PATCH 070/176] IGNITE-10176 migrate non-core modules tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview and rebuild --- .../query/h2/GridIndexRebuildSelfTest.java | 5 ++++ ...idIndexRebuildWithMvccEnabledSelfTest.java | 5 ++++ .../h2/GridIndexingSpiAbstractSelfTest.java | 5 ++++ ...ResultSetIteratorNullifyOnEndSelfTest.java | 8 +++++ .../query/h2/H2StatementCacheSelfTest.java | 9 +++++- .../query/h2/IgniteSqlBigIntegerKeyTest.java | 7 +++++ .../query/h2/IgniteSqlQueryMinMaxTest.java | 13 ++++++++ .../query/h2/PreparedStatementExSelfTest.java | 8 ++++- .../h2/ThreadLocalObjectPoolSelfTest.java | 9 ++++++ .../h2/database/InlineIndexHelperTest.java | 30 +++++++++++++++++++ .../query/h2/sql/BaseH2CompareQueryTest.java | 21 ++++++++++++- .../query/h2/sql/ExplainSelfTest.java | 10 +++++++ .../query/h2/sql/GridQueryParsingTest.java | 17 +++++++++++ .../query/h2/sql/H2CompareBigQueryTest.java | 5 ++++ .../h2/twostep/CacheQueryMemoryLeakTest.java | 5 ++++ .../CreateTableWithDateKeySelfTest.java | 7 +++++ ...ppearedCacheCauseRetryMessageSelfTest.java | 5 ++++ ...pearedCacheWasNotFoundMessageSelfTest.java | 5 ++++ .../InOperationExtractPartitionSelfTest.java | 8 +++++ .../NonCollocatedRetryMessageSelfTest.java | 5 ++++ .../h2/twostep/RetryCauseMessageSelfTest.java | 11 ++++++- .../h2/twostep/TableViewSubquerySelfTest.java | 5 ++++ 22 files changed, 199 insertions(+), 4 deletions(-) diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexRebuildSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexRebuildSelfTest.java index 9afb749e8cd5f..5bbb4e28adef1 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexRebuildSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexRebuildSelfTest.java @@ -34,10 +34,14 @@ import org.apache.ignite.internal.processors.query.schema.SchemaIndexCacheVisitorClosure; import org.apache.ignite.internal.util.lang.GridCursor; import org.apache.ignite.internal.util.typedef.internal.U; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Index rebuild after node restart test. */ +@RunWith(JUnit4.class) public class GridIndexRebuildSelfTest extends DynamicIndexAbstractSelfTest { /** Data size. */ protected static final int AMOUNT = 50; @@ -111,6 +115,7 @@ public class GridIndexRebuildSelfTest extends DynamicIndexAbstractSelfTest { *

    * @throws Exception if failed. */ + @Test public void testIndexRebuild() throws Exception { IgniteEx srv = startServer(); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexRebuildWithMvccEnabledSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexRebuildWithMvccEnabledSelfTest.java index a0d492cd26f60..15f8ca8e73b65 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexRebuildWithMvccEnabledSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexRebuildWithMvccEnabledSelfTest.java @@ -33,10 +33,14 @@ import org.apache.ignite.internal.util.lang.GridCursor; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.lang.IgniteBiTuple; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Index rebuild after node restart test. */ +@RunWith(JUnit4.class) public class GridIndexRebuildWithMvccEnabledSelfTest extends GridIndexRebuildSelfTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration serverConfiguration(int idx, boolean filter) throws Exception { @@ -45,6 +49,7 @@ public class GridIndexRebuildWithMvccEnabledSelfTest extends GridIndexRebuildSel } /** {@inheritDoc} */ + @Test public void testIndexRebuild() throws Exception { IgniteEx srv = startServer(); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexingSpiAbstractSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexingSpiAbstractSelfTest.java index 7e198f846ac4c..716cd029da70d 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexingSpiAbstractSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexingSpiAbstractSelfTest.java @@ -36,10 +36,14 @@ import java.util.Collections; import java.util.LinkedHashMap; import java.util.List; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for all SQL based indexing SPI implementations. */ +@RunWith(JUnit4.class) public abstract class GridIndexingSpiAbstractSelfTest extends GridCommonAbstractTest { /** */ private static final LinkedHashMap fieldsAA = new LinkedHashMap<>(); @@ -129,6 +133,7 @@ protected boolean offheap() { * @throws Exception If failed. */ @SuppressWarnings({"unchecked", "deprecation"}) + @Test public void testLongQueries() throws Exception { IgniteH2Indexing spi = getIndexing(); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/H2ResultSetIteratorNullifyOnEndSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/H2ResultSetIteratorNullifyOnEndSelfTest.java index 66f9dd2b0e350..02c5cba88ac6a 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/H2ResultSetIteratorNullifyOnEndSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/H2ResultSetIteratorNullifyOnEndSelfTest.java @@ -29,10 +29,14 @@ import org.apache.ignite.internal.processors.query.GridQueryCacheObjectsIterator; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for iterator data link erasure after closing or completing */ +@RunWith(JUnit4.class) public class H2ResultSetIteratorNullifyOnEndSelfTest extends GridCommonAbstractTest { /** */ private static final int NODES_COUNT = 2; @@ -46,6 +50,7 @@ public class H2ResultSetIteratorNullifyOnEndSelfTest extends GridCommonAbstractT /** * Non local SQL Fields check nullification after close */ + @Test public void testSqlFieldsQueryClose() { SqlFieldsQuery qry = new SqlFieldsQuery(SELECT_MAX_SAL_SQLF); @@ -63,6 +68,7 @@ public void testSqlFieldsQueryClose() { /** * Non local SQL Fields check nullification after complete */ + @Test public void testSqlFieldsQueryComplete() { SqlFieldsQuery qry = new SqlFieldsQuery(SELECT_MAX_SAL_SQLF); @@ -78,6 +84,7 @@ public void testSqlFieldsQueryComplete() { /** * Local SQL Fields check nullification after close */ + @Test public void testSqlFieldsQueryLocalClose() { SqlFieldsQuery qry = new SqlFieldsQuery(SELECT_MAX_SAL_SQLF); @@ -97,6 +104,7 @@ public void testSqlFieldsQueryLocalClose() { /** * Local SQL Fields check nullification after complete */ + @Test public void testSqlFieldsQueryLocalComplete() { SqlFieldsQuery qry = new SqlFieldsQuery(SELECT_MAX_SAL_SQLF); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/H2StatementCacheSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/H2StatementCacheSelfTest.java index 655d039632386..f3bd8d7f7a1c0 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/H2StatementCacheSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/H2StatementCacheSelfTest.java @@ -19,15 +19,20 @@ import java.sql.PreparedStatement; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class H2StatementCacheSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testEviction() throws Exception { H2StatementCache stmtCache = new H2StatementCache(1); H2CachedStatementKey key1 = new H2CachedStatementKey("", "1"); @@ -44,6 +49,7 @@ public void testEviction() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLruEvictionInStoreOrder() throws Exception { H2StatementCache stmtCache = new H2StatementCache(2); @@ -60,6 +66,7 @@ public void testLruEvictionInStoreOrder() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLruEvictionInAccessOrder() throws Exception { H2StatementCache stmtCache = new H2StatementCache(2); @@ -80,4 +87,4 @@ public void testLruEvictionInAccessOrder() throws Exception { private static PreparedStatement stmt() { return new PreparedStatementExImpl(null); } -} \ No newline at end of file +} diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/IgniteSqlBigIntegerKeyTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/IgniteSqlBigIntegerKeyTest.java index 366c61ac15f12..262beabeb1a88 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/IgniteSqlBigIntegerKeyTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/IgniteSqlBigIntegerKeyTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.cache.query.annotations.QuerySqlField; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Ensures that BigInteger can be used as key */ +@RunWith(JUnit4.class) public class IgniteSqlBigIntegerKeyTest extends GridCommonAbstractTest { /** */ private static final String CACHE_NAME = "Mycache"; @@ -65,6 +69,7 @@ private IgniteCache getCache() { } /** */ + @Test public void testBigIntegerKeyGet() { IgniteCache cache = getCache(); @@ -82,6 +87,7 @@ public void testBigIntegerKeyGet() { } /** */ + @Test public void testBigIntegerKeyQuery() { IgniteCache cache = getCache(); @@ -90,6 +96,7 @@ public void testBigIntegerKeyQuery() { } /** */ + @Test public void testBigIntegerFieldQuery() { IgniteCache cache = getCache(); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/IgniteSqlQueryMinMaxTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/IgniteSqlQueryMinMaxTest.java index e8403ec23a0c8..8ac35d8f9dd11 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/IgniteSqlQueryMinMaxTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/IgniteSqlQueryMinMaxTest.java @@ -29,8 +29,12 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import java.util.List; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** Test for SQL min() and max() optimization */ +@RunWith(JUnit4.class) public class IgniteSqlQueryMinMaxTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryVmIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -80,6 +84,7 @@ public class IgniteSqlQueryMinMaxTest extends GridCommonAbstractTest { } /** Check min() and max() functions in queries */ + @Test public void testQueryMinMax() throws Exception { try (Ignite client = startGrid("client")) { IgniteCache cache = client.cache(CACHE_NAME_2); @@ -118,6 +123,7 @@ public void testQueryMinMax() throws Exception { } /** Check min() and max() on empty cache */ + @Test public void testQueryMinMaxEmptyCache() throws Exception { try (Ignite client = startGrid("client")) { IgniteCache cache = client.cache(CACHE_NAME_2); @@ -135,6 +141,7 @@ public void testQueryMinMaxEmptyCache() throws Exception { * Check min() and max() over _key use correct index * Test uses value object cache */ + @Test public void testMinMaxQueryPlanOnKey() throws Exception { try (Ignite client = startGrid("client")) { IgniteCache cache = client.cache(CACHE_NAME_2); @@ -151,6 +158,7 @@ public void testMinMaxQueryPlanOnKey() throws Exception { * Check min() and max() over value fields use correct index. * Test uses value object cache */ + @Test public void testMinMaxQueryPlanOnFields() throws Exception { try (Ignite client = startGrid("client")) { IgniteCache cache = client.cache(CACHE_NAME_2); @@ -167,6 +175,7 @@ public void testMinMaxQueryPlanOnFields() throws Exception { * Check min() and max() over _key uses correct index * Test uses primitive cache */ + @Test public void testSimpleMinMaxQueryPlanOnKey() throws Exception { try (Ignite client = startGrid("client")) { IgniteCache cache = client.cache(CACHE_NAME); @@ -183,6 +192,7 @@ public void testSimpleMinMaxQueryPlanOnKey() throws Exception { * Check min() and max() over _val uses correct index. * Test uses primitive cache */ + @Test public void testSimpleMinMaxQueryPlanOnValue() throws Exception { try (Ignite client = startGrid("client")) { IgniteCache cache = client.cache(CACHE_NAME); @@ -196,6 +206,7 @@ public void testSimpleMinMaxQueryPlanOnValue() throws Exception { } /** Check min() and max() over group */ + @Test public void testGroupMinMax() throws Exception { try (Ignite client = startGrid("client")) { IgniteCache cache = client.cache(CACHE_NAME_2); @@ -225,6 +236,7 @@ public void testGroupMinMax() throws Exception { } /** Check min() and max() over group with having clause */ + @Test public void testGroupHavingMinMax() throws Exception { try (Ignite client = startGrid("client")) { IgniteCache cache = client.cache(CACHE_NAME_2); @@ -261,6 +273,7 @@ public void testGroupHavingMinMax() throws Exception { } /** Check min() and max() over group with joins */ + @Test public void testJoinGroupMinMax() throws Exception { try (Ignite client = startGrid("client")) { IgniteCache cache = client.cache(CACHE_NAME); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/PreparedStatementExSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/PreparedStatementExSelfTest.java index 22bff3b2a9b9b..808413bce685f 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/PreparedStatementExSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/PreparedStatementExSelfTest.java @@ -19,14 +19,19 @@ import java.sql.PreparedStatement; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class PreparedStatementExSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testStoringMeta() throws Exception { PreparedStatement stmt = stmt(); @@ -40,6 +45,7 @@ public void testStoringMeta() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStoringMoreMetaKeepsExisting() throws Exception { PreparedStatement stmt = stmt(); @@ -58,4 +64,4 @@ public void testStoringMoreMetaKeepsExisting() throws Exception { private static PreparedStatement stmt() { return new PreparedStatementExImpl(null); } -} \ No newline at end of file +} diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/ThreadLocalObjectPoolSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/ThreadLocalObjectPoolSelfTest.java index b7b7a3701c975..7a11261a2f0ca 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/ThreadLocalObjectPoolSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/ThreadLocalObjectPoolSelfTest.java @@ -20,10 +20,14 @@ import java.util.concurrent.CompletableFuture; import org.apache.ignite.internal.processors.query.h2.ThreadLocalObjectPool.Reusable; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class ThreadLocalObjectPoolSelfTest extends GridCommonAbstractTest { /** */ private ThreadLocalObjectPool pool = new ThreadLocalObjectPool<>(Obj::new, 1); @@ -31,6 +35,7 @@ public class ThreadLocalObjectPoolSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testObjectIsReusedAfterRecycling() throws Exception { Reusable o1 = pool.borrow(); o1.recycle(); @@ -43,6 +48,7 @@ public void testObjectIsReusedAfterRecycling() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBorrowedObjectIsNotReturnedTwice() throws Exception { Reusable o1 = pool.borrow(); Reusable o2 = pool.borrow(); @@ -53,6 +59,7 @@ public void testBorrowedObjectIsNotReturnedTwice() throws Exception { /** * @throws Exception If failed. */ + @Test public void testObjectShouldBeClosedOnRecycleIfPoolIsFull() throws Exception { Reusable o1 = pool.borrow(); Reusable o2 = pool.borrow(); @@ -65,6 +72,7 @@ public void testObjectShouldBeClosedOnRecycleIfPoolIsFull() throws Exception { /** * @throws Exception If failed. */ + @Test public void testObjectShouldNotBeReturnedIfPoolIsFull() throws Exception { Reusable o1 = pool.borrow(); Reusable o2 = pool.borrow(); @@ -81,6 +89,7 @@ public void testObjectShouldNotBeReturnedIfPoolIsFull() throws Exception { /** * @throws Exception If failed. */ + @Test public void testObjectShouldReturnedToRecyclingThreadBag() throws Exception { Reusable o1 = pool.borrow(); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/database/InlineIndexHelperTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/database/InlineIndexHelperTest.java index 06001379d36e4..3604248215eb6 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/database/InlineIndexHelperTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/database/InlineIndexHelperTest.java @@ -51,6 +51,9 @@ import org.h2.value.ValueTime; import org.h2.value.ValueTimestamp; import org.h2.value.ValueUuid; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.springframework.util.SerializationUtils; import static org.apache.ignite.internal.processors.query.h2.database.InlineIndexHelper.CANT_BE_COMPARE; @@ -58,6 +61,7 @@ /** * Simple tests for {@link InlineIndexHelper}. */ +@RunWith(JUnit4.class) public class InlineIndexHelperTest extends GridCommonAbstractTest { /** */ private static final int CACHE_ID = 42; @@ -72,6 +76,7 @@ public class InlineIndexHelperTest extends GridCommonAbstractTest { private static final Comparator ALWAYS_FAILS_COMPARATOR = new AlwaysFailsComparator(); /** Test utf-8 string cutting. */ + @Test public void testConvert() { // 8 bytes total: 1b, 1b, 3b, 3b. @@ -86,6 +91,7 @@ public void testConvert() { } /** */ + @Test public void testCompare1bytes() throws Exception { int maxSize = 3 + 2; // 2 ascii chars + 3 bytes header. @@ -101,6 +107,7 @@ public void testCompare1bytes() throws Exception { } /** */ + @Test public void testCompare2bytes() throws Exception { int maxSize = 3 + 4; // 2 2-bytes chars + 3 bytes header. @@ -116,6 +123,7 @@ public void testCompare2bytes() throws Exception { } /** */ + @Test public void testCompare3bytes() throws Exception { int maxSize = 3 + 6; // 2 3-bytes chars + 3 bytes header. @@ -131,6 +139,7 @@ public void testCompare3bytes() throws Exception { } /** */ + @Test public void testCompare4bytes() throws Exception { int maxSize = 3 + 8; // 2 4-bytes chars + 3 bytes header. @@ -146,6 +155,7 @@ public void testCompare4bytes() throws Exception { } /** */ + @Test public void testCompareMixed() throws Exception { int maxSize = 3 + 8; // 2 up to 4-bytes chars + 3 bytes header. @@ -156,6 +166,7 @@ public void testCompareMixed() throws Exception { } /** */ + @Test public void testCompareMixed2() throws Exception { int strCnt = 1000; int symbCnt = 20; @@ -225,6 +236,7 @@ private int putAndCompare(String v1, String v2, int maxSize) throws Exception { } /** Limit is too small to cut */ + @Test public void testStringCut() { // 6 bytes total: 3b, 3b. byte[] bytes = InlineIndexHelper.trimUTF8("\u20ac\u20ac".getBytes(Charsets.UTF_8), 2); @@ -233,6 +245,7 @@ public void testStringCut() { } /** Test on String values compare */ + @Test public void testRelyOnCompare() { InlineIndexHelper ha = new InlineIndexHelper("", Value.STRING, 0, SortOrder.ASCENDING, CompareMode.getInstance(null, 0)); @@ -255,6 +268,7 @@ public void testRelyOnCompare() { } /** Test on Bytes values compare */ + @Test public void testRelyOnCompareBytes() { InlineIndexHelper ha = new InlineIndexHelper("", Value.BYTES, 0, SortOrder.ASCENDING, CompareMode.getInstance(null, 0)); @@ -277,6 +291,7 @@ public void testRelyOnCompareBytes() { } /** Test on Bytes values compare */ + @Test public void testRelyOnCompareJavaObject() { InlineIndexHelper ha = new InlineIndexHelper("",Value.JAVA_OBJECT, 0, SortOrder.ASCENDING, CompareMode.getInstance(null, 0)); @@ -301,6 +316,7 @@ public void testRelyOnCompareJavaObject() { } /** */ + @Test public void testStringTruncate() throws Exception { DataRegionConfiguration plcCfg = new DataRegionConfiguration().setInitialSize(1024 * MB) .setMaxSize(1024 * MB); @@ -352,6 +368,7 @@ public void testStringTruncate() throws Exception { } /** */ + @Test public void testBytes() throws Exception { DataRegionConfiguration plcCfg = new DataRegionConfiguration().setInitialSize(1024 * MB) .setMaxSize(1024 * MB); @@ -410,6 +427,7 @@ public void testBytes() throws Exception { } /** */ + @Test public void testJavaObject() throws Exception { DataRegionConfiguration plcCfg = new DataRegionConfiguration().setInitialSize(1024 * MB) .setMaxSize(1024 * MB); @@ -468,6 +486,7 @@ public void testJavaObject() throws Exception { } /** */ + @Test public void testNull() throws Exception { testPutGet(ValueInt.get(-1), ValueNull.INSTANCE, ValueInt.get(3)); testPutGet(ValueInt.get(-1), ValueNull.INSTANCE, ValueInt.get(3)); @@ -477,41 +496,49 @@ public void testNull() throws Exception { } /** */ + @Test public void testBoolean() throws Exception { testPutGet(ValueBoolean.get(true), ValueBoolean.get(false), ValueBoolean.get(true)); } /** */ + @Test public void testByte() throws Exception { testPutGet(ValueByte.get((byte)-1), ValueByte.get((byte)2), ValueByte.get((byte)3)); } /** */ + @Test public void testShort() throws Exception { testPutGet(ValueShort.get((short)-32000), ValueShort.get((short)2), ValueShort.get((short)3)); } /** */ + @Test public void testInt() throws Exception { testPutGet(ValueInt.get(-1), ValueInt.get(2), ValueInt.get(3)); } /** */ + @Test public void testLong() throws Exception { testPutGet(ValueLong.get(-1), ValueLong.get(2), ValueLong.get(3)); } /** */ + @Test public void testFloat() throws Exception { testPutGet(ValueFloat.get(1.1f), ValueFloat.get(2.2f), ValueFloat.get(1.1f)); } /** */ + @Test public void testDouble() throws Exception { testPutGet(ValueDouble.get(1.1f), ValueDouble.get(2.2f), ValueDouble.get(1.1f)); } /** */ + @Test public void testDate() throws Exception { testPutGet(ValueDate.get(Date.valueOf("2017-02-20")), ValueDate.get(Date.valueOf("2017-02-21")), @@ -519,6 +546,7 @@ public void testDate() throws Exception { } /** */ + @Test public void testTime() throws Exception { testPutGet(ValueTime.get(Time.valueOf("10:01:01")), ValueTime.get(Time.valueOf("11:02:02")), @@ -526,6 +554,7 @@ public void testTime() throws Exception { } /** */ + @Test public void testTimestamp() throws Exception { testPutGet(ValueTimestamp.get(Timestamp.valueOf("2017-02-20 10:01:01")), ValueTimestamp.get(Timestamp.valueOf("2017-02-20 10:01:01")), @@ -533,6 +562,7 @@ public void testTimestamp() throws Exception { } /** */ + @Test public void testUUID() throws Exception { testPutGet(ValueUuid.get(UUID.randomUUID().toString()), ValueUuid.get(UUID.randomUUID().toString()), diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/BaseH2CompareQueryTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/BaseH2CompareQueryTest.java index f9d25d67d8f0e..157dc3b61dae8 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/BaseH2CompareQueryTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/BaseH2CompareQueryTest.java @@ -39,11 +39,15 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testsuites.IgniteIgnore; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Base set of queries to compare query results from h2 database instance and mixed ignite caches (replicated and partitioned) * which have the same data models and data content. */ +@RunWith(JUnit4.class) public class BaseH2CompareQueryTest extends AbstractH2CompareQueryTest { /** Org count. */ public static final int ORG_CNT = 30; @@ -223,6 +227,7 @@ public class BaseH2CompareQueryTest extends AbstractH2CompareQueryTest { /** * */ + @Test public void testSelectStar() { assertEquals(1, cachePers.query(new SqlQuery,Person>( Person.class, "\t\r\n select \n*\t from Person limit 1")).getAll().size()); @@ -239,6 +244,7 @@ public void testSelectStar() { /** * @throws Exception If failed. */ + @Test public void testInvalidQuery() throws Exception { final SqlFieldsQuery sql = new SqlFieldsQuery("SELECT firstName from Person where id <> ? and orgId <> ?"); @@ -255,6 +261,7 @@ public void testInvalidQuery() throws Exception { * @throws Exception */ @IgniteIgnore(value = "https://issues.apache.org/jira/browse/IGNITE-705", forceFailure = true) + @Test public void testAllExamples() throws Exception { // compareQueryRes0("select ? limit ? offset ?"); @@ -424,6 +431,7 @@ public void testAllExamples() throws Exception { /** * @throws Exception If failed. */ + @Test public void testParamSubstitution() throws Exception { compareQueryRes0(cachePers, "select ? from \"pers\".Person", "Some arg"); } @@ -431,6 +439,7 @@ public void testParamSubstitution() throws Exception { /** * @throws SQLException If failed. */ + @Test public void testAggregateOrderBy() throws SQLException { compareOrderedQueryRes0(cachePers, "select firstName name, count(*) cnt from \"pers\".Person " + "group by name order by cnt, name desc"); @@ -439,6 +448,7 @@ public void testAggregateOrderBy() throws SQLException { /** * @throws Exception If failed. */ + @Test public void testNullParamSubstitution() throws Exception { List> rs1 = compareQueryRes0(cachePers, "select ? from \"pers\".Person", null); @@ -449,6 +459,7 @@ public void testNullParamSubstitution() throws Exception { /** * */ + @Test public void testUnion() throws SQLException { String base = "select _val v from \"pers\".Person"; @@ -464,6 +475,7 @@ public void testUnion() throws SQLException { /** * @throws Exception If failed. */ + @Test public void testEmptyResult() throws Exception { compareQueryRes0(cachePers, "select id from \"pers\".Person where 0 = 1"); } @@ -471,6 +483,7 @@ public void testEmptyResult() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSqlQueryWithAggregation() throws Exception { compareQueryRes0(cachePers, "select avg(salary) from \"pers\".Person, \"org\".Organization " + "where Person.orgId = Organization.id and " + @@ -480,6 +493,7 @@ public void testSqlQueryWithAggregation() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSqlFieldsQuery() throws Exception { compareQueryRes0(cachePers, "select concat(firstName, ' ', lastName) from \"pers\".Person"); } @@ -487,6 +501,7 @@ public void testSqlFieldsQuery() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSqlFieldsQueryWithJoin() throws Exception { compareQueryRes0(cachePers, "select concat(firstName, ' ', lastName), " + "Organization.name from \"pers\".Person, \"org\".Organization where " @@ -496,6 +511,7 @@ public void testSqlFieldsQueryWithJoin() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOrdered() throws Exception { compareOrderedQueryRes0(cachePers, "select firstName, lastName" + " from \"pers\".Person" + @@ -505,6 +521,7 @@ public void testOrdered() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSimpleJoin() throws Exception { // Have expected results. compareQueryRes0(cachePers, String.format("select id, firstName, lastName" + @@ -520,6 +537,7 @@ public void testSimpleJoin() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSimpleReplicatedSelect() throws Exception { compareQueryRes0(cacheProd, "select id, name from \"prod\".Product"); } @@ -527,6 +545,7 @@ public void testSimpleReplicatedSelect() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCrossCache() throws Exception { compareQueryRes0(cachePers, "select firstName, lastName" + " from \"pers\".Person, \"purch\".Purchase" + @@ -962,4 +981,4 @@ private static class Address implements Serializable { return "Address [id=" + id + ", street=" + street + ']'; } } -} \ No newline at end of file +} diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/ExplainSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/ExplainSelfTest.java index 1641d41545804..8e3f881b565ed 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/ExplainSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/ExplainSelfTest.java @@ -25,10 +25,14 @@ import org.apache.ignite.internal.processors.query.IgniteSQLException; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Smoke checks for explain operations. */ +@RunWith(JUnit4.class) public class ExplainSelfTest extends GridCommonAbstractTest { /** Ignite instance. */ private static IgniteEx ignite; @@ -61,6 +65,7 @@ public class ExplainSelfTest extends GridCommonAbstractTest { * Complex negative check that verifies EXPLAINs of update operations are not supported and cause correct * exceptions. Used local and non local queries */ + @Test public void testComplex() { assertNotSupported("EXPLAIN INSERT INTO PUBLIC.TEST VALUES (1, 2);", false); assertNotSupported("EXPLAIN UPDATE PUBLIC.TEST SET VAL = VAL + 1;", false); @@ -80,6 +85,7 @@ public void testComplex() { /** * Check that explain updates are not supported. Perform the same sql query as non-local and then as local query. */ + @Test public void test2InsertsLocalLast() { assertNotSupported("EXPLAIN INSERT INTO PUBLIC.TEST VALUES (1, 2);", false); assertNotSupported("EXPLAIN INSERT INTO PUBLIC.TEST VALUES (1, 2);", true); @@ -88,6 +94,7 @@ public void test2InsertsLocalLast() { /** * Check that explain updates are not supported. Perform the same sql query as local and then as non-local query. */ + @Test public void test2InsertsLocalFirst() { assertNotSupported("EXPLAIN INSERT INTO PUBLIC.TEST VALUES (3, 4);", true); assertNotSupported("EXPLAIN INSERT INTO PUBLIC.TEST VALUES (3, 4);", false); @@ -96,6 +103,7 @@ public void test2InsertsLocalFirst() { /** * Check that explain updates are not supported. Perform the same sql query as local 2 times in a row. */ + @Test public void test2LocalInserts() { assertNotSupported("EXPLAIN INSERT INTO PUBLIC.TEST VALUES (5, 6);", true); assertNotSupported("EXPLAIN INSERT INTO PUBLIC.TEST VALUES (5, 6);", true); @@ -104,6 +112,7 @@ public void test2LocalInserts() { /** * Check that explain updates are not supported. Perform the same sql query as non-local 2 times in a row. */ + @Test public void test2NonLocalInserts() { assertNotSupported("EXPLAIN INSERT INTO PUBLIC.TEST VALUES (7, 8);", false); assertNotSupported("EXPLAIN INSERT INTO PUBLIC.TEST VALUES (7, 8);", false); @@ -112,6 +121,7 @@ public void test2NonLocalInserts() { /** * Check that EXPLAIN SELECT queries doesn't cause errors. */ + @Test public void testExplainSelect() { execute("EXPLAIN SELECT * FROM PUBLIC.TEST;", false); execute("EXPLAIN SELECT * FROM PUBLIC.TEST;", true); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java index 1a4b24818c2f6..c637f47c28080 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java @@ -60,6 +60,9 @@ import org.h2.table.Column; import org.h2.value.Value; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -67,6 +70,7 @@ /** * */ +@RunWith(JUnit4.class) public class GridQueryParsingTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -134,6 +138,7 @@ private CacheConfiguration cacheConfiguration(@NotNull String name, String sqlSc /** * @throws Exception If failed. */ + @Test public void testParseSelectAndUnion() throws Exception { checkQuery("select 1 from Person p where addrIds in ((1,2,3), (3,4,5))"); checkQuery("select 1 from Person p where addrId in ((1,))"); @@ -327,6 +332,7 @@ public void testParseSelectAndUnion() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUseIndexHints() throws Exception { checkQuery("select * from Person use index (\"PERSON_NAME_IDX\")"); checkQuery("select * from Person use index (\"PERSON_PARENTNAME_IDX\")"); @@ -344,6 +350,7 @@ public void testUseIndexHints() throws Exception { * * @throws Exception If failed. */ + @Test public void testParseTableFilter() throws Exception { Prepared prepared = parse("select Person.old, p1.old, p1.addrId from Person, Person p1 " + "where exists(select 1 from sch2.Address a where a.id = p1.addrId)"); @@ -387,6 +394,7 @@ public void testParseTableFilter() throws Exception { } /** */ + @Test public void testParseMerge() throws Exception { /* Plain rows w/functions, operators, defaults, and placeholders. */ checkQuery("merge into Person(old, name) values(5, 'John')"); @@ -433,6 +441,7 @@ public void testParseMerge() throws Exception { } /** */ + @Test public void testParseInsert() throws Exception { /* Plain rows w/functions, operators, defaults, and placeholders. */ checkQuery("insert into Person(old, name) values(5, 'John')"); @@ -475,6 +484,7 @@ public void testParseInsert() throws Exception { } /** */ + @Test public void testParseDelete() throws Exception { checkQuery("delete from Person"); checkQuery("delete from Person p where p.old > ?"); @@ -486,6 +496,7 @@ public void testParseDelete() throws Exception { } /** */ + @Test public void testParseUpdate() throws Exception { checkQuery("update Person set name='Peter'"); checkQuery("update Person per set name='Peter', old = 5"); @@ -502,6 +513,7 @@ public void testParseUpdate() throws Exception { /** * */ + @Test public void testParseCreateIndex() throws Exception { assertCreateIndexEquals( buildCreateIndex(null, "Person", "sch1", false, QueryIndexType.SORTED, @@ -560,6 +572,7 @@ public void testParseCreateIndex() throws Exception { /** * */ + @Test public void testParseDropIndex() throws Exception { // Schema that is not set defaults to default schema of connection which is sch1 assertDropIndexEquals(buildDropIndex("idx", "sch1", false), "drop index idx"); @@ -577,6 +590,7 @@ public void testParseDropIndex() throws Exception { /** * */ + @Test public void testParseDropTable() throws Exception { // Schema that is not set defaults to default schema of connection which is sch1 assertDropTableEquals(buildDropTable("sch1", "tbl", false), "drop table tbl"); @@ -592,6 +606,7 @@ public void testParseDropTable() throws Exception { } /** */ + @Test public void testParseCreateTable() throws Exception { assertCreateTableEquals( buildCreateTable("sch1", "Person", "cache", F.asList("id", "city"), @@ -635,6 +650,7 @@ false, c("id", Value.INT), c("city", Value.STRING), c("name", Value.STRING), } /** */ + @Test public void testParseCreateTableWithDefaults() { assertParseThrows("create table Person (id int primary key, age int, " + "ts TIMESTAMP default CURRENT_TIMESTAMP()) WITH \"template=cache\"", @@ -652,6 +668,7 @@ public void testParseCreateTableWithDefaults() { } /** */ + @Test public void testParseAlterTableAddColumn() throws Exception { assertAlterTableAddColumnEquals(buildAlterTableAddColumn("SCH2", "Person", false, false, c("COMPANY", Value.STRING)), "ALTER TABLE SCH2.Person ADD company varchar"); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/H2CompareBigQueryTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/H2CompareBigQueryTest.java index 79ef96cd31ca0..f2ecfa560a7f8 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/H2CompareBigQueryTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/H2CompareBigQueryTest.java @@ -36,6 +36,9 @@ import org.apache.ignite.cache.query.annotations.QuerySqlField; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.util.typedef.X; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Executes one big query (and subqueries of the big query) to compare query results from h2 database instance and @@ -72,6 +75,7 @@ * * */ +@RunWith(JUnit4.class) public class H2CompareBigQueryTest extends AbstractH2CompareQueryTest { /** Root order count. */ private static final int ROOT_ORDER_CNT = 1000; @@ -280,6 +284,7 @@ protected boolean distributedJoins() { /** * @throws Exception If failed. */ + @Test public void testBigQuery() throws Exception { X.println(); X.println(bigQry); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/CacheQueryMemoryLeakTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/CacheQueryMemoryLeakTest.java index 754504e14a990..08e0c79b75a68 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/CacheQueryMemoryLeakTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/CacheQueryMemoryLeakTest.java @@ -36,8 +36,12 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** */ +@RunWith(JUnit4.class) public class CacheQueryMemoryLeakTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryVmIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -64,6 +68,7 @@ public class CacheQueryMemoryLeakTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testResultIsMultipleOfPage() throws Exception { IgniteEx srv = (IgniteEx)startGrid("server"); Ignite client = startGrid("client"); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/CreateTableWithDateKeySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/CreateTableWithDateKeySelfTest.java index 91d4c0dc67f5d..be22af5ed8810 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/CreateTableWithDateKeySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/CreateTableWithDateKeySelfTest.java @@ -30,10 +30,14 @@ import org.apache.ignite.cache.query.SqlFieldsQuery; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class CreateTableWithDateKeySelfTest extends GridCommonAbstractTest { /** */ private static final int NODES_COUNT = 1; @@ -62,6 +66,7 @@ public class CreateTableWithDateKeySelfTest extends GridCommonAbstractTest { } /** */ + @Test public void testPassTableWithDateKeyCreation() { final String creationQry = "CREATE TABLE %s (id DATE primary key, dateField DATE) " + "WITH \"cache_name=%s, WRAP_VALUE=false\""; @@ -76,6 +81,7 @@ public void testPassTableWithDateKeyCreation() { } /** */ + @Test public void testPassTableWithTimeKeyCreation() { final String creationQry = "CREATE TABLE %s (id TIME primary key, dateField TIME) " + "WITH \"cache_name=%s, WRAP_VALUE=false\""; @@ -90,6 +96,7 @@ public void testPassTableWithTimeKeyCreation() { } /** */ + @Test public void testPassTableWithTimeStampKeyCreation() { final String creationQry = "CREATE TABLE %s (id TIMESTAMP primary key, dateField TIMESTAMP) " + "WITH \"cache_name=%s, WRAP_VALUE=false\""; diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/DisappearedCacheCauseRetryMessageSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/DisappearedCacheCauseRetryMessageSelfTest.java index 8c4358a7fd722..b9c846ad7a57c 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/DisappearedCacheCauseRetryMessageSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/DisappearedCacheCauseRetryMessageSelfTest.java @@ -32,6 +32,9 @@ import org.apache.ignite.plugin.extensions.communication.Message; import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_SQL_RETRY_TIMEOUT; import static org.apache.ignite.internal.processors.query.h2.twostep.JoinSqlTestHelper.Organization; @@ -40,6 +43,7 @@ /** * Failed to reserve partitions for query (cache is not found on local node) Root cause test */ +@RunWith(JUnit4.class) public class DisappearedCacheCauseRetryMessageSelfTest extends GridCommonAbstractTest { /** */ private static final int NODES_COUNT = 2; @@ -51,6 +55,7 @@ public class DisappearedCacheCauseRetryMessageSelfTest extends GridCommonAbstrac private IgniteCache orgCache; /** */ + @Test public void testDisappearedCacheCauseRetryMessage() { SqlQuery qry = new SqlQuery(JoinSqlTestHelper.Person.class, JoinSqlTestHelper.JOIN_SQL).setArgs("Organization #0"); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/DisappearedCacheWasNotFoundMessageSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/DisappearedCacheWasNotFoundMessageSelfTest.java index bc8961785ecce..eedfc59c7d1f6 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/DisappearedCacheWasNotFoundMessageSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/DisappearedCacheWasNotFoundMessageSelfTest.java @@ -31,6 +31,9 @@ import org.apache.ignite.plugin.extensions.communication.Message; import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_SQL_RETRY_TIMEOUT; import static org.apache.ignite.internal.processors.query.h2.twostep.JoinSqlTestHelper.Organization; @@ -39,6 +42,7 @@ /** * Grid cache context is not registered for cache id root cause message test */ +@RunWith(JUnit4.class) public class DisappearedCacheWasNotFoundMessageSelfTest extends GridCommonAbstractTest { /** */ private static final int NODES_COUNT = 2; @@ -50,6 +54,7 @@ public class DisappearedCacheWasNotFoundMessageSelfTest extends GridCommonAbstra private IgniteCache orgCache; /** */ + @Test public void testDisappearedCacheWasNotFoundMessage() { SqlQuery qry = new SqlQuery(Person.class, JoinSqlTestHelper.JOIN_SQL).setArgs("Organization #0"); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/InOperationExtractPartitionSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/InOperationExtractPartitionSelfTest.java index d27fc52187cad..7978943030458 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/InOperationExtractPartitionSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/InOperationExtractPartitionSelfTest.java @@ -35,11 +35,15 @@ import org.apache.ignite.plugin.extensions.communication.Message; import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.processors.query.h2.twostep.JoinSqlTestHelper.ORG; import static org.apache.ignite.internal.processors.query.h2.twostep.JoinSqlTestHelper.ORG_COUNT; /** */ +@RunWith(JUnit4.class) public class InOperationExtractPartitionSelfTest extends GridCommonAbstractTest { /** */ private static final int NODES_COUNT = 8; @@ -115,6 +119,7 @@ public class InOperationExtractPartitionSelfTest extends GridCommonAbstractTest } /** */ + @Test public void testAlternativeUsageOfIn(){ try (FieldsQueryCursor> cur = orgCache.query(new SqlFieldsQuery( "SELECT * FROM Organization org WHERE org._KEY IN (SELECT subOrg._KEY FROM Organization subOrg)"))) { @@ -128,11 +133,13 @@ public void testAlternativeUsageOfIn(){ } /** */ + @Test public void testEmptyList() { testInOperator(Collections.emptyList(), null, 0L, NODES_COUNT - 1); } /** */ + @Test public void testSingleValueList() { testInOperator(Collections.singletonList(ORG + 0), null, 1L, 1); testInOperator(Collections.singletonList(ORG + 1), null, 1L, 1); @@ -145,6 +152,7 @@ public void testSingleValueList() { } /** */ + @Test public void testMultipleValueList() { testInOperator(Arrays.asList(ORG + 0, ORG + 3, ORG + String.valueOf(ORG_COUNT - 1)), null, 3, 3); testInOperator(Arrays.asList("ORG", ORG + 0, ORG + 4, ORG + String.valueOf(ORG_COUNT - 1)), null, 3, 4); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/NonCollocatedRetryMessageSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/NonCollocatedRetryMessageSelfTest.java index e8f66244a4287..a1abb23cb4d23 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/NonCollocatedRetryMessageSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/NonCollocatedRetryMessageSelfTest.java @@ -35,12 +35,16 @@ import org.apache.ignite.spi.IgniteSpiException; import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_SQL_RETRY_TIMEOUT; /** * Failed to execute non-collocated query root cause message test */ +@RunWith(JUnit4.class) public class NonCollocatedRetryMessageSelfTest extends GridCommonAbstractTest { /** */ private static final int NODES_COUNT = 2; @@ -58,6 +62,7 @@ public class NonCollocatedRetryMessageSelfTest extends GridCommonAbstractTest { private IgniteCache personCache; /** */ + @Test public void testNonCollocatedRetryMessage() { SqlQuery qry = new SqlQuery( JoinSqlTestHelper.Person.class, JoinSqlTestHelper.JOIN_SQL).setArgs("Organization #0"); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/RetryCauseMessageSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/RetryCauseMessageSelfTest.java index f7486937a131c..b3fb7bc5bc737 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/RetryCauseMessageSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/RetryCauseMessageSelfTest.java @@ -43,6 +43,9 @@ import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_SQL_RETRY_TIMEOUT; import static org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion.NONE; @@ -53,6 +56,7 @@ /** * Test for 6 retry cases */ +@RunWith(JUnit4.class) public class RetryCauseMessageSelfTest extends GridCommonAbstractTest { /** */ private static final int NODES_COUNT = 2; @@ -80,6 +84,7 @@ public class RetryCauseMessageSelfTest extends GridCommonAbstractTest { /** * Failed to reserve partitions for query (cache is not found on local node) */ + @Test public void testSynthCacheWasNotFoundMessage() { GridMapQueryExecutor mapQryExec = GridTestUtils.getFieldValue(h2Idx, IgniteH2Indexing.class, "mapQryExec"); @@ -121,6 +126,7 @@ public void testSynthCacheWasNotFoundMessage() { /** * Failed to reserve partitions for query (group reservation failed) */ + @Test public void testGrpReservationFailureMessage() { final GridMapQueryExecutor mapQryExec = GridTestUtils.getFieldValue(h2Idx, IgniteH2Indexing.class, "mapQryExec"); @@ -166,6 +172,7 @@ public void testGrpReservationFailureMessage() { /** * Failed to reserve partitions for query (partition of REPLICATED cache is not in OWNING state) */ + @Test public void testReplicatedCacheReserveFailureMessage() { fail("https://issues.apache.org/jira/browse/IGNITE-7039"); @@ -191,7 +198,7 @@ public void testReplicatedCacheReserveFailureMessage() { aState.getAndSet(stateVal); } - else + else startedExecutor.onMessage(nodeId, msg); } }.insertRealExecutor(mapQryExec)); @@ -217,6 +224,7 @@ public void testReplicatedCacheReserveFailureMessage() { /** * Failed to reserve partitions for query (partition of PARTITIONED cache cannot be reserved) */ + @Test public void testPartitionedCacheReserveFailureMessage() { GridMapQueryExecutor mapQryExec = GridTestUtils.getFieldValue(h2Idx, IgniteH2Indexing.class, "mapQryExec"); @@ -267,6 +275,7 @@ public void testPartitionedCacheReserveFailureMessage() { /** * Failed to execute non-collocated query (will retry) */ + @Test public void testNonCollocatedFailureMessage() { final GridMapQueryExecutor mapQryExec = GridTestUtils.getFieldValue(h2Idx, IgniteH2Indexing.class, "mapQryExec"); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/TableViewSubquerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/TableViewSubquerySelfTest.java index eaf4243018ff3..677344d719cf8 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/TableViewSubquerySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/TableViewSubquerySelfTest.java @@ -24,10 +24,14 @@ import org.apache.ignite.cache.query.SqlFieldsQuery; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class TableViewSubquerySelfTest extends GridCommonAbstractTest { /** */ private static final int NODES_COUNT = 1; @@ -52,6 +56,7 @@ public class TableViewSubquerySelfTest extends GridCommonAbstractTest { } /** */ + @Test public void testSubqueryTableView() { final String cacheName = "a1"; From a25215d6cb01c9968755bd171c22ccf5abaa7b6e Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Fri, 7 Dec 2018 20:27:48 +0300 Subject: [PATCH 071/176] IGNITE-10176 migrate non-core modules tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview and rebuild --- ...eCacheGroupsSqlSegmentedIndexSelfTest.java | 5 + .../query/IgniteCachelessQueriesSelfTest.java | 24 + .../query/IgniteQueryDedicatedPoolTest.java | 7 + .../query/IgniteSqlDefaultValueTest.java | 9 + .../IgniteSqlDistributedJoinSelfTest.java | 5 + .../IgniteSqlEntryCacheModeAgnosticTest.java | 5 + .../IgniteSqlGroupConcatCollocatedTest.java | 7 + ...IgniteSqlGroupConcatNotCollocatedTest.java | 7 + .../query/IgniteSqlKeyValueFieldsTest.java | 795 +++++++++--------- .../query/IgniteSqlNotNullConstraintTest.java | 46 + .../IgniteSqlParameterizedQueryTest.java | 5 + .../query/IgniteSqlQueryParallelismTest.java | 8 +- .../query/IgniteSqlRoutingTest.java | 18 + .../query/IgniteSqlSchemaIndexingTest.java | 8 + .../IgniteSqlSegmentedIndexSelfTest.java | 10 + ...SqlSkipReducerOnUpdateDmlFlagSelfTest.java | 24 + ...niteSqlSkipReducerOnUpdateDmlSelfTest.java | 13 + .../query/IgniteSqlSplitterSelfTest.java | 48 ++ .../processors/query/LazyQuerySelfTest.java | 8 + .../MultipleStatementsSqlQuerySelfTest.java | 8 + .../processors/query/RunningQueriesTest.java | 5 + .../query/SqlIllegalSchemaSelfTest.java | 12 + .../query/SqlNestedQuerySelfTest.java | 5 + .../query/SqlPushDownFunctionTest.java | 5 + .../processors/query/SqlSchemaSelfTest.java | 12 + .../query/SqlSystemViewsSelfTest.java | 12 +- 26 files changed, 718 insertions(+), 393 deletions(-) diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteCacheGroupsSqlSegmentedIndexSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteCacheGroupsSqlSegmentedIndexSelfTest.java index c0a4fb2e66f6f..161cfd0fa2189 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteCacheGroupsSqlSegmentedIndexSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteCacheGroupsSqlSegmentedIndexSelfTest.java @@ -18,10 +18,14 @@ package org.apache.ignite.internal.processors.query; import org.apache.ignite.configuration.CacheConfiguration; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteCacheGroupsSqlSegmentedIndexSelfTest extends IgniteSqlSegmentedIndexSelfTest { /** {@inheritDoc} */ @Override protected CacheConfiguration cacheConfig(String name, boolean partitioned, Class... idxTypes) { @@ -31,6 +35,7 @@ public class IgniteCacheGroupsSqlSegmentedIndexSelfTest extends IgniteSqlSegment /** * @throws Exception If failed. */ + @Test @Override public void testSegmentedPartitionedWithReplicated() throws Exception { log.info("Test is ignored"); } diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteCachelessQueriesSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteCachelessQueriesSelfTest.java index 47ec1dd5de3d6..001d6cfa27fa9 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteCachelessQueriesSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteCachelessQueriesSelfTest.java @@ -35,10 +35,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for behavior in various cases of local and distributed queries. */ +@RunWith(JUnit4.class) public class IgniteCachelessQueriesSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -109,6 +113,7 @@ protected CacheConfiguration cacheConfig(String name, TestCacheMode /** * */ + @Test public void testDistributedQueryOnPartitionedCaches() { createCachesAndExecuteQuery(TestCacheMode.PARTITIONED, TestCacheMode.PARTITIONED, false, false); @@ -118,6 +123,7 @@ public void testDistributedQueryOnPartitionedCaches() { /** * */ + @Test public void testDistributedQueryOnPartitionedAndReplicatedCache() { createCachesAndExecuteQuery(TestCacheMode.PARTITIONED, TestCacheMode.REPLICATED, false, false); @@ -127,6 +133,7 @@ public void testDistributedQueryOnPartitionedAndReplicatedCache() { /** * */ + @Test public void testDistributedQueryOnReplicatedCaches() { createCachesAndExecuteQuery(TestCacheMode.REPLICATED, TestCacheMode.REPLICATED, false, false); @@ -136,6 +143,7 @@ public void testDistributedQueryOnReplicatedCaches() { /** * */ + @Test public void testDistributedQueryOnSegmentedCaches() { createCachesAndExecuteQuery(TestCacheMode.SEGMENTED, TestCacheMode.SEGMENTED, false, false); @@ -145,6 +153,7 @@ public void testDistributedQueryOnSegmentedCaches() { /** * */ + @Test public void testDistributedQueryOnReplicatedAndSegmentedCache() { createCachesAndExecuteQuery(TestCacheMode.REPLICATED, TestCacheMode.SEGMENTED, false, false); @@ -154,6 +163,7 @@ public void testDistributedQueryOnReplicatedAndSegmentedCache() { /** * */ + @Test public void testDistributedQueryOnPartitionedCachesWithReplicatedFlag() { createCachesAndExecuteQuery(TestCacheMode.PARTITIONED, TestCacheMode.PARTITIONED, true, false); @@ -163,6 +173,7 @@ public void testDistributedQueryOnPartitionedCachesWithReplicatedFlag() { /** * */ + @Test public void testDistributedQueryOnPartitionedAndReplicatedCacheWithReplicatedFlag() { createCachesAndExecuteQuery(TestCacheMode.PARTITIONED, TestCacheMode.REPLICATED, true, false); @@ -172,6 +183,7 @@ public void testDistributedQueryOnPartitionedAndReplicatedCacheWithReplicatedFla /** * */ + @Test public void testLocalQueryOnReplicatedCachesWithReplicatedFlag() { createCachesAndExecuteQuery(TestCacheMode.REPLICATED, TestCacheMode.REPLICATED, true, false); @@ -181,6 +193,7 @@ public void testLocalQueryOnReplicatedCachesWithReplicatedFlag() { /** * */ + @Test public void testDistributedQueryOnSegmentedCachesWithReplicatedFlag() { createCachesAndExecuteQuery(TestCacheMode.SEGMENTED, TestCacheMode.SEGMENTED, true, false); @@ -190,6 +203,7 @@ public void testDistributedQueryOnSegmentedCachesWithReplicatedFlag() { /** * */ + @Test public void testDistributedQueryOnReplicatedAndSegmentedCacheWithReplicatedFlag() { createCachesAndExecuteQuery(TestCacheMode.REPLICATED, TestCacheMode.SEGMENTED, true, false); @@ -199,6 +213,7 @@ public void testDistributedQueryOnReplicatedAndSegmentedCacheWithReplicatedFlag( /** * */ + @Test public void testLocalQueryOnPartitionedCachesWithLocalFlag() { createCachesAndExecuteQuery(TestCacheMode.PARTITIONED, TestCacheMode.PARTITIONED, false, true); @@ -208,6 +223,7 @@ public void testLocalQueryOnPartitionedCachesWithLocalFlag() { /** * */ + @Test public void testLocalQueryOnPartitionedAndReplicatedCacheWithLocalFlag() { createCachesAndExecuteQuery(TestCacheMode.PARTITIONED, TestCacheMode.REPLICATED, false, true); @@ -217,6 +233,7 @@ public void testLocalQueryOnPartitionedAndReplicatedCacheWithLocalFlag() { /** * */ + @Test public void testLocalQueryOnReplicatedCachesWithLocalFlag() { createCachesAndExecuteQuery(TestCacheMode.REPLICATED, TestCacheMode.REPLICATED, false, true); @@ -226,6 +243,7 @@ public void testLocalQueryOnReplicatedCachesWithLocalFlag() { /** * */ + @Test public void testLocalTwoStepQueryOnSegmentedCachesWithLocalFlag() { createCachesAndExecuteQuery(TestCacheMode.SEGMENTED, TestCacheMode.SEGMENTED, false, true); @@ -235,6 +253,7 @@ public void testLocalTwoStepQueryOnSegmentedCachesWithLocalFlag() { /** * */ + @Test public void testLocalTwoStepQueryOnReplicatedAndSegmentedCacheWithLocalFlag() { createCachesAndExecuteQuery(TestCacheMode.REPLICATED, TestCacheMode.SEGMENTED, false, true); @@ -244,6 +263,7 @@ public void testLocalTwoStepQueryOnReplicatedAndSegmentedCacheWithLocalFlag() { /** * */ + @Test public void testLocalQueryOnPartitionedCachesWithReplicatedAndLocalFlag() { createCachesAndExecuteQuery(TestCacheMode.PARTITIONED, TestCacheMode.PARTITIONED, false, true); @@ -253,6 +273,7 @@ public void testLocalQueryOnPartitionedCachesWithReplicatedAndLocalFlag() { /** * */ + @Test public void testLocalQueryOnPartitionedAndReplicatedCacheWithReplicatedAndLocalFlag() { createCachesAndExecuteQuery(TestCacheMode.PARTITIONED, TestCacheMode.REPLICATED, true, true); @@ -262,6 +283,7 @@ public void testLocalQueryOnPartitionedAndReplicatedCacheWithReplicatedAndLocalF /** * */ + @Test public void testLocalQueryOnReplicatedCachesWithReplicatedAndLocalFlag() { createCachesAndExecuteQuery(TestCacheMode.REPLICATED, TestCacheMode.REPLICATED, true, true); @@ -271,6 +293,7 @@ public void testLocalQueryOnReplicatedCachesWithReplicatedAndLocalFlag() { /** * */ + @Test public void testLocalTwoStepQueryOnSegmentedCachesWithReplicatedAndLocalFlag() { createCachesAndExecuteQuery(TestCacheMode.SEGMENTED, TestCacheMode.SEGMENTED, true, true); @@ -280,6 +303,7 @@ public void testLocalTwoStepQueryOnSegmentedCachesWithReplicatedAndLocalFlag() { /** * */ + @Test public void testLocalTwoStepQueryOnReplicatedAndSegmentedCacheWithReplicatedAndLocalFlag() { createCachesAndExecuteQuery(TestCacheMode.REPLICATED, TestCacheMode.SEGMENTED, true, true); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteQueryDedicatedPoolTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteQueryDedicatedPoolTest.java index b2f4e47ec2048..c4ed9bd2650ec 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteQueryDedicatedPoolTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteQueryDedicatedPoolTest.java @@ -46,10 +46,14 @@ import org.apache.ignite.spi.indexing.IndexingSpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Ensures that SQL queries are executed in a dedicated thread pool. */ +@RunWith(JUnit4.class) public class IgniteQueryDedicatedPoolTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryVmIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -101,6 +105,7 @@ public class IgniteQueryDedicatedPoolTest extends GridCommonAbstractTest { * @throws Exception If failed. * @see GridCacheTwoStepQuery#isLocal() */ + @Test public void testSqlQueryUsesDedicatedThreadPool() throws Exception { try (Ignite client = startGrid("client")) { IgniteCache cache = client.cache(CACHE_NAME); @@ -129,6 +134,7 @@ public void testSqlQueryUsesDedicatedThreadPool() throws Exception { * Tests that Scan queries are executed in dedicated pool * @throws Exception If failed. */ + @Test public void testScanQueryUsesDedicatedThreadPool() throws Exception { try (Ignite client = startGrid("client")) { IgniteCache cache = client.cache(CACHE_NAME); @@ -152,6 +158,7 @@ public void testScanQueryUsesDedicatedThreadPool() throws Exception { * Tests that SPI queries are executed in dedicated pool * @throws Exception If failed. */ + @Test public void testSpiQueryUsesDedicatedThreadPool() throws Exception { try (Ignite client = startGrid("client")) { IgniteCache cache = client.cache(CACHE_NAME); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlDefaultValueTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlDefaultValueTest.java index f4c05397960e4..24cb13fa90144 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlDefaultValueTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlDefaultValueTest.java @@ -32,9 +32,13 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** */ @SuppressWarnings("ThrowableNotThrown") +@RunWith(JUnit4.class) public class IgniteSqlDefaultValueTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryVmIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -88,6 +92,7 @@ public class IgniteSqlDefaultValueTest extends GridCommonAbstractTest { /** */ + @Test public void testDefaultValueColumn() { sql("CREATE TABLE TEST (id int, val0 varchar DEFAULT 'default-val', primary key (id))"); sql("INSERT INTO TEST (id) VALUES (?)", 1); @@ -107,6 +112,7 @@ public void testDefaultValueColumn() { /** */ + @Test public void testDefaultValueColumnAfterUpdate() { sql("CREATE TABLE TEST (id int, val0 varchar DEFAULT 'default-val', val1 varchar, primary key (id))"); sql("INSERT INTO TEST (id, val1) VALUES (?, ?)", 1, "val-10"); @@ -138,6 +144,7 @@ public void testDefaultValueColumnAfterUpdate() { /** */ + @Test public void testEmptyValueNullDefaults() { sql("CREATE TABLE TEST (id int, val0 varchar, primary key (id))"); sql("INSERT INTO TEST (id) VALUES (?)", 1); @@ -155,6 +162,7 @@ public void testEmptyValueNullDefaults() { /** */ + @Test public void testAddColumnWithDefaults() { sql("CREATE TABLE TEST (id int, val0 varchar, primary key (id))"); @@ -169,6 +177,7 @@ public void testAddColumnWithDefaults() { /** */ + @Test public void testDefaultTypes() { assertEquals("Check tinyint", (byte)28, getDefaultObject("TINYINT", "28")); assertEquals("Check smallint", (short)28, getDefaultObject("SMALLINT", "28")); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlDistributedJoinSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlDistributedJoinSelfTest.java index 4b993eca16ec1..d22c67ae0c509 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlDistributedJoinSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlDistributedJoinSelfTest.java @@ -29,10 +29,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for correct distributed sql joins. */ +@RunWith(JUnit4.class) public class IgniteSqlDistributedJoinSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -84,6 +88,7 @@ protected CacheConfiguration cacheConfig(String name, boolean partitioned, Class /** * @throws Exception If failed. */ + @Test public void testNonCollocatedDistributedJoin() throws Exception { CacheConfiguration ccfg1 = cacheConfig("pers", true, String.class, Person.class); CacheConfiguration ccfg2 = cacheConfig("org", true, String.class, Organization.class); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlEntryCacheModeAgnosticTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlEntryCacheModeAgnosticTest.java index db7ca399d7d65..2b196d364464e 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlEntryCacheModeAgnosticTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlEntryCacheModeAgnosticTest.java @@ -29,6 +29,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import java.util.List; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.LOCAL; @@ -38,6 +41,7 @@ /** * Test different cache modes for query entry */ +@RunWith(JUnit4.class) public class IgniteSqlEntryCacheModeAgnosticTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -116,6 +120,7 @@ private CacheConfiguration cacheConfiguration(String cacheName) throws Exception /** * It should not matter what cache mode does entry cache use, if there is no join */ + @Test public void testCrossCacheModeQuery() throws Exception { Ignite ignite = startGrid(); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlGroupConcatCollocatedTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlGroupConcatCollocatedTest.java index 05d29bfe65b66..e290009d24349 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlGroupConcatCollocatedTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlGroupConcatCollocatedTest.java @@ -34,11 +34,15 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for GROUP_CONCAT aggregate function in collocated mode. */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class IgniteSqlGroupConcatCollocatedTest extends GridCommonAbstractTest { /** */ private static final int CLIENT = 7; @@ -115,6 +119,7 @@ public class IgniteSqlGroupConcatCollocatedTest extends GridCommonAbstractTest { /** * */ + @Test public void testGroupConcatSimple() { IgniteCache c = ignite(CLIENT).cache(CACHE_NAME); @@ -139,6 +144,7 @@ public void testGroupConcatSimple() { /** * */ + @Test public void testGroupConcatOrderBy() { IgniteCache c = ignite(CLIENT).cache(CACHE_NAME); @@ -164,6 +170,7 @@ public void testGroupConcatOrderBy() { /** * */ + @Test public void testGroupConcatWithDistinct() { IgniteCache c = ignite(CLIENT).cache(CACHE_NAME); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlGroupConcatNotCollocatedTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlGroupConcatNotCollocatedTest.java index fbd38f7aeabfc..d9603e3c4210c 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlGroupConcatNotCollocatedTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlGroupConcatNotCollocatedTest.java @@ -33,11 +33,15 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for GROUP_CONCAT aggregate function in not collocated mode. */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class IgniteSqlGroupConcatNotCollocatedTest extends GridCommonAbstractTest { /** */ private static final int CLIENT = 7; @@ -99,6 +103,7 @@ public class IgniteSqlGroupConcatNotCollocatedTest extends GridCommonAbstractTes /** * */ + @Test public void testGroupConcatSimple() { IgniteCache c = ignite(CLIENT).cache(CACHE_NAME); @@ -122,6 +127,7 @@ public void testGroupConcatSimple() { /** * */ + @Test public void testGroupConcatCountDistinct() { IgniteCache c = ignite(CLIENT).cache(CACHE_NAME); @@ -145,6 +151,7 @@ public void testGroupConcatCountDistinct() { /** * */ + @Test public void testGroupConcatDistributedException() { final IgniteCache c = ignite(CLIENT).cache(CACHE_NAME); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlKeyValueFieldsTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlKeyValueFieldsTest.java index 268104e32d780..fabe862214d08 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlKeyValueFieldsTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlKeyValueFieldsTest.java @@ -1,391 +1,404 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You 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.apache.ignite.internal.processors.query; - -import org.apache.ignite.IgniteCache; -import org.apache.ignite.IgniteCheckedException; -import org.apache.ignite.cache.QueryEntity; -import org.apache.ignite.cache.query.QueryCursor; -import org.apache.ignite.cache.query.SqlFieldsQuery; -import org.apache.ignite.configuration.CacheConfiguration; -import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.internal.IgniteEx; -import org.apache.ignite.internal.binary.BinaryMarshaller; -import org.apache.ignite.internal.processors.cache.version.GridCacheVersion; -import org.apache.ignite.internal.util.typedef.F; -import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; -import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; -import org.apache.ignite.testframework.GridTestUtils; -import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.concurrent.Callable; - -/** - * Test hidden _key, _val, _ver columns - */ -public class IgniteSqlKeyValueFieldsTest extends GridCommonAbstractTest { - - /** IP finder. */ - private static final TcpDiscoveryVmIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); - - /** */ - private static String NODE_BAD_CONF_MISS_KEY_FIELD = "badConf1"; - /** */ - private static String NODE_BAD_CONF_MISS_VAL_FIELD = "badConf2"; - /** */ - private static String NODE_CLIENT = "client"; - - /** */ - private static String CACHE_PERSON_NO_KV = "PersonNoKV"; - /** */ - private static String CACHE_INT_NO_KV_TYPE = "IntNoKVType"; - /** */ - private static String CACHE_PERSON = "Person"; - /** */ - private static String CACHE_JOB = "Job"; - - - /** {@inheritDoc} */ - @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { - IgniteConfiguration c = super.getConfiguration(gridName); - - TcpDiscoverySpi disco = new TcpDiscoverySpi(); - - disco.setIpFinder(IP_FINDER); - - c.setDiscoverySpi(disco); - - c.setMarshaller(new BinaryMarshaller()); - - List ccfgs = new ArrayList<>(); - CacheConfiguration ccfg = buildCacheConfiguration(gridName); - if (ccfg != null) - ccfgs.add(ccfg); - - ccfgs.add(buildCacheConfiguration(CACHE_PERSON_NO_KV)); - ccfgs.add(buildCacheConfiguration(CACHE_INT_NO_KV_TYPE)); - ccfgs.add(buildCacheConfiguration(CACHE_PERSON)); - ccfgs.add(buildCacheConfiguration(CACHE_JOB)); - - c.setCacheConfiguration(ccfgs.toArray(new CacheConfiguration[ccfgs.size()])); - if (gridName.equals(NODE_CLIENT)) - c.setClientMode(true); - - return c; - } - - /** {@inheritDoc} */ - @Override protected void beforeTest() throws Exception { - super.beforeTest(); - - startGrid(0); - startGrid(NODE_CLIENT); - } - - /** {@inheritDoc} */ - @Override protected void afterTest() throws Exception { - super.afterTest(); - - stopAllGrids(); - } - - private CacheConfiguration buildCacheConfiguration(String name) { - if (name.equals(NODE_BAD_CONF_MISS_KEY_FIELD)) { - CacheConfiguration ccfg = new CacheConfiguration(NODE_BAD_CONF_MISS_KEY_FIELD); - QueryEntity qe = new QueryEntity(Object.class.getName(), Object.class.getName()); - qe.setKeyFieldName("k"); - qe.addQueryField("a", Integer.class.getName(), null); - ccfg.setQueryEntities(F.asList(qe)); - return ccfg; - } - else if (name.equals(NODE_BAD_CONF_MISS_VAL_FIELD)) { - CacheConfiguration ccfg = new CacheConfiguration(NODE_BAD_CONF_MISS_VAL_FIELD); - QueryEntity qe = new QueryEntity(Object.class.getName(), Object.class.getName()); - qe.setValueFieldName("v"); - qe.addQueryField("a", Integer.class.getName(), null); - ccfg.setQueryEntities(F.asList(qe)); - return ccfg; - } - else if (name.equals(CACHE_PERSON_NO_KV)) { - CacheConfiguration ccfg = new CacheConfiguration(CACHE_PERSON_NO_KV); - - QueryEntity entity = new QueryEntity(); - - entity.setKeyType(Integer.class.getName()); - entity.setValueType(Person.class.getName()); - - LinkedHashMap fields = new LinkedHashMap<>(); - fields.put("name", String.class.getName()); - fields.put("age", Integer.class.getName()); - - entity.setFields(fields); - - ccfg.setQueryEntities(Arrays.asList(entity)); - return ccfg; - } - else if (name.equals(CACHE_INT_NO_KV_TYPE)) { - CacheConfiguration ccfg = new CacheConfiguration(CACHE_INT_NO_KV_TYPE); - QueryEntity entity = new QueryEntity(); - - entity.setKeyType(null); - entity.setValueType(null); - - entity.setKeyFieldName("id"); - entity.setValueFieldName("v"); - - LinkedHashMap fields = new LinkedHashMap<>(); - fields.put("id", Integer.class.getName()); - fields.put("v", Integer.class.getName()); - - entity.setFields(fields); - - ccfg.setQueryEntities(Arrays.asList(entity)); - return ccfg; - } - else if (name.equals(CACHE_PERSON)) { - CacheConfiguration ccfg = new CacheConfiguration(CACHE_PERSON); - - QueryEntity entity = new QueryEntity(); - - entity.setKeyType(Integer.class.getName()); - entity.setValueType(Person.class.getName()); - - entity.setKeyFieldName("id"); - entity.setValueFieldName("v"); - - LinkedHashMap fields = new LinkedHashMap<>(); - fields.put("name", String.class.getName()); - fields.put("age", Integer.class.getName()); - - fields.put(entity.getKeyFieldName(), entity.getKeyType()); - fields.put(entity.getValueFieldName(), entity.getValueType()); - - entity.setFields(fields); - - ccfg.setQueryEntities(Arrays.asList(entity)); - return ccfg; - } - else if (name.equals(CACHE_JOB)) { - CacheConfiguration ccfg = new CacheConfiguration(CACHE_JOB); - ccfg.setIndexedTypes(Integer.class, Integer.class); - return ccfg; - } - return null; - } - - /** Test for setIndexedTypes() primitive types */ - public void testSetIndexTypesPrimitive() throws Exception { - IgniteCache cache = grid(NODE_CLIENT).cache(CACHE_JOB); - - checkInsert(cache, "insert into Integer (_key, _val) values (?,?)", 1, 100); - - checkSelect(cache, "select * from Integer", 1, 100); - checkSelect(cache, "select _key, _val from Integer", 1, 100); - } - - /** Test configuration error : keyFieldName is missing from fields */ - public void testErrorKeyFieldMissingFromFields() throws Exception { - checkCacheStartupError(NODE_BAD_CONF_MISS_KEY_FIELD); - } - - /** Test configuration error : valueFieldName is missing from fields */ - public void testErrorValueFieldMissingFromFields() throws Exception { - checkCacheStartupError(NODE_BAD_CONF_MISS_VAL_FIELD); - } - - /** */ - private void checkCacheStartupError(final String name) { - GridTestUtils.assertThrows(log, new Callable() { - @Override public Void call() throws Exception { - startGrid(name); - - return null; - } - }, IgniteCheckedException.class, null); - } - - /** - * Check that it is allowed to leave QE.keyType and QE.valueType unset - * in case keyFieldName and valueFieldName are set and present in fields - */ - public void testQueryEntityAutoKeyValTypes() throws Exception { - IgniteCache cache = grid(NODE_CLIENT).cache(CACHE_INT_NO_KV_TYPE); - - checkInsert(cache, "insert into Integer (_key, _val) values (?,?)", 1, 100); - - checkSelect(cache, "select * from Integer where id = 1", 1, 100); - - checkSelect(cache, "select * from Integer", 1, 100); - checkSelect(cache, "select _key, _val from Integer", 1, 100); - checkSelect(cache, "select id, v from Integer", 1, 100); - } - - /** Check that it is possible to not have keyFieldName and valueFieldName */ - public void testNoKeyValueAliases() throws Exception { - IgniteCache cache = grid(NODE_CLIENT).cache(CACHE_PERSON_NO_KV); - - Person alice = new Person("Alice", 1); - checkInsert(cache, "insert into Person (_key, _val) values (?,?)", 1, alice); - - checkSelect(cache, "select * from Person", alice.name, alice.age); - checkSelect(cache, "select _key, _val from Person", 1, alice); - } - - /** Check keyFieldName and valueFieldName columns access */ - public void testKeyValueAlias() throws Exception { - //_key, _val, _ver | name, age, id, v - Person alice = new Person("Alice", 1); - Person bob = new Person("Bob", 2); - - IgniteCache cache = grid(NODE_CLIENT).cache(CACHE_PERSON); - - checkInsert(cache, "insert into Person (_key, _val) values (?,?)", 1, alice); - checkInsert(cache, "insert into Person (id, v) values (?,?)", 2, bob); - - checkSelect(cache, "select * from Person where _key=1", alice.name, alice.age, 1, alice); - checkSelect(cache, "select _key, _val from Person where id=1", 1, alice); - - checkSelect(cache, "select * from Person where _key=2", bob.name, bob.age, 2, bob); - checkSelect(cache, "select _key, _val from Person where id=2", 2, bob); - - checkInsert(cache, "update Person set age = ? where id = ?", 3, 1); - checkSelect(cache, "select _key, age from Person where id=1", 1, 3); - - checkInsert(cache, "update Person set v = ? where id = ?", alice, 1); - checkSelect(cache, "select _key, _val from Person where id=1", 1, alice); - } - - /** Check _ver version field is accessible */ - public void testVersionField() throws Exception { - Person alice = new Person("Alice", 1); - Person bob = new Person("Bob", 2); - - IgniteCache cache = grid(NODE_CLIENT).cache(CACHE_PERSON); - - checkInsert(cache, "insert into Person (id, v) values (?,?)", 1, alice); - assertNotNull(getVersion(cache, 1)); - - checkInsert(cache, "insert into Person (id, v) values (?,?)", 2, bob); - assertNotNull(getVersion(cache, 2)); - - GridCacheVersion v1 = getVersion(cache, 1); - - checkInsert(cache, "update Person set age = ? where id = ?", 3, 1); - - GridCacheVersion v2 = getVersion(cache, 1); - - assertFalse( v1.equals(v2) ); - } - - /** Check that joins are working on keyFieldName, valueFieldName columns */ - public void testJoinKeyValFields() throws Exception { - IgniteEx client = grid(NODE_CLIENT); - IgniteCache cache = client.cache(CACHE_PERSON); - IgniteCache cache2 = client.cache(CACHE_JOB); - - checkInsert(cache, "insert into Person (id, v) values (?, ?)", 1, new Person("Bob", 30)); - checkInsert(cache, "insert into Person (id, v) values (?, ?)", 2, new Person("David", 35)); - checkInsert(cache2, "insert into Integer (_key, _val) values (?, ?)", 100, 1); - checkInsert(cache2, "insert into Integer (_key, _val) values (?, ?)", 200, 2); - - QueryCursor> cursor = cache.query(new SqlFieldsQuery("select p.id, j._key from Person p, \""+ CACHE_JOB +"\".Integer j where p.id = j._val")); - List> results = cursor.getAll(); - assertEquals(2, results.size()); - assertEquals(1, results.get(0).get(0)); - assertEquals(100, results.get(0).get(1)); - assertEquals(2, results.get(1).get(0)); - assertEquals(200, results.get(1).get(1)); - } - - /** Check automatic addition of index for keyFieldName column */ - public void testAutoKeyFieldIndex() throws Exception { - IgniteEx client = grid(NODE_CLIENT); - IgniteCache cache = client.cache(CACHE_PERSON); - - QueryCursor> cursor = cache.query(new SqlFieldsQuery("explain select * from Person where id = 1")); - List> results = cursor.getAll(); - assertEquals(2, results.size()); - assertTrue(((String)results.get(0).get(0)).contains("\"_key_PK_proxy\"")); - - cursor = cache.query(new SqlFieldsQuery("explain select * from Person where _key = 1")); - results = cursor.getAll(); - assertEquals(2, results.size()); - assertTrue(((String)results.get(0).get(0)).contains("\"_key_PK\"")); - } - - /** */ - private GridCacheVersion getVersion(IgniteCache cache, int key) { - QueryCursor> cursor = cache.query(new SqlFieldsQuery("select _ver from Person where id = ?").setArgs(key)); - List> results = cursor.getAll(); - assertEquals(1, results.size()); - return ((GridCacheVersion) results.get(0).get(0)); - } - - /** */ - private void checkInsert(IgniteCache cache, String qry, Object ... args) throws Exception { - QueryCursor> cursor = cache.query(new SqlFieldsQuery(qry).setArgs(args)); - assertEquals(1, ((Number) cursor.getAll().get(0).get(0)).intValue()); - } - - /** */ - private void checkSelect(IgniteCache cache, String selectQry, Object ... expected) { - QueryCursor> cursor = cache.query(new SqlFieldsQuery(selectQry)); - - List> results = cursor.getAll(); - - assertEquals(1, results.size()); - - List row0 = results.get(0); - for(int col = 0; col < expected.length; ++col) - assertEquals(expected[col], row0.get(col)); - } - - /** */ - private static class Person { - /** */ - private String name; - - /** */ - private int age; - - /** */ - public Person(String name, int age) { - this.name = name; - this.age = age; - } - - /** */ - @Override public int hashCode() { - return name.hashCode() ^ age; - } - - /** */ - @Override public boolean equals(Object o) { - if (this == o) - return true; - if (!(o instanceof Person)) - return false; - Person other = (Person)o; - return name.equals(other.name) && age == other.age; - } - } -} +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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.apache.ignite.internal.processors.query; + +import org.apache.ignite.IgniteCache; +import org.apache.ignite.IgniteCheckedException; +import org.apache.ignite.cache.QueryEntity; +import org.apache.ignite.cache.query.QueryCursor; +import org.apache.ignite.cache.query.SqlFieldsQuery; +import org.apache.ignite.configuration.CacheConfiguration; +import org.apache.ignite.configuration.IgniteConfiguration; +import org.apache.ignite.internal.IgniteEx; +import org.apache.ignite.internal.binary.BinaryMarshaller; +import org.apache.ignite.internal.processors.cache.version.GridCacheVersion; +import org.apache.ignite.internal.util.typedef.F; +import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; +import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; +import org.apache.ignite.testframework.GridTestUtils; +import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.concurrent.Callable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +/** + * Test hidden _key, _val, _ver columns + */ +@RunWith(JUnit4.class) +public class IgniteSqlKeyValueFieldsTest extends GridCommonAbstractTest { + + /** IP finder. */ + private static final TcpDiscoveryVmIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); + + /** */ + private static String NODE_BAD_CONF_MISS_KEY_FIELD = "badConf1"; + /** */ + private static String NODE_BAD_CONF_MISS_VAL_FIELD = "badConf2"; + /** */ + private static String NODE_CLIENT = "client"; + + /** */ + private static String CACHE_PERSON_NO_KV = "PersonNoKV"; + /** */ + private static String CACHE_INT_NO_KV_TYPE = "IntNoKVType"; + /** */ + private static String CACHE_PERSON = "Person"; + /** */ + private static String CACHE_JOB = "Job"; + + + /** {@inheritDoc} */ + @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { + IgniteConfiguration c = super.getConfiguration(gridName); + + TcpDiscoverySpi disco = new TcpDiscoverySpi(); + + disco.setIpFinder(IP_FINDER); + + c.setDiscoverySpi(disco); + + c.setMarshaller(new BinaryMarshaller()); + + List ccfgs = new ArrayList<>(); + CacheConfiguration ccfg = buildCacheConfiguration(gridName); + if (ccfg != null) + ccfgs.add(ccfg); + + ccfgs.add(buildCacheConfiguration(CACHE_PERSON_NO_KV)); + ccfgs.add(buildCacheConfiguration(CACHE_INT_NO_KV_TYPE)); + ccfgs.add(buildCacheConfiguration(CACHE_PERSON)); + ccfgs.add(buildCacheConfiguration(CACHE_JOB)); + + c.setCacheConfiguration(ccfgs.toArray(new CacheConfiguration[ccfgs.size()])); + if (gridName.equals(NODE_CLIENT)) + c.setClientMode(true); + + return c; + } + + /** {@inheritDoc} */ + @Override protected void beforeTest() throws Exception { + super.beforeTest(); + + startGrid(0); + startGrid(NODE_CLIENT); + } + + /** {@inheritDoc} */ + @Override protected void afterTest() throws Exception { + super.afterTest(); + + stopAllGrids(); + } + + private CacheConfiguration buildCacheConfiguration(String name) { + if (name.equals(NODE_BAD_CONF_MISS_KEY_FIELD)) { + CacheConfiguration ccfg = new CacheConfiguration(NODE_BAD_CONF_MISS_KEY_FIELD); + QueryEntity qe = new QueryEntity(Object.class.getName(), Object.class.getName()); + qe.setKeyFieldName("k"); + qe.addQueryField("a", Integer.class.getName(), null); + ccfg.setQueryEntities(F.asList(qe)); + return ccfg; + } + else if (name.equals(NODE_BAD_CONF_MISS_VAL_FIELD)) { + CacheConfiguration ccfg = new CacheConfiguration(NODE_BAD_CONF_MISS_VAL_FIELD); + QueryEntity qe = new QueryEntity(Object.class.getName(), Object.class.getName()); + qe.setValueFieldName("v"); + qe.addQueryField("a", Integer.class.getName(), null); + ccfg.setQueryEntities(F.asList(qe)); + return ccfg; + } + else if (name.equals(CACHE_PERSON_NO_KV)) { + CacheConfiguration ccfg = new CacheConfiguration(CACHE_PERSON_NO_KV); + + QueryEntity entity = new QueryEntity(); + + entity.setKeyType(Integer.class.getName()); + entity.setValueType(Person.class.getName()); + + LinkedHashMap fields = new LinkedHashMap<>(); + fields.put("name", String.class.getName()); + fields.put("age", Integer.class.getName()); + + entity.setFields(fields); + + ccfg.setQueryEntities(Arrays.asList(entity)); + return ccfg; + } + else if (name.equals(CACHE_INT_NO_KV_TYPE)) { + CacheConfiguration ccfg = new CacheConfiguration(CACHE_INT_NO_KV_TYPE); + QueryEntity entity = new QueryEntity(); + + entity.setKeyType(null); + entity.setValueType(null); + + entity.setKeyFieldName("id"); + entity.setValueFieldName("v"); + + LinkedHashMap fields = new LinkedHashMap<>(); + fields.put("id", Integer.class.getName()); + fields.put("v", Integer.class.getName()); + + entity.setFields(fields); + + ccfg.setQueryEntities(Arrays.asList(entity)); + return ccfg; + } + else if (name.equals(CACHE_PERSON)) { + CacheConfiguration ccfg = new CacheConfiguration(CACHE_PERSON); + + QueryEntity entity = new QueryEntity(); + + entity.setKeyType(Integer.class.getName()); + entity.setValueType(Person.class.getName()); + + entity.setKeyFieldName("id"); + entity.setValueFieldName("v"); + + LinkedHashMap fields = new LinkedHashMap<>(); + fields.put("name", String.class.getName()); + fields.put("age", Integer.class.getName()); + + fields.put(entity.getKeyFieldName(), entity.getKeyType()); + fields.put(entity.getValueFieldName(), entity.getValueType()); + + entity.setFields(fields); + + ccfg.setQueryEntities(Arrays.asList(entity)); + return ccfg; + } + else if (name.equals(CACHE_JOB)) { + CacheConfiguration ccfg = new CacheConfiguration(CACHE_JOB); + ccfg.setIndexedTypes(Integer.class, Integer.class); + return ccfg; + } + return null; + } + + /** Test for setIndexedTypes() primitive types */ + @Test + public void testSetIndexTypesPrimitive() throws Exception { + IgniteCache cache = grid(NODE_CLIENT).cache(CACHE_JOB); + + checkInsert(cache, "insert into Integer (_key, _val) values (?,?)", 1, 100); + + checkSelect(cache, "select * from Integer", 1, 100); + checkSelect(cache, "select _key, _val from Integer", 1, 100); + } + + /** Test configuration error : keyFieldName is missing from fields */ + @Test + public void testErrorKeyFieldMissingFromFields() throws Exception { + checkCacheStartupError(NODE_BAD_CONF_MISS_KEY_FIELD); + } + + /** Test configuration error : valueFieldName is missing from fields */ + @Test + public void testErrorValueFieldMissingFromFields() throws Exception { + checkCacheStartupError(NODE_BAD_CONF_MISS_VAL_FIELD); + } + + /** */ + private void checkCacheStartupError(final String name) { + GridTestUtils.assertThrows(log, new Callable() { + @Override public Void call() throws Exception { + startGrid(name); + + return null; + } + }, IgniteCheckedException.class, null); + } + + /** + * Check that it is allowed to leave QE.keyType and QE.valueType unset + * in case keyFieldName and valueFieldName are set and present in fields + */ + @Test + public void testQueryEntityAutoKeyValTypes() throws Exception { + IgniteCache cache = grid(NODE_CLIENT).cache(CACHE_INT_NO_KV_TYPE); + + checkInsert(cache, "insert into Integer (_key, _val) values (?,?)", 1, 100); + + checkSelect(cache, "select * from Integer where id = 1", 1, 100); + + checkSelect(cache, "select * from Integer", 1, 100); + checkSelect(cache, "select _key, _val from Integer", 1, 100); + checkSelect(cache, "select id, v from Integer", 1, 100); + } + + /** Check that it is possible to not have keyFieldName and valueFieldName */ + @Test + public void testNoKeyValueAliases() throws Exception { + IgniteCache cache = grid(NODE_CLIENT).cache(CACHE_PERSON_NO_KV); + + Person alice = new Person("Alice", 1); + checkInsert(cache, "insert into Person (_key, _val) values (?,?)", 1, alice); + + checkSelect(cache, "select * from Person", alice.name, alice.age); + checkSelect(cache, "select _key, _val from Person", 1, alice); + } + + /** Check keyFieldName and valueFieldName columns access */ + @Test + public void testKeyValueAlias() throws Exception { + //_key, _val, _ver | name, age, id, v + Person alice = new Person("Alice", 1); + Person bob = new Person("Bob", 2); + + IgniteCache cache = grid(NODE_CLIENT).cache(CACHE_PERSON); + + checkInsert(cache, "insert into Person (_key, _val) values (?,?)", 1, alice); + checkInsert(cache, "insert into Person (id, v) values (?,?)", 2, bob); + + checkSelect(cache, "select * from Person where _key=1", alice.name, alice.age, 1, alice); + checkSelect(cache, "select _key, _val from Person where id=1", 1, alice); + + checkSelect(cache, "select * from Person where _key=2", bob.name, bob.age, 2, bob); + checkSelect(cache, "select _key, _val from Person where id=2", 2, bob); + + checkInsert(cache, "update Person set age = ? where id = ?", 3, 1); + checkSelect(cache, "select _key, age from Person where id=1", 1, 3); + + checkInsert(cache, "update Person set v = ? where id = ?", alice, 1); + checkSelect(cache, "select _key, _val from Person where id=1", 1, alice); + } + + /** Check _ver version field is accessible */ + @Test + public void testVersionField() throws Exception { + Person alice = new Person("Alice", 1); + Person bob = new Person("Bob", 2); + + IgniteCache cache = grid(NODE_CLIENT).cache(CACHE_PERSON); + + checkInsert(cache, "insert into Person (id, v) values (?,?)", 1, alice); + assertNotNull(getVersion(cache, 1)); + + checkInsert(cache, "insert into Person (id, v) values (?,?)", 2, bob); + assertNotNull(getVersion(cache, 2)); + + GridCacheVersion v1 = getVersion(cache, 1); + + checkInsert(cache, "update Person set age = ? where id = ?", 3, 1); + + GridCacheVersion v2 = getVersion(cache, 1); + + assertFalse( v1.equals(v2) ); + } + + /** Check that joins are working on keyFieldName, valueFieldName columns */ + @Test + public void testJoinKeyValFields() throws Exception { + IgniteEx client = grid(NODE_CLIENT); + IgniteCache cache = client.cache(CACHE_PERSON); + IgniteCache cache2 = client.cache(CACHE_JOB); + + checkInsert(cache, "insert into Person (id, v) values (?, ?)", 1, new Person("Bob", 30)); + checkInsert(cache, "insert into Person (id, v) values (?, ?)", 2, new Person("David", 35)); + checkInsert(cache2, "insert into Integer (_key, _val) values (?, ?)", 100, 1); + checkInsert(cache2, "insert into Integer (_key, _val) values (?, ?)", 200, 2); + + QueryCursor> cursor = cache.query(new SqlFieldsQuery("select p.id, j._key from Person p, \""+ CACHE_JOB +"\".Integer j where p.id = j._val")); + List> results = cursor.getAll(); + assertEquals(2, results.size()); + assertEquals(1, results.get(0).get(0)); + assertEquals(100, results.get(0).get(1)); + assertEquals(2, results.get(1).get(0)); + assertEquals(200, results.get(1).get(1)); + } + + /** Check automatic addition of index for keyFieldName column */ + @Test + public void testAutoKeyFieldIndex() throws Exception { + IgniteEx client = grid(NODE_CLIENT); + IgniteCache cache = client.cache(CACHE_PERSON); + + QueryCursor> cursor = cache.query(new SqlFieldsQuery("explain select * from Person where id = 1")); + List> results = cursor.getAll(); + assertEquals(2, results.size()); + assertTrue(((String)results.get(0).get(0)).contains("\"_key_PK_proxy\"")); + + cursor = cache.query(new SqlFieldsQuery("explain select * from Person where _key = 1")); + results = cursor.getAll(); + assertEquals(2, results.size()); + assertTrue(((String)results.get(0).get(0)).contains("\"_key_PK\"")); + } + + /** */ + private GridCacheVersion getVersion(IgniteCache cache, int key) { + QueryCursor> cursor = cache.query(new SqlFieldsQuery("select _ver from Person where id = ?").setArgs(key)); + List> results = cursor.getAll(); + assertEquals(1, results.size()); + return ((GridCacheVersion) results.get(0).get(0)); + } + + /** */ + private void checkInsert(IgniteCache cache, String qry, Object ... args) throws Exception { + QueryCursor> cursor = cache.query(new SqlFieldsQuery(qry).setArgs(args)); + assertEquals(1, ((Number) cursor.getAll().get(0).get(0)).intValue()); + } + + /** */ + private void checkSelect(IgniteCache cache, String selectQry, Object ... expected) { + QueryCursor> cursor = cache.query(new SqlFieldsQuery(selectQry)); + + List> results = cursor.getAll(); + + assertEquals(1, results.size()); + + List row0 = results.get(0); + for(int col = 0; col < expected.length; ++col) + assertEquals(expected[col], row0.get(col)); + } + + /** */ + private static class Person { + /** */ + private String name; + + /** */ + private int age; + + /** */ + public Person(String name, int age) { + this.name = name; + this.age = age; + } + + /** */ + @Override public int hashCode() { + return name.hashCode() ^ age; + } + + /** */ + @Override public boolean equals(Object o) { + if (this == o) + return true; + if (!(o instanceof Person)) + return false; + Person other = (Person)o; + return name.equals(other.name) && age == other.age; + } + } +} diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlNotNullConstraintTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlNotNullConstraintTest.java index 3a90c990927f0..740849fb168e2 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlNotNullConstraintTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlNotNullConstraintTest.java @@ -58,8 +58,12 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** */ +@RunWith(JUnit4.class) public class IgniteSqlNotNullConstraintTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryVmIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -250,6 +254,7 @@ private CacheConfiguration buildCacheConfigurationRestricted(String cacheName, b } /** */ + @Test public void testQueryEntityGetSetNotNullFields() throws Exception { QueryEntity qe = new QueryEntity(); @@ -267,6 +272,7 @@ public void testQueryEntityGetSetNotNullFields() throws Exception { } /** */ + @Test public void testQueryEntityEquals() throws Exception { QueryEntity a = new QueryEntity(); @@ -284,6 +290,7 @@ public void testQueryEntityEquals() throws Exception { } /** */ + @Test public void testAtomicOrImplicitTxPut() throws Exception { executeWithAllCaches(new TestClosure() { @Override public void run() throws Exception { @@ -301,6 +308,7 @@ public void testAtomicOrImplicitTxPut() throws Exception { } /** */ + @Test public void testAtomicOrImplicitTxPutIfAbsent() throws Exception { executeWithAllCaches(new TestClosure() { @Override public void run() throws Exception { @@ -318,6 +326,7 @@ public void testAtomicOrImplicitTxPutIfAbsent() throws Exception { } /** */ + @Test public void testAtomicOrImplicitTxGetAndPut() throws Exception { executeWithAllCaches(new TestClosure() { @Override public void run() throws Exception { @@ -335,6 +344,7 @@ public void testAtomicOrImplicitTxGetAndPut() throws Exception { } /** */ + @Test public void testAtomicOrImplicitTxGetAndPutIfAbsent() throws Exception { executeWithAllCaches(new TestClosure() { @Override public void run() throws Exception { @@ -352,6 +362,7 @@ public void testAtomicOrImplicitTxGetAndPutIfAbsent() throws Exception { } /** */ + @Test public void testAtomicOrImplicitTxReplace() throws Exception { executeWithAllCaches(new TestClosure() { @Override public void run() throws Exception { @@ -370,6 +381,7 @@ public void testAtomicOrImplicitTxReplace() throws Exception { } /** */ + @Test public void testAtomicOrImplicitTxGetAndReplace() throws Exception { executeWithAllCaches(new TestClosure() { @Override public void run() throws Exception { @@ -388,16 +400,19 @@ public void testAtomicOrImplicitTxGetAndReplace() throws Exception { } /** */ + @Test public void testAtomicOrImplicitTxPutAll() throws Exception { doAtomicOrImplicitTxPutAll(F.asMap(1, okValue, 5, badValue), 1); } /** */ + @Test public void testAtomicOrImplicitTxPutAllForSingleValue() throws Exception { doAtomicOrImplicitTxPutAll(F.asMap(5, badValue), 0); } /** */ + @Test public void testAtomicOrImplicitTxInvoke() throws Exception { executeWithAllCaches(new TestClosure() { @Override public void run() throws Exception { @@ -413,6 +428,7 @@ public void testAtomicOrImplicitTxInvoke() throws Exception { } /** */ + @Test public void testAtomicOrImplicitTxInvokeAll() throws Exception { executeWithAllCaches(new TestClosure() { @Override public void run() throws Exception { @@ -434,6 +450,7 @@ key1, new TestEntryProcessor(okValue), } /** */ + @Test public void testTxPutCreate() throws Exception { executeWithAllTxCaches(new TestClosure() { @Override public void run() throws Exception { @@ -456,6 +473,7 @@ public void testTxPutCreate() throws Exception { } /** */ + @Test public void testTxPutUpdate() throws Exception { executeWithAllTxCaches(new TestClosure() { @Override public void run() throws Exception { @@ -479,6 +497,7 @@ public void testTxPutUpdate() throws Exception { } /** */ + @Test public void testTxPutIfAbsent() throws Exception { executeWithAllTxCaches(new TestClosure() { @Override public void run() throws Exception { @@ -500,6 +519,7 @@ public void testTxPutIfAbsent() throws Exception { } /** */ + @Test public void testTxGetAndPut() throws Exception { executeWithAllTxCaches(new TestClosure() { @Override public void run() throws Exception { @@ -521,6 +541,7 @@ public void testTxGetAndPut() throws Exception { } /** */ + @Test public void testTxGetAndPutIfAbsent() throws Exception { executeWithAllTxCaches(new TestClosure() { @Override public void run() throws Exception { @@ -542,6 +563,7 @@ public void testTxGetAndPutIfAbsent() throws Exception { } /** */ + @Test public void testTxReplace() throws Exception { executeWithAllTxCaches(new TestClosure() { @Override public void run() throws Exception { @@ -566,6 +588,7 @@ public void testTxReplace() throws Exception { } /** */ + @Test public void testTxGetAndReplace() throws Exception { executeWithAllTxCaches(new TestClosure() { @Override public void run() throws Exception { @@ -590,16 +613,19 @@ public void testTxGetAndReplace() throws Exception { } /** */ + @Test public void testTxPutAll() throws Exception { doTxPutAll(F.asMap(1, okValue, 5, badValue)); } /** */ + @Test public void testTxPutAllForSingleValue() throws Exception { doTxPutAll(F.asMap(5, badValue)); } /** */ + @Test public void testTxInvoke() throws Exception { executeWithAllTxCaches(new TestClosure() { @Override public void run() throws Exception { @@ -624,6 +650,7 @@ public void testTxInvoke() throws Exception { } /** */ + @Test public void testTxInvokeAll() throws Exception { executeWithAllTxCaches(new TestClosure() { @Override public void run() throws Exception { @@ -650,6 +677,7 @@ key1, new TestEntryProcessor(okValue), } /** */ + @Test public void testAtomicOrImplicitTxInvokeDelete() throws Exception { executeWithAllCaches(new TestClosure() { @Override public void run() throws Exception { @@ -663,6 +691,7 @@ public void testAtomicOrImplicitTxInvokeDelete() throws Exception { } /** */ + @Test public void testAtomicOrImplicitTxInvokeAllDelete() throws Exception { executeWithAllCaches(new TestClosure() { @Override public void run() throws Exception { @@ -679,6 +708,7 @@ key1, new TestEntryProcessor(null), } /** */ + @Test public void testTxInvokeDelete() throws Exception { executeWithAllTxCaches(new TestClosure() { @Override public void run() throws Exception { @@ -696,6 +726,7 @@ public void testTxInvokeDelete() throws Exception { } /** */ + @Test public void testTxInvokeAllDelete() throws Exception { executeWithAllTxCaches(new TestClosure() { @Override public void run() throws Exception { @@ -716,6 +747,7 @@ key1, new TestEntryProcessor(null), } /** */ + @Test public void testDynamicTableCreateNotNullFieldsAllowed() throws Exception { executeSql("CREATE TABLE test(id INT PRIMARY KEY, field INT NOT NULL)"); @@ -733,6 +765,7 @@ public void testDynamicTableCreateNotNullFieldsAllowed() throws Exception { } /** */ + @Test public void testAlterTableAddColumnNotNullFieldAllowed() throws Exception { executeSql("CREATE TABLE test(id INT PRIMARY KEY, age INT)"); @@ -742,11 +775,13 @@ public void testAlterTableAddColumnNotNullFieldAllowed() throws Exception { } /** */ + @Test public void testAtomicNotNullCheckDmlInsertValues() throws Exception { checkNotNullCheckDmlInsertValues(CacheAtomicityMode.ATOMIC); } /** */ + @Test public void testTransactionalNotNullCheckDmlInsertValues() throws Exception { checkNotNullCheckDmlInsertValues(CacheAtomicityMode.TRANSACTIONAL); } @@ -777,11 +812,13 @@ private void checkNotNullCheckDmlInsertValues(CacheAtomicityMode atomicityMode) } /** */ + @Test public void testAtomicAddColumnNotNullCheckDmlInsertValues() throws Exception { checkAddColumnNotNullCheckDmlInsertValues(CacheAtomicityMode.ATOMIC); } /** */ + @Test public void testTransactionalAddColumnNotNullCheckDmlInsertValues() throws Exception { checkAddColumnNotNullCheckDmlInsertValues(CacheAtomicityMode.TRANSACTIONAL); } @@ -814,6 +851,7 @@ private void checkAddColumnNotNullCheckDmlInsertValues(CacheAtomicityMode atomic } /** */ + @Test public void testNotNullCheckDmlInsertFromSelect() throws Exception { executeSql("CREATE TABLE test(id INT PRIMARY KEY, name VARCHAR, age INT)"); @@ -839,6 +877,7 @@ public void testNotNullCheckDmlInsertFromSelect() throws Exception { } /** */ + @Test public void testNotNullCheckDmlUpdateValues() throws Exception { executeSql("CREATE TABLE test(id INT PRIMARY KEY, name VARCHAR NOT NULL)"); @@ -865,6 +904,7 @@ public void testNotNullCheckDmlUpdateValues() throws Exception { } /** */ + @Test public void testNotNullCheckDmlUpdateFromSelect() throws Exception { executeSql("CREATE TABLE src(id INT PRIMARY KEY, name VARCHAR)"); executeSql("CREATE TABLE dest(id INT PRIMARY KEY, name VARCHAR NOT NULL)"); @@ -912,6 +952,7 @@ public void testNotNullCheckDmlUpdateFromSelect() throws Exception { } /** Check QueryEntity configuration fails with NOT NULL field and read-through. */ + @Test public void testReadThroughRestrictionQueryEntity() throws Exception { // Node start-up failure (read-through cache store). GridTestUtils.assertThrowsAnyCause(log, new Callable() { @@ -930,6 +971,7 @@ public void testReadThroughRestrictionQueryEntity() throws Exception { } /** Check QueryEntity configuration fails with NOT NULL field and cache interceptor. */ + @Test public void testInterceptorRestrictionQueryEntity() throws Exception { // Node start-up failure (interceptor). GridTestUtils.assertThrowsAnyCause(log, new Callable() { @@ -948,6 +990,7 @@ public void testInterceptorRestrictionQueryEntity() throws Exception { } /** Check create table fails with NOT NULL field and read-through. */ + @Test public void testReadThroughRestrictionCreateTable() throws Exception { GridTestUtils.assertThrowsAnyCause(log, new Callable() { @Override public Object call() throws Exception { @@ -958,6 +1001,7 @@ public void testReadThroughRestrictionCreateTable() throws Exception { } /** Check create table fails with NOT NULL field and cache interceptor. */ + @Test public void testInterceptorRestrictionCreateTable() throws Exception { GridTestUtils.assertThrowsAnyCause(log, new Callable() { @Override public Object call() throws Exception { @@ -968,6 +1012,7 @@ public void testInterceptorRestrictionCreateTable() throws Exception { } /** Check alter table fails with NOT NULL field and read-through. */ + @Test public void testReadThroughRestrictionAlterTable() throws Exception { executeSql("CREATE TABLE test(id INT PRIMARY KEY, age INT) " + "WITH \"template=" + CACHE_READ_THROUGH + "\""); @@ -980,6 +1025,7 @@ public void testReadThroughRestrictionAlterTable() throws Exception { } /** Check alter table fails with NOT NULL field and cache interceptor. */ + @Test public void testInterceptorRestrictionAlterTable() throws Exception { executeSql("CREATE TABLE test(id INT PRIMARY KEY, age INT) " + "WITH \"template=" + CACHE_INTERCEPTOR + "\""); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlParameterizedQueryTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlParameterizedQueryTest.java index b5039cd4cb9ea..c5ffa6aaa98eb 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlParameterizedQueryTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlParameterizedQueryTest.java @@ -33,6 +33,9 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test sql queries with parameters for all types. @@ -41,6 +44,7 @@ * @author Sergey Chernolyas &sergey_chernolyas@gmail.com& * @see IGNITE-6286 */ +@RunWith(JUnit4.class) public class IgniteSqlParameterizedQueryTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryVmIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -119,6 +123,7 @@ private Object columnValue(String field, Object val) { * testing parametrized query by field with supported type * @throws Exception if any error occurs */ + @Test public void testSupportedTypes() throws Exception { IgniteCache cache = grid(NODE_CLIENT).cache(CACHE_BOOKMARK); Bookmark bookmark = new Bookmark(); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlQueryParallelismTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlQueryParallelismTest.java index 5e1b8d09473ab..cc86503cd6d88 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlQueryParallelismTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlQueryParallelismTest.java @@ -32,11 +32,15 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * A test against setting different values of query parallelism in cache configurations of the same cache. */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class IgniteSqlQueryParallelismTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -96,6 +100,7 @@ private static CacheConfiguration cacheConfig(String name, Class... idxTypes) /** * @throws Exception If failed. */ + @Test public void testIndexSegmentationOnClient() throws Exception { IgniteCache c1 = ignite(0).cache("org"); IgniteCache c2 = ignite(0).cache("pers"); @@ -123,6 +128,7 @@ public void testIndexSegmentationOnClient() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIndexSegmentation() throws Exception { IgniteCache c1 = ignite(0).cache("org"); IgniteCache c2 = ignite(0).cache("pers"); @@ -198,4 +204,4 @@ public Organization(String name) { this.name = name; } } -} \ No newline at end of file +} diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlRoutingTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlRoutingTest.java index 4976ee8a04c96..283298ce7ed0b 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlRoutingTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlRoutingTest.java @@ -48,11 +48,15 @@ import java.util.UUID; import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicInteger; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.events.EventType.EVT_CACHE_QUERY_EXECUTED; /** Tests for query partitions derivation. */ +@RunWith(JUnit4.class) public class IgniteSqlRoutingTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryVmIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -176,6 +180,7 @@ private CacheConfiguration buildCacheConfiguration(String name) { } /** */ + @Test public void testUnicastQuerySelectAffinityKeyEqualsConstant() throws Exception { IgniteCache cache = grid(NODE_CLIENT).cache(CACHE_CALL); @@ -189,6 +194,7 @@ public void testUnicastQuerySelectAffinityKeyEqualsConstant() throws Exception { } /** */ + @Test public void testUnicastQuerySelectAffinityKeyEqualsParameter() throws Exception { IgniteCache cache = grid(NODE_CLIENT).cache(CACHE_CALL); @@ -203,6 +209,7 @@ public void testUnicastQuerySelectAffinityKeyEqualsParameter() throws Exception } /** */ + @Test public void testUnicastQuerySelectKeyEqualsParameterReused() throws Exception { IgniteCache cache = grid(NODE_CLIENT).cache(CACHE_PERSON); @@ -219,6 +226,7 @@ public void testUnicastQuerySelectKeyEqualsParameterReused() throws Exception { } /** */ + @Test public void testUnicastQuerySelectKeyEqualsParameter() throws Exception { IgniteCache cache = grid(NODE_CLIENT).cache(CACHE_CALL); @@ -236,6 +244,7 @@ public void testUnicastQuerySelectKeyEqualsParameter() throws Exception { } /** Check group, having, ordering allowed to be unicast requests. */ + @Test public void testUnicastQueryGroups() throws Exception { IgniteCache cache = grid(NODE_CLIENT).cache(CACHE_CALL); @@ -257,6 +266,7 @@ public void testUnicastQueryGroups() throws Exception { } /** */ + @Test public void testUnicastQuerySelectKeyEqualAndFieldParameter() throws Exception { IgniteCache cache = grid(NODE_CLIENT).cache(CACHE_CALL); @@ -274,6 +284,7 @@ public void testUnicastQuerySelectKeyEqualAndFieldParameter() throws Exception { } /** */ + @Test public void testUnicastQuerySelect2KeyEqualsAndFieldParameter() throws Exception { IgniteCache cache = grid(NODE_CLIENT).cache(CACHE_CALL); @@ -296,6 +307,7 @@ public void testUnicastQuerySelect2KeyEqualsAndFieldParameter() throws Exception } /** */ + @Test public void testUnicastQueryKeyTypeConversionParameter() throws Exception { IgniteCache cache = grid(NODE_CLIENT).cache(CACHE_PERSON); @@ -313,6 +325,7 @@ public void testUnicastQueryKeyTypeConversionParameter() throws Exception { } /** */ + @Test public void testUnicastQueryKeyTypeConversionConstant() throws Exception { IgniteCache cache = grid(NODE_CLIENT).cache(CACHE_PERSON); @@ -329,6 +342,7 @@ public void testUnicastQueryKeyTypeConversionConstant() throws Exception { } /** */ + @Test public void testUnicastQueryAffinityKeyTypeConversionParameter() throws Exception { IgniteCache cache = grid(NODE_CLIENT).cache(CACHE_CALL); @@ -344,6 +358,7 @@ public void testUnicastQueryAffinityKeyTypeConversionParameter() throws Exceptio } /** */ + @Test public void testUnicastQueryAffinityKeyTypeConversionConstant() throws Exception { IgniteCache cache = grid(NODE_CLIENT).cache(CACHE_CALL); @@ -358,6 +373,7 @@ public void testUnicastQueryAffinityKeyTypeConversionConstant() throws Exception } /** */ + @Test public void testBroadcastQuerySelectKeyEqualsOrFieldParameter() throws Exception { IgniteCache cache = grid(NODE_CLIENT).cache(CACHE_CALL); @@ -371,6 +387,7 @@ public void testBroadcastQuerySelectKeyEqualsOrFieldParameter() throws Exception } /** */ + @Test public void testUuidKeyAsByteArrayParameter() throws Exception { String cacheName = "uuidCache"; @@ -411,6 +428,7 @@ public void testUuidKeyAsByteArrayParameter() throws Exception { } /** */ + @Test public void testDateKeyAsTimestampParameter() throws Exception { String cacheName = "dateCache"; diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSchemaIndexingTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSchemaIndexingTest.java index 63451cde623d0..38b52f3bceaf0 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSchemaIndexingTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSchemaIndexingTest.java @@ -36,11 +36,15 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link IgniteH2Indexing} support {@link CacheConfiguration#setSqlSchema(String)} configuration. */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class IgniteSqlSchemaIndexingTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -85,6 +89,7 @@ private static CacheConfiguration cacheConfig(String name, boolean partitioned, * * @throws Exception If failed. */ + @Test public void testCaseSensitive() throws Exception { //TODO rewrite with dynamic cache creation, and GRID start in #beforeTest after resolve of //TODO https://issues.apache.org/jira/browse/IGNITE-1094 @@ -114,6 +119,7 @@ public void testCaseSensitive() throws Exception { * * @throws Exception If failed. */ + @Test public void testCustomSchemaMultipleCachesTablesCollision() throws Exception { //TODO: Rewrite with dynamic cache creation, and GRID start in #beforeTest after resolve of //TODO: https://issues.apache.org/jira/browse/IGNITE-1094 @@ -143,6 +149,7 @@ public void testCustomSchemaMultipleCachesTablesCollision() throws Exception { * * @throws Exception If failed. */ + @Test public void testCacheUnregistration() throws Exception { startGridsMultiThreaded(3, true); @@ -181,6 +188,7 @@ public void testCacheUnregistration() throws Exception { * * @throws Exception If failed. */ + @Test public void testSchemaEscapeAll() throws Exception { startGridsMultiThreaded(3, true); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSegmentedIndexSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSegmentedIndexSelfTest.java index 389a1ab6529a0..386a9b4009e3b 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSegmentedIndexSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSegmentedIndexSelfTest.java @@ -38,10 +38,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for correct distributed queries with index consisted of many segments. */ +@RunWith(JUnit4.class) public class IgniteSqlSegmentedIndexSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -118,6 +122,7 @@ protected CacheConfiguration cacheConfig(String name, boolean parti /** * @throws Exception If failed. */ + @Test public void testSegmentedIndex() throws Exception { ignite(0).createCache(cacheConfig(PERSON_CAHE_NAME, true, Integer.class, Person.class)); ignite(0).createCache(cacheConfig(ORG_CACHE_NAME, true, Integer.class, Organization.class)); @@ -135,6 +140,7 @@ public void testSegmentedIndex() throws Exception { * Check correct index snapshots with segmented indices. * @throws Exception If failed. */ + @Test public void testSegmentedIndexReproducableResults() throws Exception { ignite(0).createCache(cacheConfig(ORG_CACHE_NAME, true, Integer.class, Organization.class)); @@ -160,6 +166,7 @@ public void testSegmentedIndexReproducableResults() throws Exception { * Checks correct select count(*) result with segmented indices. * @throws Exception If failed. */ + @Test public void testSegmentedIndexSizeReproducableResults() throws Exception { ignite(0).createCache(cacheConfig(ORG_CACHE_NAME, true, Integer.class, Organization.class)); @@ -186,6 +193,7 @@ public void testSegmentedIndexSizeReproducableResults() throws Exception { * * @throws Exception If failed. */ + @Test public void testSegmentedIndexWithEvictionPolicy() throws Exception { final IgniteCache cache = ignite(0).createCache( cacheConfig(ORG_CACHE_NAME, true, Integer.class, Organization.class) @@ -209,6 +217,7 @@ public void testSegmentedIndexWithEvictionPolicy() throws Exception { * * @throws Exception If failed. */ + @Test public void testSizeOnSegmentedIndexWithEvictionPolicy() throws Exception { final IgniteCache cache = ignite(0).createCache( cacheConfig(ORG_CACHE_NAME, true, Integer.class, Organization.class) @@ -232,6 +241,7 @@ public void testSizeOnSegmentedIndexWithEvictionPolicy() throws Exception { * * @throws Exception If failed. */ + @Test public void testSegmentedPartitionedWithReplicated() throws Exception { ignite(0).createCache(cacheConfig(PERSON_CAHE_NAME, true, Integer.class, Person.class)); ignite(0).createCache(cacheConfig(ORG_CACHE_NAME, false, Integer.class, Organization.class)); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSkipReducerOnUpdateDmlFlagSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSkipReducerOnUpdateDmlFlagSelfTest.java index 6d1b32b3b65bd..f805266241ee8 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSkipReducerOnUpdateDmlFlagSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSkipReducerOnUpdateDmlFlagSelfTest.java @@ -35,10 +35,14 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for {@link SqlFieldsQueryEx#skipReducerOnUpdate} flag. */ +@RunWith(JUnit4.class) public class IgniteSqlSkipReducerOnUpdateDmlFlagSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryVmIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -189,6 +193,7 @@ private CacheConfiguration buildCacheConfiguration(String name) { * * @throws Exception If failed. */ + @Test public void testUpdate() throws Exception { Map accounts = getAccounts(100, 1, 100); @@ -201,6 +206,7 @@ public void testUpdate() throws Exception { * * @throws Exception If failed. */ + @Test public void testUpdateFastKey() throws Exception { Map accounts = getAccounts(100, 1, 100); @@ -214,6 +220,7 @@ public void testUpdateFastKey() throws Exception { * * @throws Exception If failed. */ + @Test public void testUpdateLimit() throws Exception { Map accounts = getAccounts(100, 1, 100); @@ -227,6 +234,7 @@ public void testUpdateLimit() throws Exception { * * @throws Exception If failed. */ + @Test public void testUpdateWhereSubquery() throws Exception { Map accounts = getAccounts(100, 1, -100); @@ -245,6 +253,7 @@ public void testUpdateWhereSubquery() throws Exception { * * @throws Exception If failed. */ + @Test public void testUpdateSetSubquery() throws Exception { Map accounts = getAccounts(100, 1, 1000); Map trades = getTrades(100, 2); @@ -262,6 +271,7 @@ public void testUpdateSetSubquery() throws Exception { * * @throws Exception If failed. */ + @Test public void testUpdateSetTableSubquery() throws Exception { Map accounts = getAccounts(100, 1, 1000); Map trades = getTrades(100, 2); @@ -279,6 +289,7 @@ public void testUpdateSetTableSubquery() throws Exception { * * @throws Exception If failed. */ + @Test public void testInsertValues() throws Exception { String text = "INSERT INTO \"acc\".Account (_key, name, sn, depo)" + " VALUES (?, ?, ?, ?), (?, ?, ?, ?)"; @@ -291,6 +302,7 @@ public void testInsertValues() throws Exception { * * @throws Exception If failed. */ + @Test public void testInsertFromSelect() throws Exception { Map accounts = getAccounts(100, 1, 1000); @@ -307,6 +319,7 @@ public void testInsertFromSelect() throws Exception { * * @throws Exception If failed. */ + @Test public void testInsertFromSelectOrderBy() throws Exception { Map accounts = getAccounts(100, 1, 1000); @@ -324,6 +337,7 @@ public void testInsertFromSelectOrderBy() throws Exception { * * @throws Exception If failed. */ + @Test public void testInsertFromSelectUnion() throws Exception { Map accounts = getAccounts(20, 1, 1000); @@ -342,6 +356,7 @@ public void testInsertFromSelectUnion() throws Exception { * * @throws Exception If failed. */ + @Test public void testInsertFromSelectGroupBy() throws Exception { Map accounts = getAccounts(100, 1, 1000); Map trades = getTrades(100, 2); @@ -362,6 +377,7 @@ public void testInsertFromSelectGroupBy() throws Exception { * * @throws Exception If failed. */ + @Test public void testInsertFromSelectDistinct() throws Exception { Map accounts = getAccounts(100, 2, 100); @@ -378,6 +394,7 @@ public void testInsertFromSelectDistinct() throws Exception { * * @throws Exception If failed. */ + @Test public void testInsertFromSelectJoin() throws Exception { Map accounts = getAccounts(100, 1, 100); Map stocks = getStocks(5); @@ -397,6 +414,7 @@ public void testInsertFromSelectJoin() throws Exception { * * @throws Exception If failed. */ + @Test public void testDelete() throws Exception { Map accounts = getAccounts(100, 1, 100); @@ -412,6 +430,7 @@ public void testDelete() throws Exception { * * @throws Exception If failed. */ + @Test public void testDeleteTop() throws Exception { Map accounts = getAccounts(100, 1, 100); @@ -427,6 +446,7 @@ public void testDeleteTop() throws Exception { * * @throws Exception If failed. */ + @Test public void testDeleteWhereSubquery() throws Exception { Map accounts = getAccounts(20, 1, 100); Map trades = getTrades(10, 2); @@ -445,6 +465,7 @@ public void testDeleteWhereSubquery() throws Exception { * * @throws Exception If failed. */ + @Test public void testMergeValues() throws Exception { Map accounts = getAccounts(1, 1, 100); @@ -459,6 +480,7 @@ public void testMergeValues() throws Exception { * * @throws Exception If failed. */ + @Test public void testMergeFromSelectJoin() throws Exception { Map accounts = getAccounts(100, 1, 100); Map stocks = getStocks(5); @@ -482,6 +504,7 @@ public void testMergeFromSelectJoin() throws Exception { * * @throws Exception If failed. */ + @Test public void testMergeFromSelectOrderBy() throws Exception { Map accounts = getAccounts(100, 1, 1000); @@ -503,6 +526,7 @@ public void testMergeFromSelectOrderBy() throws Exception { * * @throws Exception If failed. */ + @Test public void testMergeFromSelectGroupBy() throws Exception { Map accounts = getAccounts(100, 1, 1000); Map trades = getTrades(100, 2); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSkipReducerOnUpdateDmlSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSkipReducerOnUpdateDmlSelfTest.java index 0a41d94de440c..ea534cd83b56f 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSkipReducerOnUpdateDmlSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSkipReducerOnUpdateDmlSelfTest.java @@ -54,6 +54,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.events.EventType.EVT_CACHE_QUERY_EXECUTED; @@ -62,6 +65,7 @@ * Tests for distributed DML. */ @SuppressWarnings({"unchecked"}) +@RunWith(JUnit4.class) public class IgniteSqlSkipReducerOnUpdateDmlSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryVmIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -201,6 +205,7 @@ private CacheConfiguration buildCacheConfiguration(String name) { * * @throws Exception if failed. */ + @Test public void testSimpleUpdateDistributedReplicated() throws Exception { fillCaches(); @@ -220,6 +225,7 @@ public void testSimpleUpdateDistributedReplicated() throws Exception { * * @throws Exception if failed. */ + @Test public void testSimpleUpdateDistributedPartitioned() throws Exception { fillCaches(); @@ -236,6 +242,7 @@ public void testSimpleUpdateDistributedPartitioned() throws Exception { * * @throws Exception if failed. */ + @Test public void testDistributedUpdateFailedKeys() throws Exception { // UPDATE can produce failed keys due to concurrent modification fillCaches(); @@ -254,6 +261,7 @@ public void testDistributedUpdateFailedKeys() throws Exception { * * @throws Exception if failed. */ + @Test public void testDistributedUpdateFail() throws Exception { fillCaches(); @@ -272,6 +280,7 @@ public void testDistributedUpdateFail() throws Exception { * @throws Exception if failed. */ @SuppressWarnings("ConstantConditions") + @Test public void testQueryParallelism() throws Exception { String cacheName = CACHE_ORG + "x4"; @@ -294,6 +303,7 @@ public void testQueryParallelism() throws Exception { * * @throws Exception if failed. */ + @Test public void testEvents() throws Exception { final CountDownLatch latch = new CountDownLatch(NODE_COUNT); @@ -332,6 +342,7 @@ public void testEvents() throws Exception { * * @throws Exception if failed. */ + @Test public void testSpecificPartitionsUpdate() throws Exception { fillCaches(); @@ -365,6 +376,7 @@ public void testSpecificPartitionsUpdate() throws Exception { * * @throws Exception if failed. */ + @Test public void testCancel() throws Exception { latch = new CountDownLatch(NODE_COUNT + 1); @@ -407,6 +419,7 @@ public void testCancel() throws Exception { * * @throws Exception if failed. */ + @Test public void testNodeStopDuringUpdate() throws Exception { startGrid(NODE_COUNT + 1); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSplitterSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSplitterSelfTest.java index 1ce2b2689ac1c..bc3bc19696091 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSplitterSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSplitterSelfTest.java @@ -57,12 +57,16 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testsuites.IgniteIgnore; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.springframework.util.StringUtils; /** * Tests for correct distributed partitioned queries. */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class IgniteSqlSplitterSelfTest extends GridCommonAbstractTest { /** */ private static final int CLIENT = 7; @@ -120,6 +124,7 @@ private static CacheConfiguration cacheConfig(String name, boolean partitioned, * Tests offset and limit clauses for query. * @throws Exception If failed. */ + @Test public void testOffsetLimit() throws Exception { IgniteCache c = ignite(0).getOrCreateCache(cacheConfig("ints", true, Integer.class, Integer.class)); @@ -160,6 +165,7 @@ public void testOffsetLimit() throws Exception { /** */ + @Test public void testMergeJoin() { fail("https://issues.apache.org/jira/browse/IGNITE-10199"); @@ -189,6 +195,7 @@ public void testMergeJoin() { } } + @Test public void testPushDownSubquery() { IgniteCache c = ignite(CLIENT).getOrCreateCache(cacheConfig("ps", true, Integer.class, Person.class)); @@ -234,6 +241,7 @@ public void testPushDownSubquery() { /** */ + @Test public void testPushDown() { IgniteCache c = ignite(CLIENT).getOrCreateCache(cacheConfig("ps", true, Integer.class, Person.class)); @@ -280,6 +288,7 @@ public void testPushDown() { /** */ + @Test public void testPushDownLeftJoin() { IgniteCache c = ignite(0).getOrCreateCache(cacheConfig("ps", true, Integer.class, Person.class)); @@ -330,48 +339,56 @@ public void testPushDownLeftJoin() { /** */ + @Test public void testReplicatedTablesUsingPartitionedCache() { doTestReplicatedTablesUsingPartitionedCache(1, false, false); } /** */ + @Test public void testReplicatedTablesUsingPartitionedCacheSegmented() { doTestReplicatedTablesUsingPartitionedCache(5, false, false); } /** */ + @Test public void testReplicatedTablesUsingPartitionedCacheClient() { doTestReplicatedTablesUsingPartitionedCache(1, true, false); } /** */ + @Test public void testReplicatedTablesUsingPartitionedCacheSegmentedClient() { doTestReplicatedTablesUsingPartitionedCache(5, true, false); } /** */ + @Test public void testReplicatedTablesUsingPartitionedCacheRO() { doTestReplicatedTablesUsingPartitionedCache(1, false, true); } /** */ + @Test public void testReplicatedTablesUsingPartitionedCacheSegmentedRO() { doTestReplicatedTablesUsingPartitionedCache(5, false, true); } /** */ + @Test public void testReplicatedTablesUsingPartitionedCacheClientRO() { doTestReplicatedTablesUsingPartitionedCache(1, true, true); } /** */ + @Test public void testReplicatedTablesUsingPartitionedCacheSegmentedClientRO() { doTestReplicatedTablesUsingPartitionedCache(5, true, true); } @@ -415,18 +432,22 @@ private void doTestReplicatedTablesUsingPartitionedCache(int segments, boolean c } } + @Test public void testPartitionedTablesUsingReplicatedCache() { doTestPartitionedTablesUsingReplicatedCache(1, false); } + @Test public void testPartitionedTablesUsingReplicatedCacheSegmented() { doTestPartitionedTablesUsingReplicatedCache(7, false); } + @Test public void testPartitionedTablesUsingReplicatedCacheClient() { doTestPartitionedTablesUsingReplicatedCache(1, true); } + @Test public void testPartitionedTablesUsingReplicatedCacheSegmentedClient() { doTestPartitionedTablesUsingReplicatedCache(7, true); } @@ -460,6 +481,7 @@ private void doTestPartitionedTablesUsingReplicatedCache(int segments, boolean c /** */ + @Test public void testSubQueryWithAggregate() { CacheConfiguration ccfg1 = cacheConfig("pers", true, AffinityKey.class, Person2.class); @@ -490,6 +512,7 @@ public void testSubQueryWithAggregate() { /** * @throws InterruptedException If failed. */ + @Test public void testDistributedJoinFromReplicatedCache() throws InterruptedException { CacheConfiguration ccfg1 = cacheConfig("pers", true, Integer.class, Person2.class); @@ -517,6 +540,7 @@ public void testDistributedJoinFromReplicatedCache() throws InterruptedException } @SuppressWarnings("SuspiciousMethodCalls") + @Test public void testExists() { IgniteCache x = ignite(0).getOrCreateCache(cacheConfig("x", true, Integer.class, Person2.class)); @@ -560,6 +584,7 @@ public void testExists() { /** * @throws Exception If failed. */ + @Test public void testSortedMergeIndex() throws Exception { IgniteCache c = ignite(0).getOrCreateCache(cacheConfig("v", true, Integer.class, Value.class)); @@ -624,6 +649,7 @@ public void testSortedMergeIndex() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGroupIndexOperations() throws Exception { IgniteCache c = ignite(0).getOrCreateCache(cacheConfig("grp", false, Integer.class, GroupIndexTestValue.class)); @@ -703,6 +729,7 @@ public void testGroupIndexOperations() throws Exception { /** */ + @Test public void testUseIndexHints() { CacheConfiguration ccfg = cacheConfig("pers", true, Integer.class, Person2.class); @@ -736,6 +763,7 @@ public void testUseIndexHints() { /** * @throws Exception If failed. */ + @Test public void testDistributedJoins() throws Exception { CacheConfiguration ccfg1 = cacheConfig("pers", true, Integer.class, Person2.class); @@ -767,6 +795,7 @@ public void testDistributedJoins() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDistributedJoinsUnion() throws Exception { CacheConfiguration ccfg1 = cacheConfig("pers", true, Integer.class, Person2.class); CacheConfiguration ccfg2 = cacheConfig("org", true, Integer.class, Organization.class); @@ -821,6 +850,7 @@ public void testDistributedJoinsUnion() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDistributedJoinsUnionPartitionedReplicated() throws Exception { CacheConfiguration ccfg1 = cacheConfig("pers", true, Integer.class, Person2.class); @@ -890,6 +920,7 @@ public void testDistributedJoinsUnionPartitionedReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDistributedJoinsPlan() throws Exception { List> caches = new ArrayList<>(); @@ -1244,6 +1275,7 @@ public void testDistributedJoinsPlan() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDistributedJoinsEnforceReplicatedNotLast() throws Exception { List> caches = new ArrayList<>(); @@ -1291,24 +1323,28 @@ public void testDistributedJoinsEnforceReplicatedNotLast() throws Exception { /** */ + @Test public void testSchemaQuoted() { doTestSchemaName("\"ppAf\""); } /** */ + @Test public void testSchemaQuotedUpper() { doTestSchemaName("\"PPAF\""); } /** */ + @Test public void testSchemaUnquoted() { doTestSchemaName("ppAf"); } /** */ + @Test public void testSchemaUnquotedUpper() { doTestSchemaName("PPAF"); } @@ -1341,6 +1377,7 @@ public void doTestSchemaName(String schema) { /** * @throws Exception If failed. */ + @Test public void testIndexSegmentation() throws Exception { CacheConfiguration ccfg1 = cacheConfig("pers", true, Integer.class, Person2.class).setQueryParallelism(4); @@ -1372,6 +1409,7 @@ public void testIndexSegmentation() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReplicationCacheIndexSegmentationFailure() throws Exception { GridTestUtils.assertThrows(log, new Callable() { @Override public Void call() throws Exception { @@ -1388,6 +1426,7 @@ public void testReplicationCacheIndexSegmentationFailure() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIndexSegmentationPartitionedReplicated() throws Exception { CacheConfiguration ccfg1 = cacheConfig("pers", true, Integer.class, Person2.class).setQueryParallelism(4); @@ -1454,6 +1493,7 @@ public void testIndexSegmentationPartitionedReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIndexWithDifferentSegmentationLevelsFailure() throws Exception { CacheConfiguration ccfg1 = cacheConfig("pers", true, Integer.class, Person2.class).setQueryParallelism(4); @@ -1630,6 +1670,7 @@ private void checkQueryPlan(IgniteCache cache, /** * Test HAVING clause. */ + @Test public void testHaving() { IgniteCache c = ignite(0).getOrCreateCache(cacheConfig("having", true, Integer.class, Integer.class)); @@ -1768,6 +1809,7 @@ private static List column(int idx, List> rows) { * */ @IgniteIgnore(value = "https://issues.apache.org/jira/browse/IGNITE-1886", forceFailure = true) + @Test public void testFunctionNpe() { IgniteCache userCache = ignite(0).createCache( cacheConfig("UserCache", true, Integer.class, User.class)); @@ -1800,6 +1842,7 @@ public void testFunctionNpe() { /** * */ + @Test public void testImplicitJoinConditionGeneration() { IgniteCache p = ignite(0).createCache(cacheConfig("P", true, Integer.class, Person.class)); IgniteCache d = ignite(0).createCache(cacheConfig("D", true, Integer.class, Department.class)); @@ -1828,6 +1871,7 @@ public void testImplicitJoinConditionGeneration() { /** * @throws Exception If failed. */ + @Test public void testJoinWithSubquery() throws Exception { IgniteCache c1 = ignite(0).createCache( cacheConfig("Contract", true, @@ -1857,6 +1901,7 @@ public void testJoinWithSubquery() throws Exception { } /** @throws Exception if failed. */ + @Test public void testDistributedAggregates() throws Exception { final String cacheName = "ints"; @@ -1904,6 +1949,7 @@ public void testDistributedAggregates() throws Exception { } /** @throws Exception if failed. */ + @Test public void testCollocatedAggregates() throws Exception { final String cacheName = "ints"; @@ -1950,6 +1996,7 @@ public void testCollocatedAggregates() throws Exception { * * @throws Exception If failed, */ + @Test public void testEmptyCacheAggregates() throws Exception { final String cacheName = "ints"; @@ -1980,6 +2027,7 @@ public void testEmptyCacheAggregates() throws Exception { * * @throws Exception If failed. */ + @Test public void testAvgVariousDataTypes() throws Exception { final String cacheName = "avgtypes"; diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/LazyQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/LazyQuerySelfTest.java index d6e4a24245b5d..49b6d55684ea1 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/LazyQuerySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/LazyQuerySelfTest.java @@ -35,10 +35,14 @@ import java.util.Iterator; import java.util.List; import java.util.concurrent.ThreadLocalRandom; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for lazy query execution. */ +@RunWith(JUnit4.class) public class LazyQuerySelfTest extends GridCommonAbstractTest { /** Keys ocunt. */ private static final int KEY_CNT = 200; @@ -62,6 +66,7 @@ public class LazyQuerySelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testSingleNode() throws Exception { checkSingleNode(1); } @@ -71,6 +76,7 @@ public void testSingleNode() throws Exception { * * @throws Exception If failed. */ + @Test public void testSingleNodeWithParallelism() throws Exception { checkSingleNode(4); } @@ -80,6 +86,7 @@ public void testSingleNodeWithParallelism() throws Exception { * * @throws Exception If failed. */ + @Test public void testMultipleNodes() throws Exception { checkMultipleNodes(1); } @@ -89,6 +96,7 @@ public void testMultipleNodes() throws Exception { * * @throws Exception If failed. */ + @Test public void testMultipleNodesWithParallelism() throws Exception { checkMultipleNodes(4); } diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/MultipleStatementsSqlQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/MultipleStatementsSqlQuerySelfTest.java index 65b97950db032..2c07349d8aefa 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/MultipleStatementsSqlQuerySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/MultipleStatementsSqlQuerySelfTest.java @@ -25,10 +25,14 @@ import org.apache.ignite.internal.processors.cache.QueryCursorImpl; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for schemas. */ +@RunWith(JUnit4.class) public class MultipleStatementsSqlQuerySelfTest extends GridCommonAbstractTest { /** Node. */ private IgniteEx node; @@ -48,6 +52,7 @@ public class MultipleStatementsSqlQuerySelfTest extends GridCommonAbstractTest { /** * Test query without caches. */ + @Test public void testQuery() { GridQueryProcessor qryProc = node.context().query(); @@ -91,6 +96,7 @@ public void testQuery() { /** * Test query without caches. */ + @Test public void testQueryWithParameters() { GridQueryProcessor qryProc = node.context().query(); @@ -134,6 +140,7 @@ public void testQueryWithParameters() { /** */ + @Test public void testQueryMultipleStatementsFailed() { final SqlFieldsQuery qry = new SqlFieldsQuery("select 1; select 1;").setSchema("PUBLIC"); @@ -150,6 +157,7 @@ public void testQueryMultipleStatementsFailed() { /** * Check cached two-steps query. */ + @Test public void testCachedTwoSteps() { List>> curs = sql("SELECT 1; SELECT 2"); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/RunningQueriesTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/RunningQueriesTest.java index ae30552e77f62..f0efb63c4766a 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/RunningQueriesTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/RunningQueriesTest.java @@ -29,14 +29,19 @@ import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for running queries. */ +@RunWith(JUnit4.class) public class RunningQueriesTest extends GridCommonAbstractTest { /** * */ + @Test public void testQueriesOriginalText() throws Exception { IgniteEx ignite = startGrid(0); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlIllegalSchemaSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlIllegalSchemaSelfTest.java index a75a36597bc36..7ebc65f5164f0 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlIllegalSchemaSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlIllegalSchemaSelfTest.java @@ -32,11 +32,15 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for illegal SQL schemas in node and cache configurations. */ @SuppressWarnings({"ThrowableNotThrown", "unchecked"}) +@RunWith(JUnit4.class) public class SqlIllegalSchemaSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected void afterTest() throws Exception { @@ -51,6 +55,7 @@ public class SqlIllegalSchemaSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testBadCacheName() throws Exception { IgniteConfiguration cfg = getConfiguration(); @@ -70,6 +75,7 @@ public void testBadCacheName() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBadCacheNameDynamic() throws Exception { doubleConsumerAccept( (node)->{ @@ -97,6 +103,7 @@ public void testBadCacheNameDynamic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBadSchemaLower() throws Exception { IgniteConfiguration cfg = getConfiguration(); @@ -116,6 +123,7 @@ public void testBadSchemaLower() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBadSchemaLowerDynamic() throws Exception { doubleConsumerAccept( (node) -> { @@ -143,6 +151,7 @@ public void testBadSchemaLowerDynamic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBadSchemaUpper() throws Exception { IgniteConfiguration cfg = getConfiguration(); @@ -162,6 +171,7 @@ public void testBadSchemaUpper() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBadSchemaUpperDynamic() throws Exception { doubleConsumerAccept( (node) -> { @@ -189,6 +199,7 @@ public void testBadSchemaUpperDynamic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBadSchemaQuoted() throws Exception { IgniteConfiguration cfg = getConfiguration(); @@ -208,6 +219,7 @@ public void testBadSchemaQuoted() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBadSchemaQuotedDynamic() throws Exception { doubleConsumerAccept( (node) -> { diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlNestedQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlNestedQuerySelfTest.java index f3545f259559a..c21b1dc008d1e 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlNestedQuerySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlNestedQuerySelfTest.java @@ -21,10 +21,14 @@ import org.apache.ignite.cache.query.SqlFieldsQuery; import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for schemas. */ +@RunWith(JUnit4.class) public class SqlNestedQuerySelfTest extends GridCommonAbstractTest { /** Node. */ private IgniteEx node; @@ -43,6 +47,7 @@ public class SqlNestedQuerySelfTest extends GridCommonAbstractTest { /** */ + @Test public void testNestingQuery() { sql("CREATE TABLE txs(txId INTEGER PRIMARY KEY, created INTEGER)"); sql("CREATE TABLE ops(id INTEGER PRIMARY KEY, txId INTEGER, stage VARCHAR, tStamp INTEGER)"); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlPushDownFunctionTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlPushDownFunctionTest.java index 9e7877003d27e..a36b4796f7e2b 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlPushDownFunctionTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlPushDownFunctionTest.java @@ -21,10 +21,14 @@ import org.apache.ignite.cache.query.SqlFieldsQuery; import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for schemas. */ +@RunWith(JUnit4.class) public class SqlPushDownFunctionTest extends GridCommonAbstractTest { /** Node. */ private IgniteEx node; @@ -43,6 +47,7 @@ public class SqlPushDownFunctionTest extends GridCommonAbstractTest { /** */ + @Test public void testPushDownFunction() { sql("CREATE TABLE Person(id INTEGER PRIMARY KEY, company_id INTEGER)"); sql("CREATE TABLE Company(id INTEGER PRIMARY KEY, name VARCHAR)"); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlSchemaSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlSchemaSelfTest.java index dcfffd803f79f..b02ef49ac377f 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlSchemaSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlSchemaSelfTest.java @@ -34,10 +34,14 @@ import org.apache.ignite.internal.util.typedef.X; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for schemas. */ +@RunWith(JUnit4.class) public class SqlSchemaSelfTest extends GridCommonAbstractTest { /** Person cache name. */ private static final String CACHE_PERSON = "PersonCache"; @@ -65,6 +69,7 @@ public class SqlSchemaSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testQueryWithoutCacheOnPublicSchema() throws Exception { GridQueryProcessor qryProc = node.context().query(); @@ -93,6 +98,7 @@ public void testQueryWithoutCacheOnPublicSchema() throws Exception { * * @throws Exception If failed. */ + @Test public void testQueryWithoutCacheOnCacheSchema() throws Exception { node.createCache(new CacheConfiguration() .setName(CACHE_PERSON) @@ -125,6 +131,7 @@ public void testQueryWithoutCacheOnCacheSchema() throws Exception { * * @throws Exception If failed. */ + @Test public void testSchemaChange() throws Exception { IgniteCache cache = node.createCache(new CacheConfiguration() .setName(CACHE_PERSON) @@ -165,6 +172,7 @@ public void testSchemaChange() throws Exception { * * @throws Exception If failed. */ + @Test public void testSchemaChangeOnCacheWithPublicSchema() throws Exception { IgniteCache cache = node.createCache(new CacheConfiguration() .setName(CACHE_PERSON) @@ -201,6 +209,7 @@ public void testSchemaChangeOnCacheWithPublicSchema() throws Exception { * * @throws Exception If failed. */ + @Test public void testCustomSchemaName() throws Exception { IgniteCache cache = registerQueryEntity("Person", CACHE_PERSON); @@ -212,6 +221,7 @@ public void testCustomSchemaName() throws Exception { * * @throws Exception If failed. */ + @Test public void testCustomSchemaMultipleCaches() throws Exception { for (int i = 1; i <= 3; i++) { String tbl = "Person" + i; @@ -233,6 +243,7 @@ public void testCustomSchemaMultipleCaches() throws Exception { * * @throws Exception If failed. */ + @Test public void testCustomSchemaConcurrentUse() throws Exception { final AtomicInteger maxIdx = new AtomicInteger(); @@ -296,6 +307,7 @@ private void testQueryEntity(IgniteCache cache, String tbl) { * * @throws Exception If failed. */ + @Test public void testTypeConflictInPublicSchema() throws Exception { node.createCache(new CacheConfiguration() .setName(CACHE_PERSON) diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlSystemViewsSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlSystemViewsSelfTest.java index 243dcd19c829e..5be574c354805 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlSystemViewsSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlSystemViewsSelfTest.java @@ -56,10 +56,14 @@ import org.apache.ignite.lang.IgniteRunnable; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for ignite SQL system views. */ +@RunWith(JUnit4.class) public class SqlSystemViewsSelfTest extends GridCommonAbstractTest { /** Metrics check attempts. */ private static final int METRICS_CHECK_ATTEMPTS = 10; @@ -121,10 +125,11 @@ private void assertSqlError(final String sql) { assertEquals(IgniteQueryErrorCode.UNSUPPORTED_OPERATION, sqlE.statusCode()); } - + /** * Test system views modifications. */ + @Test public void testModifications() throws Exception { startGrid(getConfiguration()); @@ -152,6 +157,7 @@ public void testModifications() throws Exception { /** * Test different query modes. */ + @Test public void testQueryModes() throws Exception { Ignite ignite = startGrid(0); startGrid(1); @@ -180,6 +186,7 @@ public void testQueryModes() throws Exception { /** * Test that we can't use cache tables and system views in the same query. */ + @Test public void testCacheToViewJoin() throws Exception { Ignite ignite = startGrid(); @@ -205,6 +212,7 @@ private void assertColumnTypes(List rowData, Class ... colTypes) { * * @throws Exception If failed. */ + @Test public void testNodesViews() throws Exception { Ignite igniteSrv = startGrid(getTestIgniteInstanceName(), getConfiguration().setMetricsUpdateFrequency(500L)); @@ -471,6 +479,7 @@ public void testNodesViews() throws Exception { /** * Test baseline topology system view. */ + @Test public void testBaselineViews() throws Exception { cleanPersistenceDir(); @@ -520,6 +529,7 @@ public void testBaselineViews() throws Exception { * Test caches system views. */ @SuppressWarnings("ConstantConditions") + @Test public void testCachesViews() throws Exception { DataStorageConfiguration dsCfg = new DataStorageConfiguration() .setDefaultDataRegionConfiguration(new DataRegionConfiguration().setName("def").setPersistenceEnabled(true)) From e5380d9d98fa79558961e2829637602ea7ca9ce8 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Fri, 7 Dec 2018 21:06:58 +0300 Subject: [PATCH 072/176] IGNITE-10176 migrate non-core modules tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview and rebuild --- ...yWithJsr310Java8DateTimeApiFieldsTest.java | 9 ++++++++ .../ignite/logger/jcl/JclLoggerTest.java | 7 +++++- .../stream/jms11/IgniteJmsStreamerTest.java | 22 ++++++++++++++++--- .../cache/CacheJndiTmFactorySelfTest.java | 6 +++++ ...cheJtaConfigurationValidationSelfTest.java | 5 +++++ ...cheJtaFactoryConfigValidationSelfTest.java | 7 ++++++ .../cache/GridJtaLifecycleAwareSelfTest.java | 8 +++++++ .../GridJtaTransactionManagerSelfTest.java | 6 +++++ .../cache/jta/AbstractCacheJtaSelfTest.java | 7 ++++++ ...tionedCacheJtaLookupClassNameSelfTest.java | 5 +++++ .../kafka/KafkaIgniteStreamerSelfTest.java | 5 +++++ .../connect/IgniteSinkConnectorTest.java | 6 +++++ .../connect/IgniteSourceConnectorTest.java | 6 +++++ ...cpDiscoveryKubernetesIpFinderSelfTest.java | 7 +++++- .../log4j/GridLog4jConfigUpdateTest.java | 8 +++++++ .../log4j/GridLog4jCorrectFileNameTest.java | 5 +++++ .../log4j/GridLog4jInitializedTest.java | 7 +++++- .../log4j/GridLog4jLoggingFileTest.java | 7 +++++- .../log4j/GridLog4jLoggingPathTest.java | 7 +++++- .../logger/log4j/GridLog4jLoggingUrlTest.java | 7 +++++- .../log4j/GridLog4jNotInitializedTest.java | 7 +++++- .../logger/log4j2/Log4j2ConfigUpdateTest.java | 7 ++++++ .../logger/log4j2/Log4j2LoggerMarkerTest.java | 9 ++++++++ .../logger/log4j2/Log4j2LoggerSelfTest.java | 11 +++++++++- .../Log4j2LoggerVerboseModeSelfTest.java | 11 ++++++++-- 25 files changed, 179 insertions(+), 13 deletions(-) diff --git a/modules/indexing/src/test/java8/org/apache/ignite/internal/processors/query/h2/CacheQueryEntityWithJsr310Java8DateTimeApiFieldsTest.java b/modules/indexing/src/test/java8/org/apache/ignite/internal/processors/query/h2/CacheQueryEntityWithJsr310Java8DateTimeApiFieldsTest.java index 9cb0f21562cfc..1854978adfd95 100644 --- a/modules/indexing/src/test/java8/org/apache/ignite/internal/processors/query/h2/CacheQueryEntityWithJsr310Java8DateTimeApiFieldsTest.java +++ b/modules/indexing/src/test/java8/org/apache/ignite/internal/processors/query/h2/CacheQueryEntityWithJsr310Java8DateTimeApiFieldsTest.java @@ -35,6 +35,7 @@ /** * Tests queries against entities with JSR-310 Java 8 Date and Time API fields. */ +@RunWith(JUnit4.class) public class CacheQueryEntityWithJsr310Java8DateTimeApiFieldsTest extends CacheQueryJsr310Java8DateTimeApiAbstractTest { /** * Entity containing JSR-310 fields. @@ -222,6 +223,7 @@ private static CacheConfiguration createCacheConfi * * @throws Exception If failed. */ + @Test public void testInsertEntityFields() throws Exception { cache.remove(entity.getId()); @@ -247,6 +249,7 @@ public void testInsertEntityFields() throws Exception { * * @throws Exception If failed. */ + @Test public void testDateDiffForLocalDateTimeFieldAtMidnight() throws Exception { SqlFieldsQuery qry = new SqlFieldsQuery("select DATEDIFF('DAY', locDateTime, CURRENT_DATE ()) from EntityWithJsr310Fields"); @@ -262,6 +265,7 @@ public void testDateDiffForLocalDateTimeFieldAtMidnight() throws Exception { * * @throws Exception If failed. */ + @Test public void testSelectLocalTimeFieldReturnsTime() throws Exception { SqlFieldsQuery qry = new SqlFieldsQuery("select locTime from EntityWithJsr310Fields"); @@ -276,6 +280,7 @@ public void testSelectLocalTimeFieldReturnsTime() throws Exception { * * @throws Exception If failed. */ + @Test public void testSelectLocalDateFieldReturnsDate() throws Exception { SqlFieldsQuery qry = new SqlFieldsQuery("select locDate from EntityWithJsr310Fields"); @@ -290,6 +295,7 @@ public void testSelectLocalDateFieldReturnsDate() throws Exception { * * @throws Exception If failed. */ + @Test public void testSelectLocalDateTimeFieldReturnsTimestamp() throws Exception { SqlFieldsQuery qry = new SqlFieldsQuery("select locDateTime from EntityWithJsr310Fields"); @@ -302,6 +308,7 @@ public void testSelectLocalDateTimeFieldReturnsTimestamp() throws Exception { /** * Tests selection of an entity by a {@link LocalTime} field. */ + @Test public void testSelectByAllJsr310Fields() { SqlFieldsQuery qry = new SqlFieldsQuery( "select locDate from EntityWithJsr310Fields where locTime = ? and locDate = ? and locDateTime = ?" @@ -316,6 +323,7 @@ public void testSelectByAllJsr310Fields() { /** * Tests updating of all JSR-310 fields. */ + @Test public void testUpdateAllJsr310Fields() { EntityWithJsr310Fields expEntity = new EntityWithJsr310Fields(entity); @@ -337,6 +345,7 @@ public void testUpdateAllJsr310Fields() { /** * Tests deleting by all JSR-310 fields. */ + @Test public void testDeleteByAllJsr310Fields() { SqlFieldsQuery qry = new SqlFieldsQuery( "delete from EntityWithJsr310Fields where locTime = ? and locDate = ? and locDateTime = ?" diff --git a/modules/jcl/src/test/java/org/apache/ignite/logger/jcl/JclLoggerTest.java b/modules/jcl/src/test/java/org/apache/ignite/logger/jcl/JclLoggerTest.java index f7b60ecdcc70c..e6c8c1e36d99d 100644 --- a/modules/jcl/src/test/java/org/apache/ignite/logger/jcl/JclLoggerTest.java +++ b/modules/jcl/src/test/java/org/apache/ignite/logger/jcl/JclLoggerTest.java @@ -21,17 +21,22 @@ import org.apache.commons.logging.LogFactory; import org.apache.ignite.IgniteLogger; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Jcl logger test. */ @GridCommonTest(group = "Logger") +@RunWith(JUnit4.class) public class JclLoggerTest extends TestCase { /** */ @SuppressWarnings({"FieldCanBeLocal"}) private IgniteLogger log; /** */ + @Test public void testLogInitialize() { log = new JclLogger(LogFactory.getLog(JclLoggerTest.class.getName())); @@ -45,4 +50,4 @@ public void testLogInitialize() { assert log.getLogger(JclLoggerTest.class.getName()) instanceof JclLogger; } -} \ No newline at end of file +} diff --git a/modules/jms11/src/test/java/org/apache/ignite/stream/jms11/IgniteJmsStreamerTest.java b/modules/jms11/src/test/java/org/apache/ignite/stream/jms11/IgniteJmsStreamerTest.java index caf8f9eb644bc..45e5b337fe001 100644 --- a/modules/jms11/src/test/java/org/apache/ignite/stream/jms11/IgniteJmsStreamerTest.java +++ b/modules/jms11/src/test/java/org/apache/ignite/stream/jms11/IgniteJmsStreamerTest.java @@ -59,6 +59,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.After; import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_PUT; @@ -67,6 +70,7 @@ * * @author Raul Kripalani */ +@RunWith(JUnit4.class) public class IgniteJmsStreamerTest extends GridCommonAbstractTest { /** */ private static final int CACHE_ENTRY_COUNT = 100; @@ -101,7 +105,7 @@ public IgniteJmsStreamerTest() { */ @Before @SuppressWarnings("unchecked") - public void beforeTest() throws Exception { + @Override public void beforeTest() throws Exception { grid().getOrCreateCache(defaultCacheConfiguration()); broker = new BrokerService(); @@ -128,7 +132,7 @@ public void beforeTest() throws Exception { * @throws Exception Iff ailed. */ @After - public void afterTest() throws Exception { + @Override public void afterTest() throws Exception { grid().cache(DEFAULT_CACHE_NAME).clear(); broker.stop(); @@ -138,6 +142,7 @@ public void afterTest() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueueFromName() throws Exception { Destination dest = new ActiveMQQueue(QUEUE_NAME); @@ -167,6 +172,7 @@ public void testQueueFromName() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTopicFromName() throws JMSException, InterruptedException { Destination dest = new ActiveMQTopic(TOPIC_NAME); @@ -199,6 +205,7 @@ public void testTopicFromName() throws JMSException, InterruptedException { /** * @throws Exception If failed. */ + @Test public void testQueueFromExplicitDestination() throws Exception { Destination dest = new ActiveMQQueue(QUEUE_NAME); @@ -228,6 +235,7 @@ public void testQueueFromExplicitDestination() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTopicFromExplicitDestination() throws JMSException, InterruptedException { Destination dest = new ActiveMQTopic(TOPIC_NAME); @@ -259,6 +267,7 @@ public void testTopicFromExplicitDestination() throws JMSException, InterruptedE /** * @throws Exception If failed. */ + @Test public void testInsertMultipleCacheEntriesFromOneMessage() throws Exception { Destination dest = new ActiveMQQueue(QUEUE_NAME); @@ -287,6 +296,7 @@ public void testInsertMultipleCacheEntriesFromOneMessage() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDurableSubscriberStartStopStart() throws Exception { Destination dest = new ActiveMQTopic(TOPIC_NAME); @@ -327,6 +337,7 @@ public void testDurableSubscriberStartStopStart() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueueMessagesConsumedInBatchesCompletionSizeBased() throws Exception { Destination dest = new ActiveMQQueue(QUEUE_NAME); @@ -366,6 +377,7 @@ public void testQueueMessagesConsumedInBatchesCompletionSizeBased() throws Excep /** * @throws Exception If failed. */ + @Test public void testQueueMessagesConsumedInBatchesCompletionTimeBased() throws Exception { Destination dest = new ActiveMQQueue(QUEUE_NAME); @@ -416,6 +428,7 @@ public void testQueueMessagesConsumedInBatchesCompletionTimeBased() throws Excep /** * @throws Exception If failed. */ + @Test public void testGenerateNoEntries() throws Exception { Destination dest = new ActiveMQQueue(QUEUE_NAME); @@ -444,6 +457,7 @@ public void testGenerateNoEntries() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTransactedSessionNoBatching() throws Exception { Destination dest = new ActiveMQQueue(QUEUE_NAME); @@ -473,6 +487,7 @@ public void testTransactedSessionNoBatching() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueueMultipleThreads() throws Exception { Destination dest = new ActiveMQQueue(QUEUE_NAME); @@ -512,6 +527,7 @@ public void testQueueMultipleThreads() throws Exception { * * @throws Exception If fails. */ + @Test public void testExceptionListener() throws Exception { // restart broker with auth plugin if (broker.isStarted()) @@ -696,4 +712,4 @@ private void produceStringMessages(Destination dest, boolean singleMsg) throws J } } -} \ No newline at end of file +} diff --git a/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/CacheJndiTmFactorySelfTest.java b/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/CacheJndiTmFactorySelfTest.java index 494c5b726e196..0dae5f87f37e6 100644 --- a/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/CacheJndiTmFactorySelfTest.java +++ b/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/CacheJndiTmFactorySelfTest.java @@ -32,10 +32,14 @@ import org.apache.ignite.cache.jta.jndi.CacheJndiTmFactory; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class CacheJndiTmFactorySelfTest extends GridCommonAbstractTest { /** */ private static final String TM_JNDI_NAME = "java:/comp/env/tm/testtm1"; @@ -87,6 +91,7 @@ public class CacheJndiTmFactorySelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testFactory() throws Exception { CacheJndiTmFactory f = new CacheJndiTmFactory("wrongJndiName", NOT_TM_JNDI_NAME, TM_JNDI_NAME2, TM_JNDI_NAME); @@ -100,6 +105,7 @@ public void testFactory() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFactoryException() throws Exception { final CacheJndiTmFactory f = new CacheJndiTmFactory("wrongJndiName", NOT_TM_JNDI_NAME, "wrongJndiName2"); diff --git a/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheJtaConfigurationValidationSelfTest.java b/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheJtaConfigurationValidationSelfTest.java index c7b7feddbb384..dc65ae5daf3b6 100644 --- a/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheJtaConfigurationValidationSelfTest.java +++ b/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheJtaConfigurationValidationSelfTest.java @@ -26,12 +26,16 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; /** * Configuration validation test. */ +@RunWith(JUnit4.class) public class GridCacheJtaConfigurationValidationSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { @@ -53,6 +57,7 @@ public class GridCacheJtaConfigurationValidationSelfTest extends GridCommonAbstr * * @throws Exception If failed. */ + @Test public void testAtomicWithTmLookup() throws Exception { GridTestUtils.assertThrows(log, new Callable() { @Override public Void call() throws Exception { diff --git a/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheJtaFactoryConfigValidationSelfTest.java b/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheJtaFactoryConfigValidationSelfTest.java index bb12d5e2b3de8..c63df3cdb90a3 100644 --- a/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheJtaFactoryConfigValidationSelfTest.java +++ b/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheJtaFactoryConfigValidationSelfTest.java @@ -25,12 +25,16 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; /** * Configuration validation test. */ +@RunWith(JUnit4.class) public class GridCacheJtaFactoryConfigValidationSelfTest extends GridCommonAbstractTest { /** */ private Factory factory; @@ -53,6 +57,7 @@ public class GridCacheJtaFactoryConfigValidationSelfTest extends GridCommonAbstr /** * @throws Exception If failed. */ + @Test public void testNullFactory() throws Exception { factory = new NullTxFactory(); @@ -70,6 +75,7 @@ public void testNullFactory() throws Exception { /** * @throws Exception If failed. */ + @Test public void testWrongTypeFactory() throws Exception { factory = new IntegerTxFactory(); @@ -87,6 +93,7 @@ public void testWrongTypeFactory() throws Exception { /** * @throws Exception If failed. */ + @Test public void testExceptionFactory() throws Exception { factory = new ExceptionTxFactory(); diff --git a/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridJtaLifecycleAwareSelfTest.java b/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridJtaLifecycleAwareSelfTest.java index c10d11541ccd1..bd36a2593a452 100644 --- a/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridJtaLifecycleAwareSelfTest.java +++ b/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridJtaLifecycleAwareSelfTest.java @@ -31,12 +31,16 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.testframework.junits.common.GridAbstractLifecycleAwareSelfTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** * Test for {@link LifecycleAware} support for {@link CacheTmLookup}. */ +@RunWith(JUnit4.class) public class GridJtaLifecycleAwareSelfTest extends GridAbstractLifecycleAwareSelfTest { /** */ private static final String CACHE_NAME = "cache"; @@ -140,11 +144,13 @@ public static class TestTxFactory extends GridAbstractLifecycleAwareSelfTest.Tes } /** {@inheritDoc} */ + @Test @Override public void testLifecycleAware() throws Exception { // No-op, see anothre tests. } /** {@inheritDoc} */ + @Test public void testCacheLookupLifecycleAware() throws Exception { tmConfigurationType = TmConfigurationType.CACHE_LOOKUP; @@ -152,6 +158,7 @@ public void testCacheLookupLifecycleAware() throws Exception { } /** {@inheritDoc} */ + @Test public void testGlobalLookupLifecycleAware() throws Exception { tmConfigurationType = TmConfigurationType.GLOBAL_LOOKUP; @@ -159,6 +166,7 @@ public void testGlobalLookupLifecycleAware() throws Exception { } /** {@inheritDoc} */ + @Test public void testFactoryLifecycleAware() throws Exception { tmConfigurationType = TmConfigurationType.FACTORY; diff --git a/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridJtaTransactionManagerSelfTest.java b/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridJtaTransactionManagerSelfTest.java index a7bb78523646e..dff2aacb62856 100644 --- a/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridJtaTransactionManagerSelfTest.java +++ b/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridJtaTransactionManagerSelfTest.java @@ -26,6 +26,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.objectweb.jotm.Current; import org.objectweb.jotm.Jotm; @@ -35,6 +38,7 @@ /** * JTA Tx Manager test. */ +@RunWith(JUnit4.class) public class GridJtaTransactionManagerSelfTest extends GridCommonAbstractTest { /** Java Open Transaction Manager facade. */ private static Jotm jotm; @@ -70,6 +74,7 @@ public class GridJtaTransactionManagerSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testJtaTxContextSwitch() throws Exception { for (TransactionIsolation isolation : TransactionIsolation.values()) { TransactionConfiguration cfg = grid().context().config().getTransactionConfiguration(); @@ -144,6 +149,7 @@ public void testJtaTxContextSwitch() throws Exception { /** * @throws Exception If failed. */ + @Test public void testJtaTxContextSwitchWithExistingTx() throws Exception { for (TransactionIsolation isolation : TransactionIsolation.values()) { TransactionConfiguration cfg = grid().context().config().getTransactionConfiguration(); diff --git a/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/jta/AbstractCacheJtaSelfTest.java b/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/jta/AbstractCacheJtaSelfTest.java index 5111b44fa33bd..1ea553db203c9 100644 --- a/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/jta/AbstractCacheJtaSelfTest.java +++ b/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/jta/AbstractCacheJtaSelfTest.java @@ -27,6 +27,9 @@ import org.apache.ignite.internal.processors.cache.GridCacheAbstractSelfTest; import org.apache.ignite.testframework.GridTestSafeThreadFactory; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.objectweb.jotm.Jotm; import java.util.concurrent.Callable; import java.util.concurrent.CountDownLatch; @@ -39,6 +42,7 @@ /** * Abstract class for cache tests. */ +@RunWith(JUnit4.class) public abstract class AbstractCacheJtaSelfTest extends GridCacheAbstractSelfTest { /** */ private static final int GRID_CNT = 1; @@ -97,6 +101,7 @@ public abstract class AbstractCacheJtaSelfTest extends GridCacheAbstractSelfTest * * @throws Exception If failed. */ + @Test public void testJta() throws Exception { UserTransaction jtaTx = jotm.getUserTransaction(); @@ -140,6 +145,7 @@ public void testJta() throws Exception { /** * @throws Exception If failed. */ + @Test public void testJtaTwoCaches() throws Exception { UserTransaction jtaTx = jotm.getUserTransaction(); @@ -189,6 +195,7 @@ public void testJtaTwoCaches() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAsyncOpAwait() throws Exception { final IgniteCache cache = jcache(); diff --git a/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/jta/GridPartitionedCacheJtaLookupClassNameSelfTest.java b/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/jta/GridPartitionedCacheJtaLookupClassNameSelfTest.java index 7357f8ea9af80..cd430849392b6 100644 --- a/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/jta/GridPartitionedCacheJtaLookupClassNameSelfTest.java +++ b/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/jta/GridPartitionedCacheJtaLookupClassNameSelfTest.java @@ -27,10 +27,14 @@ import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testsuites.IgniteIgnore; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Lookup class name based JTA integration test using PARTITIONED cache. */ +@RunWith(JUnit4.class) public class GridPartitionedCacheJtaLookupClassNameSelfTest extends AbstractCacheJtaSelfTest { /** {@inheritDoc} */ @Override protected void configureJta(IgniteConfiguration cfg) { @@ -41,6 +45,7 @@ public class GridPartitionedCacheJtaLookupClassNameSelfTest extends AbstractCach * */ @IgniteIgnore(value = "https://issues.apache.org/jira/browse/IGNITE-1094", forceFailure = true) + @Test public void testIncompatibleTmLookup() { final IgniteEx ignite = grid(0); diff --git a/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/KafkaIgniteStreamerSelfTest.java b/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/KafkaIgniteStreamerSelfTest.java index 081add820d8c3..24fd8a33a5c76 100644 --- a/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/KafkaIgniteStreamerSelfTest.java +++ b/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/KafkaIgniteStreamerSelfTest.java @@ -42,12 +42,16 @@ import org.apache.kafka.clients.consumer.ConsumerConfig; import org.apache.kafka.clients.producer.ProducerRecord; import org.apache.kafka.common.serialization.StringDeserializer; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_PUT; /** * Tests {@link KafkaStreamer}. */ +@RunWith(JUnit4.class) public class KafkaIgniteStreamerSelfTest extends GridCommonAbstractTest { /** Embedded Kafka. */ private TestKafkaBroker embeddedBroker; @@ -96,6 +100,7 @@ public KafkaIgniteStreamerSelfTest() { * @throws TimeoutException If timed out. * @throws InterruptedException If interrupted. */ + @Test public void testKafkaStreamer() throws TimeoutException, InterruptedException { embeddedBroker.createTopic(TOPIC_NAME, PARTITIONS, REPLICATION_FACTOR); diff --git a/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/connect/IgniteSinkConnectorTest.java b/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/connect/IgniteSinkConnectorTest.java index 28445428436db..24a605e77b27d 100644 --- a/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/connect/IgniteSinkConnectorTest.java +++ b/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/connect/IgniteSinkConnectorTest.java @@ -51,6 +51,9 @@ import org.apache.kafka.connect.util.Callback; import org.apache.kafka.connect.util.ConnectUtils; import org.apache.kafka.connect.util.FutureCallback; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_PUT; import static org.easymock.EasyMock.mock; @@ -58,6 +61,7 @@ /** * Tests for {@link IgniteSinkConnector}. */ +@RunWith(JUnit4.class) public class IgniteSinkConnectorTest extends GridCommonAbstractTest { /** Number of input messages. */ private static final int EVENT_CNT = 10000; @@ -138,6 +142,7 @@ public class IgniteSinkConnectorTest extends GridCommonAbstractTest { /** * @throws Exception if failed. */ + @Test public void testSinkPutsWithoutTransformation() throws Exception { Map sinkProps = makeSinkProps(Utils.join(TOPICS, ",")); @@ -149,6 +154,7 @@ public void testSinkPutsWithoutTransformation() throws Exception { /** * @throws Exception if failed. */ + @Test public void testSinkPutsWithTransformation() throws Exception { testSinkPuts(makeSinkProps(Utils.join(TOPICS, ",")), true); } diff --git a/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/connect/IgniteSourceConnectorTest.java b/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/connect/IgniteSourceConnectorTest.java index 2a882f031dbb0..e98bf3e6d86f7 100644 --- a/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/connect/IgniteSourceConnectorTest.java +++ b/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/connect/IgniteSourceConnectorTest.java @@ -55,12 +55,16 @@ import org.apache.kafka.connect.util.Callback; import org.apache.kafka.connect.util.ConnectUtils; import org.apache.kafka.connect.util.FutureCallback; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_PUT; /** * Tests for {@link IgniteSourceConnector}. */ +@RunWith(JUnit4.class) public class IgniteSourceConnectorTest extends GridCommonAbstractTest { /** Number of input messages. */ private static final int EVENT_CNT = 100; @@ -135,6 +139,7 @@ public class IgniteSourceConnectorTest extends GridCommonAbstractTest { * * @throws Exception Thrown in case of the failure. */ + @Test public void testEventsInjectedIntoKafkaWithoutFilter() throws Exception { Map srcProps = makeSourceProps(Utils.join(TOPICS, ",")); @@ -148,6 +153,7 @@ public void testEventsInjectedIntoKafkaWithoutFilter() throws Exception { * * @throws Exception Thrown in case of the failure. */ + @Test public void testEventsInjectedIntoKafka() throws Exception { doTest(makeSourceProps(Utils.join(TOPICS, ",")), true); } diff --git a/modules/kubernetes/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/kubernetes/TcpDiscoveryKubernetesIpFinderSelfTest.java b/modules/kubernetes/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/kubernetes/TcpDiscoveryKubernetesIpFinderSelfTest.java index fd3e2a35e432c..c12e18ad4225b 100644 --- a/modules/kubernetes/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/kubernetes/TcpDiscoveryKubernetesIpFinderSelfTest.java +++ b/modules/kubernetes/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/kubernetes/TcpDiscoveryKubernetesIpFinderSelfTest.java @@ -19,10 +19,14 @@ import org.apache.ignite.spi.IgniteSpiException; import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinderAbstractSelfTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * TcpDiscoveryKubernetesIpFinder test. */ +@RunWith(JUnit4.class) public class TcpDiscoveryKubernetesIpFinderSelfTest extends TcpDiscoveryIpFinderAbstractSelfTest { /** @@ -45,6 +49,7 @@ public TcpDiscoveryKubernetesIpFinderSelfTest() throws Exception { } /* {@inheritDoc} */ + @Test @Override public void testIpFinder() throws Exception { TcpDiscoveryKubernetesIpFinder ipFinder = new TcpDiscoveryKubernetesIpFinder(); @@ -90,4 +95,4 @@ public TcpDiscoveryKubernetesIpFinderSelfTest() throws Exception { assertTrue(e.getMessage().startsWith("One or more configuration parameters are invalid")); } } -} \ No newline at end of file +} diff --git a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jConfigUpdateTest.java b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jConfigUpdateTest.java index debbb3789bb14..bb0f086f2a2ed 100644 --- a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jConfigUpdateTest.java +++ b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jConfigUpdateTest.java @@ -24,10 +24,14 @@ import junit.framework.TestCase; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.log4j.helpers.FileWatchdog; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Checking that Log4j configuration is updated when its source file is changed. */ +@RunWith(JUnit4.class) public class GridLog4jConfigUpdateTest extends TestCase { /** Path to log4j configuration with INFO enabled. */ private static final String LOG_CONFIG_INFO = "modules/log4j/src/test/config/log4j-info.xml"; @@ -51,6 +55,7 @@ public class GridLog4jConfigUpdateTest extends TestCase { * Check that changing log4j config file causes the logger configuration to be updated. * String-accepting constructor is used. */ + @Test public void testConfigChangeStringConstructor() throws Exception { checkConfigUpdate(new Log4JLoggerSupplier() { @Override public Log4JLogger get(File cfgFile) throws Exception { @@ -63,6 +68,7 @@ public void testConfigChangeStringConstructor() throws Exception { * Check that changing log4j config file causes the logger configuration to be updated. * String-accepting constructor is used. */ + @Test public void testConfigChangeStringConstructorDefaultDelay() throws Exception { checkConfigUpdate(new Log4JLoggerSupplier() { @Override public Log4JLogger get(File cfgFile) throws Exception { @@ -75,6 +81,7 @@ public void testConfigChangeStringConstructorDefaultDelay() throws Exception { * Check that changing log4j config file causes the logger configuration to be updated. * File-accepting constructor is used. */ + @Test public void testConfigChangeFileConstructor() throws Exception { checkConfigUpdate(new Log4JLoggerSupplier() { @Override public Log4JLogger get(File cfgFile) throws Exception { @@ -87,6 +94,7 @@ public void testConfigChangeFileConstructor() throws Exception { * Check that changing log4j config file causes the logger configuration to be updated. * File-accepting constructor is used. */ + @Test public void testConfigChangeUrlConstructor() throws Exception { checkConfigUpdate(new Log4JLoggerSupplier() { @Override public Log4JLogger get(File cfgFile) throws Exception { diff --git a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jCorrectFileNameTest.java b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jCorrectFileNameTest.java index ac5b4983af799..8b24624c7b4fb 100644 --- a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jCorrectFileNameTest.java +++ b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jCorrectFileNameTest.java @@ -32,11 +32,15 @@ import org.apache.log4j.Logger; import org.apache.log4j.PatternLayout; import org.apache.log4j.varia.LevelRangeFilter; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests that several grids log to files with correct names. */ @GridCommonTest(group = "Logger") +@RunWith(JUnit4.class) public class GridLog4jCorrectFileNameTest extends TestCase { /** Appender */ private Log4jRollingFileAppender appender; @@ -69,6 +73,7 @@ public class GridLog4jCorrectFileNameTest extends TestCase { * * @throws Exception If error occurs. */ + @Test public void testLogFilesTwoNodes() throws Exception { checkOneNode(0); checkOneNode(1); diff --git a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jInitializedTest.java b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jInitializedTest.java index 1fb9c34c0c21f..9f3c10f762324 100644 --- a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jInitializedTest.java +++ b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jInitializedTest.java @@ -21,11 +21,15 @@ import org.apache.ignite.IgniteLogger; import org.apache.ignite.testframework.junits.common.GridCommonTest; import org.apache.log4j.BasicConfigurator; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Log4j initialized test. */ @GridCommonTest(group = "Logger") +@RunWith(JUnit4.class) public class GridLog4jInitializedTest extends TestCase { /** @@ -36,6 +40,7 @@ public class GridLog4jInitializedTest extends TestCase { } /** */ + @Test public void testLogInitialize() { IgniteLogger log = new Log4JLogger(); @@ -57,4 +62,4 @@ public void testLogInitialize() { assert log.getLogger(GridLog4jInitializedTest.class.getName()) instanceof Log4JLogger; } -} \ No newline at end of file +} diff --git a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingFileTest.java b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingFileTest.java index d1b09d7542e0a..ae77bd0ca0977 100644 --- a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingFileTest.java +++ b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingFileTest.java @@ -22,11 +22,15 @@ import org.apache.ignite.IgniteLogger; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Grid Log4j SPI test. */ @GridCommonTest(group = "Logger") +@RunWith(JUnit4.class) public class GridLog4jLoggingFileTest extends TestCase { /** */ private IgniteLogger log; @@ -47,6 +51,7 @@ public class GridLog4jLoggingFileTest extends TestCase { /** * Tests log4j logging SPI. */ + @Test public void testLog() { System.out.println(log.toString()); @@ -62,4 +67,4 @@ public void testLog() { log.error("This is 'error' message."); log.error("This is 'error' message.", new Exception("It's a test error exception")); } -} \ No newline at end of file +} diff --git a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingPathTest.java b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingPathTest.java index 867efbac45c68..c4be6c81076b5 100644 --- a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingPathTest.java +++ b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingPathTest.java @@ -20,11 +20,15 @@ import junit.framework.TestCase; import org.apache.ignite.IgniteLogger; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Grid Log4j SPI test. */ @GridCommonTest(group = "Logger") +@RunWith(JUnit4.class) public class GridLog4jLoggingPathTest extends TestCase { /** */ private IgniteLogger log; @@ -40,6 +44,7 @@ public class GridLog4jLoggingPathTest extends TestCase { /** * Tests log4j logging SPI. */ + @Test public void testLog() { System.out.println(log.toString()); @@ -57,4 +62,4 @@ public void testLog() { log.error("This is 'error' message."); log.error("This is 'error' message.", new Exception("It's a test error exception")); } -} \ No newline at end of file +} diff --git a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingUrlTest.java b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingUrlTest.java index 1e2e8df82bf31..86070da8933c1 100644 --- a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingUrlTest.java +++ b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingUrlTest.java @@ -23,11 +23,15 @@ import org.apache.ignite.IgniteLogger; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Grid Log4j SPI test. */ @GridCommonTest(group = "Logger") +@RunWith(JUnit4.class) public class GridLog4jLoggingUrlTest extends TestCase { /** */ private IgniteLogger log; @@ -49,6 +53,7 @@ public class GridLog4jLoggingUrlTest extends TestCase { /** * Tests log4j logging SPI. */ + @Test public void testLog() { System.out.println(log.toString()); @@ -64,4 +69,4 @@ public void testLog() { log.error("This is 'error' message."); log.error("This is 'error' message.", new Exception("It's a test error exception")); } -} \ No newline at end of file +} diff --git a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jNotInitializedTest.java b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jNotInitializedTest.java index d32e890686420..12d6fc87bc100 100644 --- a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jNotInitializedTest.java +++ b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jNotInitializedTest.java @@ -20,13 +20,18 @@ import junit.framework.TestCase; import org.apache.ignite.IgniteLogger; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Log4j not initialized test. */ @GridCommonTest(group = "Logger") +@RunWith(JUnit4.class) public class GridLog4jNotInitializedTest extends TestCase { /** */ + @Test public void testLogInitialize() { IgniteLogger log = new Log4JLogger().getLogger(GridLog4jNotInitializedTest.class); @@ -48,4 +53,4 @@ public void testLogInitialize() { log.warning("This is 'warning' message."); log.error("This is 'error' message."); } -} \ No newline at end of file +} diff --git a/modules/log4j2/src/test/java/org/apache/ignite/logger/log4j2/Log4j2ConfigUpdateTest.java b/modules/log4j2/src/test/java/org/apache/ignite/logger/log4j2/Log4j2ConfigUpdateTest.java index ad8f7d9a0ede9..9a4380b3b4009 100644 --- a/modules/log4j2/src/test/java/org/apache/ignite/logger/log4j2/Log4j2ConfigUpdateTest.java +++ b/modules/log4j2/src/test/java/org/apache/ignite/logger/log4j2/Log4j2ConfigUpdateTest.java @@ -23,10 +23,14 @@ import java.util.Date; import junit.framework.TestCase; import org.apache.ignite.internal.util.typedef.internal.U; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Checking that Log4j2 configuration is updated when its source file is changed. */ +@RunWith(JUnit4.class) public class Log4j2ConfigUpdateTest extends TestCase { /** Path to log4j2 configuration with INFO enabled. */ private static final String LOG_CONFIG_INFO = "modules/log4j2/src/test/config/log4j2-info.xml"; @@ -56,6 +60,7 @@ public class Log4j2ConfigUpdateTest extends TestCase { * Check that changing log4j2 config file causes the logger configuration to be updated. * String-accepting constructor is used. */ + @Test public void testConfigChangeStringConstructor() throws Exception { checkConfigUpdate(new Log4J2LoggerSupplier() { @Override public Log4J2Logger get(File cfgFile) throws Exception { @@ -68,6 +73,7 @@ public void testConfigChangeStringConstructor() throws Exception { * Check that changing log4j config file causes the logger configuration to be updated. * File-accepting constructor is used. */ + @Test public void testConfigChangeFileConstructor() throws Exception { checkConfigUpdate(new Log4J2LoggerSupplier() { @Override public Log4J2Logger get(File cfgFile) throws Exception { @@ -80,6 +86,7 @@ public void testConfigChangeFileConstructor() throws Exception { * Check that changing log4j config file causes the logger configuration to be updated. * File-accepting constructor is used. */ + @Test public void testConfigChangeUrlConstructor() throws Exception { checkConfigUpdate(new Log4J2LoggerSupplier() { @Override public Log4J2Logger get(File cfgFile) throws Exception { diff --git a/modules/log4j2/src/test/java/org/apache/ignite/logger/log4j2/Log4j2LoggerMarkerTest.java b/modules/log4j2/src/test/java/org/apache/ignite/logger/log4j2/Log4j2LoggerMarkerTest.java index 672f5d960974b..f7d4d91111ace 100644 --- a/modules/log4j2/src/test/java/org/apache/ignite/logger/log4j2/Log4j2LoggerMarkerTest.java +++ b/modules/log4j2/src/test/java/org/apache/ignite/logger/log4j2/Log4j2LoggerMarkerTest.java @@ -20,10 +20,16 @@ import java.io.File; import junit.framework.TestCase; import org.apache.ignite.internal.util.typedef.internal.U; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Testing that markers are supported by log4j2 implementation. */ +@RunWith(JUnit4.class) public class Log4j2LoggerMarkerTest extends TestCase { /** Path to log4j configuration. */ private static final String LOG_CONFIG = "modules/log4j2/src/test/config/log4j2-markers.xml"; @@ -35,6 +41,7 @@ public class Log4j2LoggerMarkerTest extends TestCase { private static final String LOG_FILTERED = "work/log/filtered.log"; /** */ + @Before @Override protected void setUp() throws Exception { super.setUp(); @@ -44,6 +51,7 @@ public class Log4j2LoggerMarkerTest extends TestCase { } /** */ + @After @Override protected void tearDown() throws Exception { super.tearDown(); @@ -51,6 +59,7 @@ public class Log4j2LoggerMarkerTest extends TestCase { } /** */ + @Test public void testMarkerFiltering() throws Exception { // create log Log4J2Logger log = new Log4J2Logger(LOG_CONFIG); diff --git a/modules/log4j2/src/test/java/org/apache/ignite/logger/log4j2/Log4j2LoggerSelfTest.java b/modules/log4j2/src/test/java/org/apache/ignite/logger/log4j2/Log4j2LoggerSelfTest.java index 5f3207ec52e80..585aa66884000 100644 --- a/modules/log4j2/src/test/java/org/apache/ignite/logger/log4j2/Log4j2LoggerSelfTest.java +++ b/modules/log4j2/src/test/java/org/apache/ignite/logger/log4j2/Log4j2LoggerSelfTest.java @@ -31,10 +31,15 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Grid Log4j2 SPI test. */ +@RunWith(JUnit4.class) public class Log4j2LoggerSelfTest extends TestCase { /** */ private static final String LOG_PATH_TEST = "modules/core/src/test/config/log4j2-test.xml"; @@ -45,6 +50,7 @@ public class Log4j2LoggerSelfTest extends TestCase { /** * @throws Exception If failed. */ + @Before @Override protected void setUp() throws Exception { Log4J2Logger.cleanup(); } @@ -52,6 +58,7 @@ public class Log4j2LoggerSelfTest extends TestCase { /** * @throws Exception If failed. */ + @Test public void testFileConstructor() throws Exception { File xml = GridTestUtils.resolveIgnitePath(LOG_PATH_TEST); @@ -73,6 +80,7 @@ public void testFileConstructor() throws Exception { /** * @throws Exception If failed. */ + @Test public void testUrlConstructor() throws Exception { File xml = GridTestUtils.resolveIgnitePath(LOG_PATH_TEST); @@ -95,6 +103,7 @@ public void testUrlConstructor() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPathConstructor() throws Exception { IgniteLogger log = new Log4J2Logger(LOG_PATH_TEST).getLogger(getClass()); @@ -196,4 +205,4 @@ private static IgniteConfiguration getConfiguration(String igniteInstanceName, S .setConnectorConfiguration(null) .setDiscoverySpi(disco); } -} \ No newline at end of file +} diff --git a/modules/log4j2/src/test/java/org/apache/ignite/logger/log4j2/Log4j2LoggerVerboseModeSelfTest.java b/modules/log4j2/src/test/java/org/apache/ignite/logger/log4j2/Log4j2LoggerVerboseModeSelfTest.java index c28108ce54914..26a90bc1cf970 100644 --- a/modules/log4j2/src/test/java/org/apache/ignite/logger/log4j2/Log4j2LoggerVerboseModeSelfTest.java +++ b/modules/log4j2/src/test/java/org/apache/ignite/logger/log4j2/Log4j2LoggerVerboseModeSelfTest.java @@ -29,10 +29,15 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.logging.log4j.Level; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Grid Log4j2 SPI test. */ +@RunWith(JUnit4.class) public class Log4j2LoggerVerboseModeSelfTest extends TestCase { /** */ private static final String LOG_PATH_VERBOSE_TEST = "modules/core/src/test/config/log4j2-verbose-test.xml"; @@ -40,7 +45,8 @@ public class Log4j2LoggerVerboseModeSelfTest extends TestCase { /** * @throws Exception If failed. */ - @Override protected void setUp() throws Exception { + @Before + @Override public void setUp() throws Exception { Log4J2Logger.cleanup(); } @@ -50,6 +56,7 @@ public class Log4j2LoggerVerboseModeSelfTest extends TestCase { * * @throws Exception If failed. */ + @Test public void testVerboseMode() throws Exception { final PrintStream backupSysOut = System.out; final PrintStream backupSysErr = System.err; @@ -137,4 +144,4 @@ private static IgniteConfiguration getConfiguration(String igniteInstanceName, S .setConnectorConfiguration(null) .setDiscoverySpi(disco); } -} \ No newline at end of file +} From aabdfb9e926d46b51f50d6f12f5018e86045ad6e Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Fri, 7 Dec 2018 21:32:47 +0300 Subject: [PATCH 073/176] IGNITE-10176 migrate non-core modules tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview and rebuild --- .../dataset/impl/cache/CacheBasedDatasetBuilderTest.java | 6 ++++++ .../ml/dataset/impl/cache/CacheBasedDatasetTest.java | 6 ++++++ .../ml/dataset/impl/cache/util/ComputeUtilsTest.java | 8 ++++++++ .../builder/IgniteDistributedInfModelBuilderTest.java | 5 +++++ .../apache/ignite/ml/nn/MLPTrainerIntegrationTest.java | 5 +++++ .../ml/nn/performance/MLPTrainerMnistIntegrationTest.java | 5 +++++ .../scoring/cursor/CacheBasedLabelPairCursorTest.java | 5 +++++ .../ml/selection/scoring/evaluator/EvaluatorTest.java | 7 +++++++ .../DecisionTreeClassificationTrainerIntegrationTest.java | 5 +++++ .../DecisionTreeRegressionTrainerIntegrationTest.java | 5 +++++ .../performance/DecisionTreeMNISTIntegrationTest.java | 5 +++++ 11 files changed, 62 insertions(+) diff --git a/modules/ml/src/test/java/org/apache/ignite/ml/dataset/impl/cache/CacheBasedDatasetBuilderTest.java b/modules/ml/src/test/java/org/apache/ignite/ml/dataset/impl/cache/CacheBasedDatasetBuilderTest.java index 815bd86f8f9b2..4b1705f9ffe2f 100644 --- a/modules/ml/src/test/java/org/apache/ignite/ml/dataset/impl/cache/CacheBasedDatasetBuilderTest.java +++ b/modules/ml/src/test/java/org/apache/ignite/ml/dataset/impl/cache/CacheBasedDatasetBuilderTest.java @@ -29,10 +29,14 @@ import org.apache.ignite.ml.TestUtils; import org.apache.ignite.ml.dataset.UpstreamEntry; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for {@link CacheBasedDatasetBuilder}. */ +@RunWith(JUnit4.class) public class CacheBasedDatasetBuilderTest extends GridCommonAbstractTest { /** Number of nodes in grid. */ private static final int NODE_COUNT = 10; @@ -62,6 +66,7 @@ public class CacheBasedDatasetBuilderTest extends GridCommonAbstractTest { /** * Tests that partitions of the dataset cache are placed on the same nodes as upstream cache. */ + @Test public void testBuild() { IgniteCache upstreamCache = createTestCache(100, 10); CacheBasedDatasetBuilder builder = new CacheBasedDatasetBuilder<>(ignite, upstreamCache); @@ -91,6 +96,7 @@ public void testBuild() { /** * Tests that predicate works correctly. */ + @Test public void testBuildWithPredicate() { CacheConfiguration upstreamCacheConfiguration = new CacheConfiguration<>(); upstreamCacheConfiguration.setAffinity(new RendezvousAffinityFunction(false, 1)); diff --git a/modules/ml/src/test/java/org/apache/ignite/ml/dataset/impl/cache/CacheBasedDatasetTest.java b/modules/ml/src/test/java/org/apache/ignite/ml/dataset/impl/cache/CacheBasedDatasetTest.java index 7e31b07f6876f..7a31380848066 100644 --- a/modules/ml/src/test/java/org/apache/ignite/ml/dataset/impl/cache/CacheBasedDatasetTest.java +++ b/modules/ml/src/test/java/org/apache/ignite/ml/dataset/impl/cache/CacheBasedDatasetTest.java @@ -41,10 +41,14 @@ import org.apache.ignite.ml.TestUtils; import org.apache.ignite.ml.dataset.primitive.data.SimpleDatasetData; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for {@link CacheBasedDataset}. */ +@RunWith(JUnit4.class) public class CacheBasedDatasetTest extends GridCommonAbstractTest { /** Number of nodes in grid. */ private static final int NODE_COUNT = 4; @@ -76,6 +80,7 @@ public class CacheBasedDatasetTest extends GridCommonAbstractTest { * computations on dataset. Reservation means that partitions won't be unloaded from the node before computation is * completed. */ + @Test public void testPartitionExchangeDuringComputeCall() { int partitions = 4; @@ -132,6 +137,7 @@ public void testPartitionExchangeDuringComputeCall() { * computations on dataset. Reservation means that partitions won't be unloaded from the node before computation is * completed. */ + @Test public void testPartitionExchangeDuringComputeWithCtxCall() { int partitions = 4; diff --git a/modules/ml/src/test/java/org/apache/ignite/ml/dataset/impl/cache/util/ComputeUtilsTest.java b/modules/ml/src/test/java/org/apache/ignite/ml/dataset/impl/cache/util/ComputeUtilsTest.java index 202b6bc14f9ac..3e832aef717c8 100644 --- a/modules/ml/src/test/java/org/apache/ignite/ml/dataset/impl/cache/util/ComputeUtilsTest.java +++ b/modules/ml/src/test/java/org/apache/ignite/ml/dataset/impl/cache/util/ComputeUtilsTest.java @@ -36,10 +36,14 @@ import org.apache.ignite.ml.dataset.UpstreamEntry; import org.apache.ignite.ml.dataset.UpstreamTransformerBuilder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for {@link ComputeUtils}. */ +@RunWith(JUnit4.class) public class ComputeUtilsTest extends GridCommonAbstractTest { /** Number of nodes in grid. */ private static final int NODE_COUNT = 10; @@ -69,6 +73,7 @@ public class ComputeUtilsTest extends GridCommonAbstractTest { /** * Tests that in case two caches maintain their partitions on different nodes, affinity call won't be completed. */ + @Test public void testAffinityCallWithRetriesNegative() { ClusterNode node1 = grid(1).cluster().localNode(); ClusterNode node2 = grid(2).cluster().localNode(); @@ -110,6 +115,7 @@ public void testAffinityCallWithRetriesNegative() { /** * Test that in case two caches maintain their partitions on the same node, affinity call will be completed. */ + @Test public void testAffinityCallWithRetriesPositive() { ClusterNode node = grid(1).cluster().localNode(); @@ -149,6 +155,7 @@ public void testAffinityCallWithRetriesPositive() { /** * Tests {@code getData()} method. */ + @Test public void testGetData() { ClusterNode node = grid(1).cluster().localNode(); @@ -208,6 +215,7 @@ public void testGetData() { /** * Tests {@code initContext()} method. */ + @Test public void testInitContext() { ClusterNode node = grid(1).cluster().localNode(); diff --git a/modules/ml/src/test/java/org/apache/ignite/ml/inference/builder/IgniteDistributedInfModelBuilderTest.java b/modules/ml/src/test/java/org/apache/ignite/ml/inference/builder/IgniteDistributedInfModelBuilderTest.java index 292319e5b0bc6..75d1dbcd5994d 100644 --- a/modules/ml/src/test/java/org/apache/ignite/ml/inference/builder/IgniteDistributedInfModelBuilderTest.java +++ b/modules/ml/src/test/java/org/apache/ignite/ml/inference/builder/IgniteDistributedInfModelBuilderTest.java @@ -23,10 +23,14 @@ import org.apache.ignite.internal.util.IgniteUtils; import org.apache.ignite.ml.inference.InfModel; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for {@link IgniteDistributedInfModelBuilder} class. */ +@RunWith(JUnit4.class) public class IgniteDistributedInfModelBuilderTest extends GridCommonAbstractTest { /** Number of nodes in grid */ private static final int NODE_COUNT = 3; @@ -56,6 +60,7 @@ public class IgniteDistributedInfModelBuilderTest extends GridCommonAbstractTest } /** */ + @Test public void testBuild() throws ExecutionException, InterruptedException { AsyncInfModelBuilder mdlBuilder = new IgniteDistributedInfModelBuilder(ignite, 1, 1); diff --git a/modules/ml/src/test/java/org/apache/ignite/ml/nn/MLPTrainerIntegrationTest.java b/modules/ml/src/test/java/org/apache/ignite/ml/nn/MLPTrainerIntegrationTest.java index 3521cb6b1b444..9fa93cdb1832d 100644 --- a/modules/ml/src/test/java/org/apache/ignite/ml/nn/MLPTrainerIntegrationTest.java +++ b/modules/ml/src/test/java/org/apache/ignite/ml/nn/MLPTrainerIntegrationTest.java @@ -39,10 +39,14 @@ import org.apache.ignite.ml.optimization.updatecalculators.SimpleGDParameterUpdate; import org.apache.ignite.ml.optimization.updatecalculators.SimpleGDUpdateCalculator; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for {@link MLPTrainer} that require to start the whole Ignite infrastructure. */ +@RunWith(JUnit4.class) public class MLPTrainerIntegrationTest extends GridCommonAbstractTest { /** Number of nodes in grid */ private static final int NODE_COUNT = 3; @@ -74,6 +78,7 @@ public class MLPTrainerIntegrationTest extends GridCommonAbstractTest { /** * Test 'XOR' operation training with {@link SimpleGDUpdateCalculator}. */ + @Test public void testXORSimpleGD() { xorTest(new UpdatesStrategy<>( new SimpleGDUpdateCalculator(0.3), diff --git a/modules/ml/src/test/java/org/apache/ignite/ml/nn/performance/MLPTrainerMnistIntegrationTest.java b/modules/ml/src/test/java/org/apache/ignite/ml/nn/performance/MLPTrainerMnistIntegrationTest.java index bd31b196b120f..827cadba9b43e 100644 --- a/modules/ml/src/test/java/org/apache/ignite/ml/nn/performance/MLPTrainerMnistIntegrationTest.java +++ b/modules/ml/src/test/java/org/apache/ignite/ml/nn/performance/MLPTrainerMnistIntegrationTest.java @@ -36,10 +36,14 @@ import org.apache.ignite.ml.optimization.updatecalculators.RPropUpdateCalculator; import org.apache.ignite.ml.util.MnistUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link MLPTrainer} on the MNIST dataset that require to start the whole Ignite infrastructure. */ +@RunWith(JUnit4.class) public class MLPTrainerMnistIntegrationTest extends GridCommonAbstractTest { /** Number of nodes in grid */ private static final int NODE_COUNT = 3; @@ -69,6 +73,7 @@ public class MLPTrainerMnistIntegrationTest extends GridCommonAbstractTest { } /** Tests on the MNIST dataset. */ + @Test public void testMNIST() throws IOException { int featCnt = 28 * 28; int hiddenNeuronsCnt = 100; diff --git a/modules/ml/src/test/java/org/apache/ignite/ml/selection/scoring/cursor/CacheBasedLabelPairCursorTest.java b/modules/ml/src/test/java/org/apache/ignite/ml/selection/scoring/cursor/CacheBasedLabelPairCursorTest.java index 8d020770a70cc..33b0eed351451 100644 --- a/modules/ml/src/test/java/org/apache/ignite/ml/selection/scoring/cursor/CacheBasedLabelPairCursorTest.java +++ b/modules/ml/src/test/java/org/apache/ignite/ml/selection/scoring/cursor/CacheBasedLabelPairCursorTest.java @@ -24,10 +24,14 @@ import org.apache.ignite.ml.math.primitives.vector.VectorUtils; import org.apache.ignite.ml.selection.scoring.LabelPair; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for {@link CacheBasedLabelPairCursor}. */ +@RunWith(JUnit4.class) public class CacheBasedLabelPairCursorTest extends GridCommonAbstractTest { /** Number of nodes in grid. */ private static final int NODE_COUNT = 4; @@ -55,6 +59,7 @@ public class CacheBasedLabelPairCursorTest extends GridCommonAbstractTest { } /** */ + @Test public void testIterate() { IgniteCache data = ignite.createCache(UUID.randomUUID().toString()); diff --git a/modules/ml/src/test/java/org/apache/ignite/ml/selection/scoring/evaluator/EvaluatorTest.java b/modules/ml/src/test/java/org/apache/ignite/ml/selection/scoring/evaluator/EvaluatorTest.java index 1abf7f041a908..0c59b20f90bc6 100644 --- a/modules/ml/src/test/java/org/apache/ignite/ml/selection/scoring/evaluator/EvaluatorTest.java +++ b/modules/ml/src/test/java/org/apache/ignite/ml/selection/scoring/evaluator/EvaluatorTest.java @@ -47,6 +47,9 @@ import org.apache.ignite.ml.tree.DecisionTreeNode; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.thread.IgniteThread; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.ml.TestUtils.testEnvBuilder; import static org.junit.Assert.assertArrayEquals; @@ -55,6 +58,7 @@ * Tests for {@link Evaluator} that require to start the whole Ignite infrastructure. IMPL NOTE based on * Step_8_CV_with_Param_Grid example. */ +@RunWith(JUnit4.class) public class EvaluatorTest extends GridCommonAbstractTest { /** Number of nodes in grid */ private static final int NODE_COUNT = 3; @@ -84,6 +88,7 @@ public class EvaluatorTest extends GridCommonAbstractTest { } /** */ + @Test public void testBasic() throws InterruptedException { AtomicReference actualAccuracy = new AtomicReference<>(null); AtomicReference actualAccuracy2 = new AtomicReference<>(null); @@ -130,6 +135,7 @@ public void testBasic() throws InterruptedException { } /** */ + @Test public void testBasic2() throws InterruptedException { AtomicReference actualAccuracy = new AtomicReference<>(null); AtomicReference actualAccuracy2 = new AtomicReference<>(null); @@ -163,6 +169,7 @@ public void testBasic2() throws InterruptedException { } /** */ + @Test public void testBasic3() throws InterruptedException { AtomicReference actualAccuracy = new AtomicReference<>(null); AtomicReference actualAccuracy2 = new AtomicReference<>(null); diff --git a/modules/ml/src/test/java/org/apache/ignite/ml/tree/DecisionTreeClassificationTrainerIntegrationTest.java b/modules/ml/src/test/java/org/apache/ignite/ml/tree/DecisionTreeClassificationTrainerIntegrationTest.java index aadc8a76a0d33..53a4fb4356f3e 100644 --- a/modules/ml/src/test/java/org/apache/ignite/ml/tree/DecisionTreeClassificationTrainerIntegrationTest.java +++ b/modules/ml/src/test/java/org/apache/ignite/ml/tree/DecisionTreeClassificationTrainerIntegrationTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.internal.util.IgniteUtils; import org.apache.ignite.ml.math.primitives.vector.VectorUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for {@link DecisionTreeClassificationTrainer} that require to start the whole Ignite infrastructure. */ +@RunWith(JUnit4.class) public class DecisionTreeClassificationTrainerIntegrationTest extends GridCommonAbstractTest { /** Number of nodes in grid */ private static final int NODE_COUNT = 3; @@ -59,6 +63,7 @@ public class DecisionTreeClassificationTrainerIntegrationTest extends GridCommon } /** */ + @Test public void testFit() { int size = 100; diff --git a/modules/ml/src/test/java/org/apache/ignite/ml/tree/DecisionTreeRegressionTrainerIntegrationTest.java b/modules/ml/src/test/java/org/apache/ignite/ml/tree/DecisionTreeRegressionTrainerIntegrationTest.java index a190685a8475b..6b0f50fead77b 100644 --- a/modules/ml/src/test/java/org/apache/ignite/ml/tree/DecisionTreeRegressionTrainerIntegrationTest.java +++ b/modules/ml/src/test/java/org/apache/ignite/ml/tree/DecisionTreeRegressionTrainerIntegrationTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.internal.util.IgniteUtils; import org.apache.ignite.ml.math.primitives.vector.VectorUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for {@link DecisionTreeRegressionTrainer} that require to start the whole Ignite infrastructure. */ +@RunWith(JUnit4.class) public class DecisionTreeRegressionTrainerIntegrationTest extends GridCommonAbstractTest { /** Number of nodes in grid */ private static final int NODE_COUNT = 3; @@ -59,6 +63,7 @@ public class DecisionTreeRegressionTrainerIntegrationTest extends GridCommonAbst } /** */ + @Test public void testFit() { int size = 100; diff --git a/modules/ml/src/test/java/org/apache/ignite/ml/tree/performance/DecisionTreeMNISTIntegrationTest.java b/modules/ml/src/test/java/org/apache/ignite/ml/tree/performance/DecisionTreeMNISTIntegrationTest.java index ca513ed432adb..9ad708cb189ea 100644 --- a/modules/ml/src/test/java/org/apache/ignite/ml/tree/performance/DecisionTreeMNISTIntegrationTest.java +++ b/modules/ml/src/test/java/org/apache/ignite/ml/tree/performance/DecisionTreeMNISTIntegrationTest.java @@ -31,11 +31,15 @@ import org.apache.ignite.ml.tree.impurity.util.SimpleStepFunctionCompressor; import org.apache.ignite.ml.util.MnistUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link DecisionTreeClassificationTrainer} on the MNIST dataset that require to start the whole Ignite * infrastructure. For manual run. */ +@RunWith(JUnit4.class) public class DecisionTreeMNISTIntegrationTest extends GridCommonAbstractTest { /** Number of nodes in grid */ private static final int NODE_COUNT = 3; @@ -65,6 +69,7 @@ public class DecisionTreeMNISTIntegrationTest extends GridCommonAbstractTest { } /** Tests on the MNIST dataset. For manual run. */ + @Test public void testMNIST() throws IOException { CacheConfiguration trainingSetCacheCfg = new CacheConfiguration<>(); trainingSetCacheCfg.setAffinity(new RendezvousAffinityFunction(false, 10)); From 1a7999ef67892663db35b445ecd14a8638f7c0d2 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Fri, 7 Dec 2018 22:14:43 +0300 Subject: [PATCH 074/176] IGNITE-10176 migrate non-core modules tests from Junit 3 to 4 - wip - migrating -- verified with diffs overview and rebuild --- .../stream/mqtt/IgniteMqttStreamerTest.java | 19 ++- .../http/jetty/RestSetupSimpleTest.java | 5 + .../stream/rocketmq/RocketMQStreamerTest.java | 5 + .../schedule/GridScheduleSelfTest.java | 13 +- .../logger/slf4j/Slf4jLoggerMarkerTest.java | 5 + .../spark/JavaEmbeddedIgniteRDDSelfTest.java | 5 + .../JavaStandaloneIgniteRDDSelfTest.java | 6 + .../IgniteSpringDataCrudSelfTest.java | 10 ++ .../IgniteSpringDataQueriesSelfTest.java | 23 ++++ .../IgniteSpringDataCrudSelfTest.java | 10 ++ .../IgniteSpringDataQueriesSelfTest.java | 24 ++++ .../GridSpringCacheManagerAbstractTest.java | 19 +++ ...ridSpringCacheManagerMultiJvmSelfTest.java | 5 + ...pringCacheManagerContextInjectionTest.java | 6 + .../ignite/cache/spring/SpringCacheTest.java | 12 ++ .../CacheJdbcBlobStoreFactorySelfTest.java | 7 ++ .../CacheJdbcPojoStoreFactorySelfTest.java | 7 ++ .../SpringEncryptedCacheRestartTest.java | 9 ++ .../ignite/internal/GridFactorySelfTest.java | 25 ++++ .../GridSpringBeanSerializationSelfTest.java | 5 + .../IgniteDynamicCacheConfigTest.java | 10 ++ .../ignite/internal/IgniteSpringBeanTest.java | 6 + .../resource/GridLoggerInjectionSelfTest.java | 9 +- .../GridResourceProcessorSelfTest.java | 12 +- .../GridServiceInjectionSelfTest.java | 16 ++- .../GridSpringResourceInjectionSelfTest.java | 18 +++ .../GridTransformSpringInjectionSelfTest.java | 5 + .../p2p/GridP2PUserVersionChangeSelfTest.java | 11 +- .../IgniteExcludeInConfigurationTest.java | 8 +- ...gniteStartFromStreamConfigurationTest.java | 7 +- ...ridServiceInjectionSpringResourceTest.java | 5 + ...SpringBeanSpringResourceInjectionTest.java | 6 + ...dSpringTransactionManagerAbstractTest.java | 9 ++ ...ransactionManagerContextInjectionTest.java | 8 +- .../IgniteNodeStartUtilsSelfTest.java | 7 +- ...iteProjectionStartStopRestartSelfTest.java | 22 +++- .../storm/StormIgniteStreamerSelfTest.java | 5 + .../twitter/IgniteTwitterStreamerTest.java | 7 +- ...GridTaskUriDeploymentDeadlockSelfTest.java | 7 +- .../ignite/p2p/GridP2PDisabledSelfTest.java | 8 ++ ...ymentClassLoaderMultiThreadedSelfTest.java | 7 +- .../GridUriDeploymentClassLoaderSelfTest.java | 8 +- ...DeploymentClassloaderRegisterSelfTest.java | 8 +- .../uri/GridUriDeploymentConfigSelfTest.java | 7 +- ...ridUriDeploymentFileProcessorSelfTest.java | 8 ++ .../GridUriDeploymentMd5CheckSelfTest.java | 6 + ...ymentMultiScannersErrorThrottlingTest.java | 5 + ...ridUriDeploymentMultiScannersSelfTest.java | 7 +- .../uri/GridUriDeploymentSimpleSelfTest.java | 12 +- .../file/GridFileDeploymentSelfTest.java | 11 ++ .../GridFileDeploymentUndeploySelfTest.java | 7 +- .../http/GridHttpDeploymentSelfTest.java | 6 + .../ignite/tools/GridToolsSelfTest.java | 13 +- .../websession/WebSessionSelfTest.java | 12 ++ .../yarn/IgniteApplicationMasterSelfTest.java | 15 ++- .../zeromq/IgniteZeroMqStreamerTest.java | 8 ++ .../ipfinder/zk/ZookeeperIpFinderTest.java | 12 ++ ...cheEntryListenerWithZkDiscoAtomicTest.java | 5 + ...okeeperDiscoverySuitePreprocessorTest.java | 5 + .../zk/internal/ZookeeperClientTest.java | 22 ++++ ...okeeperDiscoverySpiSaslFailedAuthTest.java | 5 + ...perDiscoverySpiSaslSuccessfulAuthTest.java | 6 + .../internal/ZookeeperDiscoverySpiTest.java | 112 ++++++++++++++++++ 63 files changed, 689 insertions(+), 24 deletions(-) diff --git a/modules/mqtt/src/test/java/org/apache/ignite/stream/mqtt/IgniteMqttStreamerTest.java b/modules/mqtt/src/test/java/org/apache/ignite/stream/mqtt/IgniteMqttStreamerTest.java index d8c15eae0256f..2c858aeaf6766 100644 --- a/modules/mqtt/src/test/java/org/apache/ignite/stream/mqtt/IgniteMqttStreamerTest.java +++ b/modules/mqtt/src/test/java/org/apache/ignite/stream/mqtt/IgniteMqttStreamerTest.java @@ -55,12 +55,16 @@ import org.eclipse.paho.client.mqttv3.persist.MemoryPersistence; import org.junit.After; import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_PUT; /** * Test for {@link MqttStreamer}. */ +@RunWith(JUnit4.class) public class IgniteMqttStreamerTest extends GridCommonAbstractTest { /** The test data. */ private static final Map TEST_DATA = new HashMap<>(); @@ -107,7 +111,7 @@ public IgniteMqttStreamerTest() { */ @Before @SuppressWarnings("unchecked") - public void beforeTest() throws Exception { + @Override public void beforeTest() throws Exception { grid().getOrCreateCache(defaultCacheConfiguration()); // find an available local port @@ -154,7 +158,7 @@ public void beforeTest() throws Exception { * @throws Exception If failed. */ @After - public void afterTest() throws Exception { + @Override public void afterTest() throws Exception { try { streamer.stop(); } @@ -173,6 +177,7 @@ public void afterTest() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConnectDisconnect() throws Exception { // configure streamer streamer.setSingleTupleExtractor(singleTupleExtractor()); @@ -194,6 +199,7 @@ public void testConnectDisconnect() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConnectionStatusWithBrokerDisconnection() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-2255"); @@ -225,6 +231,7 @@ public void testConnectionStatusWithBrokerDisconnection() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSingleTopic_NoQoS_OneEntryPerMessage() throws Exception { // configure streamer streamer.setSingleTupleExtractor(singleTupleExtractor()); @@ -247,6 +254,7 @@ public void testSingleTopic_NoQoS_OneEntryPerMessage() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultipleTopics_NoQoS_OneEntryPerMessage() throws Exception { // configure streamer streamer.setSingleTupleExtractor(singleTupleExtractor()); @@ -273,6 +281,7 @@ public void testMultipleTopics_NoQoS_OneEntryPerMessage() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSingleTopic_NoQoS_MultipleEntriesOneMessage() throws Exception { // configure streamer streamer.setMultipleTupleExtractor(multipleTupleExtractor()); @@ -295,6 +304,7 @@ public void testSingleTopic_NoQoS_MultipleEntriesOneMessage() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultipleTopics_NoQoS_MultipleEntriesOneMessage() throws Exception { // configure streamer streamer.setMultipleTupleExtractor(multipleTupleExtractor()); @@ -321,6 +331,7 @@ public void testMultipleTopics_NoQoS_MultipleEntriesOneMessage() throws Exceptio /** * @throws Exception If failed. */ + @Test public void testSingleTopic_NoQoS_ConnectOptions_Durable() throws Exception { // configure streamer streamer.setSingleTupleExtractor(singleTupleExtractor()); @@ -362,6 +373,7 @@ public void testSingleTopic_NoQoS_ConnectOptions_Durable() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSingleTopic_NoQoS_Reconnect() throws Exception { // configure streamer streamer.setSingleTupleExtractor(singleTupleExtractor()); @@ -408,6 +420,7 @@ public void testSingleTopic_NoQoS_Reconnect() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSingleTopic_NoQoS_RetryOnce() throws Exception { // configure streamer streamer.setSingleTupleExtractor(singleTupleExtractor()); @@ -447,6 +460,7 @@ public void testSingleTopic_NoQoS_RetryOnce() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultipleTopics_MultipleQoS_OneEntryPerMessage() throws Exception { // configure streamer streamer.setSingleTupleExtractor(singleTupleExtractor()); @@ -474,6 +488,7 @@ public void testMultipleTopics_MultipleQoS_OneEntryPerMessage() throws Exception /** * @throws Exception If failed. */ + @Test public void testMultipleTopics_MultipleQoS_Mismatch() throws Exception { // configure streamer streamer.setSingleTupleExtractor(singleTupleExtractor()); diff --git a/modules/rest-http/src/test/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/RestSetupSimpleTest.java b/modules/rest-http/src/test/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/RestSetupSimpleTest.java index 7c076f7759a0b..93fdbcfe1313f 100644 --- a/modules/rest-http/src/test/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/RestSetupSimpleTest.java +++ b/modules/rest-http/src/test/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/RestSetupSimpleTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.configuration.ConnectorConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Integration test for Grid REST functionality; Jetty is under the hood. */ +@RunWith(JUnit4.class) public class RestSetupSimpleTest extends GridCommonAbstractTest { /** Jetty port. */ private static final int JETTY_PORT = 8080; @@ -56,6 +60,7 @@ public class RestSetupSimpleTest extends GridCommonAbstractTest { /** * Runs version command using GridJettyRestProtocol. */ + @Test public void testVersionCommand() throws Exception { URLConnection conn = new URL("http://localhost:" + JETTY_PORT + "/ignite?cmd=version").openConnection(); diff --git a/modules/rocketmq/src/test/java/org/apache/ignite/stream/rocketmq/RocketMQStreamerTest.java b/modules/rocketmq/src/test/java/org/apache/ignite/stream/rocketmq/RocketMQStreamerTest.java index 606a6d1f63de9..cbc710ab466dc 100644 --- a/modules/rocketmq/src/test/java/org/apache/ignite/stream/rocketmq/RocketMQStreamerTest.java +++ b/modules/rocketmq/src/test/java/org/apache/ignite/stream/rocketmq/RocketMQStreamerTest.java @@ -38,6 +38,9 @@ import org.apache.rocketmq.common.message.Message; import org.apache.rocketmq.common.message.MessageExt; import org.apache.rocketmq.tools.admin.DefaultMQAdminExt; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_PUT; import static org.apache.ignite.stream.rocketmq.TestRocketMQServer.NAME_SERVER_PORT; @@ -46,6 +49,7 @@ /** * Test for {@link RocketMQStreamer}. */ +@RunWith(JUnit4.class) public class RocketMQStreamerTest extends GridCommonAbstractTest { /** Test topic. */ private static final String TOPIC_NAME = "testTopic"; @@ -91,6 +95,7 @@ public RocketMQStreamerTest() { * * @throws Exception If fails. */ + @Test public void testStreamer() throws Exception { RocketMQStreamer streamer = null; diff --git a/modules/schedule/src/test/java/org/apache/ignite/internal/processors/schedule/GridScheduleSelfTest.java b/modules/schedule/src/test/java/org/apache/ignite/internal/processors/schedule/GridScheduleSelfTest.java index 992deb5179ad0..bb4e9fc79d7ca 100644 --- a/modules/schedule/src/test/java/org/apache/ignite/internal/processors/schedule/GridScheduleSelfTest.java +++ b/modules/schedule/src/test/java/org/apache/ignite/internal/processors/schedule/GridScheduleSelfTest.java @@ -39,6 +39,9 @@ import org.apache.ignite.scheduler.SchedulerFuture; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.SECONDS; import static org.apache.ignite.testframework.GridTestUtils.assertThrows; @@ -47,6 +50,7 @@ * Test for task scheduler. */ @SuppressWarnings({"ProhibitedExceptionDeclared", "TooBroadScope"}) +@RunWith(JUnit4.class) public class GridScheduleSelfTest extends GridCommonAbstractTest { /** */ private static final int NODES_CNT = 2; @@ -89,6 +93,7 @@ public class GridScheduleSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRunLocal() throws Exception { for (int i = 0; i < NODES_CNT; i++) { IgniteFuture fut = grid(i).scheduler().runLocal(new TestRunnable()); @@ -102,6 +107,7 @@ public void testRunLocal() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCallLocal() throws Exception { for (int i = 0; i < NODES_CNT; i++) { IgniteFuture fut = grid(i).scheduler().callLocal(new TestCallable()); @@ -115,6 +121,7 @@ public void testCallLocal() throws Exception { /** * @throws Exception If failed. */ + @Test public void testScheduleRunnable() throws Exception { final CountDownLatch latch = new CountDownLatch(1); @@ -232,6 +239,7 @@ public void testScheduleRunnable() throws Exception { /** * @throws Exception If failed. */ + @Test public void testScheduleCallable() throws Exception { SchedulerFuture fut = null; @@ -289,6 +297,7 @@ public void testScheduleCallable() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRunnableCancel() throws Exception { SchedulerFuture fut = null; @@ -339,6 +348,7 @@ public void testRunnableCancel() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInvalidPatterns() throws Exception { Runnable run = new Runnable() { @Override public void run() { @@ -410,6 +420,7 @@ public void testInvalidPatterns() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNoNextExecutionTime() throws Exception { Callable run = new Callable() { @Override public Integer call() { @@ -508,4 +519,4 @@ private static class TestCallable implements IgniteCallable { return execCntr.incrementAndGet(); } } -} \ No newline at end of file +} diff --git a/modules/slf4j/src/test/java/org/apache/ignite/logger/slf4j/Slf4jLoggerMarkerTest.java b/modules/slf4j/src/test/java/org/apache/ignite/logger/slf4j/Slf4jLoggerMarkerTest.java index 578e6ba3def3d..03fb6c5140ee6 100644 --- a/modules/slf4j/src/test/java/org/apache/ignite/logger/slf4j/Slf4jLoggerMarkerTest.java +++ b/modules/slf4j/src/test/java/org/apache/ignite/logger/slf4j/Slf4jLoggerMarkerTest.java @@ -20,11 +20,15 @@ import java.io.File; import junit.framework.TestCase; import org.apache.ignite.internal.util.typedef.internal.U; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.slf4j.LoggerFactory; /** * Testing that markers are supported by log4j2 implementation. */ +@RunWith(JUnit4.class) public class Slf4jLoggerMarkerTest extends TestCase { /** Path to full log. */ private static final String LOG_ALL = "work/log/all.log"; @@ -47,6 +51,7 @@ public class Slf4jLoggerMarkerTest extends TestCase { } /** */ + @Test public void testMarkerFiltering() throws Exception { // create log Slf4jLogger log = new Slf4jLogger(LoggerFactory.getLogger(Slf4jLoggerMarkerTest.class)); diff --git a/modules/spark/src/test/java/org/apache/ignite/spark/JavaEmbeddedIgniteRDDSelfTest.java b/modules/spark/src/test/java/org/apache/ignite/spark/JavaEmbeddedIgniteRDDSelfTest.java index 49bb1ac63ed61..9b7a31f178613 100644 --- a/modules/spark/src/test/java/org/apache/ignite/spark/JavaEmbeddedIgniteRDDSelfTest.java +++ b/modules/spark/src/test/java/org/apache/ignite/spark/JavaEmbeddedIgniteRDDSelfTest.java @@ -42,6 +42,7 @@ /** * Tests for {@link JavaIgniteRDD} (embedded mode). */ +@RunWith(JUnit4.class) public class JavaEmbeddedIgniteRDDSelfTest extends GridCommonAbstractTest { /** For Ignite instance names generation */ private static AtomicInteger cntr = new AtomicInteger(1); @@ -120,6 +121,7 @@ private JavaSparkContext createContext() { /** * @throws Exception If failed. */ + @Test public void testStoreDataToIgnite() throws Exception { JavaSparkContext sc = createContext(); @@ -153,6 +155,7 @@ public void testStoreDataToIgnite() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReadDataFromIgnite() throws Exception { JavaSparkContext sc = createContext(); @@ -187,6 +190,7 @@ public void testReadDataFromIgnite() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryObjectsFromIgnite() throws Exception { JavaSparkContext sc = createContext(); @@ -225,6 +229,7 @@ public void testQueryObjectsFromIgnite() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryFieldsFromIgnite() throws Exception { JavaSparkContext sc = createContext(); diff --git a/modules/spark/src/test/java/org/apache/ignite/spark/JavaStandaloneIgniteRDDSelfTest.java b/modules/spark/src/test/java/org/apache/ignite/spark/JavaStandaloneIgniteRDDSelfTest.java index 29ada3f459d7d..f7ba5f0793566 100644 --- a/modules/spark/src/test/java/org/apache/ignite/spark/JavaStandaloneIgniteRDDSelfTest.java +++ b/modules/spark/src/test/java/org/apache/ignite/spark/JavaStandaloneIgniteRDDSelfTest.java @@ -46,6 +46,7 @@ /** * Tests for {@link JavaIgniteRDD} (standalone mode). */ +@RunWith(JUnit4.class) public class JavaStandaloneIgniteRDDSelfTest extends GridCommonAbstractTest { /** Grid count. */ private static final int GRID_CNT = 3; @@ -120,6 +121,7 @@ public Integer call(Integer x, Integer y) { /** * @throws Exception If failed. */ + @Test public void testStoreDataToIgnite() throws Exception { JavaSparkContext sc = new JavaSparkContext("local[*]", "test"); @@ -148,6 +150,7 @@ public void testStoreDataToIgnite() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReadDataFromIgnite() throws Exception { JavaSparkContext sc = new JavaSparkContext("local[*]", "test"); @@ -177,6 +180,7 @@ public void testReadDataFromIgnite() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryObjectsFromIgnite() throws Exception { JavaSparkContext sc = new JavaSparkContext("local[*]", "test"); @@ -204,6 +208,7 @@ public void testQueryObjectsFromIgnite() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQueryFieldsFromIgnite() throws Exception { JavaSparkContext sc = new JavaSparkContext("local[*]", "test"); @@ -249,6 +254,7 @@ public void testQueryFieldsFromIgnite() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAllFieldsTypes() throws Exception { JavaSparkContext sc = new JavaSparkContext("local[*]", "test"); diff --git a/modules/spring-data-2.0/src/test/java/org/apache/ignite/springdata/IgniteSpringDataCrudSelfTest.java b/modules/spring-data-2.0/src/test/java/org/apache/ignite/springdata/IgniteSpringDataCrudSelfTest.java index 766b2a8e60d40..5e717bf9dbaa1 100644 --- a/modules/spring-data-2.0/src/test/java/org/apache/ignite/springdata/IgniteSpringDataCrudSelfTest.java +++ b/modules/spring-data-2.0/src/test/java/org/apache/ignite/springdata/IgniteSpringDataCrudSelfTest.java @@ -26,11 +26,15 @@ import org.apache.ignite.springdata.misc.Person; import org.apache.ignite.springdata.misc.PersonRepository; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.springframework.context.annotation.AnnotationConfigApplicationContext; /** * */ +@RunWith(JUnit4.class) public class IgniteSpringDataCrudSelfTest extends GridCommonAbstractTest { /** Repository. */ private static PersonRepository repo; @@ -80,6 +84,7 @@ public class IgniteSpringDataCrudSelfTest extends GridCommonAbstractTest { /** * */ + @Test public void testPutGet() { Person person = new Person("some_name", "some_surname"); @@ -104,6 +109,7 @@ public void testPutGet() { /** * */ + @Test public void testPutAllGetAll() { LinkedHashMap map = new LinkedHashMap<>(); @@ -143,6 +149,7 @@ public void testPutAllGetAll() { /** * */ + @Test public void testGetAll() { assertEquals(CACHE_SIZE, repo.count()); @@ -161,6 +168,7 @@ public void testGetAll() { /** * */ + @Test public void testDelete() { assertEquals(CACHE_SIZE, repo.count()); @@ -182,6 +190,7 @@ public void testDelete() { /** * */ + @Test public void testDeleteSet() { assertEquals(CACHE_SIZE, repo.count()); @@ -212,6 +221,7 @@ public void testDeleteSet() { /** * */ + @Test public void testDeleteAll() { assertEquals(CACHE_SIZE, repo.count()); diff --git a/modules/spring-data-2.0/src/test/java/org/apache/ignite/springdata/IgniteSpringDataQueriesSelfTest.java b/modules/spring-data-2.0/src/test/java/org/apache/ignite/springdata/IgniteSpringDataQueriesSelfTest.java index c03c9c8fadcbc..68ff6e747bb16 100644 --- a/modules/spring-data-2.0/src/test/java/org/apache/ignite/springdata/IgniteSpringDataQueriesSelfTest.java +++ b/modules/spring-data-2.0/src/test/java/org/apache/ignite/springdata/IgniteSpringDataQueriesSelfTest.java @@ -26,6 +26,9 @@ import org.apache.ignite.springdata.misc.Person; import org.apache.ignite.springdata.misc.PersonSecondRepository; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.Slice; @@ -34,6 +37,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteSpringDataQueriesSelfTest extends GridCommonAbstractTest { /** Repository. */ private static PersonRepository repo; @@ -76,6 +80,7 @@ public class IgniteSpringDataQueriesSelfTest extends GridCommonAbstractTest { } /** */ + @Test public void testExplicitQuery() { List persons = repo.simpleQuery("person4a"); @@ -86,6 +91,7 @@ public void testExplicitQuery() { } /** */ + @Test public void testEqualsPart() { List persons = repo.findByFirstName("person4e"); @@ -96,6 +102,7 @@ public void testEqualsPart() { } /** */ + @Test public void testContainingPart() { List persons = repo.findByFirstNameContaining("person4"); @@ -106,6 +113,7 @@ public void testContainingPart() { } /** */ + @Test public void testTopPart() { Iterable top = repo.findTopByFirstNameContaining("person4"); @@ -119,6 +127,7 @@ public void testTopPart() { } /** */ + @Test public void testLikeAndLimit() { Iterable like = repo.findFirst10ByFirstNameLike("person"); @@ -134,6 +143,7 @@ public void testLikeAndLimit() { } /** */ + @Test public void testCount() { int cnt = repo.countByFirstNameLike("person"); @@ -141,6 +151,7 @@ public void testCount() { } /** */ + @Test public void testCount2() { int cnt = repo.countByFirstNameLike("person4"); @@ -148,6 +159,7 @@ public void testCount2() { } /** */ + @Test public void testPageable() { PageRequest pageable = new PageRequest(1, 5, Sort.Direction.DESC, "firstName"); @@ -177,6 +189,7 @@ public void testPageable() { } /** */ + @Test public void testAndAndOr() { int cntAnd = repo.countByFirstNameLikeAndSecondNameLike("person1", "lastName1"); @@ -186,6 +199,7 @@ public void testAndAndOr() { } /** */ + @Test public void testQueryWithSort() { List persons = repo.queryWithSort("^[a-z]+$", new Sort(Sort.Direction.DESC, "secondName")); @@ -201,6 +215,7 @@ public void testQueryWithSort() { } /** */ + @Test public void testQueryWithPaging() { List persons = repo.queryWithPageable("^[a-z]+$", new PageRequest(1, 7, Sort.Direction.DESC, "secondName")); @@ -218,6 +233,7 @@ public void testQueryWithPaging() { } /** */ + @Test public void testQueryFields() { List persons = repo.selectField("^[a-z]+$", new PageRequest(1, 7, Sort.Direction.DESC, "secondName")); @@ -225,6 +241,7 @@ public void testQueryFields() { } /** */ + @Test public void testFindCacheEntries() { List> cacheEntries = repo.findBySecondNameLike("stName1"); @@ -235,6 +252,7 @@ public void testFindCacheEntries() { } /** */ + @Test public void testFindOneCacheEntry() { Cache.Entry cacheEntry = repo.findTopBySecondNameLike("tName18"); @@ -244,6 +262,7 @@ public void testFindOneCacheEntry() { } /** */ + @Test public void testFindOneValue() { Person person = repo.findTopBySecondNameStartingWith("lastName18"); @@ -253,6 +272,7 @@ public void testFindOneValue() { } /** */ + @Test public void testSelectSeveralFields() { List lists = repo.selectSeveralField("^[a-z]+$", new PageRequest(2, 6)); @@ -266,6 +286,7 @@ public void testSelectSeveralFields() { } /** */ + @Test public void testCountQuery() { int cnt = repo.countQuery(".*"); @@ -273,6 +294,7 @@ public void testCountQuery() { } /** */ + @Test public void testSliceOfCacheEntries() { Slice> slice = repo2.findBySecondNameIsNot("lastName18", new PageRequest(3, 4)); @@ -283,6 +305,7 @@ public void testSliceOfCacheEntries() { } /** */ + @Test public void testSliceOfLists() { Slice lists = repo2.querySliceOfList("^[a-z]+$", new PageRequest(0, 3)); diff --git a/modules/spring-data/src/test/java/org/apache/ignite/springdata/IgniteSpringDataCrudSelfTest.java b/modules/spring-data/src/test/java/org/apache/ignite/springdata/IgniteSpringDataCrudSelfTest.java index f9011fad753dc..155e784069c04 100644 --- a/modules/spring-data/src/test/java/org/apache/ignite/springdata/IgniteSpringDataCrudSelfTest.java +++ b/modules/spring-data/src/test/java/org/apache/ignite/springdata/IgniteSpringDataCrudSelfTest.java @@ -25,11 +25,15 @@ import org.apache.ignite.springdata.misc.Person; import org.apache.ignite.springdata.misc.PersonRepository; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.springframework.context.annotation.AnnotationConfigApplicationContext; /** * */ +@RunWith(JUnit4.class) public class IgniteSpringDataCrudSelfTest extends GridCommonAbstractTest { /** Repository. */ private static PersonRepository repo; @@ -79,6 +83,7 @@ public class IgniteSpringDataCrudSelfTest extends GridCommonAbstractTest { /** * */ + @Test public void testPutGet() { Person person = new Person("some_name", "some_surname"); @@ -103,6 +108,7 @@ public void testPutGet() { /** * */ + @Test public void testPutAllGetAll() { LinkedHashMap map = new LinkedHashMap<>(); @@ -142,6 +148,7 @@ public void testPutAllGetAll() { /** * */ + @Test public void testGetAll() { assertEquals(CACHE_SIZE, repo.count()); @@ -160,6 +167,7 @@ public void testGetAll() { /** * */ + @Test public void testDelete() { assertEquals(CACHE_SIZE, repo.count()); @@ -181,6 +189,7 @@ public void testDelete() { /** * */ + @Test public void testDeleteSet() { assertEquals(CACHE_SIZE, repo.count()); @@ -211,6 +220,7 @@ public void testDeleteSet() { /** * */ + @Test public void testDeleteAll() { assertEquals(CACHE_SIZE, repo.count()); diff --git a/modules/spring-data/src/test/java/org/apache/ignite/springdata/IgniteSpringDataQueriesSelfTest.java b/modules/spring-data/src/test/java/org/apache/ignite/springdata/IgniteSpringDataQueriesSelfTest.java index 2d7dcc0d8eb3e..d7678c64a1418 100644 --- a/modules/spring-data/src/test/java/org/apache/ignite/springdata/IgniteSpringDataQueriesSelfTest.java +++ b/modules/spring-data/src/test/java/org/apache/ignite/springdata/IgniteSpringDataQueriesSelfTest.java @@ -26,6 +26,9 @@ import org.apache.ignite.springdata.misc.Person; import org.apache.ignite.springdata.misc.PersonSecondRepository; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.Slice; @@ -34,6 +37,7 @@ /** * */ +@RunWith(JUnit4.class) public class IgniteSpringDataQueriesSelfTest extends GridCommonAbstractTest { /** Repository. */ private static PersonRepository repo; @@ -70,6 +74,7 @@ public class IgniteSpringDataQueriesSelfTest extends GridCommonAbstractTest { } /** */ + @Test public void testExplicitQuery() { List persons = repo.simpleQuery("person4a"); @@ -80,6 +85,7 @@ public void testExplicitQuery() { } /** */ + @Test public void testEqualsPart() { List persons = repo.findByFirstName("person4e"); @@ -90,6 +96,7 @@ public void testEqualsPart() { } /** */ + @Test public void testContainingPart() { List persons = repo.findByFirstNameContaining("person4"); @@ -100,6 +107,7 @@ public void testContainingPart() { } /** */ + @Test public void testTopPart() { Iterable top = repo.findTopByFirstNameContaining("person4"); @@ -113,6 +121,7 @@ public void testTopPart() { } /** */ + @Test public void testLikeAndLimit() { Iterable like = repo.findFirst10ByFirstNameLike("person"); @@ -128,6 +137,7 @@ public void testLikeAndLimit() { } /** */ + @Test public void testCount() { int cnt = repo.countByFirstNameLike("person"); @@ -135,6 +145,7 @@ public void testCount() { } /** */ + @Test public void testCount2() { int cnt = repo.countByFirstNameLike("person4"); @@ -142,6 +153,7 @@ public void testCount2() { } /** */ + @Test public void testPageable() { PageRequest pageable = new PageRequest(1, 5, Sort.Direction.DESC, "firstName"); @@ -169,6 +181,7 @@ public void testPageable() { } /** */ + @Test public void testAndAndOr() { int cntAnd = repo.countByFirstNameLikeAndSecondNameLike("person1", "lastName1"); @@ -178,6 +191,7 @@ public void testAndAndOr() { } /** */ + @Test public void testQueryWithSort() { List persons = repo.queryWithSort("^[a-z]+$", new Sort(Sort.Direction.DESC, "secondName")); @@ -193,6 +207,7 @@ public void testQueryWithSort() { } /** */ + @Test public void testQueryWithPaging() { List persons = repo.queryWithPageable("^[a-z]+$", new PageRequest(1, 7, Sort.Direction.DESC, "secondName")); @@ -210,6 +225,7 @@ public void testQueryWithPaging() { } /** */ + @Test public void testQueryFields() { List persons = repo.selectField("^[a-z]+$", new PageRequest(1, 7, Sort.Direction.DESC, "secondName")); @@ -217,6 +233,7 @@ public void testQueryFields() { } /** */ + @Test public void testFindCacheEntries() { List> cacheEntries = repo.findBySecondNameLike("stName1"); @@ -227,6 +244,7 @@ public void testFindCacheEntries() { } /** */ + @Test public void testFindOneCacheEntry() { Cache.Entry cacheEntry = repo.findTopBySecondNameLike("tName18"); @@ -236,6 +254,7 @@ public void testFindOneCacheEntry() { } /** */ + @Test public void testFindOneValue() { Person person = repo.findTopBySecondNameStartingWith("lastName18"); @@ -245,6 +264,7 @@ public void testFindOneValue() { } /** */ + @Test public void testSelectSeveralFields() { List lists = repo.selectSeveralField("^[a-z]+$", new PageRequest(2, 6)); @@ -258,6 +278,7 @@ public void testSelectSeveralFields() { } /** */ + @Test public void testCountQuery() { int cnt = repo.countQuery(".*"); @@ -265,6 +286,7 @@ public void testCountQuery() { } /** */ + @Test public void testSliceOfCacheEntries() { Slice> slice = repo2.findBySecondNameIsNot("lastName18", new PageRequest(3, 4)); @@ -275,6 +297,7 @@ public void testSliceOfCacheEntries() { } /** */ + @Test public void testSliceOfLists() { Slice lists = repo2.querySliceOfList("^[a-z]+$", new PageRequest(0, 3)); @@ -290,6 +313,7 @@ public void testSliceOfLists() { /** * Tests the repository method with a custom query which takes no parameters. */ + @Test public void testCountAllPersons() { int cnt = repo.countAllPersons(); diff --git a/modules/spring/src/test/java/org/apache/ignite/cache/spring/GridSpringCacheManagerAbstractTest.java b/modules/spring/src/test/java/org/apache/ignite/cache/spring/GridSpringCacheManagerAbstractTest.java index 370c6346ad07e..bed8574541b80 100644 --- a/modules/spring/src/test/java/org/apache/ignite/cache/spring/GridSpringCacheManagerAbstractTest.java +++ b/modules/spring/src/test/java/org/apache/ignite/cache/spring/GridSpringCacheManagerAbstractTest.java @@ -22,10 +22,14 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Spring cache test. */ +@RunWith(JUnit4.class) public abstract class GridSpringCacheManagerAbstractTest extends GridCommonAbstractTest { /** */ protected static final String CACHE_NAME = "testCache"; @@ -61,6 +65,7 @@ public abstract class GridSpringCacheManagerAbstractTest extends GridCommonAbstr /** * @throws Exception If failed. */ + @Test public void testSimpleKey() throws Exception { for (int i = 0; i < 3; i++) { assertEquals("value" + i, svc.simpleKey(i)); @@ -80,6 +85,7 @@ public void testSimpleKey() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSimpleKeyNullValue() throws Exception { for (int i = 0; i < 3; i++) { assertNull(svc.simpleKeyNullValue(i)); @@ -99,6 +105,7 @@ public void testSimpleKeyNullValue() throws Exception { /** * @throws Exception If failed. */ + @Test public void testComplexKey() throws Exception { for (int i = 0; i < 3; i++) { assertEquals("value" + i + "suffix" + i, svc.complexKey(i, "suffix" + i)); @@ -118,6 +125,7 @@ public void testComplexKey() throws Exception { /** * @throws Exception If failed. */ + @Test public void testComplexKeyNullValue() throws Exception { for (int i = 0; i < 3; i++) { assertNull(svc.complexKeyNullValue(i, "suffix" + i)); @@ -137,6 +145,7 @@ public void testComplexKeyNullValue() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSimpleKeyPut() throws Exception { IgniteCache c = grid().cache(CACHE_NAME); @@ -158,6 +167,7 @@ public void testSimpleKeyPut() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSimpleKeyPutNullValue() throws Exception { IgniteCache c = grid().cache(CACHE_NAME); @@ -179,6 +189,7 @@ public void testSimpleKeyPutNullValue() throws Exception { /** * @throws Exception If failed. */ + @Test public void testComplexKeyPut() throws Exception { IgniteCache c = grid().cache(CACHE_NAME); @@ -200,6 +211,7 @@ public void testComplexKeyPut() throws Exception { /** * @throws Exception If failed. */ + @Test public void testComplexKeyPutNullValue() throws Exception { IgniteCache c = grid().cache(CACHE_NAME); @@ -221,6 +233,7 @@ public void testComplexKeyPutNullValue() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSimpleKeyEvict() throws Exception { IgniteCache c = grid().cache(CACHE_NAME); @@ -245,6 +258,7 @@ public void testSimpleKeyEvict() throws Exception { /** * @throws Exception If failed. */ + @Test public void testComplexKeyEvict() throws Exception { IgniteCache c = grid().cache(CACHE_NAME); @@ -269,6 +283,7 @@ public void testComplexKeyEvict() throws Exception { /** * @throws Exception If failed. */ + @Test public void testEvictAll() throws Exception { IgniteCache c = grid().cache(CACHE_NAME); @@ -289,6 +304,7 @@ public void testEvictAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDynamicCache() throws Exception { for (int i = 0; i < 3; i++) { assertEquals("value" + i, dynamicSvc.cacheable(i)); @@ -311,6 +327,7 @@ public void testDynamicCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDynamicCachePut() throws Exception { for (int i = 0; i < 3; i++) { assertEquals("value" + i, dynamicSvc.cachePut(i)); @@ -333,6 +350,7 @@ public void testDynamicCachePut() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDynamicCacheEvict() throws Exception { CacheConfiguration cacheCfg = new CacheConfiguration<>(DEFAULT_CACHE_NAME); @@ -360,6 +378,7 @@ public void testDynamicCacheEvict() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDynamicCacheEvictAll() throws Exception { CacheConfiguration cacheCfg = new CacheConfiguration<>(DEFAULT_CACHE_NAME); diff --git a/modules/spring/src/test/java/org/apache/ignite/cache/spring/GridSpringCacheManagerMultiJvmSelfTest.java b/modules/spring/src/test/java/org/apache/ignite/cache/spring/GridSpringCacheManagerMultiJvmSelfTest.java index acf09a77628c3..0b3f7073ba6e2 100644 --- a/modules/spring/src/test/java/org/apache/ignite/cache/spring/GridSpringCacheManagerMultiJvmSelfTest.java +++ b/modules/spring/src/test/java/org/apache/ignite/cache/spring/GridSpringCacheManagerMultiJvmSelfTest.java @@ -29,12 +29,16 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.multijvm.IgniteProcessProxy; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.springframework.beans.factory.BeanFactory; import org.springframework.context.support.ClassPathXmlApplicationContext; /** * Spring cache test in multi jvm environment. */ +@RunWith(JUnit4.class) public class GridSpringCacheManagerMultiJvmSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected boolean isMultiJvm() { @@ -54,6 +58,7 @@ public class GridSpringCacheManagerMultiJvmSelfTest extends GridCommonAbstractTe /** * @throws Exception If failed. */ + @Test public void testSyncCache() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-9488"); diff --git a/modules/spring/src/test/java/org/apache/ignite/cache/spring/SpringCacheManagerContextInjectionTest.java b/modules/spring/src/test/java/org/apache/ignite/cache/spring/SpringCacheManagerContextInjectionTest.java index 482c837651b2f..68373608187af 100644 --- a/modules/spring/src/test/java/org/apache/ignite/cache/spring/SpringCacheManagerContextInjectionTest.java +++ b/modules/spring/src/test/java/org/apache/ignite/cache/spring/SpringCacheManagerContextInjectionTest.java @@ -23,6 +23,9 @@ import org.apache.ignite.internal.IgnitionEx; import org.apache.ignite.lifecycle.LifecycleBean; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.springframework.beans.factory.BeanFactory; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Bean; @@ -31,10 +34,12 @@ /** * */ +@RunWith(JUnit4.class) public class SpringCacheManagerContextInjectionTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testBeanInjectionUsingConfigPath() throws Exception { new AnnotationConfigApplicationContext(TestPathConfiguration.class); @@ -56,6 +61,7 @@ public void testBeanInjectionUsingConfigPath() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBeanInjectionUsingConfiguration() throws Exception { BeanFactory factory = new AnnotationConfigApplicationContext(TestCfgConfiguration.class); diff --git a/modules/spring/src/test/java/org/apache/ignite/cache/spring/SpringCacheTest.java b/modules/spring/src/test/java/org/apache/ignite/cache/spring/SpringCacheTest.java index 53c52f84413a3..3b80a63f975fd 100644 --- a/modules/spring/src/test/java/org/apache/ignite/cache/spring/SpringCacheTest.java +++ b/modules/spring/src/test/java/org/apache/ignite/cache/spring/SpringCacheTest.java @@ -21,10 +21,14 @@ import org.apache.ignite.IgniteCache; import org.apache.ignite.internal.util.typedef.G; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for {@link SpringCache} */ +@RunWith(JUnit4.class) public class SpringCacheTest extends GridCommonAbstractTest { /** */ private static Ignite ignite; @@ -70,6 +74,7 @@ public class SpringCacheTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testGetName() throws Exception { assertEquals(cacheName, springCache.getName()); } @@ -77,6 +82,7 @@ public void testGetName() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetNativeCache() throws Exception { assertEquals(nativeCache, springCache.getNativeCache()); } @@ -84,6 +90,7 @@ public void testGetNativeCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetByKey() throws Exception { String key = "key"; String value = "value"; @@ -97,6 +104,7 @@ public void testGetByKey() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetByKeyType() throws Exception { String key = "key"; String value = "value"; @@ -116,6 +124,7 @@ public void testGetByKeyType() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPut() throws Exception { String key = "key"; assertNull(springCache.get(key)); @@ -129,6 +138,7 @@ public void testPut() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPutIfAbsent() throws Exception { String key = "key"; String expected = "value"; @@ -143,6 +153,7 @@ public void testPutIfAbsent() throws Exception { /** * @throws Exception If failed. */ + @Test public void testEvict() throws Exception { String key = "key"; assertNull(springCache.get(key)); @@ -157,6 +168,7 @@ public void testEvict() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClear() throws Exception { String key; springCache.put((key = "key1"), "value1"); diff --git a/modules/spring/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcBlobStoreFactorySelfTest.java b/modules/spring/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcBlobStoreFactorySelfTest.java index be2238bd8bf93..1ed0ada45bcc0 100644 --- a/modules/spring/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcBlobStoreFactorySelfTest.java +++ b/modules/spring/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcBlobStoreFactorySelfTest.java @@ -32,10 +32,14 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.h2.jdbcx.JdbcDataSource; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for Cache JDBC blob store factory. */ +@RunWith(JUnit4.class) public class CacheJdbcBlobStoreFactorySelfTest extends GridCommonAbstractTest { /** Cache name. */ private static final String CACHE_NAME = "test"; @@ -46,6 +50,7 @@ public class CacheJdbcBlobStoreFactorySelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testXmlConfiguration() throws Exception { try (Ignite ignite = Ignition.start("modules/spring/src/test/config/store-cache.xml")) { try(Ignite ignite1 = Ignition.start("modules/spring/src/test/config/store-cache1.xml")) { @@ -59,6 +64,7 @@ public void testXmlConfiguration() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCacheConfiguration() throws Exception { try (Ignite ignite = Ignition.start("modules/spring/src/test/config/node.xml")) { try (Ignite ignite1 = Ignition.start("modules/spring/src/test/config/node1.xml")) { @@ -76,6 +82,7 @@ public void testCacheConfiguration() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIncorrectBeanConfiguration() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-1094"); diff --git a/modules/spring/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreFactorySelfTest.java b/modules/spring/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreFactorySelfTest.java index ba4984d22cab9..d52270c1d6bff 100644 --- a/modules/spring/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreFactorySelfTest.java +++ b/modules/spring/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreFactorySelfTest.java @@ -29,10 +29,14 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.h2.jdbcx.JdbcDataSource; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for Cache JDBC POJO store factory. */ +@RunWith(JUnit4.class) public class CacheJdbcPojoStoreFactorySelfTest extends GridCommonAbstractTest { /** Cache name. */ private static final String CACHE_NAME = "test"; @@ -40,6 +44,7 @@ public class CacheJdbcPojoStoreFactorySelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCacheConfiguration() throws Exception { try (Ignite ignite = Ignition.start("modules/spring/src/test/config/node.xml")) { try (Ignite ignite1 = Ignition.start("modules/spring/src/test/config/node1.xml")) { @@ -57,6 +62,7 @@ public void testCacheConfiguration() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSerializable() throws Exception { try (Ignite ignite = Ignition.start("modules/spring/src/test/config/node.xml")) { try (IgniteCache cache = ignite.getOrCreateCache(cacheConfigurationH2Dialect())) { @@ -68,6 +74,7 @@ public void testSerializable() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIncorrectBeanConfiguration() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-1094"); diff --git a/modules/spring/src/test/java/org/apache/ignite/encryption/SpringEncryptedCacheRestartTest.java b/modules/spring/src/test/java/org/apache/ignite/encryption/SpringEncryptedCacheRestartTest.java index 64885274cbea8..962209a0b2ff4 100644 --- a/modules/spring/src/test/java/org/apache/ignite/encryption/SpringEncryptedCacheRestartTest.java +++ b/modules/spring/src/test/java/org/apache/ignite/encryption/SpringEncryptedCacheRestartTest.java @@ -29,10 +29,14 @@ import org.apache.ignite.internal.util.typedef.T2; import org.apache.ignite.internal.util.typedef.internal.CU; import org.apache.ignite.spi.encryption.keystore.KeystoreEncryptionKey; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.testframework.GridTestUtils.assertThrowsWithCause; /** */ +@RunWith(JUnit4.class) public class SpringEncryptedCacheRestartTest extends EncryptedCacheRestartTest { /** {@inheritDoc} */ @Override protected void createEncryptedCache(IgniteEx grid0, IgniteEx grid1, String cacheName, String cacheGroup) { @@ -63,6 +67,7 @@ public class SpringEncryptedCacheRestartTest extends EncryptedCacheRestartTest { } /** @throws Exception If failed. */ + @Test public void testEncryptionKeysEqualsOnThirdNodeJoin() throws Exception { T2 g = startTestGrids(true); @@ -97,6 +102,7 @@ public void testEncryptionKeysEqualsOnThirdNodeJoin() throws Exception { } /** @throws Exception If failed. */ + @Test public void testCreateEncryptedCacheGroup() throws Exception { IgniteEx g0 = (IgniteEx)IgnitionEx.start( IgniteUtils.resolveIgnitePath( @@ -134,6 +140,7 @@ public void testCreateEncryptedCacheGroup() throws Exception { } /** @throws Exception If failed. */ + @Test public void testCreateNotEncryptedCacheInEncryptedGroupFails() throws Exception { IgniteEx g0 = (IgniteEx)IgnitionEx.start( IgniteUtils.resolveIgnitePath( @@ -151,6 +158,7 @@ public void testCreateNotEncryptedCacheInEncryptedGroupFails() throws Exception } /** @throws Exception If failed. */ + @Test public void testStartWithEncryptedOnDiskPlainInCfg() throws Exception { doTestDiffCfgAndPersistentFlagVal( "modules/spring/src/test/config/enc/enc-cache.xml", @@ -158,6 +166,7 @@ public void testStartWithEncryptedOnDiskPlainInCfg() throws Exception { } /** @throws Exception If failed. */ + @Test public void testStartWithPlainOnDiskEncryptedInCfg() throws Exception { doTestDiffCfgAndPersistentFlagVal( "modules/spring/src/test/config/enc/not-encrypted-cache.xml", diff --git a/modules/spring/src/test/java/org/apache/ignite/internal/GridFactorySelfTest.java b/modules/spring/src/test/java/org/apache/ignite/internal/GridFactorySelfTest.java index d2d86277bca67..adc959c430880 100644 --- a/modules/spring/src/test/java/org/apache/ignite/internal/GridFactorySelfTest.java +++ b/modules/spring/src/test/java/org/apache/ignite/internal/GridFactorySelfTest.java @@ -66,6 +66,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.springframework.beans.BeansException; import org.springframework.beans.factory.config.ConstructorArgumentValues; import org.springframework.beans.factory.support.AbstractBeanDefinition; @@ -84,6 +87,7 @@ * @see GridFactoryVmShutdownTest */ @GridCommonTest(group = "NonDistributed Kernal Self") +@RunWith(JUnit4.class) public class GridFactorySelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -125,6 +129,7 @@ public GridFactorySelfTest() { /** * @throws Exception If failed. */ + @Test public void testIgnitionStartDefault() throws Exception { try (Ignite ignite = Ignition.start()) { log.info("Started1: " + ignite.name()); @@ -147,6 +152,7 @@ public void testIgnitionStartDefault() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStartDefault() throws Exception { try (Ignite ignite = Ignition.start("config/default-config.xml")) { log.info("Started: " + ignite.name()); @@ -156,6 +162,7 @@ public void testStartDefault() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStartGridWithConfigUrlString() throws Exception { GridEmbeddedHttpServer srv = null; String igniteInstanceName = "grid_with_url_config"; @@ -179,6 +186,7 @@ public void testStartGridWithConfigUrlString() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStartGridWithConfigUrl() throws Exception { GridEmbeddedHttpServer srv = null; String igniteInstanceName = "grid_with_url_config"; @@ -202,6 +210,7 @@ public void testStartGridWithConfigUrl() throws Exception { /** * Tests default grid */ + @Test public void testDefaultGridGetOrStart() throws Exception { IgniteConfiguration cfg = getConfiguration(null); @@ -225,6 +234,7 @@ public void testDefaultGridGetOrStart() throws Exception { /** * Tests named grid */ + @Test public void testNamedGridGetOrStart() throws Exception { IgniteConfiguration cfg = getConfiguration("test"); try (Ignite ignite = Ignition.getOrStart(cfg)) { @@ -248,6 +258,7 @@ public void testNamedGridGetOrStart() throws Exception { /** * Tests concurrent grid initialization */ + @Test public void testConcurrentGridGetOrStartCon() throws Exception { final IgniteConfiguration cfg = getConfiguration(null); @@ -284,6 +295,7 @@ public void testConcurrentGridGetOrStartCon() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLifecycleBeansNullIgniteInstanceName() throws Exception { checkLifecycleBeans(null); } @@ -291,6 +303,7 @@ public void testLifecycleBeansNullIgniteInstanceName() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLifecycleBeansNotNullIgniteInstanceName() throws Exception { checkLifecycleBeans("testGrid"); } @@ -363,6 +376,7 @@ private void checkIgniteInstanceNameEquals(String n1, String n2) { /** * @throws Exception If failed. */ + @Test public void testStartMultipleGridsFromSpring() throws Exception { File cfgFile = GridTestUtils.resolveIgnitePath(GridTestProperties.getProperty("loader.self.multipletest.config")); @@ -417,6 +431,7 @@ else if ("grid-factory-test-2".equals(name)) /** * @throws Exception If failed. */ + @Test public void testStartMultipleDefaultGrids() throws Exception { try { multithreaded( @@ -454,6 +469,7 @@ public void testStartMultipleDefaultGrids() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStartMultipleNonDefaultGrids() throws Exception { try { multithreaded( @@ -492,6 +508,7 @@ public void testStartMultipleNonDefaultGrids() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConcurrentStartStop() throws Exception { checkConcurrentStartStop("TEST_NAME"); } @@ -499,6 +516,7 @@ public void testConcurrentStartStop() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConcurrentStartStopDefaultGrid() throws Exception { checkConcurrentStartStop(null); } @@ -581,6 +599,7 @@ private void checkConcurrentStartStop(@Nullable final String igniteInstanceName) /** * @throws Exception If failed. */ + @Test public void testGridStartRollback() throws Exception { GridTestUtils.assertThrows( log, @@ -657,6 +676,7 @@ public void disabledTestStartSingleInstanceSpi() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStartMultipleInstanceSpi() throws Exception { IgniteConfiguration cfg1 = getConfiguration(); IgniteConfiguration cfg2 = getConfiguration(); @@ -692,6 +712,7 @@ public void testStartMultipleInstanceSpi() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLoadBean() throws Exception { final String path = "modules/spring/src/test/java/org/apache/ignite/internal/cache.xml"; @@ -927,6 +948,7 @@ private ApplicationContext getTestApplicationContext() { /** * @throws Exception If failed. */ + @Test public void testStopCancel() throws Exception { IgniteConfiguration cfg = new IgniteConfiguration(); @@ -942,6 +964,7 @@ public void testStopCancel() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConfigInClassPath() throws Exception { try (Ignite ignite = Ignition.start("config/ignite-test-config.xml")) { assert "config-in-classpath".equals(ignite.name()); @@ -951,6 +974,7 @@ public void testConfigInClassPath() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCurrentIgnite() throws Exception { final String LEFT = "LEFT"; final String RIGHT = "RIGHT"; @@ -981,6 +1005,7 @@ public void testCurrentIgnite() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRepeatingStart() throws Exception { try { IgniteConfiguration c = getConfiguration("1"); diff --git a/modules/spring/src/test/java/org/apache/ignite/internal/GridSpringBeanSerializationSelfTest.java b/modules/spring/src/test/java/org/apache/ignite/internal/GridSpringBeanSerializationSelfTest.java index 6a72213235c09..cf9b97a11cb1e 100644 --- a/modules/spring/src/test/java/org/apache/ignite/internal/GridSpringBeanSerializationSelfTest.java +++ b/modules/spring/src/test/java/org/apache/ignite/internal/GridSpringBeanSerializationSelfTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for {@link org.apache.ignite.IgniteSpringBean} serialization. */ +@RunWith(JUnit4.class) public class GridSpringBeanSerializationSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -87,6 +91,7 @@ private IgniteConfiguration config() { /** * @throws Exception If failed. */ + @Test public void testSerialization() throws Exception { assert bean != null; diff --git a/modules/spring/src/test/java/org/apache/ignite/internal/IgniteDynamicCacheConfigTest.java b/modules/spring/src/test/java/org/apache/ignite/internal/IgniteDynamicCacheConfigTest.java index 45655e1154fa6..13ed4ac9e66a3 100644 --- a/modules/spring/src/test/java/org/apache/ignite/internal/IgniteDynamicCacheConfigTest.java +++ b/modules/spring/src/test/java/org/apache/ignite/internal/IgniteDynamicCacheConfigTest.java @@ -28,10 +28,14 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.http.GridEmbeddedHttpServer; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for dynamic cache start from config file. */ +@RunWith(JUnit4.class) public class IgniteDynamicCacheConfigTest extends GridCommonAbstractTest { /** */ public static final String CACHE_NAME = "TestDynamicCache"; @@ -86,6 +90,7 @@ public int nodeCount() { /** * @throws Exception If failed. */ + @Test public void testDynamicCacheStartFromConfig() throws Exception { IgniteCache cache = ignite(0).createCache(load( "modules/spring/src/test/java/org/apache/ignite/internal/cache.xml")); @@ -101,6 +106,7 @@ public void testDynamicCacheStartFromConfig() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDynamicNearCacheStartFromConfig() throws Exception { testAttribute = false; @@ -130,6 +136,7 @@ public void testDynamicNearCacheStartFromConfig() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCreateNearCache() throws Exception { testAttribute = false; @@ -162,6 +169,7 @@ public void testCreateNearCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testGetOrCreateNearCache() throws Exception { testAttribute = false; @@ -197,6 +205,7 @@ public void testGetOrCreateNearCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDynamicCacheStartFromNotExistConfig() throws Exception { try { ignite(0).getOrCreateCache(load("config/cache.xml")); @@ -211,6 +220,7 @@ public void testDynamicCacheStartFromNotExistConfig() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStartCachedWithConfigUrlString() throws Exception { GridEmbeddedHttpServer srv = null; diff --git a/modules/spring/src/test/java/org/apache/ignite/internal/IgniteSpringBeanTest.java b/modules/spring/src/test/java/org/apache/ignite/internal/IgniteSpringBeanTest.java index c7f0d59780f35..03ab32e8d10fe 100644 --- a/modules/spring/src/test/java/org/apache/ignite/internal/IgniteSpringBeanTest.java +++ b/modules/spring/src/test/java/org/apache/ignite/internal/IgniteSpringBeanTest.java @@ -19,14 +19,19 @@ import org.apache.ignite.IgniteSpringBean; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteSpringBeanTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testInitialization() throws Exception { try (IgniteSpringBean bean = new IgniteSpringBean()) { bean.setConfiguration(getConfiguration("test")); @@ -40,6 +45,7 @@ public void testInitialization() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIllegalState() throws Exception { IgniteSpringBean bean = new IgniteSpringBean(); diff --git a/modules/spring/src/test/java/org/apache/ignite/internal/processors/resource/GridLoggerInjectionSelfTest.java b/modules/spring/src/test/java/org/apache/ignite/internal/processors/resource/GridLoggerInjectionSelfTest.java index 3fc64b5fab98b..60a84814ee2e8 100644 --- a/modules/spring/src/test/java/org/apache/ignite/internal/processors/resource/GridLoggerInjectionSelfTest.java +++ b/modules/spring/src/test/java/org/apache/ignite/internal/processors/resource/GridLoggerInjectionSelfTest.java @@ -28,10 +28,14 @@ import org.apache.ignite.lang.IgniteCallable; import org.apache.ignite.resources.LoggerResource; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for injected logger category. */ +@RunWith(JUnit4.class) public class GridLoggerInjectionSelfTest extends GridCommonAbstractTest implements Externalizable { /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { @@ -45,6 +49,7 @@ public class GridLoggerInjectionSelfTest extends GridCommonAbstractTest implemen * * @throws Exception If failed. */ + @Test public void testClosureField() throws Exception { Ignite ignite = grid(0); @@ -72,6 +77,7 @@ public void testClosureField() throws Exception { * * @throws Exception If failed. */ + @Test public void testClosureMethod() throws Exception { Ignite ignite = grid(0); @@ -99,6 +105,7 @@ private void log(IgniteLogger log) { * * @throws Exception If failed. */ + @Test public void testStringCategory() throws Exception { Ignite ignite = grid(0); @@ -130,4 +137,4 @@ private void log(IgniteLogger log) { @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { // No-op. } -} \ No newline at end of file +} diff --git a/modules/spring/src/test/java/org/apache/ignite/internal/processors/resource/GridResourceProcessorSelfTest.java b/modules/spring/src/test/java/org/apache/ignite/internal/processors/resource/GridResourceProcessorSelfTest.java index 12535a7e6530d..56f1b540fe57e 100644 --- a/modules/spring/src/test/java/org/apache/ignite/internal/processors/resource/GridResourceProcessorSelfTest.java +++ b/modules/spring/src/test/java/org/apache/ignite/internal/processors/resource/GridResourceProcessorSelfTest.java @@ -42,12 +42,16 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.springframework.util.Assert; /** * Unit tests for grid resource processor. */ @GridCommonTest(group = "Resource Self") +@RunWith(JUnit4.class) public class GridResourceProcessorSelfTest extends GridCommonAbstractTest { /** */ private GridTestKernalContext ctx; @@ -116,6 +120,7 @@ public void setStr(String str) { /** * @throws Exception If failed. */ + @Test public void testInjectResourceToAnnotatedField() throws Exception { TestClassWithAnnotatedField target = new TestClassWithAnnotatedField(); @@ -148,6 +153,7 @@ void setStr(String str) { /** * @throws Exception If failed. */ + @Test public void testInjectResourceToAnnotatedMethod() throws Exception { TestClassWithAnnotatedMethod target = new TestClassWithAnnotatedMethod(); @@ -269,6 +275,7 @@ private class TestClassWithAnnotationsDeep { /** * @throws Exception If failed. */ + @Test public void testInjectResourceInnerClasses() throws Exception { // Test fields. TestClassWithAnnotationsOuter outer = new TestClassWithAnnotationsOuter(); @@ -383,6 +390,7 @@ public IgniteLogger getTaskLog() { /** * @throws Exception If failed. */ + @Test public void testInjectResourceGridTaskAndJob() throws Exception { Ignite g = startGrid(); @@ -398,6 +406,7 @@ public void testInjectResourceGridTaskAndJob() throws Exception { /** * @throws Exception If failed. */ + @Test public void testInjectResourcePerformance() throws Exception { int injNum = 50000; @@ -417,6 +426,7 @@ public void testInjectResourcePerformance() throws Exception { * @throws Exception If failed. */ @SuppressWarnings("TooBroadScope") + @Test public void testInjectResourceMultiThreaded() throws Exception { final int threadsCnt = 100; final int iters = 2000000; @@ -475,4 +485,4 @@ private static final class Test1 { @TestAnnotation1 private String val1; } -} \ No newline at end of file +} diff --git a/modules/spring/src/test/java/org/apache/ignite/internal/processors/resource/GridServiceInjectionSelfTest.java b/modules/spring/src/test/java/org/apache/ignite/internal/processors/resource/GridServiceInjectionSelfTest.java index a8cd89c064839..fe9623c1964d9 100644 --- a/modules/spring/src/test/java/org/apache/ignite/internal/processors/resource/GridServiceInjectionSelfTest.java +++ b/modules/spring/src/test/java/org/apache/ignite/internal/processors/resource/GridServiceInjectionSelfTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.services.ServiceContext; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for injected service. */ +@RunWith(JUnit4.class) public class GridServiceInjectionSelfTest extends GridCommonAbstractTest implements Serializable { /** */ private static final long serialVersionUID = 0L; @@ -57,6 +61,7 @@ public class GridServiceInjectionSelfTest extends GridCommonAbstractTest impleme /** * @throws Exception If failed. */ + @Test public void testClosureField() throws Exception { grid(0).compute().call(new IgniteCallable() { @ServiceResource(serviceName = SERVICE_NAME1) @@ -76,6 +81,7 @@ public void testClosureField() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClosureFieldProxy() throws Exception { grid(0).compute(grid(0).cluster().forRemotes()).call(new IgniteCallable() { @ServiceResource(serviceName = SERVICE_NAME2, proxyInterface = DummyService.class) @@ -97,6 +103,7 @@ public void testClosureFieldProxy() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClosureFieldLocalProxy() throws Exception { grid(0).compute(grid(0).cluster().forRemotes()).call(new IgniteCallable() { @ServiceResource(serviceName = SERVICE_NAME1, proxyInterface = DummyService.class) @@ -118,6 +125,7 @@ public void testClosureFieldLocalProxy() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClosureFieldWithIncorrectType() throws Exception { GridTestUtils.assertThrowsAnyCause(log, new Callable() { @Override public Void call() { @@ -140,6 +148,7 @@ public void testClosureFieldWithIncorrectType() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClosureMethod() throws Exception { grid(0).compute().call(new IgniteCallable() { private DummyService svc; @@ -164,6 +173,7 @@ private void service(DummyService svc) { /** * @throws Exception If failed. */ + @Test public void testClosureMethodProxy() throws Exception { grid(0).compute(grid(0).cluster().forRemotes()).call(new IgniteCallable() { private DummyService svc; @@ -189,6 +199,7 @@ private void service(DummyService svc) { /** * @throws Exception If failed. */ + @Test public void testClosureMethodLocalProxy() throws Exception { grid(0).compute(grid(0).cluster().forRemotes()).call(new IgniteCallable() { private DummyService svc; @@ -214,6 +225,7 @@ private void service(DummyService svc) { /** * @throws Exception If failed. */ + @Test public void testClosureMethodWithIncorrectType() throws Exception { GridTestUtils.assertThrowsAnyCause(log, new Callable() { @Override public Void call() { @@ -236,6 +248,7 @@ private void service(String svcs) { /** * @throws Exception If failed. */ + @Test public void testClosureFieldWithNonExistentService() throws Exception { grid(0).compute().call(new IgniteCallable() { @ServiceResource(serviceName = "nonExistentService") @@ -252,6 +265,7 @@ public void testClosureFieldWithNonExistentService() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClosureMethodWithNonExistentService() throws Exception { grid(0).compute().call(new IgniteCallable() { @ServiceResource(serviceName = "nonExistentService") @@ -299,4 +313,4 @@ public static class DummyServiceImpl implements DummyService, Service { System.out.println("Executing service: " + ctx.name()); } } -} \ No newline at end of file +} diff --git a/modules/spring/src/test/java/org/apache/ignite/internal/processors/resource/GridSpringResourceInjectionSelfTest.java b/modules/spring/src/test/java/org/apache/ignite/internal/processors/resource/GridSpringResourceInjectionSelfTest.java index afb34b4e6d545..d891f91abef27 100644 --- a/modules/spring/src/test/java/org/apache/ignite/internal/processors/resource/GridSpringResourceInjectionSelfTest.java +++ b/modules/spring/src/test/java/org/apache/ignite/internal/processors/resource/GridSpringResourceInjectionSelfTest.java @@ -27,6 +27,9 @@ import org.apache.ignite.resources.SpringResource; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.springframework.beans.factory.NoSuchBeanDefinitionException; import org.springframework.beans.factory.NoUniqueBeanDefinitionException; import org.springframework.context.support.ClassPathXmlApplicationContext; @@ -35,6 +38,7 @@ * Tests for injected resource. */ @SuppressWarnings("unused") +@RunWith(JUnit4.class) public class GridSpringResourceInjectionSelfTest extends GridCommonAbstractTest { /** Bean name. */ private static final String DUMMY_BEAN = "dummyResourceBean"; @@ -51,6 +55,7 @@ public class GridSpringResourceInjectionSelfTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testClosureFieldByResourceName() throws Exception { grid.compute().call(new IgniteCallable() { @SpringResource(resourceName = DUMMY_BEAN) @@ -67,6 +72,7 @@ public void testClosureFieldByResourceName() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClosureFieldByResourceClass() throws Exception { grid.compute().call(new IgniteCallable() { @SpringResource(resourceClass = DummyResourceBean.class) @@ -83,6 +89,7 @@ public void testClosureFieldByResourceClass() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClosureFieldByResourceClassWithMultipleBeans() throws Exception { IgniteConfiguration anotherCfg = new IgniteConfiguration(); anotherCfg.setIgniteInstanceName("anotherGrid"); @@ -109,6 +116,7 @@ public void testClosureFieldByResourceClassWithMultipleBeans() throws Exception /** * Resource injection with non-existing resource name. */ + @Test public void testClosureFieldWithWrongResourceName() { assertError(new IgniteCallable() { @SpringResource(resourceName = "nonExistentResource") @@ -125,6 +133,7 @@ public void testClosureFieldWithWrongResourceName() { /** * Resource injection with non-existing resource class. */ + @Test public void testClosureFieldWithWrongResourceClass() { assertError(new IgniteCallable() { @SpringResource(resourceClass = AnotherDummyResourceBean.class) @@ -142,6 +151,7 @@ public void testClosureFieldWithWrongResourceClass() { /** * Resource injection with both resource and class set (ambiguity). */ + @Test public void testClosureFieldByResourceClassAndName() { assertError(new IgniteCallable() { @SpringResource(resourceClass = DummyResourceBean.class, resourceName = DUMMY_BEAN) @@ -158,6 +168,7 @@ public void testClosureFieldByResourceClassAndName() { /** * Resource injection with no name and class set. */ + @Test public void testClosureFieldWithNoParams() { assertError(new IgniteCallable() { @SpringResource @@ -174,6 +185,7 @@ public void testClosureFieldWithNoParams() { /** * @throws Exception If failed. */ + @Test public void testClosureMethodWithResourceName() throws Exception { grid.compute().call(new IgniteCallable() { private DummyResourceBean dummyRsrcBean; @@ -196,6 +208,7 @@ private void setDummyResourceBean(DummyResourceBean dummyRsrcBean) { /** * @throws Exception If failed. */ + @Test public void testClosureMethodWithResourceClass() throws Exception { grid.compute().call(new IgniteCallable() { private DummyResourceBean dummyRsrcBean; @@ -218,6 +231,7 @@ private void setDummyResourceBean(DummyResourceBean dummyRsrcBean) { /** * @throws Exception If failed. */ + @Test public void testClosureMethodWithResourceClassWithMultipleBeans() throws Exception { IgniteConfiguration anotherCfg = new IgniteConfiguration(); anotherCfg.setIgniteInstanceName("anotherGrid"); @@ -253,6 +267,7 @@ private void setDummyResourceBean(DummyResourceBean dummyRsrcBean) { /** * Resource injection with non-existing resource name. */ + @Test public void testClosureMethodWithWrongResourceName() { assertError(new IgniteCallable() { private DummyResourceBean dummyRsrcBean; @@ -273,6 +288,7 @@ private void setDummyResourceBean(DummyResourceBean dummyRsrcBean) { /** * Resource injection with non-existing resource class. */ + @Test public void testClosureMethodWithWrongResourceClass() { assertError(new IgniteCallable() { private AnotherDummyResourceBean dummyRsrcBean; @@ -294,6 +310,7 @@ private void setDummyResourceBean(AnotherDummyResourceBean dummyRsrcBean) { /** * Resource injection with both resource and class set (ambiguity). */ + @Test public void testClosureMethodByResourceClassAndName() { assertError(new IgniteCallable() { @SpringResource(resourceClass = DummyResourceBean.class, resourceName = DUMMY_BEAN) @@ -310,6 +327,7 @@ public void testClosureMethodByResourceClassAndName() { /** * Resource injection with no params. */ + @Test public void testClosureMethodWithNoParams() { assertError(new IgniteCallable() { @SpringResource diff --git a/modules/spring/src/test/java/org/apache/ignite/internal/processors/resource/GridTransformSpringInjectionSelfTest.java b/modules/spring/src/test/java/org/apache/ignite/internal/processors/resource/GridTransformSpringInjectionSelfTest.java index dcf42c034d2dd..8c0c0631e31f7 100644 --- a/modules/spring/src/test/java/org/apache/ignite/internal/processors/resource/GridTransformSpringInjectionSelfTest.java +++ b/modules/spring/src/test/java/org/apache/ignite/internal/processors/resource/GridTransformSpringInjectionSelfTest.java @@ -36,6 +36,9 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; @@ -45,6 +48,7 @@ /** * */ +@RunWith(JUnit4.class) public class GridTransformSpringInjectionSelfTest extends GridCacheAbstractSelfTest { /** {@inheritDoc} */ @Override protected int gridCount() { @@ -60,6 +64,7 @@ public class GridTransformSpringInjectionSelfTest extends GridCacheAbstractSelfT /** * @throws Exception If failed. */ + @Test public void testTransformResourceInjection() throws Exception { Ignite grid = grid(0); diff --git a/modules/spring/src/test/java/org/apache/ignite/p2p/GridP2PUserVersionChangeSelfTest.java b/modules/spring/src/test/java/org/apache/ignite/p2p/GridP2PUserVersionChangeSelfTest.java index 96cae61307b7a..4aeb76d40d3cd 100644 --- a/modules/spring/src/test/java/org/apache/ignite/p2p/GridP2PUserVersionChangeSelfTest.java +++ b/modules/spring/src/test/java/org/apache/ignite/p2p/GridP2PUserVersionChangeSelfTest.java @@ -42,6 +42,9 @@ import org.apache.ignite.testframework.config.GridTestProperties; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testsuites.IgniteIgnore; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.events.EventType.EVT_NODE_FAILED; @@ -59,6 +62,7 @@ * make sure that a new class loader is created on remote node. */ @SuppressWarnings({"ProhibitedExceptionDeclared", "unchecked"}) +@RunWith(JUnit4.class) public class GridP2PUserVersionChangeSelfTest extends GridCommonAbstractTest { /** Current deployment mode. */ private DeploymentMode depMode; @@ -118,6 +122,7 @@ private long getConditionTimeout() { /** * @throws Exception If test failed. */ + @Test public void testRedeployVersionChangeContinuousMode() throws Exception { depMode = DeploymentMode.CONTINUOUS; @@ -127,6 +132,7 @@ public void testRedeployVersionChangeContinuousMode() throws Exception { /** * @throws Exception If test failed. */ + @Test public void testRedeployVersionChangeSharedMode() throws Exception { depMode = DeploymentMode.SHARED; @@ -183,6 +189,7 @@ private void checkRedeployVersionChange() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRedeployOnNodeRestartContinuousMode() throws Exception { depMode = DeploymentMode.CONTINUOUS; @@ -228,6 +235,7 @@ public void testRedeployOnNodeRestartContinuousMode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRedeployOnNodeRestartSharedMode() throws Exception { depMode = DeploymentMode.SHARED; @@ -287,6 +295,7 @@ public void testRedeployOnNodeRestartSharedMode() throws Exception { * @throws Exception If failed. */ @IgniteIgnore(value = "https://issues.apache.org/jira/browse/IGNITE-604", forceFailure = true) + @Test public void testCacheRedeployVersionChangeContinuousMode() throws Exception { depMode = DeploymentMode.CONTINUOUS; @@ -377,4 +386,4 @@ private String makeUserVersion(String userVer) { " " + ""; } -} \ No newline at end of file +} diff --git a/modules/spring/src/test/java/org/apache/ignite/spring/IgniteExcludeInConfigurationTest.java b/modules/spring/src/test/java/org/apache/ignite/spring/IgniteExcludeInConfigurationTest.java index 3104b8ec90d31..6e5cb0b2c1ba0 100644 --- a/modules/spring/src/test/java/org/apache/ignite/spring/IgniteExcludeInConfigurationTest.java +++ b/modules/spring/src/test/java/org/apache/ignite/spring/IgniteExcludeInConfigurationTest.java @@ -26,17 +26,22 @@ import org.apache.ignite.internal.util.typedef.X; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.IgniteComponentType.SPRING; /** * Checks excluding properties, beans with not existing classes in spring. */ +@RunWith(JUnit4.class) public class IgniteExcludeInConfigurationTest extends GridCommonAbstractTest { private URL cfgLocation = U.resolveIgniteUrl( "modules/spring/src/test/java/org/apache/ignite/spring/sprint-exclude.xml"); /** Spring should exclude properties by list and ignore beans with class not existing in classpath. */ + @Test public void testExclude() throws Exception { IgniteSpringHelper spring = SPRING.create(false); @@ -70,6 +75,7 @@ public void testExclude() throws Exception { } /** Spring should fail if bean class not exist in classpath. */ + @Test public void testFail() throws Exception { IgniteSpringHelper spring = SPRING.create(false); @@ -79,4 +85,4 @@ public void testFail() throws Exception { assertTrue(X.hasCause(e, ClassNotFoundException.class)); } } -} \ No newline at end of file +} diff --git a/modules/spring/src/test/java/org/apache/ignite/spring/IgniteStartFromStreamConfigurationTest.java b/modules/spring/src/test/java/org/apache/ignite/spring/IgniteStartFromStreamConfigurationTest.java index 2307a357fb5d6..2cbeb000ce327 100644 --- a/modules/spring/src/test/java/org/apache/ignite/spring/IgniteStartFromStreamConfigurationTest.java +++ b/modules/spring/src/test/java/org/apache/ignite/spring/IgniteStartFromStreamConfigurationTest.java @@ -25,16 +25,21 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Checks starts from Stream. */ +@RunWith(JUnit4.class) public class IgniteStartFromStreamConfigurationTest extends GridCommonAbstractTest { /** * Tests starts from stream. * * @throws Exception If failed. */ + @Test public void testStartFromStream() throws Exception { String cfg = "examples/config/example-cache.xml"; @@ -51,4 +56,4 @@ public void testStartFromStream() throws Exception { } } -} \ No newline at end of file +} diff --git a/modules/spring/src/test/java/org/apache/ignite/spring/injection/GridServiceInjectionSpringResourceTest.java b/modules/spring/src/test/java/org/apache/ignite/spring/injection/GridServiceInjectionSpringResourceTest.java index 891c42e277258..ee1f4f609908b 100644 --- a/modules/spring/src/test/java/org/apache/ignite/spring/injection/GridServiceInjectionSpringResourceTest.java +++ b/modules/spring/src/test/java/org/apache/ignite/spring/injection/GridServiceInjectionSpringResourceTest.java @@ -26,6 +26,9 @@ import org.apache.ignite.services.Service; import org.apache.ignite.services.ServiceContext; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.springframework.context.event.ContextRefreshedEvent; import org.springframework.context.event.EventListener; import org.springframework.context.support.AbstractApplicationContext; @@ -43,6 +46,7 @@ /** * Tests for injected service. */ +@RunWith(JUnit4.class) public class GridServiceInjectionSpringResourceTest extends GridCommonAbstractTest { /** Service name. */ private static final String SERVICE_NAME = "testService"; @@ -78,6 +82,7 @@ public class GridServiceInjectionSpringResourceTest extends GridCommonAbstractTe /** * @throws Exception If failed. */ + @Test public void testDeployServiceWithSpring() throws Exception { generateConfigXmls(NODES); diff --git a/modules/spring/src/test/java/org/apache/ignite/spring/injection/IgniteSpringBeanSpringResourceInjectionTest.java b/modules/spring/src/test/java/org/apache/ignite/spring/injection/IgniteSpringBeanSpringResourceInjectionTest.java index 2a06deb6e872e..7881ebbccd2a3 100644 --- a/modules/spring/src/test/java/org/apache/ignite/spring/injection/IgniteSpringBeanSpringResourceInjectionTest.java +++ b/modules/spring/src/test/java/org/apache/ignite/spring/injection/IgniteSpringBeanSpringResourceInjectionTest.java @@ -32,12 +32,16 @@ import org.apache.ignite.services.Service; import org.apache.ignite.services.ServiceContext; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.springframework.beans.factory.BeanFactory; import org.springframework.context.support.ClassPathXmlApplicationContext; /** * Test checking injections of {@link SpringResource} annotated fields. */ +@RunWith(JUnit4.class) public class IgniteSpringBeanSpringResourceInjectionTest extends GridCommonAbstractTest { /** */ private static final String SPRING_CFG_LOCATION = "/org/apache/ignite/spring/injection/spring-bean.xml"; @@ -184,6 +188,7 @@ private void doTestSpringResourceInjected(Runnable testRunnable) throws Exceptio } /** */ + @Test public void testSpringResourceInjectedInCacheStore() throws Exception { doTestSpringResourceInjected( new TestSpringResourceInjectedRunnable(SPRING_CFG_LOCATION, BEAN_TO_INJECT_NAME) { @@ -199,6 +204,7 @@ public void testSpringResourceInjectedInCacheStore() throws Exception { } /** */ + @Test public void testSpringResourceInjectedInService() throws Exception { doTestSpringResourceInjected( new TestSpringResourceInjectedRunnable(SPRING_CFG_LOCATION, BEAN_TO_INJECT_NAME) { diff --git a/modules/spring/src/test/java/org/apache/ignite/transactions/spring/GridSpringTransactionManagerAbstractTest.java b/modules/spring/src/test/java/org/apache/ignite/transactions/spring/GridSpringTransactionManagerAbstractTest.java index 8a4e44814a603..055c7de39b5cd 100644 --- a/modules/spring/src/test/java/org/apache/ignite/transactions/spring/GridSpringTransactionManagerAbstractTest.java +++ b/modules/spring/src/test/java/org/apache/ignite/transactions/spring/GridSpringTransactionManagerAbstractTest.java @@ -20,12 +20,16 @@ import org.apache.ignite.IgniteCache; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.springframework.transaction.IllegalTransactionStateException; import org.springframework.transaction.InvalidIsolationLevelException; import org.springframework.transaction.TransactionStatus; import org.springframework.transaction.support.TransactionCallback; import org.springframework.transaction.support.TransactionTemplate; +@RunWith(JUnit4.class) public abstract class GridSpringTransactionManagerAbstractTest extends GridCommonAbstractTest { /** */ @@ -48,6 +52,7 @@ public abstract class GridSpringTransactionManagerAbstractTest extends GridCommo } /** */ + @Test public void testSuccessPut() { int entryCnt = 1_000; @@ -57,6 +62,7 @@ public void testSuccessPut() { } /** */ + @Test public void testFailPut() { int entryCnt = 1_000; @@ -72,6 +78,7 @@ public void testFailPut() { } /** */ + @Test public void testMandatoryPropagation() { try { service().putWithMandatoryPropagation(cache()); @@ -84,6 +91,7 @@ public void testMandatoryPropagation() { } /** */ + @Test public void testUnsupportedIsolationLevel() { try { service().putWithUnsupportedIsolationLevel(cache()); @@ -98,6 +106,7 @@ public void testUnsupportedIsolationLevel() { /** * @throws Exception If test failed. */ + @Test public void testDoSetRollbackOnlyInExistingTransaction() throws Exception { SpringTransactionManager mngr = new SpringTransactionManager(); mngr.setIgniteInstanceName(grid().name()); diff --git a/modules/spring/src/test/java/org/apache/ignite/transactions/spring/SpringTransactionManagerContextInjectionTest.java b/modules/spring/src/test/java/org/apache/ignite/transactions/spring/SpringTransactionManagerContextInjectionTest.java index 8c014a9a7ad6e..247c7a6c8a68f 100644 --- a/modules/spring/src/test/java/org/apache/ignite/transactions/spring/SpringTransactionManagerContextInjectionTest.java +++ b/modules/spring/src/test/java/org/apache/ignite/transactions/spring/SpringTransactionManagerContextInjectionTest.java @@ -23,6 +23,9 @@ import org.apache.ignite.internal.IgnitionEx; import org.apache.ignite.lifecycle.LifecycleBean; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.springframework.beans.factory.BeanFactory; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Bean; @@ -31,10 +34,12 @@ /** * */ +@RunWith(JUnit4.class) public class SpringTransactionManagerContextInjectionTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testBeanInjectionUsingConfigPath() throws Exception { BeanFactory factory = new AnnotationConfigApplicationContext(TestPathConfiguration.class); @@ -56,6 +61,7 @@ public void testBeanInjectionUsingConfigPath() throws Exception { /** * @throws Exception If failed. */ + @Test public void testBeanInjectionUsingConfig() throws Exception { BeanFactory factory = new AnnotationConfigApplicationContext(TestCfgConfiguration.class); @@ -122,4 +128,4 @@ LifecycleBean bean2() { return new TestInjectionLifecycleBean(); } } -} \ No newline at end of file +} diff --git a/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteNodeStartUtilsSelfTest.java b/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteNodeStartUtilsSelfTest.java index 79625768cb000..b8883f682fccd 100644 --- a/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteNodeStartUtilsSelfTest.java +++ b/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteNodeStartUtilsSelfTest.java @@ -23,6 +23,9 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.lang.IgniteBiTuple; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.util.nodestart.IgniteNodeStartUtils.CFG; import static org.apache.ignite.internal.util.nodestart.IgniteNodeStartUtils.HOST; @@ -38,10 +41,12 @@ /** * Tests for {@link org.apache.ignite.internal.util.nodestart.IgniteNodeStartUtils}. */ +@RunWith(JUnit4.class) public class IgniteNodeStartUtilsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testParseFile() throws Exception { File file = U.resolveIgnitePath("modules/core/src/test/config/start-nodes.ini"); @@ -94,4 +99,4 @@ else if ("192.168.1.2".equals(host.get(HOST))) { assert "cfg3".equals(dflts.get(CFG)); assert "script3".equals(dflts.get(SCRIPT)); } -} \ No newline at end of file +} diff --git a/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteProjectionStartStopRestartSelfTest.java b/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteProjectionStartStopRestartSelfTest.java index 9ede98e1effcb..2d8728f6aec98 100644 --- a/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteProjectionStartStopRestartSelfTest.java +++ b/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteProjectionStartStopRestartSelfTest.java @@ -45,6 +45,9 @@ import org.apache.ignite.testframework.config.GridTestProperties; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.events.EventType.EVT_NODE_FAILED; @@ -72,6 +75,7 @@ * credentials.

    */ @SuppressWarnings("ConstantConditions") +@RunWith(JUnit4.class) public class IgniteProjectionStartStopRestartSelfTest extends GridCommonAbstractTest { /** */ private static final String SSH_UNAME = getProperty("test.ssh.username", "ssh.username"); @@ -206,6 +210,7 @@ else if (evt.type() == EVT_NODE_LEFT || evt.type() == EVT_NODE_FAILED) { /** * @throws Exception If failed. */ + @Test public void testStartOneNode() throws Exception { joinedLatch = new CountDownLatch(1); @@ -234,6 +239,7 @@ public void testStartOneNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStartThreeNodes() throws Exception { joinedLatch = new CountDownLatch(3); @@ -262,6 +268,7 @@ public void testStartThreeNodes() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStartThreeNodesAndDoEmptyCall() throws Exception { joinedLatch = new CountDownLatch(3); @@ -287,6 +294,7 @@ public void testStartThreeNodesAndDoEmptyCall() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStartThreeNodesAndTryToStartOneNode() throws Exception { joinedLatch = new CountDownLatch(3); @@ -310,6 +318,7 @@ public void testStartThreeNodesAndTryToStartOneNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStartFiveNodesInTwoCalls() throws Exception { joinedLatch = new CountDownLatch(3); @@ -344,6 +353,7 @@ public void testStartFiveNodesInTwoCalls() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStartFiveWithTwoSpecs() throws Exception { joinedLatch = new CountDownLatch(5); @@ -373,6 +383,7 @@ public void testStartFiveWithTwoSpecs() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStartThreeNodesAndRestart() throws Exception { joinedLatch = new CountDownLatch(3); @@ -409,6 +420,7 @@ public void testStartThreeNodesAndRestart() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCustomScript() throws Exception { joinedLatch = new CountDownLatch(1); @@ -443,6 +455,7 @@ public void testCustomScript() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStopNodes() throws Exception { joinedLatch = new CountDownLatch(3); @@ -476,6 +489,7 @@ public void testStopNodes() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStopNodesFiltered() throws Exception { joinedLatch = new CountDownLatch(2); @@ -531,6 +545,7 @@ public void testStopNodesFiltered() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStopNodeById() throws Exception { joinedLatch = new CountDownLatch(3); @@ -548,6 +563,7 @@ public void testStopNodeById() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStopNodesByIds() throws Exception { joinedLatch = new CountDownLatch(3); @@ -572,6 +588,7 @@ public void testStopNodesByIds() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRestartNodes() throws Exception { joinedLatch = new CountDownLatch(3); @@ -591,6 +608,7 @@ public void testRestartNodes() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRestartNodesFiltered() throws Exception { joinedLatch = new CountDownLatch(2); @@ -649,6 +667,7 @@ public void testRestartNodesFiltered() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRestartNodeById() throws Exception { joinedLatch = new CountDownLatch(3); @@ -668,6 +687,7 @@ public void testRestartNodeById() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRestartNodesByIds() throws Exception { joinedLatch = new CountDownLatch(3); @@ -803,4 +823,4 @@ private static String getProperty(String envName, String gridTestName) { return GridTestProperties.getProperty(gridTestName); } -} \ No newline at end of file +} diff --git a/modules/storm/src/test/java/org/apache/ignite/stream/storm/StormIgniteStreamerSelfTest.java b/modules/storm/src/test/java/org/apache/ignite/stream/storm/StormIgniteStreamerSelfTest.java index b5295ad1c0b80..9d9a1c4ae6b92 100644 --- a/modules/storm/src/test/java/org/apache/ignite/stream/storm/StormIgniteStreamerSelfTest.java +++ b/modules/storm/src/test/java/org/apache/ignite/stream/storm/StormIgniteStreamerSelfTest.java @@ -42,12 +42,16 @@ import org.apache.storm.topology.TopologyBuilder; import org.apache.storm.tuple.Values; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_PUT; /** * Tests for {@link StormStreamer}. */ +@RunWith(JUnit4.class) public class StormIgniteStreamerSelfTest extends GridCommonAbstractTest { /** Cache name. */ private static final String TEST_CACHE = "testCache"; @@ -81,6 +85,7 @@ public class StormIgniteStreamerSelfTest extends GridCommonAbstractTest { * @throws TimeoutException * @throws InterruptedException */ + @Test public void testStormStreamerIgniteBolt() throws TimeoutException, InterruptedException { final StormStreamer stormStreamer = new StormStreamer<>(); diff --git a/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTest.java b/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTest.java index 2210a277643fe..b084fbfc79e9c 100644 --- a/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTest.java +++ b/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTest.java @@ -31,6 +31,9 @@ import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import twitter4j.Status; import twitter4j.TwitterException; import twitter4j.TwitterObjectFactory; @@ -44,6 +47,7 @@ /** * Test for {@link TwitterStreamer}. Tests Public Status streaming API https://dev.twitter.com/streaming/public. */ +@RunWith(JUnit4.class) public class IgniteTwitterStreamerTest extends GridCommonAbstractTest { /** Cache entries count. */ @@ -83,7 +87,7 @@ public IgniteTwitterStreamerTest() { } /** {@inheritDoc} */ - public void afterTest() throws Exception { + @Override public void afterTest() throws Exception { stopAllGrids(); mockServer.stop(); @@ -92,6 +96,7 @@ public void afterTest() throws Exception { /** * @throws Exception Test exception. */ + @Test public void testStatusesFilterEndpointOAuth1() throws Exception { try (IgniteDataStreamer dataStreamer = grid().dataStreamer(DEFAULT_CACHE_NAME)) { TwitterStreamerImpl streamer = newStreamerInstance(dataStreamer); diff --git a/modules/urideploy/src/test/java/org/apache/ignite/internal/GridTaskUriDeploymentDeadlockSelfTest.java b/modules/urideploy/src/test/java/org/apache/ignite/internal/GridTaskUriDeploymentDeadlockSelfTest.java index 22cfc5631d042..2f22f86384cc3 100644 --- a/modules/urideploy/src/test/java/org/apache/ignite/internal/GridTaskUriDeploymentDeadlockSelfTest.java +++ b/modules/urideploy/src/test/java/org/apache/ignite/internal/GridTaskUriDeploymentDeadlockSelfTest.java @@ -29,6 +29,9 @@ import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.spi.deployment.uri.UriDeploymentSpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.SECONDS; import static org.apache.ignite.events.EventType.EVT_NODE_JOINED; @@ -36,6 +39,7 @@ /** * Test to reproduce gg-2852. */ +@RunWith(JUnit4.class) public class GridTaskUriDeploymentDeadlockSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { @@ -63,6 +67,7 @@ public class GridTaskUriDeploymentDeadlockSelfTest extends GridCommonAbstractTes /** * @throws Exception If failed. */ + @Test public void testDeadlock() throws Exception { try { Ignite g = startGrid(1); @@ -100,4 +105,4 @@ public void testDeadlock() throws Exception { stopAllGrids(); } } -} \ No newline at end of file +} diff --git a/modules/urideploy/src/test/java/org/apache/ignite/p2p/GridP2PDisabledSelfTest.java b/modules/urideploy/src/test/java/org/apache/ignite/p2p/GridP2PDisabledSelfTest.java index c514a9402de69..65147b7a440fb 100644 --- a/modules/urideploy/src/test/java/org/apache/ignite/p2p/GridP2PDisabledSelfTest.java +++ b/modules/urideploy/src/test/java/org/apache/ignite/p2p/GridP2PDisabledSelfTest.java @@ -29,6 +29,9 @@ import org.apache.ignite.spi.deployment.uri.UriDeploymentSpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test what happens if peer class loading is disabled. @@ -38,6 +41,7 @@ */ @SuppressWarnings({"ProhibitedExceptionDeclared"}) @GridCommonTest(group = "P2P") +@RunWith(JUnit4.class) public class GridP2PDisabledSelfTest extends GridCommonAbstractTest { /** Task name. */ private static final String TASK_NAME = "org.apache.ignite.tests.p2p.P2PTestTaskExternalPath1"; @@ -172,6 +176,7 @@ private void checkGar() throws Exception { * * @throws Exception if error occur. */ + @Test public void testGarPrivateMode() throws Exception { depMode = DeploymentMode.PRIVATE; @@ -183,6 +188,7 @@ public void testGarPrivateMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testGarIsolatedMode() throws Exception { depMode = DeploymentMode.ISOLATED; @@ -194,6 +200,7 @@ public void testGarIsolatedMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testGarContinuousMode() throws Exception { depMode = DeploymentMode.CONTINUOUS; @@ -205,6 +212,7 @@ public void testGarContinuousMode() throws Exception { * * @throws Exception if error occur. */ + @Test public void testGarSharedMode() throws Exception { depMode = DeploymentMode.SHARED; diff --git a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentClassLoaderMultiThreadedSelfTest.java b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentClassLoaderMultiThreadedSelfTest.java index f4265b98e3c69..80b7016b8154a 100644 --- a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentClassLoaderMultiThreadedSelfTest.java +++ b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentClassLoaderMultiThreadedSelfTest.java @@ -23,14 +23,19 @@ import org.apache.ignite.testframework.config.GridTestProperties; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Grid URI deployment class loader self test. */ +@RunWith(JUnit4.class) public class GridUriDeploymentClassLoaderMultiThreadedSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testMultiThreadedClassLoading() throws Exception { for (int i = 0; i < 50; i++) doTest(); @@ -70,4 +75,4 @@ private void doTest() throws Exception { 500 ); } -} \ No newline at end of file +} diff --git a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentClassLoaderSelfTest.java b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentClassLoaderSelfTest.java index caa4851c2d50c..33ba125da3770 100644 --- a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentClassLoaderSelfTest.java +++ b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentClassLoaderSelfTest.java @@ -25,15 +25,20 @@ import org.apache.ignite.testframework.config.GridTestProperties; import org.apache.ignite.testframework.junits.spi.GridSpiTest; import org.apache.ignite.testframework.junits.spi.GridSpiTestConfig; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Grid URI deployment class loader test. */ @GridSpiTest(spi = UriDeploymentSpi.class, group = "Deployment SPI") +@RunWith(JUnit4.class) public class GridUriDeploymentClassLoaderSelfTest extends GridUriDeploymentAbstractSelfTest { /** * @throws Exception If failed. */ + @Test public void testNestedJarClassloading() throws Exception { ClassLoader ldr = getGarClassLoader(); @@ -44,6 +49,7 @@ public void testNestedJarClassloading() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClasspathResourceLoading() throws Exception { ClassLoader ldr = getGarClassLoader(); @@ -73,4 +79,4 @@ public List getUriList() { return Collections.singletonList(GridTestProperties.getProperty("ant.urideployment.gar.uri"). replace("EXTDATA", U.resolveIgnitePath("modules/extdata").getAbsolutePath())); } -} \ No newline at end of file +} diff --git a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentClassloaderRegisterSelfTest.java b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentClassloaderRegisterSelfTest.java index b4b6bb28f2165..c6105e9792808 100644 --- a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentClassloaderRegisterSelfTest.java +++ b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentClassloaderRegisterSelfTest.java @@ -36,11 +36,15 @@ import org.apache.ignite.testframework.junits.spi.GridSpiAbstractTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; import org.apache.ignite.testframework.junits.spi.GridSpiTestConfig; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for classloader registering. */ @GridSpiTest(spi = UriDeploymentSpi.class, group = "Deployment SPI") +@RunWith(JUnit4.class) public class GridUriDeploymentClassloaderRegisterSelfTest extends GridSpiAbstractTest { /** */ private static Map>>> tasks = @@ -87,6 +91,7 @@ private void checkUndeployed(Class> taskCls) { /** * @throws Exception If failed. */ + @Test public void testDeploy() throws Exception { Class> task = GridFileDeploymentTestTask.class; @@ -111,6 +116,7 @@ public void testDeploy() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRedeploy() throws Exception { // Test non-versioned redeploy. Class> t1 = GridFileDeploymentTestTask.class; @@ -151,4 +157,4 @@ private static class GridFileDeploymentTestTask extends ComputeTaskSplitAdapter< return null; } } -} \ No newline at end of file +} diff --git a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentConfigSelfTest.java b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentConfigSelfTest.java index 2dc6e9ecad793..2864b4d3d8760 100644 --- a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentConfigSelfTest.java +++ b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentConfigSelfTest.java @@ -20,18 +20,23 @@ import java.util.Collections; import org.apache.ignite.testframework.junits.spi.GridSpiAbstractConfigTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @GridSpiTest(spi = UriDeploymentSpi.class, group = "Deployment SPI") +@RunWith(JUnit4.class) public class GridUriDeploymentConfigSelfTest extends GridSpiAbstractConfigTest { /** * @throws Exception If failed. */ + @Test public void testNegativeConfig() throws Exception { checkNegativeSpiProperty(new UriDeploymentSpi(), "uriList", null); checkNegativeSpiProperty(new UriDeploymentSpi(), "uriList", Collections.singletonList("qwertyuiop"), false); checkNegativeSpiProperty(new UriDeploymentSpi(), "uriList", Collections.singletonList(null), false); } -} \ No newline at end of file +} diff --git a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentFileProcessorSelfTest.java b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentFileProcessorSelfTest.java index 2d0e7e6e8e702..4492100fb5554 100644 --- a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentFileProcessorSelfTest.java +++ b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentFileProcessorSelfTest.java @@ -26,15 +26,20 @@ import org.apache.ignite.testframework.junits.spi.GridSpiTestConfig; import org.apache.ignite.util.antgar.IgniteDeploymentGarAntTask; import org.apache.tools.ant.Project; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @GridSpiTest(spi = UriDeploymentSpi.class, group = "Deployment SPI") +@RunWith(JUnit4.class) public class GridUriDeploymentFileProcessorSelfTest extends GridUriDeploymentAbstractSelfTest { /** * @throws Exception If failed. */ + @Test public void testTaskCorrect() throws Exception { proceedTest("correct.gar", "ignite.xml", "org.apache.ignite.spi.deployment.uri.tasks.GridUriDeploymentTestTask0", true); @@ -43,6 +48,7 @@ public void testTaskCorrect() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTaskWithBrokenXML() throws Exception { proceedTest("broken.gar", "ignite.brokenxml", "brokenxml-task", false); } @@ -50,6 +56,7 @@ public void testTaskWithBrokenXML() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTaskWithEmptyXML() throws Exception { proceedTest("empty.gar", "ignite.empty", "emptyxml-task", false); } @@ -57,6 +64,7 @@ public void testTaskWithEmptyXML() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTaskWithIncorrectRefsXML() throws Exception { proceedTest("incorrefs.gar", "ignite.incorrefs", "incorrectref-task", false); } diff --git a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentMd5CheckSelfTest.java b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentMd5CheckSelfTest.java index 126e202cb475a..74512ecb98854 100644 --- a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentMd5CheckSelfTest.java +++ b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentMd5CheckSelfTest.java @@ -28,11 +28,15 @@ import org.apache.ignite.testframework.config.GridTestProperties; import org.apache.ignite.testframework.junits.spi.GridSpiTest; import org.apache.ignite.testframework.junits.spi.GridSpiTestConfig; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Redundancy for URI deployment test */ @GridSpiTest(spi = UriDeploymentSpi.class, group = "Deployment SPI") +@RunWith(JUnit4.class) public class GridUriDeploymentMd5CheckSelfTest extends GridUriDeploymentAbstractSelfTest { /** * Used to count number of unit undeployments. @@ -44,6 +48,7 @@ public class GridUriDeploymentMd5CheckSelfTest extends GridUriDeploymentAbstract * * @throws Exception if failed. */ + @Test public void testMd5FileCheck() throws Exception { undeployCntr.set(0); @@ -71,6 +76,7 @@ public void testMd5FileCheck() throws Exception { * * @throws Exception if failed. */ + @Test public void testMd5DirectoryCheck() throws Exception { undeployCntr.set(0); diff --git a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentMultiScannersErrorThrottlingTest.java b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentMultiScannersErrorThrottlingTest.java index 246ad80a5c2df..0d96ca05da3ae 100644 --- a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentMultiScannersErrorThrottlingTest.java +++ b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentMultiScannersErrorThrottlingTest.java @@ -22,15 +22,20 @@ import org.apache.ignite.internal.util.typedef.internal.LT; import org.apache.ignite.testframework.junits.spi.GridSpiTest; import org.apache.ignite.testframework.junits.spi.GridSpiTestConfig; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests error and warn messages throttling. */ @GridSpiTest(spi = UriDeploymentSpi.class, group = "Deployment SPI") +@RunWith(JUnit4.class) public class GridUriDeploymentMultiScannersErrorThrottlingTest extends GridUriDeploymentAbstractSelfTest { /** * @throws Exception If failed. */ + @Test public void testThrottling() throws Exception { LT.throttleTimeout(11000); diff --git a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentMultiScannersSelfTest.java b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentMultiScannersSelfTest.java index 1561ab4a21bf9..5263b5708446e 100644 --- a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentMultiScannersSelfTest.java +++ b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentMultiScannersSelfTest.java @@ -23,15 +23,20 @@ import org.apache.ignite.testframework.config.GridTestProperties; import org.apache.ignite.testframework.junits.spi.GridSpiTest; import org.apache.ignite.testframework.junits.spi.GridSpiTestConfig; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test URI deployment with multiple scanners. */ @GridSpiTest(spi = UriDeploymentSpi.class, group = "Deployment SPI") +@RunWith(JUnit4.class) public class GridUriDeploymentMultiScannersSelfTest extends GridUriDeploymentAbstractSelfTest { /** * @throws Exception If failed. */ + @Test public void testDeployment() throws Exception { checkTask("org.apache.ignite.spi.deployment.uri.tasks.GridUriDeploymentTestTask0"); } @@ -52,4 +57,4 @@ public List getUriList() { return uriList; } -} \ No newline at end of file +} diff --git a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentSimpleSelfTest.java b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentSimpleSelfTest.java index acd40f55d8aa0..1d4c5b3b781fe 100644 --- a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentSimpleSelfTest.java +++ b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentSimpleSelfTest.java @@ -33,11 +33,15 @@ import org.apache.ignite.testframework.junits.spi.GridSpiAbstractTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; import org.apache.ignite.testframework.junits.spi.GridSpiTestConfig; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @GridSpiTest(spi = UriDeploymentSpi.class, group = "Deployment SPI") +@RunWith(JUnit4.class) public class GridUriDeploymentSimpleSelfTest extends GridSpiAbstractTest { /** * @return List of URI to use as deployment source. @@ -52,6 +56,7 @@ public List getUriList() { /** * @throws Exception If failed. */ + @Test public void testSimpleDeploy() throws Exception { UriDeploymentSpi spi = getSpi(); @@ -71,6 +76,7 @@ public void testSimpleDeploy() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSimpleRedeploy() throws Exception { for (int i = 0; i < 100; i++) testSimpleDeploy(); @@ -79,6 +85,7 @@ public void testSimpleRedeploy() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSimpleDeployWithName() throws Exception { UriDeploymentSpi spi = getSpi(); @@ -98,6 +105,7 @@ public void testSimpleDeployWithName() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSimpleRedeployWithName() throws Exception { for (int i = 0; i < 100; i++) testSimpleDeployWithName(); @@ -106,6 +114,7 @@ public void testSimpleRedeployWithName() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSimpleDeployTwoTasks() throws Exception { UriDeploymentSpi spi = getSpi(); @@ -135,6 +144,7 @@ public void testSimpleDeployTwoTasks() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSimpleRedeployTwoTasks() throws Exception { for (int i = 0; i < 100; i++) testSimpleDeployTwoTasks(); @@ -182,4 +192,4 @@ private static class TestTaskWithName extends ComputeTaskAdapter return results.get(0).getData(); } } -} \ No newline at end of file +} diff --git a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/scanners/file/GridFileDeploymentSelfTest.java b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/scanners/file/GridFileDeploymentSelfTest.java index d307a322d2963..dca550754a4c3 100644 --- a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/scanners/file/GridFileDeploymentSelfTest.java +++ b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/scanners/file/GridFileDeploymentSelfTest.java @@ -24,11 +24,15 @@ import org.apache.ignite.testframework.config.GridTestProperties; import org.apache.ignite.testframework.junits.spi.GridSpiTest; import org.apache.ignite.testframework.junits.spi.GridSpiTestConfig; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test file protocol scanner. */ @GridSpiTest(spi = UriDeploymentSpi.class, group = "Deployment SPI") +@RunWith(JUnit4.class) public class GridFileDeploymentSelfTest extends GridUriDeploymentAbstractSelfTest { /** * @return List of URI to use as deployment source. @@ -43,6 +47,7 @@ public List getUriList() { * * @throws Exception If failed. */ + @Test public void testDeploymentFromFolder() throws Exception { checkTask("org.apache.ignite.spi.deployment.uri.tasks.GridUriDeploymentTestTask0"); checkTask("GridUriDeploymentTestWithNameTask0"); @@ -53,6 +58,7 @@ public void testDeploymentFromFolder() throws Exception { * * @throws Exception If failed. */ + @Test public void testDeploymentFromFile() throws Exception { checkTask("org.apache.ignite.spi.deployment.uri.tasks.GridUriDeploymentTestTask3"); checkTask("GridUriDeploymentTestWithNameTask3"); @@ -70,6 +76,7 @@ public void testDeploymentFromFile() throws Exception { * * @throws Exception If failed. */ + @Test public void testNoDescriptorDeployment() throws Exception { checkTask("org.apache.ignite.spi.deployment.uri.tasks.GridUriDeploymentTestTask4"); checkTask("GridUriDeploymentTestWithNameTask4"); @@ -85,6 +92,7 @@ public void testNoDescriptorDeployment() throws Exception { * * @throws Exception If failed. */ + @Test public void testBadDeployment() throws Exception { checkNoTask("org.apache.ignite.spi.deployment.uri.tasks.GridUriDeploymentAbstractTestTask"); @@ -109,6 +117,7 @@ public void testBadDeployment() throws Exception { * * @throws Exception If failed. */ + @Test public void testDependenceDeployment() throws Exception { checkTask("org.apache.ignite.spi.deployment.uri.tasks.GridUriDeploymentTestTask1"); getSpi().findResource("org.apache.ignite.spi.deployment.uri.tasks.GridUriDeploymentTestTask1") @@ -128,6 +137,7 @@ public void testDependenceDeployment() throws Exception { * * @throws Exception If failed. */ + @Test public void testNoDescriptorDependenceDeployment() throws Exception { checkTask("org.apache.ignite.spi.deployment.uri.tasks.GridUriDeploymentTestTask2"); getSpi().findResource("org.apache.ignite.spi.deployment.uri.tasks.GridUriDeploymentTestTask2") @@ -148,6 +158,7 @@ public void testNoDescriptorDependenceDeployment() throws Exception { * * @throws Exception If failed. */ + @Test public void testSignedDeployment() throws Exception { checkTask("org.apache.ignite.spi.deployment.uri.tasks.GridUriDeploymentTestTask5"); checkTask("GridUriDeploymentTestWithNameTask5"); diff --git a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/scanners/file/GridFileDeploymentUndeploySelfTest.java b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/scanners/file/GridFileDeploymentUndeploySelfTest.java index 843d80992ebec..9dea59f050fb8 100644 --- a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/scanners/file/GridFileDeploymentUndeploySelfTest.java +++ b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/scanners/file/GridFileDeploymentUndeploySelfTest.java @@ -27,11 +27,15 @@ import org.apache.ignite.testframework.junits.spi.GridSpiAbstractTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; import org.apache.ignite.testframework.junits.spi.GridSpiTestConfig; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests correct task undeployment after source file removing. */ @GridSpiTest(spi = UriDeploymentSpi.class, group = "Deployment SPI") +@RunWith(JUnit4.class) public class GridFileDeploymentUndeploySelfTest extends GridSpiAbstractTest { /** */ private static String tmpDirPath = System.getProperty("java.io.tmpdir") + '/' + UUID.randomUUID(); @@ -57,6 +61,7 @@ public class GridFileDeploymentUndeploySelfTest extends GridSpiAbstractTest getUriList() { return Collections.singletonList("file:///" + tmpDirPath); } -} \ No newline at end of file +} diff --git a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/scanners/http/GridHttpDeploymentSelfTest.java b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/scanners/http/GridHttpDeploymentSelfTest.java index 333f7070607a7..457ea70c66dcb 100644 --- a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/scanners/http/GridHttpDeploymentSelfTest.java +++ b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/scanners/http/GridHttpDeploymentSelfTest.java @@ -30,11 +30,15 @@ import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.ServerConnector; import org.eclipse.jetty.server.handler.ResourceHandler; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test http scanner. */ @GridSpiTest(spi = UriDeploymentSpi.class, group = "Deployment SPI") +@RunWith(JUnit4.class) public class GridHttpDeploymentSelfTest extends GridUriDeploymentAbstractSelfTest { /** Frequency */ private static final int FREQ = 5000; @@ -107,6 +111,7 @@ public class GridHttpDeploymentSelfTest extends GridUriDeploymentAbstractSelfTes /** * @throws Exception If failed. */ + @Test public void testDeployUndeploy2Files() throws Exception { String taskName = "org.apache.ignite.spi.deployment.uri.tasks.GridUriDeploymentTestTask3"; @@ -133,6 +138,7 @@ public void testDeployUndeploy2Files() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSameContantFiles() throws Exception { String taskName = "org.apache.ignite.spi.deployment.uri.tasks.GridUriDeploymentTestTask3"; diff --git a/modules/urideploy/src/test/java/org/apache/ignite/tools/GridToolsSelfTest.java b/modules/urideploy/src/test/java/org/apache/ignite/tools/GridToolsSelfTest.java index b9a3c7674e415..15fd7253bf389 100644 --- a/modules/urideploy/src/test/java/org/apache/ignite/tools/GridToolsSelfTest.java +++ b/modules/urideploy/src/test/java/org/apache/ignite/tools/GridToolsSelfTest.java @@ -30,15 +30,20 @@ import org.apache.ignite.util.antgar.IgniteDeploymentGarAntTask; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for Ant task generating GAR file. */ @GridCommonTest(group = "Tools") +@RunWith(JUnit4.class) public class GridToolsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCorrectAntGarTask() throws Exception { String tmpDirName = GridTestProperties.getProperty("ant.gar.tmpdir"); String srcDirName = GridTestProperties.getProperty("ant.gar.srcdir"); @@ -125,6 +130,7 @@ else if (entry != null && hasDescr) { /** * @throws Exception If failed. */ + @Test public void testAntGarTaskWithExternalP2PDescriptor() throws Exception { String tmpDirName = GridTestProperties.getProperty("ant.gar.tmpdir"); String srcDirName = GridTestProperties.getProperty("ant.gar.srcdir"); @@ -171,6 +177,7 @@ public void testAntGarTaskWithExternalP2PDescriptor() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAntGarTaskWithDoubleP2PDescriptor() throws Exception { String tmpDirName = GridTestProperties.getProperty("ant.gar.tmpdir"); String srcDirName = GridTestProperties.getProperty("ant.gar.srcdir"); @@ -221,6 +228,7 @@ public void testAntGarTaskWithDoubleP2PDescriptor() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAntGarTaskWithDirDescriptor() throws Exception { String tmpDirName = GridTestProperties.getProperty("ant.gar.tmpdir"); String srcDirName = GridTestProperties.getProperty("ant.gar.srcdir"); @@ -265,6 +273,7 @@ public void testAntGarTaskWithDirDescriptor() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAntGarTaskWithNullDescriptor() throws Exception { String tmpDirName = GridTestProperties.getProperty("ant.gar.tmpdir"); String srcDirName = GridTestProperties.getProperty("ant.gar.srcdir"); @@ -308,6 +317,7 @@ public void testAntGarTaskWithNullDescriptor() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAntGarTaskWithFileBaseDir() throws Exception { String tmpDirName = GridTestProperties.getProperty("ant.gar.tmpdir"); String srcDirName = GridTestProperties.getProperty("ant.gar.srcdir"); @@ -352,6 +362,7 @@ public void testAntGarTaskWithFileBaseDir() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAntGarTaskToString() throws Exception { String tmpDirName = GridTestProperties.getProperty("ant.gar.tmpdir"); String srcDirName = GridTestProperties.getProperty("ant.gar.srcdir"); @@ -384,4 +395,4 @@ public void testAntGarTaskToString() throws Exception { garTask.toString(); } -} \ No newline at end of file +} diff --git a/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionSelfTest.java b/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionSelfTest.java index 269b27320da36..dafcea6769234 100644 --- a/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionSelfTest.java +++ b/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionSelfTest.java @@ -52,12 +52,16 @@ import org.eclipse.jetty.servlet.ServletHolder; import org.eclipse.jetty.webapp.WebAppContext; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_PUT; /** * Tests the correctness of web sessions caching functionality. */ +@RunWith(JUnit4.class) public class WebSessionSelfTest extends GridCommonAbstractTest { /** Port for test Jetty server. */ private static final int TEST_JETTY_PORT = 49090; @@ -88,6 +92,7 @@ protected boolean keepBinary() { /** * @throws Exception If failed. */ + @Test public void testSingleRequest() throws Exception { testSingleRequest("/modules/core/src/test/config/websession/example-cache.xml"); } @@ -96,6 +101,7 @@ public void testSingleRequest() throws Exception { * @throws Exception If failed. */ @IgniteIgnore("https://issues.apache.org/jira/browse/IGNITE-3663") + @Test public void testSessionRenewalDuringLogin() throws Exception { testSessionRenewalDuringLogin("/modules/core/src/test/config/websession/example-cache.xml"); } @@ -103,6 +109,7 @@ public void testSessionRenewalDuringLogin() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSingleRequestMetaInf() throws Exception { testSingleRequest("ignite-webapp-config.xml"); } @@ -110,6 +117,7 @@ public void testSingleRequestMetaInf() throws Exception { /** * @throws Exception If failed. */ + @Test public void testImplicitlyAttributeModification() throws Exception { testImplicitlyModification("ignite-webapp-config.xml"); } @@ -117,6 +125,7 @@ public void testImplicitlyAttributeModification() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientReconnectRequest() throws Exception { testClientReconnectRequest("/modules/core/src/test/config/websession/example-cache.xml", "/modules/core/src/test/config/websession/example-cache2.xml", @@ -477,6 +486,7 @@ private void testSessionRenewalDuringLogin(String cfg) throws Exception { * * @throws Exception Exception If failed. */ + @Test public void testInvalidatedSession() throws Exception { String invalidatedSesId; Server srv = null; @@ -594,6 +604,7 @@ public void testInvalidatedSession() throws Exception { * * @throws Exception Exception If failed. */ + @Test public void testChangeSessionId() throws Exception { String newWebSesId; Server srv = null; @@ -698,6 +709,7 @@ public void testChangeSessionId() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRestarts() throws Exception { final AtomicReference sesIdRef = new AtomicReference<>(); diff --git a/modules/yarn/src/test/java/org/apache/ignite/yarn/IgniteApplicationMasterSelfTest.java b/modules/yarn/src/test/java/org/apache/ignite/yarn/IgniteApplicationMasterSelfTest.java index 6e82298edff53..b3f49f3bb931e 100644 --- a/modules/yarn/src/test/java/org/apache/ignite/yarn/IgniteApplicationMasterSelfTest.java +++ b/modules/yarn/src/test/java/org/apache/ignite/yarn/IgniteApplicationMasterSelfTest.java @@ -51,10 +51,14 @@ import org.apache.hadoop.yarn.client.api.NMClient; import org.apache.hadoop.yarn.client.api.async.AMRMClientAsync; import org.apache.hadoop.yarn.exceptions.YarnException; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Application master tests. */ +@RunWith(JUnit4.class) public class IgniteApplicationMasterSelfTest extends TestCase { /** */ private ApplicationMaster appMaster; @@ -82,6 +86,7 @@ public class IgniteApplicationMasterSelfTest extends TestCase { /** * @throws Exception If failed. */ + @Test public void testContainerAllocate() throws Exception { appMaster.setRmClient(rmMock); appMaster.setNmClient(new NMMock()); @@ -103,12 +108,13 @@ public void testContainerAllocate() throws Exception { assertEquals(1024, req.getCapability().getMemory()); } } - + /** * Tests whether memory overhead is allocated within container memory. * * @throws Exception If failed. */ + @Test public void testMemoryOverHeadAllocation() throws Exception { appMaster.setRmClient(rmMock); appMaster.setNmClient(new NMMock()); @@ -159,6 +165,7 @@ public void testMemoryOverHeadPreventAllocation() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClusterResource() throws Exception { rmMock.availableRes(new MockResource(1024, 2)); @@ -181,6 +188,7 @@ public void testClusterResource() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClusterAllocatedResource() throws Exception { rmMock.availableRes(new MockResource(1024, 2)); @@ -213,6 +221,7 @@ public void testClusterAllocatedResource() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStartReleaseContainer() throws Exception { rmMock.availableRes(new MockResource(1024, 2)); @@ -246,6 +255,7 @@ public void testStartReleaseContainer() throws Exception { /** * @throws Exception If failed. */ + @Test public void testHostnameConstraint() throws Exception { rmMock.availableRes(new MockResource(1024, 2)); @@ -274,6 +284,7 @@ public void testHostnameConstraint() throws Exception { /** * @throws Exception If failed. */ + @Test public void testContainerEnvironment() throws Exception { props.memoryPerNode(1001); props.memoryOverHeadPerNode(2002); @@ -619,4 +630,4 @@ public MockFileSystem() { return null; } } -} \ No newline at end of file +} diff --git a/modules/zeromq/src/test/java/org/apache/ignite/stream/zeromq/IgniteZeroMqStreamerTest.java b/modules/zeromq/src/test/java/org/apache/ignite/stream/zeromq/IgniteZeroMqStreamerTest.java index 099212691366b..81441a74cdfcc 100644 --- a/modules/zeromq/src/test/java/org/apache/ignite/stream/zeromq/IgniteZeroMqStreamerTest.java +++ b/modules/zeromq/src/test/java/org/apache/ignite/stream/zeromq/IgniteZeroMqStreamerTest.java @@ -27,6 +27,9 @@ import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.zeromq.ZMQ; import static org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_PUT; @@ -34,6 +37,7 @@ /** * Tests {@link IgniteZeroMqStreamer}. */ +@RunWith(JUnit4.class) public class IgniteZeroMqStreamerTest extends GridCommonAbstractTest { /** Cache entries count. */ private static final int CACHE_ENTRY_COUNT = 1000; @@ -65,6 +69,7 @@ public IgniteZeroMqStreamerTest() { /** * @throws Exception Test exception. */ + @Test public void testZeroMqPairSocket() throws Exception { try (IgniteDataStreamer dataStreamer = grid().dataStreamer(DEFAULT_CACHE_NAME)) { try (IgniteZeroMqStreamer streamer = newStreamerInstance( @@ -77,6 +82,7 @@ public void testZeroMqPairSocket() throws Exception { /** * @throws Exception Test exception. */ + @Test public void testZeroMqSubSocketMultipart() throws Exception { try (IgniteDataStreamer dataStreamer = grid().dataStreamer(DEFAULT_CACHE_NAME)) { try (IgniteZeroMqStreamer streamer = newStreamerInstance( @@ -90,6 +96,7 @@ public void testZeroMqSubSocketMultipart() throws Exception { /** * @throws Exception Test exception. */ + @Test public void testZeroMqSubSocket() throws Exception { try (IgniteDataStreamer dataStreamer = grid().dataStreamer(DEFAULT_CACHE_NAME)) { try (IgniteZeroMqStreamer streamer = newStreamerInstance( @@ -102,6 +109,7 @@ public void testZeroMqSubSocket() throws Exception { /** * @throws Exception Test exception. */ + @Test public void testZeroMqPullSocket() throws Exception { try (IgniteDataStreamer dataStreamer = grid().dataStreamer(DEFAULT_CACHE_NAME)) { try (IgniteZeroMqStreamer streamer = newStreamerInstance( diff --git a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/zk/ZookeeperIpFinderTest.java b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/zk/ZookeeperIpFinderTest.java index ec5630f8a3209..1a7f8d4ff921f 100644 --- a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/zk/ZookeeperIpFinderTest.java +++ b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/zk/ZookeeperIpFinderTest.java @@ -37,13 +37,17 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Rule; +import org.junit.Test; import org.junit.rules.Timeout; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for {@link TcpDiscoveryZookeeperIpFinder}. * * @author Raul Kripalani */ +@RunWith(JUnit4.class) public class ZookeeperIpFinderTest extends GridCommonAbstractTest { /** Per test timeout */ @Rule @@ -142,6 +146,7 @@ else if (igniteInstanceName.equals(getTestIgniteInstanceName(1))) { /** * @throws Exception If failed. */ + @Test public void testOneIgniteNodeIsAlone() throws Exception { startGrid(0); @@ -153,6 +158,7 @@ public void testOneIgniteNodeIsAlone() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTwoIgniteNodesFindEachOther() throws Exception { // start one node startGrid(0); @@ -176,6 +182,7 @@ public void testTwoIgniteNodesFindEachOther() throws Exception { /** * @throws Exception If failed. */ + @Test public void testThreeNodesWithThreeDifferentConfigMethods() throws Exception { // start one node startGrid(0); @@ -207,6 +214,7 @@ public void testThreeNodesWithThreeDifferentConfigMethods() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFourNodesStartingAndStopping() throws Exception { // start one node startGrid(0); @@ -254,6 +262,7 @@ public void testFourNodesStartingAndStopping() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFourNodesWithDuplicateRegistrations() throws Exception { allowDuplicateRegistrations = true; @@ -277,6 +286,7 @@ public void testFourNodesWithDuplicateRegistrations() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFourNodesWithNoDuplicateRegistrations() throws Exception { allowDuplicateRegistrations = false; @@ -300,6 +310,7 @@ public void testFourNodesWithNoDuplicateRegistrations() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFourNodesRestartLastSeveralTimes() throws Exception { allowDuplicateRegistrations = false; @@ -336,6 +347,7 @@ public void testFourNodesRestartLastSeveralTimes() throws Exception { /** * @throws Exception If failed. */ + @Test public void testFourNodesKillRestartZookeeper() throws Exception { allowDuplicateRegistrations = false; diff --git a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/IgniteCacheEntryListenerWithZkDiscoAtomicTest.java b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/IgniteCacheEntryListenerWithZkDiscoAtomicTest.java index 754a6bf05b10a..689daae4528ad 100644 --- a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/IgniteCacheEntryListenerWithZkDiscoAtomicTest.java +++ b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/IgniteCacheEntryListenerWithZkDiscoAtomicTest.java @@ -17,6 +17,9 @@ package org.apache.ignite.spi.discovery.zk; import org.apache.ignite.internal.processors.cache.IgniteCacheEntryListenerAtomicTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Class is added to mute {@link #testConcurrentRegisterDeregister} test in ZooKeeper suite @@ -24,8 +27,10 @@ * * When slow down is tracked down and fixed this class can be replaced back with its parent. */ +@RunWith(JUnit4.class) public class IgniteCacheEntryListenerWithZkDiscoAtomicTest extends IgniteCacheEntryListenerAtomicTest { /** {@inheritDoc} */ + @Test @Override public void testConcurrentRegisterDeregister() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-8109"); } diff --git a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySuitePreprocessorTest.java b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySuitePreprocessorTest.java index 28cf17f017c42..0f9481bb5ea29 100644 --- a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySuitePreprocessorTest.java +++ b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySuitePreprocessorTest.java @@ -27,6 +27,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.config.GridTestProperties; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Sanity test verifying that configuration callback specified via @@ -34,6 +37,7 @@ *

    * This test should be run as part of {@link ZookeeperDiscoverySpiTestSuite2}. */ +@RunWith(JUnit4.class) public class ZookeeperDiscoverySuitePreprocessorTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -62,6 +66,7 @@ public class ZookeeperDiscoverySuitePreprocessorTest extends GridCommonAbstractT /** * @throws Exception If failed. */ + @Test public void testSpiConfigurationIsChanged() throws Exception { startGrid(0); diff --git a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperClientTest.java b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperClientTest.java index e3b91c74889f7..70edebbc6ba07 100644 --- a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperClientTest.java +++ b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperClientTest.java @@ -39,10 +39,14 @@ import org.apache.zookeeper.ZooDefs; import org.apache.zookeeper.ZooKeeper; import org.apache.zookeeper.data.Stat; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class ZookeeperClientTest extends GridCommonAbstractTest { /** */ private static final int SES_TIMEOUT = 60_000; @@ -69,6 +73,7 @@ private ZookeeperClient createClient(int sesTimeout) throws Exception { /** * @throws Exception If failed. */ + @Test public void testSaveLargeValue() throws Exception { startZK(1); @@ -100,6 +105,7 @@ public void testSaveLargeValue() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClose() throws Exception { startZK(1); @@ -121,6 +127,7 @@ public void testClose() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCreateAll() throws Exception { startZK(1); @@ -142,6 +149,7 @@ public void testCreateAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCreateAllRequestOverflow() throws Exception { startZK(1); @@ -164,6 +172,7 @@ public void testCreateAllRequestOverflow() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCreateAllNodeExists() throws Exception { startZK(1); @@ -187,6 +196,7 @@ public void testCreateAllNodeExists() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeleteAll() throws Exception { startZK(1); @@ -209,6 +219,7 @@ public void testDeleteAll() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeleteAllRequestOverflow() throws Exception { startZK(1); @@ -235,6 +246,7 @@ public void testDeleteAllRequestOverflow() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeleteAllNoNode() throws Exception { startZK(1); @@ -252,6 +264,7 @@ public void testDeleteAllNoNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConnectionLoss1() throws Exception { ZookeeperClient client = new ZookeeperClient(log, "localhost:2200", 3000, null); @@ -268,6 +281,7 @@ public void testConnectionLoss1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConnectionLoss2() throws Exception { startZK(1); @@ -290,6 +304,7 @@ public void testConnectionLoss2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConnectionLoss3() throws Exception { startZK(1); @@ -318,6 +333,7 @@ public void testConnectionLoss3() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConnectionLoss4() throws Exception { startZK(1); @@ -355,6 +371,7 @@ public void testConnectionLoss4() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReconnect1() throws Exception { startZK(1); @@ -386,6 +403,7 @@ public void testReconnect1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReconnect1_Callback() throws Exception { startZK(1); @@ -428,6 +446,7 @@ public void testReconnect1_Callback() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReconnect1_InCallback() throws Exception { startZK(1); @@ -474,6 +493,7 @@ public void testReconnect1_InCallback() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReconnect2() throws Exception { startZK(1); @@ -489,6 +509,7 @@ public void testReconnect2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReconnect3() throws Exception { startZK(3); @@ -512,6 +533,7 @@ public void testReconnect3() throws Exception { /** * @throws Exception If failed. */ + @Test public void testReconnect4() throws Exception { startZK(3); diff --git a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoverySpiSaslFailedAuthTest.java b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoverySpiSaslFailedAuthTest.java index c90f6d4c846c1..61d73828787f1 100644 --- a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoverySpiSaslFailedAuthTest.java +++ b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoverySpiSaslFailedAuthTest.java @@ -18,16 +18,21 @@ import org.apache.zookeeper.client.ZooKeeperSaslClient; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_ZOOKEEPER_DISCOVERY_MAX_RETRY_COUNT; /** * */ +@RunWith(JUnit4.class) public class ZookeeperDiscoverySpiSaslFailedAuthTest extends ZookeeperDiscoverySpiSaslAuthAbstractTest { /** * @throws Exception If failed. */ + @Test public void testIgniteNodeWithInvalidPasswordFailsToJoin() throws Exception { System.setProperty(ZooKeeperSaslClient.LOGIN_CONTEXT_NAME_KEY, "InvalidZookeeperClient"); diff --git a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoverySpiSaslSuccessfulAuthTest.java b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoverySpiSaslSuccessfulAuthTest.java index 5ee0a4300af7a..065e4f566062e 100644 --- a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoverySpiSaslSuccessfulAuthTest.java +++ b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoverySpiSaslSuccessfulAuthTest.java @@ -17,14 +17,19 @@ package org.apache.ignite.spi.discovery.zk.internal; import org.apache.zookeeper.client.ZooKeeperSaslClient; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class ZookeeperDiscoverySpiSaslSuccessfulAuthTest extends ZookeeperDiscoverySpiSaslAuthAbstractTest { /** * @throws Exception If failed. */ + @Test public void testIgniteNodesWithValidPasswordSuccessfullyJoins() throws Exception { System.setProperty(ZooKeeperSaslClient.LOGIN_CONTEXT_NAME_KEY, "ValidZookeeperClient"); @@ -37,6 +42,7 @@ public void testIgniteNodesWithValidPasswordSuccessfullyJoins() throws Exception /** * @throws Exception If failed. */ + @Test public void testIgniteNodeWithoutSaslConfigurationSuccessfullyJoins() throws Exception { //clearing SASL-related system properties that were set in beforeTest clearSaslSystemProperties(); diff --git a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoverySpiTest.java b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoverySpiTest.java index 60f5fd7e6d31d..c57e956b17ee8 100644 --- a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoverySpiTest.java +++ b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoverySpiTest.java @@ -140,6 +140,9 @@ import org.apache.zookeeper.server.quorum.QuorumPeer; import org.jetbrains.annotations.Nullable; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.SECONDS; @@ -162,6 +165,7 @@ * */ @SuppressWarnings("deprecation") +@RunWith(JUnit4.class) public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** */ private static final String IGNITE_ZK_ROOT = ZookeeperDiscoverySpi.DFLT_ROOT_PATH; @@ -561,6 +565,7 @@ private void checkInternalStructuresCleanup() throws Exception { * For more information about the problem refer to * IGNITE-8857. */ + @Test public void testNodeAttributesNotReferencingZookeeperClusterNode() throws Exception { userAttrs = new HashMap<>(); userAttrs.put("testAttr", "testAttr"); @@ -588,6 +593,7 @@ public void testNodeAttributesNotReferencingZookeeperClusterNode() throws Except /** * @throws Exception If failed. */ + @Test public void testZkRootNotExists() throws Exception { zkRootPath = "/a/b/c"; @@ -607,6 +613,7 @@ public void testZkRootNotExists() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMetadataUpdate() throws Exception { startGrid(0); @@ -623,6 +630,7 @@ public void testMetadataUpdate() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNodeAddresses() throws Exception { startGridsMultiThreaded(3); @@ -648,6 +656,7 @@ public void testNodeAddresses() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSetConsistentId() throws Exception { startGridsMultiThreaded(3); @@ -673,6 +682,7 @@ public void testSetConsistentId() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDefaultConsistentId() throws Exception { dfltConsistenId = true; @@ -697,6 +707,7 @@ public void testDefaultConsistentId() throws Exception { /** * @throws Exception if failed. */ + @Test public void testMbean() throws Exception { startGrids(3); @@ -729,6 +740,7 @@ public void testMbean() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientNodesStatus() throws Exception { startGrid(0); @@ -781,6 +793,7 @@ public void testClientNodesStatus() throws Exception { /** * @throws Exception If failed. */ + @Test public void testLocalAuthenticationFails() throws Exception { auth = ZkTestNodeAuthenticator.factory(getTestIgniteInstanceName(0)); @@ -806,6 +819,7 @@ public void testLocalAuthenticationFails() throws Exception { /** * @throws Exception If failed. */ + @Test public void testAuthentication() throws Exception { auth = ZkTestNodeAuthenticator.factory(getTestIgniteInstanceName(1), getTestIgniteInstanceName(5)); @@ -914,6 +928,7 @@ private void checkTestSecuritySubject(int expNodes) throws Exception { /** * @throws Exception If failed. */ + @Test public void testStopNode_1() throws Exception { startGrids(5); @@ -931,6 +946,7 @@ public void testStopNode_1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCustomEventsSimple1_SingleNode() throws Exception { ackEveryEventSystemProperty(); @@ -944,6 +960,7 @@ public void testCustomEventsSimple1_SingleNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCustomEventsSimple1_5_Nodes() throws Exception { ackEveryEventSystemProperty(); @@ -959,6 +976,7 @@ public void testCustomEventsSimple1_5_Nodes() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCustomEvents_FastStopProcess_1() throws Exception { customEvents_FastStopProcess(1, 0); } @@ -966,6 +984,7 @@ public void testCustomEvents_FastStopProcess_1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCustomEvents_FastStopProcess_2() throws Exception { customEvents_FastStopProcess(5, 5); } @@ -1140,6 +1159,7 @@ private void registerTestEventListeners(Ignite node, * * @see IGNITE-9040 ticket for more context of the test. */ + @Test public void testStopNodeOnSegmentaion() throws Exception { try { System.setProperty("IGNITE_WAL_LOG_TX_RECORDS", "true"); @@ -1241,6 +1261,7 @@ private void waitForNodeStop(String name) throws Exception { /** * @throws Exception If failed. */ + @Test public void testSegmentation1() throws Exception { sesTimeout = 2000; testSockNio = true; @@ -1278,6 +1299,7 @@ public void testSegmentation1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSegmentation2() throws Exception { sesTimeout = 2000; @@ -1308,6 +1330,7 @@ public void testSegmentation2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testSegmentation3() throws Exception { sesTimeout = 5000; @@ -1348,6 +1371,7 @@ public void testSegmentation3() throws Exception { /** * @throws Exception If failed. */ + @Test public void testQuorumRestore() throws Exception { sesTimeout = 60_000; @@ -1385,6 +1409,7 @@ public void testQuorumRestore() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConnectionRestore1() throws Exception { testSockNio = true; @@ -1400,6 +1425,7 @@ public void testConnectionRestore1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConnectionRestore2() throws Exception { testSockNio = true; @@ -1415,6 +1441,7 @@ public void testConnectionRestore2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConnectionRestore_NonCoordinator1() throws Exception { connectionRestore_NonCoordinator(false); } @@ -1422,6 +1449,7 @@ public void testConnectionRestore_NonCoordinator1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConnectionRestore_NonCoordinator2() throws Exception { connectionRestore_NonCoordinator(true); } @@ -1481,6 +1509,7 @@ private void connectionRestore_NonCoordinator(boolean failWhenDisconnected) thro /** * @throws Exception If failed. */ + @Test public void testConnectionRestore_Coordinator1() throws Exception { connectionRestore_Coordinator(1, 1, 0); } @@ -1488,6 +1517,7 @@ public void testConnectionRestore_Coordinator1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConnectionRestore_Coordinator1_1() throws Exception { connectionRestore_Coordinator(1, 1, 1); } @@ -1495,6 +1525,7 @@ public void testConnectionRestore_Coordinator1_1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConnectionRestore_Coordinator2() throws Exception { connectionRestore_Coordinator(1, 3, 0); } @@ -1502,6 +1533,7 @@ public void testConnectionRestore_Coordinator2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConnectionRestore_Coordinator3() throws Exception { connectionRestore_Coordinator(3, 3, 0); } @@ -1509,6 +1541,7 @@ public void testConnectionRestore_Coordinator3() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConnectionRestore_Coordinator4() throws Exception { connectionRestore_Coordinator(3, 3, 1); } @@ -1672,6 +1705,7 @@ private static void waitNoAliveZkNodes(final IgniteLogger log, /** * @throws Exception If failed. */ + @Test public void testConcurrentStartWithClient() throws Exception { final int NODES = 20; @@ -1707,6 +1741,7 @@ public void testConcurrentStartWithClient() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConcurrentStart() throws Exception { final int NODES = 20; @@ -1742,6 +1777,7 @@ public void testConcurrentStart() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConcurrentStartStop1() throws Exception { concurrentStartStop(1); } @@ -1749,6 +1785,7 @@ public void testConcurrentStartStop1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConcurrentStartStop2() throws Exception { concurrentStartStop(5); } @@ -1756,6 +1793,7 @@ public void testConcurrentStartStop2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConcurrentStartStop2_EventsThrottle() throws Exception { System.setProperty(ZookeeperDiscoveryImpl.IGNITE_ZOOKEEPER_DISCOVERY_SPI_MAX_EVTS, "1"); @@ -1819,6 +1857,7 @@ private void concurrentStartStop(final int initNodes) throws Exception { /** * @throws Exception If failed. */ + @Test public void testClusterRestart() throws Exception { startGridsMultiThreaded(3, false); @@ -1834,6 +1873,7 @@ public void testClusterRestart() throws Exception { /** * @throws Exception If failed. */ + @Test public void testConnectionRestore4() throws Exception { testSockNio = true; @@ -1849,6 +1889,7 @@ public void testConnectionRestore4() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStartStop_1_Node() throws Exception { startGrid(0); @@ -1860,6 +1901,7 @@ public void testStartStop_1_Node() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRestarts_2_Nodes() throws Exception { startGrid(0); @@ -1877,6 +1919,7 @@ public void testRestarts_2_Nodes() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStartStop_2_Nodes_WithCache() throws Exception { startGrids(2); @@ -1898,6 +1941,7 @@ public void testStartStop_2_Nodes_WithCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStartStop_2_Nodes() throws Exception { ackEveryEventSystemProperty(); @@ -1920,6 +1964,7 @@ public void testStartStop_2_Nodes() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMultipleClusters() throws Exception { Ignite c0 = startGrid(0); @@ -1974,6 +2019,7 @@ private void checkNodesNumber(final Ignite node, final int expNodes) throws Exce /** * @throws Exception If failed. */ + @Test public void testStartStop1() throws Exception { ackEveryEventSystemProperty(); @@ -2004,6 +2050,7 @@ public void testStartStop1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStartStop3() throws Exception { startGrids(4); @@ -2019,6 +2066,7 @@ public void testStartStop3() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStartStop4() throws Exception { startGrids(6); @@ -2047,6 +2095,7 @@ public void testStartStop4() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStartStop2() throws Exception { startGridsMultiThreaded(10, false); @@ -2066,6 +2115,7 @@ public void testStartStop2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStartStopWithClients() throws Exception { final int SRVS = 3; @@ -2097,6 +2147,7 @@ public void testStartStopWithClients() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTopologyChangeMultithreaded() throws Exception { topologyChangeWithRestarts(false, false); } @@ -2104,6 +2155,7 @@ public void testTopologyChangeMultithreaded() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTopologyChangeMultithreaded_RestartZk() throws Exception { try { topologyChangeWithRestarts(true, false); @@ -2118,6 +2170,7 @@ public void testTopologyChangeMultithreaded_RestartZk() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTopologyChangeMultithreaded_RestartZk_CloseClients() throws Exception { try { topologyChangeWithRestarts(true, true); @@ -2233,6 +2286,7 @@ private void topologyChangeWithRestarts(boolean restartZk, boolean closeClientSo /** * @throws Exception If failed. */ + @Test public void testRandomTopologyChanges() throws Exception { randomTopologyChanges(false, false); } @@ -2308,6 +2362,7 @@ private void checkZkNodesCleanup() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRandomTopologyChanges_RestartZk() throws Exception { randomTopologyChanges(true, false); } @@ -2315,6 +2370,7 @@ public void testRandomTopologyChanges_RestartZk() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRandomTopologyChanges_CloseClients() throws Exception { randomTopologyChanges(false, true); } @@ -2322,6 +2378,7 @@ public void testRandomTopologyChanges_CloseClients() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeployService1() throws Exception { startGridsMultiThreaded(3); @@ -2331,6 +2388,7 @@ public void testDeployService1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeployService2() throws Exception { clientMode(false); @@ -2346,6 +2404,7 @@ public void testDeployService2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeployService3() throws Exception { IgniteInternalFuture fut = GridTestUtils.runAsync(new Callable() { @Override public Object call() throws Exception { @@ -2371,6 +2430,7 @@ public void testDeployService3() throws Exception { * * @throws Exception If failed. */ + @Test public void testLargeUserAttribute1() throws Exception { initLargeAttribute(); @@ -2392,6 +2452,7 @@ public void testLargeUserAttribute1() throws Exception { * * @throws Exception If failed. */ + @Test public void testLargeUserAttribute2() throws Exception { startGrid(0); @@ -2410,6 +2471,7 @@ public void testLargeUserAttribute2() throws Exception { * * @throws Exception If failed. */ + @Test public void testLargeUserAttribute3() throws Exception { Set idxs = ThreadLocalRandom.current() .ints(0, 10) @@ -2451,6 +2513,7 @@ private void initLargeAttribute() { /** * @throws Exception If failed. */ + @Test public void testLargeCustomEvent() throws Exception { Ignite srv0 = startGrid(0); @@ -2482,6 +2545,7 @@ public void testLargeCustomEvent() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientReconnectSessionExpire1_1() throws Exception { clientReconnectSessionExpire(false); } @@ -2489,6 +2553,7 @@ public void testClientReconnectSessionExpire1_1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testClientReconnectSessionExpire1_2() throws Exception { clientReconnectSessionExpire(true); } @@ -2518,6 +2583,7 @@ private void clientReconnectSessionExpire(boolean closeSock) throws Exception { /** * @throws Exception If failed. */ + @Test public void testForceClientReconnect() throws Exception { final int SRVS = 3; @@ -2543,6 +2609,7 @@ public void testForceClientReconnect() throws Exception { /** * @throws Exception If failed. */ + @Test public void testForcibleClientFail() throws Exception { final int SRVS = 3; @@ -2568,6 +2635,7 @@ public void testForcibleClientFail() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDuplicatedNodeId() throws Exception { UUID nodeId0 = nodeId = UUID.randomUUID(); @@ -2610,6 +2678,7 @@ public void testDuplicatedNodeId() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPing() throws Exception { sesTimeout = 5000; @@ -2651,6 +2720,7 @@ public void testPing() throws Exception { /** * @throws Exception If failed. */ + @Test public void testWithPersistence1() throws Exception { startWithPersistence(false); } @@ -2658,6 +2728,7 @@ public void testWithPersistence1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testWithPersistence2() throws Exception { startWithPersistence(true); } @@ -2665,6 +2736,7 @@ public void testWithPersistence2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNoOpCommunicationFailureResolve_1() throws Exception { communicationFailureResolve_Simple(2); } @@ -2672,6 +2744,7 @@ public void testNoOpCommunicationFailureResolve_1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNoOpCommunicationErrorResolve_2() throws Exception { communicationFailureResolve_Simple(10); } @@ -2715,6 +2788,7 @@ private void communicationFailureResolve_Simple(int nodes) throws Exception { * * @throws Exception If failed. */ + @Test public void testNoOpCommunicationErrorResolve_3() throws Exception { sesTimeout = 2000; commFailureRslvr = NoOpCommunicationFailureResolver.FACTORY; @@ -2761,6 +2835,7 @@ public void testNoOpCommunicationErrorResolve_3() throws Exception { * * @throws Exception If failed. */ + @Test public void testNoOpCommunicationErrorResolve_4() throws Exception { testCommSpi = true; @@ -2803,6 +2878,7 @@ public void testNoOpCommunicationErrorResolve_4() throws Exception { * * @throws Exception If failed. */ + @Test public void testNoOpCommunicationErrorResolve_5() throws Exception { testCommSpi = true; @@ -2864,6 +2940,7 @@ public void testNoOpCommunicationErrorResolve_5() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCommunicationErrorResolve_KillNode_1() throws Exception { communicationFailureResolve_KillNodes(2, Collections.singleton(2L)); } @@ -2871,6 +2948,7 @@ public void testCommunicationErrorResolve_KillNode_1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCommunicationErrorResolve_KillNode_2() throws Exception { communicationFailureResolve_KillNodes(3, Collections.singleton(2L)); } @@ -2878,6 +2956,7 @@ public void testCommunicationErrorResolve_KillNode_2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCommunicationErrorResolve_KillNode_3() throws Exception { communicationFailureResolve_KillNodes(10, Arrays.asList(2L, 4L, 6L)); } @@ -2885,6 +2964,7 @@ public void testCommunicationErrorResolve_KillNode_3() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCommunicationErrorResolve_KillCoordinator_1() throws Exception { communicationFailureResolve_KillNodes(2, Collections.singleton(1L)); } @@ -2892,6 +2972,7 @@ public void testCommunicationErrorResolve_KillCoordinator_1() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCommunicationErrorResolve_KillCoordinator_2() throws Exception { communicationFailureResolve_KillNodes(3, Collections.singleton(1L)); } @@ -2899,6 +2980,7 @@ public void testCommunicationErrorResolve_KillCoordinator_2() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCommunicationErrorResolve_KillCoordinator_3() throws Exception { communicationFailureResolve_KillNodes(10, Arrays.asList(1L, 4L, 6L)); } @@ -2906,6 +2988,7 @@ public void testCommunicationErrorResolve_KillCoordinator_3() throws Exception { /** * @throws Exception If failed. */ + @Test public void testCommunicationErrorResolve_KillCoordinator_4() throws Exception { communicationFailureResolve_KillNodes(10, Arrays.asList(1L, 2L, 3L)); } @@ -2965,6 +3048,7 @@ private void communicationFailureResolve_KillNodes(int startNodes, Collection Date: Fri, 7 Dec 2018 22:26:47 +0300 Subject: [PATCH 075/176] IGNITE-10176 migrate non-core modules tests from Junit 3 to 4 - wip - migrating // JUnit4TestAdapter step 1 of 2 -- verified with diffs overview and rebuild --- .../flink/FlinkIgniteSinkSelfTestSuite.java | 7 +- .../stream/flume/IgniteSinkTestSuite.java | 6 +- .../ignite/testsuites/IgniteGCETestSuite.java | 8 +- .../hadoop/impl/igfs/IgfsEventsTestSuite.java | 21 +-- .../testsuites/IgniteHadoopTestSuite.java | 135 +++++++++--------- .../IgniteIgfsLinuxAndMacOSTestSuite.java | 25 ++-- .../IgniteBinaryCacheQueryTestSuite.java | 26 ++-- .../ignite/testsuites/IgniteJclTestSuite.java | 8 +- .../IgniteKafkaStreamerSelfTestSuite.java | 10 +- .../apache/ignite/IgniteMesosTestSuite.java | 8 +- .../protocols/http/jetty/GridRestSuite.java | 3 +- .../rocketmq/RocketMQStreamerTestSuite.java | 6 +- .../ignite/testsuites/IgniteRDDTestSuite.java | 5 +- .../IgniteStormStreamerSelfTestSuite.java | 7 +- .../testsuites/IgniteToolsSelfTestSuite.java | 8 +- .../IgniteUriDeploymentTestSuite.java | 29 ++-- .../apache/ignite/IgniteYarnTestSuite.java | 8 +- 17 files changed, 162 insertions(+), 158 deletions(-) diff --git a/modules/flink/src/test/java/org/apache/ignite/sink/flink/FlinkIgniteSinkSelfTestSuite.java b/modules/flink/src/test/java/org/apache/ignite/sink/flink/FlinkIgniteSinkSelfTestSuite.java index b6934e256beb5..c9ee957745917 100644 --- a/modules/flink/src/test/java/org/apache/ignite/sink/flink/FlinkIgniteSinkSelfTestSuite.java +++ b/modules/flink/src/test/java/org/apache/ignite/sink/flink/FlinkIgniteSinkSelfTestSuite.java @@ -17,21 +17,20 @@ package org.apache.ignite.sink.flink; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; /** * Apache Flink sink tests. */ public class FlinkIgniteSinkSelfTestSuite extends TestSuite { - /** * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Apache Flink sink Test Suite"); - suite.addTest(new TestSuite(FlinkIgniteSinkSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(FlinkIgniteSinkSelfTest.class)); return suite; } diff --git a/modules/flume/src/test/java/org/apache/ignite/stream/flume/IgniteSinkTestSuite.java b/modules/flume/src/test/java/org/apache/ignite/stream/flume/IgniteSinkTestSuite.java index ad6d162b83597..091f633cca5f3 100644 --- a/modules/flume/src/test/java/org/apache/ignite/stream/flume/IgniteSinkTestSuite.java +++ b/modules/flume/src/test/java/org/apache/ignite/stream/flume/IgniteSinkTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.stream.flume; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; /** @@ -25,12 +26,11 @@ public class IgniteSinkTestSuite extends TestSuite { /** * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Apache Flume NG Sink Test Suite"); - suite.addTest(new TestSuite(IgniteSinkTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteSinkTest.class)); return suite; } diff --git a/modules/gce/src/test/java/org/apache/ignite/testsuites/IgniteGCETestSuite.java b/modules/gce/src/test/java/org/apache/ignite/testsuites/IgniteGCETestSuite.java index 147abad9e3786..23fa43f5501ab 100644 --- a/modules/gce/src/test/java/org/apache/ignite/testsuites/IgniteGCETestSuite.java +++ b/modules/gce/src/test/java/org/apache/ignite/testsuites/IgniteGCETestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.spi.discovery.tcp.ipfinder.gce.TcpDiscoveryGoogleStorageIpFinderSelfTest; @@ -26,12 +27,11 @@ public class IgniteGCETestSuite extends TestSuite { /** * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Google Compute Engine Integration Test Suite"); - suite.addTest(new TestSuite(TcpDiscoveryGoogleStorageIpFinderSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(TcpDiscoveryGoogleStorageIpFinderSelfTest.class)); return suite; } @@ -68,4 +68,4 @@ public static String getProjectName() { return name; } -} \ No newline at end of file +} diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgfsEventsTestSuite.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgfsEventsTestSuite.java index e3dac864a6157..1b61d694b5461 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgfsEventsTestSuite.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgfsEventsTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.internal.processors.hadoop.impl.igfs; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.Ignite; import org.apache.ignite.IgniteCheckedException; @@ -50,13 +51,13 @@ public static TestSuite suite() throws Exception { TestSuite suite = new TestSuite("Ignite FS Events Test Suite"); - suite.addTest(new TestSuite(ldr.loadClass(ShmemPrimary.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(ShmemDualSync.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(ShmemDualAsync.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(ShmemPrimary.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(ShmemDualSync.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(ShmemDualAsync.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(LoopbackPrimary.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(LoopbackDualSync.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(LoopbackDualAsync.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(LoopbackPrimary.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(LoopbackDualSync.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(LoopbackDualAsync.class.getName()))); return suite; } @@ -70,9 +71,9 @@ public static TestSuite suiteNoarchOnly() throws Exception { TestSuite suite = new TestSuite("Ignite IGFS Events Test Suite Noarch Only"); - suite.addTest(new TestSuite(ldr.loadClass(LoopbackPrimary.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(LoopbackDualSync.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(LoopbackDualAsync.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(LoopbackPrimary.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(LoopbackDualSync.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(LoopbackDualAsync.class.getName()))); return suite; } @@ -284,4 +285,4 @@ public static class LoopbackDualAsync extends LoopbackPrimarySecondaryTest { return igfsCfg; } } -} \ No newline at end of file +} diff --git a/modules/hadoop/src/test/java/org/apache/ignite/testsuites/IgniteHadoopTestSuite.java b/modules/hadoop/src/test/java/org/apache/ignite/testsuites/IgniteHadoopTestSuite.java index 199fa9623bb4e..9da757f837751 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/testsuites/IgniteHadoopTestSuite.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/testsuites/IgniteHadoopTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.commons.compress.archivers.tar.TarArchiveEntry; import org.apache.commons.compress.archivers.tar.TarArchiveInputStream; @@ -122,109 +123,109 @@ public static TestSuite suite() throws Exception { TestSuite suite = new TestSuite("Ignite Hadoop MR Test Suite"); - suite.addTest(new TestSuite(ldr.loadClass(HadoopUserLibsSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopUserLibsSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopWeightedMapReducePlannerTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopWeightedMapReducePlannerTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(BasicUserNameMapperSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(KerberosUserNameMapperSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(ChainedUserNameMapperSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(BasicUserNameMapperSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(KerberosUserNameMapperSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(ChainedUserNameMapperSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(KerberosHadoopFileSystemFactorySelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(KerberosHadoopFileSystemFactorySelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopTeraSortTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopTeraSortTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopSnappyTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopSnappyFullMapReduceTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopSnappyTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopSnappyFullMapReduceTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopIgfs20FileSystemLoopbackPrimarySelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopIgfs20FileSystemLoopbackPrimarySelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopIgfsDualSyncSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopIgfsDualAsyncSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopIgfsDualSyncSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopIgfsDualAsyncSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(Hadoop1OverIgfsDualSyncTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(Hadoop1OverIgfsDualAsyncTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(Hadoop1OverIgfsProxyTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(Hadoop1OverIgfsDualSyncTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(Hadoop1OverIgfsDualAsyncTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(Hadoop1OverIgfsProxyTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopFIleSystemFactorySelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopFIleSystemFactorySelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemLoopbackExternalPrimarySelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemLoopbackExternalSecondarySelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemLoopbackExternalDualSyncSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemLoopbackExternalDualAsyncSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemLoopbackEmbeddedPrimarySelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemLoopbackEmbeddedSecondarySelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemLoopbackEmbeddedDualSyncSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemLoopbackEmbeddedDualAsyncSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemClientBasedPrimarySelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemClientBasedDualAsyncSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemClientBasedDualSyncSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemClientBasedProxySelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemLoopbackExternalToClientPrimarySelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemLoopbackExternalToClientDualSyncSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemLoopbackExternalToClientDualAsyncSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemLoopbackExternalToClientProxySelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemLoopbackExternalPrimarySelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemLoopbackExternalSecondarySelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemLoopbackExternalDualSyncSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemLoopbackExternalDualAsyncSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemLoopbackEmbeddedPrimarySelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemLoopbackEmbeddedSecondarySelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemLoopbackEmbeddedDualSyncSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemLoopbackEmbeddedDualAsyncSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemClientBasedPrimarySelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemClientBasedDualAsyncSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemClientBasedDualSyncSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemClientBasedProxySelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemLoopbackExternalToClientPrimarySelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemLoopbackExternalToClientDualSyncSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemLoopbackExternalToClientDualAsyncSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemLoopbackExternalToClientProxySelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemClientSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemClientSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemLoggerStateSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemLoggerSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemLoggerStateSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemLoggerSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemHandshakeSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemHandshakeSelfTest.class.getName()))); suite.addTest(IgfsEventsTestSuite.suiteNoarchOnly()); - suite.addTest(new TestSuite(ldr.loadClass(HadoopFileSystemsTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopFileSystemsTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopExecutorServiceTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopExecutorServiceTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopValidationSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopValidationSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopJobTrackerSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopJobTrackerSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopHashMapSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopDataStreamSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopConcurrentHashMultimapSelftest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopHashMapSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopDataStreamSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopConcurrentHashMultimapSelftest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopSkipListSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopSkipListSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopTaskExecutionSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopTaskExecutionSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopV2JobSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopV2JobSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopSerializationWrapperSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopSplitWrapperSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopSerializationWrapperSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopSplitWrapperSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopTasksV1Test.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopTasksV2Test.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopTasksV1Test.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopTasksV2Test.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopMapReduceTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopWeightedPlannerMapReduceTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopNoHadoopMapReduceTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopMapReduceErrorResilienceTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopMapReduceTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopWeightedPlannerMapReduceTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopNoHadoopMapReduceTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopMapReduceErrorResilienceTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopMapReduceEmbeddedSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopMapReduceEmbeddedSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopSortingTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopSortingTest.class.getName()))); // TODO https://issues.apache.org/jira/browse/IGNITE-3167 -// suite.addTest(new TestSuite(ldr.loadClass(HadoopExternalTaskExecutionSelfTest.class.getName()))); -// suite.addTest(new TestSuite(ldr.loadClass(HadoopExternalCommunicationSelfTest.class.getName()))); -// suite.addTest(new TestSuite(ldr.loadClass(HadoopSortingExternalTest.class.getName()))); +// suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopExternalTaskExecutionSelfTest.class.getName()))); +// suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopExternalCommunicationSelfTest.class.getName()))); +// suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopSortingExternalTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopGroupingTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopGroupingTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopClientProtocolSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopClientProtocolEmbeddedSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopClientProtocolMultipleServersSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopClientProtocolSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopClientProtocolEmbeddedSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopClientProtocolMultipleServersSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopCommandLineTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopCommandLineTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopSecondaryFileSystemConfigurationTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopSecondaryFileSystemConfigurationTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopTxConfigCacheTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopTxConfigCacheTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemClientBasedOpenTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemClientBasedOpenTest.class.getName()))); return suite; } diff --git a/modules/hadoop/src/test/java/org/apache/ignite/testsuites/IgniteIgfsLinuxAndMacOSTestSuite.java b/modules/hadoop/src/test/java/org/apache/ignite/testsuites/IgniteIgfsLinuxAndMacOSTestSuite.java index 7d1b55dc788d3..c5c7646b2645b 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/testsuites/IgniteIgfsLinuxAndMacOSTestSuite.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/testsuites/IgniteIgfsLinuxAndMacOSTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.hadoop.HadoopTestClassLoader; import org.apache.ignite.internal.processors.hadoop.impl.igfs.HadoopIgfs20FileSystemShmemPrimarySelfTest; @@ -51,22 +52,22 @@ public static TestSuite suite() throws Exception { TestSuite suite = new TestSuite("Ignite IGFS Test Suite For Linux And Mac OS"); - suite.addTest(new TestSuite(ldr.loadClass(IgfsServerManagerIpcEndpointRegistrationOnLinuxAndMacSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgfsServerManagerIpcEndpointRegistrationOnLinuxAndMacSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemShmemExternalPrimarySelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemShmemExternalSecondarySelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemShmemExternalDualSyncSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemShmemExternalDualAsyncSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemShmemExternalToClientPrimarySelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemShmemExternalToClientDualAsyncSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemShmemExternalToClientDualSyncSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemShmemExternalToClientProxySelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemShmemExternalPrimarySelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemShmemExternalSecondarySelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemShmemExternalDualSyncSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemShmemExternalDualAsyncSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemShmemExternalToClientPrimarySelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemShmemExternalToClientDualAsyncSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemShmemExternalToClientDualSyncSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemShmemExternalToClientProxySelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgniteHadoopFileSystemIpcCacheSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgniteHadoopFileSystemIpcCacheSelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(HadoopIgfs20FileSystemShmemPrimarySelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(HadoopIgfs20FileSystemShmemPrimarySelfTest.class.getName()))); - suite.addTest(new TestSuite(ldr.loadClass(IgfsNearOnlyMultiNodeSelfTest.class.getName()))); + suite.addTest(new JUnit4TestAdapter(ldr.loadClass(IgfsNearOnlyMultiNodeSelfTest.class.getName()))); suite.addTest(IgfsEventsTestSuite.suite()); diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite.java index d96b445fadcd4..7ffb8047d0f78 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite.java +++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.AffinityKeyNameAndValueFieldNameConflictTest; import org.apache.ignite.internal.processors.cache.BigEntryQueryTest; @@ -241,9 +242,8 @@ public class IgniteBinaryCacheQueryTestSuite extends TestSuite { /** * @return Test suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { IgniteTestSuite suite = new IgniteTestSuite("Ignite Cache Queries Test Suite"); suite.addTestSuite(AffinityKeyNameAndValueFieldNameConflictTest.class); @@ -274,23 +274,23 @@ public static TestSuite suite() throws Exception { suite.addTestSuite(BasicIndexTest.class); // Misc tests. - suite.addTest(new TestSuite(QueryEntityValidationSelfTest.class)); - suite.addTest(new TestSuite(DuplicateKeyValueClassesSelfTest.class)); - suite.addTest(new TestSuite(GridCacheLazyQueryPartitionsReleaseTest.class)); + suite.addTest(new JUnit4TestAdapter(QueryEntityValidationSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(DuplicateKeyValueClassesSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheLazyQueryPartitionsReleaseTest.class)); // Dynamic index create/drop tests. - suite.addTest(new TestSuite(SchemaExchangeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(SchemaExchangeSelfTest.class)); - suite.addTest(new TestSuite(DynamicIndexServerCoordinatorBasicSelfTest.class)); - suite.addTest(new TestSuite(DynamicIndexServerBasicSelfTest.class)); - suite.addTest(new TestSuite(DynamicIndexServerNodeFilterCoordinatorBasicSelfTest.class)); - suite.addTest(new TestSuite(DynamicIndexServerNodeFIlterBasicSelfTest.class)); - suite.addTest(new TestSuite(DynamicIndexClientBasicSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(DynamicIndexServerCoordinatorBasicSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(DynamicIndexServerBasicSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(DynamicIndexServerNodeFilterCoordinatorBasicSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(DynamicIndexServerNodeFIlterBasicSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(DynamicIndexClientBasicSelfTest.class)); // H2 tests. - suite.addTest(new TestSuite(GridH2IndexingInMemSelfTest.class)); - suite.addTest(new TestSuite(GridH2IndexingOffheapSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridH2IndexingInMemSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridH2IndexingOffheapSelfTest.class)); // Parsing suite.addTestSuite(GridQueryParsingTest.class); diff --git a/modules/jcl/src/test/java/org/apache/ignite/testsuites/IgniteJclTestSuite.java b/modules/jcl/src/test/java/org/apache/ignite/testsuites/IgniteJclTestSuite.java index 8c65cd92335f1..c27f59a2ae126 100644 --- a/modules/jcl/src/test/java/org/apache/ignite/testsuites/IgniteJclTestSuite.java +++ b/modules/jcl/src/test/java/org/apache/ignite/testsuites/IgniteJclTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.logger.jcl.JclLoggerTest; @@ -26,13 +27,12 @@ public class IgniteJclTestSuite extends TestSuite { /** * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Commons Logging Test Suite"); - suite.addTest(new TestSuite(JclLoggerTest.class)); + suite.addTest(new JUnit4TestAdapter(JclLoggerTest.class)); return suite; } -} \ No newline at end of file +} diff --git a/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/IgniteKafkaStreamerSelfTestSuite.java b/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/IgniteKafkaStreamerSelfTestSuite.java index c8d413ab79021..9fb7468d66cfc 100644 --- a/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/IgniteKafkaStreamerSelfTestSuite.java +++ b/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/IgniteKafkaStreamerSelfTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.stream.kafka; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.stream.kafka.connect.IgniteSinkConnectorTest; import org.apache.ignite.stream.kafka.connect.IgniteSourceConnectorTest; @@ -27,17 +28,16 @@ public class IgniteKafkaStreamerSelfTestSuite extends TestSuite { /** * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Apache Kafka streamer Test Suite"); // Kafka streamer. - suite.addTest(new TestSuite(KafkaIgniteStreamerSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(KafkaIgniteStreamerSelfTest.class)); // Kafka streamers via Connect API. - suite.addTest(new TestSuite(IgniteSinkConnectorTest.class)); - suite.addTest(new TestSuite(IgniteSourceConnectorTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteSinkConnectorTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteSourceConnectorTest.class)); return suite; } diff --git a/modules/mesos/src/test/java/org/apache/ignite/IgniteMesosTestSuite.java b/modules/mesos/src/test/java/org/apache/ignite/IgniteMesosTestSuite.java index af9a37db6a606..db2e8506b5333 100644 --- a/modules/mesos/src/test/java/org/apache/ignite/IgniteMesosTestSuite.java +++ b/modules/mesos/src/test/java/org/apache/ignite/IgniteMesosTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.mesos.IgniteSchedulerSelfTest; @@ -26,13 +27,12 @@ public class IgniteMesosTestSuite extends TestSuite { /** * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Apache Mesos Integration Test Suite"); - suite.addTest(new TestSuite(IgniteSchedulerSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteSchedulerSelfTest.class)); return suite; } -} \ No newline at end of file +} diff --git a/modules/rest-http/src/test/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridRestSuite.java b/modules/rest-http/src/test/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridRestSuite.java index c69ce7f03ae54..d02b614314223 100644 --- a/modules/rest-http/src/test/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridRestSuite.java +++ b/modules/rest-http/src/test/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridRestSuite.java @@ -16,6 +16,7 @@ */ package org.apache.ignite.internal.processors.rest.protocols.http.jetty; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; /** @@ -28,7 +29,7 @@ public class GridRestSuite extends TestSuite { public static TestSuite suite() { TestSuite suite = new TestSuite("Apache Ignite REST Api suite"); - suite.addTest(new TestSuite(RestSetupSimpleTest.class)); + suite.addTest(new JUnit4TestAdapter(RestSetupSimpleTest.class)); return suite; } diff --git a/modules/rocketmq/src/test/java/org/apache/ignite/stream/rocketmq/RocketMQStreamerTestSuite.java b/modules/rocketmq/src/test/java/org/apache/ignite/stream/rocketmq/RocketMQStreamerTestSuite.java index 127b442a8a5a6..4e54969159f49 100644 --- a/modules/rocketmq/src/test/java/org/apache/ignite/stream/rocketmq/RocketMQStreamerTestSuite.java +++ b/modules/rocketmq/src/test/java/org/apache/ignite/stream/rocketmq/RocketMQStreamerTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.stream.rocketmq; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; /** @@ -25,12 +26,11 @@ public class RocketMQStreamerTestSuite extends TestSuite { /** * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Apache RocketMQ streamer Test Suite"); - suite.addTest(new TestSuite(RocketMQStreamerTest.class)); + suite.addTest(new JUnit4TestAdapter(RocketMQStreamerTest.class)); return suite; } diff --git a/modules/spark/src/test/java/org/apache/ignite/testsuites/IgniteRDDTestSuite.java b/modules/spark/src/test/java/org/apache/ignite/testsuites/IgniteRDDTestSuite.java index 9d6227b49939a..d0ecd775e3f98 100644 --- a/modules/spark/src/test/java/org/apache/ignite/testsuites/IgniteRDDTestSuite.java +++ b/modules/spark/src/test/java/org/apache/ignite/testsuites/IgniteRDDTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.spark.JavaEmbeddedIgniteRDDSelfTest; import org.apache.ignite.spark.JavaStandaloneIgniteRDDSelfTest; @@ -32,8 +33,8 @@ public class IgniteRDDTestSuite extends TestSuite { public static TestSuite suite() throws Exception { TestSuite suite = new TestSuite("Java Ignite RDD tests (standalone and embedded modes"); - suite.addTest(new TestSuite(JavaEmbeddedIgniteRDDSelfTest.class)); - suite.addTest(new TestSuite(JavaStandaloneIgniteRDDSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JavaEmbeddedIgniteRDDSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JavaStandaloneIgniteRDDSelfTest.class)); return suite; } diff --git a/modules/storm/src/test/java/org/apache/ignite/stream/storm/IgniteStormStreamerSelfTestSuite.java b/modules/storm/src/test/java/org/apache/ignite/stream/storm/IgniteStormStreamerSelfTestSuite.java index 25546e5638b7b..638d729dd1f45 100644 --- a/modules/storm/src/test/java/org/apache/ignite/stream/storm/IgniteStormStreamerSelfTestSuite.java +++ b/modules/storm/src/test/java/org/apache/ignite/stream/storm/IgniteStormStreamerSelfTestSuite.java @@ -17,21 +17,20 @@ package org.apache.ignite.stream.storm; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; /** * Apache Storm streamer tests. */ public class IgniteStormStreamerSelfTestSuite extends TestSuite { - /** * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Apache Storm streamer Test Suite"); - suite.addTest(new TestSuite(StormIgniteStreamerSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(StormIgniteStreamerSelfTest.class)); return suite; } diff --git a/modules/urideploy/src/test/java/org/apache/ignite/testsuites/IgniteToolsSelfTestSuite.java b/modules/urideploy/src/test/java/org/apache/ignite/testsuites/IgniteToolsSelfTestSuite.java index 4c5439ed24ee5..37d6e7c9db043 100644 --- a/modules/urideploy/src/test/java/org/apache/ignite/testsuites/IgniteToolsSelfTestSuite.java +++ b/modules/urideploy/src/test/java/org/apache/ignite/testsuites/IgniteToolsSelfTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.tools.GridToolsSelfTest; @@ -26,13 +27,12 @@ public class IgniteToolsSelfTestSuite extends TestSuite { /** * @return Grid ant tasks tests suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite Ant Tasks Test Suite"); - suite.addTest(new TestSuite(GridToolsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridToolsSelfTest.class)); return suite; } -} \ No newline at end of file +} diff --git a/modules/urideploy/src/test/java/org/apache/ignite/testsuites/IgniteUriDeploymentTestSuite.java b/modules/urideploy/src/test/java/org/apache/ignite/testsuites/IgniteUriDeploymentTestSuite.java index 345ce804b6783..436b78302064f 100644 --- a/modules/urideploy/src/test/java/org/apache/ignite/testsuites/IgniteUriDeploymentTestSuite.java +++ b/modules/urideploy/src/test/java/org/apache/ignite/testsuites/IgniteUriDeploymentTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.GridTaskUriDeploymentDeadlockSelfTest; import org.apache.ignite.p2p.GridP2PDisabledSelfTest; @@ -44,27 +45,27 @@ public class IgniteUriDeploymentTestSuite { public static TestSuite suite() throws Exception { TestSuite suite = new TestSuite("URI Deployment Spi Test Suite"); - suite.addTest(new TestSuite(GridUriDeploymentConfigSelfTest.class)); - suite.addTest(new TestSuite(GridUriDeploymentSimpleSelfTest.class)); - suite.addTest(new TestSuite(GridUriDeploymentClassloaderRegisterSelfTest.class)); - suite.addTest(new TestSuite(GridUriDeploymentFileProcessorSelfTest.class)); - suite.addTest(new TestSuite(GridUriDeploymentClassLoaderSelfTest.class)); - suite.addTest(new TestSuite(GridUriDeploymentClassLoaderMultiThreadedSelfTest.class)); - suite.addTest(new TestSuite(GridUriDeploymentMultiScannersSelfTest.class)); - suite.addTest(new TestSuite(GridUriDeploymentConfigSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridUriDeploymentConfigSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridUriDeploymentSimpleSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridUriDeploymentClassloaderRegisterSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridUriDeploymentFileProcessorSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridUriDeploymentClassLoaderSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridUriDeploymentClassLoaderMultiThreadedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridUriDeploymentMultiScannersSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridUriDeploymentConfigSelfTest.class)); - suite.addTest(new TestSuite(GridFileDeploymentUndeploySelfTest.class)); - suite.addTest(new TestSuite(GridHttpDeploymentSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridFileDeploymentUndeploySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridHttpDeploymentSelfTest.class)); - suite.addTest(new TestSuite(GridFileDeploymentSelfTest.class)); - suite.addTest(new TestSuite(GridUriDeploymentMultiScannersErrorThrottlingTest.class)); - suite.addTest(new TestSuite(GridUriDeploymentMd5CheckSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridFileDeploymentSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridUriDeploymentMultiScannersErrorThrottlingTest.class)); + suite.addTest(new JUnit4TestAdapter(GridUriDeploymentMd5CheckSelfTest.class)); // GAR Ant task tests. suite.addTest(IgniteToolsSelfTestSuite.suite()); suite.addTestSuite(GridTaskUriDeploymentDeadlockSelfTest.class); - suite.addTest(new TestSuite(GridP2PDisabledSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridP2PDisabledSelfTest.class)); return suite; } diff --git a/modules/yarn/src/test/java/org/apache/ignite/IgniteYarnTestSuite.java b/modules/yarn/src/test/java/org/apache/ignite/IgniteYarnTestSuite.java index ac002b51d7840..d7b90c3b0e60a 100644 --- a/modules/yarn/src/test/java/org/apache/ignite/IgniteYarnTestSuite.java +++ b/modules/yarn/src/test/java/org/apache/ignite/IgniteYarnTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.yarn.IgniteApplicationMasterSelfTest; @@ -26,13 +27,12 @@ public class IgniteYarnTestSuite extends TestSuite { /** * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Apache Yarn Integration Test Suite"); - suite.addTest(new TestSuite(IgniteApplicationMasterSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteApplicationMasterSelfTest.class)); return suite; } -} \ No newline at end of file +} From 53eb22f9d666c07994fa0c3dd7000d23c70d85db Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Fri, 7 Dec 2018 22:57:05 +0300 Subject: [PATCH 076/176] IGNITE-10176 migrate non-core modules tests from Junit 3 to 4 - wip - migrating // JUnit4TestAdapter step 2 of 2 -- verified with diffs overview and rebuild --- .../testsuites/IgniteAopSelfTestSuite.java | 18 +- .../ignite/testsuites/IgniteElbTestSuite.java | 6 +- .../ignite/testsuites/IgniteS3TestSuite.java | 32 +- .../camel/IgniteCamelStreamerTestSuite.java | 11 +- .../client/suite/IgniteClientTestSuite.java | 101 ++-- .../suite/IgniteJdbcDriverMvccTestSuite.java | 17 +- .../testsuites/IgniteCloudTestSuite.java | 10 +- .../IgniteCompatibilityBasicTestSuite.java | 8 +- .../IgnitePdsCompressionTestSuite.java | 9 +- .../IgnitePdsNativeIoTestSuite.java | 7 +- .../IgnitePdsNativeIoTestSuite2.java | 12 +- .../GeoSpatialIndexingTestSuite.java | 10 +- .../testsuites/IgniteHibernateTestSuite.java | 24 +- .../testsuites/IgniteHibernate5TestSuite.java | 24 +- .../IgniteBinaryCacheQueryTestSuite.java | 436 +++++++++--------- .../IgniteBinaryCacheQueryTestSuite2.java | 84 ++-- .../IgniteCacheAffinityRunTestSuite.java | 18 +- ...kExchangeOnSqlReadOperationsTestSuite.java | 5 +- .../IgniteCacheMvccSqlTestSuite.java | 101 ++-- .../IgniteCacheQuerySelfTestSuite3.java | 66 +-- .../IgniteCacheQuerySelfTestSuite4.java | 24 +- .../IgniteCacheQuerySelfTestSuite5.java | 40 +- .../IgniteCacheQuerySelfTestSuite6.java | 40 +- ...heWithIndexingAndPersistenceTestSuite.java | 8 +- .../IgniteCacheWithIndexingTestSuite.java | 52 +-- ...niteDbMemoryLeakWithIndexingTestSuite.java | 8 +- .../IgnitePdsWithIndexingCoreTestSuite.java | 56 +-- .../IgnitePdsWithIndexingTestSuite.java | 20 +- ...sr310Java8DateTimeApiSupportTestSuite.java | 3 +- .../ignite/testsuites/IgniteJtaTestSuite.java | 26 +- .../testsuites/IgniteKubernetesTestSuite.java | 8 +- .../testsuites/IgniteLog4j2TestSuite.java | 14 +- .../testsuites/IgniteSchedulerTestSuite.java | 8 +- .../testsuites/IgniteSlf4jTestSuite.java | 3 +- .../IgniteSpringData2TestSuite.java | 8 +- .../testsuites/IgniteSpringDataTestSuite.java | 8 +- .../IgniteResourceSelfTestSuite.java | 14 +- .../testsuites/IgniteSpringTestSuite.java | 55 +-- .../IgniteStartStopRestartTestSuite.java | 8 +- .../IgniteTwitterStreamerTestSuite.java | 6 +- .../IgniteUriDeploymentTestSuite.java | 5 +- .../IgniteWebSessionSelfTestSuite.java | 18 +- .../zeromq/IgniteZeroMqStreamerTestSuite.java | 6 +- .../zk/ZookeeperDiscoverySpiTestSuite1.java | 12 +- .../zk/ZookeeperDiscoverySpiTestSuite2.java | 13 +- .../zk/ZookeeperDiscoverySpiTestSuite3.java | 19 +- .../zk/ZookeeperDiscoverySpiTestSuite4.java | 15 +- 47 files changed, 753 insertions(+), 743 deletions(-) diff --git a/modules/aop/src/test/java/org/apache/ignite/testsuites/IgniteAopSelfTestSuite.java b/modules/aop/src/test/java/org/apache/ignite/testsuites/IgniteAopSelfTestSuite.java index b2dcea2f61633..830633c95f2d1 100644 --- a/modules/aop/src/test/java/org/apache/ignite/testsuites/IgniteAopSelfTestSuite.java +++ b/modules/aop/src/test/java/org/apache/ignite/testsuites/IgniteAopSelfTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.gridify.BasicAopSelfTest; import org.apache.ignite.gridify.GridifySetToXXXNonSpringAopSelfTest; @@ -34,23 +35,22 @@ public class IgniteAopSelfTestSuite extends TestSuite { /** * @return AOP test suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite AOP Test Suite"); // Test configuration. - suite.addTestSuite(BasicAopSelfTest.class); + suite.addTest(new JUnit4TestAdapter(BasicAopSelfTest.class)); - suite.addTestSuite(SpringAopSelfTest.class); - suite.addTestSuite(NonSpringAopSelfTest.class); - suite.addTestSuite(GridifySetToXXXSpringAopSelfTest.class); - suite.addTestSuite(GridifySetToXXXNonSpringAopSelfTest.class); - suite.addTestSuite(ExternalNonSpringAopSelfTest.class); + suite.addTest(new JUnit4TestAdapter(SpringAopSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(NonSpringAopSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridifySetToXXXSpringAopSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridifySetToXXXNonSpringAopSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(ExternalNonSpringAopSelfTest.class)); // Examples System.setProperty(IGNITE_OVERRIDE_MCAST_GRP, GridTestUtils.getNextMulticastGroup(IgniteAopSelfTestSuite.class)); return suite; } -} \ No newline at end of file +} diff --git a/modules/aws/src/test/java/org/apache/ignite/testsuites/IgniteElbTestSuite.java b/modules/aws/src/test/java/org/apache/ignite/testsuites/IgniteElbTestSuite.java index 28f7e0e47ec6c..65aa46ebcb55f 100644 --- a/modules/aws/src/test/java/org/apache/ignite/testsuites/IgniteElbTestSuite.java +++ b/modules/aws/src/test/java/org/apache/ignite/testsuites/IgniteElbTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.spi.discovery.tcp.ipfinder.elb.TcpDiscoveryElbIpFinderSelfTest; import org.apache.ignite.testframework.IgniteTestSuite; @@ -27,12 +28,11 @@ public class IgniteElbTestSuite extends TestSuite { /** * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new IgniteTestSuite("ELB Integration Test Suite"); - suite.addTestSuite(TcpDiscoveryElbIpFinderSelfTest.class); + suite.addTest(new JUnit4TestAdapter(TcpDiscoveryElbIpFinderSelfTest.class)); return suite; } diff --git a/modules/aws/src/test/java/org/apache/ignite/testsuites/IgniteS3TestSuite.java b/modules/aws/src/test/java/org/apache/ignite/testsuites/IgniteS3TestSuite.java index a5b5eaabf12a2..f1c3128c13cea 100644 --- a/modules/aws/src/test/java/org/apache/ignite/testsuites/IgniteS3TestSuite.java +++ b/modules/aws/src/test/java/org/apache/ignite/testsuites/IgniteS3TestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.spi.checkpoint.s3.S3CheckpointManagerSelfTest; import org.apache.ignite.spi.checkpoint.s3.S3CheckpointSpiConfigSelfTest; @@ -40,28 +41,27 @@ public class IgniteS3TestSuite extends TestSuite { /** * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new IgniteTestSuite("S3 Integration Test Suite"); // Checkpoint SPI. - suite.addTestSuite(S3CheckpointSpiConfigSelfTest.class); - suite.addTestSuite(S3CheckpointSpiSelfTest.class); - suite.addTestSuite(S3CheckpointSpiStartStopSelfTest.class); - suite.addTestSuite(S3CheckpointManagerSelfTest.class); - suite.addTestSuite(S3SessionCheckpointSelfTest.class); - suite.addTestSuite(S3CheckpointSpiStartStopBucketEndpointSelfTest.class); - suite.addTestSuite(S3CheckpointSpiStartStopSSEAlgorithmSelfTest.class); + suite.addTest(new JUnit4TestAdapter(S3CheckpointSpiConfigSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(S3CheckpointSpiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(S3CheckpointSpiStartStopSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(S3CheckpointManagerSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(S3SessionCheckpointSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(S3CheckpointSpiStartStopBucketEndpointSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(S3CheckpointSpiStartStopSSEAlgorithmSelfTest.class)); // S3 IP finder. - suite.addTestSuite(DummyS3ClientTest.class); - suite.addTestSuite(DummyObjectListingTest.class); - suite.addTestSuite(TcpDiscoveryS3IpFinderAwsCredentialsSelfTest.class); - suite.addTestSuite(TcpDiscoveryS3IpFinderAwsCredentialsProviderSelfTest.class); - suite.addTestSuite(TcpDiscoveryS3IpFinderBucketEndpointSelfTest.class); - suite.addTestSuite(TcpDiscoveryS3IpFinderSSEAlgorithmSelfTest.class); - suite.addTestSuite(TcpDiscoveryS3IpFinderKeyPrefixSelfTest.class); + suite.addTest(new JUnit4TestAdapter(DummyS3ClientTest.class)); + suite.addTest(new JUnit4TestAdapter(DummyObjectListingTest.class)); + suite.addTest(new JUnit4TestAdapter(TcpDiscoveryS3IpFinderAwsCredentialsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(TcpDiscoveryS3IpFinderAwsCredentialsProviderSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(TcpDiscoveryS3IpFinderBucketEndpointSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(TcpDiscoveryS3IpFinderSSEAlgorithmSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(TcpDiscoveryS3IpFinderKeyPrefixSelfTest.class)); return suite; } diff --git a/modules/camel/src/test/java/org/apache/ignite/stream/camel/IgniteCamelStreamerTestSuite.java b/modules/camel/src/test/java/org/apache/ignite/stream/camel/IgniteCamelStreamerTestSuite.java index c45272ed00c57..9aa1836d99d3f 100644 --- a/modules/camel/src/test/java/org/apache/ignite/stream/camel/IgniteCamelStreamerTestSuite.java +++ b/modules/camel/src/test/java/org/apache/ignite/stream/camel/IgniteCamelStreamerTestSuite.java @@ -18,6 +18,7 @@ package org.apache.ignite.stream.camel; import java.util.Set; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; /** @@ -26,21 +27,19 @@ public class IgniteCamelStreamerTestSuite extends TestSuite { /** * @return {@link IgniteCamelStreamerTest} test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { return suite(null); } /** - * @param ignoredTests + * @param ignoredTests List of ignored tests. * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite(Set ignoredTests) throws Exception { + public static TestSuite suite(Set ignoredTests) { TestSuite suite = new TestSuite("IgniteCamelStreamer Test Suite"); - suite.addTestSuite(IgniteCamelStreamerTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCamelStreamerTest.class)); return suite; } diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/suite/IgniteClientTestSuite.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/suite/IgniteClientTestSuite.java index d08c9a1046a86..fe117128d313c 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/client/suite/IgniteClientTestSuite.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/suite/IgniteClientTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.internal.client.suite; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.TaskEventSubjectIdSelfTest; import org.apache.ignite.internal.client.ClientDefaultCacheSelfTest; @@ -80,92 +81,92 @@ public class IgniteClientTestSuite extends TestSuite { public static TestSuite suite() { TestSuite suite = new IgniteTestSuite("Ignite Clients Test Suite"); - suite.addTestSuite(RouterFactorySelfTest.class); + suite.addTest(new JUnit4TestAdapter(RouterFactorySelfTest.class)); // Parser standalone test. - suite.addTestSuite(TcpRestParserSelfTest.class); + suite.addTest(new JUnit4TestAdapter(TcpRestParserSelfTest.class)); // Test memcache protocol with custom test client. - suite.addTestSuite(RestMemcacheProtocolSelfTest.class); + suite.addTest(new JUnit4TestAdapter(RestMemcacheProtocolSelfTest.class)); // Test custom binary protocol with test client. - suite.addTestSuite(RestBinaryProtocolSelfTest.class); - suite.addTestSuite(TcpRestUnmarshalVulnerabilityTest.class); + suite.addTest(new JUnit4TestAdapter(RestBinaryProtocolSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(TcpRestUnmarshalVulnerabilityTest.class)); // Test jetty rest processor - suite.addTestSuite(JettyRestProcessorSignedSelfTest.class); - suite.addTestSuite(JettyRestProcessorUnsignedSelfTest.class); - suite.addTestSuite(JettyRestProcessorAuthenticationWithCredsSelfTest.class); - suite.addTestSuite(JettyRestProcessorAuthenticationWithTokenSelfTest.class); - suite.addTestSuite(JettyRestProcessorGetAllAsArrayTest.class); + suite.addTest(new JUnit4TestAdapter(JettyRestProcessorSignedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JettyRestProcessorUnsignedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JettyRestProcessorAuthenticationWithCredsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JettyRestProcessorAuthenticationWithTokenSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JettyRestProcessorGetAllAsArrayTest.class)); // Test TCP rest processor with original memcache client. - suite.addTestSuite(ClientMemcachedProtocolSelfTest.class); + suite.addTest(new JUnit4TestAdapter(ClientMemcachedProtocolSelfTest.class)); // Test TCP rest processor with original REDIS client. - suite.addTestSuite(RedisProtocolStringSelfTest.class); - suite.addTestSuite(RedisProtocolGetAllAsArrayTest.class); - suite.addTestSuite(RedisProtocolConnectSelfTest.class); - suite.addTestSuite(RedisProtocolServerSelfTest.class); - suite.addTestSuite(RedisProtocolStringAtomicDatastructuresSelfTest.class); + suite.addTest(new JUnit4TestAdapter(RedisProtocolStringSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(RedisProtocolGetAllAsArrayTest.class)); + suite.addTest(new JUnit4TestAdapter(RedisProtocolConnectSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(RedisProtocolServerSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(RedisProtocolStringAtomicDatastructuresSelfTest.class)); - suite.addTestSuite(RestProcessorStartSelfTest.class); + suite.addTest(new JUnit4TestAdapter(RestProcessorStartSelfTest.class)); // Test cache flag conversion. - suite.addTestSuite(ClientCacheFlagsCodecTest.class); + suite.addTest(new JUnit4TestAdapter(ClientCacheFlagsCodecTest.class)); // Test multi-start. - suite.addTestSuite(RestProcessorMultiStartSelfTest.class); + suite.addTest(new JUnit4TestAdapter(RestProcessorMultiStartSelfTest.class)); // Test clients. - suite.addTestSuite(ClientDataImplSelfTest.class); - suite.addTestSuite(ClientComputeImplSelfTest.class); - suite.addTestSuite(ClientTcpSelfTest.class); - suite.addTestSuite(ClientTcpDirectSelfTest.class); - suite.addTestSuite(ClientTcpSslSelfTest.class); - suite.addTestSuite(ClientTcpSslDirectSelfTest.class); + suite.addTest(new JUnit4TestAdapter(ClientDataImplSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(ClientComputeImplSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(ClientTcpSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(ClientTcpDirectSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(ClientTcpSslSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(ClientTcpSslDirectSelfTest.class)); // Test client with many nodes. - suite.addTestSuite(ClientTcpMultiNodeSelfTest.class); - suite.addTestSuite(ClientTcpDirectMultiNodeSelfTest.class); - suite.addTestSuite(ClientTcpSslMultiNodeSelfTest.class); - suite.addTestSuite(ClientTcpSslDirectMultiNodeSelfTest.class); - suite.addTestSuite(ClientTcpUnreachableMultiNodeSelfTest.class); - suite.addTestSuite(ClientPreferDirectSelfTest.class); + suite.addTest(new JUnit4TestAdapter(ClientTcpMultiNodeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(ClientTcpDirectMultiNodeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(ClientTcpSslMultiNodeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(ClientTcpSslDirectMultiNodeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(ClientTcpUnreachableMultiNodeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(ClientPreferDirectSelfTest.class)); // Test client with many nodes and in multithreaded scenarios - suite.addTestSuite(ClientTcpMultiThreadedSelfTest.class); - suite.addTestSuite(ClientTcpSslMultiThreadedSelfTest.class); + suite.addTest(new JUnit4TestAdapter(ClientTcpMultiThreadedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(ClientTcpSslMultiThreadedSelfTest.class)); // Test client authentication. - suite.addTestSuite(ClientTcpSslAuthenticationSelfTest.class); + suite.addTest(new JUnit4TestAdapter(ClientTcpSslAuthenticationSelfTest.class)); - suite.addTestSuite(ClientTcpConnectivitySelfTest.class); - suite.addTestSuite(ClientReconnectionSelfTest.class); + suite.addTest(new JUnit4TestAdapter(ClientTcpConnectivitySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(ClientReconnectionSelfTest.class)); // Rest task command handler test. - suite.addTestSuite(TaskCommandHandlerSelfTest.class); - suite.addTestSuite(ChangeStateCommandHandlerTest.class); - suite.addTestSuite(TaskEventSubjectIdSelfTest.class); + suite.addTest(new JUnit4TestAdapter(TaskCommandHandlerSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(ChangeStateCommandHandlerTest.class)); + suite.addTest(new JUnit4TestAdapter(TaskEventSubjectIdSelfTest.class)); // Default cache only test. - suite.addTestSuite(ClientDefaultCacheSelfTest.class); + suite.addTest(new JUnit4TestAdapter(ClientDefaultCacheSelfTest.class)); - suite.addTestSuite(ClientFutureAdapterSelfTest.class); - suite.addTestSuite(ClientPropertiesConfigurationSelfTest.class); - suite.addTestSuite(ClientConsistentHashSelfTest.class); - suite.addTestSuite(ClientJavaHasherSelfTest.class); + suite.addTest(new JUnit4TestAdapter(ClientFutureAdapterSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(ClientPropertiesConfigurationSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(ClientConsistentHashSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(ClientJavaHasherSelfTest.class)); - suite.addTestSuite(ClientByteUtilsTest.class); + suite.addTest(new JUnit4TestAdapter(ClientByteUtilsTest.class)); // Router tests. - suite.addTestSuite(TcpRouterSelfTest.class); - suite.addTestSuite(TcpSslRouterSelfTest.class); - suite.addTestSuite(TcpRouterMultiNodeSelfTest.class); + suite.addTest(new JUnit4TestAdapter(TcpRouterSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(TcpSslRouterSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(TcpRouterMultiNodeSelfTest.class)); - suite.addTestSuite(ClientFailedInitSelfTest.class); + suite.addTest(new JUnit4TestAdapter(ClientFailedInitSelfTest.class)); - suite.addTestSuite(ClientTcpTaskExecutionAfterTopologyRestartSelfTest.class); + suite.addTest(new JUnit4TestAdapter(ClientTcpTaskExecutionAfterTopologyRestartSelfTest.class)); return suite; } diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/suite/IgniteJdbcDriverMvccTestSuite.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/suite/IgniteJdbcDriverMvccTestSuite.java index 66eafae17a4af..35a54ca9de511 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/suite/IgniteJdbcDriverMvccTestSuite.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/suite/IgniteJdbcDriverMvccTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.jdbc.suite; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.jdbc.JdbcVersionMismatchSelfTest; import org.apache.ignite.jdbc.thin.JdbcThinConnectionMvccEnabledSelfTest; @@ -35,16 +36,16 @@ public class IgniteJdbcDriverMvccTestSuite extends TestSuite { public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite JDBC Driver Test Suite"); - suite.addTestSuite(JdbcThinConnectionMvccEnabledSelfTest.class); - suite.addTestSuite(JdbcVersionMismatchSelfTest.class); + suite.addTest(new JUnit4TestAdapter(JdbcThinConnectionMvccEnabledSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcVersionMismatchSelfTest.class)); // Transactions - suite.addTestSuite(JdbcThinTransactionsWithMvccEnabledSelfTest.class); - suite.addTestSuite(JdbcThinTransactionsClientAutoCommitComplexSelfTest.class); - suite.addTestSuite(JdbcThinTransactionsServerAutoCommitComplexSelfTest.class); - suite.addTestSuite(JdbcThinTransactionsClientNoAutoCommitComplexSelfTest.class); - suite.addTestSuite(JdbcThinTransactionsServerNoAutoCommitComplexSelfTest.class); - suite.addTestSuite(MvccJdbcTransactionFinishOnDeactivatedClusterSelfTest.class); + suite.addTest(new JUnit4TestAdapter(JdbcThinTransactionsWithMvccEnabledSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinTransactionsClientAutoCommitComplexSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinTransactionsServerAutoCommitComplexSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinTransactionsClientNoAutoCommitComplexSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JdbcThinTransactionsServerNoAutoCommitComplexSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(MvccJdbcTransactionFinishOnDeactivatedClusterSelfTest.class)); return suite; } diff --git a/modules/cloud/src/test/java/org/apache/ignite/testsuites/IgniteCloudTestSuite.java b/modules/cloud/src/test/java/org/apache/ignite/testsuites/IgniteCloudTestSuite.java index 632cddc6c7bbc..6a0f8a3ac257c 100644 --- a/modules/cloud/src/test/java/org/apache/ignite/testsuites/IgniteCloudTestSuite.java +++ b/modules/cloud/src/test/java/org/apache/ignite/testsuites/IgniteCloudTestSuite.java @@ -19,6 +19,7 @@ import java.util.Collection; import java.util.LinkedList; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.spi.discovery.tcp.ipfinder.cloud.TcpDiscoveryCloudIpFinderSelfTest; import org.apache.ignite.testframework.IgniteTestSuite; @@ -29,13 +30,12 @@ public class IgniteCloudTestSuite extends TestSuite { /** * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new IgniteTestSuite("Cloud Integration Test Suite"); // Cloud Nodes IP finder. - suite.addTestSuite(TcpDiscoveryCloudIpFinderSelfTest.class); + suite.addTest(new JUnit4TestAdapter(TcpDiscoveryCloudIpFinderSelfTest.class)); return suite; } @@ -51,7 +51,7 @@ public static String getAccessKey(String provider) { String key = System.getenv("test." + provider + ".access.key"); assert key != null : "Environment variable 'test." + provider + ".access.key' is not set"; - + return key; } @@ -111,4 +111,4 @@ public static Collection getRegions(String provider) { return list; } -} \ No newline at end of file +} diff --git a/modules/compatibility/src/test/java/org/apache/ignite/compatibility/testsuites/IgniteCompatibilityBasicTestSuite.java b/modules/compatibility/src/test/java/org/apache/ignite/compatibility/testsuites/IgniteCompatibilityBasicTestSuite.java index f6dd73606d16d..c06f6fbe288f8 100644 --- a/modules/compatibility/src/test/java/org/apache/ignite/compatibility/testsuites/IgniteCompatibilityBasicTestSuite.java +++ b/modules/compatibility/src/test/java/org/apache/ignite/compatibility/testsuites/IgniteCompatibilityBasicTestSuite.java @@ -34,13 +34,13 @@ public class IgniteCompatibilityBasicTestSuite { public static TestSuite suite() throws Exception { TestSuite suite = new TestSuite("Ignite Compatibility Basic Test Suite"); - suite.addTestSuite(PersistenceBasicCompatibilityTest.class); + suite.addTest(new JUnit4TestAdapter(PersistenceBasicCompatibilityTest.class); - suite.addTestSuite(PdsWithTtlCompatibilityTest.class); + suite.addTest(new JUnit4TestAdapter(PdsWithTtlCompatibilityTest.class); - suite.addTestSuite(FoldersReuseCompatibilityTest.class); + suite.addTest(new JUnit4TestAdapter(FoldersReuseCompatibilityTest.class); - suite.addTestSuite(MigratingToWalV2SerializerWithCompactionTest.class); + suite.addTest(new JUnit4TestAdapter(MigratingToWalV2SerializerWithCompactionTest.class); return suite; } diff --git a/modules/compress/src/test/java/org/apache/ignite/testsuites/IgnitePdsCompressionTestSuite.java b/modules/compress/src/test/java/org/apache/ignite/testsuites/IgnitePdsCompressionTestSuite.java index a9777000c8886..b3b00e71b0dbc 100644 --- a/modules/compress/src/test/java/org/apache/ignite/testsuites/IgnitePdsCompressionTestSuite.java +++ b/modules/compress/src/test/java/org/apache/ignite/testsuites/IgnitePdsCompressionTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.compress.CompressionProcessorTest; import org.apache.ignite.internal.processors.compress.DiskPageCompressionIntegrationAsyncTest; @@ -36,10 +37,10 @@ public class IgnitePdsCompressionTestSuite { public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite Persistent Store Test Suite (with page compression)."); - suite.addTestSuite(CompressionProcessorTest.class); - suite.addTestSuite(FileSystemUtilsTest.class); - suite.addTestSuite(DiskPageCompressionIntegrationTest.class); - suite.addTestSuite(DiskPageCompressionIntegrationAsyncTest.class); + suite.addTest(new JUnit4TestAdapter(CompressionProcessorTest.class)); + suite.addTest(new JUnit4TestAdapter(FileSystemUtilsTest.class)); + suite.addTest(new JUnit4TestAdapter(DiskPageCompressionIntegrationTest.class)); + suite.addTest(new JUnit4TestAdapter(DiskPageCompressionIntegrationAsyncTest.class)); enableCompressionByDefault(); IgnitePdsTestSuite.addRealPageStoreTests(suite); diff --git a/modules/direct-io/src/test/java/org/apache/ignite/testsuites/IgnitePdsNativeIoTestSuite.java b/modules/direct-io/src/test/java/org/apache/ignite/testsuites/IgnitePdsNativeIoTestSuite.java index 787a755c36a6f..b183860eea069 100644 --- a/modules/direct-io/src/test/java/org/apache/ignite/testsuites/IgnitePdsNativeIoTestSuite.java +++ b/modules/direct-io/src/test/java/org/apache/ignite/testsuites/IgnitePdsNativeIoTestSuite.java @@ -16,6 +16,7 @@ */ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.persistence.file.IgniteNativeIoWithNoPersistenceTest; @@ -32,10 +33,10 @@ public static TestSuite suite() { IgnitePdsTestSuite.addRealPageStoreTests(suite); //long running test by design with light parameters - suite.addTestSuite(IgnitePdsReplacementNativeIoTest.class); + suite.addTest(new JUnit4TestAdapter(IgnitePdsReplacementNativeIoTest.class)); - suite.addTestSuite(IgniteNativeIoWithNoPersistenceTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteNativeIoWithNoPersistenceTest.class)); return suite; } -} \ No newline at end of file +} diff --git a/modules/direct-io/src/test/java/org/apache/ignite/testsuites/IgnitePdsNativeIoTestSuite2.java b/modules/direct-io/src/test/java/org/apache/ignite/testsuites/IgnitePdsNativeIoTestSuite2.java index dab99c914c682..ae4507c48d146 100644 --- a/modules/direct-io/src/test/java/org/apache/ignite/testsuites/IgnitePdsNativeIoTestSuite2.java +++ b/modules/direct-io/src/test/java/org/apache/ignite/testsuites/IgnitePdsNativeIoTestSuite2.java @@ -16,6 +16,7 @@ */ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.persistence.IgniteNativeIoLocalWalModeChangeDuringRebalancingSelfTest; import org.apache.ignite.internal.processors.cache.persistence.IgniteNativeIoPdsRecoveryAfterFileCorruptionTest; @@ -28,22 +29,21 @@ public class IgnitePdsNativeIoTestSuite2 extends TestSuite { /** * @return Suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite Persistent Store Test Suite 2 (Native IO)"); IgnitePdsTestSuite2.addRealPageStoreTests(suite); // Direct IO + Page compression. - suite.addTestSuite(DiskPageCompressionIntegrationDirectIOTest.class); + suite.addTest(new JUnit4TestAdapter(DiskPageCompressionIntegrationDirectIOTest.class)); //Integrity test with reduced count of pages. - suite.addTestSuite(IgniteNativeIoPdsRecoveryAfterFileCorruptionTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteNativeIoPdsRecoveryAfterFileCorruptionTest.class)); - suite.addTestSuite(IgniteNativeIoLocalWalModeChangeDuringRebalancingSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteNativeIoLocalWalModeChangeDuringRebalancingSelfTest.class)); - suite.addTestSuite(IgniteNativeIoWalFlushFsyncSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteNativeIoWalFlushFsyncSelfTest.class)); return suite; } diff --git a/modules/geospatial/src/test/java/org/apache/ignite/testsuites/GeoSpatialIndexingTestSuite.java b/modules/geospatial/src/test/java/org/apache/ignite/testsuites/GeoSpatialIndexingTestSuite.java index 22109dea2d907..96c9cafec6185 100644 --- a/modules/geospatial/src/test/java/org/apache/ignite/testsuites/GeoSpatialIndexingTestSuite.java +++ b/modules/geospatial/src/test/java/org/apache/ignite/testsuites/GeoSpatialIndexingTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.query.h2.H2IndexingGeoSelfTest; import org.apache.ignite.internal.processors.query.h2.H2IndexingSegmentedGeoSelfTest; @@ -27,14 +28,13 @@ public class GeoSpatialIndexingTestSuite extends TestSuite { /** * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("H2 Geospatial Indexing Test Suite"); - suite.addTestSuite(H2IndexingGeoSelfTest.class); - suite.addTestSuite(H2IndexingSegmentedGeoSelfTest.class); + suite.addTest(new JUnit4TestAdapter(H2IndexingGeoSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(H2IndexingSegmentedGeoSelfTest.class)); return suite; } -} \ No newline at end of file +} diff --git a/modules/hibernate-4.2/src/test/java/org/apache/ignite/testsuites/IgniteHibernateTestSuite.java b/modules/hibernate-4.2/src/test/java/org/apache/ignite/testsuites/IgniteHibernateTestSuite.java index 8d45dea48d8e2..64c6cfac34156 100644 --- a/modules/hibernate-4.2/src/test/java/org/apache/ignite/testsuites/IgniteHibernateTestSuite.java +++ b/modules/hibernate-4.2/src/test/java/org/apache/ignite/testsuites/IgniteHibernateTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.cache.hibernate.HibernateL2CacheConfigurationSelfTest; import org.apache.ignite.cache.hibernate.HibernateL2CacheMultiJvmTest; @@ -35,26 +36,25 @@ public class IgniteHibernateTestSuite extends TestSuite { /** * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Hibernate Integration Test Suite"); // Hibernate L2 cache. - suite.addTestSuite(HibernateL2CacheSelfTest.class); - suite.addTestSuite(HibernateL2CacheTransactionalSelfTest.class); - suite.addTestSuite(HibernateL2CacheTransactionalUseSyncSelfTest.class); - suite.addTestSuite(HibernateL2CacheConfigurationSelfTest.class); - suite.addTestSuite(HibernateL2CacheStrategySelfTest.class); - suite.addTestSuite(HibernateL2CacheMultiJvmTest.class); + suite.addTest(new JUnit4TestAdapter(HibernateL2CacheSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(HibernateL2CacheTransactionalSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(HibernateL2CacheTransactionalUseSyncSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(HibernateL2CacheConfigurationSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(HibernateL2CacheStrategySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(HibernateL2CacheMultiJvmTest.class)); - suite.addTestSuite(CacheHibernateBlobStoreSelfTest.class); + suite.addTest(new JUnit4TestAdapter(CacheHibernateBlobStoreSelfTest.class)); - suite.addTestSuite(CacheHibernateBlobStoreNodeRestartTest.class); + suite.addTest(new JUnit4TestAdapter(CacheHibernateBlobStoreNodeRestartTest.class)); - suite.addTestSuite(CacheHibernateStoreSessionListenerSelfTest.class); + suite.addTest(new JUnit4TestAdapter(CacheHibernateStoreSessionListenerSelfTest.class)); - suite.addTestSuite(CacheHibernateStoreFactorySelfTest.class); + suite.addTest(new JUnit4TestAdapter(CacheHibernateStoreFactorySelfTest.class)); return suite; } diff --git a/modules/hibernate-5.1/src/test/java/org/apache/ignite/testsuites/IgniteHibernate5TestSuite.java b/modules/hibernate-5.1/src/test/java/org/apache/ignite/testsuites/IgniteHibernate5TestSuite.java index b5715997eaaed..f64a0c400b692 100644 --- a/modules/hibernate-5.1/src/test/java/org/apache/ignite/testsuites/IgniteHibernate5TestSuite.java +++ b/modules/hibernate-5.1/src/test/java/org/apache/ignite/testsuites/IgniteHibernate5TestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.cache.hibernate.HibernateL2CacheConfigurationSelfTest; import org.apache.ignite.cache.hibernate.HibernateL2CacheMultiJvmTest; @@ -35,26 +36,25 @@ public class IgniteHibernate5TestSuite extends TestSuite { /** * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Hibernate5 Integration Test Suite"); // Hibernate L2 cache. - suite.addTestSuite(HibernateL2CacheSelfTest.class); - suite.addTestSuite(HibernateL2CacheTransactionalSelfTest.class); - suite.addTestSuite(HibernateL2CacheTransactionalUseSyncSelfTest.class); - suite.addTestSuite(HibernateL2CacheConfigurationSelfTest.class); - suite.addTestSuite(HibernateL2CacheStrategySelfTest.class); - suite.addTestSuite(HibernateL2CacheMultiJvmTest.class); + suite.addTest(new JUnit4TestAdapter(HibernateL2CacheSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(HibernateL2CacheTransactionalSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(HibernateL2CacheTransactionalUseSyncSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(HibernateL2CacheConfigurationSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(HibernateL2CacheStrategySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(HibernateL2CacheMultiJvmTest.class)); - suite.addTestSuite(CacheHibernateBlobStoreSelfTest.class); + suite.addTest(new JUnit4TestAdapter(CacheHibernateBlobStoreSelfTest.class)); - suite.addTestSuite(CacheHibernateBlobStoreNodeRestartTest.class); + suite.addTest(new JUnit4TestAdapter(CacheHibernateBlobStoreNodeRestartTest.class)); - suite.addTestSuite(CacheHibernateStoreSessionListenerSelfTest.class); + suite.addTest(new JUnit4TestAdapter(CacheHibernateStoreSessionListenerSelfTest.class)); - suite.addTestSuite(CacheHibernateStoreFactorySelfTest.class); + suite.addTest(new JUnit4TestAdapter(CacheHibernateStoreFactorySelfTest.class)); return suite; } diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite.java index 7ffb8047d0f78..88b4205f3b6b6 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite.java +++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite.java @@ -246,32 +246,32 @@ public class IgniteBinaryCacheQueryTestSuite extends TestSuite { public static TestSuite suite() { IgniteTestSuite suite = new IgniteTestSuite("Ignite Cache Queries Test Suite"); - suite.addTestSuite(AffinityKeyNameAndValueFieldNameConflictTest.class); - suite.addTestSuite(DmlInsideTransactionTest.class); - suite.addTestSuite(ComplexPrimaryKeyUnwrapSelfTest.class); - suite.addTestSuite(SqlNestedQuerySelfTest.class); - suite.addTestSuite(ExplainSelfTest.class); - suite.addTestSuite(RunningQueriesTest.class); + suite.addTest(new JUnit4TestAdapter(AffinityKeyNameAndValueFieldNameConflictTest.class)); + suite.addTest(new JUnit4TestAdapter(DmlInsideTransactionTest.class)); + suite.addTest(new JUnit4TestAdapter(ComplexPrimaryKeyUnwrapSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(SqlNestedQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(ExplainSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(RunningQueriesTest.class)); - suite.addTestSuite(ComplexPrimaryKeyUnwrapSelfTest.class); + suite.addTest(new JUnit4TestAdapter(ComplexPrimaryKeyUnwrapSelfTest.class)); - suite.addTestSuite(PartitionedSqlTest.class); - suite.addTestSuite(ReplicatedSqlTest.class); + suite.addTest(new JUnit4TestAdapter(PartitionedSqlTest.class)); + suite.addTest(new JUnit4TestAdapter(ReplicatedSqlTest.class)); - suite.addTestSuite(SqlParserCreateIndexSelfTest.class); - suite.addTestSuite(SqlParserDropIndexSelfTest.class); - suite.addTestSuite(SqlParserTransactionalKeywordsSelfTest.class); - suite.addTestSuite(SqlParserBulkLoadSelfTest.class); - suite.addTestSuite(SqlParserSetStreamingSelfTest.class); + suite.addTest(new JUnit4TestAdapter(SqlParserCreateIndexSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(SqlParserDropIndexSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(SqlParserTransactionalKeywordsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(SqlParserBulkLoadSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(SqlParserSetStreamingSelfTest.class)); - suite.addTestSuite(SqlConnectorConfigurationValidationSelfTest.class); - suite.addTestSuite(ClientConnectorConfigurationValidationSelfTest.class); + suite.addTest(new JUnit4TestAdapter(SqlConnectorConfigurationValidationSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(ClientConnectorConfigurationValidationSelfTest.class)); - suite.addTestSuite(SqlSchemaSelfTest.class); - suite.addTestSuite(SqlIllegalSchemaSelfTest.class); - suite.addTestSuite(MultipleStatementsSqlQuerySelfTest.class); + suite.addTest(new JUnit4TestAdapter(SqlSchemaSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(SqlIllegalSchemaSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(MultipleStatementsSqlQuerySelfTest.class)); - suite.addTestSuite(BasicIndexTest.class); + suite.addTest(new JUnit4TestAdapter(BasicIndexTest.class)); // Misc tests. suite.addTest(new JUnit4TestAdapter(QueryEntityValidationSelfTest.class)); @@ -293,250 +293,250 @@ public static TestSuite suite() { suite.addTest(new JUnit4TestAdapter(GridH2IndexingOffheapSelfTest.class)); // Parsing - suite.addTestSuite(GridQueryParsingTest.class); - suite.addTestSuite(IgniteCacheSqlQueryErrorSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridQueryParsingTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheSqlQueryErrorSelfTest.class)); // Config. - suite.addTestSuite(IgniteCacheDuplicateEntityConfigurationSelfTest.class); - suite.addTestSuite(IncorrectQueryEntityTest.class); - suite.addTestSuite(IgniteDynamicSqlRestoreTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheDuplicateEntityConfigurationSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IncorrectQueryEntityTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteDynamicSqlRestoreTest.class)); // Queries tests. - suite.addTestSuite(LazyQuerySelfTest.class); - suite.addTestSuite(IgniteSqlSplitterSelfTest.class); - suite.addTestSuite(SqlPushDownFunctionTest.class); - suite.addTestSuite(IgniteSqlSegmentedIndexSelfTest.class); - suite.addTestSuite(IgniteCachelessQueriesSelfTest.class); - suite.addTestSuite(IgniteSqlSegmentedIndexMultiNodeSelfTest.class); - suite.addTestSuite(IgniteSqlSchemaIndexingTest.class); - suite.addTestSuite(GridCacheQueryIndexDisabledSelfTest.class); - suite.addTestSuite(IgniteCacheQueryLoadSelfTest.class); - suite.addTestSuite(IgniteCacheLocalQuerySelfTest.class); - suite.addTestSuite(IgniteCacheLocalAtomicQuerySelfTest.class); - suite.addTestSuite(IgniteCacheReplicatedQuerySelfTest.class); - suite.addTestSuite(IgniteCacheReplicatedQueryP2PDisabledSelfTest.class); - suite.addTestSuite(IgniteCacheReplicatedQueryEvtsDisabledSelfTest.class); - suite.addTestSuite(IgniteCachePartitionedQuerySelfTest.class); - suite.addTestSuite(IgniteCachePartitionedSnapshotEnabledQuerySelfTest.class); - suite.addTestSuite(IgniteCacheAtomicQuerySelfTest.class); - suite.addTestSuite(IgniteCacheAtomicNearEnabledQuerySelfTest.class); - suite.addTestSuite(IgniteCachePartitionedQueryP2PDisabledSelfTest.class); - suite.addTestSuite(IgniteCachePartitionedQueryEvtsDisabledSelfTest.class); - - suite.addTestSuite(IgniteCacheUnionDuplicatesTest.class); - suite.addTestSuite(IgniteCacheJoinPartitionedAndReplicatedCollocationTest.class); - suite.addTestSuite(IgniteClientReconnectCacheQueriesFailoverTest.class); - suite.addTestSuite(IgniteErrorOnRebalanceTest.class); - suite.addTestSuite(CacheQueryBuildValueTest.class); - suite.addTestSuite(CacheOffheapBatchIndexingMultiTypeTest.class); - suite.addTestSuite(CacheOffheapBatchIndexingBaseTest.class); - - suite.addTestSuite(IgniteCacheQueryIndexSelfTest.class); - suite.addTestSuite(IgniteCacheCollocatedQuerySelfTest.class); - suite.addTestSuite(IgniteCacheLargeResultSelfTest.class); - suite.addTestSuite(GridCacheQueryInternalKeysSelfTest.class); - suite.addTestSuite(H2ResultSetIteratorNullifyOnEndSelfTest.class); - suite.addTestSuite(IgniteSqlBigIntegerKeyTest.class); - suite.addTestSuite(IgniteCacheOffheapEvictQueryTest.class); - suite.addTestSuite(IgniteCacheOffheapIndexScanTest.class); - - suite.addTestSuite(IgniteCacheQueryAbstractDistributedJoinSelfTest.class); - - suite.addTestSuite(GridCacheCrossCacheQuerySelfTest.class); - suite.addTestSuite(GridCacheQuerySerializationSelfTest.class); - suite.addTestSuite(IgniteBinaryObjectFieldsQuerySelfTest.class); - suite.addTestSuite(IgniteStableBaselineBinObjFieldsQuerySelfTest.class); - suite.addTestSuite(IgniteBinaryWrappedObjectFieldsQuerySelfTest.class); - suite.addTestSuite(IgniteCacheQueryH2IndexingLeakTest.class); - suite.addTestSuite(IgniteCacheQueryNoRebalanceSelfTest.class); - suite.addTestSuite(GridCacheQueryTransformerSelfTest.class); - suite.addTestSuite(CacheScanQueryFailoverTest.class); - suite.addTestSuite(IgniteCachePrimitiveFieldsQuerySelfTest.class); - - suite.addTestSuite(IgniteCacheJoinQueryWithAffinityKeyTest.class); - suite.addTestSuite(IgniteCacheJoinPartitionedAndReplicatedTest.class); - suite.addTestSuite(IgniteCrossCachesJoinsQueryTest.class); - - suite.addTestSuite(IgniteCacheMultipleIndexedTypesTest.class); + suite.addTest(new JUnit4TestAdapter(LazyQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteSqlSplitterSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(SqlPushDownFunctionTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteSqlSegmentedIndexSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCachelessQueriesSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteSqlSegmentedIndexMultiNodeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteSqlSchemaIndexingTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheQueryIndexDisabledSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheQueryLoadSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheLocalQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheLocalAtomicQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheReplicatedQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheReplicatedQueryP2PDisabledSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheReplicatedQueryEvtsDisabledSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCachePartitionedQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCachePartitionedSnapshotEnabledQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheAtomicQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheAtomicNearEnabledQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCachePartitionedQueryP2PDisabledSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCachePartitionedQueryEvtsDisabledSelfTest.class)); + + suite.addTest(new JUnit4TestAdapter(IgniteCacheUnionDuplicatesTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheJoinPartitionedAndReplicatedCollocationTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteClientReconnectCacheQueriesFailoverTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteErrorOnRebalanceTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheQueryBuildValueTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheOffheapBatchIndexingMultiTypeTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheOffheapBatchIndexingBaseTest.class)); + + suite.addTest(new JUnit4TestAdapter(IgniteCacheQueryIndexSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheCollocatedQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheLargeResultSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheQueryInternalKeysSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(H2ResultSetIteratorNullifyOnEndSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteSqlBigIntegerKeyTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheOffheapEvictQueryTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheOffheapIndexScanTest.class)); + + suite.addTest(new JUnit4TestAdapter(IgniteCacheQueryAbstractDistributedJoinSelfTest.class)); + + suite.addTest(new JUnit4TestAdapter(GridCacheCrossCacheQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheQuerySerializationSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteBinaryObjectFieldsQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteStableBaselineBinObjFieldsQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteBinaryWrappedObjectFieldsQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheQueryH2IndexingLeakTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheQueryNoRebalanceSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheQueryTransformerSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheScanQueryFailoverTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCachePrimitiveFieldsQuerySelfTest.class)); + + suite.addTest(new JUnit4TestAdapter(IgniteCacheJoinQueryWithAffinityKeyTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheJoinPartitionedAndReplicatedTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCrossCachesJoinsQueryTest.class)); + + suite.addTest(new JUnit4TestAdapter(IgniteCacheMultipleIndexedTypesTest.class)); // DML. - suite.addTestSuite(IgniteCacheMergeSqlQuerySelfTest.class); - suite.addTestSuite(IgniteCacheInsertSqlQuerySelfTest.class); - suite.addTestSuite(IgniteCacheUpdateSqlQuerySelfTest.class); - suite.addTestSuite(IgniteCacheDeleteSqlQuerySelfTest.class); - suite.addTestSuite(IgniteSqlSkipReducerOnUpdateDmlSelfTest.class); - suite.addTestSuite(IgniteSqlSkipReducerOnUpdateDmlFlagSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheMergeSqlQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheInsertSqlQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheUpdateSqlQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheDeleteSqlQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteSqlSkipReducerOnUpdateDmlSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteSqlSkipReducerOnUpdateDmlFlagSelfTest.class)); - suite.addTestSuite(IgniteBinaryObjectQueryArgumentsTest.class); - suite.addTestSuite(IgniteBinaryObjectLocalQueryArgumentsTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteBinaryObjectQueryArgumentsTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteBinaryObjectLocalQueryArgumentsTest.class)); - suite.addTestSuite(IndexingSpiQuerySelfTest.class); - suite.addTestSuite(IndexingSpiQueryTxSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IndexingSpiQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IndexingSpiQueryTxSelfTest.class)); - suite.addTestSuite(IgniteCacheMultipleIndexedTypesTest.class); - suite.addTestSuite(IgniteSqlQueryMinMaxTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheMultipleIndexedTypesTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteSqlQueryMinMaxTest.class)); - suite.addTestSuite(GridCircularQueueTest.class); - suite.addTestSuite(IndexingSpiQueryWithH2IndexingSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridCircularQueueTest.class)); + suite.addTest(new JUnit4TestAdapter(IndexingSpiQueryWithH2IndexingSelfTest.class)); // DDL. - suite.addTestSuite(H2DynamicIndexTransactionalReplicatedSelfTest.class); - suite.addTestSuite(H2DynamicIndexTransactionalPartitionedSelfTest.class); - suite.addTestSuite(H2DynamicIndexTransactionalPartitionedNearSelfTest.class); - suite.addTestSuite(H2DynamicIndexAtomicReplicatedSelfTest.class); - suite.addTestSuite(H2DynamicIndexAtomicPartitionedSelfTest.class); - suite.addTestSuite(H2DynamicIndexAtomicPartitionedNearSelfTest.class); - suite.addTestSuite(H2DynamicTableSelfTest.class); - suite.addTestSuite(H2DynamicColumnsClientBasicSelfTest.class); - suite.addTestSuite(H2DynamicColumnsServerBasicSelfTest.class); - suite.addTestSuite(H2DynamicColumnsServerCoordinatorBasicSelfTest.class); + suite.addTest(new JUnit4TestAdapter(H2DynamicIndexTransactionalReplicatedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(H2DynamicIndexTransactionalPartitionedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(H2DynamicIndexTransactionalPartitionedNearSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(H2DynamicIndexAtomicReplicatedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(H2DynamicIndexAtomicPartitionedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(H2DynamicIndexAtomicPartitionedNearSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(H2DynamicTableSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(H2DynamicColumnsClientBasicSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(H2DynamicColumnsServerBasicSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(H2DynamicColumnsServerCoordinatorBasicSelfTest.class)); // DML+DDL. - suite.addTestSuite(H2DynamicIndexingComplexClientAtomicPartitionedTest.class); - suite.addTestSuite(H2DynamicIndexingComplexClientAtomicPartitionedNoBackupsTest.class); - suite.addTestSuite(H2DynamicIndexingComplexClientAtomicReplicatedTest.class); - suite.addTestSuite(H2DynamicIndexingComplexClientTransactionalPartitionedTest.class); - suite.addTestSuite(H2DynamicIndexingComplexClientTransactionalPartitionedNoBackupsTest.class); - suite.addTestSuite(H2DynamicIndexingComplexClientTransactionalReplicatedTest.class); - suite.addTestSuite(H2DynamicIndexingComplexServerAtomicPartitionedTest.class); - suite.addTestSuite(H2DynamicIndexingComplexServerAtomicPartitionedNoBackupsTest.class); - suite.addTestSuite(H2DynamicIndexingComplexServerAtomicReplicatedTest.class); - suite.addTestSuite(H2DynamicIndexingComplexServerTransactionalPartitionedTest.class); - suite.addTestSuite(H2DynamicIndexingComplexServerTransactionalPartitionedNoBackupsTest.class); - suite.addTestSuite(H2DynamicIndexingComplexServerTransactionalReplicatedTest.class); - - suite.addTestSuite(DdlTransactionSelfTest.class); + suite.addTest(new JUnit4TestAdapter(H2DynamicIndexingComplexClientAtomicPartitionedTest.class)); + suite.addTest(new JUnit4TestAdapter(H2DynamicIndexingComplexClientAtomicPartitionedNoBackupsTest.class)); + suite.addTest(new JUnit4TestAdapter(H2DynamicIndexingComplexClientAtomicReplicatedTest.class)); + suite.addTest(new JUnit4TestAdapter(H2DynamicIndexingComplexClientTransactionalPartitionedTest.class)); + suite.addTest(new JUnit4TestAdapter(H2DynamicIndexingComplexClientTransactionalPartitionedNoBackupsTest.class)); + suite.addTest(new JUnit4TestAdapter(H2DynamicIndexingComplexClientTransactionalReplicatedTest.class)); + suite.addTest(new JUnit4TestAdapter(H2DynamicIndexingComplexServerAtomicPartitionedTest.class)); + suite.addTest(new JUnit4TestAdapter(H2DynamicIndexingComplexServerAtomicPartitionedNoBackupsTest.class)); + suite.addTest(new JUnit4TestAdapter(H2DynamicIndexingComplexServerAtomicReplicatedTest.class)); + suite.addTest(new JUnit4TestAdapter(H2DynamicIndexingComplexServerTransactionalPartitionedTest.class)); + suite.addTest(new JUnit4TestAdapter(H2DynamicIndexingComplexServerTransactionalPartitionedNoBackupsTest.class)); + suite.addTest(new JUnit4TestAdapter(H2DynamicIndexingComplexServerTransactionalReplicatedTest.class)); + + suite.addTest(new JUnit4TestAdapter(DdlTransactionSelfTest.class)); // Fields queries. - suite.addTestSuite(SqlFieldsQuerySelfTest.class); - suite.addTestSuite(IgniteCacheLocalFieldsQuerySelfTest.class); - suite.addTestSuite(IgniteCacheReplicatedFieldsQuerySelfTest.class); - suite.addTestSuite(IgniteCacheReplicatedFieldsQueryROSelfTest.class); - suite.addTestSuite(IgniteCacheReplicatedFieldsQueryP2PEnabledSelfTest.class); - suite.addTestSuite(IgniteCacheReplicatedFieldsQueryJoinNoPrimaryPartitionsSelfTest.class); - suite.addTestSuite(IgniteCachePartitionedFieldsQuerySelfTest.class); - suite.addTestSuite(IgniteCacheAtomicFieldsQuerySelfTest.class); - suite.addTestSuite(IgniteCacheAtomicNearEnabledFieldsQuerySelfTest.class); - suite.addTestSuite(IgniteCachePartitionedFieldsQueryP2PEnabledSelfTest.class); - suite.addTestSuite(IgniteCacheFieldsQueryNoDataSelfTest.class); - suite.addTestSuite(GridCacheQueryIndexingDisabledSelfTest.class); - suite.addTestSuite(GridOrderedMessageCancelSelfTest.class); - suite.addTestSuite(CacheQueryEvictDataLostTest.class); + suite.addTest(new JUnit4TestAdapter(SqlFieldsQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheLocalFieldsQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheReplicatedFieldsQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheReplicatedFieldsQueryROSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheReplicatedFieldsQueryP2PEnabledSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheReplicatedFieldsQueryJoinNoPrimaryPartitionsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCachePartitionedFieldsQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheAtomicFieldsQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheAtomicNearEnabledFieldsQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCachePartitionedFieldsQueryP2PEnabledSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheFieldsQueryNoDataSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheQueryIndexingDisabledSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridOrderedMessageCancelSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheQueryEvictDataLostTest.class)); // Full text queries. - suite.addTestSuite(GridCacheFullTextQuerySelfTest.class); - suite.addTestSuite(IgniteCacheFullTextQueryNodeJoiningSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridCacheFullTextQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheFullTextQueryNodeJoiningSelfTest.class)); // Ignite cache and H2 comparison. - suite.addTestSuite(BaseH2CompareQueryTest.class); - suite.addTestSuite(H2CompareBigQueryTest.class); - suite.addTestSuite(H2CompareBigQueryDistributedJoinsTest.class); + suite.addTest(new JUnit4TestAdapter(BaseH2CompareQueryTest.class)); + suite.addTest(new JUnit4TestAdapter(H2CompareBigQueryTest.class)); + suite.addTest(new JUnit4TestAdapter(H2CompareBigQueryDistributedJoinsTest.class)); // Cache query metrics. - suite.addTestSuite(CacheLocalQueryMetricsSelfTest.class); - suite.addTestSuite(CachePartitionedQueryMetricsDistributedSelfTest.class); - suite.addTestSuite(CachePartitionedQueryMetricsLocalSelfTest.class); - suite.addTestSuite(CacheReplicatedQueryMetricsDistributedSelfTest.class); - suite.addTestSuite(CacheReplicatedQueryMetricsLocalSelfTest.class); + suite.addTest(new JUnit4TestAdapter(CacheLocalQueryMetricsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CachePartitionedQueryMetricsDistributedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CachePartitionedQueryMetricsLocalSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheReplicatedQueryMetricsDistributedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheReplicatedQueryMetricsLocalSelfTest.class)); // Cache query metrics. - suite.addTestSuite(CacheLocalQueryDetailMetricsSelfTest.class); - suite.addTestSuite(CachePartitionedQueryDetailMetricsDistributedSelfTest.class); - suite.addTestSuite(CachePartitionedQueryDetailMetricsLocalSelfTest.class); - suite.addTestSuite(CacheReplicatedQueryDetailMetricsDistributedSelfTest.class); - suite.addTestSuite(CacheReplicatedQueryDetailMetricsLocalSelfTest.class); + suite.addTest(new JUnit4TestAdapter(CacheLocalQueryDetailMetricsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CachePartitionedQueryDetailMetricsDistributedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CachePartitionedQueryDetailMetricsLocalSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheReplicatedQueryDetailMetricsDistributedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheReplicatedQueryDetailMetricsLocalSelfTest.class)); // Unmarshalling query test. - suite.addTestSuite(IgniteCacheP2pUnmarshallingQueryErrorTest.class); - suite.addTestSuite(IgniteCacheNoClassQuerySelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheP2pUnmarshallingQueryErrorTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheNoClassQuerySelfTest.class)); // Cancellation. - suite.addTestSuite(IgniteCacheDistributedQueryCancelSelfTest.class); - suite.addTestSuite(IgniteCacheLocalQueryCancelOrTimeoutSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheDistributedQueryCancelSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheLocalQueryCancelOrTimeoutSelfTest.class)); // Distributed joins. - suite.addTestSuite(H2CompareBigQueryDistributedJoinsTest.class); - suite.addTestSuite(IgniteCacheDistributedJoinCollocatedAndNotTest.class); - suite.addTestSuite(IgniteCacheDistributedJoinCustomAffinityMapper.class); - suite.addTestSuite(IgniteCacheDistributedJoinNoIndexTest.class); - suite.addTestSuite(IgniteCacheDistributedJoinPartitionedAndReplicatedTest.class); - suite.addTestSuite(IgniteCacheDistributedJoinQueryConditionsTest.class); - suite.addTestSuite(IgniteCacheDistributedJoinTest.class); - suite.addTestSuite(IgniteSqlDistributedJoinSelfTest.class); - suite.addTestSuite(IgniteSqlQueryParallelismTest.class); + suite.addTest(new JUnit4TestAdapter(H2CompareBigQueryDistributedJoinsTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheDistributedJoinCollocatedAndNotTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheDistributedJoinCustomAffinityMapper.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheDistributedJoinNoIndexTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheDistributedJoinPartitionedAndReplicatedTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheDistributedJoinQueryConditionsTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheDistributedJoinTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteSqlDistributedJoinSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteSqlQueryParallelismTest.class)); // Other. - suite.addTestSuite(CacheIteratorScanQueryTest.class); - suite.addTestSuite(CacheQueryNewClientSelfTest.class); - suite.addTestSuite(CacheOffheapBatchIndexingSingleTypeTest.class); - suite.addTestSuite(CacheSqlQueryValueCopySelfTest.class); - suite.addTestSuite(IgniteCacheQueryCacheDestroySelfTest.class); - suite.addTestSuite(IgniteQueryDedicatedPoolTest.class); - suite.addTestSuite(IgniteSqlEntryCacheModeAgnosticTest.class); - suite.addTestSuite(QueryEntityCaseMismatchTest.class); - suite.addTestSuite(IgniteCacheDistributedPartitionQuerySelfTest.class); - suite.addTestSuite(IgniteCacheDistributedPartitionQueryNodeRestartsSelfTest.class); - suite.addTestSuite(IgniteCacheDistributedPartitionQueryConfigurationSelfTest.class); - suite.addTestSuite(IgniteSqlKeyValueFieldsTest.class); - suite.addTestSuite(IgniteSqlRoutingTest.class); - suite.addTestSuite(IgniteSqlNotNullConstraintTest.class); - suite.addTestSuite(LongIndexNameTest.class); - suite.addTestSuite(GridCacheQuerySqlFieldInlineSizeSelfTest.class); - suite.addTestSuite(IgniteSqlParameterizedQueryTest.class); - suite.addTestSuite(H2ConnectionLeaksSelfTest.class); - suite.addTestSuite(IgniteCheckClusterStateBeforeExecuteQueryTest.class); - suite.addTestSuite(OptimizedMarshallerIndexNameTest.class); - suite.addTestSuite(SqlSystemViewsSelfTest.class); - - suite.addTestSuite(GridIndexRebuildSelfTest.class); - - suite.addTestSuite(SqlTransactionCommandsWithMvccDisabledSelfTest.class); - - suite.addTestSuite(IgniteSqlDefaultValueTest.class); - suite.addTestSuite(IgniteDecimalSelfTest.class); - suite.addTestSuite(IgniteSQLColumnConstraintsTest.class); - suite.addTestSuite(IgniteTransactionSQLColumnConstraintTest.class); - - suite.addTestSuite(IgniteCachePartitionedAtomicColumnConstraintsTest.class); - suite.addTestSuite(IgniteCachePartitionedTransactionalColumnConstraintsTest.class); - suite.addTestSuite(IgniteCachePartitionedTransactionalSnapshotColumnConstraintTest.class); - suite.addTestSuite(IgniteCacheReplicatedAtomicColumnConstraintsTest.class); - suite.addTestSuite(IgniteCacheReplicatedTransactionalColumnConstraintsTest.class); - suite.addTestSuite(IgniteCacheReplicatedTransactionalSnapshotColumnConstraintTest.class); + suite.addTest(new JUnit4TestAdapter(CacheIteratorScanQueryTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheQueryNewClientSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheOffheapBatchIndexingSingleTypeTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheSqlQueryValueCopySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheQueryCacheDestroySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteQueryDedicatedPoolTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteSqlEntryCacheModeAgnosticTest.class)); + suite.addTest(new JUnit4TestAdapter(QueryEntityCaseMismatchTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheDistributedPartitionQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheDistributedPartitionQueryNodeRestartsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheDistributedPartitionQueryConfigurationSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteSqlKeyValueFieldsTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteSqlRoutingTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteSqlNotNullConstraintTest.class)); + suite.addTest(new JUnit4TestAdapter(LongIndexNameTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheQuerySqlFieldInlineSizeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteSqlParameterizedQueryTest.class)); + suite.addTest(new JUnit4TestAdapter(H2ConnectionLeaksSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCheckClusterStateBeforeExecuteQueryTest.class)); + suite.addTest(new JUnit4TestAdapter(OptimizedMarshallerIndexNameTest.class)); + suite.addTest(new JUnit4TestAdapter(SqlSystemViewsSelfTest.class)); + + suite.addTest(new JUnit4TestAdapter(GridIndexRebuildSelfTest.class)); + + suite.addTest(new JUnit4TestAdapter(SqlTransactionCommandsWithMvccDisabledSelfTest.class)); + + suite.addTest(new JUnit4TestAdapter(IgniteSqlDefaultValueTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteDecimalSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteSQLColumnConstraintsTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteTransactionSQLColumnConstraintTest.class)); + + suite.addTest(new JUnit4TestAdapter(IgniteCachePartitionedAtomicColumnConstraintsTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCachePartitionedTransactionalColumnConstraintsTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCachePartitionedTransactionalSnapshotColumnConstraintTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheReplicatedAtomicColumnConstraintsTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheReplicatedTransactionalColumnConstraintsTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheReplicatedTransactionalSnapshotColumnConstraintTest.class)); // H2 Rows on-heap cache - suite.addTestSuite(H2RowCacheSelfTest.class); - suite.addTestSuite(H2RowCachePageEvictionTest.class); + suite.addTest(new JUnit4TestAdapter(H2RowCacheSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(H2RowCachePageEvictionTest.class)); // User operation SQL - suite.addTestSuite(SqlParserUserSelfTest.class); - suite.addTestSuite(SqlUserCommandSelfTest.class); - suite.addTestSuite(EncryptedSqlTableTest.class); + suite.addTest(new JUnit4TestAdapter(SqlParserUserSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(SqlUserCommandSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(EncryptedSqlTableTest.class)); - suite.addTestSuite(ThreadLocalObjectPoolSelfTest.class); - suite.addTestSuite(H2StatementCacheSelfTest.class); - suite.addTestSuite(PreparedStatementExSelfTest.class); + suite.addTest(new JUnit4TestAdapter(ThreadLocalObjectPoolSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(H2StatementCacheSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(PreparedStatementExSelfTest.class)); // Partition loss. - suite.addTestSuite(IndexingCachePartitionLossPolicySelfTest.class); + suite.addTest(new JUnit4TestAdapter(IndexingCachePartitionLossPolicySelfTest.class)); // GROUP_CONCAT - suite.addTestSuite(IgniteSqlGroupConcatCollocatedTest.class); - suite.addTestSuite(IgniteSqlGroupConcatNotCollocatedTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteSqlGroupConcatCollocatedTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteSqlGroupConcatNotCollocatedTest.class)); // Binary - suite.addTestSuite(BinarySerializationQuerySelfTest.class); - suite.addTestSuite(BinarySerializationQueryWithReflectiveSerializerSelfTest.class); - suite.addTestSuite(IgniteCacheBinaryObjectsScanSelfTest.class); - suite.addTestSuite(IgniteCacheBinaryObjectsScanWithEventsSelfTest.class); - suite.addTestSuite(BigEntryQueryTest.class); - suite.addTestSuite(BinaryMetadataConcurrentUpdateWithIndexesTest.class); + suite.addTest(new JUnit4TestAdapter(BinarySerializationQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(BinarySerializationQueryWithReflectiveSerializerSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheBinaryObjectsScanSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheBinaryObjectsScanWithEventsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(BigEntryQueryTest.class)); + suite.addTest(new JUnit4TestAdapter(BinaryMetadataConcurrentUpdateWithIndexesTest.class)); // Partition pruning. - suite.addTestSuite(InOperationExtractPartitionSelfTest.class); + suite.addTest(new JUnit4TestAdapter(InOperationExtractPartitionSelfTest.class)); - suite.addTestSuite(GridCacheDynamicLoadOnClientTest.class); - suite.addTestSuite(GridCacheDynamicLoadOnClientPersistentTest.class); + suite.addTest(new JUnit4TestAdapter(GridCacheDynamicLoadOnClientTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheDynamicLoadOnClientPersistentTest.class)); return suite; } diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite2.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite2.java index 337ed6f8aeb10..d4478fe69a8cf 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite2.java +++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite2.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.CacheScanPartitionQueryFallbackSelfTest; import org.apache.ignite.internal.processors.cache.IgniteCacheCrossCacheJoinRandomTest; @@ -66,67 +67,66 @@ public class IgniteBinaryCacheQueryTestSuite2 extends TestSuite { /** * @return Test suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new IgniteTestSuite("Ignite Cache Queries Test Suite 2"); // Dynamic index create/drop tests. - suite.addTestSuite(DynamicIndexPartitionedAtomicConcurrentSelfTest.class); - suite.addTestSuite(DynamicIndexPartitionedTransactionalConcurrentSelfTest.class); - suite.addTestSuite(DynamicIndexReplicatedAtomicConcurrentSelfTest.class); - suite.addTestSuite(DynamicIndexReplicatedTransactionalConcurrentSelfTest.class); + suite.addTest(new JUnit4TestAdapter(DynamicIndexPartitionedAtomicConcurrentSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(DynamicIndexPartitionedTransactionalConcurrentSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(DynamicIndexReplicatedAtomicConcurrentSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(DynamicIndexReplicatedTransactionalConcurrentSelfTest.class)); - suite.addTestSuite(DynamicColumnsConcurrentAtomicPartitionedSelfTest.class); - suite.addTestSuite(DynamicColumnsConcurrentTransactionalPartitionedSelfTest.class); - suite.addTestSuite(DynamicColumnsConcurrentAtomicReplicatedSelfTest.class); - suite.addTestSuite(DynamicColumnsConcurrentTransactionalReplicatedSelfTest.class); + suite.addTest(new JUnit4TestAdapter(DynamicColumnsConcurrentAtomicPartitionedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(DynamicColumnsConcurrentTransactionalPartitionedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(DynamicColumnsConcurrentAtomicReplicatedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(DynamicColumnsConcurrentTransactionalReplicatedSelfTest.class)); // Distributed joins. - suite.addTestSuite(IgniteCacheQueryNodeRestartDistributedJoinSelfTest.class); - suite.addTestSuite(IgniteCacheQueryStopOnCancelOrTimeoutDistributedJoinSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheQueryNodeRestartDistributedJoinSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheQueryStopOnCancelOrTimeoutDistributedJoinSelfTest.class)); // Other tests. - suite.addTestSuite(IgniteCacheQueryMultiThreadedSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheQueryMultiThreadedSelfTest.class)); - suite.addTestSuite(IgniteCacheQueryEvictsMultiThreadedSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheQueryEvictsMultiThreadedSelfTest.class)); - suite.addTestSuite(ScanQueryOffheapExpiryPolicySelfTest.class); + suite.addTest(new JUnit4TestAdapter(ScanQueryOffheapExpiryPolicySelfTest.class)); - suite.addTestSuite(IgniteCacheCrossCacheJoinRandomTest.class); - suite.addTestSuite(IgniteCacheClientQueryReplicatedNodeRestartSelfTest.class); - suite.addTestSuite(IgniteCacheQueryNodeFailTest.class); - suite.addTestSuite(IgniteCacheQueryNodeRestartSelfTest.class); - suite.addTestSuite(IgniteSqlQueryWithBaselineTest.class); - suite.addTestSuite(IgniteChangingBaselineCacheQueryNodeRestartSelfTest.class); - suite.addTestSuite(IgniteStableBaselineCacheQueryNodeRestartsSelfTest.class); - suite.addTestSuite(IgniteCacheQueryNodeRestartSelfTest2.class); - suite.addTestSuite(IgniteCacheQueryNodeRestartTxSelfTest.class); - suite.addTestSuite(IgniteCacheSqlQueryMultiThreadedSelfTest.class); - suite.addTestSuite(IgniteCachePartitionedQueryMultiThreadedSelfTest.class); - suite.addTestSuite(CacheScanPartitionQueryFallbackSelfTest.class); - suite.addTestSuite(IgniteCacheDistributedQueryStopOnCancelOrTimeoutSelfTest.class); - suite.addTestSuite(IgniteCacheObjectKeyIndexingSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheCrossCacheJoinRandomTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheClientQueryReplicatedNodeRestartSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheQueryNodeFailTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheQueryNodeRestartSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteSqlQueryWithBaselineTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteChangingBaselineCacheQueryNodeRestartSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteStableBaselineCacheQueryNodeRestartsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheQueryNodeRestartSelfTest2.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheQueryNodeRestartTxSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheSqlQueryMultiThreadedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCachePartitionedQueryMultiThreadedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheScanPartitionQueryFallbackSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheDistributedQueryStopOnCancelOrTimeoutSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheObjectKeyIndexingSelfTest.class)); - suite.addTestSuite(IgniteCacheGroupsCompareQueryTest.class); - suite.addTestSuite(IgniteCacheGroupsSqlSegmentedIndexSelfTest.class); - suite.addTestSuite(IgniteCacheGroupsSqlSegmentedIndexMultiNodeSelfTest.class); - suite.addTestSuite(IgniteCacheGroupsSqlDistributedJoinSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheGroupsCompareQueryTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheGroupsSqlSegmentedIndexSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheGroupsSqlSegmentedIndexMultiNodeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheGroupsSqlDistributedJoinSelfTest.class)); - suite.addTestSuite(QueryJoinWithDifferentNodeFiltersTest.class); + suite.addTest(new JUnit4TestAdapter(QueryJoinWithDifferentNodeFiltersTest.class)); - suite.addTestSuite(CacheQueryMemoryLeakTest.class); + suite.addTest(new JUnit4TestAdapter(CacheQueryMemoryLeakTest.class)); - suite.addTestSuite(CreateTableWithDateKeySelfTest.class); + suite.addTest(new JUnit4TestAdapter(CreateTableWithDateKeySelfTest.class)); - suite.addTestSuite(NonCollocatedRetryMessageSelfTest.class); - suite.addTestSuite(RetryCauseMessageSelfTest.class); - suite.addTestSuite(DisappearedCacheCauseRetryMessageSelfTest.class); - suite.addTestSuite(DisappearedCacheWasNotFoundMessageSelfTest.class); + suite.addTest(new JUnit4TestAdapter(NonCollocatedRetryMessageSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(RetryCauseMessageSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(DisappearedCacheCauseRetryMessageSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(DisappearedCacheWasNotFoundMessageSelfTest.class)); - suite.addTestSuite(TableViewSubquerySelfTest.class); + suite.addTest(new JUnit4TestAdapter(TableViewSubquerySelfTest.class)); - suite.addTestSuite(IgniteCacheQueriesLoadTest1.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheQueriesLoadTest1.class)); return suite; } diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheAffinityRunTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheAffinityRunTestSuite.java index e9c7b79c6f73d..7ea53fc69daab 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheAffinityRunTestSuite.java +++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheAffinityRunTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.IgniteCacheLockPartitionOnAffinityRunAtomicCacheOpTest; import org.apache.ignite.internal.processors.cache.IgniteCacheLockPartitionOnAffinityRunTest; @@ -32,18 +33,17 @@ public class IgniteCacheAffinityRunTestSuite extends TestSuite { /** * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite Compute and Cache Affinity Run Test Suite"); - suite.addTestSuite(IgniteCacheLockPartitionOnAffinityRunTest.class); - suite.addTestSuite(IgniteCacheLockPartitionOnAffinityRunWithCollisionSpiTest.class); - suite.addTestSuite(IgniteCacheLockPartitionOnAffinityRunAtomicCacheOpTest.class); - suite.addTestSuite(IgniteBaselineLockPartitionOnAffinityRunAtomicCacheTest.class); - suite.addTestSuite(IgniteBaselineLockPartitionOnAffinityRunTxCacheTest.class); - suite.addTestSuite(IgniteCacheLockPartitionOnAffinityRunTxCacheOpTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheLockPartitionOnAffinityRunTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheLockPartitionOnAffinityRunWithCollisionSpiTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheLockPartitionOnAffinityRunAtomicCacheOpTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteBaselineLockPartitionOnAffinityRunAtomicCacheTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteBaselineLockPartitionOnAffinityRunTxCacheTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheLockPartitionOnAffinityRunTxCacheOpTest.class)); return suite; } -} \ No newline at end of file +} diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheBlockExchangeOnSqlReadOperationsTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheBlockExchangeOnSqlReadOperationsTestSuite.java index 3be640ba01d30..4fa8f5ded3cc0 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheBlockExchangeOnSqlReadOperationsTestSuite.java +++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheBlockExchangeOnSqlReadOperationsTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.distributed.CacheBlockOnCreateDestoryIndexTest; import org.apache.ignite.internal.processors.cache.distributed.CacheBlockOnSqlQueryTest; @@ -31,8 +32,8 @@ public class IgniteCacheBlockExchangeOnSqlReadOperationsTestSuite extends TestSu public static TestSuite suite() { TestSuite suite = new TestSuite("Do Not Block Read Operations Test Suite"); - suite.addTestSuite(CacheBlockOnSqlQueryTest.class); - suite.addTestSuite(CacheBlockOnCreateDestoryIndexTest.class); + suite.addTest(new JUnit4TestAdapter(CacheBlockOnSqlQueryTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheBlockOnCreateDestoryIndexTest.class)); return suite; } diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccSqlTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccSqlTestSuite.java index 15045c9f6e9c5..c2d31f96ff09b 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccSqlTestSuite.java +++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccSqlTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.configuration.NearCacheConfiguration; @@ -84,78 +85,78 @@ public static TestSuite suite() { TestSuite suite = new TestSuite("IgniteCache SQL MVCC Test Suite"); // Simple tests. - suite.addTestSuite(MvccEmptyTransactionSelfTest.class); - suite.addTestSuite(CacheMvccSqlConfigurationValidationTest.class); - suite.addTestSuite(CacheMvccDmlSimpleTest.class); - suite.addTestSuite(SqlTransactionsCommandsWithMvccEnabledSelfTest.class); - suite.addTestSuite(CacheMvccSizeTest.class); - suite.addTestSuite(CacheMvccSqlUpdateCountersTest.class); - suite.addTestSuite(CacheMvccSqlLockTimeoutTest.class); + suite.addTest(new JUnit4TestAdapter(MvccEmptyTransactionSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheMvccSqlConfigurationValidationTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheMvccDmlSimpleTest.class)); + suite.addTest(new JUnit4TestAdapter(SqlTransactionsCommandsWithMvccEnabledSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheMvccSizeTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheMvccSqlUpdateCountersTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheMvccSqlLockTimeoutTest.class)); - suite.addTestSuite(GridIndexRebuildWithMvccEnabledSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridIndexRebuildWithMvccEnabledSelfTest.class)); - suite.addTestSuite(CacheMvccTxNodeMappingTest.class); + suite.addTest(new JUnit4TestAdapter(CacheMvccTxNodeMappingTest.class)); // SQL vs CacheAPI consistency. - suite.addTestSuite(MvccRepeatableReadOperationsTest.class); - suite.addTestSuite(MvccRepeatableReadBulkOpsTest.class); + suite.addTest(new JUnit4TestAdapter(MvccRepeatableReadOperationsTest.class)); + suite.addTest(new JUnit4TestAdapter(MvccRepeatableReadBulkOpsTest.class)); // JDBC tests. - suite.addTestSuite(CacheMvccSizeWithConcurrentJdbcTransactionTest.class); - suite.addTestSuite(CacheMvccScanQueryWithConcurrentJdbcTransactionTest.class); - suite.addTestSuite(CacheMvccLocalEntriesWithConcurrentJdbcTransactionTest.class); - suite.addTestSuite(CacheMvccIteratorWithConcurrentJdbcTransactionTest.class); + suite.addTest(new JUnit4TestAdapter(CacheMvccSizeWithConcurrentJdbcTransactionTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheMvccScanQueryWithConcurrentJdbcTransactionTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheMvccLocalEntriesWithConcurrentJdbcTransactionTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheMvccIteratorWithConcurrentJdbcTransactionTest.class)); // Load tests. - suite.addTestSuite(CacheMvccBulkLoadTest.class); - suite.addTestSuite(CacheMvccStreamingInsertTest.class); + suite.addTest(new JUnit4TestAdapter(CacheMvccBulkLoadTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheMvccStreamingInsertTest.class)); - suite.addTestSuite(CacheMvccPartitionedSqlQueriesTest.class); - suite.addTestSuite(CacheMvccReplicatedSqlQueriesTest.class); - suite.addTestSuite(CacheMvccPartitionedSqlTxQueriesTest.class); - suite.addTestSuite(CacheMvccReplicatedSqlTxQueriesTest.class); + suite.addTest(new JUnit4TestAdapter(CacheMvccPartitionedSqlQueriesTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheMvccReplicatedSqlQueriesTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheMvccPartitionedSqlTxQueriesTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheMvccReplicatedSqlTxQueriesTest.class)); - suite.addTestSuite(CacheMvccPartitionedSqlTxQueriesWithReducerTest.class); - suite.addTestSuite(CacheMvccReplicatedSqlTxQueriesWithReducerTest.class); - suite.addTestSuite(CacheMvccPartitionedSelectForUpdateQueryTest.class); - suite.addTestSuite(CacheMvccReplicatedSelectForUpdateQueryTest.class); + suite.addTest(new JUnit4TestAdapter(CacheMvccPartitionedSqlTxQueriesWithReducerTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheMvccReplicatedSqlTxQueriesWithReducerTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheMvccPartitionedSelectForUpdateQueryTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheMvccReplicatedSelectForUpdateQueryTest.class)); // Failover tests. - suite.addTestSuite(CacheMvccPartitionedBackupsTest.class); - suite.addTestSuite(CacheMvccReplicatedBackupsTest.class); + suite.addTest(new JUnit4TestAdapter(CacheMvccPartitionedBackupsTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheMvccReplicatedBackupsTest.class)); - suite.addTestSuite(CacheMvccPartitionedSqlCoordinatorFailoverTest.class); - suite.addTestSuite(CacheMvccReplicatedSqlCoordinatorFailoverTest.class); + suite.addTest(new JUnit4TestAdapter(CacheMvccPartitionedSqlCoordinatorFailoverTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheMvccReplicatedSqlCoordinatorFailoverTest.class)); // Continuous queries. - suite.addTestSuite(CacheMvccBasicContinuousQueryTest.class); - suite.addTestSuite(CacheMvccContinuousQueryPartitionedSelfTest.class); - suite.addTestSuite(CacheMvccContinuousQueryReplicatedSelfTest.class); - suite.addTestSuite(CacheMvccSqlContinuousQueryPartitionedSelfTest.class); - suite.addTestSuite(CacheMvccSqlContinuousQueryReplicatedSelfTest.class); + suite.addTest(new JUnit4TestAdapter(CacheMvccBasicContinuousQueryTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheMvccContinuousQueryPartitionedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheMvccContinuousQueryReplicatedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheMvccSqlContinuousQueryPartitionedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheMvccSqlContinuousQueryReplicatedSelfTest.class)); - suite.addTestSuite(CacheMvccContinuousQueryPartitionedTxOneNodeTest.class); - suite.addTestSuite(CacheMvccContinuousQueryReplicatedTxOneNodeTest.class); + suite.addTest(new JUnit4TestAdapter(CacheMvccContinuousQueryPartitionedTxOneNodeTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheMvccContinuousQueryReplicatedTxOneNodeTest.class)); - suite.addTestSuite(CacheMvccContinuousQueryClientReconnectTest.class); - suite.addTestSuite(CacheMvccContinuousQueryClientTest.class); + suite.addTest(new JUnit4TestAdapter(CacheMvccContinuousQueryClientReconnectTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheMvccContinuousQueryClientTest.class)); - suite.addTestSuite(CacheMvccContinuousQueryMultiNodesFilteringTest.class); - suite.addTestSuite(CacheMvccContinuousQueryBackupQueueTest.class); - suite.addTestSuite(CacheMvccContinuousQueryImmutableEntryTest.class); - suite.addTestSuite(CacheMvccClientReconnectContinuousQueryTest.class); + suite.addTest(new JUnit4TestAdapter(CacheMvccContinuousQueryMultiNodesFilteringTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheMvccContinuousQueryBackupQueueTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheMvccContinuousQueryImmutableEntryTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheMvccClientReconnectContinuousQueryTest.class)); - suite.addTestSuite(CacheMvccContinuousWithTransformerClientSelfTest.class); - suite.addTestSuite(CacheMvccContinuousWithTransformerPartitionedSelfTest.class); - suite.addTestSuite(CacheMvccContinuousWithTransformerReplicatedSelfTest.class); + suite.addTest(new JUnit4TestAdapter(CacheMvccContinuousWithTransformerClientSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheMvccContinuousWithTransformerPartitionedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheMvccContinuousWithTransformerReplicatedSelfTest.class)); // Transaction recovery. - suite.addTestSuite(CacheMvccTxRecoveryTest.class); + suite.addTest(new JUnit4TestAdapter(CacheMvccTxRecoveryTest.class)); - suite.addTestSuite(MvccPartitionedPrimaryNodeFailureRecoveryTest.class); - suite.addTestSuite(MvccPartitionedTwoBackupsPrimaryNodeFailureRecoveryTest.class); - suite.addTestSuite(MvccColocatedTxPessimisticOriginatingNodeFailureRecoveryTest.class); - suite.addTestSuite(MvccReplicatedTxPessimisticOriginatingNodeFailureRecoveryTest.class); + suite.addTest(new JUnit4TestAdapter(MvccPartitionedPrimaryNodeFailureRecoveryTest.class)); + suite.addTest(new JUnit4TestAdapter(MvccPartitionedTwoBackupsPrimaryNodeFailureRecoveryTest.class)); + suite.addTest(new JUnit4TestAdapter(MvccColocatedTxPessimisticOriginatingNodeFailureRecoveryTest.class)); + suite.addTest(new JUnit4TestAdapter(MvccReplicatedTxPessimisticOriginatingNodeFailureRecoveryTest.class)); return suite; } diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite3.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite3.java index 433aa2247edaf..02633e9793d48 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite3.java +++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite3.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousBatchForceServerModeAckTest; import org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryConcurrentPartitionUpdateTest; @@ -48,45 +49,44 @@ public class IgniteCacheQuerySelfTestSuite3 extends TestSuite { /** * @return Test suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite Cache Continuous Queries Test Suite"); // Continuous queries 1. - suite.addTestSuite(GridCacheContinuousQueryNodesFilteringTest.class); - suite.addTestSuite(GridCacheContinuousQueryPartitionTxOneNodeTest.class); - suite.addTestSuite(CacheContinuousWithTransformerReplicatedSelfTest.class); - suite.addTestSuite(CacheContinuousQueryExecuteInPrimaryTest.class); - suite.addTestSuite(CacheContinuousWithTransformerClientSelfTest.class); - suite.addTestSuite(ClientReconnectContinuousQueryTest.class); - suite.addTestSuite(IgniteCacheContinuousQueryNoUnsubscribeTest.class); - suite.addTestSuite(IgniteCacheContinuousQueryClientTxReconnectTest.class); - suite.addTestSuite(IgniteCacheContinuousQueryClientReconnectTest.class); - suite.addTestSuite(GridCacheContinuousQueryAtomicSelfTest.class); - suite.addTestSuite(GridCacheContinuousQueryAtomicNearEnabledSelfTest.class); - suite.addTestSuite(GridCacheContinuousQueryPartitionTxOneNodeTest.class); - suite.addTestSuite(IgniteCacheContinuousQueryClientReconnectTest.class); - suite.addTestSuite(IgniteCacheContinuousQueryClientTxReconnectTest.class); - suite.addTestSuite(GridCacheContinuousQueryReplicatedSelfTest.class); - suite.addTestSuite(CacheContinuousQueryFactoryAsyncFilterRandomOperationTest.class); - suite.addTestSuite(GridCacheContinuousQueryPartitionedSelfTest.class); - suite.addTestSuite(CacheContinuousBatchForceServerModeAckTest.class); - suite.addTestSuite(CacheContinuousQueryExecuteInPrimaryTest.class); - suite.addTestSuite(GridCacheContinuousQueryNodesFilteringTest.class); - suite.addTestSuite(IgniteCacheContinuousQueryNoUnsubscribeTest.class); - suite.addTestSuite(ClientReconnectContinuousQueryTest.class); - suite.addTestSuite(ContinuousQueryReassignmentTest.class); - suite.addTestSuite(CacheContinuousQueryConcurrentPartitionUpdateTest.class); - suite.addTestSuite(CacheContinuousQueryFactoryAsyncFilterRandomOperationTest.class); + suite.addTest(new JUnit4TestAdapter(GridCacheContinuousQueryNodesFilteringTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheContinuousQueryPartitionTxOneNodeTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheContinuousWithTransformerReplicatedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheContinuousQueryExecuteInPrimaryTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheContinuousWithTransformerClientSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(ClientReconnectContinuousQueryTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheContinuousQueryNoUnsubscribeTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheContinuousQueryClientTxReconnectTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheContinuousQueryClientReconnectTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheContinuousQueryAtomicSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheContinuousQueryAtomicNearEnabledSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheContinuousQueryPartitionTxOneNodeTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheContinuousQueryClientReconnectTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheContinuousQueryClientTxReconnectTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheContinuousQueryReplicatedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheContinuousQueryFactoryAsyncFilterRandomOperationTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheContinuousQueryPartitionedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheContinuousBatchForceServerModeAckTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheContinuousQueryExecuteInPrimaryTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheContinuousQueryNodesFilteringTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheContinuousQueryNoUnsubscribeTest.class)); + suite.addTest(new JUnit4TestAdapter(ClientReconnectContinuousQueryTest.class)); + suite.addTest(new JUnit4TestAdapter(ContinuousQueryReassignmentTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheContinuousQueryConcurrentPartitionUpdateTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheContinuousQueryFactoryAsyncFilterRandomOperationTest.class)); - suite.addTestSuite(CacheContinuousQueryCounterPartitionedAtomicTest.class); - suite.addTestSuite(CacheContinuousQueryCounterPartitionedTxTest.class); - suite.addTestSuite(CacheContinuousQueryCounterReplicatedAtomicTest.class); - suite.addTestSuite(CacheContinuousQueryCounterReplicatedTxTest.class); - suite.addTestSuite(CacheContinuousQueryFailoverAtomicNearEnabledSelfSelfTest.class); + suite.addTest(new JUnit4TestAdapter(CacheContinuousQueryCounterPartitionedAtomicTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheContinuousQueryCounterPartitionedTxTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheContinuousQueryCounterReplicatedAtomicTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheContinuousQueryCounterReplicatedTxTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheContinuousQueryFailoverAtomicNearEnabledSelfSelfTest.class)); - suite.addTestSuite(IgniteCacheContinuousQueryReconnectTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheContinuousQueryReconnectTest.class)); return suite; } diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite4.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite4.java index 147eb47875259..d39fce9fa36b6 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite4.java +++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite4.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryAsyncFailoverAtomicSelfTest; import org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryAsyncFailoverMvccTxSelfTest; @@ -35,23 +36,22 @@ public class IgniteCacheQuerySelfTestSuite4 extends TestSuite { /** * @return Test suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite Cache Queries Test Suite 4"); // Continuous queries failover tests. - suite.addTestSuite(CacheContinuousQueryFailoverAtomicSelfTest.class); - suite.addTestSuite(CacheContinuousQueryFailoverAtomicReplicatedSelfTest.class); - suite.addTestSuite(CacheContinuousQueryFailoverTxSelfTest.class); - suite.addTestSuite(CacheContinuousQueryFailoverTxReplicatedSelfTest.class); - suite.addTestSuite(CacheContinuousQueryFailoverMvccTxSelfTest.class); - suite.addTestSuite(CacheContinuousQueryFailoverMvccTxReplicatedSelfTest.class); + suite.addTest(new JUnit4TestAdapter(CacheContinuousQueryFailoverAtomicSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheContinuousQueryFailoverAtomicReplicatedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheContinuousQueryFailoverTxSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheContinuousQueryFailoverTxReplicatedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheContinuousQueryFailoverMvccTxSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheContinuousQueryFailoverMvccTxReplicatedSelfTest.class)); - suite.addTestSuite(CacheContinuousQueryAsyncFailoverAtomicSelfTest.class); - suite.addTestSuite(CacheContinuousQueryAsyncFailoverTxReplicatedSelfTest.class); - suite.addTestSuite(CacheContinuousQueryAsyncFailoverTxSelfTest.class); - suite.addTestSuite(CacheContinuousQueryAsyncFailoverMvccTxSelfTest.class); + suite.addTest(new JUnit4TestAdapter(CacheContinuousQueryAsyncFailoverAtomicSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheContinuousQueryAsyncFailoverTxReplicatedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheContinuousQueryAsyncFailoverTxSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheContinuousQueryAsyncFailoverMvccTxSelfTest.class)); return suite; } diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite5.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite5.java index 6fb542e2c8e2f..882757aa27d35 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite5.java +++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite5.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryEventBufferTest; import org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryFactoryFilterRandomOperationTest; @@ -43,30 +44,29 @@ public class IgniteCacheQuerySelfTestSuite5 extends TestSuite { /** * @return Test suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite Cache Continuous Queries Test Suite 2"); // Continuous queries 2. - suite.addTestSuite(IgniteCacheContinuousQueryImmutableEntryTest.class); - suite.addTestSuite(CacheContinuousWithTransformerLocalSelfTest.class); - suite.addTestSuite(CacheContinuousQueryEventBufferTest.class); - suite.addTestSuite(GridCacheContinuousQueryReplicatedTxOneNodeTest.class); - suite.addTestSuite(GridCacheContinuousQueryLocalSelfTest.class); - suite.addTestSuite(CacheContinuousWithTransformerFailoverTest.class); - suite.addTestSuite(ContinuousQueryRemoteFilterMissingInClassPathSelfTest.class); - suite.addTestSuite(ContinuousQueryPeerClassLoadingTest.class); - suite.addTestSuite(GridCacheContinuousQueryAtomicP2PDisabledSelfTest.class); - suite.addTestSuite(GridCacheContinuousQueryTxSelfTest.class); - suite.addTestSuite(GridCacheContinuousQueryReplicatedP2PDisabledSelfTest.class); - suite.addTestSuite(GridCacheContinuousQueryPartitionedP2PDisabledSelfTest.class); - suite.addTestSuite(CacheContinuousQueryLostPartitionTest.class); - suite.addTestSuite(GridCacheContinuousQueryConcurrentTest.class); - suite.addTestSuite(CacheContinuousQueryRandomOperationsTwoNodesTest.class); - suite.addTestSuite(IgniteCacheContinuousQueryBackupQueueTest.class); - suite.addTestSuite(CacheContinuousQueryOperationFromCallbackTest.class); - suite.addTestSuite(CacheContinuousQueryFactoryFilterRandomOperationTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheContinuousQueryImmutableEntryTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheContinuousWithTransformerLocalSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheContinuousQueryEventBufferTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheContinuousQueryReplicatedTxOneNodeTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheContinuousQueryLocalSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheContinuousWithTransformerFailoverTest.class)); + suite.addTest(new JUnit4TestAdapter(ContinuousQueryRemoteFilterMissingInClassPathSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(ContinuousQueryPeerClassLoadingTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheContinuousQueryAtomicP2PDisabledSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheContinuousQueryTxSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheContinuousQueryReplicatedP2PDisabledSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheContinuousQueryPartitionedP2PDisabledSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheContinuousQueryLostPartitionTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheContinuousQueryConcurrentTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheContinuousQueryRandomOperationsTwoNodesTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheContinuousQueryBackupQueueTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheContinuousQueryOperationFromCallbackTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheContinuousQueryFactoryFilterRandomOperationTest.class)); return suite; } diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite6.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite6.java index 9727b181507ba..846e6487b0695 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite6.java +++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite6.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousBatchAckTest; import org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryAsyncFilterListenerTest; @@ -43,30 +44,29 @@ public class IgniteCacheQuerySelfTestSuite6 extends TestSuite { /** * @return Test suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite Cache Continuous Queries Test Suite 3"); // Continuous queries 3. - suite.addTestSuite(GridCacheContinuousQueryPartitionAtomicOneNodeTest.class); - suite.addTestSuite(CacheContinuousWithTransformerPartitionedSelfTest.class); - suite.addTestSuite(GridCacheContinuousQueryLocalAtomicSelfTest.class); - suite.addTestSuite(GridCacheContinuousQueryReplicatedAtomicOneNodeTest.class); - suite.addTestSuite(ContinuousQueryMarshallerTest.class); - suite.addTestSuite(GridCacheContinuousQueryReplicatedAtomicSelfTest.class); - suite.addTestSuite(CacheKeepBinaryIterationTest.class); - suite.addTestSuite(GridCacheContinuousQueryMultiNodesFilteringTest.class); - suite.addTestSuite(CacheKeepBinaryIterationStoreEnabledTest.class); - suite.addTestSuite(CacheKeepBinaryIterationNearEnabledTest.class); - suite.addTestSuite(GridCacheContinuousQueryPartitionedOnlySelfTest.class); - suite.addTestSuite(CacheContinuousQueryOperationP2PTest.class); - suite.addTestSuite(CacheContinuousBatchAckTest.class); - suite.addTestSuite(CacheContinuousQueryOrderingEventTest.class); - suite.addTestSuite(IgniteCacheContinuousQueryClientTest.class); - suite.addTestSuite(CacheContinuousQueryAsyncFilterListenerTest.class); - suite.addTestSuite(CacheContinuousWithTransformerRandomOperationsTest.class); - suite.addTestSuite(CacheContinuousQueryRandomOperationsTest.class); + suite.addTest(new JUnit4TestAdapter(GridCacheContinuousQueryPartitionAtomicOneNodeTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheContinuousWithTransformerPartitionedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheContinuousQueryLocalAtomicSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheContinuousQueryReplicatedAtomicOneNodeTest.class)); + suite.addTest(new JUnit4TestAdapter(ContinuousQueryMarshallerTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheContinuousQueryReplicatedAtomicSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheKeepBinaryIterationTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheContinuousQueryMultiNodesFilteringTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheKeepBinaryIterationStoreEnabledTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheKeepBinaryIterationNearEnabledTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheContinuousQueryPartitionedOnlySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheContinuousQueryOperationP2PTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheContinuousBatchAckTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheContinuousQueryOrderingEventTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheContinuousQueryClientTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheContinuousQueryAsyncFilterListenerTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheContinuousWithTransformerRandomOperationsTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheContinuousQueryRandomOperationsTest.class)); return suite; } diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheWithIndexingAndPersistenceTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheWithIndexingAndPersistenceTestSuite.java index 2f3ddecef0d66..23f07215b04e7 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheWithIndexingAndPersistenceTestSuite.java +++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheWithIndexingAndPersistenceTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.StartCachesInParallelTest; import org.apache.ignite.util.GridCommandHandlerIndexingTest; @@ -27,13 +28,12 @@ public class IgniteCacheWithIndexingAndPersistenceTestSuite extends TestSuite { /** * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite Cache With Indexing And Persistence Test Suite"); - suite.addTestSuite(GridCommandHandlerIndexingTest.class); - suite.addTestSuite(StartCachesInParallelTest.class); + suite.addTest(new JUnit4TestAdapter(GridCommandHandlerIndexingTest.class)); + suite.addTest(new JUnit4TestAdapter(StartCachesInParallelTest.class)); return suite; } diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheWithIndexingTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheWithIndexingTestSuite.java index ab79ce34ac6ea..c292c8fc4443a 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheWithIndexingTestSuite.java +++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheWithIndexingTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.BinaryTypeMismatchLoggingTest; import org.apache.ignite.internal.processors.cache.CacheBinaryKeyConcurrentQueryTest; @@ -49,46 +50,45 @@ public class IgniteCacheWithIndexingTestSuite extends TestSuite { /** * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite Cache With Indexing Test Suite"); - suite.addTestSuite(InlineIndexHelperTest.class); + suite.addTest(new JUnit4TestAdapter(InlineIndexHelperTest.class)); - suite.addTestSuite(GridIndexingWithNoopSwapSelfTest.class); - suite.addTestSuite(GridCacheOffHeapSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridIndexingWithNoopSwapSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheOffHeapSelfTest.class)); - suite.addTestSuite(CacheTtlTransactionalLocalSelfTest.class); - suite.addTestSuite(CacheTtlTransactionalPartitionedSelfTest.class); - suite.addTestSuite(CacheTtlAtomicLocalSelfTest.class); - suite.addTestSuite(CacheTtlAtomicPartitionedSelfTest.class); + suite.addTest(new JUnit4TestAdapter(CacheTtlTransactionalLocalSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheTtlTransactionalPartitionedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheTtlAtomicLocalSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheTtlAtomicPartitionedSelfTest.class)); - suite.addTestSuite(GridCacheOffheapIndexGetSelfTest.class); - suite.addTestSuite(GridCacheOffheapIndexEntryEvictTest.class); - suite.addTestSuite(CacheIndexStreamerTest.class); + suite.addTest(new JUnit4TestAdapter(GridCacheOffheapIndexGetSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheOffheapIndexEntryEvictTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheIndexStreamerTest.class)); - suite.addTestSuite(CacheConfigurationP2PTest.class); + suite.addTest(new JUnit4TestAdapter(CacheConfigurationP2PTest.class)); - suite.addTestSuite(IgniteCacheConfigurationPrimitiveTypesSelfTest.class); - suite.addTestSuite(IgniteClientReconnectQueriesTest.class); - suite.addTestSuite(CacheRandomOperationsMultithreadedTest.class); - suite.addTestSuite(IgniteCacheStarvationOnRebalanceTest.class); - suite.addTestSuite(CacheOperationsWithExpirationTest.class); - suite.addTestSuite(CacheBinaryKeyConcurrentQueryTest.class); - suite.addTestSuite(CacheQueryFilterExpiredTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheConfigurationPrimitiveTypesSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteClientReconnectQueriesTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheRandomOperationsMultithreadedTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheStarvationOnRebalanceTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheOperationsWithExpirationTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheBinaryKeyConcurrentQueryTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheQueryFilterExpiredTest.class)); - suite.addTestSuite(ClientReconnectAfterClusterRestartTest.class); + suite.addTest(new JUnit4TestAdapter(ClientReconnectAfterClusterRestartTest.class)); - suite.addTestSuite(CacheQueryAfterDynamicCacheStartFailureTest.class); + suite.addTest(new JUnit4TestAdapter(CacheQueryAfterDynamicCacheStartFailureTest.class)); - suite.addTestSuite(IgniteCacheGroupsSqlTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheGroupsSqlTest.class)); - suite.addTestSuite(IgniteDataStreamerTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteDataStreamerTest.class)); - suite.addTestSuite(BinaryTypeMismatchLoggingTest.class); + suite.addTest(new JUnit4TestAdapter(BinaryTypeMismatchLoggingTest.class)); - suite.addTestSuite(ClusterReadOnlyModeSqlTest.class); + suite.addTest(new JUnit4TestAdapter(ClusterReadOnlyModeSqlTest.class)); return suite; } diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteDbMemoryLeakWithIndexingTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteDbMemoryLeakWithIndexingTestSuite.java index 36cd10130da1d..150d3e20fed7e 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteDbMemoryLeakWithIndexingTestSuite.java +++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteDbMemoryLeakWithIndexingTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.database.IgniteDbMemoryLeakIndexedTest; import org.apache.ignite.internal.processors.database.IgniteDbMemoryLeakSqlQueryTest; @@ -27,13 +28,12 @@ public class IgniteDbMemoryLeakWithIndexingTestSuite extends TestSuite { /** * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite Db Memory Leaks With Indexing Test Suite"); - suite.addTestSuite(IgniteDbMemoryLeakSqlQueryTest.class); - suite.addTestSuite(IgniteDbMemoryLeakIndexedTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteDbMemoryLeakSqlQueryTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteDbMemoryLeakIndexedTest.class)); return suite; } diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgnitePdsWithIndexingCoreTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgnitePdsWithIndexingCoreTestSuite.java index 214a541a17214..528c7132b21de 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgnitePdsWithIndexingCoreTestSuite.java +++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgnitePdsWithIndexingCoreTestSuite.java @@ -16,6 +16,7 @@ */ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.persistence.IgnitePdsAtomicCacheHistoricalRebalancingTest; import org.apache.ignite.internal.processors.cache.persistence.IgnitePdsAtomicCacheRebalancingTest; @@ -50,46 +51,45 @@ public class IgnitePdsWithIndexingCoreTestSuite extends TestSuite { /** * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite Persistent Store With Indexing Test Suite"); - suite.addTestSuite(IgnitePdsCacheIntegrationTest.class); - suite.addTestSuite(IgnitePdsPageEvictionTest.class); - suite.addTestSuite(IgnitePdsMultiNodePutGetRestartTest.class); - suite.addTestSuite(IgnitePersistentStoreCacheGroupsTest.class); - suite.addTestSuite(PersistenceDirectoryWarningLoggingTest.class); - suite.addTestSuite(WalPathsTest.class); - suite.addTestSuite(WalRecoveryTxLogicalRecordsTest.class); - suite.addTestSuite(WalRolloverRecordLoggingFsyncTest.class); - suite.addTestSuite(WalRolloverRecordLoggingLogOnlyTest.class); + suite.addTest(new JUnit4TestAdapter(IgnitePdsCacheIntegrationTest.class)); + suite.addTest(new JUnit4TestAdapter(IgnitePdsPageEvictionTest.class)); + suite.addTest(new JUnit4TestAdapter(IgnitePdsMultiNodePutGetRestartTest.class)); + suite.addTest(new JUnit4TestAdapter(IgnitePersistentStoreCacheGroupsTest.class)); + suite.addTest(new JUnit4TestAdapter(PersistenceDirectoryWarningLoggingTest.class)); + suite.addTest(new JUnit4TestAdapter(WalPathsTest.class)); + suite.addTest(new JUnit4TestAdapter(WalRecoveryTxLogicalRecordsTest.class)); + suite.addTest(new JUnit4TestAdapter(WalRolloverRecordLoggingFsyncTest.class)); + suite.addTest(new JUnit4TestAdapter(WalRolloverRecordLoggingLogOnlyTest.class)); - suite.addTestSuite(IgniteWalRecoveryTest.class); - suite.addTestSuite(IgniteWalRecoveryWithCompactionTest.class); - suite.addTestSuite(IgnitePdsNoActualWalHistoryTest.class); - suite.addTestSuite(IgniteWalRebalanceTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteWalRecoveryTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteWalRecoveryWithCompactionTest.class)); + suite.addTest(new JUnit4TestAdapter(IgnitePdsNoActualWalHistoryTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteWalRebalanceTest.class)); - suite.addTestSuite(IgnitePdsAtomicCacheRebalancingTest.class); - suite.addTestSuite(IgnitePdsAtomicCacheHistoricalRebalancingTest.class); + suite.addTest(new JUnit4TestAdapter(IgnitePdsAtomicCacheRebalancingTest.class)); + suite.addTest(new JUnit4TestAdapter(IgnitePdsAtomicCacheHistoricalRebalancingTest.class)); - suite.addTestSuite(IgnitePdsTxCacheRebalancingTest.class); - suite.addTestSuite(IgnitePdsTxHistoricalRebalancingTest.class); + suite.addTest(new JUnit4TestAdapter(IgnitePdsTxCacheRebalancingTest.class)); + suite.addTest(new JUnit4TestAdapter(IgnitePdsTxHistoricalRebalancingTest.class)); - suite.addTestSuite(IgniteWalRecoveryPPCTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteWalRecoveryPPCTest.class)); - suite.addTestSuite(IgnitePdsDiskErrorsRecoveringTest.class); + suite.addTest(new JUnit4TestAdapter(IgnitePdsDiskErrorsRecoveringTest.class)); - suite.addTestSuite(IgnitePdsCacheDestroyDuringCheckpointTest.class); + suite.addTest(new JUnit4TestAdapter(IgnitePdsCacheDestroyDuringCheckpointTest.class)); - suite.addTestSuite(IgnitePdsBinaryMetadataOnClusterRestartTest.class); - suite.addTestSuite(IgnitePdsMarshallerMappingRestoreOnNodeStartTest.class); - suite.addTestSuite(IgnitePdsThreadInterruptionTest.class); - suite.addTestSuite(IgnitePdsBinarySortObjectFieldsTest.class); + suite.addTest(new JUnit4TestAdapter(IgnitePdsBinaryMetadataOnClusterRestartTest.class)); + suite.addTest(new JUnit4TestAdapter(IgnitePdsMarshallerMappingRestoreOnNodeStartTest.class)); + suite.addTest(new JUnit4TestAdapter(IgnitePdsThreadInterruptionTest.class)); + suite.addTest(new JUnit4TestAdapter(IgnitePdsBinarySortObjectFieldsTest.class)); - suite.addTestSuite(IgnitePdsCorruptedIndexTest.class); + suite.addTest(new JUnit4TestAdapter(IgnitePdsCorruptedIndexTest.class)); - suite.addTestSuite(IgniteLogicalRecoveryTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteLogicalRecoveryTest.class)); return suite; } diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgnitePdsWithIndexingTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgnitePdsWithIndexingTestSuite.java index 67b9fad63cde2..a707868c80e8d 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgnitePdsWithIndexingTestSuite.java +++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgnitePdsWithIndexingTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.IgnitePdsSingleNodeWithIndexingAndGroupPutGetPersistenceSelfTest; import org.apache.ignite.internal.processors.cache.IgnitePdsSingleNodeWithIndexingPutGetPersistenceTest; @@ -33,19 +34,18 @@ public class IgnitePdsWithIndexingTestSuite extends TestSuite { /** * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite Db Memory Leaks With Indexing Test Suite"); - suite.addTestSuite(IgniteDbSingleNodeWithIndexingWalRestoreTest.class); - suite.addTestSuite(IgniteDbSingleNodeWithIndexingPutGetTest.class); - suite.addTestSuite(IgniteDbMultiNodeWithIndexingPutGetTest.class); - suite.addTestSuite(IgnitePdsSingleNodeWithIndexingPutGetPersistenceTest.class); - suite.addTestSuite(IgnitePdsSingleNodeWithIndexingAndGroupPutGetPersistenceSelfTest.class); - suite.addTestSuite(IgnitePersistentStoreSchemaLoadTest.class); - suite.addTestSuite(IgnitePersistentStoreQueryWithMultipleClassesPerCacheTest.class); - suite.addTestSuite(IgniteTwoRegionsRebuildIndexTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteDbSingleNodeWithIndexingWalRestoreTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteDbSingleNodeWithIndexingPutGetTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteDbMultiNodeWithIndexingPutGetTest.class)); + suite.addTest(new JUnit4TestAdapter(IgnitePdsSingleNodeWithIndexingPutGetPersistenceTest.class)); + suite.addTest(new JUnit4TestAdapter(IgnitePdsSingleNodeWithIndexingAndGroupPutGetPersistenceSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgnitePersistentStoreSchemaLoadTest.class)); + suite.addTest(new JUnit4TestAdapter(IgnitePersistentStoreQueryWithMultipleClassesPerCacheTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteTwoRegionsRebuildIndexTest.class)); return suite; } diff --git a/modules/indexing/src/test/java8/org/apache/ignite/testsuites/CacheQueryJsr310Java8DateTimeApiSupportTestSuite.java b/modules/indexing/src/test/java8/org/apache/ignite/testsuites/CacheQueryJsr310Java8DateTimeApiSupportTestSuite.java index aa7aed8a59c01..77f2ed6a8456b 100644 --- a/modules/indexing/src/test/java8/org/apache/ignite/testsuites/CacheQueryJsr310Java8DateTimeApiSupportTestSuite.java +++ b/modules/indexing/src/test/java8/org/apache/ignite/testsuites/CacheQueryJsr310Java8DateTimeApiSupportTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.query.h2.CacheQueryEntityWithJsr310Java8DateTimeApiFieldsTest; @@ -31,7 +32,7 @@ public class CacheQueryJsr310Java8DateTimeApiSupportTestSuite extends TestSuite public static TestSuite suite() throws Exception { TestSuite suite = new TestSuite("JSR-310 Java 8 Date and Time API Cache Queries Test Suite"); - suite.addTestSuite(CacheQueryEntityWithJsr310Java8DateTimeApiFieldsTest.class); + suite.addTest(new JUnit4TestAdapter(CacheQueryEntityWithJsr310Java8DateTimeApiFieldsTest.class)); return suite; } diff --git a/modules/jta/src/test/java/org/apache/ignite/testsuites/IgniteJtaTestSuite.java b/modules/jta/src/test/java/org/apache/ignite/testsuites/IgniteJtaTestSuite.java index 3cc7935eb19a6..788b88bd50ab9 100644 --- a/modules/jta/src/test/java/org/apache/ignite/testsuites/IgniteJtaTestSuite.java +++ b/modules/jta/src/test/java/org/apache/ignite/testsuites/IgniteJtaTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.CacheJndiTmFactorySelfTest; import org.apache.ignite.internal.processors.cache.GridCacheJtaConfigurationValidationSelfTest; @@ -37,28 +38,27 @@ public class IgniteJtaTestSuite extends TestSuite { /** * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new IgniteTestSuite("JTA Integration Test Suite"); - suite.addTestSuite(GridPartitionedCacheJtaFactorySelfTest.class); - suite.addTestSuite(GridReplicatedCacheJtaFactorySelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridPartitionedCacheJtaFactorySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridReplicatedCacheJtaFactorySelfTest.class)); - suite.addTestSuite(GridPartitionedCacheJtaLookupClassNameSelfTest.class); - suite.addTestSuite(GridReplicatedCacheJtaLookupClassNameSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridPartitionedCacheJtaLookupClassNameSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridReplicatedCacheJtaLookupClassNameSelfTest.class)); - suite.addTestSuite(GridPartitionedCacheJtaFactoryUseSyncSelfTest.class); - suite.addTestSuite(GridReplicatedCacheJtaFactoryUseSyncSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridPartitionedCacheJtaFactoryUseSyncSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridReplicatedCacheJtaFactoryUseSyncSelfTest.class)); - suite.addTestSuite(GridJtaLifecycleAwareSelfTest.class); - suite.addTestSuite(GridCacheJtaConfigurationValidationSelfTest.class); - suite.addTestSuite(GridCacheJtaFactoryConfigValidationSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridJtaLifecycleAwareSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheJtaConfigurationValidationSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheJtaFactoryConfigValidationSelfTest.class)); - suite.addTestSuite(GridJtaTransactionManagerSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridJtaTransactionManagerSelfTest.class)); // Factory - suite.addTestSuite(CacheJndiTmFactorySelfTest.class); + suite.addTest(new JUnit4TestAdapter(CacheJndiTmFactorySelfTest.class)); return suite; } diff --git a/modules/kubernetes/src/test/java/org/apache/ignite/testsuites/IgniteKubernetesTestSuite.java b/modules/kubernetes/src/test/java/org/apache/ignite/testsuites/IgniteKubernetesTestSuite.java index 540657e8b2601..8c856af2ef0a2 100644 --- a/modules/kubernetes/src/test/java/org/apache/ignite/testsuites/IgniteKubernetesTestSuite.java +++ b/modules/kubernetes/src/test/java/org/apache/ignite/testsuites/IgniteKubernetesTestSuite.java @@ -18,6 +18,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.spi.discovery.tcp.ipfinder.kubernetes.TcpDiscoveryKubernetesIpFinderSelfTest; import org.apache.ignite.testframework.IgniteTestSuite; @@ -28,14 +29,13 @@ public class IgniteKubernetesTestSuite extends TestSuite { /** * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new IgniteTestSuite("Kubernetes Integration Test Suite"); // Cloud Nodes IP finder. - suite.addTestSuite(TcpDiscoveryKubernetesIpFinderSelfTest.class); + suite.addTest(new JUnit4TestAdapter(TcpDiscoveryKubernetesIpFinderSelfTest.class)); return suite; } -} \ No newline at end of file +} diff --git a/modules/log4j2/src/test/java/org/apache/ignite/testsuites/IgniteLog4j2TestSuite.java b/modules/log4j2/src/test/java/org/apache/ignite/testsuites/IgniteLog4j2TestSuite.java index 0b8cefa50147e..3dd4c44395b11 100644 --- a/modules/log4j2/src/test/java/org/apache/ignite/testsuites/IgniteLog4j2TestSuite.java +++ b/modules/log4j2/src/test/java/org/apache/ignite/testsuites/IgniteLog4j2TestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.logger.log4j2.Log4j2ConfigUpdateTest; import org.apache.ignite.logger.log4j2.Log4j2LoggerMarkerTest; @@ -29,16 +30,15 @@ public class IgniteLog4j2TestSuite extends TestSuite { /** * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Log4j2 Logging Test Suite"); - suite.addTestSuite(Log4j2LoggerSelfTest.class); - suite.addTestSuite(Log4j2LoggerVerboseModeSelfTest.class); - suite.addTestSuite(Log4j2LoggerMarkerTest.class); - suite.addTestSuite(Log4j2ConfigUpdateTest.class); + suite.addTest(new JUnit4TestAdapter(Log4j2LoggerSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(Log4j2LoggerVerboseModeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(Log4j2LoggerMarkerTest.class)); + suite.addTest(new JUnit4TestAdapter(Log4j2ConfigUpdateTest.class)); return suite; } -} \ No newline at end of file +} diff --git a/modules/schedule/src/test/java/org/apache/ignite/testsuites/IgniteSchedulerTestSuite.java b/modules/schedule/src/test/java/org/apache/ignite/testsuites/IgniteSchedulerTestSuite.java index 688c3ebbbcae3..7fc82ae90bd16 100644 --- a/modules/schedule/src/test/java/org/apache/ignite/testsuites/IgniteSchedulerTestSuite.java +++ b/modules/schedule/src/test/java/org/apache/ignite/testsuites/IgniteSchedulerTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.schedule.GridScheduleSelfTest; @@ -26,13 +27,12 @@ public class IgniteSchedulerTestSuite extends TestSuite { /** * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Grid Scheduler Test Suite"); - suite.addTestSuite(GridScheduleSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridScheduleSelfTest.class)); return suite; } -} \ No newline at end of file +} diff --git a/modules/slf4j/src/test/java/org/apache/ignite/testsuites/IgniteSlf4jTestSuite.java b/modules/slf4j/src/test/java/org/apache/ignite/testsuites/IgniteSlf4jTestSuite.java index 8668f927ca370..abf1eb850b909 100644 --- a/modules/slf4j/src/test/java/org/apache/ignite/testsuites/IgniteSlf4jTestSuite.java +++ b/modules/slf4j/src/test/java/org/apache/ignite/testsuites/IgniteSlf4jTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.logger.slf4j.Slf4jLoggerMarkerTest; @@ -30,7 +31,7 @@ public class IgniteSlf4jTestSuite extends TestSuite { public static TestSuite suite() { TestSuite suite = new TestSuite("Slf4j Logging Test Suite"); - suite.addTestSuite(Slf4jLoggerMarkerTest.class); + suite.addTest(new JUnit4TestAdapter(Slf4jLoggerMarkerTest.class)); return suite; } diff --git a/modules/spring-data-2.0/src/test/java/org/apache/ignite/testsuites/IgniteSpringData2TestSuite.java b/modules/spring-data-2.0/src/test/java/org/apache/ignite/testsuites/IgniteSpringData2TestSuite.java index c4134e565864b..edfd57fc3981d 100644 --- a/modules/spring-data-2.0/src/test/java/org/apache/ignite/testsuites/IgniteSpringData2TestSuite.java +++ b/modules/spring-data-2.0/src/test/java/org/apache/ignite/testsuites/IgniteSpringData2TestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.springdata.IgniteSpringDataCrudSelfTest; import org.apache.ignite.springdata.IgniteSpringDataQueriesSelfTest; @@ -27,13 +28,12 @@ public class IgniteSpringData2TestSuite extends TestSuite { /** * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Spring Data 2.0 Test Suite"); - suite.addTestSuite(IgniteSpringDataCrudSelfTest.class); - suite.addTestSuite(IgniteSpringDataQueriesSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteSpringDataCrudSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteSpringDataQueriesSelfTest.class)); return suite; } diff --git a/modules/spring-data/src/test/java/org/apache/ignite/testsuites/IgniteSpringDataTestSuite.java b/modules/spring-data/src/test/java/org/apache/ignite/testsuites/IgniteSpringDataTestSuite.java index 0d6c51965108b..6ac72fb939f2c 100644 --- a/modules/spring-data/src/test/java/org/apache/ignite/testsuites/IgniteSpringDataTestSuite.java +++ b/modules/spring-data/src/test/java/org/apache/ignite/testsuites/IgniteSpringDataTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.springdata.IgniteSpringDataCrudSelfTest; import org.apache.ignite.springdata.IgniteSpringDataQueriesSelfTest; @@ -27,13 +28,12 @@ public class IgniteSpringDataTestSuite extends TestSuite { /** * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Spring Data Test Suite"); - suite.addTestSuite(IgniteSpringDataCrudSelfTest.class); - suite.addTestSuite(IgniteSpringDataQueriesSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteSpringDataCrudSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteSpringDataQueriesSelfTest.class)); return suite; } diff --git a/modules/spring/src/test/java/org/apache/ignite/testsuites/IgniteResourceSelfTestSuite.java b/modules/spring/src/test/java/org/apache/ignite/testsuites/IgniteResourceSelfTestSuite.java index e120aaa41cd8f..39cda04a06c34 100644 --- a/modules/spring/src/test/java/org/apache/ignite/testsuites/IgniteResourceSelfTestSuite.java +++ b/modules/spring/src/test/java/org/apache/ignite/testsuites/IgniteResourceSelfTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.resource.GridLoggerInjectionSelfTest; import org.apache.ignite.internal.processors.resource.GridResourceProcessorSelfTest; @@ -31,16 +32,15 @@ public class IgniteResourceSelfTestSuite extends TestSuite { /** * @return Resource injection test suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new IgniteTestSuite("Ignite Resource Injection Test Suite"); - suite.addTestSuite(GridResourceProcessorSelfTest.class); - suite.addTestSuite(GridLoggerInjectionSelfTest.class); - suite.addTestSuite(GridServiceInjectionSelfTest.class); - suite.addTestSuite(GridSpringResourceInjectionSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridResourceProcessorSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridLoggerInjectionSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridServiceInjectionSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridSpringResourceInjectionSelfTest.class)); return suite; } -} \ No newline at end of file +} diff --git a/modules/spring/src/test/java/org/apache/ignite/testsuites/IgniteSpringTestSuite.java b/modules/spring/src/test/java/org/apache/ignite/testsuites/IgniteSpringTestSuite.java index 0943d5148b0ff..c16a045606c52 100644 --- a/modules/spring/src/test/java/org/apache/ignite/testsuites/IgniteSpringTestSuite.java +++ b/modules/spring/src/test/java/org/apache/ignite/testsuites/IgniteSpringTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.cache.spring.GridSpringCacheManagerMultiJvmSelfTest; import org.apache.ignite.cache.spring.GridSpringCacheManagerSelfTest; @@ -57,51 +58,51 @@ public class IgniteSpringTestSuite extends TestSuite { public static TestSuite suite() throws Exception { TestSuite suite = new IgniteTestSuite("Spring Test Suite"); - suite.addTestSuite(GridSpringBeanSerializationSelfTest.class); - suite.addTestSuite(IgniteSpringBeanTest.class); - suite.addTestSuite(GridFactorySelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridSpringBeanSerializationSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteSpringBeanTest.class)); + suite.addTest(new JUnit4TestAdapter(GridFactorySelfTest.class)); suite.addTest(IgniteResourceSelfTestSuite.suite()); - suite.addTestSuite(IgniteExcludeInConfigurationTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteExcludeInConfigurationTest.class)); // Tests moved to this suite since they require Spring functionality. - suite.addTestSuite(GridP2PUserVersionChangeSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridP2PUserVersionChangeSelfTest.class)); - suite.addTestSuite(GridSpringCacheManagerSelfTest.class); - suite.addTestSuite(GridSpringCacheManagerSpringBeanSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridSpringCacheManagerSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridSpringCacheManagerSpringBeanSelfTest.class)); - suite.addTestSuite(IgniteDynamicCacheConfigTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteDynamicCacheConfigTest.class)); - suite.addTestSuite(IgniteStartFromStreamConfigurationTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteStartFromStreamConfigurationTest.class)); - suite.addTestSuite(CacheSpringStoreSessionListenerSelfTest.class); + suite.addTest(new JUnit4TestAdapter(CacheSpringStoreSessionListenerSelfTest.class)); - suite.addTestSuite(CacheJdbcBlobStoreFactorySelfTest.class); - suite.addTestSuite(CacheJdbcPojoStoreFactorySelfTest.class); - suite.addTestSuite(CachePojoStoreXmlSelfTest.class); - suite.addTestSuite(CachePojoStoreXmlWithSqlEscapeSelfTest.class); + suite.addTest(new JUnit4TestAdapter(CacheJdbcBlobStoreFactorySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheJdbcPojoStoreFactorySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CachePojoStoreXmlSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CachePojoStoreXmlWithSqlEscapeSelfTest.class)); - suite.addTestSuite(GridSpringTransactionManagerSelfTest.class); - suite.addTestSuite(GridSpringTransactionManagerSpringBeanSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridSpringTransactionManagerSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridSpringTransactionManagerSpringBeanSelfTest.class)); - suite.addTestSuite(GridServiceInjectionSpringResourceTest.class); - suite.addTestSuite(IgniteSpringBeanSpringResourceInjectionTest.class); + suite.addTest(new JUnit4TestAdapter(GridServiceInjectionSpringResourceTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteSpringBeanSpringResourceInjectionTest.class)); - suite.addTestSuite(GridTransformSpringInjectionSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridTransformSpringInjectionSelfTest.class)); - suite.addTestSuite(SpringCacheManagerContextInjectionTest.class); - suite.addTestSuite(SpringTransactionManagerContextInjectionTest.class); + suite.addTest(new JUnit4TestAdapter(SpringCacheManagerContextInjectionTest.class)); + suite.addTest(new JUnit4TestAdapter(SpringTransactionManagerContextInjectionTest.class)); - suite.addTestSuite(SpringCacheTest.class); + suite.addTest(new JUnit4TestAdapter(SpringCacheTest.class)); - suite.addTestSuite(SpringEncryptedCacheRestartTest.class); - suite.addTestSuite(SpringEncryptedCacheRestartClientTest.class); + suite.addTest(new JUnit4TestAdapter(SpringEncryptedCacheRestartTest.class)); + suite.addTest(new JUnit4TestAdapter(SpringEncryptedCacheRestartClientTest.class)); - //suite.addTestSuite(GridSpringCacheManagerMultiJvmSelfTest.class); - suite.addTestSuite(GridSpringCacheManagerMultiJvmSelfTest.class); + //suite.addTest(new JUnit4TestAdapter(GridSpringCacheManagerMultiJvmSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridSpringCacheManagerMultiJvmSelfTest.class)); - suite.addTestSuite(GridCommandLineLoaderTest.class); + suite.addTest(new JUnit4TestAdapter(GridCommandLineLoaderTest.class)); return suite; } diff --git a/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteStartStopRestartTestSuite.java b/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteStartStopRestartTestSuite.java index 29671317787a2..0f9fe9c4bafe7 100644 --- a/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteStartStopRestartTestSuite.java +++ b/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteStartStopRestartTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.internal; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; /** @@ -25,14 +26,13 @@ public class IgniteStartStopRestartTestSuite { /** * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Start Nodes Test Suite"); - suite.addTestSuite(IgniteNodeStartUtilsSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteNodeStartUtilsSelfTest.class)); - suite.addTestSuite(IgniteProjectionStartStopRestartSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteProjectionStartStopRestartSelfTest.class)); return suite; } diff --git a/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTestSuite.java b/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTestSuite.java index e07aaec647dc0..7f17a46cc38cd 100644 --- a/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTestSuite.java +++ b/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.stream.twitter; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; /** @@ -25,12 +26,11 @@ public class IgniteTwitterStreamerTestSuite extends TestSuite { /** * @return Twitter streamer tests suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Twitter streamed Test Suite"); - suite.addTestSuite(IgniteTwitterStreamerTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteTwitterStreamerTest.class)); return suite; } diff --git a/modules/urideploy/src/test/java/org/apache/ignite/testsuites/IgniteUriDeploymentTestSuite.java b/modules/urideploy/src/test/java/org/apache/ignite/testsuites/IgniteUriDeploymentTestSuite.java index 436b78302064f..41cb70fac2a12 100644 --- a/modules/urideploy/src/test/java/org/apache/ignite/testsuites/IgniteUriDeploymentTestSuite.java +++ b/modules/urideploy/src/test/java/org/apache/ignite/testsuites/IgniteUriDeploymentTestSuite.java @@ -40,9 +40,8 @@ public class IgniteUriDeploymentTestSuite { /** * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("URI Deployment Spi Test Suite"); suite.addTest(new JUnit4TestAdapter(GridUriDeploymentConfigSelfTest.class)); @@ -64,7 +63,7 @@ public static TestSuite suite() throws Exception { // GAR Ant task tests. suite.addTest(IgniteToolsSelfTestSuite.suite()); - suite.addTestSuite(GridTaskUriDeploymentDeadlockSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridTaskUriDeploymentDeadlockSelfTest.class)); suite.addTest(new JUnit4TestAdapter(GridP2PDisabledSelfTest.class)); return suite; diff --git a/modules/web/src/test/java/org/apache/ignite/internal/websession/IgniteWebSessionSelfTestSuite.java b/modules/web/src/test/java/org/apache/ignite/internal/websession/IgniteWebSessionSelfTestSuite.java index e10052f62e6e3..934d523c406ba 100644 --- a/modules/web/src/test/java/org/apache/ignite/internal/websession/IgniteWebSessionSelfTestSuite.java +++ b/modules/web/src/test/java/org/apache/ignite/internal/websession/IgniteWebSessionSelfTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.internal.websession; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.IgniteTestSuite; @@ -29,23 +30,22 @@ public class IgniteWebSessionSelfTestSuite extends TestSuite { /** * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new IgniteTestSuite("Ignite Web Sessions Test Suite"); - suite.addTestSuite(WebSessionSelfTest.class); - suite.addTestSuite(WebSessionTransactionalSelfTest.class); - suite.addTestSuite(WebSessionReplicatedSelfTest.class); + suite.addTest(new JUnit4TestAdapter(WebSessionSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(WebSessionTransactionalSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(WebSessionReplicatedSelfTest.class)); // Old implementation tests. - suite.addTestSuite(WebSessionV1SelfTest.class); - suite.addTestSuite(WebSessionTransactionalV1SelfTest.class); - suite.addTestSuite(WebSessionReplicatedV1SelfTest.class); + suite.addTest(new JUnit4TestAdapter(WebSessionV1SelfTest.class)); + suite.addTest(new JUnit4TestAdapter(WebSessionTransactionalV1SelfTest.class)); + suite.addTest(new JUnit4TestAdapter(WebSessionReplicatedV1SelfTest.class)); System.setProperty(IGNITE_OVERRIDE_MCAST_GRP, GridTestUtils.getNextMulticastGroup(IgniteWebSessionSelfTestSuite.class)); return suite; } -} \ No newline at end of file +} diff --git a/modules/zeromq/src/test/java/org/apache/ignite/stream/zeromq/IgniteZeroMqStreamerTestSuite.java b/modules/zeromq/src/test/java/org/apache/ignite/stream/zeromq/IgniteZeroMqStreamerTestSuite.java index a98bf56e99714..86a621036375d 100644 --- a/modules/zeromq/src/test/java/org/apache/ignite/stream/zeromq/IgniteZeroMqStreamerTestSuite.java +++ b/modules/zeromq/src/test/java/org/apache/ignite/stream/zeromq/IgniteZeroMqStreamerTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.stream.zeromq; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; /** @@ -25,12 +26,11 @@ public class IgniteZeroMqStreamerTestSuite extends TestSuite { /** * @return ZeroMQ streamer tests suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("ZeroMQ streamed Test Suite"); - suite.addTestSuite(IgniteZeroMqStreamerTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteZeroMqStreamerTest.class)); return suite; } diff --git a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySpiTestSuite1.java b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySpiTestSuite1.java index 1a9e35136c9e0..d73544b096d94 100644 --- a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySpiTestSuite1.java +++ b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySpiTestSuite1.java @@ -17,6 +17,7 @@ package org.apache.ignite.spi.discovery.zk; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.curator.test.ByteCodeRewrite; import org.apache.ignite.spi.discovery.zk.internal.ZookeeperClientTest; @@ -51,18 +52,17 @@ public class ZookeeperDiscoverySpiTestSuite1 extends TestSuite { /** * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { System.setProperty("zookeeper.forceSync", "false"); System.setProperty("zookeeper.jmx.log4j.disable", "true"); TestSuite suite = new TestSuite("ZookeeperDiscoverySpi Test Suite"); - suite.addTestSuite(ZookeeperClientTest.class); - suite.addTestSuite(ZookeeperDiscoverySpiTest.class); - suite.addTestSuite(ZookeeperDiscoverySpiSaslFailedAuthTest.class); - suite.addTestSuite(ZookeeperDiscoverySpiSaslSuccessfulAuthTest.class); + suite.addTest(new JUnit4TestAdapter(ZookeeperClientTest.class)); + suite.addTest(new JUnit4TestAdapter(ZookeeperDiscoverySpiTest.class)); + suite.addTest(new JUnit4TestAdapter(ZookeeperDiscoverySpiSaslFailedAuthTest.class)); + suite.addTest(new JUnit4TestAdapter(ZookeeperDiscoverySpiSaslSuccessfulAuthTest.class)); return suite; } diff --git a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySpiTestSuite2.java b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySpiTestSuite2.java index f64c57edb1895..c6a67f3b33fc5 100644 --- a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySpiTestSuite2.java +++ b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySpiTestSuite2.java @@ -17,6 +17,7 @@ package org.apache.ignite.spi.discovery.zk; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.IgniteClientReconnectCacheTest; import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedMultiNodeFullApiSelfTest; @@ -43,12 +44,12 @@ public static TestSuite suite() throws Exception { TestSuite suite = new TestSuite("ZookeeperDiscoverySpi Test Suite"); - suite.addTestSuite(GridCachePartitionedNodeRestartTest.class); - suite.addTestSuite(IgniteCacheEntryListenerWithZkDiscoAtomicTest.class); - suite.addTestSuite(IgniteClientReconnectCacheTest.class); - suite.addTestSuite(GridCachePartitionedMultiNodeFullApiSelfTest.class); - suite.addTestSuite(GridCacheReplicatedMultiNodeFullApiSelfTest.class); - suite.addTestSuite(GridCommandHandlerTest.class); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedNodeRestartTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheEntryListenerWithZkDiscoAtomicTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteClientReconnectCacheTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedMultiNodeFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedMultiNodeFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCommandHandlerTest.class)); return suite; } diff --git a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySpiTestSuite3.java b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySpiTestSuite3.java index c988205085397..403232d29c3f3 100644 --- a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySpiTestSuite3.java +++ b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySpiTestSuite3.java @@ -17,6 +17,7 @@ package org.apache.ignite.spi.discovery.zk; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.datastructures.IgniteClientDataStructuresTest; import org.apache.ignite.internal.processors.cache.datastructures.partitioned.GridCachePartitionedNodeRestartTxSelfTest; @@ -47,15 +48,15 @@ public static TestSuite suite() throws Exception { TestSuite suite = new TestSuite("ZookeeperDiscoverySpi Test Suite"); - suite.addTestSuite(GridCacheReplicatedNodeRestartSelfTest.class); - suite.addTestSuite(GridEventConsumeSelfTest.class); - suite.addTestSuite(GridCachePartitionedNodeRestartTxSelfTest.class); - suite.addTestSuite(IgniteClientDataStructuresTest.class); - suite.addTestSuite(GridCacheReplicatedSequenceApiSelfTest.class); - suite.addTestSuite(GridCachePartitionedSequenceApiSelfTest.class); - suite.addTestSuite(GridCacheAtomicMultiJvmFullApiSelfTest.class); - suite.addTestSuite(GridCachePartitionedMultiJvmFullApiSelfTest.class); - suite.addTestSuite(GridP2PContinuousDeploymentSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedNodeRestartSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridEventConsumeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedNodeRestartTxSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteClientDataStructuresTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedSequenceApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedSequenceApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheAtomicMultiJvmFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedMultiJvmFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridP2PContinuousDeploymentSelfTest.class)); return suite; } diff --git a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySpiTestSuite4.java b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySpiTestSuite4.java index cb8010ba62afb..57262602b0058 100644 --- a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySpiTestSuite4.java +++ b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySpiTestSuite4.java @@ -17,6 +17,7 @@ package org.apache.ignite.spi.discovery.zk; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.ClusterNodeMetricsUpdateTest; import org.apache.ignite.internal.processors.cache.distributed.dht.IgniteCachePutRetryAtomicSelfTest; @@ -44,13 +45,13 @@ public static TestSuite suite() throws Exception { TestSuite suite = new TestSuite("ZookeeperDiscoverySpi Test Suite"); - suite.addTestSuite(ZookeeperDiscoverySuitePreprocessorTest.class); - suite.addTestSuite(IgniteCachePutRetryAtomicSelfTest.class); - suite.addTestSuite(IgniteCachePutRetryTransactionalSelfTest.class); - suite.addTestSuite(ClusterNodeMetricsUpdateTest.class); - suite.addTestSuite(GridCacheAtomicMultiNodeFullApiSelfTest.class); - suite.addTestSuite(GridCacheReplicatedAtomicMultiNodeFullApiSelfTest.class); - suite.addTestSuite(IgniteCacheReplicatedQuerySelfTest.class); + suite.addTest(new JUnit4TestAdapter(ZookeeperDiscoverySuitePreprocessorTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCachePutRetryAtomicSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCachePutRetryTransactionalSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(ClusterNodeMetricsUpdateTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheAtomicMultiNodeFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedAtomicMultiNodeFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheReplicatedQuerySelfTest.class)); return suite; } From 5d1a3edf4a39af311f981b90171eef238355d589 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Fri, 7 Dec 2018 23:02:39 +0300 Subject: [PATCH 077/176] IGNITE-10175 migrate core module tests from Junit 3 to 4 - corrected errors discovered by TC bot -- verified with diffs overview and rebuild --- .../ignite/internal/GridContinuousJobAnnotationSelfTest.java | 1 - .../cache/distributed/IgniteTxConcurrentRemoveObjectsTest.java | 1 - 2 files changed, 2 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousJobAnnotationSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousJobAnnotationSelfTest.java index 55040062ebfdf..50173605d6594 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousJobAnnotationSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousJobAnnotationSelfTest.java @@ -91,7 +91,6 @@ public void testJobChildAnnotation() throws Exception { * @param jobCls Job class. * @throws Exception If test failed. */ - @Test public void testContinuousJobAnnotation(Class jobCls) throws Exception { try { Ignite ignite = startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxConcurrentRemoveObjectsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxConcurrentRemoveObjectsTest.java index 93149dfffd3d4..5b5f714febd47 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxConcurrentRemoveObjectsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxConcurrentRemoveObjectsTest.java @@ -149,7 +149,6 @@ public void testMvccTxLeavesObjectsInLocalPartition() throws Exception { * * @throws Exception If failed. */ - @Test public void checkTxLeavesObjectsInLocalPartition(CacheConfiguration ccfg, TransactionConcurrency optimistic, TransactionIsolation isolation) throws Exception { IgniteEx igniteEx = grid(0); From 9542f70604a231addcebbd61e5b45c7bc7dab50f Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Sat, 8 Dec 2018 13:08:31 +0300 Subject: [PATCH 078/176] IGNITE-10176 migrate non-core modules tests from Junit 3 to 4 - wip - migrating // fixed error discovered by TC bot -- verified with diffs overview and rebuild --- .../IgniteCompatibilityBasicTestSuite.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/compatibility/src/test/java/org/apache/ignite/compatibility/testsuites/IgniteCompatibilityBasicTestSuite.java b/modules/compatibility/src/test/java/org/apache/ignite/compatibility/testsuites/IgniteCompatibilityBasicTestSuite.java index c06f6fbe288f8..12ef3d091c6bd 100644 --- a/modules/compatibility/src/test/java/org/apache/ignite/compatibility/testsuites/IgniteCompatibilityBasicTestSuite.java +++ b/modules/compatibility/src/test/java/org/apache/ignite/compatibility/testsuites/IgniteCompatibilityBasicTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.compatibility.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.compatibility.PdsWithTtlCompatibilityTest; import org.apache.ignite.compatibility.persistence.FoldersReuseCompatibilityTest; @@ -29,18 +30,17 @@ public class IgniteCompatibilityBasicTestSuite { /** * @return Test suite. - * @throws Exception In case of an error. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite Compatibility Basic Test Suite"); - suite.addTest(new JUnit4TestAdapter(PersistenceBasicCompatibilityTest.class); + suite.addTest(new JUnit4TestAdapter(PersistenceBasicCompatibilityTest.class)); - suite.addTest(new JUnit4TestAdapter(PdsWithTtlCompatibilityTest.class); + suite.addTest(new JUnit4TestAdapter(PdsWithTtlCompatibilityTest.class)); - suite.addTest(new JUnit4TestAdapter(FoldersReuseCompatibilityTest.class); + suite.addTest(new JUnit4TestAdapter(FoldersReuseCompatibilityTest.class)); - suite.addTest(new JUnit4TestAdapter(MigratingToWalV2SerializerWithCompactionTest.class); + suite.addTest(new JUnit4TestAdapter(MigratingToWalV2SerializerWithCompactionTest.class)); return suite; } From 5f785836861d68f1b375ed1084216e1e2d4156de Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Sat, 8 Dec 2018 14:36:49 +0300 Subject: [PATCH 079/176] IGNITE-10175 migrate core modules tests from Junit 3 to 4 - wip - migrating // fixed error discovered by TC bot -- verified with diffs overview and rebuild --- .../persistence/db/wal/WalCompactionTest.java | 39 +++++++------------ .../testsuites/IgnitePdsTestSuite2.java | 2 +- 2 files changed, 16 insertions(+), 25 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalCompactionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalCompactionTest.java index 9383cca4ee4a0..db571c372525f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalCompactionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalCompactionTest.java @@ -1,19 +1,19 @@ /* -* Licensed to the Apache Software Foundation (ASF) under one or more -* contributor license agreements. See the NOTICE file distributed with -* this work for additional information regarding copyright ownership. -* The ASF licenses this file to You 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. -*/ + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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.apache.ignite.internal.processors.cache.persistence.db.wal; import java.io.File; @@ -43,14 +43,10 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; /** * */ -@RunWith(JUnit4.class) public class WalCompactionTest extends GridCommonAbstractTest { /** Ip finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -127,7 +123,6 @@ public class WalCompactionTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ - @Test public void testApplyingUpdatesFromCompactedWal() throws Exception { testApplyingUpdatesFromCompactedWal(false); } @@ -137,7 +132,6 @@ public void testApplyingUpdatesFromCompactedWal() throws Exception { * * @throws Exception If failed. */ - @Test public void testApplyingUpdatesFromCompactedWalWhenCompressorDisabled() throws Exception { testApplyingUpdatesFromCompactedWal(true); } @@ -254,7 +248,6 @@ else if (arr[i] != 1) { /** * */ - @Test public void testCompressorToleratesEmptyWalSegmentsFsync() throws Exception { testCompressorToleratesEmptyWalSegments(WALMode.FSYNC); } @@ -262,7 +255,6 @@ public void testCompressorToleratesEmptyWalSegmentsFsync() throws Exception { /** * */ - @Test public void testCompressorToleratesEmptyWalSegmentsLogOnly() throws Exception { testCompressorToleratesEmptyWalSegments(WALMode.LOG_ONLY); } @@ -336,7 +328,6 @@ private void testCompressorToleratesEmptyWalSegments(WALMode walMode) throws Exc /** * @throws Exception If failed. */ - @Test public void testSeekingStartInCompactedSegment() throws Exception { IgniteEx ig = (IgniteEx)startGrids(3); ig.cluster().active(true); diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite2.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite2.java index c0bfda9a61f14..d40e34e530adf 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite2.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite2.java @@ -173,7 +173,7 @@ public static void addRealPageStoreTests(TestSuite suite) { suite.addTest(new JUnit4TestAdapter(IgniteWalSerializerVersionTest.class)); - suite.addTest(new JUnit4TestAdapter(WalCompactionTest.class)); + suite.addTestSuite(WalCompactionTest.class); suite.addTest(new JUnit4TestAdapter(WalDeletionArchiveFsyncTest.class)); suite.addTest(new JUnit4TestAdapter(WalDeletionArchiveLogOnlyTest.class)); From 78d4d288c703d1505556f5887b9be2806ec71258 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Sat, 8 Dec 2018 18:03:54 +0300 Subject: [PATCH 080/176] IGNITE-10176 migrate non-core modules tests from Junit 3 to 4 - wip - migrating // fixed error discovered by TC bot -- verified with diffs overview and rebuild --- .../apache/ignite/spark/JavaEmbeddedIgniteRDDSelfTest.java | 5 ++++- .../apache/ignite/spark/JavaStandaloneIgniteRDDSelfTest.java | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/spark/src/test/java/org/apache/ignite/spark/JavaEmbeddedIgniteRDDSelfTest.java b/modules/spark/src/test/java/org/apache/ignite/spark/JavaEmbeddedIgniteRDDSelfTest.java index 9b7a31f178613..85799d325199e 100644 --- a/modules/spark/src/test/java/org/apache/ignite/spark/JavaEmbeddedIgniteRDDSelfTest.java +++ b/modules/spark/src/test/java/org/apache/ignite/spark/JavaEmbeddedIgniteRDDSelfTest.java @@ -37,6 +37,9 @@ import org.apache.spark.sql.Column; import org.apache.spark.sql.Dataset; import org.apache.spark.sql.Row; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import scala.Tuple2; /** @@ -65,7 +68,7 @@ public class JavaEmbeddedIgniteRDDSelfTest extends GridCommonAbstractTest { /** Sum function. */ private static final Function2 SUM_F = new Function2() { - public Integer call(Integer x, Integer y) { + @Override public Integer call(Integer x, Integer y) { return x + y; } }; diff --git a/modules/spark/src/test/java/org/apache/ignite/spark/JavaStandaloneIgniteRDDSelfTest.java b/modules/spark/src/test/java/org/apache/ignite/spark/JavaStandaloneIgniteRDDSelfTest.java index f7ba5f0793566..1ec637c81cd90 100644 --- a/modules/spark/src/test/java/org/apache/ignite/spark/JavaStandaloneIgniteRDDSelfTest.java +++ b/modules/spark/src/test/java/org/apache/ignite/spark/JavaStandaloneIgniteRDDSelfTest.java @@ -37,6 +37,9 @@ import org.apache.spark.sql.Column; import org.apache.spark.sql.Dataset; import org.apache.spark.sql.Row; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import scala.Tuple2; import java.lang.reflect.Field; @@ -65,7 +68,7 @@ public class JavaStandaloneIgniteRDDSelfTest extends GridCommonAbstractTest { /** Sum function. */ private static final Function2 SUM_F = new Function2() { - public Integer call(Integer x, Integer y) { + @Override public Integer call(Integer x, Integer y) { return x + y; } }; From b1bf6fed48d6728f3351077c17e8d25598ed54b3 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Sat, 8 Dec 2018 18:09:19 +0300 Subject: [PATCH 081/176] IGNITE-10176 migrate non-core modules tests from Junit 3 to 4 - wip - migrating // mkinor cleanup per self-review -- verified with diffs overview and rebuild --- .../java/org/apache/ignite/testsuites/IgniteRDDTestSuite.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/spark/src/test/java/org/apache/ignite/testsuites/IgniteRDDTestSuite.java b/modules/spark/src/test/java/org/apache/ignite/testsuites/IgniteRDDTestSuite.java index d0ecd775e3f98..75534f19310fe 100644 --- a/modules/spark/src/test/java/org/apache/ignite/testsuites/IgniteRDDTestSuite.java +++ b/modules/spark/src/test/java/org/apache/ignite/testsuites/IgniteRDDTestSuite.java @@ -28,9 +28,8 @@ public class IgniteRDDTestSuite extends TestSuite { /** * @return Java Ignite RDD test suit. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Java Ignite RDD tests (standalone and embedded modes"); suite.addTest(new JUnit4TestAdapter(JavaEmbeddedIgniteRDDSelfTest.class)); From 6870ee7fbce4207d9ba36fffc9c1b171a8cca486 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Sun, 9 Dec 2018 13:10:43 +0300 Subject: [PATCH 082/176] IGNITE-10177 cleanup Junit 3 from the project - wip - cleanup // extends testcase -- verified with diffs overview and rebuild --- .../ignite/tests/CassandraConfigTest.java | 8 +++----- .../ignite/internal/jdbc2/JdbcBlobTest.java | 10 +++++----- .../compress/FileSystemUtilsTest.java | 8 +++----- .../GridSuppressedExceptionSelfTest.java | 12 +++++++----- .../apache/ignite/internal/ClassSetTest.java | 9 ++++----- .../IgniteReflectionFactorySelfTest.java | 8 +++----- .../commandline/CommandHandlerParsingTest.java | 18 +++++++----------- ...yteBufferStreamImplV2ByteOrderSelfTest.java | 14 ++++++-------- ...ManagerMxBeanIllegalArgumentHandleTest.java | 13 ++++--------- .../ignite/testframework/GridTestUtils.java | 3 +-- 10 files changed, 43 insertions(+), 60 deletions(-) diff --git a/modules/cassandra/store/src/test/java/org/apache/ignite/tests/CassandraConfigTest.java b/modules/cassandra/store/src/test/java/org/apache/ignite/tests/CassandraConfigTest.java index 7f4d5efd881f4..66fe5d1254e1e 100644 --- a/modules/cassandra/store/src/test/java/org/apache/ignite/tests/CassandraConfigTest.java +++ b/modules/cassandra/store/src/test/java/org/apache/ignite/tests/CassandraConfigTest.java @@ -17,19 +17,17 @@ package org.apache.ignite.tests; -import junit.framework.TestCase; import org.apache.ignite.cache.query.annotations.QuerySqlField; import org.apache.ignite.cache.store.cassandra.persistence.KeyPersistenceSettings; import org.apache.ignite.cache.store.cassandra.persistence.KeyValuePersistenceSettings; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; + +import static org.junit.Assert.assertEquals; /** * Simple test for DDL generator. */ -@RunWith(JUnit4.class) -public class CassandraConfigTest extends TestCase { +public class CassandraConfigTest { /** * Check if same DDL generated for similar keys and same KeyPersistenceConfiguration. * diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcBlobTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcBlobTest.java index 1f1536f25cb8f..d2a2f09a08598 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcBlobTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcBlobTest.java @@ -21,16 +21,16 @@ import java.io.InputStream; import java.sql.SQLException; import java.util.Arrays; -import junit.framework.TestCase; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; /** * */ -@RunWith(JUnit4.class) -public class JdbcBlobTest extends TestCase { +public class JdbcBlobTest { /** * @throws Exception If failed. */ diff --git a/modules/compress/src/test/java/org/apache/ignite/internal/processors/compress/FileSystemUtilsTest.java b/modules/compress/src/test/java/org/apache/ignite/internal/processors/compress/FileSystemUtilsTest.java index c473633719506..40640a75d50f6 100644 --- a/modules/compress/src/test/java/org/apache/ignite/internal/processors/compress/FileSystemUtilsTest.java +++ b/modules/compress/src/test/java/org/apache/ignite/internal/processors/compress/FileSystemUtilsTest.java @@ -23,12 +23,9 @@ import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; -import junit.framework.TestCase; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.util.typedef.internal.U; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; import static java.nio.file.StandardOpenOption.READ; import static java.nio.file.StandardOpenOption.TRUNCATE_EXISTING; @@ -37,11 +34,12 @@ import static org.apache.ignite.internal.processors.compress.FileSystemUtils.getFileSystemBlockSize; import static org.apache.ignite.internal.processors.compress.FileSystemUtils.getSparseFileSize; import static org.apache.ignite.internal.processors.compress.FileSystemUtils.punchHole; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; /** */ -@RunWith(JUnit4.class) -public class FileSystemUtilsTest extends TestCase { +public class FileSystemUtilsTest { /** * @throws Exception If failed. */ diff --git a/modules/core/src/test/java/org/apache/ignite/GridSuppressedExceptionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/GridSuppressedExceptionSelfTest.java index d73e0607f0c1f..2db1a9e205ae5 100644 --- a/modules/core/src/test/java/org/apache/ignite/GridSuppressedExceptionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/GridSuppressedExceptionSelfTest.java @@ -19,17 +19,19 @@ import java.io.IOException; import java.util.List; -import junit.framework.TestCase; import org.apache.ignite.internal.util.typedef.X; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; /** * */ -@RunWith(JUnit4.class) -public class GridSuppressedExceptionSelfTest extends TestCase { +public class GridSuppressedExceptionSelfTest { /** * @throws Exception If failed. */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/ClassSetTest.java b/modules/core/src/test/java/org/apache/ignite/internal/ClassSetTest.java index 2f27225b15026..38f7098b7430e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/ClassSetTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/ClassSetTest.java @@ -17,16 +17,15 @@ package org.apache.ignite.internal; -import junit.framework.TestCase; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; + +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; /** * Tests for {@link ClassSet} class. */ -@RunWith(JUnit4.class) -public class ClassSetTest extends TestCase { +public class ClassSetTest { /** * @throws Exception If failed. */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteReflectionFactorySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteReflectionFactorySelfTest.java index ebe3da791148c..f71212a7eb7cc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteReflectionFactorySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteReflectionFactorySelfTest.java @@ -20,17 +20,15 @@ import java.io.Serializable; import java.util.HashMap; import java.util.Map; -import junit.framework.TestCase; import org.apache.ignite.configuration.IgniteReflectionFactory; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; + +import static org.junit.Assert.assertEquals; /** * Tests for {@link IgniteReflectionFactory} class. */ -@RunWith(JUnit4.class) -public class IgniteReflectionFactorySelfTest extends TestCase { +public class IgniteReflectionFactorySelfTest { /** * @throws Exception If failed. */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/commandline/CommandHandlerParsingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/commandline/CommandHandlerParsingTest.java index fccbdaebd2618..621d9fef38963 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/commandline/CommandHandlerParsingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/commandline/CommandHandlerParsingTest.java @@ -20,7 +20,6 @@ import java.util.Arrays; import java.util.Collections; import java.util.UUID; -import junit.framework.TestCase; import org.apache.ignite.internal.commandline.cache.CacheArguments; import org.apache.ignite.internal.commandline.cache.CacheCommand; import org.apache.ignite.internal.visor.tx.VisorTxOperation; @@ -30,8 +29,6 @@ import org.junit.After; import org.junit.Before; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; import static java.util.Arrays.asList; import static org.apache.ignite.IgniteSystemProperties.IGNITE_ENABLE_EXPERIMENTAL_COMMAND; @@ -44,26 +41,25 @@ import static org.apache.ignite.internal.commandline.CommandHandler.WAL_DELETE; import static org.apache.ignite.internal.commandline.CommandHandler.WAL_PRINT; import static org.junit.Assert.assertArrayEquals; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; /** * Tests Command Handler parsing arguments. */ -@RunWith(JUnit4.class) -public class CommandHandlerParsingTest extends TestCase { +public class CommandHandlerParsingTest { /** {@inheritDoc} */ @Before - @Override public void setUp() throws Exception { + public void setUp() throws Exception { System.setProperty(IGNITE_ENABLE_EXPERIMENTAL_COMMAND, "true"); - - super.setUp(); } /** {@inheritDoc} */ @After - @Override public void tearDown() throws Exception { + public void tearDown() throws Exception { System.clearProperty(IGNITE_ENABLE_EXPERIMENTAL_COMMAND); - - super.tearDown(); } /** diff --git a/modules/core/src/test/java/org/apache/ignite/internal/direct/stream/v2/DirectByteBufferStreamImplV2ByteOrderSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/direct/stream/v2/DirectByteBufferStreamImplV2ByteOrderSelfTest.java index 74e9f0f67a8eb..d4468982098ef 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/direct/stream/v2/DirectByteBufferStreamImplV2ByteOrderSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/direct/stream/v2/DirectByteBufferStreamImplV2ByteOrderSelfTest.java @@ -22,7 +22,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Random; -import junit.framework.TestCase; import org.apache.ignite.IgniteException; import org.apache.ignite.internal.direct.stream.DirectByteBufferStream; import org.apache.ignite.internal.util.GridUnsafe; @@ -31,8 +30,6 @@ import org.jetbrains.annotations.Nullable; import org.junit.Before; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; import static org.apache.ignite.GridTestIoUtils.getCharByByteLE; import static org.apache.ignite.GridTestIoUtils.getDoubleByByteLE; @@ -41,12 +38,15 @@ import static org.apache.ignite.GridTestIoUtils.getLongByByteLE; import static org.apache.ignite.GridTestIoUtils.getShortByByteLE; import static org.junit.Assert.assertArrayEquals; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; /** * {@link DirectByteBufferStreamImplV2} byte order sanity tests. */ -@RunWith(JUnit4.class) -public class DirectByteBufferStreamImplV2ByteOrderSelfTest extends TestCase { +public class DirectByteBufferStreamImplV2ByteOrderSelfTest { /** Array length. */ private static final int ARR_LEN = 16; @@ -67,9 +67,7 @@ public class DirectByteBufferStreamImplV2ByteOrderSelfTest extends TestCase { /** {@inheritDoc} */ @Before - @Override public void setUp() throws Exception { - super.setUp(); - + public void setUp() throws Exception { outArr = new byte[ARR_LEN * 8 + LEN_BYTES]; buff = ByteBuffer.wrap(outArr); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerMxBeanIllegalArgumentHandleTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerMxBeanIllegalArgumentHandleTest.java index 403c152a4d660..33a6e6fd1182c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerMxBeanIllegalArgumentHandleTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerMxBeanIllegalArgumentHandleTest.java @@ -21,7 +21,6 @@ import java.lang.management.MemoryUsage; import java.lang.reflect.Field; import java.lang.reflect.Modifier; -import junit.framework.TestCase; import org.apache.ignite.IgniteLogger; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.GridKernalContext; @@ -31,12 +30,11 @@ import org.junit.After; import org.junit.Before; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; import org.mockito.Mockito; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; +import static org.junit.Assert.assertEquals; import static org.mockito.Mockito.when; /** @@ -44,8 +42,7 @@ * * Test modifies static final field, used only for development */ -@RunWith(JUnit4.class) -public class GridManagerMxBeanIllegalArgumentHandleTest extends TestCase { +public class GridManagerMxBeanIllegalArgumentHandleTest { /** Original value of {@link GridDiscoveryManager#mem} to be restored after test */ private Object mxBeanToRestore; @@ -57,8 +54,7 @@ public class GridManagerMxBeanIllegalArgumentHandleTest extends TestCase { /** {@inheritDoc} Changes field to always failing mock */ @Before - @Override public void setUp() throws Exception { - super.setUp(); + public void setUp() throws Exception { try { final MemoryMXBean memoryMXBean = createAlwaysFailingMxBean(); memMxBeanField = createAccessibleMemField(); @@ -103,8 +99,7 @@ public class GridManagerMxBeanIllegalArgumentHandleTest extends TestCase { * @throws Exception if field set failed */ @After - @Override public void tearDown() throws Exception { - super.tearDown(); + public void tearDown() throws Exception { if (correctSetupOfTestPerformed) memMxBeanField.set(null, mxBeanToRestore); } diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java b/modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java index 544e8f0058311..835496975644a 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java @@ -67,7 +67,6 @@ import javax.net.ssl.TrustManager; import junit.framework.JUnit4TestAdapter; import junit.framework.Test; -import junit.framework.TestCase; import junit.framework.TestSuite; import org.apache.ignite.Ignite; import org.apache.ignite.IgniteCache; @@ -1955,7 +1954,7 @@ public static String fullSimpleName(@NotNull Class cls) { * @param test Test. * @param ignoredTests Tests to ignore. If test contained in the collection it is not included in suite */ - public static void addTestIfNeeded(@NotNull final TestSuite suite, @NotNull final Class test, + public static void addTestIfNeeded(@NotNull final TestSuite suite, @NotNull final Class test, @Nullable final Collection ignoredTests) { if (ignoredTests != null && ignoredTests.contains(test)) return; From ec9f6540108178bb972f71fe107c3c3e6734a54b Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Sun, 9 Dec 2018 14:39:15 +0300 Subject: [PATCH 083/176] IGNITE-10177 cleanup Junit 3 from the project - wip - cleanup // extends testcase -- verified with diffs overview and rebuild --- .../client/impl/ClientCacheFlagsCodecTest.java | 9 +++------ .../OptimizedMarshallerEnumSelfTest.java | 8 +++----- .../processors/cache/CacheComparatorTest.java | 8 +++----- .../DataStorageConfigurationValidationTest.java | 8 +++----- .../db/wal/crc/IgniteDataIntegrityTests.java | 15 ++++++--------- .../wal/crc/IgnitePureJavaCrcCompatibility.java | 8 +++----- .../persistence/tree/io/TrackingPageIOTest.java | 11 ++++++----- .../persistence/wal/aware/SegmentAwareTest.java | 11 +++++------ .../cache/transactions/DepthFirstSearchTest.java | 9 ++++----- .../processors/igfs/IgfsModeResolverSelfTest.java | 12 ++++++------ .../ignite/internal/util/GridCleanerTest.java | 6 +----- ...ridStartupWithUndefinedIgniteHomeSelfTest.java | 9 +++------ ...ridUnsafeDataInputOutputByteOrderSelfTest.java | 11 ++++------- .../IpcSharedMemoryNativeLoaderSelfTest.java | 9 +++------ .../util/nio/GridNioDelimitedBufferSelfTest.java | 8 +++----- .../internal/util/nio/GridRoundTripTest.java | 6 +----- .../org/apache/ignite/jvmtest/FileIOTest.java | 6 +----- .../org/apache/ignite/jvmtest/FileLocksTest.java | 6 +----- .../apache/ignite/jvmtest/LinkedHashMapTest.java | 6 +----- .../apache/ignite/jvmtest/NetworkFailureTest.java | 6 +----- .../QueueSizeCounterMultiThreadedTest.java | 6 +----- .../jvmtest/ReadWriteLockMultiThreadedTest.java | 6 +----- .../org/apache/ignite/jvmtest/RegExpTest.java | 6 +----- .../jvmtest/ServerSocketMultiThreadedTest.java | 6 +----- .../apache/ignite/logger/java/JavaLoggerTest.java | 8 +++----- .../encryption/KeystoreEncryptionSpiSelfTest.java | 9 ++++----- .../ConfigVariationsTestSuiteBuilderTest.java | 8 +++----- .../ignite/testframework/test/ParametersTest.java | 8 +++----- .../test/VariationsIteratorTest.java | 9 ++++----- .../apache/ignite/util/GridIntListSelfTest.java | 9 ++++----- .../apache/ignite/util/GridLongListSelfTest.java | 10 +++++----- .../ignite/util/GridMessageCollectionTest.java | 8 +++----- .../cache/persistence/file/IgniteFileIOTest.java | 6 +----- .../apache/ignite/logger/jcl/JclLoggerTest.java | 6 +----- 34 files changed, 96 insertions(+), 181 deletions(-) diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/impl/ClientCacheFlagsCodecTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/impl/ClientCacheFlagsCodecTest.java index c792edbc71ecd..540f3f910842b 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/client/impl/ClientCacheFlagsCodecTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/impl/ClientCacheFlagsCodecTest.java @@ -21,19 +21,16 @@ import java.util.EnumSet; import java.util.Set; -import junit.framework.TestCase; - import org.apache.ignite.internal.client.GridClientCacheFlag; import org.apache.ignite.internal.util.typedef.F; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; + +import static org.junit.Assert.assertTrue; /** * Tests conversions between GridClientCacheFlag. */ -@RunWith(JUnit4.class) -public class ClientCacheFlagsCodecTest extends TestCase { +public class ClientCacheFlagsCodecTest { /** * Tests that each client flag will be correctly converted to server flag. */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerEnumSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerEnumSelfTest.java index e9f0e8d57a912..5dfebc4d7a590 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerEnumSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerEnumSelfTest.java @@ -17,7 +17,6 @@ package org.apache.ignite.internal.marshaller.optimized; -import junit.framework.TestCase; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.IgniteLogger; import org.apache.ignite.configuration.IgniteConfiguration; @@ -26,14 +25,13 @@ import org.apache.ignite.testframework.junits.GridTestKernalContext; import org.apache.ignite.testframework.junits.logger.GridTestLog4jLogger; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; + +import static org.junit.Assert.assertEquals; /** * */ -@RunWith(JUnit4.class) -public class OptimizedMarshallerEnumSelfTest extends TestCase { +public class OptimizedMarshallerEnumSelfTest { private String igniteHome = System.getProperty("user.dir"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheComparatorTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheComparatorTest.java index 66bdcfdcf434d..94b3a33aa4d7e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheComparatorTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheComparatorTest.java @@ -17,18 +17,16 @@ package org.apache.ignite.internal.processors.cache; -import junit.framework.TestCase; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.internal.processors.query.QuerySchema; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; + +import static org.junit.Assert.assertEquals; /** * Test for CacheComparators from ClusterCachesInfo */ -@RunWith(JUnit4.class) -public class CacheComparatorTest extends TestCase { +public class CacheComparatorTest { /** * Test if comparator not violates its general contract */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/DataStorageConfigurationValidationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/DataStorageConfigurationValidationTest.java index effdb07c37392..8a6e2c1f39b27 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/DataStorageConfigurationValidationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/DataStorageConfigurationValidationTest.java @@ -18,18 +18,16 @@ package org.apache.ignite.internal.processors.cache; import java.util.concurrent.Callable; -import junit.framework.TestCase; import org.apache.ignite.configuration.DataStorageConfiguration; import org.apache.ignite.testframework.GridTestUtils; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; + +import static org.junit.Assert.assertEquals; /** * Tests assertions in DataStorageConfiguration. */ -@RunWith(JUnit4.class) -public class DataStorageConfigurationValidationTest extends TestCase { +public class DataStorageConfigurationValidationTest { /** * Tests {@link DataStorageConfiguration#walSegmentSize} property assertion. * diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteDataIntegrityTests.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteDataIntegrityTests.java index 68d1a627ed1d2..3aa1285158694 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteDataIntegrityTests.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteDataIntegrityTests.java @@ -17,7 +17,6 @@ package org.apache.ignite.internal.processors.cache.persistence.db.wal.crc; -import junit.framework.TestCase; import java.io.EOFException; import java.io.File; import java.io.IOException; @@ -35,14 +34,14 @@ import org.junit.After; import org.junit.Before; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.fail; /** * */ -@RunWith(JUnit4.class) -public class IgniteDataIntegrityTests extends TestCase { +public class IgniteDataIntegrityTests { /** File input. */ private SimpleFileInput fileInput; @@ -51,9 +50,7 @@ public class IgniteDataIntegrityTests extends TestCase { /** {@inheritDoc} */ @Before - @Override public void setUp() throws Exception { - super.setUp(); - + public void setUp() throws Exception { File file = File.createTempFile("integrity", "dat"); file.deleteOnExit(); @@ -86,7 +83,7 @@ public class IgniteDataIntegrityTests extends TestCase { /** {@inheritDoc} */ @After - @Override public void tearDown() throws Exception { + public void tearDown() throws Exception { fileInput.io().close(); expBuf.close(); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgnitePureJavaCrcCompatibility.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgnitePureJavaCrcCompatibility.java index 1f882c95f8282..4f49990c603b0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgnitePureJavaCrcCompatibility.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgnitePureJavaCrcCompatibility.java @@ -17,21 +17,19 @@ package org.apache.ignite.internal.processors.cache.persistence.db.wal.crc; -import junit.framework.TestCase; import org.apache.ignite.internal.processors.cache.persistence.wal.crc.FastCrc; import org.apache.ignite.internal.processors.cache.persistence.wal.crc.PureJavaCrc32; import java.nio.ByteBuffer; import java.util.concurrent.ThreadLocalRandom; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; + +import static org.junit.Assert.assertEquals; /** * PureJavaCrc32 previous crc algo realization vs java.util.zip.crc32 test. */ -@RunWith(JUnit4.class) -public class IgnitePureJavaCrcCompatibility extends TestCase { +public class IgnitePureJavaCrcCompatibility { /** * Test crc algo equality results. * @throws Exception diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/tree/io/TrackingPageIOTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/tree/io/TrackingPageIOTest.java index c4fb28d80543d..e4f0fe9588e9e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/tree/io/TrackingPageIOTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/tree/io/TrackingPageIOTest.java @@ -25,21 +25,22 @@ import java.util.Set; import java.util.TreeSet; import java.util.concurrent.ThreadLocalRandom; -import junit.framework.TestCase; import org.apache.ignite.internal.pagemem.PageIdAllocator; import org.apache.ignite.internal.pagemem.PageIdUtils; import org.apache.ignite.internal.processors.cache.persistence.snapshot.TrackingPageIsCorruptedException; import org.apache.ignite.internal.util.GridUnsafe; import org.jetbrains.annotations.NotNull; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; /** * */ -@RunWith(JUnit4.class) -public class TrackingPageIOTest extends TestCase { +public class TrackingPageIOTest { /** Page size. */ public static final int PAGE_SIZE = 4096; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentAwareTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentAwareTest.java index 381cf40e33903..0bd9fcb853e40 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentAwareTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentAwareTest.java @@ -17,25 +17,24 @@ package org.apache.ignite.internal.processors.cache.persistence.wal.aware; import java.util.concurrent.CountDownLatch; -import junit.framework.TestCase; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.IgniteFutureTimeoutCheckedException; import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.internal.IgniteInterruptedCheckedException; import org.apache.ignite.testframework.GridTestUtils; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; import static org.hamcrest.CoreMatchers.is; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; /** * Test for {@link SegmentAware}. */ -@RunWith(JUnit4.class) -public class SegmentAwareTest extends TestCase { - +public class SegmentAwareTest { /** * Checking to avoid deadlock SegmentArchivedStorage.markAsMovedToArchive -> SegmentLockStorage.locked <-> * SegmentLockStorage.releaseWorkSegment -> SegmentArchivedStorage.onSegmentUnlocked diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/DepthFirstSearchTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/DepthFirstSearchTest.java index 4fec1ab1a4063..6f19932695c4f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/DepthFirstSearchTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/DepthFirstSearchTest.java @@ -26,21 +26,20 @@ import java.util.Map; import java.util.Random; import java.util.Set; -import junit.framework.TestCase; import org.apache.ignite.internal.processors.cache.version.GridCacheVersion; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.internal.U; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; import static org.apache.ignite.internal.processors.cache.transactions.TxDeadlockDetection.findCycle; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.fail; /** * DFS test for search cycle in wait-for-graph. */ -@RunWith(JUnit4.class) -public class DepthFirstSearchTest extends TestCase { +public class DepthFirstSearchTest { /** Tx 1. */ private static final GridCacheVersion T1 = new GridCacheVersion(1, 0, 0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsModeResolverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsModeResolverSelfTest.java index f8392a4234a45..c40f6aec41804 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsModeResolverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsModeResolverSelfTest.java @@ -22,32 +22,32 @@ import java.util.HashSet; import java.util.List; import java.util.Set; -import junit.framework.TestCase; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.igfs.IgfsMode; import org.apache.ignite.igfs.IgfsPath; import org.apache.ignite.internal.util.typedef.T2; import org.junit.Before; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; import static org.apache.ignite.igfs.IgfsMode.DUAL_ASYNC; import static org.apache.ignite.igfs.IgfsMode.DUAL_SYNC; import static org.apache.ignite.igfs.IgfsMode.PRIMARY; import static org.apache.ignite.igfs.IgfsMode.PROXY; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; /** * */ -@RunWith(JUnit4.class) -public class IgfsModeResolverSelfTest extends TestCase { +public class IgfsModeResolverSelfTest { /** */ private IgfsModeResolver reslvr; /** {@inheritDoc} */ @Before - @Override public void setUp() throws Exception { + public void setUp() throws Exception { reslvr = new IgfsModeResolver(DUAL_SYNC, new ArrayList<>(Arrays.asList(new T2<>( new IgfsPath("/a/b/c/d"), PROXY), new T2<>(new IgfsPath("/a/P/"), PRIMARY), new T2<>(new IgfsPath("/a/b/"), DUAL_ASYNC)))); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/GridCleanerTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/GridCleanerTest.java index d6959edbfb1de..e024c7c88c8bf 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/GridCleanerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/GridCleanerTest.java @@ -17,16 +17,12 @@ package org.apache.ignite.internal.util; -import junit.framework.TestCase; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; /** * Grid cleaner tests. */ -@RunWith(JUnit4.class) -public class GridCleanerTest extends TestCase { +public class GridCleanerTest { /** * @throws Exception If failed. */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/GridStartupWithUndefinedIgniteHomeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/GridStartupWithUndefinedIgniteHomeSelfTest.java index d8f300d64cb8b..f5f989f226a45 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/GridStartupWithUndefinedIgniteHomeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/GridStartupWithUndefinedIgniteHomeSelfTest.java @@ -32,8 +32,6 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.After; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_HOME; import static org.apache.ignite.internal.util.IgniteUtils.nullifyHomeDirectory; @@ -46,8 +44,7 @@ * independent from {@link GridCommonAbstractTest} stuff. * 2. Do not replace native Java asserts with JUnit ones - test won't fall on TeamCity. */ -@RunWith(JUnit4.class) -public class GridStartupWithUndefinedIgniteHomeSelfTest extends TestCase { +public class GridStartupWithUndefinedIgniteHomeSelfTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -56,7 +53,7 @@ public class GridStartupWithUndefinedIgniteHomeSelfTest extends TestCase { /** {@inheritDoc} */ @After - @Override public void tearDown() throws Exception { + public void tearDown() throws Exception { // Next grid in the same VM shouldn't use cached values produced by these tests. nullifyHomeDirectory(); @@ -84,7 +81,7 @@ public void testStartStopWithUndefinedIgniteHome() throws Exception { IgniteLogger log = new JavaLogger(); - log.info(">>> Test started: " + getName()); + log.info(">>> Test started: start-stop"); log.info("Grid start-stop test count: " + GRID_COUNT); for (int i = 0; i < GRID_COUNT; i++) { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/io/GridUnsafeDataInputOutputByteOrderSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/io/GridUnsafeDataInputOutputByteOrderSelfTest.java index 34a7816fc6db8..78c4f2210aebc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/io/GridUnsafeDataInputOutputByteOrderSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/io/GridUnsafeDataInputOutputByteOrderSelfTest.java @@ -19,12 +19,9 @@ import java.io.ByteArrayInputStream; import java.util.Random; -import junit.framework.TestCase; import org.junit.After; import org.junit.Before; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; import static org.apache.ignite.GridTestIoUtils.getCharByByteLE; import static org.apache.ignite.GridTestIoUtils.getDoubleByByteLE; @@ -33,12 +30,12 @@ import static org.apache.ignite.GridTestIoUtils.getLongByByteLE; import static org.apache.ignite.GridTestIoUtils.getShortByByteLE; import static org.junit.Assert.assertArrayEquals; +import static org.junit.Assert.assertEquals; /** * Grid unsafe data input/output byte order sanity tests. */ -@RunWith(JUnit4.class) -public class GridUnsafeDataInputOutputByteOrderSelfTest extends TestCase { +public class GridUnsafeDataInputOutputByteOrderSelfTest { /** Array length. */ private static final int ARR_LEN = 16; @@ -56,7 +53,7 @@ public class GridUnsafeDataInputOutputByteOrderSelfTest extends TestCase { /** {@inheritDoc} */ @Before - @Override public void setUp() throws Exception { + public void setUp() throws Exception { out = new GridUnsafeDataOutput(16 * 8+ LEN_BYTES); in = new GridUnsafeDataInput(); in.inputStream(new ByteArrayInputStream(out.internalArray())); @@ -64,7 +61,7 @@ public class GridUnsafeDataInputOutputByteOrderSelfTest extends TestCase { /** {@inheritDoc} */ @After - @Override public void tearDown() throws Exception { + public void tearDown() throws Exception { in.close(); out.close(); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryNativeLoaderSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryNativeLoaderSelfTest.java index 060d72d117eaa..57f5216016360 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryNativeLoaderSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryNativeLoaderSelfTest.java @@ -21,19 +21,16 @@ import java.io.IOException; import java.io.InputStreamReader; import java.util.Collections; -import junit.framework.TestCase; import org.apache.ignite.internal.util.GridJavaProcess; import org.apache.ignite.internal.util.typedef.internal.U; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; + +import static org.junit.Assert.assertEquals; /** * Test shared memory native loader. */ -@RunWith(JUnit4.class) -public class IpcSharedMemoryNativeLoaderSelfTest extends TestCase { - +public class IpcSharedMemoryNativeLoaderSelfTest { /** * Test {@link IpcSharedMemoryNativeLoader#load()} in case, when native library path was * already loaded, but corrupted. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioDelimitedBufferSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioDelimitedBufferSelfTest.java index a483f1ba285b5..5a57c0a133d26 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioDelimitedBufferSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioDelimitedBufferSelfTest.java @@ -22,16 +22,14 @@ import java.util.Arrays; import java.util.List; import java.util.Random; -import junit.framework.TestCase; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; + +import static org.junit.Assert.assertEquals; /** * Tests for {@link GridNioDelimitedBuffer}. */ -@RunWith(JUnit4.class) -public class GridNioDelimitedBufferSelfTest extends TestCase { +public class GridNioDelimitedBufferSelfTest { /** */ private static final String ASCII = "ASCII"; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridRoundTripTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridRoundTripTest.java index 3d5b23ea04c1c..91ae5a2e4de60 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridRoundTripTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridRoundTripTest.java @@ -26,17 +26,13 @@ import java.net.ServerSocket; import java.net.Socket; import java.util.Random; -import junit.framework.TestCase; import org.apache.ignite.internal.util.typedef.internal.U; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; /** * Tests pure round trip time on network. */ -@RunWith(JUnit4.class) -public class GridRoundTripTest extends TestCase { +public class GridRoundTripTest { /** Communication port. */ public static final int PORT = 47600; diff --git a/modules/core/src/test/java/org/apache/ignite/jvmtest/FileIOTest.java b/modules/core/src/test/java/org/apache/ignite/jvmtest/FileIOTest.java index a2f7e8ff181c3..0d048023e5df2 100644 --- a/modules/core/src/test/java/org/apache/ignite/jvmtest/FileIOTest.java +++ b/modules/core/src/test/java/org/apache/ignite/jvmtest/FileIOTest.java @@ -21,18 +21,14 @@ import java.io.RandomAccessFile; import java.util.Arrays; import java.util.UUID; -import junit.framework.TestCase; import org.apache.ignite.internal.util.typedef.X; import org.apache.ignite.internal.util.typedef.internal.U; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; /** * Java file IO test. */ -@RunWith(JUnit4.class) -public class FileIOTest extends TestCase { +public class FileIOTest { /** File path. */ private static final String FILE_PATH = "/test-java-file.tmp"; diff --git a/modules/core/src/test/java/org/apache/ignite/jvmtest/FileLocksTest.java b/modules/core/src/test/java/org/apache/ignite/jvmtest/FileLocksTest.java index 01d359822e25e..b70e19868e9da 100644 --- a/modules/core/src/test/java/org/apache/ignite/jvmtest/FileLocksTest.java +++ b/modules/core/src/test/java/org/apache/ignite/jvmtest/FileLocksTest.java @@ -21,16 +21,12 @@ import java.io.RandomAccessFile; import java.nio.channels.FileLock; import javax.swing.JOptionPane; -import junit.framework.TestCase; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; /** * Java file locks test. */ -@RunWith(JUnit4.class) -public class FileLocksTest extends TestCase { +public class FileLocksTest { /** File path (on Windows file will be created under the root directory of the current drive). */ private static final String LOCK_FILE_PATH = "/test-java-file-lock-tmp.bin"; diff --git a/modules/core/src/test/java/org/apache/ignite/jvmtest/LinkedHashMapTest.java b/modules/core/src/test/java/org/apache/ignite/jvmtest/LinkedHashMapTest.java index 8155ab5c7feea..f4fd673be1130 100644 --- a/modules/core/src/test/java/org/apache/ignite/jvmtest/LinkedHashMapTest.java +++ b/modules/core/src/test/java/org/apache/ignite/jvmtest/LinkedHashMapTest.java @@ -19,17 +19,13 @@ import java.util.LinkedHashMap; import java.util.Map; -import junit.framework.TestCase; import org.apache.ignite.internal.util.typedef.X; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; /** * Test for {@link LinkedHashMap}. */ -@RunWith(JUnit4.class) -public class LinkedHashMapTest extends TestCase { +public class LinkedHashMapTest { /** @throws Exception If failed. */ @Test public void testAccessOrder1() throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/jvmtest/NetworkFailureTest.java b/modules/core/src/test/java/org/apache/ignite/jvmtest/NetworkFailureTest.java index 486265a2dcd7e..3a5e4da39c29f 100644 --- a/modules/core/src/test/java/org/apache/ignite/jvmtest/NetworkFailureTest.java +++ b/modules/core/src/test/java/org/apache/ignite/jvmtest/NetworkFailureTest.java @@ -26,21 +26,17 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicReference; import javax.swing.JOptionPane; -import junit.framework.TestCase; import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.internal.util.typedef.X; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.GridTestUtils; import org.jetbrains.annotations.Nullable; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; /** * */ -@RunWith(JUnit4.class) -public class NetworkFailureTest extends TestCase { +public class NetworkFailureTest { /** * @throws Exception If failed. */ diff --git a/modules/core/src/test/java/org/apache/ignite/jvmtest/QueueSizeCounterMultiThreadedTest.java b/modules/core/src/test/java/org/apache/ignite/jvmtest/QueueSizeCounterMultiThreadedTest.java index 4db09ea57d0c3..3349e804cccd0 100644 --- a/modules/core/src/test/java/org/apache/ignite/jvmtest/QueueSizeCounterMultiThreadedTest.java +++ b/modules/core/src/test/java/org/apache/ignite/jvmtest/QueueSizeCounterMultiThreadedTest.java @@ -23,20 +23,16 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.locks.ReadWriteLock; import java.util.concurrent.locks.ReentrantReadWriteLock; -import junit.framework.TestCase; import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.internal.util.typedef.X; import org.apache.ignite.testframework.GridTestUtils; import org.jetbrains.annotations.Nullable; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; /** * Test to check strange assertion in eviction manager. */ -@RunWith(JUnit4.class) -public class QueueSizeCounterMultiThreadedTest extends TestCase { +public class QueueSizeCounterMultiThreadedTest { /** * @throws Exception If failed. */ diff --git a/modules/core/src/test/java/org/apache/ignite/jvmtest/ReadWriteLockMultiThreadedTest.java b/modules/core/src/test/java/org/apache/ignite/jvmtest/ReadWriteLockMultiThreadedTest.java index f89d84697c35c..d57dcc860dff5 100644 --- a/modules/core/src/test/java/org/apache/ignite/jvmtest/ReadWriteLockMultiThreadedTest.java +++ b/modules/core/src/test/java/org/apache/ignite/jvmtest/ReadWriteLockMultiThreadedTest.java @@ -20,20 +20,16 @@ import java.util.concurrent.Callable; import java.util.concurrent.locks.ReadWriteLock; import java.util.concurrent.locks.ReentrantReadWriteLock; -import junit.framework.TestCase; import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.internal.util.typedef.X; import org.apache.ignite.testframework.GridTestUtils; import org.jetbrains.annotations.Nullable; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; /** * JDK read write lock test. */ -@RunWith(JUnit4.class) -public class ReadWriteLockMultiThreadedTest extends TestCase { +public class ReadWriteLockMultiThreadedTest { /** * @throws Exception If failed. */ diff --git a/modules/core/src/test/java/org/apache/ignite/jvmtest/RegExpTest.java b/modules/core/src/test/java/org/apache/ignite/jvmtest/RegExpTest.java index 6d90611c5b02c..6add401663bc0 100644 --- a/modules/core/src/test/java/org/apache/ignite/jvmtest/RegExpTest.java +++ b/modules/core/src/test/java/org/apache/ignite/jvmtest/RegExpTest.java @@ -19,18 +19,14 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; -import junit.framework.TestCase; import org.apache.ignite.internal.util.typedef.X; import org.apache.ignite.internal.util.typedef.internal.U; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; /** * Java reg exp test. */ -@RunWith(JUnit4.class) -public class RegExpTest extends TestCase { +public class RegExpTest { /** * @throws Exception If failed. */ diff --git a/modules/core/src/test/java/org/apache/ignite/jvmtest/ServerSocketMultiThreadedTest.java b/modules/core/src/test/java/org/apache/ignite/jvmtest/ServerSocketMultiThreadedTest.java index 1aee5f1f8ae30..e677ea7f8d15b 100644 --- a/modules/core/src/test/java/org/apache/ignite/jvmtest/ServerSocketMultiThreadedTest.java +++ b/modules/core/src/test/java/org/apache/ignite/jvmtest/ServerSocketMultiThreadedTest.java @@ -24,14 +24,11 @@ import java.util.concurrent.Callable; import java.util.concurrent.CyclicBarrier; import java.util.concurrent.atomic.AtomicInteger; -import junit.framework.TestCase; import org.apache.ignite.internal.util.typedef.X; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.GridTestUtils; import org.jetbrains.annotations.Nullable; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; /** * Java server socket test. @@ -40,8 +37,7 @@ * BindException or SocketException may be thrown. Purpose of this test is * to find some explanation to that. */ -@RunWith(JUnit4.class) -public class ServerSocketMultiThreadedTest extends TestCase { +public class ServerSocketMultiThreadedTest { /** */ private static final int THREADS_CNT = 10; diff --git a/modules/core/src/test/java/org/apache/ignite/logger/java/JavaLoggerTest.java b/modules/core/src/test/java/org/apache/ignite/logger/java/JavaLoggerTest.java index f8b71f1d66f5e..4687ca992c9c2 100644 --- a/modules/core/src/test/java/org/apache/ignite/logger/java/JavaLoggerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/logger/java/JavaLoggerTest.java @@ -18,21 +18,19 @@ package org.apache.ignite.logger.java; import java.util.UUID; -import junit.framework.TestCase; import org.apache.ignite.IgniteLogger; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.logger.LoggerNodeIdAware; import org.apache.ignite.testframework.junits.common.GridCommonTest; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; + +import static org.junit.Assert.assertTrue; /** * Java logger test. */ @GridCommonTest(group = "Logger") -@RunWith(JUnit4.class) -public class JavaLoggerTest extends TestCase { +public class JavaLoggerTest { /** */ @SuppressWarnings({"FieldCanBeLocal"}) private IgniteLogger log; diff --git a/modules/core/src/test/java/org/apache/ignite/spi/encryption/KeystoreEncryptionSpiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/encryption/KeystoreEncryptionSpiSelfTest.java index 4e605d5b39cb9..573c5c27acc05 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/encryption/KeystoreEncryptionSpiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/encryption/KeystoreEncryptionSpiSelfTest.java @@ -18,23 +18,22 @@ package org.apache.ignite.spi.encryption; import java.nio.ByteBuffer; -import junit.framework.TestCase; import org.apache.ignite.IgniteException; import org.apache.ignite.spi.encryption.keystore.KeystoreEncryptionKey; import org.apache.ignite.spi.encryption.keystore.KeystoreEncryptionSpi; import org.apache.ignite.testframework.GridTestUtils; import org.jetbrains.annotations.NotNull; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; import static java.nio.charset.StandardCharsets.UTF_8; import static org.apache.ignite.internal.encryption.AbstractEncryptionTest.KEYSTORE_PASSWORD; import static org.apache.ignite.internal.encryption.AbstractEncryptionTest.KEYSTORE_PATH; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; /** */ -@RunWith(JUnit4.class) -public class KeystoreEncryptionSpiSelfTest extends TestCase { +public class KeystoreEncryptionSpiSelfTest { /** @throws Exception If failed. */ @Test public void testCantStartWithEmptyParam() throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/test/ConfigVariationsTestSuiteBuilderTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/test/ConfigVariationsTestSuiteBuilderTest.java index c6edeb3ea1d4e..50301e4e42481 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/test/ConfigVariationsTestSuiteBuilderTest.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/test/ConfigVariationsTestSuiteBuilderTest.java @@ -18,7 +18,6 @@ package org.apache.ignite.testframework.test; import java.util.concurrent.atomic.AtomicInteger; -import junit.framework.TestCase; import junit.framework.TestSuite; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; @@ -26,14 +25,13 @@ import org.apache.ignite.testframework.configvariations.ConfigVariationsTestSuiteBuilder; import org.apache.ignite.testframework.junits.IgniteConfigVariationsAbstractTest; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; + +import static org.junit.Assert.assertEquals; /** * */ -@RunWith(JUnit4.class) -public class ConfigVariationsTestSuiteBuilderTest extends TestCase { +public class ConfigVariationsTestSuiteBuilderTest { /** * @throws Exception If failed. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/test/ParametersTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/test/ParametersTest.java index 0ac183d79e05c..fd145b500b4c4 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/test/ParametersTest.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/test/ParametersTest.java @@ -19,20 +19,18 @@ import java.util.HashSet; import java.util.Set; -import junit.framework.TestCase; import org.apache.ignite.cache.CacheMode; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.testframework.configvariations.ConfigParameter; import org.apache.ignite.testframework.configvariations.Parameters; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; + +import static org.junit.Assert.assertEquals; /** * Test. */ -@RunWith(JUnit4.class) -public class ParametersTest extends TestCase { +public class ParametersTest { /** */ private static final String DEFAULT_CACHE_NAME = "default"; diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/test/VariationsIteratorTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/test/VariationsIteratorTest.java index 93964286556f7..a21cb6c87ee39 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/test/VariationsIteratorTest.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/test/VariationsIteratorTest.java @@ -20,17 +20,16 @@ import java.util.Arrays; import java.util.HashSet; import java.util.Set; -import junit.framework.TestCase; import org.apache.ignite.testframework.configvariations.VariationsIterator; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.fail; /** * Test start iterator. */ -@RunWith(JUnit4.class) -public class VariationsIteratorTest extends TestCase { +public class VariationsIteratorTest { /** * @throws Exception If failed. */ diff --git a/modules/core/src/test/java/org/apache/ignite/util/GridIntListSelfTest.java b/modules/core/src/test/java/org/apache/ignite/util/GridIntListSelfTest.java index e0d079c328252..16daa9a7f4665 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/GridIntListSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/GridIntListSelfTest.java @@ -17,19 +17,18 @@ package org.apache.ignite.util; -import junit.framework.TestCase; import org.apache.ignite.internal.util.GridIntList; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; import static org.apache.ignite.internal.util.GridIntList.asList; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; /** * */ -@RunWith(JUnit4.class) -public class GridIntListSelfTest extends TestCase { +public class GridIntListSelfTest { /** * @throws Exception If failed. */ diff --git a/modules/core/src/test/java/org/apache/ignite/util/GridLongListSelfTest.java b/modules/core/src/test/java/org/apache/ignite/util/GridLongListSelfTest.java index 61c27b2aa0424..bf69de7823d18 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/GridLongListSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/GridLongListSelfTest.java @@ -17,19 +17,19 @@ package org.apache.ignite.util; -import junit.framework.TestCase; import org.apache.ignite.internal.util.GridLongList; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; import static org.apache.ignite.internal.util.GridLongList.asList; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; /** * */ -@RunWith(JUnit4.class) -public class GridLongListSelfTest extends TestCase { +public class GridLongListSelfTest { /** * @throws Exception If failed. */ diff --git a/modules/core/src/test/java/org/apache/ignite/util/GridMessageCollectionTest.java b/modules/core/src/test/java/org/apache/ignite/util/GridMessageCollectionTest.java index 466500d10092f..ce048393e97d4 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/GridMessageCollectionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/GridMessageCollectionTest.java @@ -18,7 +18,6 @@ package org.apache.ignite.util; import java.nio.ByteBuffer; -import junit.framework.TestCase; import org.apache.ignite.internal.direct.DirectMessageReader; import org.apache.ignite.internal.direct.DirectMessageWriter; import org.apache.ignite.internal.managers.communication.GridIoMessageFactory; @@ -28,17 +27,16 @@ import org.apache.ignite.plugin.extensions.communication.MessageReader; import org.apache.ignite.plugin.extensions.communication.MessageWriter; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; import static java.util.UUID.randomUUID; import static org.apache.ignite.internal.util.GridMessageCollection.of; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; /** * */ -@RunWith(JUnit4.class) -public class GridMessageCollectionTest extends TestCase { +public class GridMessageCollectionTest { /** */ private byte proto; diff --git a/modules/direct-io/src/test/java/org/apache/ignite/internal/processors/cache/persistence/file/IgniteFileIOTest.java b/modules/direct-io/src/test/java/org/apache/ignite/internal/processors/cache/persistence/file/IgniteFileIOTest.java index 95011e2231452..a5e17030a5c00 100644 --- a/modules/direct-io/src/test/java/org/apache/ignite/internal/processors/cache/persistence/file/IgniteFileIOTest.java +++ b/modules/direct-io/src/test/java/org/apache/ignite/internal/processors/cache/persistence/file/IgniteFileIOTest.java @@ -21,17 +21,13 @@ import java.nio.ByteBuffer; import java.nio.MappedByteBuffer; import java.util.concurrent.ThreadLocalRandom; -import junit.framework.TestCase; import org.jetbrains.annotations.NotNull; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; /** * File IO tests. */ -@RunWith(JUnit4.class) -public class IgniteFileIOTest extends TestCase { +public class IgniteFileIOTest { /** Test data size. */ private static final int TEST_DATA_SIZE = 16 * 1024 * 1024; diff --git a/modules/jcl/src/test/java/org/apache/ignite/logger/jcl/JclLoggerTest.java b/modules/jcl/src/test/java/org/apache/ignite/logger/jcl/JclLoggerTest.java index e6c8c1e36d99d..0568e0ce8525a 100644 --- a/modules/jcl/src/test/java/org/apache/ignite/logger/jcl/JclLoggerTest.java +++ b/modules/jcl/src/test/java/org/apache/ignite/logger/jcl/JclLoggerTest.java @@ -17,20 +17,16 @@ package org.apache.ignite.logger.jcl; -import junit.framework.TestCase; import org.apache.commons.logging.LogFactory; import org.apache.ignite.IgniteLogger; import org.apache.ignite.testframework.junits.common.GridCommonTest; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; /** * Jcl logger test. */ @GridCommonTest(group = "Logger") -@RunWith(JUnit4.class) -public class JclLoggerTest extends TestCase { +public class JclLoggerTest { /** */ @SuppressWarnings({"FieldCanBeLocal"}) private IgniteLogger log; From 7e8c5a0e3dab4e70349c3f0c73239cdb4081e5c0 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Sun, 9 Dec 2018 15:14:46 +0300 Subject: [PATCH 084/176] IGNITE-10177 cleanup Junit 3 from the project - wip - cleanup // extends testcase -- verified with diffs overview and rebuild --- .../log4j/GridLog4jConfigUpdateTest.java | 9 +++---- .../log4j/GridLog4jCorrectFileNameTest.java | 17 +++++++----- .../log4j/GridLog4jInitializedTest.java | 13 +++++---- .../log4j/GridLog4jLoggingFileTest.java | 12 ++++----- .../log4j/GridLog4jLoggingPathTest.java | 10 +++---- .../logger/log4j/GridLog4jLoggingUrlTest.java | 12 ++++----- .../log4j/GridLog4jNotInitializedTest.java | 8 +++--- .../logger/log4j2/Log4j2ConfigUpdateTest.java | 9 +++---- .../logger/log4j2/Log4j2LoggerMarkerTest.java | 18 +++++-------- .../logger/log4j2/Log4j2LoggerSelfTest.java | 12 ++++----- .../Log4j2LoggerVerboseModeSelfTest.java | 10 +++---- .../ignite/mesos/IgniteSchedulerSelfTest.java | 27 ++++++++++++++----- .../logger/slf4j/Slf4jLoggerMarkerTest.java | 22 +++++++-------- .../yarn/IgniteApplicationMasterSelfTest.java | 16 +++++------ 14 files changed, 99 insertions(+), 96 deletions(-) diff --git a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jConfigUpdateTest.java b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jConfigUpdateTest.java index bb0f086f2a2ed..64e09a9083fde 100644 --- a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jConfigUpdateTest.java +++ b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jConfigUpdateTest.java @@ -21,18 +21,17 @@ import java.nio.file.Files; import java.nio.file.StandardCopyOption; import java.util.Date; -import junit.framework.TestCase; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.log4j.helpers.FileWatchdog; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; + +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; /** * Checking that Log4j configuration is updated when its source file is changed. */ -@RunWith(JUnit4.class) -public class GridLog4jConfigUpdateTest extends TestCase { +public class GridLog4jConfigUpdateTest { /** Path to log4j configuration with INFO enabled. */ private static final String LOG_CONFIG_INFO = "modules/log4j/src/test/config/log4j-info.xml"; diff --git a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jCorrectFileNameTest.java b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jCorrectFileNameTest.java index 8b24624c7b4fb..2eee8cc2d5ef9 100644 --- a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jCorrectFileNameTest.java +++ b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jCorrectFileNameTest.java @@ -20,7 +20,6 @@ import java.io.File; import java.util.Collections; import java.util.Enumeration; -import junit.framework.TestCase; import org.apache.ignite.Ignite; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.util.typedef.G; @@ -32,21 +31,24 @@ import org.apache.log4j.Logger; import org.apache.log4j.PatternLayout; import org.apache.log4j.varia.LevelRangeFilter; +import org.junit.After; +import org.junit.Before; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; + +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; /** * Tests that several grids log to files with correct names. */ @GridCommonTest(group = "Logger") -@RunWith(JUnit4.class) -public class GridLog4jCorrectFileNameTest extends TestCase { +public class GridLog4jCorrectFileNameTest { /** Appender */ private Log4jRollingFileAppender appender; /** {@inheritDoc} */ - @Override protected void setUp() throws Exception { + @Before + public void setUp() throws Exception { Logger root = Logger.getRootLogger(); for (Enumeration appenders = root.getAllAppenders(); appenders.hasMoreElements(); ) { @@ -60,7 +62,8 @@ public class GridLog4jCorrectFileNameTest extends TestCase { } /** {@inheritDoc} */ - @Override public void tearDown() { + @After + public void tearDown() { if (appender != null) { Logger.getRootLogger().removeAppender(Log4jRollingFileAppender.class.getSimpleName()); diff --git a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jInitializedTest.java b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jInitializedTest.java index 9f3c10f762324..e8e8e707cd98d 100644 --- a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jInitializedTest.java +++ b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jInitializedTest.java @@ -17,25 +17,24 @@ package org.apache.ignite.logger.log4j; -import junit.framework.TestCase; import org.apache.ignite.IgniteLogger; import org.apache.ignite.testframework.junits.common.GridCommonTest; import org.apache.log4j.BasicConfigurator; +import org.junit.Before; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; + +import static org.junit.Assert.assertTrue; /** * Log4j initialized test. */ @GridCommonTest(group = "Logger") -@RunWith(JUnit4.class) -public class GridLog4jInitializedTest extends TestCase { - +public class GridLog4jInitializedTest { /** * @throws Exception If failed. */ - @Override protected void setUp() throws Exception { + @Before + public void setUp() throws Exception { BasicConfigurator.configure(); } diff --git a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingFileTest.java b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingFileTest.java index ae77bd0ca0977..be62d3ccd498b 100644 --- a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingFileTest.java +++ b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingFileTest.java @@ -18,20 +18,19 @@ package org.apache.ignite.logger.log4j; import java.io.File; -import junit.framework.TestCase; import org.apache.ignite.IgniteLogger; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Before; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; + +import static org.junit.Assert.assertTrue; /** * Grid Log4j SPI test. */ @GridCommonTest(group = "Logger") -@RunWith(JUnit4.class) -public class GridLog4jLoggingFileTest extends TestCase { +public class GridLog4jLoggingFileTest { /** */ private IgniteLogger log; @@ -39,7 +38,8 @@ public class GridLog4jLoggingFileTest extends TestCase { private File xml; /** {@inheritDoc} */ - @Override protected void setUp() throws Exception { + @Before + public void setUp() throws Exception { xml = GridTestUtils.resolveIgnitePath("modules/core/src/test/config/log4j-test.xml"); assert xml != null; diff --git a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingPathTest.java b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingPathTest.java index c4be6c81076b5..f7cae8e99472e 100644 --- a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingPathTest.java +++ b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingPathTest.java @@ -17,19 +17,17 @@ package org.apache.ignite.logger.log4j; -import junit.framework.TestCase; import org.apache.ignite.IgniteLogger; import org.apache.ignite.testframework.junits.common.GridCommonTest; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; + +import static org.junit.Assert.assertTrue; /** * Grid Log4j SPI test. */ @GridCommonTest(group = "Logger") -@RunWith(JUnit4.class) -public class GridLog4jLoggingPathTest extends TestCase { +public class GridLog4jLoggingPathTest { /** */ private IgniteLogger log; @@ -37,7 +35,7 @@ public class GridLog4jLoggingPathTest extends TestCase { private String path = "modules/core/src/test/config/log4j-test.xml"; /** {@inheritDoc} */ - @Override protected void setUp() throws Exception { + public void setUp() throws Exception { log = new Log4JLogger(path).getLogger(getClass()); } diff --git a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingUrlTest.java b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingUrlTest.java index 86070da8933c1..5a47d9a4fab1e 100644 --- a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingUrlTest.java +++ b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingUrlTest.java @@ -19,20 +19,19 @@ import java.io.File; import java.net.URL; -import junit.framework.TestCase; import org.apache.ignite.IgniteLogger; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Before; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; + +import static org.junit.Assert.assertTrue; /** * Grid Log4j SPI test. */ @GridCommonTest(group = "Logger") -@RunWith(JUnit4.class) -public class GridLog4jLoggingUrlTest extends TestCase { +public class GridLog4jLoggingUrlTest { /** */ private IgniteLogger log; @@ -40,7 +39,8 @@ public class GridLog4jLoggingUrlTest extends TestCase { private URL url; /** {@inheritDoc} */ - @Override protected void setUp() throws Exception { + @Before + public void setUp() throws Exception { File xml = GridTestUtils.resolveIgnitePath("modules/core/src/test/config/log4j-test.xml"); assert xml != null; diff --git a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jNotInitializedTest.java b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jNotInitializedTest.java index 12d6fc87bc100..eefebbb8f7745 100644 --- a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jNotInitializedTest.java +++ b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jNotInitializedTest.java @@ -17,19 +17,17 @@ package org.apache.ignite.logger.log4j; -import junit.framework.TestCase; import org.apache.ignite.IgniteLogger; import org.apache.ignite.testframework.junits.common.GridCommonTest; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; + +import static org.junit.Assert.assertTrue; /** * Log4j not initialized test. */ @GridCommonTest(group = "Logger") -@RunWith(JUnit4.class) -public class GridLog4jNotInitializedTest extends TestCase { +public class GridLog4jNotInitializedTest { /** */ @Test public void testLogInitialize() { diff --git a/modules/log4j2/src/test/java/org/apache/ignite/logger/log4j2/Log4j2ConfigUpdateTest.java b/modules/log4j2/src/test/java/org/apache/ignite/logger/log4j2/Log4j2ConfigUpdateTest.java index 9a4380b3b4009..43367e44fa3ce 100644 --- a/modules/log4j2/src/test/java/org/apache/ignite/logger/log4j2/Log4j2ConfigUpdateTest.java +++ b/modules/log4j2/src/test/java/org/apache/ignite/logger/log4j2/Log4j2ConfigUpdateTest.java @@ -21,17 +21,16 @@ import java.nio.file.Files; import java.nio.file.StandardCopyOption; import java.util.Date; -import junit.framework.TestCase; import org.apache.ignite.internal.util.typedef.internal.U; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; + +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; /** * Checking that Log4j2 configuration is updated when its source file is changed. */ -@RunWith(JUnit4.class) -public class Log4j2ConfigUpdateTest extends TestCase { +public class Log4j2ConfigUpdateTest { /** Path to log4j2 configuration with INFO enabled. */ private static final String LOG_CONFIG_INFO = "modules/log4j2/src/test/config/log4j2-info.xml"; diff --git a/modules/log4j2/src/test/java/org/apache/ignite/logger/log4j2/Log4j2LoggerMarkerTest.java b/modules/log4j2/src/test/java/org/apache/ignite/logger/log4j2/Log4j2LoggerMarkerTest.java index f7d4d91111ace..37f2830b69910 100644 --- a/modules/log4j2/src/test/java/org/apache/ignite/logger/log4j2/Log4j2LoggerMarkerTest.java +++ b/modules/log4j2/src/test/java/org/apache/ignite/logger/log4j2/Log4j2LoggerMarkerTest.java @@ -18,19 +18,19 @@ package org.apache.ignite.logger.log4j2; import java.io.File; -import junit.framework.TestCase; import org.apache.ignite.internal.util.typedef.internal.U; import org.junit.After; import org.junit.Before; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; + +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; /** * Testing that markers are supported by log4j2 implementation. */ -@RunWith(JUnit4.class) -public class Log4j2LoggerMarkerTest extends TestCase { +public class Log4j2LoggerMarkerTest { /** Path to log4j configuration. */ private static final String LOG_CONFIG = "modules/log4j2/src/test/config/log4j2-markers.xml"; @@ -42,9 +42,7 @@ public class Log4j2LoggerMarkerTest extends TestCase { /** */ @Before - @Override protected void setUp() throws Exception { - super.setUp(); - + public void setUp() throws Exception { Log4J2Logger.cleanup(); deleteLogs(); @@ -52,9 +50,7 @@ public class Log4j2LoggerMarkerTest extends TestCase { /** */ @After - @Override protected void tearDown() throws Exception { - super.tearDown(); - + public void tearDown() throws Exception { deleteLogs(); } diff --git a/modules/log4j2/src/test/java/org/apache/ignite/logger/log4j2/Log4j2LoggerSelfTest.java b/modules/log4j2/src/test/java/org/apache/ignite/logger/log4j2/Log4j2LoggerSelfTest.java index 585aa66884000..f9a5a9a357998 100644 --- a/modules/log4j2/src/test/java/org/apache/ignite/logger/log4j2/Log4j2LoggerSelfTest.java +++ b/modules/log4j2/src/test/java/org/apache/ignite/logger/log4j2/Log4j2LoggerSelfTest.java @@ -21,7 +21,6 @@ import java.net.URL; import java.util.Collections; import java.util.UUID; -import junit.framework.TestCase; import org.apache.ignite.Ignite; import org.apache.ignite.IgniteLogger; import org.apache.ignite.configuration.IgniteConfiguration; @@ -33,14 +32,15 @@ import org.apache.ignite.testframework.GridTestUtils; import org.junit.Before; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; /** * Grid Log4j2 SPI test. */ -@RunWith(JUnit4.class) -public class Log4j2LoggerSelfTest extends TestCase { +public class Log4j2LoggerSelfTest { /** */ private static final String LOG_PATH_TEST = "modules/core/src/test/config/log4j2-test.xml"; @@ -51,7 +51,7 @@ public class Log4j2LoggerSelfTest extends TestCase { * @throws Exception If failed. */ @Before - @Override protected void setUp() throws Exception { + public void setUp() throws Exception { Log4J2Logger.cleanup(); } diff --git a/modules/log4j2/src/test/java/org/apache/ignite/logger/log4j2/Log4j2LoggerVerboseModeSelfTest.java b/modules/log4j2/src/test/java/org/apache/ignite/logger/log4j2/Log4j2LoggerVerboseModeSelfTest.java index 26a90bc1cf970..8897dddf13815 100644 --- a/modules/log4j2/src/test/java/org/apache/ignite/logger/log4j2/Log4j2LoggerVerboseModeSelfTest.java +++ b/modules/log4j2/src/test/java/org/apache/ignite/logger/log4j2/Log4j2LoggerVerboseModeSelfTest.java @@ -21,7 +21,6 @@ import java.io.File; import java.io.PrintStream; import java.util.Collections; -import junit.framework.TestCase; import org.apache.ignite.Ignite; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.util.typedef.G; @@ -31,14 +30,13 @@ import org.apache.logging.log4j.Level; import org.junit.Before; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; + +import static org.junit.Assert.assertTrue; /** * Grid Log4j2 SPI test. */ -@RunWith(JUnit4.class) -public class Log4j2LoggerVerboseModeSelfTest extends TestCase { +public class Log4j2LoggerVerboseModeSelfTest { /** */ private static final String LOG_PATH_VERBOSE_TEST = "modules/core/src/test/config/log4j2-verbose-test.xml"; @@ -46,7 +44,7 @@ public class Log4j2LoggerVerboseModeSelfTest extends TestCase { * @throws Exception If failed. */ @Before - @Override public void setUp() throws Exception { + public void setUp() throws Exception { Log4J2Logger.cleanup(); } diff --git a/modules/mesos/src/test/java/org/apache/ignite/mesos/IgniteSchedulerSelfTest.java b/modules/mesos/src/test/java/org/apache/ignite/mesos/IgniteSchedulerSelfTest.java index 4e485698aa4f7..a5eb336ca458b 100644 --- a/modules/mesos/src/test/java/org/apache/ignite/mesos/IgniteSchedulerSelfTest.java +++ b/modules/mesos/src/test/java/org/apache/ignite/mesos/IgniteSchedulerSelfTest.java @@ -22,22 +22,27 @@ import java.util.Collections; import java.util.List; import java.util.regex.Pattern; -import junit.framework.TestCase; import org.apache.ignite.mesos.resource.ResourceProvider; import org.apache.mesos.Protos; import org.apache.mesos.SchedulerDriver; +import org.junit.Before; +import org.junit.Test; + +import static junit.framework.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; /** * Scheduler tests. */ -public class IgniteSchedulerSelfTest extends TestCase { +public class IgniteSchedulerSelfTest { /** */ private IgniteScheduler scheduler; /** {@inheritDoc} */ - @Override public void setUp() throws Exception { - super.setUp(); - + @Before + public void setUp() throws Exception { ClusterProperties clustProp = new ClusterProperties(); scheduler = new IgniteScheduler(clustProp, new ResourceProvider() { @@ -62,6 +67,7 @@ public class IgniteSchedulerSelfTest extends TestCase { /** * @throws Exception If failed. */ + @Test public void testHostRegister() throws Exception { Protos.Offer offer = createOffer("hostname", 4, 1024); @@ -81,6 +87,7 @@ public void testHostRegister() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeclineByCpu() throws Exception { Protos.Offer offer = createOffer("hostname", 4, 1024); @@ -115,6 +122,7 @@ public void testDeclineByCpu() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeclineByMem() throws Exception { Protos.Offer offer = createOffer("hostname", 4, 1024); @@ -149,6 +157,7 @@ public void testDeclineByMem() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeclineByMemCpu() throws Exception { Protos.Offer offer = createOffer("hostname", 1, 1024); @@ -191,6 +200,7 @@ public void testDeclineByMemCpu() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeclineByCpuMinRequirements() throws Exception { Protos.Offer offer = createOffer("hostname", 8, 10240); @@ -211,6 +221,7 @@ public void testDeclineByCpuMinRequirements() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeclineByMemMinRequirements() throws Exception { Protos.Offer offer = createOffer("hostname", 8, 10240); @@ -231,6 +242,7 @@ public void testDeclineByMemMinRequirements() throws Exception { /** * @throws Exception If failed. */ + @Test public void testHosthameConstraint() throws Exception { Protos.Offer offer = createOffer("hostname", 8, 10240); @@ -258,6 +270,7 @@ public void testHosthameConstraint() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPerNode() throws Exception { Protos.Offer offer = createOffer("hostname", 8, 1024); @@ -304,6 +317,7 @@ public void testPerNode() throws Exception { /** * @throws Exception If failed. */ + @Test public void testIgniteFramework() throws Exception { final String mesosUserValue = "userAAAAA"; final String mesosRoleValue = "role1"; @@ -330,6 +344,7 @@ public void testIgniteFramework() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMesosRoleValidation() throws Exception { List failedRoleValues = Arrays.asList("", ".", "..", "-testRole", "test/Role", "test\\Role", "test Role", null); @@ -511,4 +526,4 @@ public void clear() { return null; } } -} \ No newline at end of file +} diff --git a/modules/slf4j/src/test/java/org/apache/ignite/logger/slf4j/Slf4jLoggerMarkerTest.java b/modules/slf4j/src/test/java/org/apache/ignite/logger/slf4j/Slf4jLoggerMarkerTest.java index 03fb6c5140ee6..151f8386562e3 100644 --- a/modules/slf4j/src/test/java/org/apache/ignite/logger/slf4j/Slf4jLoggerMarkerTest.java +++ b/modules/slf4j/src/test/java/org/apache/ignite/logger/slf4j/Slf4jLoggerMarkerTest.java @@ -18,18 +18,20 @@ package org.apache.ignite.logger.slf4j; import java.io.File; -import junit.framework.TestCase; import org.apache.ignite.internal.util.typedef.internal.U; +import org.junit.After; +import org.junit.Before; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; import org.slf4j.LoggerFactory; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + /** * Testing that markers are supported by log4j2 implementation. */ -@RunWith(JUnit4.class) -public class Slf4jLoggerMarkerTest extends TestCase { +public class Slf4jLoggerMarkerTest { /** Path to full log. */ private static final String LOG_ALL = "work/log/all.log"; @@ -37,16 +39,14 @@ public class Slf4jLoggerMarkerTest extends TestCase { private static final String LOG_FILTERED = "work/log/filtered.log"; /** */ - @Override protected void setUp() throws Exception { - super.setUp(); - + @Before + public void setUp() throws Exception { deleteLogs(); } /** */ - @Override protected void tearDown() throws Exception { - super.tearDown(); - + @After + public void tearDown() throws Exception { deleteLogs(); } diff --git a/modules/yarn/src/test/java/org/apache/ignite/yarn/IgniteApplicationMasterSelfTest.java b/modules/yarn/src/test/java/org/apache/ignite/yarn/IgniteApplicationMasterSelfTest.java index b3f49f3bb931e..eecea230db2af 100644 --- a/modules/yarn/src/test/java/org/apache/ignite/yarn/IgniteApplicationMasterSelfTest.java +++ b/modules/yarn/src/test/java/org/apache/ignite/yarn/IgniteApplicationMasterSelfTest.java @@ -28,7 +28,6 @@ import java.util.Map; import java.util.concurrent.ThreadLocalRandom; import java.util.regex.Pattern; -import junit.framework.TestCase; import org.apache.hadoop.fs.FSDataInputStream; import org.apache.hadoop.fs.FSDataOutputStream; import org.apache.hadoop.fs.FileStatus; @@ -51,15 +50,15 @@ import org.apache.hadoop.yarn.client.api.NMClient; import org.apache.hadoop.yarn.client.api.async.AMRMClientAsync; import org.apache.hadoop.yarn.exceptions.YarnException; +import org.junit.Before; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; + +import static org.junit.Assert.assertEquals; /** * Application master tests. */ -@RunWith(JUnit4.class) -public class IgniteApplicationMasterSelfTest extends TestCase { +public class IgniteApplicationMasterSelfTest { /** */ private ApplicationMaster appMaster; @@ -72,9 +71,8 @@ public class IgniteApplicationMasterSelfTest extends TestCase { /** * @throws Exception If failed. */ - @Override protected void setUp() throws Exception { - super.setUp(); - + @Before + public void setUp() throws Exception { props = new ClusterProperties(); appMaster = new ApplicationMaster("test", props); @@ -466,7 +464,7 @@ public void clear() { * @param blacklistRemovals list of resources which should be removed from the * application blacklist */ - public void updateBlacklist(List blacklistAdditions, List blacklistRemovals) { + @Override public void updateBlacklist(List blacklistAdditions, List blacklistRemovals) { // No-op. } } From 59bd7875ea2f2572d8486fadd08e2c98fae6d7b3 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Sun, 9 Dec 2018 15:42:59 +0300 Subject: [PATCH 085/176] IGNITE-10177 cleanup Junit 3 from the project - wip - cleanup // extends testcase -- verified with diffs overview and rebuild --- .../internal/commandline/CommandHandlerParsingTest.java | 4 ++-- .../v2/DirectByteBufferStreamImplV2ByteOrderSelfTest.java | 2 +- .../managers/GridManagerMxBeanIllegalArgumentHandleTest.java | 2 +- .../persistence/db/wal/crc/IgniteDataIntegrityTests.java | 4 ++-- .../internal/processors/igfs/IgfsModeResolverSelfTest.java | 2 +- .../util/io/GridUnsafeDataInputOutputByteOrderSelfTest.java | 4 ++-- .../ignite/logger/log4j/GridLog4jCorrectFileNameTest.java | 4 ++-- .../apache/ignite/logger/log4j/GridLog4jLoggingFileTest.java | 2 +- .../apache/ignite/logger/log4j/GridLog4jLoggingUrlTest.java | 2 +- .../java/org/apache/ignite/mesos/IgniteSchedulerSelfTest.java | 2 +- 10 files changed, 14 insertions(+), 14 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/commandline/CommandHandlerParsingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/commandline/CommandHandlerParsingTest.java index 621d9fef38963..cae1e813cf09a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/commandline/CommandHandlerParsingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/commandline/CommandHandlerParsingTest.java @@ -50,13 +50,13 @@ * Tests Command Handler parsing arguments. */ public class CommandHandlerParsingTest { - /** {@inheritDoc} */ + /** */ @Before public void setUp() throws Exception { System.setProperty(IGNITE_ENABLE_EXPERIMENTAL_COMMAND, "true"); } - /** {@inheritDoc} */ + /** */ @After public void tearDown() throws Exception { System.clearProperty(IGNITE_ENABLE_EXPERIMENTAL_COMMAND); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/direct/stream/v2/DirectByteBufferStreamImplV2ByteOrderSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/direct/stream/v2/DirectByteBufferStreamImplV2ByteOrderSelfTest.java index d4468982098ef..0423b78e0f490 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/direct/stream/v2/DirectByteBufferStreamImplV2ByteOrderSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/direct/stream/v2/DirectByteBufferStreamImplV2ByteOrderSelfTest.java @@ -65,7 +65,7 @@ public class DirectByteBufferStreamImplV2ByteOrderSelfTest { /** Array. */ private byte[] outArr; - /** {@inheritDoc} */ + /** */ @Before public void setUp() throws Exception { outArr = new byte[ARR_LEN * 8 + LEN_BYTES]; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerMxBeanIllegalArgumentHandleTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerMxBeanIllegalArgumentHandleTest.java index 33a6e6fd1182c..7e0caa916a1c4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerMxBeanIllegalArgumentHandleTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerMxBeanIllegalArgumentHandleTest.java @@ -52,7 +52,7 @@ public class GridManagerMxBeanIllegalArgumentHandleTest { /** If we succeeded to set final field this flag is true, otherwise test assertions will not be performed */ private boolean correctSetupOfTestPerformed; - /** {@inheritDoc} Changes field to always failing mock */ + /** Changes field to always failing mock. */ @Before public void setUp() throws Exception { try { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteDataIntegrityTests.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteDataIntegrityTests.java index 3aa1285158694..208db7438f3fa 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteDataIntegrityTests.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteDataIntegrityTests.java @@ -48,7 +48,7 @@ public class IgniteDataIntegrityTests { /** Buffer expander. */ private ByteBufferExpander expBuf; - /** {@inheritDoc} */ + /** */ @Before public void setUp() throws Exception { File file = File.createTempFile("integrity", "dat"); @@ -81,7 +81,7 @@ public void setUp() throws Exception { fileInput.io().force(); } - /** {@inheritDoc} */ + /** */ @After public void tearDown() throws Exception { fileInput.io().close(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsModeResolverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsModeResolverSelfTest.java index c40f6aec41804..ae7c95672cb12 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsModeResolverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsModeResolverSelfTest.java @@ -45,7 +45,7 @@ public class IgfsModeResolverSelfTest { /** */ private IgfsModeResolver reslvr; - /** {@inheritDoc} */ + /** */ @Before public void setUp() throws Exception { reslvr = new IgfsModeResolver(DUAL_SYNC, new ArrayList<>(Arrays.asList(new T2<>( diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/io/GridUnsafeDataInputOutputByteOrderSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/io/GridUnsafeDataInputOutputByteOrderSelfTest.java index 78c4f2210aebc..7f3c8b99f3c4b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/io/GridUnsafeDataInputOutputByteOrderSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/io/GridUnsafeDataInputOutputByteOrderSelfTest.java @@ -51,7 +51,7 @@ public class GridUnsafeDataInputOutputByteOrderSelfTest { /** In. */ private GridUnsafeDataInput in; - /** {@inheritDoc} */ + /** */ @Before public void setUp() throws Exception { out = new GridUnsafeDataOutput(16 * 8+ LEN_BYTES); @@ -59,7 +59,7 @@ public void setUp() throws Exception { in.inputStream(new ByteArrayInputStream(out.internalArray())); } - /** {@inheritDoc} */ + /** */ @After public void tearDown() throws Exception { in.close(); diff --git a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jCorrectFileNameTest.java b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jCorrectFileNameTest.java index 2eee8cc2d5ef9..07da142cdaf01 100644 --- a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jCorrectFileNameTest.java +++ b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jCorrectFileNameTest.java @@ -46,7 +46,7 @@ public class GridLog4jCorrectFileNameTest { /** Appender */ private Log4jRollingFileAppender appender; - /** {@inheritDoc} */ + /** */ @Before public void setUp() throws Exception { Logger root = Logger.getRootLogger(); @@ -61,7 +61,7 @@ public void setUp() throws Exception { root.addAppender(appender); } - /** {@inheritDoc} */ + /** */ @After public void tearDown() { if (appender != null) { diff --git a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingFileTest.java b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingFileTest.java index be62d3ccd498b..a6d683e68ea92 100644 --- a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingFileTest.java +++ b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingFileTest.java @@ -37,7 +37,7 @@ public class GridLog4jLoggingFileTest { /** Logger config */ private File xml; - /** {@inheritDoc} */ + /** */ @Before public void setUp() throws Exception { xml = GridTestUtils.resolveIgnitePath("modules/core/src/test/config/log4j-test.xml"); diff --git a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingUrlTest.java b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingUrlTest.java index 5a47d9a4fab1e..e76625adc5f57 100644 --- a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingUrlTest.java +++ b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingUrlTest.java @@ -38,7 +38,7 @@ public class GridLog4jLoggingUrlTest { /** Logger config */ private URL url; - /** {@inheritDoc} */ + /** */ @Before public void setUp() throws Exception { File xml = GridTestUtils.resolveIgnitePath("modules/core/src/test/config/log4j-test.xml"); diff --git a/modules/mesos/src/test/java/org/apache/ignite/mesos/IgniteSchedulerSelfTest.java b/modules/mesos/src/test/java/org/apache/ignite/mesos/IgniteSchedulerSelfTest.java index a5eb336ca458b..64117f02989cf 100644 --- a/modules/mesos/src/test/java/org/apache/ignite/mesos/IgniteSchedulerSelfTest.java +++ b/modules/mesos/src/test/java/org/apache/ignite/mesos/IgniteSchedulerSelfTest.java @@ -40,7 +40,7 @@ public class IgniteSchedulerSelfTest { /** */ private IgniteScheduler scheduler; - /** {@inheritDoc} */ + /** */ @Before public void setUp() throws Exception { ClusterProperties clustProp = new ClusterProperties(); From 903c4bf0e7c8c0602698acd4ad94545c71d58a8e Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Sun, 9 Dec 2018 16:12:04 +0300 Subject: [PATCH 086/176] IGNITE-10177 cleanup Junit 3 from the project - wip - cleanup // extends testsuite -- verified with diffs overview and rebuild --- .../ignite/testsuites/IgniteDatabaseTestSuite.java | 5 ++++- .../testsuites/IgniteDbMemoryLeakTestSuite.java | 5 ++++- .../testsuites/IgniteExternalizableSelfTestSuite.java | 5 ++++- .../apache/ignite/testsuites/IgniteIgfsTestSuite.java | 5 ++++- .../IgniteIpcSharedMemorySelfTestSuite.java | 8 +++++--- .../apache/ignite/testsuites/IgniteIpcTestSuite.java | 5 ++++- .../testsuites/IgniteJobMetricsSelfTestSuite.java | 8 +++++--- .../ignite/testsuites/IgniteKernalSelfTestSuite.java | 5 ++++- .../ignite/testsuites/IgniteLangSelfTestSuite.java | 8 +++++--- .../ignite/testsuites/IgniteLoggingSelfTestSuite.java | 5 ++++- .../testsuites/IgniteLostAndFoundTestSuite.java | 5 ++++- .../testsuites/IgniteMarshallerSelfTestSuite.java | 11 ++++++----- ...gniteMessagingConfigVariationFullApiTestSuite.java | 8 +++++--- .../ignite/testsuites/IgniteP2PSelfTestSuite.java | 11 ++++++----- .../apache/ignite/testsuites/IgnitePdsTestSuite.java | 5 ++++- .../apache/ignite/testsuites/IgnitePdsTestSuite2.java | 5 ++++- .../apache/ignite/testsuites/IgnitePdsTestSuite3.java | 5 ++++- .../apache/ignite/testsuites/IgnitePdsTestSuite4.java | 5 ++++- .../ignite/testsuites/IgnitePerformanceTestSuite.java | 5 ++++- .../ignite/testsuites/IgnitePlatformsTestSuite.java | 8 +++++--- .../ignite/testsuites/IgniteReproducingSuite.java | 8 +++++--- .../ignite/testsuites/IgniteRestHandlerTestSuite.java | 5 ++++- ...IgniteServiceConfigVariationsFullApiTestSuite.java | 10 ++++++---- .../testsuites/IgniteSpiCheckpointSelfTestSuite.java | 8 +++++--- .../testsuites/IgniteSpiCollisionSelfTestSuite.java | 5 ++++- .../IgniteSpiCommunicationSelfTestSuite.java | 8 +++++--- .../testsuites/IgniteSpiDeploymentSelfTestSuite.java | 8 +++++--- .../testsuites/IgniteSpiDiscoverySelfTestSuite.java | 8 +++++--- .../IgniteSpiEventStorageSelfTestSuite.java | 8 +++++--- .../testsuites/IgniteSpiFailoverSelfTestSuite.java | 8 +++++--- .../apache/ignite/testsuites/IgniteSpiTestSuite.java | 5 ++++- .../ignite/testsuites/IgniteStandByClusterSuite.java | 5 ++++- .../ignite/testsuites/IgniteStartUpTestSuite.java | 8 +++++--- .../ignite/testsuites/IgniteStreamSelfTestSuite.java | 6 ++++-- .../testsuites/IgniteTaskSessionSelfTestSuite.java | 8 +++++--- .../IgniteTimeoutProcessorSelfTestSuite.java | 8 +++++--- .../testsuites/IgniteTopologyValidatorTestSuite.java | 8 +++++--- .../ignite/testsuites/IgniteUtilSelfTestSuite.java | 5 ++++- ...erceptorCacheConfigVariationsFullApiTestSuite.java | 8 +++++--- .../testsuites/TxDeadlockDetectionTestSuite.java | 5 ++++- ...epBinaryCacheConfigVariationsFullApiTestSuite.java | 8 +++++--- .../java/org/apache/ignite/IgniteMesosTestSuite.java | 5 ++++- 42 files changed, 192 insertions(+), 90 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteDatabaseTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteDatabaseTestSuite.java index 3e677dcb09c2f..015eb28347405 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteDatabaseTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteDatabaseTestSuite.java @@ -21,11 +21,14 @@ import junit.framework.TestSuite; import org.apache.ignite.internal.processors.database.IgniteDbMultiNodePutGetTest; import org.apache.ignite.internal.processors.database.IgniteDbSingleNodePutGetTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * */ -public class IgniteDatabaseTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteDatabaseTestSuite { /** * @return Test suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteDbMemoryLeakTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteDbMemoryLeakTestSuite.java index dc5bd0783e7e3..7a144ae6e63e2 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteDbMemoryLeakTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteDbMemoryLeakTestSuite.java @@ -25,11 +25,14 @@ import org.apache.ignite.internal.processors.database.IgniteDbMemoryLeakNonTransactionalTest; import org.apache.ignite.internal.processors.database.IgniteDbMemoryLeakTest; import org.apache.ignite.internal.processors.database.IgniteDbMemoryLeakWithExpirationTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Page memory leaks tests. */ -public class IgniteDbMemoryLeakTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteDbMemoryLeakTestSuite { /** * @return Test suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteExternalizableSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteExternalizableSelfTestSuite.java index d4a1d24a89bdc..7f5b7b689116f 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteExternalizableSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteExternalizableSelfTestSuite.java @@ -20,11 +20,14 @@ import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.GridTopicExternalizableSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Externalizable self-test suite. */ -public class IgniteExternalizableSelfTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteExternalizableSelfTestSuite { /** * @return Test suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteIgfsTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteIgfsTestSuite.java index b6b1e20be34d1..fc26d4b8d6711 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteIgfsTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteIgfsTestSuite.java @@ -68,12 +68,15 @@ import org.apache.ignite.internal.processors.igfs.split.IgfsNewLineDelimiterRecordResolverSelfTest; import org.apache.ignite.internal.processors.igfs.split.IgfsStringDelimiterRecordResolverSelfTest; import org.apache.ignite.internal.util.typedef.internal.U; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test suite for Hadoop file system over Ignite cache. * Contains platform independent tests only. */ -public class IgniteIgfsTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteIgfsTestSuite { /** * @return Test suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteIpcSharedMemorySelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteIpcSharedMemorySelfTestSuite.java index 63973fbb0b463..c3ce92106ee34 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteIpcSharedMemorySelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteIpcSharedMemorySelfTestSuite.java @@ -23,16 +23,18 @@ import org.apache.ignite.internal.util.ipc.shmem.IpcSharedMemoryNativeLoaderSelfTest; import org.apache.ignite.internal.util.ipc.shmem.IpcSharedMemorySpaceSelfTest; import org.apache.ignite.internal.util.ipc.shmem.IpcSharedMemoryUtilsSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Shared memory test suite. */ -public class IgniteIpcSharedMemorySelfTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteIpcSharedMemorySelfTestSuite { /** * @return Test suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite IPC Shared Memory Test Suite."); suite.addTest(new JUnit4TestAdapter(IpcSharedMemorySpaceSelfTest.class)); diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteIpcTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteIpcTestSuite.java index b2f2b8d8feddc..df5974ef88db6 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteIpcTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteIpcTestSuite.java @@ -18,11 +18,14 @@ import junit.framework.TestSuite; import org.apache.ignite.internal.util.typedef.internal.U; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Suite for shared memory mode. */ -public class IgniteIpcTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteIpcTestSuite { /** * @return IgniteCache test suite. * @throws Exception Thrown in case of the failure. diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteJobMetricsSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteJobMetricsSelfTestSuite.java index 0873b194f605d..d2e9c18e28d77 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteJobMetricsSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteJobMetricsSelfTestSuite.java @@ -20,16 +20,18 @@ import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.jobmetrics.GridJobMetricsProcessorLoadTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Job metrics self test suite. */ -public class IgniteJobMetricsSelfTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteJobMetricsSelfTestSuite { /** * @return Job metrics test suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite Job metrics Test Suite"); suite.addTest(new JUnit4TestAdapter(GridJobMetricsProcessorLoadTest.class)); diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteKernalSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteKernalSelfTestSuite.java index 6c103294b232a..15f9cbb59e555 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteKernalSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteKernalSelfTestSuite.java @@ -83,11 +83,14 @@ import org.apache.ignite.testframework.GridTestUtils; import java.util.Set; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Kernal self test suite. */ -public class IgniteKernalSelfTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteKernalSelfTestSuite { /** * @return Kernal test suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteLangSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteLangSelfTestSuite.java index 4e6cc3b582fcf..9bfdff017f7ce 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteLangSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteLangSelfTestSuite.java @@ -46,16 +46,18 @@ import org.apache.ignite.lang.utils.IgniteOffheapReadWriteLockSelfTest; import org.apache.ignite.util.GridConcurrentLinkedDequeSelfTest; import org.apache.ignite.util.GridConcurrentLinkedHashMapMultiThreadedSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Ignite language test suite. */ -public class IgniteLangSelfTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteLangSelfTestSuite { /** * @return Kernal test suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite Lang Test Suite"); suite.addTest(new JUnit4TestAdapter(GridTupleSelfTest.class)); diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteLoggingSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteLoggingSelfTestSuite.java index b0f58514fc876..19038ea501161 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteLoggingSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteLoggingSelfTestSuite.java @@ -20,11 +20,14 @@ import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.logger.java.JavaLoggerTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Logging self-test suite. */ -public class IgniteLoggingSelfTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteLoggingSelfTestSuite { /** * @return P2P tests suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteLostAndFoundTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteLostAndFoundTestSuite.java index 190768f4e5369..aa98e87ad2a51 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteLostAndFoundTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteLostAndFoundTestSuite.java @@ -40,11 +40,14 @@ import org.apache.ignite.lang.GridSystemCurrentTimeMillisTest; import org.apache.ignite.lang.GridThreadPriorityTest; import org.apache.ignite.startup.servlet.GridServletLoaderTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Tests suite for orphaned tests. */ -public class IgniteLostAndFoundTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteLostAndFoundTestSuite { /** * @return Tests suite for orphaned tests (not in any test sute previously). */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteMarshallerSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteMarshallerSelfTestSuite.java index f5e3809760c9a..c8d1756519d09 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteMarshallerSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteMarshallerSelfTestSuite.java @@ -34,25 +34,26 @@ import org.apache.ignite.testframework.GridTestUtils; import java.util.Set; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test suite for all marshallers. */ -public class IgniteMarshallerSelfTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteMarshallerSelfTestSuite { /** * @return Kernal test suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { return suite(null); } /** * @param ignoredTests Ignored tests. * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite(Set ignoredTests) throws Exception { + public static TestSuite suite(Set ignoredTests) { TestSuite suite = new TestSuite("Ignite Marshaller Test Suite"); GridTestUtils.addTestIfNeeded(suite, GridUnsafeDataOutputArraySizingSelfTest.class, ignoredTests); diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteMessagingConfigVariationFullApiTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteMessagingConfigVariationFullApiTestSuite.java index 0490a921a9952..788ca7a4ee168 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteMessagingConfigVariationFullApiTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteMessagingConfigVariationFullApiTestSuite.java @@ -26,11 +26,14 @@ import org.apache.ignite.testframework.configvariations.ConfigVariations; import org.apache.ignite.testframework.configvariations.ConfigVariationsTestSuiteBuilder; import org.apache.ignite.testframework.configvariations.Parameters; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test sute for Messaging process. */ -public class IgniteMessagingConfigVariationFullApiTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteMessagingConfigVariationFullApiTestSuite { /** */ @SuppressWarnings("unchecked") private static final ConfigParameter[][] GRID_PARAMETER_VARIATION = new ConfigParameter[][] { @@ -44,9 +47,8 @@ public class IgniteMessagingConfigVariationFullApiTestSuite extends TestSuite { /** * @return Messaging test suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Compute New Full API Test Suite"); suite.addTest(new ConfigVariationsTestSuiteBuilder( diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteP2PSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteP2PSelfTestSuite.java index 95ecfa4725c31..09e49a8bcb42f 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteP2PSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteP2PSelfTestSuite.java @@ -40,25 +40,26 @@ import org.apache.ignite.p2p.P2PStreamingClassLoaderTest; import org.apache.ignite.p2p.SharedDeploymentTest; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * P2P test suite. */ -public class IgniteP2PSelfTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteP2PSelfTestSuite { /** * @return Suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { return suite(null); } /** * @return P2P tests suite. - * @throws Exception If failed. */ @SuppressWarnings({"ProhibitedExceptionDeclared"}) - public static TestSuite suite(Set ignoredTests) throws Exception { + public static TestSuite suite(Set ignoredTests) { TestSuite suite = new TestSuite("Ignite P2P Test Suite"); suite.addTest(new JUnit4TestAdapter(GridP2PDoubleDeploymentSelfTest.class)); diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite.java index f6c67971d703a..4b264298bb6b6 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite.java @@ -51,11 +51,14 @@ import org.apache.ignite.internal.processors.database.IgniteDbPutGetWithCacheStoreTest; import org.apache.ignite.internal.processors.database.IgniteDbSingleNodePutGetTest; import org.apache.ignite.internal.processors.database.IgniteDbSingleNodeTinyPutGetTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * */ -public class IgnitePdsTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgnitePdsTestSuite { /** * @return Suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite2.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite2.java index d40e34e530adf..45ea056a5dc00 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite2.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite2.java @@ -69,11 +69,14 @@ import org.apache.ignite.internal.processors.cache.persistence.db.wal.crc.IgnitePureJavaCrcCompatibility; import org.apache.ignite.internal.processors.cache.persistence.db.wal.reader.IgniteWalReaderTest; import org.apache.ignite.internal.processors.cache.persistence.wal.reader.StandaloneWalRecordsIteratorTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * */ -public class IgnitePdsTestSuite2 extends TestSuite { +@RunWith(AllTests.class) +public class IgnitePdsTestSuite2 { /** * @return Suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite3.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite3.java index 06ba9c0611851..30f571939a532 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite3.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite3.java @@ -20,11 +20,14 @@ import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.persistence.IgnitePdsContinuousRestartTest; import org.apache.ignite.internal.processors.cache.persistence.IgnitePdsContinuousRestartTestWithExpiryPolicy; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * */ -public class IgnitePdsTestSuite3 extends TestSuite { +@RunWith(AllTests.class) +public class IgnitePdsTestSuite3 { /** * @return Suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite4.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite4.java index c750f107a500b..ce4e3441ef369 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite4.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite4.java @@ -31,11 +31,14 @@ import org.apache.ignite.internal.processors.cache.persistence.db.IgnitePdsPartitionPreloadTest; import org.apache.ignite.internal.processors.cache.persistence.db.IgnitePdsTransactionsHangTest; import org.apache.ignite.internal.processors.cache.persistence.file.FileDownloaderTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * */ -public class IgnitePdsTestSuite4 extends TestSuite { +@RunWith(AllTests.class) +public class IgnitePdsTestSuite4 { /** * @return Suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePerformanceTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePerformanceTestSuite.java index f88c4a8c35f70..2b4f18f0c661c 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePerformanceTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePerformanceTestSuite.java @@ -58,12 +58,15 @@ import org.apache.ignite.loadtests.nio.GridNioBenchmarkTest; import org.apache.ignite.marshaller.GridMarshallerPerformanceTest; import org.apache.ignite.spi.communication.tcp.GridTcpCommunicationSpiLanLoadTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Tests suite for performance tests tests. * Note: Most of these are resource-consuming or non-terminating. */ -public class IgnitePerformanceTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgnitePerformanceTestSuite { /** * @return Tests suite for orphaned tests (not in any test sute previously). */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePlatformsTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePlatformsTestSuite.java index 682fff3e41048..75a8587ccc0c8 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePlatformsTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePlatformsTestSuite.java @@ -21,16 +21,18 @@ import junit.framework.TestSuite; import org.apache.ignite.platform.PlatformDefaultJavaObjectFactorySelfTest; import org.apache.ignite.platform.PlatformJavaObjectFactoryProxySelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Suite for platform tests. */ -public class IgnitePlatformsTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgnitePlatformsTestSuite { /** * @return Test suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite Deployment SPI Test Suite"); // LocalDeploymentSpi tests diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteReproducingSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteReproducingSuite.java index afd18a3b0a94f..1c0cf61dcf494 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteReproducingSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteReproducingSuite.java @@ -18,6 +18,8 @@ package org.apache.ignite.testsuites; import junit.framework.TestSuite; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test suite for cycled run tests on PR code.
    @@ -29,12 +31,12 @@ * * This suite is not included into main build */ -public class IgniteReproducingSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteReproducingSuite { /** * @return suite with test(s) for reproduction some problem. - * @throws Exception if failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite Issue Reproducing Test Suite"); //uncomment to add some test diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteRestHandlerTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteRestHandlerTestSuite.java index 3fa6cbde0a089..e5ea8d50154e2 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteRestHandlerTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteRestHandlerTestSuite.java @@ -24,11 +24,14 @@ import org.apache.ignite.internal.processors.rest.handlers.log.GridLogCommandHandlerTest; import org.apache.ignite.internal.processors.rest.handlers.query.GridQueryCommandHandlerTest; import org.apache.ignite.internal.processors.rest.handlers.top.CacheTopologyCommandHandlerTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * REST support tests. */ -public class IgniteRestHandlerTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteRestHandlerTestSuite { /** * @return Test suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteServiceConfigVariationsFullApiTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteServiceConfigVariationsFullApiTestSuite.java index 84af386537052..7fa59ae3e004d 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteServiceConfigVariationsFullApiTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteServiceConfigVariationsFullApiTestSuite.java @@ -26,11 +26,14 @@ import org.apache.ignite.testframework.configvariations.ConfigVariations; import org.apache.ignite.testframework.configvariations.ConfigVariationsTestSuiteBuilder; import org.apache.ignite.testframework.configvariations.Parameters; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Full API service test suit. */ -public class IgniteServiceConfigVariationsFullApiTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteServiceConfigVariationsFullApiTestSuite { /** */ @SuppressWarnings("unchecked") private static final ConfigParameter[][] PARAMS = new ConfigParameter[][] { @@ -45,9 +48,8 @@ public class IgniteServiceConfigVariationsFullApiTestSuite extends TestSuite { /** * @return Compute API test suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Service Deployment New Full API Test Suite"); suite.addTest(new ConfigVariationsTestSuiteBuilder( @@ -89,4 +91,4 @@ public static TestSuite suite() throws Exception { return suite; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiCheckpointSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiCheckpointSelfTestSuite.java index 92e04a12baa17..404ffc1f8b5c7 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiCheckpointSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiCheckpointSelfTestSuite.java @@ -31,16 +31,18 @@ import org.apache.ignite.spi.checkpoint.sharedfs.GridSharedFsCheckpointSpiMultipleDirectoriesSelfTest; import org.apache.ignite.spi.checkpoint.sharedfs.GridSharedFsCheckpointSpiSelfTest; import org.apache.ignite.spi.checkpoint.sharedfs.GridSharedFsCheckpointSpiStartStopSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Grid SPI checkpoint self test suite. */ -public class IgniteSpiCheckpointSelfTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteSpiCheckpointSelfTestSuite { /** * @return Checkpoint test suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite Checkpoint Test Suite"); // Cache. diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiCollisionSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiCollisionSelfTestSuite.java index 66561613f9206..8df78eeeebe07 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiCollisionSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiCollisionSelfTestSuite.java @@ -30,11 +30,14 @@ import org.apache.ignite.spi.collision.priorityqueue.GridPriorityQueueCollisionSpiConfigSelfTest; import org.apache.ignite.spi.collision.priorityqueue.GridPriorityQueueCollisionSpiSelfTest; import org.apache.ignite.spi.collision.priorityqueue.GridPriorityQueueCollisionSpiStartStopSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Collision SPI self-test suite. */ -public class IgniteSpiCollisionSelfTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteSpiCollisionSelfTestSuite { /** * @return Failover SPI tests suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiCommunicationSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiCommunicationSelfTestSuite.java index 105210882d1ae..c7e0dcb850d1c 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiCommunicationSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiCommunicationSelfTestSuite.java @@ -42,16 +42,18 @@ import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpiHalfOpenedConnectionTest; import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpiSkipMessageSendTest; import org.apache.ignite.spi.communication.tcp.TcpCommunicationStatisticsTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test suite for all communication SPIs. */ -public class IgniteSpiCommunicationSelfTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteSpiCommunicationSelfTestSuite { /** * @return Communication SPI tests suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Communication SPI Test Suite"); suite.addTest(new JUnit4TestAdapter(GridTcpCommunicationSpiRecoveryAckSelfTest.class)); diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiDeploymentSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiDeploymentSelfTestSuite.java index eb4679bbed931..6fce539a8b27a 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiDeploymentSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiDeploymentSelfTestSuite.java @@ -21,16 +21,18 @@ import junit.framework.TestSuite; import org.apache.ignite.spi.deployment.local.GridLocalDeploymentSpiSelfTest; import org.apache.ignite.spi.deployment.local.GridLocalDeploymentSpiStartStopSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test suit for deployment SPIs. */ -public class IgniteSpiDeploymentSelfTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteSpiDeploymentSelfTestSuite { /** * @return Deployment SPI tests suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite Deployment SPI Test Suite"); // LocalDeploymentSpi tests diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiDiscoverySelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiDiscoverySelfTestSuite.java index 86731648ebdaa..a721f75e648c2 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiDiscoverySelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiDiscoverySelfTestSuite.java @@ -62,18 +62,20 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.sharedfs.TcpDiscoverySharedFsIpFinderSelfTest; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinderSelfTest; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; import static org.apache.ignite.IgniteSystemProperties.IGNITE_OVERRIDE_MCAST_GRP; /** * Test suite for all discovery spi implementations. */ -public class IgniteSpiDiscoverySelfTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteSpiDiscoverySelfTestSuite { /** * @return Discovery SPI tests suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { System.setProperty(IGNITE_OVERRIDE_MCAST_GRP, GridTestUtils.getNextMulticastGroup(IgniteSpiDiscoverySelfTestSuite.class)); diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiEventStorageSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiEventStorageSelfTestSuite.java index 6c814983776d0..b9917d6246a95 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiEventStorageSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiEventStorageSelfTestSuite.java @@ -23,16 +23,18 @@ import org.apache.ignite.spi.eventstorage.memory.GridMemoryEventStorageSpiConfigSelfTest; import org.apache.ignite.spi.eventstorage.memory.GridMemoryEventStorageSpiSelfTest; import org.apache.ignite.spi.eventstorage.memory.GridMemoryEventStorageSpiStartStopSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Event storage test suite. */ -public class IgniteSpiEventStorageSelfTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteSpiEventStorageSelfTestSuite { /** * @return Event storage test suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite Event Storage Test Suite"); suite.addTest(new JUnit4TestAdapter(GridMemoryEventStorageSpiSelfTest.class)); diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiFailoverSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiFailoverSelfTestSuite.java index d48c2ac27de49..933a2bcc0b5d1 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiFailoverSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiFailoverSelfTestSuite.java @@ -28,16 +28,18 @@ import org.apache.ignite.spi.failover.jobstealing.GridJobStealingFailoverSpiStartStopSelfTest; import org.apache.ignite.spi.failover.never.GridNeverFailoverSpiSelfTest; import org.apache.ignite.spi.failover.never.GridNeverFailoverSpiStartStopSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Failover SPI self-test suite. */ -public class IgniteSpiFailoverSelfTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteSpiFailoverSelfTestSuite { /** * @return Failover SPI tests suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite Failover SPI Test Suite"); // Always failover. diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiTestSuite.java index dd1e6854f2994..c98cbf11c0250 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiTestSuite.java @@ -22,11 +22,14 @@ import org.apache.ignite.internal.managers.GridManagerLocalMessageListenerSelfTest; import org.apache.ignite.internal.managers.GridNoopManagerSelfTest; import org.apache.ignite.spi.encryption.KeystoreEncryptionSpiSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Grid SPI test suite. */ -public class IgniteSpiTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteSpiTestSuite { /** * @return All SPI tests suite. * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteStandByClusterSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteStandByClusterSuite.java index 78a3a729aff7a..8cdc6df93297c 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteStandByClusterSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteStandByClusterSuite.java @@ -36,11 +36,14 @@ import org.apache.ignite.internal.processors.cache.persistence.standbycluster.join.persistence.JoinInActiveNodeToInActiveClusterWithPersistence; import org.apache.ignite.internal.processors.cache.persistence.standbycluster.reconnect.IgniteStandByClientReconnectTest; import org.apache.ignite.internal.processors.cache.persistence.standbycluster.reconnect.IgniteStandByClientReconnectToNewClusterTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * */ -public class IgniteStandByClusterSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteStandByClusterSuite { /** * @return Test suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteStartUpTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteStartUpTestSuite.java index c1a35454340dd..815c658e465c7 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteStartUpTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteStartUpTestSuite.java @@ -20,16 +20,18 @@ import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.startup.cmdline.GridCommandLineTransformerSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Loaders self-test suite. */ -public class IgniteStartUpTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteStartUpTestSuite { /** * @return Loaders tests suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite StartUp Test Suite"); suite.addTest(new JUnit4TestAdapter(GridCommandLineTransformerSelfTest.class)); diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteStreamSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteStreamSelfTestSuite.java index a66940137842e..8197ecb450cd5 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteStreamSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteStreamSelfTestSuite.java @@ -21,16 +21,18 @@ import junit.framework.TestSuite; import org.apache.ignite.stream.socket.SocketStreamerSelfTest; import org.apache.ignite.stream.socket.SocketStreamerUnmarshalVulnerabilityTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Stream test suite. */ +@RunWith(AllTests.class) public class IgniteStreamSelfTestSuite extends TestSuite { /** * @return Stream tests suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite Stream Test Suite"); suite.addTest(new JUnit4TestAdapter(SocketStreamerSelfTest.class)); diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteTaskSessionSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteTaskSessionSelfTestSuite.java index 43b08a2261de2..8ab1daee13ef9 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteTaskSessionSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteTaskSessionSelfTestSuite.java @@ -38,16 +38,18 @@ import org.apache.ignite.session.GridSessionSetTaskAttributeSelfTest; import org.apache.ignite.session.GridSessionTaskWaitJobAttributeSelfTest; import org.apache.ignite.session.GridSessionWaitAttributeSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Task session test suite. */ -public class IgniteTaskSessionSelfTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteTaskSessionSelfTestSuite { /** * @return TaskSession test suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite TaskSession Test Suite"); suite.addTest(new JUnit4TestAdapter(GridSessionCancelSiblingsFromFutureSelfTest.class)); diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteTimeoutProcessorSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteTimeoutProcessorSelfTestSuite.java index c21175e94d5e2..50bdbdcf8650f 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteTimeoutProcessorSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteTimeoutProcessorSelfTestSuite.java @@ -21,16 +21,18 @@ import junit.framework.TestSuite; import org.apache.ignite.internal.processors.timeout.GridTimeoutProcessor; import org.apache.ignite.internal.processors.timeout.GridTimeoutProcessorSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Suite for {@link GridTimeoutProcessor} tests. */ -public class IgniteTimeoutProcessorSelfTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteTimeoutProcessorSelfTestSuite { /** * @return Job metrics test suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite Timeout Processor Test Suite"); suite.addTest(new JUnit4TestAdapter(GridTimeoutProcessorSelfTest.class)); diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteTopologyValidatorTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteTopologyValidatorTestSuite.java index e228dcbec9e7b..afbe3fb974c24 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteTopologyValidatorTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteTopologyValidatorTestSuite.java @@ -32,16 +32,18 @@ import org.apache.ignite.internal.processors.cache.IgniteTopologyValidatorReplicatedAtomicCacheTest; import org.apache.ignite.internal.processors.cache.IgniteTopologyValidatorReplicatedTxCacheGroupsTest; import org.apache.ignite.internal.processors.cache.IgniteTopologyValidatorReplicatedTxCacheTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Topology validator test suite. */ -public class IgniteTopologyValidatorTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteTopologyValidatorTestSuite { /** * @return Topology validator tests suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Topology validator Test Suite"); suite.addTest(new JUnit4TestAdapter(IgniteTopologyValidatorNearPartitionedAtomicCacheTest.class)); diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteUtilSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteUtilSelfTestSuite.java index 6951065497406..34e3d4a32f86c 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteUtilSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteUtilSelfTestSuite.java @@ -63,11 +63,14 @@ import org.apache.ignite.util.mbeans.GridMBeanExoticNamesSelfTest; import org.apache.ignite.util.mbeans.GridMBeanSelfTest; import org.apache.ignite.util.mbeans.WorkersControlMXBeanTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test suite for Ignite utility classes. */ -public class IgniteUtilSelfTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteUtilSelfTestSuite { /** * @return Grid utility methods tests suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/InterceptorCacheConfigVariationsFullApiTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/InterceptorCacheConfigVariationsFullApiTestSuite.java index 31fd365fe6392..f25225c191c53 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/InterceptorCacheConfigVariationsFullApiTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/InterceptorCacheConfigVariationsFullApiTestSuite.java @@ -20,16 +20,18 @@ import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.InterceptorCacheConfigVariationsFullApiTest; import org.apache.ignite.testframework.configvariations.ConfigVariationsTestSuiteBuilder; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test suite for cache API. */ -public class InterceptorCacheConfigVariationsFullApiTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class InterceptorCacheConfigVariationsFullApiTestSuite { /** * @return Cache API test suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { return new ConfigVariationsTestSuiteBuilder( "Cache New Full API Test Suite with Interceptor", InterceptorCacheConfigVariationsFullApiTest.class) diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/TxDeadlockDetectionTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/TxDeadlockDetectionTestSuite.java index b0526c02fd320..68695af8adf73 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/TxDeadlockDetectionTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/TxDeadlockDetectionTestSuite.java @@ -28,11 +28,14 @@ import org.apache.ignite.internal.processors.cache.transactions.TxOptimisticDeadlockDetectionTest; import org.apache.ignite.internal.processors.cache.transactions.TxPessimisticDeadlockDetectionCrossCacheTest; import org.apache.ignite.internal.processors.cache.transactions.TxPessimisticDeadlockDetectionTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Deadlock detection related tests. */ -public class TxDeadlockDetectionTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class TxDeadlockDetectionTestSuite { /** * @return Test suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/WithKeepBinaryCacheConfigVariationsFullApiTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/WithKeepBinaryCacheConfigVariationsFullApiTestSuite.java index e557d77d93034..069274c25809b 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/WithKeepBinaryCacheConfigVariationsFullApiTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/WithKeepBinaryCacheConfigVariationsFullApiTestSuite.java @@ -23,17 +23,19 @@ import org.apache.ignite.internal.processors.cache.WithKeepBinaryCacheFullApiTest; import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.testframework.configvariations.ConfigVariationsTestSuiteBuilder; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test suite for cache API. */ -public class WithKeepBinaryCacheConfigVariationsFullApiTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class WithKeepBinaryCacheConfigVariationsFullApiTestSuite { /** * @return Cache API test suite. - * @throws Exception If failed. */ @SuppressWarnings("serial") - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("With Keep Binary Cache Config Variations Full API Test Suite"); suite.addTest(new ConfigVariationsTestSuiteBuilder( diff --git a/modules/mesos/src/test/java/org/apache/ignite/IgniteMesosTestSuite.java b/modules/mesos/src/test/java/org/apache/ignite/IgniteMesosTestSuite.java index db2e8506b5333..886bc9ebdc374 100644 --- a/modules/mesos/src/test/java/org/apache/ignite/IgniteMesosTestSuite.java +++ b/modules/mesos/src/test/java/org/apache/ignite/IgniteMesosTestSuite.java @@ -20,11 +20,14 @@ import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.mesos.IgniteSchedulerSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Apache Mesos integration tests. */ -public class IgniteMesosTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteMesosTestSuite { /** * @return Test suite. */ From 93e7aadbf674fc3647ecf1aca7016622c59002e3 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Sun, 9 Dec 2018 16:24:09 +0300 Subject: [PATCH 087/176] IGNITE-10177 cleanup Junit 3 from the project - wip - cleanup // extends testsuite -- verified with diffs overview and rebuild --- .../testsuites/IgniteBinaryObjectsTestSuite.java | 5 ++++- .../IgniteBinarySimpleNameMapperBasicTestSuite.java | 5 ++++- ...BinarySimpleNameMapperCacheFullApiTestSuite.java | 8 +++++--- ...eCacheBasicConfigVariationsFullApiTestSuite.java | 8 +++++--- ...CacheBlockExchangeOnReadOperationsTestSuite.java | 5 ++++- .../IgniteCacheDataStructuresSelfTestSuite.java | 5 ++++- .../IgniteCacheEvictionSelfTestSuite.java | 8 +++++--- .../testsuites/IgniteCacheFailoverTestSuite.java | 5 ++++- .../testsuites/IgniteCacheFailoverTestSuite3.java | 5 ++++- .../testsuites/IgniteCacheFailoverTestSuiteSsl.java | 5 ++++- .../IgniteCacheFullApiMultiJvmSelfTestSuite.java | 5 ++++- .../testsuites/IgniteCacheFullApiSelfTestSuite.java | 5 ++++- .../IgniteCacheIteratorsSelfTestSuite.java | 8 +++++--- .../IgniteCacheLoadConsistencyTestSuite.java | 5 ++++- .../testsuites/IgniteCacheMetricsSelfTestSuite.java | 5 ++++- .../ignite/testsuites/IgniteCacheMvccTestSuite.java | 5 ++++- .../testsuites/IgniteCacheMvccTestSuite2.java | 5 ++++- .../testsuites/IgniteCacheMvccTestSuite3.java | 5 ++++- .../testsuites/IgniteCacheMvccTestSuite4.java | 5 ++++- .../testsuites/IgniteCacheMvccTestSuite5.java | 5 ++++- .../testsuites/IgniteCacheMvccTestSuite6.java | 5 ++++- .../testsuites/IgniteCacheMvccTestSuite7.java | 5 ++++- .../testsuites/IgniteCacheMvccTestSuite9.java | 5 ++++- .../IgniteCacheP2pUnmarshallingErrorTestSuite.java | 13 +++++++------ .../testsuites/IgniteCacheRestartTestSuite.java | 5 ++++- .../testsuites/IgniteCacheRestartTestSuite2.java | 5 ++++- .../ignite/testsuites/IgniteCacheTestSuite.java | 5 ++++- .../ignite/testsuites/IgniteCacheTestSuite2.java | 5 ++++- .../ignite/testsuites/IgniteCacheTestSuite3.java | 5 ++++- .../ignite/testsuites/IgniteCacheTestSuite4.java | 5 ++++- .../ignite/testsuites/IgniteCacheTestSuite5.java | 5 ++++- .../ignite/testsuites/IgniteCacheTestSuite6.java | 5 ++++- .../ignite/testsuites/IgniteCacheTestSuite7.java | 7 ++++--- .../ignite/testsuites/IgniteCacheTestSuite8.java | 5 ++++- .../ignite/testsuites/IgniteCacheTestSuite9.java | 5 ++++- .../IgniteCacheTxRecoverySelfTestSuite.java | 5 ++++- .../testsuites/IgniteCacheWriteBehindTestSuite.java | 7 +++++-- .../testsuites/IgniteClientNodesTestSuite.java | 5 ++++- .../testsuites/IgniteClientReconnectTestSuite.java | 5 ++++- ...omputeBasicConfigVariationsFullApiTestSuite.java | 8 +++++--- .../IgniteContinuousQueryConfigVariationsSuite.java | 8 +++++--- .../IgniteContinuousTaskSelfTestSuite.java | 8 +++++--- 42 files changed, 179 insertions(+), 64 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryObjectsTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryObjectsTestSuite.java index c7f0622f80c76..7f3311ac6ace3 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryObjectsTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryObjectsTestSuite.java @@ -73,11 +73,14 @@ import org.apache.ignite.internal.processors.cache.binary.local.GridCacheBinaryObjectsAtomicLocalSelfTest; import org.apache.ignite.internal.processors.cache.binary.local.GridCacheBinaryObjectsLocalSelfTest; import org.apache.ignite.internal.processors.cache.distributed.IgniteBinaryMetadataUpdateChangingTopologySelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test for binary objects stored in cache. */ -public class IgniteBinaryObjectsTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteBinaryObjectsTestSuite { /** * @return Suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinarySimpleNameMapperBasicTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinarySimpleNameMapperBasicTestSuite.java index 4c9a7371de5ea..d13a073d0fc11 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinarySimpleNameMapperBasicTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinarySimpleNameMapperBasicTestSuite.java @@ -20,11 +20,14 @@ import junit.framework.TestSuite; import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.testframework.config.GridTestProperties; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Basic test suite. */ -public class IgniteBinarySimpleNameMapperBasicTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteBinarySimpleNameMapperBasicTestSuite { /** * @return Test suite. * @throws Exception Thrown in case of the failure. diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinarySimpleNameMapperCacheFullApiTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinarySimpleNameMapperCacheFullApiTestSuite.java index bbf4297af8b46..dc362b8726701 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinarySimpleNameMapperCacheFullApiTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinarySimpleNameMapperCacheFullApiTestSuite.java @@ -20,16 +20,18 @@ import junit.framework.TestSuite; import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.testframework.config.GridTestProperties; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Cache full API suite with binary marshaller and simple name mapper. */ -public class IgniteBinarySimpleNameMapperCacheFullApiTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteBinarySimpleNameMapperCacheFullApiTestSuite { /** * @return Suite. - * @throws Exception In case of error. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { GridTestProperties.setProperty(GridTestProperties.MARSH_CLASS_NAME, BinaryMarshaller.class.getName()); GridTestProperties.setProperty(GridTestProperties.BINARY_MARSHALLER_USE_SIMPLE_NAME_MAPPER, "true"); diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheBasicConfigVariationsFullApiTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheBasicConfigVariationsFullApiTestSuite.java index 85a8f59ad5184..af7b42612642f 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheBasicConfigVariationsFullApiTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheBasicConfigVariationsFullApiTestSuite.java @@ -20,16 +20,18 @@ import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.IgniteCacheConfigVariationsFullApiTest; import org.apache.ignite.testframework.configvariations.ConfigVariationsTestSuiteBuilder; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test suite for cache API. */ -public class IgniteCacheBasicConfigVariationsFullApiTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheBasicConfigVariationsFullApiTestSuite { /** * @return Cache API test suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { return new ConfigVariationsTestSuiteBuilder( "Cache New Full API Test Suite", IgniteCacheConfigVariationsFullApiTest.class) diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheBlockExchangeOnReadOperationsTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheBlockExchangeOnReadOperationsTestSuite.java index 0fa0165c30ce6..a7c839c7859da 100755 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheBlockExchangeOnReadOperationsTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheBlockExchangeOnReadOperationsTestSuite.java @@ -23,11 +23,14 @@ import org.apache.ignite.internal.processors.cache.distributed.CacheBlockOnGetAllTest; import org.apache.ignite.internal.processors.cache.distributed.CacheBlockOnScanTest; import org.apache.ignite.internal.processors.cache.distributed.CacheBlockOnSingleGetTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test suite. */ -public class IgniteCacheBlockExchangeOnReadOperationsTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheBlockExchangeOnReadOperationsTestSuite { /** * @return IgniteCache test suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheDataStructuresSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheDataStructuresSelfTestSuite.java index 457ec8a43afa1..f3088c2eafd16 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheDataStructuresSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheDataStructuresSelfTestSuite.java @@ -86,11 +86,14 @@ import org.apache.ignite.internal.processors.cache.datastructures.replicated.IgniteReplicatedLockSelfTest; import org.apache.ignite.internal.processors.cache.datastructures.replicated.IgniteReplicatedSemaphoreSelfTest; import org.apache.ignite.internal.processors.cache.distributed.replicated.IgniteCacheAtomicReplicatedNodeRestartSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test suite for cache data structures. */ -public class IgniteCacheDataStructuresSelfTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheDataStructuresSelfTestSuite { /** * @return Cache test suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheEvictionSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheEvictionSelfTestSuite.java index 816dfec038648..4f303f2510aaa 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheEvictionSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheEvictionSelfTestSuite.java @@ -50,16 +50,18 @@ import org.apache.ignite.internal.processors.cache.eviction.paged.RandomLruPageEvictionWithRebalanceTest; import org.apache.ignite.internal.processors.cache.eviction.sorted.SortedEvictionPolicyFactorySelfTest; import org.apache.ignite.internal.processors.cache.eviction.sorted.SortedEvictionPolicySelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test suite for cache eviction. */ -public class IgniteCacheEvictionSelfTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheEvictionSelfTestSuite { /** * @return Cache eviction test suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite Cache Eviction Test Suite"); suite.addTest(new JUnit4TestAdapter(FifoEvictionPolicySelfTest.class)); diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite.java index 4e1cbe566424c..8baa8fa323aef 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite.java @@ -41,11 +41,14 @@ import org.apache.ignite.internal.processors.cache.persistence.baseline.IgniteChangingBaselineDownCacheRemoveFailoverTest; import org.apache.ignite.internal.processors.cache.persistence.baseline.IgniteChangingBaselineUpCacheRemoveFailoverTest; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test suite. */ -public class IgniteCacheFailoverTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheFailoverTestSuite { /** * @return Ignite Cache Failover test suite. * @throws Exception Thrown in case of the failure. diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite3.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite3.java index ce2d5abc4b483..6c53c8c6ecea4 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite3.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite3.java @@ -22,11 +22,14 @@ import org.apache.ignite.internal.processors.cache.distributed.CacheGetInsideLockChangingTopologyTest; import org.apache.ignite.internal.processors.cache.distributed.dht.IgniteCachePutRetryAtomicSelfTest; import org.apache.ignite.internal.processors.cache.distributed.dht.IgniteCachePutRetryTransactionalSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test suite. */ -public class IgniteCacheFailoverTestSuite3 extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheFailoverTestSuite3 { /** * @return Ignite Cache Failover test suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuiteSsl.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuiteSsl.java index aed2392965365..fafefb5f0bb3e 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuiteSsl.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuiteSsl.java @@ -21,11 +21,14 @@ import junit.framework.TestSuite; import org.apache.ignite.internal.util.IgniteUtils; import org.apache.ignite.spi.communication.tcp.IgniteCacheSslStartStopSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test suite. */ -public class IgniteCacheFailoverTestSuiteSsl extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheFailoverTestSuiteSsl { /** * @return Ignite Cache Failover test suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiMultiJvmSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiMultiJvmSelfTestSuite.java index b3b26be0cf7d6..b62e9ba5a341d 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiMultiJvmSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiMultiJvmSelfTestSuite.java @@ -43,11 +43,14 @@ import org.apache.ignite.internal.processors.cache.multijvm.GridCacheReplicatedMultiJvmP2PDisabledFullApiSelfTest; import org.apache.ignite.internal.processors.cache.multijvm.GridCacheReplicatedNearOnlyMultiJvmFullApiSelfTest; import org.apache.ignite.internal.processors.cache.multijvm.GridCacheReplicatedOnheapMultiJvmFullApiSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Multi-JVM test suite. */ -public class IgniteCacheFullApiMultiJvmSelfTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheFullApiMultiJvmSelfTestSuite { /** * @return Multi-JVM tests suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java index e2d0e8f0d6828..3875475e612f0 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java @@ -79,11 +79,14 @@ import org.apache.ignite.internal.processors.cache.local.GridCacheLocalFullApiMultithreadedSelfTest; import org.apache.ignite.internal.processors.cache.local.GridCacheLocalFullApiSelfTest; import org.apache.ignite.internal.processors.cache.local.GridCacheLocalWithGroupFullApiSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test suite for cache API. */ -public class IgniteCacheFullApiSelfTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheFullApiSelfTestSuite { /** * @return Cache API test suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheIteratorsSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheIteratorsSelfTestSuite.java index c13a19af90a10..2ce8b3f985944 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheIteratorsSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheIteratorsSelfTestSuite.java @@ -22,16 +22,18 @@ import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedIteratorsSelfTest; import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCacheReplicatedIteratorsSelfTest; import org.apache.ignite.internal.processors.cache.local.GridCacheLocalIteratorsSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Cache iterators test suite. */ -public class IgniteCacheIteratorsSelfTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheIteratorsSelfTestSuite { /** * @return Cache iterators test suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Cache Iterators Test Suite"); suite.addTest(new JUnit4TestAdapter(GridCacheLocalIteratorsSelfTest.class)); diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheLoadConsistencyTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheLoadConsistencyTestSuite.java index 9575e49ddc5d2..ef4423995cea5 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheLoadConsistencyTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheLoadConsistencyTestSuite.java @@ -22,11 +22,14 @@ import org.apache.ignite.internal.processors.cache.distributed.CacheNearDisabledAtomicInvokeRestartSelfTest; import org.apache.ignite.internal.processors.cache.distributed.CacheNearDisabledTransactionalInvokeRestartSelfTest; import org.apache.ignite.internal.processors.cache.distributed.CacheNearDisabledTransactionalWriteReadRestartSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test suite. */ -public class IgniteCacheLoadConsistencyTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheLoadConsistencyTestSuite { /** * @return Ignite Cache Failover test suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMetricsSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMetricsSelfTestSuite.java index e6ad567359ac6..46f6a6290892a 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMetricsSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMetricsSelfTestSuite.java @@ -39,11 +39,14 @@ import org.apache.ignite.internal.processors.cache.local.GridCacheAtomicLocalTckMetricsSelfTestImpl; import org.apache.ignite.internal.processors.cache.local.GridCacheLocalAtomicMetricsNoReadThroughSelfTest; import org.apache.ignite.internal.processors.cache.local.GridCacheLocalMetricsSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test suite for cache metrics. */ -public class IgniteCacheMetricsSelfTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheMetricsSelfTestSuite { /** * @return Cache metrics test suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite.java index c97d2293ea840..7fb766656b35f 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite.java @@ -41,13 +41,16 @@ import org.apache.ignite.internal.processors.cache.mvcc.MvccUnsupportedTxModesTest; import org.apache.ignite.internal.processors.datastreamer.DataStreamProcessorMvccPersistenceSelfTest; import org.apache.ignite.internal.processors.datastreamer.DataStreamProcessorMvccSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT; /** * */ -public class IgniteCacheMvccTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheMvccTestSuite { /** * @return Test suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite2.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite2.java index 877a48b4e0b42..67d717dcfbc5b 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite2.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite2.java @@ -88,11 +88,14 @@ import org.apache.ignite.internal.processors.cache.local.GridCacheLocalAtomicGetAndTransformStoreSelfTest; import org.apache.ignite.internal.processors.cache.persistence.MemoryPolicyInitializationTest; import org.apache.ignite.internal.processors.continuous.IgniteNoCustomEventsOnNodeStart; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test suite. */ -public class IgniteCacheMvccTestSuite2 extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheMvccTestSuite2 { /** * @return IgniteCache test suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite3.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite3.java index 31c1f031274bd..da9db3c384b39 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite3.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite3.java @@ -57,11 +57,14 @@ import org.apache.ignite.internal.processors.cache.store.GridCacheWriteBehindStoreSelfTest; import org.apache.ignite.internal.processors.cache.store.IgnteCacheClientWriteBehindStoreAtomicTest; import org.apache.ignite.internal.processors.cache.store.IgnteCacheClientWriteBehindStoreNonCoalescingTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test suite. */ -public class IgniteCacheMvccTestSuite3 extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheMvccTestSuite3 { /** * @return IgniteCache test suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite4.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite4.java index 608163db80ad1..22cacc4cb56a1 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite4.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite4.java @@ -91,11 +91,14 @@ import org.apache.ignite.internal.processors.cache.version.CacheVersionedEntryLocalAtomicSwapDisabledSelfTest; import org.apache.ignite.internal.processors.cache.version.CacheVersionedEntryPartitionedAtomicSelfTest; import org.apache.ignite.internal.processors.cache.version.CacheVersionedEntryReplicatedAtomicSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * */ -public class IgniteCacheMvccTestSuite4 extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheMvccTestSuite4 { /** * @return IgniteCache test suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite5.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite5.java index d422fc165a6da..91f0b71fdeda0 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite5.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite5.java @@ -43,11 +43,14 @@ import org.apache.ignite.internal.processors.cache.distributed.rebalancing.CacheManualRebalancingTest; import org.apache.ignite.internal.processors.cache.distributed.replicated.IgniteCacheSyncRebalanceModeSelfTest; import org.apache.ignite.internal.processors.cache.store.IgniteCacheWriteBehindNoUpdateSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test suite. */ -public class IgniteCacheMvccTestSuite5 extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheMvccTestSuite5 { /** * @return IgniteCache test suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite6.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite6.java index 025692eb75c18..f5bf0e3dc6cea 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite6.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite6.java @@ -40,11 +40,14 @@ import org.apache.ignite.internal.processors.cache.transactions.TxOptimisticPrepareOnUnstableTopologyTest; import org.apache.ignite.internal.processors.cache.transactions.TxRollbackOnTimeoutOnePhaseCommitTest; import org.apache.ignite.internal.processors.cache.transactions.TxStateChangeEventTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test suite. */ -public class IgniteCacheMvccTestSuite6 extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheMvccTestSuite6 { /** * @return IgniteCache test suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite7.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite7.java index 139c54bcd78ef..2b6279d587951 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite7.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite7.java @@ -33,11 +33,14 @@ import org.apache.ignite.internal.processors.cache.distributed.rebalancing.GridCacheRebalancingPartitionCountersMvccTest; import org.apache.ignite.internal.processors.cache.distributed.rebalancing.GridCacheRebalancingPartitionCountersTest; import org.apache.ignite.internal.processors.cache.persistence.db.CheckpointBufferDeadlockTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * */ -public class IgniteCacheMvccTestSuite7 extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheMvccTestSuite7 { /** * @return IgniteCache test suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite9.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite9.java index 17a9421a1a34c..ce9533fd90577 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite9.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite9.java @@ -25,11 +25,14 @@ import org.apache.ignite.internal.processors.cache.IgniteCacheLoadRebalanceEvictionSelfTest; import org.apache.ignite.internal.processors.cache.distributed.CacheAtomicPrimarySyncBackPressureTest; import org.apache.ignite.internal.processors.cache.distributed.IgniteTxConcurrentRemoveObjectsTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test suite. */ -public class IgniteCacheMvccTestSuite9 extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheMvccTestSuite9 { /** * @return IgniteCache test suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheP2pUnmarshallingErrorTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheP2pUnmarshallingErrorTestSuite.java index dfc96dca72337..00effea08c76f 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheP2pUnmarshallingErrorTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheP2pUnmarshallingErrorTestSuite.java @@ -24,25 +24,26 @@ import org.apache.ignite.internal.processors.cache.IgniteCacheP2pUnmarshallingRebalanceErrorTest; import org.apache.ignite.internal.processors.cache.IgniteCacheP2pUnmarshallingTxErrorTest; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Checks behavior on exception while unmarshalling key. */ -public class IgniteCacheP2pUnmarshallingErrorTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheP2pUnmarshallingErrorTestSuite { /** * @return Suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { return suite(null); } /** * @param ignoredTests Tests don't include in the execution. * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite(Set ignoredTests) throws Exception { + public static TestSuite suite(Set ignoredTests) { TestSuite suite = new TestSuite("P2p Unmarshalling Test Suite"); GridTestUtils.addTestIfNeeded(suite, IgniteCacheP2pUnmarshallingErrorTest.class, ignoredTests); @@ -52,4 +53,4 @@ public static TestSuite suite(Set ignoredTests) throws Exception { return suite; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheRestartTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheRestartTestSuite.java index 619185bca967a..6c0b3a2395681 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheRestartTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheRestartTestSuite.java @@ -25,11 +25,14 @@ import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedNodeRestartTest; import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedOptimisticTxNodeRestartTest; import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCacheReplicatedNodeRestartSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Cache stability test suite on changing topology. */ -public class IgniteCacheRestartTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheRestartTestSuite { /** * @return Suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheRestartTestSuite2.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheRestartTestSuite2.java index 5ab920f51a2f2..18c450a7d9f77 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheRestartTestSuite2.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheRestartTestSuite2.java @@ -25,11 +25,14 @@ import org.apache.ignite.internal.processors.cache.distributed.IgniteCacheAtomicNodeRestartTest; import org.apache.ignite.internal.processors.cache.distributed.IgniteCacheGetRestartTest; import org.apache.ignite.internal.processors.cache.distributed.replicated.IgniteCacheAtomicReplicatedNodeRestartSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Cache stability test suite on changing topology. */ -public class IgniteCacheRestartTestSuite2 extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheRestartTestSuite2 { /** * @return Suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java index 4ab43a8d30e61..6d11527dd3bf1 100755 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java @@ -155,11 +155,14 @@ import org.apache.ignite.internal.processors.datastreamer.DataStreamerTimeoutTest; import org.apache.ignite.internal.processors.datastreamer.DataStreamerUpdateAfterLoadTest; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test suite. */ -public class IgniteCacheTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheTestSuite { /** * @return IgniteCache test suite. * @throws Exception Thrown in case of the failure. diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite2.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite2.java index e367aad4e4930..f1670b54b673e 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite2.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite2.java @@ -147,11 +147,14 @@ import org.apache.ignite.internal.processors.cache.persistence.MemoryPolicyInitializationTest; import org.apache.ignite.internal.processors.continuous.IgniteNoCustomEventsOnNodeStart; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test suite. */ -public class IgniteCacheTestSuite2 extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheTestSuite2 { /** * @return IgniteCache test suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite3.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite3.java index 98778ca077ff2..40e402eca0a6a 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite3.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite3.java @@ -77,11 +77,14 @@ import org.apache.ignite.internal.processors.cache.local.GridCacheDaemonNodeLocalSelfTest; import org.apache.ignite.internal.processors.cache.local.GridCacheLocalByteArrayValuesSelfTest; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test suite. */ -public class IgniteCacheTestSuite3 extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheTestSuite3 { /** * @return IgniteCache test suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java index 05aa54c1954b0..06a84bbc5627d 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java @@ -155,13 +155,16 @@ import org.apache.ignite.internal.processors.cache.version.CacheVersionedEntryPartitionedTransactionalSelfTest; import org.apache.ignite.internal.processors.cache.version.CacheVersionedEntryReplicatedAtomicSelfTest; import org.apache.ignite.internal.processors.cache.version.CacheVersionedEntryReplicatedTransactionalSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; import static org.apache.ignite.testframework.GridTestUtils.addTestIfNeeded; /** * Test suite. */ -public class IgniteCacheTestSuite4 extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheTestSuite4 { /** * @return IgniteCache test suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite5.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite5.java index 7bbc4ab0ee8d2..136a62edda9b2 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite5.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite5.java @@ -50,11 +50,14 @@ import org.apache.ignite.internal.processors.cache.distributed.replicated.IgniteCacheSyncRebalanceModeSelfTest; import org.apache.ignite.internal.processors.cache.store.IgniteCacheWriteBehindNoUpdateSelfTest; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test suite. */ -public class IgniteCacheTestSuite5 extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheTestSuite5 { /** * @return IgniteCache test suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite6.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite6.java index c55eb9fbf1107..9469b2c1129cc 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite6.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite6.java @@ -51,11 +51,14 @@ import org.apache.ignite.internal.processors.cache.transactions.TxRollbackOnTopologyChangeTest; import org.apache.ignite.internal.processors.cache.transactions.TxStateChangeEventTest; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test suite. */ -public class IgniteCacheTestSuite6 extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheTestSuite6 { /** * @return IgniteCache test suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite7.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite7.java index f7e102019ce83..c9a7680f1719d 100755 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite7.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite7.java @@ -45,23 +45,24 @@ import org.apache.ignite.internal.processors.cache.transactions.TxRollbackAsyncWithPersistenceTest; import org.apache.ignite.internal.processors.cache.transactions.TxWithSmallTimeoutAndContentionOneKeyTest; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test suite. */ +@RunWith(AllTests.class) public class IgniteCacheTestSuite7 extends TestSuite { /** * @return IgniteCache test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { return suite(null); } /** * @param ignoredTests Tests to ignore. * @return Test suite. - * @throws Exception Thrown in case of the failure. */ public static TestSuite suite(Set ignoredTests) { TestSuite suite = new TestSuite("IgniteCache With Persistence Test Suite"); diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite8.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite8.java index 8f98f548a0ef4..ecc0d03c08a2f 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite8.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite8.java @@ -26,11 +26,14 @@ import org.apache.ignite.internal.processors.cache.distributed.rebalancing.GridCacheRebalancingSyncCheckDataTest; import org.apache.ignite.internal.processors.cache.distributed.rebalancing.GridCacheRebalancingSyncSelfTest; import org.apache.ignite.internal.processors.cache.distributed.rebalancing.GridCacheRebalancingUnmarshallingFailedSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test suite. */ -public class IgniteCacheTestSuite8 extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheTestSuite8 { /** * @return IgniteCache test suite. * @throws Exception Thrown in case of the failure. diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite9.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite9.java index 23d71c13726d2..b9a2dc6736004 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite9.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite9.java @@ -30,11 +30,14 @@ import org.apache.ignite.internal.processors.cache.distributed.IgniteTxConcurrentRemoveObjectsTest; import org.apache.ignite.internal.processors.cache.transactions.TxDataConsistencyOnCommitFailureTest; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test suite. */ -public class IgniteCacheTestSuite9 extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheTestSuite9 { /** * @return IgniteCache test suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTxRecoverySelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTxRecoverySelfTestSuite.java index ef1b4d914d9bd..2cceda3cb2ba6 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTxRecoverySelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTxRecoverySelfTestSuite.java @@ -31,11 +31,14 @@ import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheNearTxPessimisticOriginatingNodeFailureSelfTest; import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCacheReplicatedTxOriginatingNodeFailureSelfTest; import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCacheReplicatedTxPessimisticOriginatingNodeFailureSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Tx recovery self test suite. */ -public class IgniteCacheTxRecoverySelfTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheTxRecoverySelfTestSuite { /** * @return Cache API test suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheWriteBehindTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheWriteBehindTestSuite.java index b4f6ae775ba9b..e7e4050176c8a 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheWriteBehindTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheWriteBehindTestSuite.java @@ -30,11 +30,14 @@ import org.apache.ignite.internal.processors.cache.store.IgnteCacheClientWriteBehindStoreNonCoalescingTest; import org.apache.ignite.internal.processors.cache.store.IgnteCacheClientWriteBehindStoreTxTest; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test suite that contains all tests for {@link org.apache.ignite.internal.processors.cache.store.GridCacheWriteBehindStore}. */ -public class IgniteCacheWriteBehindTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheWriteBehindTestSuite { /** * @return Ignite Bamboo in-memory data grid test suite. */ @@ -63,4 +66,4 @@ public static TestSuite suite(Collection ignoredTests) { return suite; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteClientNodesTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteClientNodesTestSuite.java index 1f205052a0ecd..58e485d2daec0 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteClientNodesTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteClientNodesTestSuite.java @@ -22,11 +22,14 @@ import org.apache.ignite.internal.processors.cache.distributed.IgniteCacheClientNodeConcurrentStart; import org.apache.ignite.internal.processors.cache.distributed.IgniteCacheClientReconnectTest; import org.apache.ignite.internal.processors.cache.distributed.IgniteCacheManyClientsTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * */ -public class IgniteClientNodesTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteClientNodesTestSuite { /** * @return Test suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteClientReconnectTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteClientReconnectTestSuite.java index 7b001e04d9981..908aa36f615a3 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteClientReconnectTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteClientReconnectTestSuite.java @@ -34,11 +34,14 @@ import org.apache.ignite.internal.IgniteClientReconnectStopTest; import org.apache.ignite.internal.IgniteClientReconnectStreamerTest; import org.apache.ignite.internal.IgniteClientRejoinTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * */ -public class IgniteClientReconnectTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteClientReconnectTestSuite { /** * @return Test suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteComputeBasicConfigVariationsFullApiTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteComputeBasicConfigVariationsFullApiTestSuite.java index 41cc8a10c49f6..83d923c66edf9 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteComputeBasicConfigVariationsFullApiTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteComputeBasicConfigVariationsFullApiTestSuite.java @@ -26,11 +26,14 @@ import org.apache.ignite.testframework.configvariations.ConfigVariations; import org.apache.ignite.testframework.configvariations.ConfigVariationsTestSuiteBuilder; import org.apache.ignite.testframework.configvariations.Parameters; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Full API compute test. */ -public class IgniteComputeBasicConfigVariationsFullApiTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteComputeBasicConfigVariationsFullApiTestSuite { /** */ @SuppressWarnings("unchecked") private static final ConfigParameter[][] BASIC_COMPUTE_SET = new ConfigParameter[][] { @@ -45,9 +48,8 @@ public class IgniteComputeBasicConfigVariationsFullApiTestSuite extends TestSuit /** * @return Compute API test suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Compute New Full API Test Suite"); suite.addTest(new ConfigVariationsTestSuiteBuilder( diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteContinuousQueryConfigVariationsSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteContinuousQueryConfigVariationsSuite.java index 221dcaef52879..24b5d520c3714 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteContinuousQueryConfigVariationsSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteContinuousQueryConfigVariationsSuite.java @@ -20,18 +20,20 @@ import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryVariationsTest; import org.apache.ignite.testframework.configvariations.ConfigVariationsTestSuiteBuilder; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; import static org.apache.ignite.IgniteSystemProperties.IGNITE_DISCOVERY_HISTORY_SIZE; /** * Test suite for cache queries. */ -public class IgniteContinuousQueryConfigVariationsSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteContinuousQueryConfigVariationsSuite { /** * @return Test suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { System.setProperty(IGNITE_DISCOVERY_HISTORY_SIZE, "100"); TestSuite suite = new TestSuite("Ignite Continuous Query Config Variations Suite"); diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteContinuousTaskSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteContinuousTaskSelfTestSuite.java index b520078440422..32297dfe9bb4b 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteContinuousTaskSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteContinuousTaskSelfTestSuite.java @@ -23,16 +23,18 @@ import org.apache.ignite.internal.GridContinuousJobSiblingsSelfTest; import org.apache.ignite.internal.GridContinuousTaskSelfTest; import org.apache.ignite.internal.GridTaskContinuousMapperSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Continuous task self-test suite. */ -public class IgniteContinuousTaskSelfTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteContinuousTaskSelfTestSuite { /** * @return Test suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite Kernal Test Suite"); suite.addTest(new JUnit4TestAdapter(GridContinuousJobAnnotationSelfTest.class)); From 9fba3e4106d703a4b31d45e29d130c26f2e7e36a Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Sun, 9 Dec 2018 16:30:30 +0300 Subject: [PATCH 088/176] IGNITE-10177 cleanup Junit 3 from the project - wip - cleanup // extends testsuite -- verified with diffs overview and rebuild --- .../ignite/testsuites/IgniteAopSelfTestSuite.java | 5 ++++- .../apache/ignite/testsuites/IgniteElbTestSuite.java | 5 ++++- .../apache/ignite/testsuites/IgniteS3TestSuite.java | 5 ++++- .../stream/camel/IgniteCamelStreamerTestSuite.java | 5 ++++- .../internal/client/suite/IgniteClientTestSuite.java | 5 ++++- .../jdbc/suite/IgniteJdbcDriverMvccTestSuite.java | 5 ++++- .../ignite/jdbc/suite/IgniteJdbcDriverTestSuite.java | 8 +++++--- .../ignite/testsuites/IgniteCloudTestSuite.java | 5 ++++- .../cache/IgniteCacheInterceptorSelfTestSuite.java | 7 +++++-- ...gniteCacheReadThroughEvictionsVariationsSuite.java | 5 ++++- .../expiry/IgniteCacheExpiryPolicyTestSuite.java | 5 ++++- .../ignite/testsuites/IgniteBasicTestSuite.java | 11 ++++++----- .../IgniteBasicWithPersistenceTestSuite.java | 5 ++++- .../ignite/testsuites/IgniteBinaryCacheTestSuite.java | 5 ++++- 14 files changed, 60 insertions(+), 21 deletions(-) diff --git a/modules/aop/src/test/java/org/apache/ignite/testsuites/IgniteAopSelfTestSuite.java b/modules/aop/src/test/java/org/apache/ignite/testsuites/IgniteAopSelfTestSuite.java index 830633c95f2d1..399d759135de8 100644 --- a/modules/aop/src/test/java/org/apache/ignite/testsuites/IgniteAopSelfTestSuite.java +++ b/modules/aop/src/test/java/org/apache/ignite/testsuites/IgniteAopSelfTestSuite.java @@ -25,6 +25,8 @@ import org.apache.ignite.gridify.NonSpringAopSelfTest; import org.apache.ignite.gridify.SpringAopSelfTest; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; import org.test.gridify.ExternalNonSpringAopSelfTest; import static org.apache.ignite.IgniteSystemProperties.IGNITE_OVERRIDE_MCAST_GRP; @@ -32,7 +34,8 @@ /** * AOP test suite. */ -public class IgniteAopSelfTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteAopSelfTestSuite { /** * @return AOP test suite. */ diff --git a/modules/aws/src/test/java/org/apache/ignite/testsuites/IgniteElbTestSuite.java b/modules/aws/src/test/java/org/apache/ignite/testsuites/IgniteElbTestSuite.java index 65aa46ebcb55f..5c6566da19418 100644 --- a/modules/aws/src/test/java/org/apache/ignite/testsuites/IgniteElbTestSuite.java +++ b/modules/aws/src/test/java/org/apache/ignite/testsuites/IgniteElbTestSuite.java @@ -21,11 +21,14 @@ import junit.framework.TestSuite; import org.apache.ignite.spi.discovery.tcp.ipfinder.elb.TcpDiscoveryElbIpFinderSelfTest; import org.apache.ignite.testframework.IgniteTestSuite; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * ELB IP finder test suite. */ -public class IgniteElbTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteElbTestSuite { /** * @return Test suite. */ diff --git a/modules/aws/src/test/java/org/apache/ignite/testsuites/IgniteS3TestSuite.java b/modules/aws/src/test/java/org/apache/ignite/testsuites/IgniteS3TestSuite.java index f1c3128c13cea..1b28376b6d69e 100644 --- a/modules/aws/src/test/java/org/apache/ignite/testsuites/IgniteS3TestSuite.java +++ b/modules/aws/src/test/java/org/apache/ignite/testsuites/IgniteS3TestSuite.java @@ -34,11 +34,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.s3.client.DummyObjectListingTest; import org.apache.ignite.spi.discovery.tcp.ipfinder.s3.client.DummyS3ClientTest; import org.apache.ignite.testframework.IgniteTestSuite; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * S3 integration tests. */ -public class IgniteS3TestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteS3TestSuite { /** * @return Test suite. */ diff --git a/modules/camel/src/test/java/org/apache/ignite/stream/camel/IgniteCamelStreamerTestSuite.java b/modules/camel/src/test/java/org/apache/ignite/stream/camel/IgniteCamelStreamerTestSuite.java index 9aa1836d99d3f..8e9f0b10fa07d 100644 --- a/modules/camel/src/test/java/org/apache/ignite/stream/camel/IgniteCamelStreamerTestSuite.java +++ b/modules/camel/src/test/java/org/apache/ignite/stream/camel/IgniteCamelStreamerTestSuite.java @@ -20,11 +20,14 @@ import java.util.Set; import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Camel streamer tests. Included into 'Streamers' run configuration. */ -public class IgniteCamelStreamerTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCamelStreamerTestSuite { /** * @return {@link IgniteCamelStreamerTest} test suite. */ diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/suite/IgniteClientTestSuite.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/suite/IgniteClientTestSuite.java index fe117128d313c..e1ac5435824e5 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/client/suite/IgniteClientTestSuite.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/suite/IgniteClientTestSuite.java @@ -70,11 +70,14 @@ import org.apache.ignite.internal.processors.rest.protocols.tcp.redis.RedisProtocolStringAtomicDatastructuresSelfTest; import org.apache.ignite.internal.processors.rest.protocols.tcp.redis.RedisProtocolStringSelfTest; import org.apache.ignite.testframework.IgniteTestSuite; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test suite includes all test that concern REST processors. */ -public class IgniteClientTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteClientTestSuite { /** * @return Suite that contains all tests for REST. */ diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/suite/IgniteJdbcDriverMvccTestSuite.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/suite/IgniteJdbcDriverMvccTestSuite.java index 35a54ca9de511..f89bc44dcc2a1 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/suite/IgniteJdbcDriverMvccTestSuite.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/suite/IgniteJdbcDriverMvccTestSuite.java @@ -27,9 +27,12 @@ import org.apache.ignite.jdbc.thin.JdbcThinTransactionsServerNoAutoCommitComplexSelfTest; import org.apache.ignite.jdbc.thin.JdbcThinTransactionsWithMvccEnabledSelfTest; import org.apache.ignite.jdbc.thin.MvccJdbcTransactionFinishOnDeactivatedClusterSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** */ -public class IgniteJdbcDriverMvccTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteJdbcDriverMvccTestSuite { /** * @return JDBC Driver Test Suite. */ diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/suite/IgniteJdbcDriverTestSuite.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/suite/IgniteJdbcDriverTestSuite.java index 18e45f13c1590..977feed61813c 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/suite/IgniteJdbcDriverTestSuite.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/suite/IgniteJdbcDriverTestSuite.java @@ -87,16 +87,18 @@ import org.apache.ignite.jdbc.thin.JdbcThinUpdateStatementSelfTest; import org.apache.ignite.jdbc.thin.JdbcThinUpdateStatementSkipReducerOnUpdateSelfTest; import org.apache.ignite.jdbc.thin.JdbcThinWalModeChangeSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * JDBC driver test suite. */ -public class IgniteJdbcDriverTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteJdbcDriverTestSuite { /** * @return JDBC Driver Test Suite. - * @throws Exception In case of error. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite JDBC Driver Test Suite"); // Thin client based driver tests. diff --git a/modules/cloud/src/test/java/org/apache/ignite/testsuites/IgniteCloudTestSuite.java b/modules/cloud/src/test/java/org/apache/ignite/testsuites/IgniteCloudTestSuite.java index 6a0f8a3ac257c..5be6d3b45449b 100644 --- a/modules/cloud/src/test/java/org/apache/ignite/testsuites/IgniteCloudTestSuite.java +++ b/modules/cloud/src/test/java/org/apache/ignite/testsuites/IgniteCloudTestSuite.java @@ -23,11 +23,14 @@ import junit.framework.TestSuite; import org.apache.ignite.spi.discovery.tcp.ipfinder.cloud.TcpDiscoveryCloudIpFinderSelfTest; import org.apache.ignite.testframework.IgniteTestSuite; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Ignite Cloud integration test. */ -public class IgniteCloudTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCloudTestSuite { /** * @return Test suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInterceptorSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInterceptorSelfTestSuite.java index 37b8d400d645d..5afe40618f95b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInterceptorSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInterceptorSelfTestSuite.java @@ -20,11 +20,14 @@ import java.util.Collection; import junit.framework.TestSuite; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Cache interceptor suite. */ -public class IgniteCacheInterceptorSelfTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheInterceptorSelfTestSuite { /** * @return Cache API test suite. */ @@ -72,4 +75,4 @@ public static TestSuite suite(Collection ignoredTests) { return suite; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughEvictionsVariationsSuite.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughEvictionsVariationsSuite.java index a390e121b9e50..e17c60e384784 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughEvictionsVariationsSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughEvictionsVariationsSuite.java @@ -22,11 +22,14 @@ import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.testframework.configvariations.ConfigVariationsTestSuiteBuilder; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * */ -public class IgniteCacheReadThroughEvictionsVariationsSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheReadThroughEvictionsVariationsSuite { /** * @return Cache API test suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyTestSuite.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyTestSuite.java index 4a1d1209a270e..e922537f0ca6e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyTestSuite.java @@ -23,11 +23,14 @@ import org.apache.ignite.internal.processors.cache.GridCacheTtlManagerNotificationTest; import org.apache.ignite.internal.processors.cache.IgniteCacheEntryListenerExpiredEventsTest; import org.apache.ignite.internal.processors.cache.IgniteCacheExpireAndUpdateConsistencyTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * */ -public class IgniteCacheExpiryPolicyTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheExpiryPolicyTestSuite { /** * @return Cache Expiry Policy test suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java index 6db526524fa97..a5dfd32d27f8a 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java @@ -92,25 +92,26 @@ import org.apache.ignite.testframework.test.VariationsIteratorTest; import org.apache.ignite.util.AttributeNodeFilterSelfTest; import org.jetbrains.annotations.Nullable; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Basic test suite. */ -public class IgniteBasicTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteBasicTestSuite { /** * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { return suite(null); } /** * @param ignoredTests Tests don't include in the execution. Providing null means nothing to exclude. * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite(@Nullable final Set ignoredTests) throws Exception { + public static TestSuite suite(@Nullable final Set ignoredTests) { TestSuite suite = new TestSuite("Ignite Basic Test Suite"); suite.addTest(IgniteMarshallerSelfTestSuite.suite(ignoredTests)); diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicWithPersistenceTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicWithPersistenceTestSuite.java index edc0b1fb8e958..4dbcf43b80681 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicWithPersistenceTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicWithPersistenceTestSuite.java @@ -39,11 +39,14 @@ import org.apache.ignite.util.GridCommandHandlerTest; import org.apache.ignite.util.GridInternalTaskUnusedWalSegmentsTest; import org.jetbrains.annotations.Nullable; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Basic test suite. */ -public class IgniteBasicWithPersistenceTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteBasicWithPersistenceTestSuite { /** * @return Test suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheTestSuite.java index 8da6fadd599ac..707cc77b5ebbf 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheTestSuite.java @@ -37,11 +37,14 @@ import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheBinariesPartitionedOnlyByteArrayValuesSelfTest; import org.apache.ignite.internal.processors.datastreamer.DataStreamProcessorPersistenceSelfTest; import org.apache.ignite.internal.processors.datastreamer.DataStreamProcessorSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Cache suite with binary marshaller. */ -public class IgniteBinaryCacheTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteBinaryCacheTestSuite { /** * @return Suite. * @throws Exception In case of error. From b88e1ff2b0a19e2d50a1c33a48b307664e36c995 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Sun, 9 Dec 2018 17:04:56 +0300 Subject: [PATCH 089/176] IGNITE-10177 cleanup Junit 3 from the project - wip - cleanup // extends testsuite -- verified with diffs overview and rebuild --- .../processors/hadoop/impl/igfs/IgfsEventsTestSuite.java | 5 ++++- .../apache/ignite/testsuites/IgniteHadoopTestSuite.java | 5 ++++- .../testsuites/IgniteIgfsLinuxAndMacOSTestSuite.java | 5 ++++- .../ignite/testsuites/IgniteBinaryHibernateTestSuite.java | 8 +++++--- .../ignite/testsuites/IgniteHibernateTestSuite.java | 5 ++++- .../testsuites/IgniteBinaryHibernate5TestSuite.java | 8 +++++--- .../ignite/testsuites/IgniteHibernate5TestSuite.java | 5 ++++- .../testsuites/IgniteBinaryCacheQueryTestSuite.java | 5 ++++- .../testsuites/IgniteBinaryCacheQueryTestSuite2.java | 5 ++++- .../IgniteBinarySimpleNameMapperCacheQueryTestSuite.java | 8 +++++--- .../testsuites/IgniteCacheAffinityRunTestSuite.java | 5 ++++- ...iteCacheBlockExchangeOnSqlReadOperationsTestSuite.java | 5 ++++- .../IgniteCacheConfigVariationQueryTestSuite.java | 8 +++++--- .../ignite/testsuites/IgniteCacheMvccSqlTestSuite.java | 5 ++++- .../ignite/testsuites/IgniteCacheQuerySelfTestSuite3.java | 5 ++++- .../ignite/testsuites/IgniteCacheQuerySelfTestSuite4.java | 5 ++++- .../ignite/testsuites/IgniteCacheQuerySelfTestSuite5.java | 5 ++++- .../ignite/testsuites/IgniteCacheQuerySelfTestSuite6.java | 5 ++++- .../IgniteCacheWithIndexingAndPersistenceTestSuite.java | 5 ++++- .../testsuites/IgniteCacheWithIndexingTestSuite.java | 5 ++++- .../IgniteDbMemoryLeakWithIndexingTestSuite.java | 5 ++++- .../testsuites/IgnitePdsWithIndexingCoreTestSuite.java | 5 ++++- .../ignite/testsuites/IgnitePdsWithIndexingTestSuite.java | 5 ++++- .../org/apache/ignite/testsuites/IgniteJclTestSuite.java | 5 ++++- .../org/apache/ignite/testsuites/IgniteJtaTestSuite.java | 5 ++++- .../stream/kafka/IgniteKafkaStreamerSelfTestSuite.java | 5 ++++- .../ignite/testsuites/IgniteKubernetesTestSuite.java | 5 ++++- .../apache/ignite/testsuites/IgniteLog4j2TestSuite.java | 5 ++++- .../rest/protocols/http/jetty/GridRestSuite.java | 5 ++++- .../ignite/stream/rocketmq/RocketMQStreamerTestSuite.java | 5 ++++- .../ignite/testsuites/IgniteSchedulerTestSuite.java | 5 ++++- .../apache/ignite/testsuites/IgniteSlf4jTestSuite.java | 5 ++++- .../org/apache/ignite/testsuites/IgniteRDDTestSuite.java | 5 ++++- .../ignite/testsuites/IgniteSpringData2TestSuite.java | 5 ++++- .../ignite/testsuites/IgniteSpringDataTestSuite.java | 5 ++++- .../ignite/testsuites/IgniteResourceSelfTestSuite.java | 5 ++++- .../apache/ignite/testsuites/IgniteSpringTestSuite.java | 8 +++++--- .../stream/storm/IgniteStormStreamerSelfTestSuite.java | 5 ++++- .../stream/twitter/IgniteTwitterStreamerTestSuite.java | 5 ++++- .../ignite/testsuites/IgniteToolsSelfTestSuite.java | 5 ++++- .../websession/IgniteWebSessionSelfTestSuite.java | 5 ++++- .../test/java/org/apache/ignite/IgniteYarnTestSuite.java | 5 ++++- 42 files changed, 173 insertions(+), 52 deletions(-) diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgfsEventsTestSuite.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgfsEventsTestSuite.java index 1b61d694b5461..b50d9bf35a41c 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgfsEventsTestSuite.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgfsEventsTestSuite.java @@ -32,6 +32,8 @@ import org.apache.ignite.internal.util.ipc.shmem.IpcSharedMemoryServerEndpoint; import org.apache.ignite.internal.util.typedef.G; import org.jetbrains.annotations.Nullable; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; import static org.apache.ignite.igfs.IgfsMode.DUAL_ASYNC; import static org.apache.ignite.igfs.IgfsMode.DUAL_SYNC; @@ -41,7 +43,8 @@ * Test suite for IGFS event tests. */ @SuppressWarnings("PublicInnerClass") -public class IgfsEventsTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgfsEventsTestSuite { /** * @return Test suite. * @throws Exception Thrown in case of the failure. diff --git a/modules/hadoop/src/test/java/org/apache/ignite/testsuites/IgniteHadoopTestSuite.java b/modules/hadoop/src/test/java/org/apache/ignite/testsuites/IgniteHadoopTestSuite.java index 9da757f837751..c4cebbf1dfffd 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/testsuites/IgniteHadoopTestSuite.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/testsuites/IgniteHadoopTestSuite.java @@ -104,13 +104,16 @@ import java.nio.file.Path; import java.nio.file.Paths; import java.util.List; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; import static org.apache.ignite.testframework.GridTestUtils.modeToPermissionSet; /** * Test suite for Hadoop Map Reduce engine. */ -public class IgniteHadoopTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteHadoopTestSuite { /** * @return Test suite. * @throws Exception Thrown in case of the failure. diff --git a/modules/hadoop/src/test/java/org/apache/ignite/testsuites/IgniteIgfsLinuxAndMacOSTestSuite.java b/modules/hadoop/src/test/java/org/apache/ignite/testsuites/IgniteIgfsLinuxAndMacOSTestSuite.java index c5c7646b2645b..ede1f181cb1cd 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/testsuites/IgniteIgfsLinuxAndMacOSTestSuite.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/testsuites/IgniteIgfsLinuxAndMacOSTestSuite.java @@ -33,6 +33,8 @@ import org.apache.ignite.internal.processors.hadoop.impl.igfs.IgniteHadoopFileSystemShmemExternalToClientPrimarySelfTest; import org.apache.ignite.internal.processors.hadoop.impl.igfs.IgniteHadoopFileSystemShmemExternalToClientProxySelfTest; import org.apache.ignite.internal.processors.igfs.IgfsServerManagerIpcEndpointRegistrationOnLinuxAndMacSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; import static org.apache.ignite.testsuites.IgniteHadoopTestSuite.downloadHadoop; @@ -40,7 +42,8 @@ * Test suite for Hadoop file system over Ignite cache. * Contains tests which works on Linux and Mac OS platform only. */ -public class IgniteIgfsLinuxAndMacOSTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteIgfsLinuxAndMacOSTestSuite { /** * @return Test suite. * @throws Exception Thrown in case of the failure. diff --git a/modules/hibernate-4.2/src/test/java/org/apache/ignite/testsuites/IgniteBinaryHibernateTestSuite.java b/modules/hibernate-4.2/src/test/java/org/apache/ignite/testsuites/IgniteBinaryHibernateTestSuite.java index 3791baed9c93c..84f2f7bf5c8df 100644 --- a/modules/hibernate-4.2/src/test/java/org/apache/ignite/testsuites/IgniteBinaryHibernateTestSuite.java +++ b/modules/hibernate-4.2/src/test/java/org/apache/ignite/testsuites/IgniteBinaryHibernateTestSuite.java @@ -20,16 +20,18 @@ import junit.framework.TestSuite; import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.testframework.config.GridTestProperties; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * */ -public class IgniteBinaryHibernateTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteBinaryHibernateTestSuite { /** * @return Test suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { GridTestProperties.setProperty(GridTestProperties.MARSH_CLASS_NAME, BinaryMarshaller.class.getName()); return IgniteHibernateTestSuite.suite(); diff --git a/modules/hibernate-4.2/src/test/java/org/apache/ignite/testsuites/IgniteHibernateTestSuite.java b/modules/hibernate-4.2/src/test/java/org/apache/ignite/testsuites/IgniteHibernateTestSuite.java index 64c6cfac34156..436203a797567 100644 --- a/modules/hibernate-4.2/src/test/java/org/apache/ignite/testsuites/IgniteHibernateTestSuite.java +++ b/modules/hibernate-4.2/src/test/java/org/apache/ignite/testsuites/IgniteHibernateTestSuite.java @@ -29,11 +29,14 @@ import org.apache.ignite.cache.store.hibernate.CacheHibernateBlobStoreSelfTest; import org.apache.ignite.cache.store.hibernate.CacheHibernateStoreFactorySelfTest; import org.apache.ignite.cache.store.hibernate.CacheHibernateStoreSessionListenerSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Hibernate integration tests. */ -public class IgniteHibernateTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteHibernateTestSuite { /** * @return Test suite. */ diff --git a/modules/hibernate-5.1/src/test/java/org/apache/ignite/testsuites/IgniteBinaryHibernate5TestSuite.java b/modules/hibernate-5.1/src/test/java/org/apache/ignite/testsuites/IgniteBinaryHibernate5TestSuite.java index d5395111e84b4..40ee896a848f0 100644 --- a/modules/hibernate-5.1/src/test/java/org/apache/ignite/testsuites/IgniteBinaryHibernate5TestSuite.java +++ b/modules/hibernate-5.1/src/test/java/org/apache/ignite/testsuites/IgniteBinaryHibernate5TestSuite.java @@ -20,16 +20,18 @@ import junit.framework.TestSuite; import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.testframework.config.GridTestProperties; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * */ -public class IgniteBinaryHibernate5TestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteBinaryHibernate5TestSuite { /** * @return Test suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { GridTestProperties.setProperty(GridTestProperties.MARSH_CLASS_NAME, BinaryMarshaller.class.getName()); return IgniteHibernate5TestSuite.suite(); diff --git a/modules/hibernate-5.1/src/test/java/org/apache/ignite/testsuites/IgniteHibernate5TestSuite.java b/modules/hibernate-5.1/src/test/java/org/apache/ignite/testsuites/IgniteHibernate5TestSuite.java index f64a0c400b692..f87e676bf681c 100644 --- a/modules/hibernate-5.1/src/test/java/org/apache/ignite/testsuites/IgniteHibernate5TestSuite.java +++ b/modules/hibernate-5.1/src/test/java/org/apache/ignite/testsuites/IgniteHibernate5TestSuite.java @@ -29,11 +29,14 @@ import org.apache.ignite.cache.store.hibernate.CacheHibernateBlobStoreSelfTest; import org.apache.ignite.cache.store.hibernate.CacheHibernateStoreFactorySelfTest; import org.apache.ignite.cache.store.hibernate.CacheHibernateStoreSessionListenerSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Hibernate integration tests. */ -public class IgniteHibernate5TestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteHibernate5TestSuite { /** * @return Test suite. */ diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite.java index 88b4205f3b6b6..8a8b55cc81e49 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite.java +++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite.java @@ -235,11 +235,14 @@ import org.apache.ignite.sqltests.PartitionedSqlTest; import org.apache.ignite.sqltests.ReplicatedSqlTest; import org.apache.ignite.testframework.IgniteTestSuite; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test suite for cache queries. */ -public class IgniteBinaryCacheQueryTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteBinaryCacheQueryTestSuite { /** * @return Test suite. */ diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite2.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite2.java index d4478fe69a8cf..cd58c1af8a2c5 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite2.java +++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite2.java @@ -60,11 +60,14 @@ import org.apache.ignite.internal.processors.query.h2.twostep.RetryCauseMessageSelfTest; import org.apache.ignite.internal.processors.query.h2.twostep.TableViewSubquerySelfTest; import org.apache.ignite.testframework.IgniteTestSuite; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test suite for cache queries. */ -public class IgniteBinaryCacheQueryTestSuite2 extends TestSuite { +@RunWith(AllTests.class) +public class IgniteBinaryCacheQueryTestSuite2 { /** * @return Test suite. */ diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinarySimpleNameMapperCacheQueryTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinarySimpleNameMapperCacheQueryTestSuite.java index 109e244e0b5b7..b136319fd04a5 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinarySimpleNameMapperCacheQueryTestSuite.java +++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinarySimpleNameMapperCacheQueryTestSuite.java @@ -19,16 +19,18 @@ import junit.framework.TestSuite; import org.apache.ignite.testframework.config.GridTestProperties; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Cache query suite with binary marshaller. */ -public class IgniteBinarySimpleNameMapperCacheQueryTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteBinarySimpleNameMapperCacheQueryTestSuite { /** * @return Suite. - * @throws Exception In case of error. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { GridTestProperties.setProperty(GridTestProperties.BINARY_MARSHALLER_USE_SIMPLE_NAME_MAPPER, "true"); return IgniteBinaryCacheQueryTestSuite.suite(); diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheAffinityRunTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheAffinityRunTestSuite.java index 7ea53fc69daab..9b470f779da3a 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheAffinityRunTestSuite.java +++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheAffinityRunTestSuite.java @@ -25,12 +25,15 @@ import org.apache.ignite.internal.processors.cache.IgniteCacheLockPartitionOnAffinityRunWithCollisionSpiTest; import org.apache.ignite.internal.processors.database.baseline.IgniteBaselineLockPartitionOnAffinityRunAtomicCacheTest; import org.apache.ignite.internal.processors.database.baseline.IgniteBaselineLockPartitionOnAffinityRunTxCacheTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Compute and Cache tests for affinityRun/Call. These tests is extracted into separate suite * because ones take a lot of time. */ -public class IgniteCacheAffinityRunTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheAffinityRunTestSuite { /** * @return Test suite. */ diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheBlockExchangeOnSqlReadOperationsTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheBlockExchangeOnSqlReadOperationsTestSuite.java index 4fa8f5ded3cc0..196ad99b98bda 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheBlockExchangeOnSqlReadOperationsTestSuite.java +++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheBlockExchangeOnSqlReadOperationsTestSuite.java @@ -21,11 +21,14 @@ import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.distributed.CacheBlockOnCreateDestoryIndexTest; import org.apache.ignite.internal.processors.cache.distributed.CacheBlockOnSqlQueryTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test suite for cache queries. */ -public class IgniteCacheBlockExchangeOnSqlReadOperationsTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheBlockExchangeOnSqlReadOperationsTestSuite { /** * @return Test suite. */ diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheConfigVariationQueryTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheConfigVariationQueryTestSuite.java index 83ae27f584a9c..a8e9c1c4832e0 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheConfigVariationQueryTestSuite.java +++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheConfigVariationQueryTestSuite.java @@ -20,16 +20,18 @@ import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.IgniteCacheConfigVariationsQueryTest; import org.apache.ignite.testframework.configvariations.ConfigVariationsTestSuiteBuilder; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test suite for cache queries. */ -public class IgniteCacheConfigVariationQueryTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheConfigVariationQueryTestSuite { /** * @return Test suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { return new ConfigVariationsTestSuiteBuilder( "Cache Config Variations Query Test Suite", IgniteCacheConfigVariationsQueryTest.class) diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccSqlTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccSqlTestSuite.java index c2d31f96ff09b..648c3cb81725e 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccSqlTestSuite.java +++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccSqlTestSuite.java @@ -71,13 +71,16 @@ import org.apache.ignite.internal.processors.cache.mvcc.MvccRepeatableReadBulkOpsTest; import org.apache.ignite.internal.processors.cache.mvcc.MvccRepeatableReadOperationsTest; import org.apache.ignite.internal.processors.query.h2.GridIndexRebuildWithMvccEnabledSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT; /** * */ -public class IgniteCacheMvccSqlTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheMvccSqlTestSuite { /** * @return Test suite. */ diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite3.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite3.java index 02633e9793d48..9b87bc67a2d3a 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite3.java +++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite3.java @@ -42,11 +42,14 @@ import org.apache.ignite.internal.processors.cache.query.continuous.IgniteCacheContinuousQueryClientTxReconnectTest; import org.apache.ignite.internal.processors.cache.query.continuous.IgniteCacheContinuousQueryNoUnsubscribeTest; import org.apache.ignite.internal.processors.cache.query.continuous.IgniteCacheContinuousQueryReconnectTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test suite for cache queries. */ -public class IgniteCacheQuerySelfTestSuite3 extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheQuerySelfTestSuite3 { /** * @return Test suite. */ diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite4.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite4.java index d39fce9fa36b6..b07d16872617c 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite4.java +++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite4.java @@ -29,11 +29,14 @@ import org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryFailoverMvccTxSelfTest; import org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryFailoverTxReplicatedSelfTest; import org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryFailoverTxSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test suite for cache queries. */ -public class IgniteCacheQuerySelfTestSuite4 extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheQuerySelfTestSuite4 { /** * @return Test suite. */ diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite5.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite5.java index 882757aa27d35..c6e1550fbef10 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite5.java +++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite5.java @@ -37,11 +37,14 @@ import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryTxSelfTest; import org.apache.ignite.internal.processors.cache.query.continuous.IgniteCacheContinuousQueryBackupQueueTest; import org.apache.ignite.internal.processors.cache.query.continuous.IgniteCacheContinuousQueryImmutableEntryTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test suite for cache queries. */ -public class IgniteCacheQuerySelfTestSuite5 extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheQuerySelfTestSuite5 { /** * @return Test suite. */ diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite6.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite6.java index 846e6487b0695..6c8ad7e07bdd0 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite6.java +++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite6.java @@ -37,11 +37,14 @@ import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryReplicatedAtomicOneNodeTest; import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryReplicatedAtomicSelfTest; import org.apache.ignite.internal.processors.cache.query.continuous.IgniteCacheContinuousQueryClientTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test suite for cache queries. */ -public class IgniteCacheQuerySelfTestSuite6 extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheQuerySelfTestSuite6 { /** * @return Test suite. */ diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheWithIndexingAndPersistenceTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheWithIndexingAndPersistenceTestSuite.java index 23f07215b04e7..540d100184e0c 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheWithIndexingAndPersistenceTestSuite.java +++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheWithIndexingAndPersistenceTestSuite.java @@ -21,11 +21,14 @@ import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.StartCachesInParallelTest; import org.apache.ignite.util.GridCommandHandlerIndexingTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Cache tests using indexing. */ -public class IgniteCacheWithIndexingAndPersistenceTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheWithIndexingAndPersistenceTestSuite { /** * @return Test suite. */ diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheWithIndexingTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheWithIndexingTestSuite.java index c292c8fc4443a..55d129bddd224 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheWithIndexingTestSuite.java +++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheWithIndexingTestSuite.java @@ -43,11 +43,14 @@ import org.apache.ignite.internal.processors.cache.ttl.CacheTtlTransactionalPartitionedSelfTest; import org.apache.ignite.internal.processors.client.IgniteDataStreamerTest; import org.apache.ignite.internal.processors.query.h2.database.InlineIndexHelperTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Cache tests using indexing. */ -public class IgniteCacheWithIndexingTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheWithIndexingTestSuite { /** * @return Test suite. */ diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteDbMemoryLeakWithIndexingTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteDbMemoryLeakWithIndexingTestSuite.java index 150d3e20fed7e..9946f94db32e4 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteDbMemoryLeakWithIndexingTestSuite.java +++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteDbMemoryLeakWithIndexingTestSuite.java @@ -21,11 +21,14 @@ import junit.framework.TestSuite; import org.apache.ignite.internal.processors.database.IgniteDbMemoryLeakIndexedTest; import org.apache.ignite.internal.processors.database.IgniteDbMemoryLeakSqlQueryTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Page memory leaks tests using indexing. */ -public class IgniteDbMemoryLeakWithIndexingTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteDbMemoryLeakWithIndexingTestSuite { /** * @return Test suite. */ diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgnitePdsWithIndexingCoreTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgnitePdsWithIndexingCoreTestSuite.java index 528c7132b21de..4a1fb066d5d6e 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgnitePdsWithIndexingCoreTestSuite.java +++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgnitePdsWithIndexingCoreTestSuite.java @@ -44,11 +44,14 @@ import org.apache.ignite.internal.processors.cache.persistence.db.wal.WalRecoveryTxLogicalRecordsTest; import org.apache.ignite.internal.processors.cache.persistence.db.wal.WalRolloverRecordLoggingFsyncTest; import org.apache.ignite.internal.processors.cache.persistence.db.wal.WalRolloverRecordLoggingLogOnlyTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test suite for tests that cover core PDS features and depend on indexing module. */ -public class IgnitePdsWithIndexingCoreTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgnitePdsWithIndexingCoreTestSuite { /** * @return Test suite. */ diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgnitePdsWithIndexingTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgnitePdsWithIndexingTestSuite.java index a707868c80e8d..1db34b009d549 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgnitePdsWithIndexingTestSuite.java +++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgnitePdsWithIndexingTestSuite.java @@ -27,11 +27,14 @@ import org.apache.ignite.internal.processors.database.IgnitePersistentStoreQueryWithMultipleClassesPerCacheTest; import org.apache.ignite.internal.processors.database.IgnitePersistentStoreSchemaLoadTest; import org.apache.ignite.internal.processors.database.IgniteTwoRegionsRebuildIndexTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * */ -public class IgnitePdsWithIndexingTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgnitePdsWithIndexingTestSuite { /** * @return Test suite. */ diff --git a/modules/jcl/src/test/java/org/apache/ignite/testsuites/IgniteJclTestSuite.java b/modules/jcl/src/test/java/org/apache/ignite/testsuites/IgniteJclTestSuite.java index c27f59a2ae126..5736006bba8e6 100644 --- a/modules/jcl/src/test/java/org/apache/ignite/testsuites/IgniteJclTestSuite.java +++ b/modules/jcl/src/test/java/org/apache/ignite/testsuites/IgniteJclTestSuite.java @@ -20,11 +20,14 @@ import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.logger.jcl.JclLoggerTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Commons logging test. */ -public class IgniteJclTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteJclTestSuite { /** * @return Test suite. */ diff --git a/modules/jta/src/test/java/org/apache/ignite/testsuites/IgniteJtaTestSuite.java b/modules/jta/src/test/java/org/apache/ignite/testsuites/IgniteJtaTestSuite.java index 788b88bd50ab9..82350b282960f 100644 --- a/modules/jta/src/test/java/org/apache/ignite/testsuites/IgniteJtaTestSuite.java +++ b/modules/jta/src/test/java/org/apache/ignite/testsuites/IgniteJtaTestSuite.java @@ -31,11 +31,14 @@ import org.apache.ignite.internal.processors.cache.jta.GridReplicatedCacheJtaLookupClassNameSelfTest; import org.apache.ignite.internal.processors.cache.GridJtaLifecycleAwareSelfTest; import org.apache.ignite.testframework.IgniteTestSuite; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * JTA integration tests. */ -public class IgniteJtaTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteJtaTestSuite { /** * @return Test suite. */ diff --git a/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/IgniteKafkaStreamerSelfTestSuite.java b/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/IgniteKafkaStreamerSelfTestSuite.java index 9fb7468d66cfc..f86f7a782278d 100644 --- a/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/IgniteKafkaStreamerSelfTestSuite.java +++ b/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/IgniteKafkaStreamerSelfTestSuite.java @@ -21,11 +21,14 @@ import junit.framework.TestSuite; import org.apache.ignite.stream.kafka.connect.IgniteSinkConnectorTest; import org.apache.ignite.stream.kafka.connect.IgniteSourceConnectorTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Apache Kafka streamers tests. */ -public class IgniteKafkaStreamerSelfTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteKafkaStreamerSelfTestSuite { /** * @return Test suite. */ diff --git a/modules/kubernetes/src/test/java/org/apache/ignite/testsuites/IgniteKubernetesTestSuite.java b/modules/kubernetes/src/test/java/org/apache/ignite/testsuites/IgniteKubernetesTestSuite.java index 8c856af2ef0a2..43b9b917164de 100644 --- a/modules/kubernetes/src/test/java/org/apache/ignite/testsuites/IgniteKubernetesTestSuite.java +++ b/modules/kubernetes/src/test/java/org/apache/ignite/testsuites/IgniteKubernetesTestSuite.java @@ -22,11 +22,14 @@ import junit.framework.TestSuite; import org.apache.ignite.spi.discovery.tcp.ipfinder.kubernetes.TcpDiscoveryKubernetesIpFinderSelfTest; import org.apache.ignite.testframework.IgniteTestSuite; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Ignite Kubernetes integration test. */ -public class IgniteKubernetesTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteKubernetesTestSuite { /** * @return Test suite. */ diff --git a/modules/log4j2/src/test/java/org/apache/ignite/testsuites/IgniteLog4j2TestSuite.java b/modules/log4j2/src/test/java/org/apache/ignite/testsuites/IgniteLog4j2TestSuite.java index 3dd4c44395b11..665ae31baac87 100644 --- a/modules/log4j2/src/test/java/org/apache/ignite/testsuites/IgniteLog4j2TestSuite.java +++ b/modules/log4j2/src/test/java/org/apache/ignite/testsuites/IgniteLog4j2TestSuite.java @@ -23,11 +23,14 @@ import org.apache.ignite.logger.log4j2.Log4j2LoggerMarkerTest; import org.apache.ignite.logger.log4j2.Log4j2LoggerSelfTest; import org.apache.ignite.logger.log4j2.Log4j2LoggerVerboseModeSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Log4j2 logging tests. */ -public class IgniteLog4j2TestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteLog4j2TestSuite { /** * @return Test suite. */ diff --git a/modules/rest-http/src/test/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridRestSuite.java b/modules/rest-http/src/test/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridRestSuite.java index d02b614314223..8a53e51a5565c 100644 --- a/modules/rest-http/src/test/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridRestSuite.java +++ b/modules/rest-http/src/test/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridRestSuite.java @@ -18,11 +18,14 @@ import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Integration tests for Grid REST functionality; Jetty is under the hood. */ -public class GridRestSuite extends TestSuite { +@RunWith(AllTests.class) +public class GridRestSuite { /** * @return Suite that contains all tests for REST. */ diff --git a/modules/rocketmq/src/test/java/org/apache/ignite/stream/rocketmq/RocketMQStreamerTestSuite.java b/modules/rocketmq/src/test/java/org/apache/ignite/stream/rocketmq/RocketMQStreamerTestSuite.java index 4e54969159f49..8649a13edd766 100644 --- a/modules/rocketmq/src/test/java/org/apache/ignite/stream/rocketmq/RocketMQStreamerTestSuite.java +++ b/modules/rocketmq/src/test/java/org/apache/ignite/stream/rocketmq/RocketMQStreamerTestSuite.java @@ -19,11 +19,14 @@ import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Apache RocketMQ streamers tests. */ -public class RocketMQStreamerTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class RocketMQStreamerTestSuite { /** * @return Test suite. */ diff --git a/modules/schedule/src/test/java/org/apache/ignite/testsuites/IgniteSchedulerTestSuite.java b/modules/schedule/src/test/java/org/apache/ignite/testsuites/IgniteSchedulerTestSuite.java index 7fc82ae90bd16..e1b95a78b2594 100644 --- a/modules/schedule/src/test/java/org/apache/ignite/testsuites/IgniteSchedulerTestSuite.java +++ b/modules/schedule/src/test/java/org/apache/ignite/testsuites/IgniteSchedulerTestSuite.java @@ -20,11 +20,14 @@ import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.schedule.GridScheduleSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Scheduler tests. */ -public class IgniteSchedulerTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteSchedulerTestSuite { /** * @return Test suite. */ diff --git a/modules/slf4j/src/test/java/org/apache/ignite/testsuites/IgniteSlf4jTestSuite.java b/modules/slf4j/src/test/java/org/apache/ignite/testsuites/IgniteSlf4jTestSuite.java index abf1eb850b909..25deaeaf9e2b0 100644 --- a/modules/slf4j/src/test/java/org/apache/ignite/testsuites/IgniteSlf4jTestSuite.java +++ b/modules/slf4j/src/test/java/org/apache/ignite/testsuites/IgniteSlf4jTestSuite.java @@ -20,11 +20,14 @@ import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.logger.slf4j.Slf4jLoggerMarkerTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Slf4j logging tests. */ -public class IgniteSlf4jTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteSlf4jTestSuite { /** * @return Test suite. */ diff --git a/modules/spark/src/test/java/org/apache/ignite/testsuites/IgniteRDDTestSuite.java b/modules/spark/src/test/java/org/apache/ignite/testsuites/IgniteRDDTestSuite.java index 75534f19310fe..e963dd1ab19e9 100644 --- a/modules/spark/src/test/java/org/apache/ignite/testsuites/IgniteRDDTestSuite.java +++ b/modules/spark/src/test/java/org/apache/ignite/testsuites/IgniteRDDTestSuite.java @@ -21,11 +21,14 @@ import junit.framework.TestSuite; import org.apache.ignite.spark.JavaEmbeddedIgniteRDDSelfTest; import org.apache.ignite.spark.JavaStandaloneIgniteRDDSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test suit for Ignite RDD */ -public class IgniteRDDTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteRDDTestSuite { /** * @return Java Ignite RDD test suit. */ diff --git a/modules/spring-data-2.0/src/test/java/org/apache/ignite/testsuites/IgniteSpringData2TestSuite.java b/modules/spring-data-2.0/src/test/java/org/apache/ignite/testsuites/IgniteSpringData2TestSuite.java index edfd57fc3981d..4fb9605625857 100644 --- a/modules/spring-data-2.0/src/test/java/org/apache/ignite/testsuites/IgniteSpringData2TestSuite.java +++ b/modules/spring-data-2.0/src/test/java/org/apache/ignite/testsuites/IgniteSpringData2TestSuite.java @@ -21,11 +21,14 @@ import junit.framework.TestSuite; import org.apache.ignite.springdata.IgniteSpringDataCrudSelfTest; import org.apache.ignite.springdata.IgniteSpringDataQueriesSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Ignite Spring Data 2.0 test suite. */ -public class IgniteSpringData2TestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteSpringData2TestSuite { /** * @return Test suite. */ diff --git a/modules/spring-data/src/test/java/org/apache/ignite/testsuites/IgniteSpringDataTestSuite.java b/modules/spring-data/src/test/java/org/apache/ignite/testsuites/IgniteSpringDataTestSuite.java index 6ac72fb939f2c..503c820f1f9ef 100644 --- a/modules/spring-data/src/test/java/org/apache/ignite/testsuites/IgniteSpringDataTestSuite.java +++ b/modules/spring-data/src/test/java/org/apache/ignite/testsuites/IgniteSpringDataTestSuite.java @@ -21,11 +21,14 @@ import junit.framework.TestSuite; import org.apache.ignite.springdata.IgniteSpringDataCrudSelfTest; import org.apache.ignite.springdata.IgniteSpringDataQueriesSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Ignite Spring Data test suite. */ -public class IgniteSpringDataTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteSpringDataTestSuite { /** * @return Test suite. */ diff --git a/modules/spring/src/test/java/org/apache/ignite/testsuites/IgniteResourceSelfTestSuite.java b/modules/spring/src/test/java/org/apache/ignite/testsuites/IgniteResourceSelfTestSuite.java index 39cda04a06c34..4b0ac6b381b1c 100644 --- a/modules/spring/src/test/java/org/apache/ignite/testsuites/IgniteResourceSelfTestSuite.java +++ b/modules/spring/src/test/java/org/apache/ignite/testsuites/IgniteResourceSelfTestSuite.java @@ -24,12 +24,15 @@ import org.apache.ignite.internal.processors.resource.GridServiceInjectionSelfTest; import org.apache.ignite.internal.processors.resource.GridSpringResourceInjectionSelfTest; import org.apache.ignite.testframework.IgniteTestSuite; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Ignite resource injection test Suite. */ @SuppressWarnings({"ProhibitedExceptionDeclared"}) -public class IgniteResourceSelfTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteResourceSelfTestSuite { /** * @return Resource injection test suite. */ diff --git a/modules/spring/src/test/java/org/apache/ignite/testsuites/IgniteSpringTestSuite.java b/modules/spring/src/test/java/org/apache/ignite/testsuites/IgniteSpringTestSuite.java index c16a045606c52..5c14b98529ff0 100644 --- a/modules/spring/src/test/java/org/apache/ignite/testsuites/IgniteSpringTestSuite.java +++ b/modules/spring/src/test/java/org/apache/ignite/testsuites/IgniteSpringTestSuite.java @@ -46,16 +46,18 @@ import org.apache.ignite.transactions.spring.GridSpringTransactionManagerSelfTest; import org.apache.ignite.transactions.spring.GridSpringTransactionManagerSpringBeanSelfTest; import org.apache.ignite.transactions.spring.SpringTransactionManagerContextInjectionTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Spring tests. */ -public class IgniteSpringTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteSpringTestSuite { /** * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new IgniteTestSuite("Spring Test Suite"); suite.addTest(new JUnit4TestAdapter(GridSpringBeanSerializationSelfTest.class)); diff --git a/modules/storm/src/test/java/org/apache/ignite/stream/storm/IgniteStormStreamerSelfTestSuite.java b/modules/storm/src/test/java/org/apache/ignite/stream/storm/IgniteStormStreamerSelfTestSuite.java index 638d729dd1f45..085b755aa42d4 100644 --- a/modules/storm/src/test/java/org/apache/ignite/stream/storm/IgniteStormStreamerSelfTestSuite.java +++ b/modules/storm/src/test/java/org/apache/ignite/stream/storm/IgniteStormStreamerSelfTestSuite.java @@ -19,11 +19,14 @@ import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Apache Storm streamer tests. */ -public class IgniteStormStreamerSelfTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteStormStreamerSelfTestSuite { /** * @return Test suite. */ diff --git a/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTestSuite.java b/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTestSuite.java index 7f17a46cc38cd..5a0730aab8b5d 100644 --- a/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTestSuite.java +++ b/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTestSuite.java @@ -19,11 +19,14 @@ import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Twitter streamer tests. */ -public class IgniteTwitterStreamerTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteTwitterStreamerTestSuite { /** * @return Twitter streamer tests suite. */ diff --git a/modules/urideploy/src/test/java/org/apache/ignite/testsuites/IgniteToolsSelfTestSuite.java b/modules/urideploy/src/test/java/org/apache/ignite/testsuites/IgniteToolsSelfTestSuite.java index 37d6e7c9db043..0cc6b170081ec 100644 --- a/modules/urideploy/src/test/java/org/apache/ignite/testsuites/IgniteToolsSelfTestSuite.java +++ b/modules/urideploy/src/test/java/org/apache/ignite/testsuites/IgniteToolsSelfTestSuite.java @@ -20,11 +20,14 @@ import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.tools.GridToolsSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Tools self-test suite. */ -public class IgniteToolsSelfTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteToolsSelfTestSuite { /** * @return Grid ant tasks tests suite. */ diff --git a/modules/web/src/test/java/org/apache/ignite/internal/websession/IgniteWebSessionSelfTestSuite.java b/modules/web/src/test/java/org/apache/ignite/internal/websession/IgniteWebSessionSelfTestSuite.java index 934d523c406ba..86ad9f54c322b 100644 --- a/modules/web/src/test/java/org/apache/ignite/internal/websession/IgniteWebSessionSelfTestSuite.java +++ b/modules/web/src/test/java/org/apache/ignite/internal/websession/IgniteWebSessionSelfTestSuite.java @@ -21,13 +21,16 @@ import junit.framework.TestSuite; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.IgniteTestSuite; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; import static org.apache.ignite.IgniteSystemProperties.IGNITE_OVERRIDE_MCAST_GRP; /** * Test suite for web sessions caching functionality. */ -public class IgniteWebSessionSelfTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteWebSessionSelfTestSuite { /** * @return Test suite. */ diff --git a/modules/yarn/src/test/java/org/apache/ignite/IgniteYarnTestSuite.java b/modules/yarn/src/test/java/org/apache/ignite/IgniteYarnTestSuite.java index d7b90c3b0e60a..f144dd60e6cf3 100644 --- a/modules/yarn/src/test/java/org/apache/ignite/IgniteYarnTestSuite.java +++ b/modules/yarn/src/test/java/org/apache/ignite/IgniteYarnTestSuite.java @@ -20,11 +20,14 @@ import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.yarn.IgniteApplicationMasterSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Apache Hadoop Yarn integration tests. */ -public class IgniteYarnTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteYarnTestSuite { /** * @return Test suite. */ From 4a24f84c608d2c8673973a1bc2443181f5fec40e Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Sun, 9 Dec 2018 17:14:44 +0300 Subject: [PATCH 090/176] IGNITE-10177 cleanup Junit 3 from the project - wip - cleanup // extends testsuite -- verified with diffs overview and rebuild --- .../IgniteLgplExamplesSelfTestSuite.java | 10 ++++++---- .../testsuites/IgniteExamplesJ8SelfTestSuite.java | 5 ++++- .../testsuites/IgniteExamplesMLTestSuite.java | 5 ++++- .../testsuites/IgniteExamplesSelfTestSuite.java | 5 ++++- .../IgniteExamplesSparkSelfTestSuite.java | 15 +++++++++------ .../ignite/testsuites/IgniteCacheTestSuite7.java | 2 +- .../testsuites/IgniteStreamSelfTestSuite.java | 2 +- .../testsuites/IgnitePdsNativeIoTestSuite.java | 5 ++++- .../testsuites/IgnitePdsNativeIoTestSuite2.java | 5 ++++- .../sink/flink/FlinkIgniteSinkSelfTestSuite.java | 5 ++++- .../ignite/stream/flume/IgniteSinkTestSuite.java | 5 ++++- .../ignite/testsuites/IgniteGCETestSuite.java | 5 ++++- .../testsuites/GeoSpatialIndexingTestSuite.java | 5 ++++- .../zeromq/IgniteZeroMqStreamerTestSuite.java | 5 ++++- .../zk/ZookeeperDiscoverySpiTestSuite1.java | 5 ++++- 15 files changed, 61 insertions(+), 23 deletions(-) diff --git a/examples/src/test/java-lgpl/org/apache/ignite/testsuites/IgniteLgplExamplesSelfTestSuite.java b/examples/src/test/java-lgpl/org/apache/ignite/testsuites/IgniteLgplExamplesSelfTestSuite.java index 3c9101a31594c..eaa3a846b66d2 100644 --- a/examples/src/test/java-lgpl/org/apache/ignite/testsuites/IgniteLgplExamplesSelfTestSuite.java +++ b/examples/src/test/java-lgpl/org/apache/ignite/testsuites/IgniteLgplExamplesSelfTestSuite.java @@ -23,18 +23,20 @@ import org.apache.ignite.examples.SpatialQueryExampleMultiNodeSelfTest; import org.apache.ignite.examples.SpatialQueryExampleSelfTest; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; import static org.apache.ignite.IgniteSystemProperties.IGNITE_OVERRIDE_MCAST_GRP; /** * Examples test suite.

    Contains only Spring ignite examples tests. */ -public class IgniteLgplExamplesSelfTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteLgplExamplesSelfTestSuite { /** * @return Suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { System.setProperty(IGNITE_OVERRIDE_MCAST_GRP, GridTestUtils.getNextMulticastGroup(IgniteLgplExamplesSelfTestSuite.class)); @@ -49,4 +51,4 @@ public static TestSuite suite() throws Exception { return suite; } -} \ No newline at end of file +} diff --git a/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesJ8SelfTestSuite.java b/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesJ8SelfTestSuite.java index f281ec57252bf..8d03c90bce7a1 100644 --- a/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesJ8SelfTestSuite.java +++ b/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesJ8SelfTestSuite.java @@ -27,6 +27,8 @@ import org.apache.ignite.examples.EventsExamplesSelfTest; import org.apache.ignite.examples.MessagingExamplesSelfTest; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; import static org.apache.ignite.IgniteSystemProperties.IGNITE_OVERRIDE_MCAST_GRP; @@ -35,7 +37,8 @@ *

    * Contains only Spring ignite examples tests. */ -public class IgniteExamplesJ8SelfTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteExamplesJ8SelfTestSuite { /** * @return Suite. * @throws Exception If failed. diff --git a/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesMLTestSuite.java b/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesMLTestSuite.java index 6b41301ccef50..6d7726c546bcd 100644 --- a/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesMLTestSuite.java +++ b/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesMLTestSuite.java @@ -33,6 +33,8 @@ import org.apache.ignite.examples.ml.util.MLExamplesCommonArgs; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridAbstractExamplesTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; import static org.apache.ignite.IgniteSystemProperties.IGNITE_OVERRIDE_MCAST_GRP; @@ -41,7 +43,8 @@ *

    * Contains only ML Grid Ignite examples tests.

    */ -public class IgniteExamplesMLTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteExamplesMLTestSuite { /** Base package to create test classes in. */ private static final String basePkgForTests = "org.apache.ignite.examples.ml"; diff --git a/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesSelfTestSuite.java b/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesSelfTestSuite.java index 7e847d7e05251..780ff213de69c 100644 --- a/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesSelfTestSuite.java +++ b/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesSelfTestSuite.java @@ -49,13 +49,16 @@ import org.apache.ignite.examples.SqlExamplesSelfTest; import org.apache.ignite.examples.TaskExamplesMultiNodeSelfTest; import org.apache.ignite.examples.TaskExamplesSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Examples test suite. *

    * Contains all Ignite examples tests.

    */ -public class IgniteExamplesSelfTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteExamplesSelfTestSuite { /** * @return Suite. * @throws Exception If failed. diff --git a/examples/src/test/spark/org/apache/ignite/spark/testsuites/IgniteExamplesSparkSelfTestSuite.java b/examples/src/test/spark/org/apache/ignite/spark/testsuites/IgniteExamplesSparkSelfTestSuite.java index 6328ee241a190..43a1198ce569f 100644 --- a/examples/src/test/spark/org/apache/ignite/spark/testsuites/IgniteExamplesSparkSelfTestSuite.java +++ b/examples/src/test/spark/org/apache/ignite/spark/testsuites/IgniteExamplesSparkSelfTestSuite.java @@ -17,11 +17,14 @@ package org.apache.ignite.spark.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.spark.examples.IgniteDataFrameSelfTest; import org.apache.ignite.spark.examples.JavaIgniteDataFrameSelfTest; import org.apache.ignite.spark.examples.SharedRDDExampleSelfTest; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; import static org.apache.ignite.IgniteSystemProperties.IGNITE_OVERRIDE_MCAST_GRP; @@ -30,20 +33,20 @@ *

    * Contains only Spring ignite examples tests. */ -public class IgniteExamplesSparkSelfTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteExamplesSparkSelfTestSuite { /** * @return Suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { System.setProperty(IGNITE_OVERRIDE_MCAST_GRP, GridTestUtils.getNextMulticastGroup(IgniteExamplesSparkSelfTestSuite.class)); TestSuite suite = new TestSuite("Ignite Spark Examples Test Suite"); - suite.addTest(new TestSuite(SharedRDDExampleSelfTest.class)); - suite.addTest(new TestSuite(IgniteDataFrameSelfTest.class)); - suite.addTest(new TestSuite(JavaIgniteDataFrameSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(SharedRDDExampleSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteDataFrameSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(JavaIgniteDataFrameSelfTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite7.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite7.java index c9a7680f1719d..f540afdcad21b 100755 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite7.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite7.java @@ -52,7 +52,7 @@ * Test suite. */ @RunWith(AllTests.class) -public class IgniteCacheTestSuite7 extends TestSuite { +public class IgniteCacheTestSuite7 { /** * @return IgniteCache test suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteStreamSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteStreamSelfTestSuite.java index 8197ecb450cd5..ab4650db5cffa 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteStreamSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteStreamSelfTestSuite.java @@ -28,7 +28,7 @@ * Stream test suite. */ @RunWith(AllTests.class) -public class IgniteStreamSelfTestSuite extends TestSuite { +public class IgniteStreamSelfTestSuite { /** * @return Stream tests suite. */ diff --git a/modules/direct-io/src/test/java/org/apache/ignite/testsuites/IgnitePdsNativeIoTestSuite.java b/modules/direct-io/src/test/java/org/apache/ignite/testsuites/IgnitePdsNativeIoTestSuite.java index b183860eea069..58ad24354901d 100644 --- a/modules/direct-io/src/test/java/org/apache/ignite/testsuites/IgnitePdsNativeIoTestSuite.java +++ b/modules/direct-io/src/test/java/org/apache/ignite/testsuites/IgnitePdsNativeIoTestSuite.java @@ -19,11 +19,14 @@ import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.persistence.file.IgniteNativeIoWithNoPersistenceTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Subset of {@link IgnitePdsTestSuite} suite test, started with direct-oi jar in classpath. */ -public class IgnitePdsNativeIoTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgnitePdsNativeIoTestSuite { /** * @return Suite. */ diff --git a/modules/direct-io/src/test/java/org/apache/ignite/testsuites/IgnitePdsNativeIoTestSuite2.java b/modules/direct-io/src/test/java/org/apache/ignite/testsuites/IgnitePdsNativeIoTestSuite2.java index ae4507c48d146..fee3c26b62b99 100644 --- a/modules/direct-io/src/test/java/org/apache/ignite/testsuites/IgnitePdsNativeIoTestSuite2.java +++ b/modules/direct-io/src/test/java/org/apache/ignite/testsuites/IgnitePdsNativeIoTestSuite2.java @@ -22,11 +22,14 @@ import org.apache.ignite.internal.processors.cache.persistence.IgniteNativeIoPdsRecoveryAfterFileCorruptionTest; import org.apache.ignite.internal.processors.cache.persistence.DiskPageCompressionIntegrationDirectIOTest; import org.apache.ignite.internal.processors.cache.persistence.db.wal.IgniteNativeIoWalFlushFsyncSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Same as {@link IgnitePdsTestSuite2} but is started with direct-oi jar in classpath. */ -public class IgnitePdsNativeIoTestSuite2 extends TestSuite { +@RunWith(AllTests.class) +public class IgnitePdsNativeIoTestSuite2 { /** * @return Suite. */ diff --git a/modules/flink/src/test/java/org/apache/ignite/sink/flink/FlinkIgniteSinkSelfTestSuite.java b/modules/flink/src/test/java/org/apache/ignite/sink/flink/FlinkIgniteSinkSelfTestSuite.java index c9ee957745917..3fee82ed95133 100644 --- a/modules/flink/src/test/java/org/apache/ignite/sink/flink/FlinkIgniteSinkSelfTestSuite.java +++ b/modules/flink/src/test/java/org/apache/ignite/sink/flink/FlinkIgniteSinkSelfTestSuite.java @@ -19,11 +19,14 @@ import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Apache Flink sink tests. */ -public class FlinkIgniteSinkSelfTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class FlinkIgniteSinkSelfTestSuite { /** * @return Test suite. */ diff --git a/modules/flume/src/test/java/org/apache/ignite/stream/flume/IgniteSinkTestSuite.java b/modules/flume/src/test/java/org/apache/ignite/stream/flume/IgniteSinkTestSuite.java index 091f633cca5f3..0cd52a7dcf769 100644 --- a/modules/flume/src/test/java/org/apache/ignite/stream/flume/IgniteSinkTestSuite.java +++ b/modules/flume/src/test/java/org/apache/ignite/stream/flume/IgniteSinkTestSuite.java @@ -19,11 +19,14 @@ import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Tests for a Flume sink for Ignite. */ -public class IgniteSinkTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteSinkTestSuite { /** * @return Test suite. */ diff --git a/modules/gce/src/test/java/org/apache/ignite/testsuites/IgniteGCETestSuite.java b/modules/gce/src/test/java/org/apache/ignite/testsuites/IgniteGCETestSuite.java index 23fa43f5501ab..d95748d36f42f 100644 --- a/modules/gce/src/test/java/org/apache/ignite/testsuites/IgniteGCETestSuite.java +++ b/modules/gce/src/test/java/org/apache/ignite/testsuites/IgniteGCETestSuite.java @@ -20,11 +20,14 @@ import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.spi.discovery.tcp.ipfinder.gce.TcpDiscoveryGoogleStorageIpFinderSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Google Compute Engine integration tests. */ -public class IgniteGCETestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteGCETestSuite { /** * @return Test suite. */ diff --git a/modules/geospatial/src/test/java/org/apache/ignite/testsuites/GeoSpatialIndexingTestSuite.java b/modules/geospatial/src/test/java/org/apache/ignite/testsuites/GeoSpatialIndexingTestSuite.java index 96c9cafec6185..67c06c265e6d9 100644 --- a/modules/geospatial/src/test/java/org/apache/ignite/testsuites/GeoSpatialIndexingTestSuite.java +++ b/modules/geospatial/src/test/java/org/apache/ignite/testsuites/GeoSpatialIndexingTestSuite.java @@ -21,11 +21,14 @@ import junit.framework.TestSuite; import org.apache.ignite.internal.processors.query.h2.H2IndexingGeoSelfTest; import org.apache.ignite.internal.processors.query.h2.H2IndexingSegmentedGeoSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Geospatial indexing tests. */ -public class GeoSpatialIndexingTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class GeoSpatialIndexingTestSuite { /** * @return Test suite. */ diff --git a/modules/zeromq/src/test/java/org/apache/ignite/stream/zeromq/IgniteZeroMqStreamerTestSuite.java b/modules/zeromq/src/test/java/org/apache/ignite/stream/zeromq/IgniteZeroMqStreamerTestSuite.java index 86a621036375d..0e806318afc8a 100644 --- a/modules/zeromq/src/test/java/org/apache/ignite/stream/zeromq/IgniteZeroMqStreamerTestSuite.java +++ b/modules/zeromq/src/test/java/org/apache/ignite/stream/zeromq/IgniteZeroMqStreamerTestSuite.java @@ -19,11 +19,14 @@ import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * ZeroMQ streamer tests. */ -public class IgniteZeroMqStreamerTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteZeroMqStreamerTestSuite { /** * @return ZeroMQ streamer tests suite. */ diff --git a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySpiTestSuite1.java b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySpiTestSuite1.java index d73544b096d94..ebed1a10fcf3c 100644 --- a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySpiTestSuite1.java +++ b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySpiTestSuite1.java @@ -27,11 +27,14 @@ import org.apache.zookeeper.jmx.MBeanRegistry; import org.apache.zookeeper.server.ZooKeeperServer; import org.apache.zookeeper.server.quorum.LearnerZooKeeperServer; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * */ -public class ZookeeperDiscoverySpiTestSuite1 extends TestSuite { +@RunWith(AllTests.class) +public class ZookeeperDiscoverySpiTestSuite1 { /** * During test suite processing GC can unload some classes whose bytecode has been rewritten here * {@link ByteCodeRewrite}. And the next time these classes will be loaded without bytecode rewriting. From 538df84499d6901c657bbfeda529d0edcf736a7b Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Sun, 9 Dec 2018 20:50:15 +0300 Subject: [PATCH 091/176] IGNITE-10177 cleanup Junit 3 from the project - wip - cleanup // IgnitePdsContinuousRestartTest -- verified with diffs overview and rebuild --- .../IgnitePdsContinuousRestartTest.java | 20 ++++++++++++++++++- .../testsuites/IgnitePdsTestSuite3.java | 5 +++-- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsContinuousRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsContinuousRestartTest.java index 1002c98a8a986..bae319e95b650 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsContinuousRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsContinuousRestartTest.java @@ -45,10 +45,14 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Cause by https://issues.apache.org/jira/browse/IGNITE-7278 */ +@RunWith(JUnit4.class) public class IgnitePdsContinuousRestartTest extends GridCommonAbstractTest { /** */ private static final int GRID_CNT = 4; @@ -74,7 +78,7 @@ public IgnitePdsContinuousRestartTest() { /** * @param cancel Cancel. */ - public IgnitePdsContinuousRestartTest(boolean cancel) { + protected IgnitePdsContinuousRestartTest(boolean cancel) { this.cancel = cancel; } @@ -129,6 +133,7 @@ public IgnitePdsContinuousRestartTest(boolean cancel) { /** * @throws Exception if failed. */ + @Test public void testRebalancingDuringLoad_1000_500_1_1() throws Exception { checkRebalancingDuringLoad(1000, 500, 1, 1); } @@ -136,6 +141,7 @@ public void testRebalancingDuringLoad_1000_500_1_1() throws Exception { /** * @throws Exception if failed. */ + @Test public void testRebalancingDuringLoad_8000_500_1_1() throws Exception { checkRebalancingDuringLoad(8000, 500, 1, 1); } @@ -143,6 +149,7 @@ public void testRebalancingDuringLoad_8000_500_1_1() throws Exception { /** * @throws Exception if failed. */ + @Test public void testRebalancingDuringLoad_1000_20000_1_1() throws Exception { checkRebalancingDuringLoad(1000, 20000, 1, 1); } @@ -150,6 +157,7 @@ public void testRebalancingDuringLoad_1000_20000_1_1() throws Exception { /** * @throws Exception if failed. */ + @Test public void testRebalancingDuringLoad_8000_8000_1_1() throws Exception { checkRebalancingDuringLoad(8000, 8000, 1, 1); } @@ -157,6 +165,7 @@ public void testRebalancingDuringLoad_8000_8000_1_1() throws Exception { /** * @throws Exception if failed. */ + @Test public void testRebalancingDuringLoad_1000_500_8_1() throws Exception { checkRebalancingDuringLoad(1000, 500, 8, 1); } @@ -164,6 +173,7 @@ public void testRebalancingDuringLoad_1000_500_8_1() throws Exception { /** * @throws Exception if failed. */ + @Test public void testRebalancingDuringLoad_8000_500_8_1() throws Exception { checkRebalancingDuringLoad(8000, 500, 8, 1); } @@ -171,6 +181,7 @@ public void testRebalancingDuringLoad_8000_500_8_1() throws Exception { /** * @throws Exception if failed. */ + @Test public void testRebalancingDuringLoad_1000_20000_8_1() throws Exception { checkRebalancingDuringLoad(1000, 20000, 8, 1); } @@ -178,6 +189,7 @@ public void testRebalancingDuringLoad_1000_20000_8_1() throws Exception { /** * @throws Exception if failed. */ + @Test public void testRebalancingDuringLoad_8000_8000_8_1() throws Exception { checkRebalancingDuringLoad(8000, 8000, 8, 1); } @@ -185,6 +197,7 @@ public void testRebalancingDuringLoad_8000_8000_8_1() throws Exception { /** * @throws Exception if failed. */ + @Test public void testRebalancingDuringLoad_1000_500_8_16() throws Exception { checkRebalancingDuringLoad(1000, 500, 8, 16); } @@ -192,6 +205,7 @@ public void testRebalancingDuringLoad_1000_500_8_16() throws Exception { /** * @throws Exception if failed. */ + @Test public void testRebalancingDuringLoad_8000_500_8_16() throws Exception { checkRebalancingDuringLoad(8000, 500, 8, 16); } @@ -199,6 +213,7 @@ public void testRebalancingDuringLoad_8000_500_8_16() throws Exception { /** * @throws Exception if failed. */ + @Test public void testRebalancingDuringLoad_1000_20000_8_16() throws Exception { checkRebalancingDuringLoad(1000, 20000, 8, 16); } @@ -206,6 +221,7 @@ public void testRebalancingDuringLoad_1000_20000_8_16() throws Exception { /** * @throws Exception if failed. */ + @Test public void testRebalancingDuringLoad_8000_8000_8_16() throws Exception { checkRebalancingDuringLoad(8000, 8000, 8, 16); } @@ -213,6 +229,7 @@ public void testRebalancingDuringLoad_8000_8000_8_16() throws Exception { /** * @throws Exception if failed. */ + @Test public void testRebalncingDuringLoad_10_10_1_1() throws Exception { checkRebalancingDuringLoad(10, 10, 1, 1); } @@ -220,6 +237,7 @@ public void testRebalncingDuringLoad_10_10_1_1() throws Exception { /** * @throws Exception if failed. */ + @Test public void testRebalncingDuringLoad_10_500_8_16() throws Exception { checkRebalancingDuringLoad(10, 500, 8, 16); } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite3.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite3.java index 30f571939a532..9a33a30e7d86e 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite3.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite3.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.persistence.IgnitePdsContinuousRestartTest; import org.apache.ignite.internal.processors.cache.persistence.IgnitePdsContinuousRestartTestWithExpiryPolicy; @@ -46,7 +47,7 @@ public static TestSuite suite() { */ private static void addRealPageStoreTestsNotForDirectIo(TestSuite suite) { // Rebalancing test - suite.addTestSuite(IgnitePdsContinuousRestartTest.class); - suite.addTestSuite(IgnitePdsContinuousRestartTestWithExpiryPolicy.class); + suite.addTest(new JUnit4TestAdapter(IgnitePdsContinuousRestartTest.class)); + suite.addTest(new JUnit4TestAdapter(IgnitePdsContinuousRestartTestWithExpiryPolicy.class)); } } From 1b342ee4c8c772b0e57583ee7f8721fc2c070bcf Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Mon, 10 Dec 2018 02:05:00 +0300 Subject: [PATCH 092/176] IGNITE-10177 cleanup Junit 3 from the project - wip - cleanup // WalCompactionTest, fixed by Ed Shangareev -- verified with diffs overview and rebuild --- .../persistence/db/wal/WalCompactionTest.java | 14 +++++++++++++- .../ignite/testsuites/IgnitePdsTestSuite2.java | 2 +- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalCompactionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalCompactionTest.java index db571c372525f..873f6be5462a1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalCompactionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalCompactionTest.java @@ -43,10 +43,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class WalCompactionTest extends GridCommonAbstractTest { /** Ip finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -108,7 +112,11 @@ public class WalCompactionTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected void afterTest() throws Exception { - stopAllGrids(); + Thread thread = new Thread(this::stopAllGrids); + + thread.start(); + + thread.join(getTestTimeout()); cleanPersistenceDir(); } @@ -123,6 +131,7 @@ public class WalCompactionTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testApplyingUpdatesFromCompactedWal() throws Exception { testApplyingUpdatesFromCompactedWal(false); } @@ -132,6 +141,7 @@ public void testApplyingUpdatesFromCompactedWal() throws Exception { * * @throws Exception If failed. */ + @Test public void testApplyingUpdatesFromCompactedWalWhenCompressorDisabled() throws Exception { testApplyingUpdatesFromCompactedWal(true); } @@ -248,6 +258,7 @@ else if (arr[i] != 1) { /** * */ + @Test public void testCompressorToleratesEmptyWalSegmentsFsync() throws Exception { testCompressorToleratesEmptyWalSegments(WALMode.FSYNC); } @@ -255,6 +266,7 @@ public void testCompressorToleratesEmptyWalSegmentsFsync() throws Exception { /** * */ + @Test public void testCompressorToleratesEmptyWalSegmentsLogOnly() throws Exception { testCompressorToleratesEmptyWalSegments(WALMode.LOG_ONLY); } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite2.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite2.java index 45ea056a5dc00..6565f21c23e10 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite2.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite2.java @@ -176,7 +176,7 @@ public static void addRealPageStoreTests(TestSuite suite) { suite.addTest(new JUnit4TestAdapter(IgniteWalSerializerVersionTest.class)); - suite.addTestSuite(WalCompactionTest.class); + suite.addTest(new JUnit4TestAdapter(WalCompactionTest.class)); suite.addTest(new JUnit4TestAdapter(WalDeletionArchiveFsyncTest.class)); suite.addTest(new JUnit4TestAdapter(WalDeletionArchiveLogOnlyTest.class)); From 441901cd4ce9f821a26728f44e806021357af761 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Mon, 10 Dec 2018 08:56:53 +0300 Subject: [PATCH 093/176] IGNITE-10175 migrate core modules tests from Junit 3 to 4 - wip - migrating // fixed error discovered by TC bot -- verified with diffs overview and rebuild --- .../ignite/internal/processors/igfs/IgfsFileInfoSelfTest.java | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsFileInfoSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsFileInfoSelfTest.java index 42c593c25e1f2..bd5e37d923194 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsFileInfoSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsFileInfoSelfTest.java @@ -69,7 +69,6 @@ public void testSerialization() throws Exception { * @param info Node info to test serialization for. * @throws IgniteCheckedException If failed. */ - @Test public void testSerialization(IgfsEntryInfo info) throws IgniteCheckedException { assertEquals(info, mu(info)); } From 21a8f26d2c824d3524b1df7b0d2ac281adbffa56 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Mon, 10 Dec 2018 13:28:59 +0300 Subject: [PATCH 094/176] IGNITE-10175 migrate core modules tests from Junit 3 to 4 - wip - migrating // fixed error discovered by TC bot in MVCC / nightly -- verified with diffs overview and rebuild --- ...erRWThroughDisabledTransactionalCacheTest.java | 2 ++ .../GridCacheInterceptorAbstractSelfTest.java | 15 +++++++++------ ...acheInterceptorTransactionalRebalanceTest.java | 4 +--- .../GridCacheMarshallingNodeJoinSelfTest.java | 2 ++ .../cache/GridCachePartitionedWritesTest.java | 4 +--- .../GridCacheStoreManagerDeserializationTest.java | 2 ++ ...GridCacheValueConsistencyAbstractSelfTest.java | 13 ++++++++----- ...gniteCacheInvokeReadThroughSingleNodeTest.java | 2 ++ .../cache/IgniteCacheInvokeReadThroughTest.java | 2 ++ .../IgniteCacheReadThroughStoreCallTest.java | 2 ++ .../IgniteCacheTxCopyOnReadDisabledTest.java | 4 +++- .../cache/IgniteCacheTxLocalPeekModesTest.java | 4 +++- .../cache/IgniteCacheTxLocalStoreValueTest.java | 4 +++- .../IgniteCacheTxNearEnabledStoreValueTest.java | 4 +++- .../cache/IgniteCacheTxStoreValueTest.java | 4 +++- .../CacheLoadingConcurrentGridStartSelfTest.java | 4 +--- .../CacheLockReleaseNodeLeaveTest.java | 4 +--- .../CacheTryLockMultithreadedTest.java | 7 +++++-- ...bstractPartitionedByteArrayValuesSelfTest.java | 7 ++----- .../GridCacheAbstractPrimarySyncSelfTest.java | 9 ++++++--- .../GridCacheClientModesAbstractSelfTest.java | 9 ++++++--- .../distributed/GridCacheEventAbstractTest.java | 4 ++-- .../GridCacheMultiNodeAbstractTest.java | 7 +++++-- .../GridCachePartitionNotLoadedEventSelfTest.java | 4 +--- .../GridCachePreloadEventsAbstractSelfTest.java | 4 +--- .../GridCachePreloadRestartAbstractSelfTest.java | 11 +++-------- ...IgniteCacheClientNodeChangingTopologyTest.java | 4 +--- ...acheAbstractTransformWriteThroughSelfTest.java | 4 ++-- .../dht/GridCacheDhtEntrySelfTest.java | 4 ++-- .../dht/GridCacheDhtMappingSelfTest.java | 4 +--- .../dht/GridCacheDhtPreloadDisabledSelfTest.java | 9 ++------- .../dht/IgniteCacheMultiTxLockSelfTest.java | 2 ++ .../near/GridCacheNearOnlyTopologySelfTest.java | 4 +--- .../GridCacheNearPartitionedClearSelfTest.java | 7 +------ .../near/GridCacheNearReaderPreloadSelfTest.java | 4 +--- .../near/GridCacheNearReadersSelfTest.java | 4 +--- .../near/GridCacheNearTxPreloadSelfTest.java | 4 +++- ...chePartitionedBasicStoreMultiNodeSelfTest.java | 10 +++++----- .../near/GridCachePartitionedEventSelfTest.java | 4 +++- ...artitionedExplicitLockNodeFailureSelfTest.java | 4 +--- .../GridCachePartitionedLoadCacheSelfTest.java | 4 +--- ...chePartitionedMvccTxMultiThreadedSelfTest.java | 7 +++---- .../near/GridNearCacheStoreUpdateTest.java | 11 +++-------- .../near/IgniteCacheNearOnlyTxTest.java | 2 ++ .../near/IgniteCacheNearReadCommittedTest.java | 2 ++ .../IgniteCacheTxLoaderWriterTest.java | 4 +++- .../IgniteCacheTxLocalLoadAllTest.java | 4 +++- ...IgniteCacheTxLocalNoLoadPreviousValueTest.java | 4 +++- .../IgniteCacheTxLocalNoReadThroughTest.java | 4 +++- .../IgniteCacheTxLocalNoWriteThroughTest.java | 4 +++- ...CacheTxNearEnabledNoLoadPreviousValueTest.java | 4 +++- ...gniteCacheTxNearEnabledNoWriteThroughTest.java | 4 +++- .../IgniteCacheTxNoLoadPreviousValueTest.java | 4 +++- .../IgniteCacheTxNoReadThroughTest.java | 4 +++- .../IgniteCacheTxNoWriteThroughTest.java | 4 +++- .../IgniteCacheTxStoreSessionTest.java | 2 ++ ...heTxStoreSessionWriteBehindCoalescingTest.java | 4 +++- .../IgniteCacheTxStoreSessionWriteBehindTest.java | 4 +++- .../local/GridCacheDaemonNodeLocalSelfTest.java | 6 +++--- .../GridCacheLocalByteArrayValuesSelfTest.java | 7 +++++-- .../cache/local/GridCacheLocalEventSelfTest.java | 6 +++--- .../GridCacheLocalIsolatedNodesSelfTest.java | 9 ++------- .../GridCacheLocalTxMultiThreadedSelfTest.java | 6 ++---- .../GridCacheLocalTxSingleThreadedSelfTest.java | 6 ++---- ...teBehindStorePartitionedMultiNodeSelfTest.java | 4 +--- ...teCacheClientWriteBehindStoreAbstractTest.java | 4 +--- .../TxRollbackAsyncNearCacheTest.java | 2 ++ ...eVersionedEntryLocalTransactionalSelfTest.java | 4 +++- 68 files changed, 178 insertions(+), 158 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreListenerRWThroughDisabledTransactionalCacheTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreListenerRWThroughDisabledTransactionalCacheTest.java index e2b658ca47010..0fa1994fd0606 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreListenerRWThroughDisabledTransactionalCacheTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreListenerRWThroughDisabledTransactionalCacheTest.java @@ -24,6 +24,7 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -42,6 +43,7 @@ @RunWith(JUnit4.class) public class CacheStoreListenerRWThroughDisabledTransactionalCacheTest extends CacheStoreSessionListenerReadWriteThroughDisabledAbstractTest { /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorAbstractSelfTest.java index 64690f29e3dcb..30d0a157c45aa 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorAbstractSelfTest.java @@ -73,6 +73,15 @@ public abstract class GridCacheInterceptorAbstractSelfTest extends GridCacheAbst /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { + interceptor = new Interceptor(); + + super.beforeTestsStarted(); + + awaitPartitionMapExchange(); + } + + /** {@inheritDoc} */ + @Override protected void beforeTest() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.INTERCEPTOR); if (nearEnabled()) @@ -80,12 +89,6 @@ public abstract class GridCacheInterceptorAbstractSelfTest extends GridCacheAbst if (storeEnabled()) MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); - - interceptor = new Interceptor(); - - super.beforeTestsStarted(); - - awaitPartitionMapExchange(); } /** {@inheritDoc} */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorTransactionalRebalanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorTransactionalRebalanceTest.java index d82b14d14fd2e..460ec0391ad46 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorTransactionalRebalanceTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorTransactionalRebalanceTest.java @@ -25,10 +25,8 @@ */ public class GridCacheInterceptorTransactionalRebalanceTest extends GridAbstractCacheInterceptorRebalanceTest { /** {@inheritDoc} */ - @Override protected void beforeTestsStarted() throws Exception { + @Override protected void beforeTest() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.INTERCEPTOR); - - super.beforeTestsStarted(); } /** {@inheritDoc} */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMarshallingNodeJoinSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMarshallingNodeJoinSelfTest.java index 241e27789307c..fd79334485540 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMarshallingNodeJoinSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMarshallingNodeJoinSelfTest.java @@ -42,6 +42,7 @@ import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -57,6 +58,7 @@ public class GridCacheMarshallingNodeJoinSelfTest extends GridCommonAbstractTest private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedWritesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedWritesTest.java index ef98c48c776af..9e4f251bf78b0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedWritesTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedWritesTest.java @@ -48,10 +48,8 @@ public class GridCachePartitionedWritesTest extends GridCommonAbstractTest { private CacheStore store; /** {@inheritDoc} */ - @Override protected void beforeTestsStarted() throws Exception { + @Override protected void beforeTest() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); - - super.beforeTestsStarted(); } /** {@inheritDoc} */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManagerDeserializationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManagerDeserializationTest.java index 243b42c75528c..e12675c1f6933 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManagerDeserializationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManagerDeserializationTest.java @@ -44,6 +44,7 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -72,6 +73,7 @@ public class GridCacheStoreManagerDeserializationTest extends GridCommonAbstract protected static final String CACHE_NAME = "cache_name"; /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueConsistencyAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueConsistencyAbstractSelfTest.java index d95c9c499e7db..6cb9d054d75d3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueConsistencyAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueConsistencyAbstractSelfTest.java @@ -74,11 +74,6 @@ public abstract class GridCacheValueConsistencyAbstractSelfTest extends GridCach /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { - MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); - - if (nearEnabled()) - MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); - // Need to increase value set in GridAbstractTest sizePropVal = System.getProperty(IGNITE_ATOMIC_CACHE_DELETE_HISTORY_SIZE); @@ -87,6 +82,14 @@ public abstract class GridCacheValueConsistencyAbstractSelfTest extends GridCach super.beforeTestsStarted(); } + /** {@inheritDoc} */ + @Override protected void beforeTest() throws Exception { + MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); + + if (nearEnabled()) + MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); + } + /** {@inheritDoc} */ @Override protected void afterTestsStopped() throws Exception { super.afterTestsStopped(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughSingleNodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughSingleNodeTest.java index c82e6175cfd5f..f8c01d4336ca1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughSingleNodeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughSingleNodeTest.java @@ -17,6 +17,7 @@ package org.apache.ignite.internal.processors.cache; +import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -36,6 +37,7 @@ @RunWith(JUnit4.class) public class IgniteCacheInvokeReadThroughSingleNodeTest extends IgniteCacheInvokeReadThroughAbstractTest { /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughTest.java index d2d21767c038d..051ca6312c4fd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughTest.java @@ -17,6 +17,7 @@ package org.apache.ignite.internal.processors.cache; +import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -35,6 +36,7 @@ @RunWith(JUnit4.class) public class IgniteCacheInvokeReadThroughTest extends IgniteCacheInvokeReadThroughAbstractTest { /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughStoreCallTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughStoreCallTest.java index ed22b3983eeaf..23037d9a4603d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughStoreCallTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughStoreCallTest.java @@ -45,6 +45,7 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.jetbrains.annotations.Nullable; +import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -70,6 +71,7 @@ public class IgniteCacheReadThroughStoreCallTest extends GridCommonAbstractTest protected boolean client; /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxCopyOnReadDisabledTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxCopyOnReadDisabledTest.java index 27bf171e20be7..da3226548a136 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxCopyOnReadDisabledTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxCopyOnReadDisabledTest.java @@ -19,6 +19,7 @@ import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.testframework.MvccFeatureChecker; +import org.junit.Before; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -27,6 +28,7 @@ */ public class IgniteCacheTxCopyOnReadDisabledTest extends IgniteCacheCopyOnReadDisabledAbstractTest { /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); @@ -36,4 +38,4 @@ public class IgniteCacheTxCopyOnReadDisabledTest extends IgniteCacheCopyOnReadDi @Override protected CacheAtomicityMode atomicityMode() { return TRANSACTIONAL; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxLocalPeekModesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxLocalPeekModesTest.java index 26dbb7e129a44..2fc36dd17a1db 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxLocalPeekModesTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxLocalPeekModesTest.java @@ -20,6 +20,7 @@ import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.cache.CacheMode; import org.apache.ignite.testframework.MvccFeatureChecker; +import org.junit.Before; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.LOCAL; @@ -29,6 +30,7 @@ */ public class IgniteCacheTxLocalPeekModesTest extends IgniteCachePeekModesAbstractTest { /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); @@ -49,4 +51,4 @@ public class IgniteCacheTxLocalPeekModesTest extends IgniteCachePeekModesAbstrac @Override protected CacheMode cacheMode() { return LOCAL; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxLocalStoreValueTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxLocalStoreValueTest.java index a25fd90c00b31..9783fba6db3b9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxLocalStoreValueTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxLocalStoreValueTest.java @@ -21,6 +21,7 @@ import org.apache.ignite.cache.CacheMode; import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.testframework.MvccFeatureChecker; +import org.junit.Before; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.LOCAL; @@ -30,6 +31,7 @@ */ public class IgniteCacheTxLocalStoreValueTest extends IgniteCacheStoreValueAbstractTest { /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); @@ -55,4 +57,4 @@ public class IgniteCacheTxLocalStoreValueTest extends IgniteCacheStoreValueAbstr @Override protected NearCacheConfiguration nearConfiguration() { return null; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxNearEnabledStoreValueTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxNearEnabledStoreValueTest.java index 4dc2cf3baa80f..787fa61163444 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxNearEnabledStoreValueTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxNearEnabledStoreValueTest.java @@ -19,12 +19,14 @@ import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.testframework.MvccFeatureChecker; +import org.junit.Before; /** * */ public class IgniteCacheTxNearEnabledStoreValueTest extends IgniteCacheTxStoreValueTest { /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); @@ -35,4 +37,4 @@ public class IgniteCacheTxNearEnabledStoreValueTest extends IgniteCacheTxStoreVa @Override protected NearCacheConfiguration nearConfiguration() { return new NearCacheConfiguration(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxStoreValueTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxStoreValueTest.java index f137e523e868a..782d7835772ed 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxStoreValueTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxStoreValueTest.java @@ -21,6 +21,7 @@ import org.apache.ignite.cache.CacheMode; import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.testframework.MvccFeatureChecker; +import org.junit.Before; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -30,6 +31,7 @@ */ public class IgniteCacheTxStoreValueTest extends IgniteCacheStoreValueAbstractTest { /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.INTERCEPTOR); @@ -55,4 +57,4 @@ public class IgniteCacheTxStoreValueTest extends IgniteCacheStoreValueAbstractTe @Override protected NearCacheConfiguration nearConfiguration() { return null; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLoadingConcurrentGridStartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLoadingConcurrentGridStartSelfTest.java index 187f0edb4fcf7..0ee78f2897100 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLoadingConcurrentGridStartSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLoadingConcurrentGridStartSelfTest.java @@ -87,10 +87,8 @@ public class CacheLoadingConcurrentGridStartSelfTest extends GridCommonAbstractT protected volatile boolean restarts; /** {@inheritDoc} */ - @Override protected void beforeTestsStarted() throws Exception { + @Override protected void beforeTest() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); - - super.beforeTestsStarted(); } /** {@inheritDoc} */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLockReleaseNodeLeaveTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLockReleaseNodeLeaveTest.java index 178bec7bd53e1..2d5f5fead7bac 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLockReleaseNodeLeaveTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLockReleaseNodeLeaveTest.java @@ -61,10 +61,8 @@ public class CacheLockReleaseNodeLeaveTest extends GridCommonAbstractTest { private static final String REPLICATED_TEST_CACHE = "REPLICATED_TEST_CACHE"; /** {@inheritDoc} */ - @Override public void beforeTestsStarted() throws Exception { + @Override public void beforeTest() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.ENTRY_LOCK); - - super.beforeTestsStarted(); } /** {@inheritDoc} */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheTryLockMultithreadedTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheTryLockMultithreadedTest.java index aa6bedde64ccc..59a97492524f1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheTryLockMultithreadedTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheTryLockMultithreadedTest.java @@ -73,8 +73,6 @@ public class CacheTryLockMultithreadedTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { - MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.ENTRY_LOCK); - super.beforeTestsStarted(); startGridsMultiThreaded(SRVS); @@ -84,6 +82,11 @@ public class CacheTryLockMultithreadedTest extends GridCommonAbstractTest { startGrid(SRVS); } + /** {@inheritDoc} */ + @Override protected void beforeTest() throws Exception { + MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.ENTRY_LOCK); + } + /** * @throws Exception If failed. */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPartitionedByteArrayValuesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPartitionedByteArrayValuesSelfTest.java index 0ee626213b3c4..1d6fdce8b2396 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPartitionedByteArrayValuesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPartitionedByteArrayValuesSelfTest.java @@ -32,13 +32,10 @@ */ public abstract class GridCacheAbstractPartitionedByteArrayValuesSelfTest extends GridCacheAbstractDistributedByteArrayValuesSelfTest { - /** {@inheritDoc} */ - @Override protected void beforeTestsStarted() throws Exception { + @Override protected void beforeTest() throws Exception { if (nearConfiguration() != null) MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); - - super.beforeTestsStarted(); } /** {@inheritDoc} */ @@ -71,4 +68,4 @@ public abstract class GridCacheAbstractPartitionedByteArrayValuesSelfTest extend * @return Distribution mode. */ protected abstract NearCacheConfiguration nearConfiguration(); -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPrimarySyncSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPrimarySyncSelfTest.java index 00debf975fecc..44fe61f25022d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPrimarySyncSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPrimarySyncSelfTest.java @@ -75,14 +75,17 @@ public abstract class GridCacheAbstractPrimarySyncSelfTest extends GridCommonAbs /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { - if (nearConfiguration() != null) - MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); - assert GRID_CNT > 1; startGrids(GRID_CNT); } + /** {@inheritDoc} */ + @Override protected void beforeTest() throws Exception { + if (nearConfiguration() != null) + MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); + } + /** * @return Distribution mode. */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientModesAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientModesAbstractSelfTest.java index 63c0594248b25..3ae07a2b1e606 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientModesAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientModesAbstractSelfTest.java @@ -56,9 +56,6 @@ public abstract class GridCacheClientModesAbstractSelfTest extends GridCacheAbst /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { - if (nearEnabled()) - MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); - gridCnt = new AtomicInteger(); super.beforeTestsStarted(); @@ -67,6 +64,12 @@ public abstract class GridCacheClientModesAbstractSelfTest extends GridCacheAbst grid(nearOnlyIgniteInstanceName).createNearCache(DEFAULT_CACHE_NAME, nearConfiguration()); } + /** {@inheritDoc} */ + @Override protected void beforeTest() throws Exception { + if (nearEnabled()) + MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); + } + /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEventAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEventAbstractTest.java index abaaa7e021b51..f921f178cc0c0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEventAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEventAbstractTest.java @@ -82,8 +82,6 @@ protected boolean partitioned() { /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { - MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_EVENTS); - super.beforeTestsStarted(); gridCnt = gridCount(); @@ -98,6 +96,8 @@ protected boolean partitioned() { @Override protected void beforeTest() throws Exception { super.beforeTest(); + MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_EVENTS); + if (TEST_INFO) info("Called beforeTest() callback."); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeAbstractTest.java index 1a9d9413913e8..89bc1668196f4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeAbstractTest.java @@ -92,8 +92,6 @@ public abstract class GridCacheMultiNodeAbstractTest extends GridCommonAbstractT /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { - MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_EVENTS); - ignite1 = startGrid(1); ignite2 = startGrid(2); ignite3 = startGrid(3); @@ -103,6 +101,11 @@ public abstract class GridCacheMultiNodeAbstractTest extends GridCommonAbstractT cache3 = ignite3.cache(DEFAULT_CACHE_NAME); } + /** {@inheritDoc} */ + @Override protected void beforeTest() throws Exception { + MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_EVENTS); + } + /** {@inheritDoc} */ @Override protected void afterTestsStopped() throws Exception { cache1 = null; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionNotLoadedEventSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionNotLoadedEventSelfTest.java index 7e4b583468003..931a6f3e58147 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionNotLoadedEventSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionNotLoadedEventSelfTest.java @@ -62,10 +62,8 @@ public class GridCachePartitionNotLoadedEventSelfTest extends GridCommonAbstract private int backupCnt; /** {@inheritDoc} */ - @Override public void beforeTestsStarted() throws Exception { + @Override public void beforeTest() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_EVENTS); - - super.beforeTestsStarted(); } /** {@inheritDoc} */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadEventsAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadEventsAbstractSelfTest.java index e28df0d5ced3a..056b72ae1d195 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadEventsAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadEventsAbstractSelfTest.java @@ -52,10 +52,8 @@ public abstract class GridCachePreloadEventsAbstractSelfTest extends GridCommonA private TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); /** {@inheritDoc} */ - @Override protected void beforeTestsStarted() throws Exception { + @Override protected void beforeTest() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_EVENTS); - - super.beforeTestsStarted(); } /** {@inheritDoc} */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadRestartAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadRestartAbstractSelfTest.java index 446243a37c14f..40be83fdd573b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadRestartAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadRestartAbstractSelfTest.java @@ -101,14 +101,6 @@ public abstract class GridCachePreloadRestartAbstractSelfTest extends GridCommon /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); - /** {@inheritDoc} */ - @Override protected void beforeTestsStarted() throws Exception { - if (nearEnabled()) - MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); - - super.beforeTestsStarted(); - } - /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration c = super.getConfiguration(igniteInstanceName); @@ -147,6 +139,9 @@ public abstract class GridCachePreloadRestartAbstractSelfTest extends GridCommon /** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { + if (nearEnabled()) + MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); + backups = DFLT_BACKUPS; partitions = DFLT_PARTITIONS; preloadMode = ASYNC; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeChangingTopologyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeChangingTopologyTest.java index f9d759b3496f1..0ac74d85863dd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeChangingTopologyTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeChangingTopologyTest.java @@ -147,10 +147,8 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac } /** {@inheritDoc} */ - @Override public void beforeTestsStarted() throws Exception { + @Override public void beforeTest() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.ENTRY_LOCK); - - super.beforeTestsStarted(); } /** {@inheritDoc} */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAbstractTransformWriteThroughSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAbstractTransformWriteThroughSelfTest.java index 2ba5073ee5424..d293577be660c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAbstractTransformWriteThroughSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAbstractTransformWriteThroughSelfTest.java @@ -137,8 +137,6 @@ public abstract class GridCacheAbstractTransformWriteThroughSelfTest extends Gri /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { - MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); - super.beforeTestsStarted(); for (int i = 0; i < GRID_CNT; i++) @@ -154,6 +152,8 @@ public abstract class GridCacheAbstractTransformWriteThroughSelfTest extends Gri /** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { + MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); + super.beforeTest(); for (GridCacheGenericTestStore store : stores) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEntrySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEntrySelfTest.java index 8b5a876ff6e6c..55f4709a81278 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEntrySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEntrySelfTest.java @@ -83,8 +83,6 @@ public class GridCacheDhtEntrySelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { - MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); - super.beforeTestsStarted(); startGridsMultiThreaded(GRID_CNT); @@ -93,6 +91,8 @@ public class GridCacheDhtEntrySelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @SuppressWarnings({"SizeReplaceableByIsEmpty"}) @Override protected void beforeTest() throws Exception { + MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); + for (int i = 0; i < GRID_CNT; i++) { assert near(grid(i)).size() == 0 : "Near cache size is not zero for grid: " + i; assert dht(grid(i)).size() == 0 : "DHT cache size is not zero for grid: " + i; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtMappingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtMappingSelfTest.java index 0cfbf9bf01a21..813a55d8742c2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtMappingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtMappingSelfTest.java @@ -49,10 +49,8 @@ public class GridCacheDhtMappingSelfTest extends GridCommonAbstractTest { private TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); /** {@inheritDoc} */ - @Override protected void beforeTestsStarted() throws Exception { + @Override protected void beforeTest() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); - - super.beforeTestsStarted(); } /** {@inheritDoc} */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadDisabledSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadDisabledSelfTest.java index 98afe7052eea6..97a8815ced2fb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadDisabledSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadDisabledSelfTest.java @@ -78,13 +78,6 @@ public class GridCacheDhtPreloadDisabledSelfTest extends GridCommonAbstractTest /** IP finder. */ private TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); - /** {@inheritDoc} */ - @Override protected void beforeTestsStarted() throws Exception { - MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); - - super.beforeTestsStarted(); - } - /** * */ @@ -119,6 +112,8 @@ public GridCacheDhtPreloadDisabledSelfTest() { /** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { + MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); + backups = DFLT_BACKUPS; partitions = DFLT_PARTITIONS; } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheMultiTxLockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheMultiTxLockSelfTest.java index da237baf581b6..50b8db753cce9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheMultiTxLockSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheMultiTxLockSelfTest.java @@ -36,6 +36,7 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -65,6 +66,7 @@ public class IgniteCacheMultiTxLockSelfTest extends GridCommonAbstractTest { private volatile Throwable err; /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.ENTRY_LOCK); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyTopologySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyTopologySelfTest.java index f2568d21f6b5b..024a7581bd388 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyTopologySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyTopologySelfTest.java @@ -61,10 +61,8 @@ public class GridCacheNearOnlyTopologySelfTest extends GridCommonAbstractTest { private boolean cache = true; /** {@inheritDoc} */ - @Override protected void beforeTestsStarted() throws Exception { + @Override protected void beforeTest() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); - - super.beforeTestsStarted(); } /** {@inheritDoc} */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearPartitionedClearSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearPartitionedClearSelfTest.java index 89d208bfb4a5e..0dbd6228ce986 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearPartitionedClearSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearPartitionedClearSelfTest.java @@ -62,14 +62,9 @@ public class GridCacheNearPartitionedClearSelfTest extends GridCommonAbstractTes private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); /** {@inheritDoc} */ - @Override protected void beforeTestsStarted() throws Exception { + @Override protected void beforeTest() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); - super.beforeTestsStarted(); - } - - /** {@inheritDoc} */ - @Override protected void beforeTest() throws Exception { startGrids(GRID_CNT); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReaderPreloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReaderPreloadSelfTest.java index 45df1b5f82bee..e085bfbbc331a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReaderPreloadSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReaderPreloadSelfTest.java @@ -67,10 +67,8 @@ public class GridCacheNearReaderPreloadSelfTest extends GridCommonAbstractTest { private IgniteCache cache3; /** {@inheritDoc} */ - @Override public void beforeTestsStarted() throws Exception { + @Override public void beforeTest() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); - - super.beforeTestsStarted(); } /** {@inheritDoc} */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReadersSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReadersSelfTest.java index d39a2b69ba4f4..98604394c14a1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReadersSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReadersSelfTest.java @@ -78,10 +78,8 @@ public class GridCacheNearReadersSelfTest extends GridCommonAbstractTest { private GridCacheModuloAffinityFunction aff = new GridCacheModuloAffinityFunction(); /** {@inheritDoc} */ - @Override protected void beforeTestsStarted() throws Exception { + @Override protected void beforeTest() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); - - super.beforeTestsStarted(); } /** {@inheritDoc} */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearTxPreloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearTxPreloadSelfTest.java index 96b932a4a73d0..db2a591128f33 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearTxPreloadSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearTxPreloadSelfTest.java @@ -22,6 +22,7 @@ import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.internal.processors.cache.distributed.IgniteTxPreloadAbstractTest; import org.apache.ignite.testframework.MvccFeatureChecker; +import org.junit.Before; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -30,6 +31,7 @@ */ public class GridCacheNearTxPreloadSelfTest extends IgniteTxPreloadAbstractTest { /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); @@ -50,4 +52,4 @@ public class GridCacheNearTxPreloadSelfTest extends IgniteTxPreloadAbstractTest return cfg; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedBasicStoreMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedBasicStoreMultiNodeSelfTest.java index a3db33f1cc5e6..6234019128c7c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedBasicStoreMultiNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedBasicStoreMultiNodeSelfTest.java @@ -62,6 +62,11 @@ public class GridCachePartitionedBasicStoreMultiNodeSelfTest extends GridCommonA /** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { + MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); + + if (nearCacheConfiguration() != null) + MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); + for (GridCacheTestStore store : stores) store.resetTimestamp(); } @@ -77,11 +82,6 @@ public class GridCachePartitionedBasicStoreMultiNodeSelfTest extends GridCommonA /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { - MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); - - if (nearCacheConfiguration() != null) - MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); - super.beforeTestsStarted(); stores = Collections.synchronizedList(new ArrayList()); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedEventSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedEventSelfTest.java index 54eb32d3f1ce6..681afffd8e544 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedEventSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedEventSelfTest.java @@ -22,6 +22,7 @@ import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.internal.processors.cache.distributed.GridCacheEventAbstractTest; import org.apache.ignite.testframework.MvccFeatureChecker; +import org.junit.Before; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -32,6 +33,7 @@ */ public class GridCachePartitionedEventSelfTest extends GridCacheEventAbstractTest { /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_EVENTS); @@ -65,4 +67,4 @@ public class GridCachePartitionedEventSelfTest extends GridCacheEventAbstractTes @Override protected boolean partitioned() { return true; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedExplicitLockNodeFailureSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedExplicitLockNodeFailureSelfTest.java index ef0b4ab9684da..832767b03acbe 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedExplicitLockNodeFailureSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedExplicitLockNodeFailureSelfTest.java @@ -56,10 +56,8 @@ public class GridCachePartitionedExplicitLockNodeFailureSelfTest extends GridCom public static final int GRID_CNT = 4; /** {@inheritDoc} */ - @Override public void beforeTestsStarted() throws Exception { + @Override public void beforeTest() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.ENTRY_LOCK); - - super.beforeTestsStarted(); } /** {@inheritDoc} */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedLoadCacheSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedLoadCacheSelfTest.java index 5a841153b578d..c6ae952294484 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedLoadCacheSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedLoadCacheSelfTest.java @@ -54,10 +54,8 @@ public class GridCachePartitionedLoadCacheSelfTest extends GridCommonAbstractTes private static final int PUT_CNT = 100; /** {@inheritDoc} */ - @Override public void beforeTestsStarted() throws Exception { + @Override public void beforeTest() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); - - super.beforeTestsStarted(); } /** {@inheritDoc} */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMvccTxMultiThreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMvccTxMultiThreadedSelfTest.java index 184132ef5f16e..0034330865e67 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMvccTxMultiThreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMvccTxMultiThreadedSelfTest.java @@ -30,11 +30,10 @@ * Tests for partitioned cache transactions. */ public class GridCachePartitionedMvccTxMultiThreadedSelfTest extends IgniteMvccTxMultiThreadedAbstractTest { - @Override protected void beforeTestsStarted() throws Exception { + /** {@inheritDoc} */ + @Override protected void beforeTest() throws Exception { if (nearEnabled()) MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); - - super.beforeTestsStarted(); } /** {@inheritDoc} */ @@ -98,4 +97,4 @@ protected boolean nearEnabled() { @Override protected boolean printMemoryStats() { return true; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheStoreUpdateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheStoreUpdateTest.java index c1f279cdfbd71..6a70afa6dcaba 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheStoreUpdateTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheStoreUpdateTest.java @@ -64,14 +64,6 @@ public class GridNearCacheStoreUpdateTest extends GridCommonAbstractTest { /** */ private IgniteCache cache; - /** {@inheritDoc} */ - @Override protected void beforeTestsStarted() throws Exception { - MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); - MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); - - super.beforeTestsStarted(); - } - /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(final String gridName) throws Exception { final IgniteConfiguration cfg = super.getConfiguration(gridName); @@ -84,6 +76,9 @@ public class GridNearCacheStoreUpdateTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { + MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); + MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); + srv = startGrid("server"); client = startGrid("client"); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearOnlyTxTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearOnlyTxTest.java index 6939eb376694e..7fda3ec195808 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearOnlyTxTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearOnlyTxTest.java @@ -31,6 +31,7 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.transactions.Transaction; +import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -46,6 +47,7 @@ @RunWith(JUnit4.class) public class IgniteCacheNearOnlyTxTest extends IgniteCacheAbstractTest { /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearReadCommittedTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearReadCommittedTest.java index 3a1a55d5805f3..0112c06ad23c2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearReadCommittedTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearReadCommittedTest.java @@ -24,6 +24,7 @@ import org.apache.ignite.internal.processors.cache.GridCacheAbstractSelfTest; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.transactions.Transaction; +import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -39,6 +40,7 @@ @RunWith(JUnit4.class) public class IgniteCacheNearReadCommittedTest extends GridCacheAbstractSelfTest { /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLoaderWriterTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLoaderWriterTest.java index 75a4cd93fb478..fb77b8790d0ea 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLoaderWriterTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLoaderWriterTest.java @@ -21,6 +21,7 @@ import org.apache.ignite.cache.CacheMode; import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.testframework.MvccFeatureChecker; +import org.junit.Before; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -30,6 +31,7 @@ */ public class IgniteCacheTxLoaderWriterTest extends IgniteCacheLoaderWriterAbstractTest { /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); @@ -55,4 +57,4 @@ public class IgniteCacheTxLoaderWriterTest extends IgniteCacheLoaderWriterAbstra @Override protected NearCacheConfiguration nearConfiguration() { return null; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalLoadAllTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalLoadAllTest.java index 645a9ff3ad2c5..240e6f90ee461 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalLoadAllTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalLoadAllTest.java @@ -21,6 +21,7 @@ import org.apache.ignite.cache.CacheMode; import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.testframework.MvccFeatureChecker; +import org.junit.Before; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.LOCAL; @@ -30,6 +31,7 @@ */ public class IgniteCacheTxLocalLoadAllTest extends IgniteCacheLoadAllAbstractTest { /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); @@ -54,4 +56,4 @@ public class IgniteCacheTxLocalLoadAllTest extends IgniteCacheLoadAllAbstractTes @Override protected NearCacheConfiguration nearConfiguration() { return null; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoLoadPreviousValueTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoLoadPreviousValueTest.java index 2e52a63a3aac3..82ac79163ce47 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoLoadPreviousValueTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoLoadPreviousValueTest.java @@ -21,6 +21,7 @@ import org.apache.ignite.cache.CacheMode; import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.testframework.MvccFeatureChecker; +import org.junit.Before; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.LOCAL; @@ -30,6 +31,7 @@ */ public class IgniteCacheTxLocalNoLoadPreviousValueTest extends IgniteCacheNoLoadPreviousValueAbstractTest { /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); @@ -55,4 +57,4 @@ public class IgniteCacheTxLocalNoLoadPreviousValueTest extends IgniteCacheNoLoad @Override protected NearCacheConfiguration nearConfiguration() { return null; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoReadThroughTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoReadThroughTest.java index e25a96516c9e2..2b42ac59773a5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoReadThroughTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoReadThroughTest.java @@ -21,6 +21,7 @@ import org.apache.ignite.cache.CacheMode; import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.testframework.MvccFeatureChecker; +import org.junit.Before; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.LOCAL; @@ -30,6 +31,7 @@ */ public class IgniteCacheTxLocalNoReadThroughTest extends IgniteCacheNoReadThroughAbstractTest { /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); @@ -55,4 +57,4 @@ public class IgniteCacheTxLocalNoReadThroughTest extends IgniteCacheNoReadThroug @Override protected NearCacheConfiguration nearConfiguration() { return null; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoWriteThroughTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoWriteThroughTest.java index ddc9352655758..515f01bf982d3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoWriteThroughTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoWriteThroughTest.java @@ -21,6 +21,7 @@ import org.apache.ignite.cache.CacheMode; import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.testframework.MvccFeatureChecker; +import org.junit.Before; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.LOCAL; @@ -30,6 +31,7 @@ */ public class IgniteCacheTxLocalNoWriteThroughTest extends IgniteCacheNoWriteThroughAbstractTest { /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); @@ -55,4 +57,4 @@ public class IgniteCacheTxLocalNoWriteThroughTest extends IgniteCacheNoWriteThro @Override protected NearCacheConfiguration nearConfiguration() { return null; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNearEnabledNoLoadPreviousValueTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNearEnabledNoLoadPreviousValueTest.java index c343402c5769d..f5f89c517587e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNearEnabledNoLoadPreviousValueTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNearEnabledNoLoadPreviousValueTest.java @@ -19,12 +19,14 @@ import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.testframework.MvccFeatureChecker; +import org.junit.Before; /** * */ public class IgniteCacheTxNearEnabledNoLoadPreviousValueTest extends IgniteCacheTxNoLoadPreviousValueTest { /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); @@ -35,4 +37,4 @@ public class IgniteCacheTxNearEnabledNoLoadPreviousValueTest extends IgniteCache @Override protected NearCacheConfiguration nearConfiguration() { return new NearCacheConfiguration(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNearEnabledNoWriteThroughTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNearEnabledNoWriteThroughTest.java index be9bc343f09c5..5ed67db972632 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNearEnabledNoWriteThroughTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNearEnabledNoWriteThroughTest.java @@ -19,12 +19,14 @@ import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.testframework.MvccFeatureChecker; +import org.junit.Before; /** * */ public class IgniteCacheTxNearEnabledNoWriteThroughTest extends IgniteCacheTxNoWriteThroughTest { /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); @@ -35,4 +37,4 @@ public class IgniteCacheTxNearEnabledNoWriteThroughTest extends IgniteCacheTxNoW @Override protected NearCacheConfiguration nearConfiguration() { return new NearCacheConfiguration(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNoLoadPreviousValueTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNoLoadPreviousValueTest.java index 094aa1a2c857f..bee02ca0680f8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNoLoadPreviousValueTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNoLoadPreviousValueTest.java @@ -21,6 +21,7 @@ import org.apache.ignite.cache.CacheMode; import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.testframework.MvccFeatureChecker; +import org.junit.Before; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -30,6 +31,7 @@ */ public class IgniteCacheTxNoLoadPreviousValueTest extends IgniteCacheNoLoadPreviousValueAbstractTest { /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); @@ -55,4 +57,4 @@ public class IgniteCacheTxNoLoadPreviousValueTest extends IgniteCacheNoLoadPrevi @Override protected NearCacheConfiguration nearConfiguration() { return null; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNoReadThroughTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNoReadThroughTest.java index a94caff0935a7..915350d756f52 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNoReadThroughTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNoReadThroughTest.java @@ -21,6 +21,7 @@ import org.apache.ignite.cache.CacheMode; import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.testframework.MvccFeatureChecker; +import org.junit.Before; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -30,6 +31,7 @@ */ public class IgniteCacheTxNoReadThroughTest extends IgniteCacheNoReadThroughAbstractTest { /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); @@ -55,4 +57,4 @@ public class IgniteCacheTxNoReadThroughTest extends IgniteCacheNoReadThroughAbst @Override protected NearCacheConfiguration nearConfiguration() { return null; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNoWriteThroughTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNoWriteThroughTest.java index e984dfb4ba11c..a54d7ae65ab14 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNoWriteThroughTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNoWriteThroughTest.java @@ -21,6 +21,7 @@ import org.apache.ignite.cache.CacheMode; import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.testframework.MvccFeatureChecker; +import org.junit.Before; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -30,6 +31,7 @@ */ public class IgniteCacheTxNoWriteThroughTest extends IgniteCacheNoWriteThroughAbstractTest { /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); @@ -55,4 +57,4 @@ public class IgniteCacheTxNoWriteThroughTest extends IgniteCacheNoWriteThroughAb @Override protected NearCacheConfiguration nearConfiguration() { return null; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionTest.java index 741dd2a37d438..0fd51ab0e8a71 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionTest.java @@ -29,6 +29,7 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -44,6 +45,7 @@ @RunWith(JUnit4.class) public class IgniteCacheTxStoreSessionTest extends IgniteCacheStoreSessionAbstractTest { /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionWriteBehindCoalescingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionWriteBehindCoalescingTest.java index ea2b8a3cc42de..12f827bbb64a4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionWriteBehindCoalescingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionWriteBehindCoalescingTest.java @@ -23,6 +23,7 @@ import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.testframework.MvccFeatureChecker; +import org.junit.Before; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -32,6 +33,7 @@ */ public class IgniteCacheTxStoreSessionWriteBehindCoalescingTest extends IgniteCacheStoreSessionWriteBehindAbstractTest { /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); @@ -93,4 +95,4 @@ private class TestNonCoalescingStore extends TestStore { entLatch.countDown(); } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionWriteBehindTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionWriteBehindTest.java index ae6bcae84d9b2..c57caaa889291 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionWriteBehindTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionWriteBehindTest.java @@ -19,6 +19,7 @@ import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.testframework.MvccFeatureChecker; +import org.junit.Before; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -27,6 +28,7 @@ */ public class IgniteCacheTxStoreSessionWriteBehindTest extends IgniteCacheStoreSessionWriteBehindAbstractTest { /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); @@ -37,4 +39,4 @@ public class IgniteCacheTxStoreSessionWriteBehindTest extends IgniteCacheStoreSe @Override protected CacheAtomicityMode atomicityMode() { return TRANSACTIONAL; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheDaemonNodeLocalSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheDaemonNodeLocalSelfTest.java index aa63fe67abb7b..c1ad352c9b4d9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheDaemonNodeLocalSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheDaemonNodeLocalSelfTest.java @@ -28,14 +28,14 @@ */ public class GridCacheDaemonNodeLocalSelfTest extends GridCacheDaemonNodeAbstractSelfTest { /** {@inheritDoc} */ - @Override protected void beforeTestsStarted() throws Exception { + @Override protected void beforeTest() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); - super.beforeTestsStarted(); + super.beforeTest(); } /** {@inheritDoc} */ @Override protected CacheMode cacheMode() { return LOCAL; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalByteArrayValuesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalByteArrayValuesSelfTest.java index 1ceae7a2d3113..005222645b6a1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalByteArrayValuesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalByteArrayValuesSelfTest.java @@ -72,13 +72,16 @@ public class GridCacheLocalByteArrayValuesSelfTest extends GridCacheAbstractByte /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { - MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); - ignite = startGrid(1); cache = ignite.cache(CACHE_REGULAR); } + /** {@inheritDoc} */ + @Override protected void beforeTest() throws Exception { + MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); + } + /** {@inheritDoc} */ @Override protected void afterTestsStopped() throws Exception { cache = null; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalEventSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalEventSelfTest.java index 716e5dd510f2e..02439d809afea 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalEventSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalEventSelfTest.java @@ -28,11 +28,11 @@ */ public class GridCacheLocalEventSelfTest extends GridCacheEventAbstractTest { /** {@inheritDoc} */ - @Override public void beforeTestsStarted() throws Exception { + @Override public void beforeTest() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_EVENTS); - super.beforeTestsStarted(); + super.beforeTest(); } /** {@inheritDoc} */ @@ -44,4 +44,4 @@ public class GridCacheLocalEventSelfTest extends GridCacheEventAbstractTest { @Override protected int gridCount() { return 1; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalIsolatedNodesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalIsolatedNodesSelfTest.java index 521c2bd64be54..31d7170e305cb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalIsolatedNodesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalIsolatedNodesSelfTest.java @@ -36,13 +36,6 @@ */ @RunWith(JUnit4.class) public class GridCacheLocalIsolatedNodesSelfTest extends GridCommonAbstractTest { - /** {@inheritDoc} */ - @Override protected void beforeTestsStarted() throws Exception { - MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); - - super.beforeTestsStarted(); - } - /** * */ @@ -52,6 +45,8 @@ public GridCacheLocalIsolatedNodesSelfTest() { /** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { + MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); + startGrids(3); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxMultiThreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxMultiThreadedSelfTest.java index 816168f0a0007..5babd8fa3457b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxMultiThreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxMultiThreadedSelfTest.java @@ -35,10 +35,8 @@ public class GridCacheLocalTxMultiThreadedSelfTest extends IgniteTxMultiThreaded private static final boolean CACHE_DEBUG = false; /** {@inheritDoc} */ - @Override protected void beforeTestsStarted() throws Exception { + @Override protected void beforeTest() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); - - super.beforeTestsStarted(); } /** {@inheritDoc} */ @@ -98,4 +96,4 @@ public class GridCacheLocalTxMultiThreadedSelfTest extends IgniteTxMultiThreaded @Override protected boolean printMemoryStats() { return true; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxSingleThreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxSingleThreadedSelfTest.java index 27ce919043ffc..5727c57d15516 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxSingleThreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxSingleThreadedSelfTest.java @@ -32,10 +32,8 @@ */ public class GridCacheLocalTxSingleThreadedSelfTest extends IgniteTxSingleThreadedAbstractTest { /** {@inheritDoc} */ - @Override public void beforeTestsStarted() throws Exception { + @Override public void beforeTest() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); - - super.beforeTestsStarted(); } /** Cache debug flag. */ @@ -92,4 +90,4 @@ public class GridCacheLocalTxSingleThreadedSelfTest extends IgniteTxSingleThread @Override protected boolean printMemoryStats() { return true; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStorePartitionedMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStorePartitionedMultiNodeSelfTest.java index 1ce2ba4fb6deb..85711f7a11689 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStorePartitionedMultiNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStorePartitionedMultiNodeSelfTest.java @@ -98,10 +98,8 @@ public class GridCacheWriteBehindStorePartitionedMultiNodeSelfTest extends GridC } /** {@inheritDoc} */ - @Override protected void beforeTestsStarted() throws Exception { + @Override protected void beforeTest() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); - - super.beforeTestsStarted(); } /** {@inheritDoc} */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/IgnteCacheClientWriteBehindStoreAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/IgnteCacheClientWriteBehindStoreAbstractTest.java index 57e97b4d40286..706c48ff46e40 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/IgnteCacheClientWriteBehindStoreAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/IgnteCacheClientWriteBehindStoreAbstractTest.java @@ -39,10 +39,8 @@ @RunWith(JUnit4.class) public abstract class IgnteCacheClientWriteBehindStoreAbstractTest extends IgniteCacheAbstractTest { /** {@inheritDoc} */ - @Override protected void beforeTestsStarted() throws Exception { + @Override protected void beforeTest() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); - - super.beforeTestsStarted(); } /** {@inheritDoc} */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackAsyncNearCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackAsyncNearCacheTest.java index dc115e1dc62d6..8a5aad43ba025 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackAsyncNearCacheTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackAsyncNearCacheTest.java @@ -18,6 +18,7 @@ package org.apache.ignite.internal.processors.cache.transactions; import org.apache.ignite.testframework.MvccFeatureChecker; +import org.junit.Before; /** * Tests an ability to async rollback near transactions. @@ -29,6 +30,7 @@ public class TxRollbackAsyncNearCacheTest extends TxRollbackAsyncTest { } /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryLocalTransactionalSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryLocalTransactionalSelfTest.java index b217703f28a6a..81b018acee4e7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryLocalTransactionalSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryLocalTransactionalSelfTest.java @@ -20,6 +20,7 @@ import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.cache.CacheMode; import org.apache.ignite.testframework.MvccFeatureChecker; +import org.junit.Before; /** * @@ -41,10 +42,11 @@ public class CacheVersionedEntryLocalTransactionalSelfTest extends CacheVersione } /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); super.setUp(); } -} \ No newline at end of file +} From a369bb6170a538b91dee047ce47d91ac06262959 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Mon, 10 Dec 2018 14:32:23 +0300 Subject: [PATCH 095/176] IGNITE-10175 migrate core modules tests from Junit 3 to 4 - wip - migrating // fixed error discovered by TC bot in MVCC / nightly -- verified with diffs overview and rebuild --- .../processors/cache/CacheEventWithTxLabelTest.java | 9 ++++++--- ...idCacheAtomicEntryProcessorDeploymentSelfTest.java | 4 +--- ...gniteDynamicCacheStartFailWithPersistenceTest.java | 9 ++++++--- .../distributed/GridCacheBasicOpAbstractTest.java | 10 +++++----- ...cheWriteSynchronizationModesMultithreadedTest.java | 9 ++++++--- .../dht/IgniteCacheClearDuringRebalanceTest.java | 4 +--- .../paged/PageEvictionMultinodeAbstractTest.java | 9 ++++++--- .../transactions/TxRollbackOnIncorrectParamsTest.java | 4 +--- .../cache/transactions/TxRollbackOnTimeoutTest.java | 11 +++-------- 9 files changed, 35 insertions(+), 34 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheEventWithTxLabelTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheEventWithTxLabelTest.java index e195902969485..277a15babe8be 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheEventWithTxLabelTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheEventWithTxLabelTest.java @@ -110,9 +110,6 @@ public class CacheEventWithTxLabelTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { - if (MvccFeatureChecker.forcedMvcc()) - fail("https://issues.apache.org/jira/browse/IGNITE-10270"); - super.beforeTestsStarted(); client = false; @@ -130,6 +127,12 @@ public class CacheEventWithTxLabelTest extends GridCommonAbstractTest { registerEventListeners(primary(), backup1(), backup2(), client()); } + /** {@inheritDoc} */ + @Override protected void beforeTest() throws Exception { + if (MvccFeatureChecker.forcedMvcc()) + fail("https://issues.apache.org/jira/browse/IGNITE-10270"); + } + /** {@inheritDoc} */ @Override protected void afterTestsStopped() throws Exception { super.afterTestsStopped(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicEntryProcessorDeploymentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicEntryProcessorDeploymentSelfTest.java index caf1f8b7e02a9..7a7e7813f1d4e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicEntryProcessorDeploymentSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicEntryProcessorDeploymentSelfTest.java @@ -60,14 +60,12 @@ public class GridCacheAtomicEntryProcessorDeploymentSelfTest extends GridCommonA protected boolean clientMode; /** {@inheritDoc} */ - @Override protected void beforeTestsStarted() throws Exception { + @Override protected void beforeTest() throws Exception { if (MvccFeatureChecker.forcedMvcc()) { assert atomicityMode() != ATOMIC; fail("https://issues.apache.org/jira/browse/IGNITE-10359"); } - - super.beforeTestsStarted(); } /** {@inheritDoc} */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartFailWithPersistenceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartFailWithPersistenceTest.java index 4826119b87638..d41dddfd3bdfe 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartFailWithPersistenceTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartFailWithPersistenceTest.java @@ -58,9 +58,6 @@ public class IgniteDynamicCacheStartFailWithPersistenceTest extends IgniteAbstra /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { - if (MvccFeatureChecker.forcedMvcc()) - fail("https://issues.apache.org/jira/browse/IGNITE-10421"); - cleanPersistenceDir(); startGrids(gridCount()); @@ -70,6 +67,12 @@ public class IgniteDynamicCacheStartFailWithPersistenceTest extends IgniteAbstra awaitPartitionMapExchange(); } + /** {@inheritDoc} */ + @Override protected void beforeTest() throws Exception { + if (MvccFeatureChecker.forcedMvcc()) + fail("https://issues.apache.org/jira/browse/IGNITE-10421"); + } + /** {@inheritDoc} */ @Override protected void afterTestsStopped() throws Exception { stopAllGrids(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheBasicOpAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheBasicOpAbstractTest.java index ef12607298d19..90e90c65be3da 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheBasicOpAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheBasicOpAbstractTest.java @@ -78,11 +78,6 @@ public abstract class GridCacheBasicOpAbstractTest extends GridCommonAbstractTes /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { - MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_EVENTS); - - if (MvccFeatureChecker.forcedMvcc()) - fail("https://issues.apache.org/jira/browse/IGNITE-7952"); - startGridsMultiThreaded(3); ignite1 = grid(0); @@ -99,6 +94,11 @@ public abstract class GridCacheBasicOpAbstractTest extends GridCommonAbstractTes /** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { + MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_EVENTS); + + if (MvccFeatureChecker.forcedMvcc()) + fail("https://issues.apache.org/jira/browse/IGNITE-7952"); + for (Ignite g : G.allGrids()) g.cache(DEFAULT_CACHE_NAME).clear(); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxCacheWriteSynchronizationModesMultithreadedTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxCacheWriteSynchronizationModesMultithreadedTest.java index 3da194dbd12d8..3cc1e93f1fb29 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxCacheWriteSynchronizationModesMultithreadedTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxCacheWriteSynchronizationModesMultithreadedTest.java @@ -111,9 +111,6 @@ public class IgniteTxCacheWriteSynchronizationModesMultithreadedTest extends Gri /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { - if (MvccFeatureChecker.forcedMvcc()) - fail("https://issues.apache.org/jira/browse/IGNITE-9470"); - super.beforeTestsStarted(); startGridsMultiThreaded(SRVS); @@ -126,6 +123,12 @@ public class IgniteTxCacheWriteSynchronizationModesMultithreadedTest extends Gri assertTrue(grid(SRVS + i).configuration().isClientMode()); } + /** {@inheritDoc} */ + @Override protected void beforeTest() throws Exception { + if (MvccFeatureChecker.forcedMvcc()) + fail("https://issues.apache.org/jira/browse/IGNITE-9470"); + } + /** {@inheritDoc} */ @Override protected void afterTestsStopped() throws Exception { stopAllGrids(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheClearDuringRebalanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheClearDuringRebalanceTest.java index 71e604195cb4a..d0af7ddb66bd5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheClearDuringRebalanceTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheClearDuringRebalanceTest.java @@ -48,11 +48,9 @@ public class IgniteCacheClearDuringRebalanceTest extends GridCommonAbstractTest private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); /** {@inheritDoc} */ - @Override protected void beforeTestsStarted() throws Exception { + @Override protected void beforeTest() throws Exception { if(MvccFeatureChecker.forcedMvcc()) fail("https://issues.apache.org/jira/browse/IGNITE-7952"); - - super.beforeTestsStarted(); } /** {@inheritDoc} */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMultinodeAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMultinodeAbstractTest.java index 08fe02f209f44..a40125ef132aa 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMultinodeAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMultinodeAbstractTest.java @@ -51,14 +51,17 @@ public abstract class PageEvictionMultinodeAbstractTest extends PageEvictionAbst /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { - if (MvccFeatureChecker.forcedMvcc()) - fail("https://issues.apache.org/jira/browse/IGNITE-10448"); - startGridsMultiThreaded(4, false); clientGrid = startGrid("client"); } + /** {@inheritDoc} */ + @Override protected void beforeTest() throws Exception { + if (MvccFeatureChecker.forcedMvcc()) + fail("https://issues.apache.org/jira/browse/IGNITE-10448"); + } + /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnIncorrectParamsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnIncorrectParamsTest.java index 1dc1987f95f19..2d886a46b7a02 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnIncorrectParamsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnIncorrectParamsTest.java @@ -45,11 +45,9 @@ @RunWith(JUnit4.class) public class TxRollbackOnIncorrectParamsTest extends GridCommonAbstractTest { /** {@inheritDoc} */ - @Override protected void beforeTestsStarted() throws Exception { + @Override protected void beforeTest() throws Exception { if (MvccFeatureChecker.forcedMvcc()) fail("https://issues.apache.org/jira/browse/IGNITE-10415"); - - super.beforeTestsStarted(); } /** diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTimeoutTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTimeoutTest.java index f9d9c0e1e7d5f..ffa454b2e12dd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTimeoutTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTimeoutTest.java @@ -98,14 +98,6 @@ public class TxRollbackOnTimeoutTest extends GridCommonAbstractTest { /** */ private static final int GRID_CNT = 3; - /** {@inheritDoc} */ - @Override protected void beforeTestsStarted() throws Exception { - if (MvccFeatureChecker.forcedMvcc()) - fail("https://issues.apache.org/jira/browse/IGNITE-7388"); - - super.beforeTestsStarted(); - } - /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); @@ -145,6 +137,9 @@ protected boolean nearCacheEnabled() { /** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { + if (MvccFeatureChecker.forcedMvcc()) + fail("https://issues.apache.org/jira/browse/IGNITE-7388"); + super.beforeTest(); startGridsMultiThreaded(GRID_CNT); From 531b6ba37a81e9562d83cc970857bfa70e86afc2 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Mon, 10 Dec 2018 15:35:22 +0300 Subject: [PATCH 096/176] IGNITE-10175 migrate core modules tests from Junit 3 to 4 - wip - migrating // fixed merge error -- verified with diffs overview and rebuild --- .../org/apache/ignite/testsuites/IgniteBasicTestSuite.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java index 992966f6aabdc..a7ebe91d08cb1 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java @@ -198,8 +198,8 @@ public static TestSuite suite(@Nullable final Set ignoredTests) throws Ex suite.addTest(new JUnit4TestAdapter(IgniteMarshallerCacheClassNameConflictTest.class)); suite.addTest(new JUnit4TestAdapter(IgniteMarshallerCacheClientRequestsMappingOnMissTest.class)); - suite.addTest(new JUnit4TestAdapte(IgniteDiagnosticMessagesTest.class)); - suite.addTest(new JUnit4TestAdapte(IgniteDiagnosticMessagesMultipleConnectionsTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteDiagnosticMessagesTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteDiagnosticMessagesMultipleConnectionsTest.class)); suite.addTest(new JUnit4TestAdapter(IgniteRejectConnectOnNodeStopTest.class)); From 72c2ed866ecf692e03919f258a74f42375a15fb3 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Mon, 10 Dec 2018 16:08:24 +0300 Subject: [PATCH 097/176] IGNITE-10175 migrate core modules tests from Junit 3 to 4 - wip - migrating // fixed merge error -- verified with diffs overview and rebuild --- .../cache/eviction/GridCacheEmptyEntriesLocalSelfTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesLocalSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesLocalSelfTest.java index 7a2abc04d37e9..f75f925fb943f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesLocalSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesLocalSelfTest.java @@ -47,7 +47,7 @@ public class GridCacheEmptyEntriesLocalSelfTest extends GridCacheEmptyEntriesAbs /** {@inheritDoc} */ - @Override protected void beforeTests() throws Exception { + @Override protected void beforeTest() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); } From 419a0861fd183bdcdc935f5961b521d7cb8c46db Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Mon, 10 Dec 2018 16:49:09 +0300 Subject: [PATCH 098/176] IGNITE-10177 cleanup Junit 3 from the project - wip - cleanup // fixed merge error -- verified with diffs overview and rebuild --- .../ignite/testsuites/IgniteCacheEvictionSelfTestSuite.java | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheEvictionSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheEvictionSelfTestSuite.java index 10296aea869de..66808900581da 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheEvictionSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheEvictionSelfTestSuite.java @@ -64,7 +64,6 @@ public class IgniteCacheEvictionSelfTestSuite { * @return Cache eviction test suite. */ public static TestSuite suite(Collection ignoredTests) { - public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite Cache Eviction Test Suite"); GridTestUtils.addTestIfNeeded(suite, FifoEvictionPolicySelfTest.class, ignoredTests); From 6c7960f221c799599e40e3d7262c69e17fb3a532 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Mon, 10 Dec 2018 16:51:37 +0300 Subject: [PATCH 099/176] IGNITE-10176 migrate non-core modules tests from Junit 3 to 4 - wip - migrating // removed unused import -- verified with diffs overview and rebuild --- .../org/apache/ignite/testsuites/IgniteBinaryCacheTestSuite.java | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheTestSuite.java index 9fe932ba0c510..4d47808dc811b 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheTestSuite.java @@ -19,7 +19,6 @@ import java.util.Collection; import java.util.HashSet; -import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.GridCacheAffinityRoutingSelfTest; import org.apache.ignite.internal.processors.cache.GridCacheEntryMemorySizeSelfTest; From c58652dd604b0195f6b40891b934f7d012cc59a4 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Mon, 10 Dec 2018 20:01:50 +0300 Subject: [PATCH 100/176] IGNITE-10175 migrate core modules tests from Junit 3 to 4 - wip - migrating // missed annotations discovered per review -- verified with diffs overview and rebuild --- .../internal/managers/IgniteDiagnosticMessagesTest.java | 2 ++ .../processors/cache/CacheDeferredDeleteQueueTest.java | 1 + .../cache/CacheDeferredDeleteSanitySelfTest.java | 3 +++ .../processors/cache/CacheNoAffinityExchangeTest.java | 1 + .../internal/processors/cache/GridCacheStopSelfTest.java | 4 ++++ ...dCacheAbstractDistributedByteArrayValuesSelfTest.java | 2 ++ .../cache/eviction/paged/PageEvictionMetricTest.java | 1 + .../paged/PageEvictionPagesRecyclingAndReusingTest.java | 3 +++ .../eviction/paged/PageEvictionReadThroughTest.java | 3 +++ .../cache/eviction/paged/PageEvictionTouchOrderTest.java | 3 +++ .../paged/PageEvictionWithRebalanceAbstractTest.java | 1 + .../CacheEntryProcessorExternalizableFailedTest.java | 9 +++++++++ .../CacheEntryProcessorNonSerializableTest.java | 8 ++++++++ 13 files changed, 41 insertions(+) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/IgniteDiagnosticMessagesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/IgniteDiagnosticMessagesTest.java index ce5b117363751..4ff4cfd9beb69 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/IgniteDiagnosticMessagesTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/IgniteDiagnosticMessagesTest.java @@ -249,6 +249,7 @@ private CacheConfiguration cacheConfiguration(CacheAtomicityMode atomicityMode) /** * @throws Exception If failed. */ + @Test public void testSeveralLongRunningMvccTxs() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-9322"); // Fix diagnostic message or disable test. @@ -493,6 +494,7 @@ public void testRemoteTx() throws Exception { /** * @throws Exception If failed. */ + @Test public void testRemoteMvccTx() throws Exception { checkRemoteTx(TRANSACTIONAL_SNAPSHOT); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDeferredDeleteQueueTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDeferredDeleteQueueTest.java index 1cbcbff0d7b7f..adef1ddd7f542 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDeferredDeleteQueueTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDeferredDeleteQueueTest.java @@ -86,6 +86,7 @@ public void testDeferredDeleteQueue() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeferredDeleteQueueMvcc() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-7187"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDeferredDeleteSanitySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDeferredDeleteSanitySelfTest.java index d64f11bdf386a..aeba3bc339595 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDeferredDeleteSanitySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDeferredDeleteSanitySelfTest.java @@ -72,6 +72,7 @@ public void testDeferredDelete() throws Exception { /** * @throws Exception If fails. */ + @Test public void testDeferredDeleteMvcc() throws Exception { testDeferredDelete(PARTITIONED, TRANSACTIONAL_SNAPSHOT, false, true); testDeferredDelete(REPLICATED, TRANSACTIONAL_SNAPSHOT, false, true); @@ -80,6 +81,7 @@ public void testDeferredDeleteMvcc() throws Exception { /** * @throws Exception If fails. */ + @Test public void testDeferredDeleteMvccNear() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-7187"); @@ -90,6 +92,7 @@ public void testDeferredDeleteMvccNear() throws Exception { /** * @throws Exception If fails. */ + @Test public void testDeferredDeleteMvccLocal() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-9530"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNoAffinityExchangeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNoAffinityExchangeTest.java index 2c67b1b7b9d92..d300e9a854643 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNoAffinityExchangeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNoAffinityExchangeTest.java @@ -218,6 +218,7 @@ public void testNoAffinityChangeOnClientLeft() throws Exception { /** * @throws Exception If failed. */ + @Test public void testNoAffinityChangeOnClientLeftWithMergedExchanges() throws Exception { System.setProperty(IgniteSystemProperties.IGNITE_EXCHANGE_MERGE_DELAY, "1000"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStopSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStopSelfTest.java index df00a0a791ab2..b0fc2d436f52a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStopSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStopSelfTest.java @@ -140,6 +140,7 @@ public void testStopImplicitTransactionsReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStopExplicitMvccTransactions() throws Exception { atomicityMode = TRANSACTIONAL_SNAPSHOT; @@ -149,6 +150,7 @@ public void testStopExplicitMvccTransactions() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStopImplicitMvccTransactions() throws Exception { atomicityMode = TRANSACTIONAL_SNAPSHOT; @@ -158,6 +160,7 @@ public void testStopImplicitMvccTransactions() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStopExplicitMvccTransactionsReplicated() throws Exception { atomicityMode = TRANSACTIONAL_SNAPSHOT; replicated = true; @@ -168,6 +171,7 @@ public void testStopExplicitMvccTransactionsReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testStopImplicitMvccTransactionsReplicated() throws Exception { atomicityMode = TRANSACTIONAL_SNAPSHOT; replicated = true; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractDistributedByteArrayValuesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractDistributedByteArrayValuesSelfTest.java index 808c9846b7bcc..7c59c930fa43b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractDistributedByteArrayValuesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractDistributedByteArrayValuesSelfTest.java @@ -176,6 +176,7 @@ public void testOptimisticMixed() throws Exception { * * @throws Exception If failed. */ + @Test public void testPessimisticMvcc() throws Exception { testTransaction0(mvccCaches, PESSIMISTIC, KEY_1, wrap(1)); } @@ -185,6 +186,7 @@ public void testPessimisticMvcc() throws Exception { * * @throws Exception If failed. */ + @Test public void testPessimisticMvccMixed() throws Exception { testTransactionMixed0(mvccCaches, PESSIMISTIC, KEY_1, wrap(1), KEY_2, 1); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMetricTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMetricTest.java index 3d3c2de806829..9af960fbc4493 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMetricTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMetricTest.java @@ -55,6 +55,7 @@ public void testPageEvictionMetric() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPageEvictionMetricMvcc() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10448"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionPagesRecyclingAndReusingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionPagesRecyclingAndReusingTest.java index c66e529ba1f4c..51c6405f40bf7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionPagesRecyclingAndReusingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionPagesRecyclingAndReusingTest.java @@ -93,6 +93,7 @@ public void testPagesRecyclingAndReusingTxLocal() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPagesRecyclingAndReusingMvccTxPartitioned() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10448"); @@ -103,6 +104,7 @@ public void testPagesRecyclingAndReusingMvccTxPartitioned() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPagesRecyclingAndReusingMvccTxReplicated() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10448"); @@ -112,6 +114,7 @@ public void testPagesRecyclingAndReusingMvccTxReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testPagesRecyclingAndReusingMvccTxLocal() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-7956"); fail("https://issues.apache.org/jira/browse/IGNITE-9530"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionReadThroughTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionReadThroughTest.java index 0c92e4ca144ff..67ae3f7141669 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionReadThroughTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionReadThroughTest.java @@ -78,6 +78,7 @@ public void testEvictionWithReadThroughTxLocal() throws Exception { /** * @throws Exception If failed. */ + @Test public void testEvictionWithReadThroughMvccTxReplicated() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-8582"); fail("https://issues.apache.org/jira/browse/IGNITE-7956"); @@ -88,6 +89,7 @@ public void testEvictionWithReadThroughMvccTxReplicated() throws Exception { /** * @throws Exception If failed. */ + @Test public void testEvictionWithReadThroughMvccTxPartitioned() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-8582"); fail("https://issues.apache.org/jira/browse/IGNITE-7956"); @@ -98,6 +100,7 @@ public void testEvictionWithReadThroughMvccTxPartitioned() throws Exception { /** * @throws Exception If failed. */ + @Test public void testEvictionWithReadThroughMvccTxLocal() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-7956"); fail("https://issues.apache.org/jira/browse/IGNITE-8582"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionTouchOrderTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionTouchOrderTest.java index f05556286d19e..59561b89056a1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionTouchOrderTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionTouchOrderTest.java @@ -81,6 +81,7 @@ public void testTouchOrderWithFairFifoEvictionTxLocal() throws Exception { /** * @throws Exception If failed. */ + @Test public void testTouchOrderWithFairFifoEvictionMvccTxReplicated() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10448"); fail("https://issues.apache.org/jira/browse/IGNITE-7956"); @@ -91,6 +92,7 @@ public void testTouchOrderWithFairFifoEvictionMvccTxReplicated() throws Exceptio /** * @throws Exception If failed. */ + @Test public void testTouchOrderWithFairFifoEvictionMvccTxPartitioned() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10448"); fail("https://issues.apache.org/jira/browse/IGNITE-7956"); @@ -101,6 +103,7 @@ public void testTouchOrderWithFairFifoEvictionMvccTxPartitioned() throws Excepti /** * @throws Exception If failed. */ + @Test public void testTouchOrderWithFairFifoEvictionMvccTxLocal() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-7956"); fail("https://issues.apache.org/jira/browse/IGNITE-9530"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionWithRebalanceAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionWithRebalanceAbstractTest.java index 9c8926d00a4f7..f52af6f1cf187 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionWithRebalanceAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionWithRebalanceAbstractTest.java @@ -43,6 +43,7 @@ public void testEvictionWithRebalance() throws Exception { /** * @throws Exception If failed. */ + @Test public void testEvictionWithRebalanceMvcc() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10448"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheEntryProcessorExternalizableFailedTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheEntryProcessorExternalizableFailedTest.java index d7d2a4d2a9131..9c15958dbe7eb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheEntryProcessorExternalizableFailedTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheEntryProcessorExternalizableFailedTest.java @@ -170,6 +170,7 @@ public void testOptimistic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOptimisticWithNearCache() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PRIMARY_SYNC, 2) .setNearConfiguration(new NearCacheConfiguration<>()); @@ -192,6 +193,7 @@ public void testOptimisticWithNearCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOptimisticFullSyncWithNearCache() throws Exception { CacheConfiguration ccfg = cacheConfiguration(FULL_SYNC, 2) .setNearConfiguration(new NearCacheConfiguration<>()); @@ -214,6 +216,7 @@ public void testOptimisticFullSyncWithNearCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOptimisticOnePhaseCommit() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PRIMARY_SYNC, 1); @@ -235,6 +238,7 @@ public void testOptimisticOnePhaseCommit() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOptimisticOnePhaseCommitWithNearCache() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PRIMARY_SYNC, 1) .setNearConfiguration(new NearCacheConfiguration<>()); @@ -257,6 +261,7 @@ public void testOptimisticOnePhaseCommitWithNearCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOptimisticOnePhaseCommitFullSync() throws Exception { CacheConfiguration ccfg = cacheConfiguration(FULL_SYNC, 1); @@ -278,6 +283,7 @@ public void testOptimisticOnePhaseCommitFullSync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOptimisticOnePhaseCommitFullSyncWithNearCache() throws Exception { CacheConfiguration ccfg = cacheConfiguration(FULL_SYNC, 1) .setNearConfiguration(new NearCacheConfiguration<>()); @@ -480,6 +486,7 @@ public void testPessimisticFullSyncWithNearCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccPessimisticOnePhaseCommit() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10483"); @@ -578,6 +585,7 @@ public void testMvccPessimisticWithNearCache() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccPessimisticFullSync() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10483"); @@ -593,6 +601,7 @@ public void testMvccPessimisticFullSync() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccPessimisticFullSyncWithNearCache() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-7187"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheEntryProcessorNonSerializableTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheEntryProcessorNonSerializableTest.java index 8e3c480218fac..00dcc1f797c3c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheEntryProcessorNonSerializableTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheEntryProcessorNonSerializableTest.java @@ -231,6 +231,7 @@ public void testPessimisticFullSyncWithNearCache() throws Exception { /** */ + @Test public void testMvccPessimisticOnePhaseCommit() { CacheConfiguration ccfg = cacheConfiguration(PRIMARY_SYNC, 1).setAtomicityMode(TRANSACTIONAL_SNAPSHOT); @@ -250,6 +251,7 @@ public void testMvccPessimisticOnePhaseCommitWithNearCache() { /** */ + @Test public void testMvccPessimisticOnePhaseCommitFullSync() { CacheConfiguration ccfg = cacheConfiguration(FULL_SYNC, 1).setAtomicityMode(TRANSACTIONAL_SNAPSHOT); @@ -258,6 +260,7 @@ public void testMvccPessimisticOnePhaseCommitFullSync() { /** */ + @Test public void testMvccPessimisticOnePhaseCommitFullSyncWithNearCache() { fail("https://issues.apache.org/jira/browse/IGNITE-7187"); @@ -269,6 +272,7 @@ public void testMvccPessimisticOnePhaseCommitFullSyncWithNearCache() { /** */ + @Test public void testMvccPessimistic() { CacheConfiguration ccfg = cacheConfiguration(PRIMARY_SYNC, 2).setAtomicityMode(TRANSACTIONAL_SNAPSHOT); @@ -277,6 +281,7 @@ public void testMvccPessimistic() { /** */ + @Test public void testMvccPessimisticWithNearCache() { fail("https://issues.apache.org/jira/browse/IGNITE-7187"); @@ -288,6 +293,7 @@ public void testMvccPessimisticWithNearCache() { /** */ + @Test public void testMvccPessimisticFullSync() { CacheConfiguration ccfg = cacheConfiguration(FULL_SYNC, 2).setAtomicityMode(TRANSACTIONAL_SNAPSHOT); @@ -297,6 +303,7 @@ public void testMvccPessimisticFullSync() { /** * @throws Exception If failed. */ + @Test public void testMvccPessimisticFullSyncWithNearCache() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-7187"); @@ -385,6 +392,7 @@ public void testOptimistic() throws Exception { /** * @throws Exception If failed. */ + @Test public void testOptimisticWithNearCache() throws Exception { CacheConfiguration ccfg = cacheConfiguration(PRIMARY_SYNC, 2) .setNearConfiguration(new NearCacheConfiguration<>()); From c5afcb7a7b15edb5b97184edf5b9eb078e2a68e2 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Mon, 10 Dec 2018 20:22:32 +0300 Subject: [PATCH 101/176] IGNITE-10175 migrate core modules tests from Junit 3 to 4 - wip - migrating // changes per review and inspections -- verified with diffs overview and rebuild --- .../cache/binary/CacheKeepBinaryWithInterceptorTest.java | 2 -- .../cache/distributed/GridCacheEventAbstractTest.java | 4 ++-- .../apache/ignite/testsuites/IgniteBinaryCacheTestSuite.java | 1 - .../testsuites/IgniteCacheTcpClientDiscoveryTestSuite.java | 1 - .../org/apache/ignite/testsuites/IgniteCacheTestSuite.java | 1 - 5 files changed, 2 insertions(+), 7 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/CacheKeepBinaryWithInterceptorTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/CacheKeepBinaryWithInterceptorTest.java index acc5f89fdab73..916eace8c149f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/CacheKeepBinaryWithInterceptorTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/CacheKeepBinaryWithInterceptorTest.java @@ -34,8 +34,6 @@ import org.junit.runner.RunWith; import org.junit.runners.JUnit4; -import static org.apache.ignite.cache.CacheAtomicityMode.*; -import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEventAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEventAbstractTest.java index f921f178cc0c0..404918f67e93b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEventAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEventAbstractTest.java @@ -94,10 +94,10 @@ protected boolean partitioned() { /** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { - super.beforeTest(); - MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_EVENTS); + super.beforeTest(); + if (TEST_INFO) info("Called beforeTest() callback."); diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheTestSuite.java index 9fe932ba0c510..4d47808dc811b 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheTestSuite.java @@ -19,7 +19,6 @@ import java.util.Collection; import java.util.HashSet; -import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.GridCacheAffinityRoutingSelfTest; import org.apache.ignite.internal.processors.cache.GridCacheEntryMemorySizeSelfTest; diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTcpClientDiscoveryTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTcpClientDiscoveryTestSuite.java index fc8c72418e555..dd7954eb57273 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTcpClientDiscoveryTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTcpClientDiscoveryTestSuite.java @@ -18,7 +18,6 @@ package org.apache.ignite.testsuites; import java.util.Collection; -import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.GridCacheTcpClientDiscoveryMultiThreadedTest; import org.apache.ignite.testframework.GridTestUtils; diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java index 932af1784a7a5..dd7088cff0c76 100755 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java @@ -18,7 +18,6 @@ package org.apache.ignite.testsuites; import java.util.Collection; -import java.util.Set; import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.cache.IgniteCacheEntryProcessorSequentialCallTest; From 70708a0fef206d2db6135c76eced3c7e133d13ae Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Mon, 10 Dec 2018 20:32:54 +0300 Subject: [PATCH 102/176] IGNITE-10175 migrate core modules tests from Junit 3 to 4 - wip - migrating // changes per review -- verified with diffs overview and rebuild --- .../cache/GridCacheInterceptorAbstractSelfTest.java | 8 ++++++++ .../processors/cache/GridCacheReloadSelfTest.java | 9 +++++++++ .../cache/IgniteMvccTxMultiThreadedAbstractTest.java | 5 +++++ .../GridCacheClientModesAbstractSelfTest.java | 3 +++ .../GridCacheAbstractTransformWriteThroughSelfTest.java | 2 ++ .../local/GridCacheLocalByteArrayValuesSelfTest.java | 2 ++ .../IgnteCacheClientWriteBehindStoreAbstractTest.java | 7 +++++++ 7 files changed, 36 insertions(+) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorAbstractSelfTest.java index 30d0a157c45aa..04a3cfab9cbd3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorAbstractSelfTest.java @@ -73,6 +73,14 @@ public abstract class GridCacheInterceptorAbstractSelfTest extends GridCacheAbst /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { + MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.INTERCEPTOR); + + if (nearEnabled()) + MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); + + if (storeEnabled()) + MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); + interceptor = new Interceptor(); super.beforeTestsStarted(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReloadSelfTest.java index b5692333fddbc..2006a478037bc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReloadSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReloadSelfTest.java @@ -69,6 +69,15 @@ public class GridCacheReloadSelfTest extends GridCommonAbstractTest { super.beforeTestsStarted(); } + /** {@inheritDoc} */ + @Override protected void beforeTest() throws Exception { + MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); + MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.EVICTION); + + if (nearEnabled) + MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); + } + /** {@inheritDoc} */ @Override protected void afterTest() throws Exception { cacheMode = null; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMvccTxMultiThreadedAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMvccTxMultiThreadedAbstractTest.java index 6eb59d15b59a8..f7c434a4c3ba1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMvccTxMultiThreadedAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMvccTxMultiThreadedAbstractTest.java @@ -44,6 +44,11 @@ public abstract class IgniteMvccTxMultiThreadedAbstractTest extends IgniteTxAbst super.beforeTestsStarted(); } + /** {@inheritDoc} */ + @Override protected void beforeTest() throws Exception { + fail("https://issues.apache.org/jira/browse/IGNITE-9470"); + } + /** * @return Thread count. */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientModesAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientModesAbstractSelfTest.java index 3ae07a2b1e606..0bf51f644e1fa 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientModesAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientModesAbstractSelfTest.java @@ -56,6 +56,9 @@ public abstract class GridCacheClientModesAbstractSelfTest extends GridCacheAbst /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { + if (nearEnabled()) + MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); + gridCnt = new AtomicInteger(); super.beforeTestsStarted(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAbstractTransformWriteThroughSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAbstractTransformWriteThroughSelfTest.java index d293577be660c..c76b4160b2f70 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAbstractTransformWriteThroughSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAbstractTransformWriteThroughSelfTest.java @@ -137,6 +137,8 @@ public abstract class GridCacheAbstractTransformWriteThroughSelfTest extends Gri /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { + MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); + super.beforeTestsStarted(); for (int i = 0; i < GRID_CNT; i++) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalByteArrayValuesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalByteArrayValuesSelfTest.java index 3503c28ef8fa1..8a76f6d18ad36 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalByteArrayValuesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalByteArrayValuesSelfTest.java @@ -71,6 +71,8 @@ public class GridCacheLocalByteArrayValuesSelfTest extends GridCacheAbstractByte /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { + MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); + ignite = startGrid(1); cache = ignite.cache(DEFAULT_CACHE_NAME); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/IgnteCacheClientWriteBehindStoreAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/IgnteCacheClientWriteBehindStoreAbstractTest.java index 706c48ff46e40..25be9d26d0bab 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/IgnteCacheClientWriteBehindStoreAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/IgnteCacheClientWriteBehindStoreAbstractTest.java @@ -38,6 +38,13 @@ */ @RunWith(JUnit4.class) public abstract class IgnteCacheClientWriteBehindStoreAbstractTest extends IgniteCacheAbstractTest { + /** {@inheritDoc} */ + @Override protected void beforeTestsStarted() throws Exception { + MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); + + super.beforeTestsStarted(); + } + /** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); From 6ec9c89cfd818401b1c19914f8bc4e70a792f59a Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Mon, 10 Dec 2018 21:06:01 +0300 Subject: [PATCH 103/176] IGNITE-10176 migrate non-core modules tests from Junit 3 to 4 - wip - migrating // removed unused import -- verified with diffs overview and rebuild --- .../apache/ignite/igfs/IgfsFragmentizerTopologySelfTest.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/igfs/IgfsFragmentizerTopologySelfTest.java b/modules/core/src/test/java/org/apache/ignite/igfs/IgfsFragmentizerTopologySelfTest.java index 3810e82f24f34..ffed70d701c2f 100644 --- a/modules/core/src/test/java/org/apache/ignite/igfs/IgfsFragmentizerTopologySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/igfs/IgfsFragmentizerTopologySelfTest.java @@ -21,8 +21,6 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; -import org.apache.ignite.failure.FailureHandler; -import org.apache.ignite.failure.NoOpFailureHandler; /** * Tests coordinator transfer from one node to other. From ad486aeb29d0d99966b3e640788f65f38dd56b8e Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Mon, 10 Dec 2018 21:17:26 +0300 Subject: [PATCH 104/176] IGNITE-10175 migrate core modules tests from Junit 3 to 4 - wip - migrating // fixed merge error -- verified with diffs overview and rebuild --- .../internal/processors/cache/GridCacheStorePutxSelfTest.java | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStorePutxSelfTest.java diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStorePutxSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStorePutxSelfTest.java deleted file mode 100644 index e69de29bb2d1d..0000000000000 From 7cdcc2f04fa8e2c654e81b41045d41197a3f44ba Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Tue, 11 Dec 2018 03:25:48 +0300 Subject: [PATCH 105/176] IGNITE-10175 migrate core modules tests from Junit 3 to 4 - wip - migrating // missing annotations reported by code inspections -- verified with diffs overview and rebuild --- .../internal/processors/cache/IgniteCacheGroupsTest.java | 3 +++ .../GridCacheBinaryObjectsAbstractMultiThreadedSelfTest.java | 3 +++ .../cache/distributed/CachePutAllFailoverAbstractTest.java | 3 +++ .../wal/IgniteWalFlushMultiNodeFailoverAbstractSelfTest.java | 3 +++ .../java/org/apache/ignite/ml/knn/LabeledVectorSetTest.java | 1 + 5 files changed, 13 insertions(+) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheGroupsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheGroupsTest.java index 0463038bd5795..18892e41b4af4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheGroupsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheGroupsTest.java @@ -103,6 +103,8 @@ import org.apache.ignite.transactions.Transaction; import org.jetbrains.annotations.Nullable; import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -120,6 +122,7 @@ * */ @SuppressWarnings({"unchecked", "ThrowableNotThrown"}) +@RunWith(JUnit4.class) public class IgniteCacheGroupsTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractMultiThreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractMultiThreadedSelfTest.java index c2da089f2f2e3..f4d63f57f9907 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractMultiThreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractMultiThreadedSelfTest.java @@ -46,12 +46,15 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.PRIMARY_SYNC; /** * Test for binary objects stored in cache. */ +@RunWith(JUnit4.class) public abstract class GridCacheBinaryObjectsAbstractMultiThreadedSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePutAllFailoverAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePutAllFailoverAbstractTest.java index 5a0f1bfb841b0..cc7d5ece5d6c3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePutAllFailoverAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePutAllFailoverAbstractTest.java @@ -38,12 +38,15 @@ import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi; import org.apache.ignite.testframework.GridTestUtils; import org.jetbrains.annotations.NotNull; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** * */ +@RunWith(JUnit4.class) public abstract class CachePutAllFailoverAbstractTest extends GridCacheAbstractSelfTest { /** */ private static final int NODE_CNT = 2; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalFlushMultiNodeFailoverAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalFlushMultiNodeFailoverAbstractSelfTest.java index cf0d5397a4cf0..bdce9f3a90b8c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalFlushMultiNodeFailoverAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalFlushMultiNodeFailoverAbstractSelfTest.java @@ -48,10 +48,13 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests error recovery while node flushing */ +@RunWith(JUnit4.class) public abstract class IgniteWalFlushMultiNodeFailoverAbstractSelfTest extends GridCommonAbstractTest { /** */ private static final String TEST_CACHE = "testCache"; diff --git a/modules/ml/src/test/java/org/apache/ignite/ml/knn/LabeledVectorSetTest.java b/modules/ml/src/test/java/org/apache/ignite/ml/knn/LabeledVectorSetTest.java index 2303e96f0de37..27c1192a5d2b1 100644 --- a/modules/ml/src/test/java/org/apache/ignite/ml/knn/LabeledVectorSetTest.java +++ b/modules/ml/src/test/java/org/apache/ignite/ml/knn/LabeledVectorSetTest.java @@ -277,6 +277,7 @@ public void testSetLabelInvalid() { } /** */ + @Test @Override public void testExternalization() { double[][] mtx = new double[][] { From 3525d5e96b3a63061f9f2f48ce57c61bbe967612 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Tue, 11 Dec 2018 03:52:53 +0300 Subject: [PATCH 106/176] IGNITE-10175 migrate core modules tests from Junit 3 to 4 - wip - migrating // missing annotations reported by code inspections -- verified with diffs overview and rebuild --- .../org/apache/ignite/p2p/GridP2PHotRedeploymentSelfTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PHotRedeploymentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PHotRedeploymentSelfTest.java index 70db1390a1698..41274492fd625 100644 --- a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PHotRedeploymentSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PHotRedeploymentSelfTest.java @@ -25,12 +25,15 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @SuppressWarnings({"ProhibitedExceptionDeclared"}) @GridCommonTest(group = "P2P") +@RunWith(JUnit4.class) public class GridP2PHotRedeploymentSelfTest extends GridCommonAbstractTest { /** Task name. */ private static final String TASK_NAME = "org.apache.ignite.tests.p2p.P2PTestTaskExternalPath1"; From 4ed8332475cda68a2b4b9b0ba9051195c9c093c3 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Tue, 11 Dec 2018 12:13:44 +0300 Subject: [PATCH 107/176] IGNITE-10177 cleanup Junit 3 from the project - wip - cleanup // examples testsuites and empty classes -- verified with diffs overview and rebuild --- .../examples/CheckpointExamplesSelfTest.java | 2 + .../examples/ClusterGroupExampleSelfTest.java | 2 + ...ContinuationExamplesMultiNodeSelfTest.java | 5 +- .../ContinuationExamplesSelfTest.java | 2 + ...inuousMapperExamplesMultiNodeSelfTest.java | 5 +- .../ContinuousMapperExamplesSelfTest.java | 2 + .../DeploymentExamplesMultiNodeSelfTest.java | 7 +- .../examples/DeploymentExamplesSelfTest.java | 2 + .../ignite/examples/IgfsExamplesSelfTest.java | 2 + .../examples/LifecycleExamplesSelfTest.java | 2 + ...MemcacheRestExamplesMultiNodeSelfTest.java | 7 +- .../MemcacheRestExamplesSelfTest.java | 2 + .../MonteCarloExamplesMultiNodeSelfTest.java | 5 +- .../examples/MonteCarloExamplesSelfTest.java | 2 + .../examples/SpringBeanExamplesSelfTest.java | 2 + .../TaskExamplesMultiNodeSelfTest.java | 5 +- .../ignite/examples/TaskExamplesSelfTest.java | 2 + .../IgniteExamplesJ8SelfTestSuite.java | 14 ++- .../testsuites/IgniteExamplesMLTestSuite.java | 13 ++- .../IgniteExamplesSelfTestSuite.java | 94 ++++++++----------- 20 files changed, 107 insertions(+), 70 deletions(-) diff --git a/examples/src/test/java/org/apache/ignite/examples/CheckpointExamplesSelfTest.java b/examples/src/test/java/org/apache/ignite/examples/CheckpointExamplesSelfTest.java index 03185c8a14f67..5327bed40e78c 100644 --- a/examples/src/test/java/org/apache/ignite/examples/CheckpointExamplesSelfTest.java +++ b/examples/src/test/java/org/apache/ignite/examples/CheckpointExamplesSelfTest.java @@ -18,10 +18,12 @@ package org.apache.ignite.examples; import org.apache.ignite.testframework.junits.common.GridAbstractExamplesTest; +import org.junit.Ignore; /** * Checkpoint examples self test. */ +@Ignore("https://issues.apache.org/jira/browse/IGNITE-711") public class CheckpointExamplesSelfTest extends GridAbstractExamplesTest { /** * TODO: IGNITE-711 next example(s) should be implemented for java 8 diff --git a/examples/src/test/java/org/apache/ignite/examples/ClusterGroupExampleSelfTest.java b/examples/src/test/java/org/apache/ignite/examples/ClusterGroupExampleSelfTest.java index 35b251012018d..d6c5d49650529 100644 --- a/examples/src/test/java/org/apache/ignite/examples/ClusterGroupExampleSelfTest.java +++ b/examples/src/test/java/org/apache/ignite/examples/ClusterGroupExampleSelfTest.java @@ -18,10 +18,12 @@ package org.apache.ignite.examples; import org.apache.ignite.testframework.junits.common.GridAbstractExamplesTest; +import org.junit.Ignore; /** * */ +@Ignore("https://issues.apache.org/jira/browse/IGNITE-711") public class ClusterGroupExampleSelfTest extends GridAbstractExamplesTest { /** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { diff --git a/examples/src/test/java/org/apache/ignite/examples/ContinuationExamplesMultiNodeSelfTest.java b/examples/src/test/java/org/apache/ignite/examples/ContinuationExamplesMultiNodeSelfTest.java index f73a74d3aa394..01aa4c973a2b9 100644 --- a/examples/src/test/java/org/apache/ignite/examples/ContinuationExamplesMultiNodeSelfTest.java +++ b/examples/src/test/java/org/apache/ignite/examples/ContinuationExamplesMultiNodeSelfTest.java @@ -17,12 +17,15 @@ package org.apache.ignite.examples; +import org.junit.Ignore; + /** * Continuation example multi-node self test. */ +@Ignore("https://issues.apache.org/jira/browse/IGNITE-711") public class ContinuationExamplesMultiNodeSelfTest extends ContinuationExamplesSelfTest { /** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { startRemoteNodes(); } -} \ No newline at end of file +} diff --git a/examples/src/test/java/org/apache/ignite/examples/ContinuationExamplesSelfTest.java b/examples/src/test/java/org/apache/ignite/examples/ContinuationExamplesSelfTest.java index 512a55b794df5..5ee93f6ea4053 100644 --- a/examples/src/test/java/org/apache/ignite/examples/ContinuationExamplesSelfTest.java +++ b/examples/src/test/java/org/apache/ignite/examples/ContinuationExamplesSelfTest.java @@ -20,10 +20,12 @@ //import org.apache.ignite.examples.computegrid.*; import org.apache.ignite.testframework.junits.common.GridAbstractExamplesTest; +import org.junit.Ignore; /** * Continuation example self test. */ +@Ignore("https://issues.apache.org/jira/browse/IGNITE-711") public class ContinuationExamplesSelfTest extends GridAbstractExamplesTest { /** * TODO: IGNITE-711 next example(s) should be implemented for java 8 diff --git a/examples/src/test/java/org/apache/ignite/examples/ContinuousMapperExamplesMultiNodeSelfTest.java b/examples/src/test/java/org/apache/ignite/examples/ContinuousMapperExamplesMultiNodeSelfTest.java index e85e28186b79a..2495e6d15d74b 100644 --- a/examples/src/test/java/org/apache/ignite/examples/ContinuousMapperExamplesMultiNodeSelfTest.java +++ b/examples/src/test/java/org/apache/ignite/examples/ContinuousMapperExamplesMultiNodeSelfTest.java @@ -17,12 +17,15 @@ package org.apache.ignite.examples; +import org.junit.Ignore; + /** * ContinuousMapperExample multi-node self test. */ +@Ignore("https://issues.apache.org/jira/browse/IGNITE-711") public class ContinuousMapperExamplesMultiNodeSelfTest extends ContinuationExamplesSelfTest { /** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { startRemoteNodes(); } -} \ No newline at end of file +} diff --git a/examples/src/test/java/org/apache/ignite/examples/ContinuousMapperExamplesSelfTest.java b/examples/src/test/java/org/apache/ignite/examples/ContinuousMapperExamplesSelfTest.java index 0ae7dc1c420a7..0029a5cb5d84a 100644 --- a/examples/src/test/java/org/apache/ignite/examples/ContinuousMapperExamplesSelfTest.java +++ b/examples/src/test/java/org/apache/ignite/examples/ContinuousMapperExamplesSelfTest.java @@ -18,10 +18,12 @@ package org.apache.ignite.examples; import org.apache.ignite.testframework.junits.common.GridAbstractExamplesTest; +import org.junit.Ignore; /** * ContinuousMapperExample self test. */ +@Ignore("https://issues.apache.org/jira/browse/IGNITE-711") public class ContinuousMapperExamplesSelfTest extends GridAbstractExamplesTest { /** * TODO: IGNITE-711 next example(s) should be implemented for java 8 diff --git a/examples/src/test/java/org/apache/ignite/examples/DeploymentExamplesMultiNodeSelfTest.java b/examples/src/test/java/org/apache/ignite/examples/DeploymentExamplesMultiNodeSelfTest.java index c57f2851bd682..2edf75eb53ef2 100644 --- a/examples/src/test/java/org/apache/ignite/examples/DeploymentExamplesMultiNodeSelfTest.java +++ b/examples/src/test/java/org/apache/ignite/examples/DeploymentExamplesMultiNodeSelfTest.java @@ -17,11 +17,14 @@ package org.apache.ignite.examples; +import org.junit.Ignore; + /** * Deployment examples multi-node self test. */ +@Ignore("https://issues.apache.org/jira/browse/IGNITE-711") public class DeploymentExamplesMultiNodeSelfTest extends DeploymentExamplesSelfTest { - // TODO: IGNITE-711 next example(s) should be implemented for java 8 + // TODO: IGNITE-711 next example(s) should be implemented for java 8 // or testing method(s) should be removed if example(s) does not applicable for java 8. /** {@inheritDoc} */ // @Override public void testDeploymentExample() throws Exception { @@ -29,4 +32,4 @@ public class DeploymentExamplesMultiNodeSelfTest extends DeploymentExamplesSelfT // // super.testDeploymentExample(); // } -} \ No newline at end of file +} diff --git a/examples/src/test/java/org/apache/ignite/examples/DeploymentExamplesSelfTest.java b/examples/src/test/java/org/apache/ignite/examples/DeploymentExamplesSelfTest.java index 8a01b9b823605..2711d25cea928 100644 --- a/examples/src/test/java/org/apache/ignite/examples/DeploymentExamplesSelfTest.java +++ b/examples/src/test/java/org/apache/ignite/examples/DeploymentExamplesSelfTest.java @@ -20,10 +20,12 @@ //import org.apache.ignite.examples.misc.deployment.*; import org.apache.ignite.testframework.junits.common.GridAbstractExamplesTest; +import org.junit.Ignore; /** * Deployment examples self test. */ +@Ignore("https://issues.apache.org/jira/browse/IGNITE-711") public class DeploymentExamplesSelfTest extends GridAbstractExamplesTest { // TODO: IGNITE-711 next example(s) should be implemented for java 8 // or testing method(s) should be removed if example(s) does not applicable for java 8. diff --git a/examples/src/test/java/org/apache/ignite/examples/IgfsExamplesSelfTest.java b/examples/src/test/java/org/apache/ignite/examples/IgfsExamplesSelfTest.java index 1be686ca86882..d227acb79bb0d 100644 --- a/examples/src/test/java/org/apache/ignite/examples/IgfsExamplesSelfTest.java +++ b/examples/src/test/java/org/apache/ignite/examples/IgfsExamplesSelfTest.java @@ -21,10 +21,12 @@ //import org.apache.ignite.internal.util.typedef.internal.*; import org.apache.ignite.testframework.junits.common.GridAbstractExamplesTest; +import org.junit.Ignore; /** * IGFS examples self test. */ +@Ignore("https://issues.apache.org/jira/browse/IGNITE-711") public class IgfsExamplesSelfTest extends GridAbstractExamplesTest { /** IGFS config with shared memory IPC. */ private static final String IGFS_SHMEM_CFG = "modules/core/src/test/config/igfs-shmem.xml"; diff --git a/examples/src/test/java/org/apache/ignite/examples/LifecycleExamplesSelfTest.java b/examples/src/test/java/org/apache/ignite/examples/LifecycleExamplesSelfTest.java index b89a8f7fbc48c..2b80865943d5f 100644 --- a/examples/src/test/java/org/apache/ignite/examples/LifecycleExamplesSelfTest.java +++ b/examples/src/test/java/org/apache/ignite/examples/LifecycleExamplesSelfTest.java @@ -20,10 +20,12 @@ //import org.apache.ignite.examples.misc.lifecycle.*; import org.apache.ignite.testframework.junits.common.GridAbstractExamplesTest; +import org.junit.Ignore; /** * LifecycleExample self test. */ +@Ignore("https://issues.apache.org/jira/browse/IGNITE-711") public class LifecycleExamplesSelfTest extends GridAbstractExamplesTest { /** * TODO: IGNITE-711 next example(s) should be implemented for java 8 diff --git a/examples/src/test/java/org/apache/ignite/examples/MemcacheRestExamplesMultiNodeSelfTest.java b/examples/src/test/java/org/apache/ignite/examples/MemcacheRestExamplesMultiNodeSelfTest.java index fd57fbb0171a6..3972084e9786f 100644 --- a/examples/src/test/java/org/apache/ignite/examples/MemcacheRestExamplesMultiNodeSelfTest.java +++ b/examples/src/test/java/org/apache/ignite/examples/MemcacheRestExamplesMultiNodeSelfTest.java @@ -19,15 +19,18 @@ //import org.apache.ignite.examples.misc.client.memcache.*; +import org.junit.Ignore; + /** * MemcacheRestExample multi-node self test. */ +@Ignore("https://issues.apache.org/jira/browse/IGNITE-711") public class MemcacheRestExamplesMultiNodeSelfTest extends MemcacheRestExamplesSelfTest { - // TODO: IGNITE-711 next example(s) should be implemented for java 8 + // TODO: IGNITE-711 next example(s) should be implemented for java 8 // or testing method(s) should be removed if example(s) does not applicable for java 8. /** {@inheritDoc} */ // @Override protected void beforeTest() throws Exception { // for (int i = 0; i < RMT_NODES_CNT; i++) // startGrid("memcache-rest-examples-" + i, MemcacheRestExampleNodeStartup.configuration()); // } -} \ No newline at end of file +} diff --git a/examples/src/test/java/org/apache/ignite/examples/MemcacheRestExamplesSelfTest.java b/examples/src/test/java/org/apache/ignite/examples/MemcacheRestExamplesSelfTest.java index 762343d31f261..f2b7b6e5019df 100644 --- a/examples/src/test/java/org/apache/ignite/examples/MemcacheRestExamplesSelfTest.java +++ b/examples/src/test/java/org/apache/ignite/examples/MemcacheRestExamplesSelfTest.java @@ -20,10 +20,12 @@ //import org.apache.ignite.examples.misc.client.memcache.*; import org.apache.ignite.testframework.junits.common.GridAbstractExamplesTest; +import org.junit.Ignore; /** * MemcacheRestExample self test. */ +@Ignore("https://issues.apache.org/jira/browse/IGNITE-711") public class MemcacheRestExamplesSelfTest extends GridAbstractExamplesTest { // TODO: IGNITE-711 next example(s) should be implemented for java 8 // or testing method(s) should be removed if example(s) does not applicable for java 8. diff --git a/examples/src/test/java/org/apache/ignite/examples/MonteCarloExamplesMultiNodeSelfTest.java b/examples/src/test/java/org/apache/ignite/examples/MonteCarloExamplesMultiNodeSelfTest.java index f641a45aaa2c3..135f8649f399f 100644 --- a/examples/src/test/java/org/apache/ignite/examples/MonteCarloExamplesMultiNodeSelfTest.java +++ b/examples/src/test/java/org/apache/ignite/examples/MonteCarloExamplesMultiNodeSelfTest.java @@ -17,12 +17,15 @@ package org.apache.ignite.examples; +import org.junit.Ignore; + /** * PrimeExample multi-node self test. */ +@Ignore("https://issues.apache.org/jira/browse/IGNITE-711") public class MonteCarloExamplesMultiNodeSelfTest extends MonteCarloExamplesSelfTest { /** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { startRemoteNodes(); } -} \ No newline at end of file +} diff --git a/examples/src/test/java/org/apache/ignite/examples/MonteCarloExamplesSelfTest.java b/examples/src/test/java/org/apache/ignite/examples/MonteCarloExamplesSelfTest.java index beba341d5d2a1..66026b2f55b21 100644 --- a/examples/src/test/java/org/apache/ignite/examples/MonteCarloExamplesSelfTest.java +++ b/examples/src/test/java/org/apache/ignite/examples/MonteCarloExamplesSelfTest.java @@ -20,6 +20,7 @@ //import org.apache.ignite.examples.computegrid.montecarlo.*; import org.apache.ignite.testframework.junits.common.GridAbstractExamplesTest; +import org.junit.Ignore; /** * Ignite examples self test. Excludes Ignite Spring tests. @@ -65,6 +66,7 @@ * Classpath should contain the {@code ${IGNITE_HOME}/modules/tests/config/aop/aspectj} folder. * */ +@Ignore("https://issues.apache.org/jira/browse/IGNITE-711") public class MonteCarloExamplesSelfTest extends GridAbstractExamplesTest { /** * TODO: IGNITE-711 next example(s) should be implemented for java 8 diff --git a/examples/src/test/java/org/apache/ignite/examples/SpringBeanExamplesSelfTest.java b/examples/src/test/java/org/apache/ignite/examples/SpringBeanExamplesSelfTest.java index 4cc209f0e9cdf..c9c69dc52a488 100644 --- a/examples/src/test/java/org/apache/ignite/examples/SpringBeanExamplesSelfTest.java +++ b/examples/src/test/java/org/apache/ignite/examples/SpringBeanExamplesSelfTest.java @@ -20,10 +20,12 @@ //import org.apache.ignite.examples.misc.springbean.*; import org.apache.ignite.testframework.junits.common.GridAbstractExamplesTest; +import org.junit.Ignore; /** * Spring bean examples self test. */ +@Ignore("https://issues.apache.org/jira/browse/IGNITE-711") public class SpringBeanExamplesSelfTest extends GridAbstractExamplesTest { /** * TODO: IGNITE-711 next example(s) should be implemented for java 8 diff --git a/examples/src/test/java/org/apache/ignite/examples/TaskExamplesMultiNodeSelfTest.java b/examples/src/test/java/org/apache/ignite/examples/TaskExamplesMultiNodeSelfTest.java index 06c4dd831fb86..676123425e5cf 100644 --- a/examples/src/test/java/org/apache/ignite/examples/TaskExamplesMultiNodeSelfTest.java +++ b/examples/src/test/java/org/apache/ignite/examples/TaskExamplesMultiNodeSelfTest.java @@ -17,12 +17,15 @@ package org.apache.ignite.examples; +import org.junit.Ignore; + /** * Hello world examples multi-node self test. */ +@Ignore("https://issues.apache.org/jira/browse/IGNITE-711") public class TaskExamplesMultiNodeSelfTest extends TaskExamplesSelfTest { /** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { startRemoteNodes(); } -} \ No newline at end of file +} diff --git a/examples/src/test/java/org/apache/ignite/examples/TaskExamplesSelfTest.java b/examples/src/test/java/org/apache/ignite/examples/TaskExamplesSelfTest.java index 72ad3c7f87e8d..a9b7f95c0a338 100644 --- a/examples/src/test/java/org/apache/ignite/examples/TaskExamplesSelfTest.java +++ b/examples/src/test/java/org/apache/ignite/examples/TaskExamplesSelfTest.java @@ -20,10 +20,12 @@ //import org.apache.ignite.examples.computegrid.*; import org.apache.ignite.testframework.junits.common.GridAbstractExamplesTest; +import org.junit.Ignore; /** * Hello world examples self test. */ +@Ignore("https://issues.apache.org/jira/browse/IGNITE-711") public class TaskExamplesSelfTest extends GridAbstractExamplesTest { // TODO: IGNITE-711 next example(s) should be implemented for java 8 // or testing method(s) should be removed if example(s) does not applicable for java 8. diff --git a/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesJ8SelfTestSuite.java b/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesJ8SelfTestSuite.java index 8d03c90bce7a1..29f3fed82f217 100644 --- a/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesJ8SelfTestSuite.java +++ b/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesJ8SelfTestSuite.java @@ -27,6 +27,7 @@ import org.apache.ignite.examples.EventsExamplesSelfTest; import org.apache.ignite.examples.MessagingExamplesSelfTest; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.BeforeClass; import org.junit.runner.RunWith; import org.junit.runners.AllTests; @@ -39,14 +40,17 @@ */ @RunWith(AllTests.class) public class IgniteExamplesJ8SelfTestSuite { + /** */ + @BeforeClass + public static void init() { + System.setProperty(IGNITE_OVERRIDE_MCAST_GRP, + GridTestUtils.getNextMulticastGroup(IgniteExamplesMLTestSuite.class)); + } + /** * @return Suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { - System.setProperty(IGNITE_OVERRIDE_MCAST_GRP, - GridTestUtils.getNextMulticastGroup(IgniteExamplesJ8SelfTestSuite.class)); - + public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite Examples Test Suite"); suite.addTest(new JUnit4TestAdapter(CacheExamplesSelfTest.class)); diff --git a/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesMLTestSuite.java b/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesMLTestSuite.java index 6d7726c546bcd..b1e0456b232c8 100644 --- a/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesMLTestSuite.java +++ b/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesMLTestSuite.java @@ -33,6 +33,7 @@ import org.apache.ignite.examples.ml.util.MLExamplesCommonArgs; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridAbstractExamplesTest; +import org.junit.BeforeClass; import org.junit.runner.RunWith; import org.junit.runners.AllTests; @@ -51,6 +52,13 @@ public class IgniteExamplesMLTestSuite { /** Test class name pattern. */ private static final String clsNamePtrn = ".*Example$"; + /** */ + @BeforeClass + public static void init() { + System.setProperty(IGNITE_OVERRIDE_MCAST_GRP, + GridTestUtils.getNextMulticastGroup(IgniteExamplesMLTestSuite.class)); + } + /** * Creates test suite for Ignite ML examples. * @@ -58,9 +66,6 @@ public class IgniteExamplesMLTestSuite { * @throws Exception If failed. */ public static TestSuite suite() throws Exception { - System.setProperty(IGNITE_OVERRIDE_MCAST_GRP, - GridTestUtils.getNextMulticastGroup(IgniteExamplesMLTestSuite.class)); - TestSuite suite = new TestSuite("Ignite ML Examples Test Suite"); for (Class clazz : getClasses(basePkgForTests)) @@ -82,7 +87,7 @@ private static Class makeTestClass(Class exampleCls) ClassPool cp = ClassPool.getDefault(); cp.insertClassPath(new ClassClassPath(IgniteExamplesMLTestSuite.class)); - CtClass cl = cp.makeClass(basePkgForTests + "." + exampleCls.getSimpleName() + "SelfName"); + CtClass cl = cp.makeClass(basePkgForTests + "." + exampleCls.getSimpleName() + "SelfTest"); cl.setSuperclass(cp.get(GridAbstractExamplesTest.class.getName())); diff --git a/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesSelfTestSuite.java b/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesSelfTestSuite.java index 780ff213de69c..6aafb921f7de6 100644 --- a/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesSelfTestSuite.java +++ b/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesSelfTestSuite.java @@ -17,8 +17,6 @@ package org.apache.ignite.testsuites; -import junit.framework.JUnit4TestAdapter; -import junit.framework.TestSuite; import org.apache.ignite.examples.BasicExamplesMultiNodeSelfTest; import org.apache.ignite.examples.BasicExamplesSelfTest; import org.apache.ignite.examples.CacheClientBinaryExampleTest; @@ -50,65 +48,55 @@ import org.apache.ignite.examples.TaskExamplesMultiNodeSelfTest; import org.apache.ignite.examples.TaskExamplesSelfTest; import org.junit.runner.RunWith; -import org.junit.runners.AllTests; +import org.junit.runners.Suite; /** * Examples test suite. *

    * Contains all Ignite examples tests.

    */ -@RunWith(AllTests.class) -public class IgniteExamplesSelfTestSuite { - /** - * @return Suite. - * @throws Exception If failed. - */ - public static TestSuite suite() throws Exception { -// System.setProperty(IGNITE_OVERRIDE_MCAST_GRP, -// GridTestUtils.getNextMulticastGroup(IgniteExamplesSelfTestSuite.class)); - - TestSuite suite = new TestSuite("Ignite Examples Test Suite"); - - suite.addTest(new JUnit4TestAdapter(CacheExamplesSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(SqlExamplesSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(BasicExamplesSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(ContinuationExamplesSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(ContinuousMapperExamplesSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(DeploymentExamplesSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(EventsExamplesSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(LifecycleExamplesSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(MessagingExamplesSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(MemcacheRestExamplesSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(MonteCarloExamplesSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(TaskExamplesSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(SpringBeanExamplesSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(SpringDataExampleSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(IgfsExamplesSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(CheckpointExamplesSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(ClusterGroupExampleSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(CacheContinuousQueryExamplesSelfTest.class)); +@RunWith(Suite.class) +@Suite.SuiteClasses({ + CacheExamplesSelfTest.class, + SqlExamplesSelfTest.class, + BasicExamplesSelfTest.class, + ContinuationExamplesSelfTest.class, + ContinuousMapperExamplesSelfTest.class, + DeploymentExamplesSelfTest.class, + EventsExamplesSelfTest.class, + LifecycleExamplesSelfTest.class, + MessagingExamplesSelfTest.class, + MemcacheRestExamplesSelfTest.class, + MonteCarloExamplesSelfTest.class, + TaskExamplesSelfTest.class, + SpringBeanExamplesSelfTest.class, + SpringDataExampleSelfTest.class, + IgfsExamplesSelfTest.class, + CheckpointExamplesSelfTest.class, + ClusterGroupExampleSelfTest.class, + CacheContinuousQueryExamplesSelfTest.class, - // Multi-node. - suite.addTest(new JUnit4TestAdapter(CacheExamplesMultiNodeSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(BasicExamplesMultiNodeSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(ContinuationExamplesMultiNodeSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(ContinuousMapperExamplesMultiNodeSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(DeploymentExamplesMultiNodeSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(EventsExamplesMultiNodeSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(TaskExamplesMultiNodeSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(MemcacheRestExamplesMultiNodeSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(MonteCarloExamplesMultiNodeSelfTest.class)); + // Multi-node. + CacheExamplesMultiNodeSelfTest.class, + BasicExamplesMultiNodeSelfTest.class, + ContinuationExamplesMultiNodeSelfTest.class, + ContinuousMapperExamplesMultiNodeSelfTest.class, + DeploymentExamplesMultiNodeSelfTest.class, + EventsExamplesMultiNodeSelfTest.class, + TaskExamplesMultiNodeSelfTest.class, + MemcacheRestExamplesMultiNodeSelfTest.class, + MonteCarloExamplesMultiNodeSelfTest.class, - // Binary. - suite.addTest(new JUnit4TestAdapter(CacheClientBinaryExampleTest.class)); - suite.addTest(new JUnit4TestAdapter(ComputeClientBinaryExampleTest.class)); + // Binary. + CacheClientBinaryExampleTest.class, + ComputeClientBinaryExampleTest.class, - // ML Grid. - suite.addTest(IgniteExamplesMLTestSuite.suite()); + // ML Grid. + IgniteExamplesMLTestSuite.class, - // Encryption. - suite.addTest(new JUnit4TestAdapter(EncryptedCacheExampleSelfTest.class)); - - return suite; - } + // Encryption. + EncryptedCacheExampleSelfTest.class +}) +public class IgniteExamplesSelfTestSuite { + // No-op. } From 32438be1670eea3505e8703740559c51bf8e3128 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Wed, 12 Dec 2018 15:57:55 +0300 Subject: [PATCH 108/176] IGNITE-10176 migrate non-core modules tests from Junit 3 to 4 - wip - migrating // fixed error discovered by TC bot -- verified with diffs overview and rebuild --- .../ignite/stream/twitter/IgniteTwitterStreamerTest.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTest.java b/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTest.java index b084fbfc79e9c..1ee71384c3d30 100644 --- a/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTest.java +++ b/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTest.java @@ -32,8 +32,8 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Rule; import org.junit.Test; +import org.junit.internal.runners.JUnit38ClassRunner; import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; import twitter4j.Status; import twitter4j.TwitterException; import twitter4j.TwitterObjectFactory; @@ -47,9 +47,8 @@ /** * Test for {@link TwitterStreamer}. Tests Public Status streaming API https://dev.twitter.com/streaming/public. */ -@RunWith(JUnit4.class) +@RunWith(JUnit38ClassRunner.class) // IGNITE-10177 Make this test pass with JUnit 4. public class IgniteTwitterStreamerTest extends GridCommonAbstractTest { - /** Cache entries count. */ private static final int CACHE_ENTRY_COUNT = 100; @@ -77,7 +76,7 @@ public IgniteTwitterStreamerTest() { } /** {@inheritDoc} */ - @Override public void beforeTest() throws Exception { + @Override public void beforeTest() { grid().getOrCreateCache(defaultCacheConfiguration()); mockServer.start(); From b4864f0a979321327329fdb9eb373cae040b931c Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Wed, 12 Dec 2018 17:21:52 +0300 Subject: [PATCH 109/176] IGNITE-10176 migrate non-core modules tests from Junit 3 to 4 - wip - migrating // fixed error discovered by TC bot -- verified with diffs overview and rebuild --- .../ignite/testsuites/IgniteBinaryCacheQueryTestSuite.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite.java index 6cd3b576eea03..f127a756cd293 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite.java +++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite.java @@ -27,7 +27,6 @@ import org.apache.ignite.internal.processors.cache.CacheIteratorScanQueryTest; import org.apache.ignite.internal.processors.cache.CacheLocalQueryDetailMetricsSelfTest; import org.apache.ignite.internal.processors.cache.CacheLocalQueryMetricsSelfTest; -import org.apache.ignite.internal.processors.cache.CacheOffheapBatchIndexingBaseTest; import org.apache.ignite.internal.processors.cache.CacheOffheapBatchIndexingMultiTypeTest; import org.apache.ignite.internal.processors.cache.CacheOffheapBatchIndexingSingleTypeTest; import org.apache.ignite.internal.processors.cache.CachePartitionedQueryDetailMetricsDistributedSelfTest; @@ -112,7 +111,6 @@ import org.apache.ignite.internal.processors.cache.distributed.near.IgniteCachePartitionedQueryP2PDisabledSelfTest; import org.apache.ignite.internal.processors.cache.distributed.near.IgniteCachePartitionedQuerySelfTest; import org.apache.ignite.internal.processors.cache.distributed.near.IgniteCachePartitionedSnapshotEnabledQuerySelfTest; -import org.apache.ignite.internal.processors.cache.distributed.near.IgniteCacheQueryAbstractDistributedJoinSelfTest; import org.apache.ignite.internal.processors.cache.distributed.near.IgniteCacheQueryNoRebalanceSelfTest; import org.apache.ignite.internal.processors.cache.distributed.replicated.IgniteCacheReplicatedFieldsQueryJoinNoPrimaryPartitionsSelfTest; import org.apache.ignite.internal.processors.cache.distributed.replicated.IgniteCacheReplicatedFieldsQueryP2PEnabledSelfTest; @@ -333,7 +331,6 @@ public static TestSuite suite() { suite.addTest(new JUnit4TestAdapter(IgniteErrorOnRebalanceTest.class)); suite.addTest(new JUnit4TestAdapter(CacheQueryBuildValueTest.class)); suite.addTest(new JUnit4TestAdapter(CacheOffheapBatchIndexingMultiTypeTest.class)); - suite.addTest(new JUnit4TestAdapter(CacheOffheapBatchIndexingBaseTest.class)); suite.addTest(new JUnit4TestAdapter(IgniteCacheQueryIndexSelfTest.class)); suite.addTest(new JUnit4TestAdapter(IgniteCacheCollocatedQuerySelfTest.class)); @@ -344,8 +341,6 @@ public static TestSuite suite() { suite.addTest(new JUnit4TestAdapter(IgniteCacheOffheapEvictQueryTest.class)); suite.addTest(new JUnit4TestAdapter(IgniteCacheOffheapIndexScanTest.class)); - suite.addTest(new JUnit4TestAdapter(IgniteCacheQueryAbstractDistributedJoinSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(GridCacheCrossCacheQuerySelfTest.class)); suite.addTest(new JUnit4TestAdapter(GridCacheQuerySerializationSelfTest.class)); suite.addTest(new JUnit4TestAdapter(IgniteBinaryObjectFieldsQuerySelfTest.class)); From ed60cc44e6f8a008845f9340c695611f7a48e937 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Wed, 12 Dec 2018 18:19:14 +0300 Subject: [PATCH 110/176] IGNITE-10176 migrate non-core modules tests from Junit 3 to 4 - wip - migrating // fixed error discovered by TC bot -- verified with diffs overview and rebuild --- .../s3/S3CheckpointSpiStartStopBucketEndpointSelfTest.java | 5 ++--- .../s3/S3CheckpointSpiStartStopSSEAlgorithmSelfTest.java | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/modules/aws/src/test/java/org/apache/ignite/spi/checkpoint/s3/S3CheckpointSpiStartStopBucketEndpointSelfTest.java b/modules/aws/src/test/java/org/apache/ignite/spi/checkpoint/s3/S3CheckpointSpiStartStopBucketEndpointSelfTest.java index 8d48596e6409c..363f7687c7a3e 100644 --- a/modules/aws/src/test/java/org/apache/ignite/spi/checkpoint/s3/S3CheckpointSpiStartStopBucketEndpointSelfTest.java +++ b/modules/aws/src/test/java/org/apache/ignite/spi/checkpoint/s3/S3CheckpointSpiStartStopBucketEndpointSelfTest.java @@ -21,8 +21,8 @@ import com.amazonaws.auth.BasicAWSCredentials; import org.apache.ignite.spi.GridSpiStartStopAbstractTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; -import org.apache.ignite.testsuites.IgniteIgnore; import org.apache.ignite.testsuites.IgniteS3TestSuite; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -33,7 +33,6 @@ @GridSpiTest(spi = S3CheckpointSpi.class, group = "Checkpoint SPI") @RunWith(JUnit4.class) public class S3CheckpointSpiStartStopBucketEndpointSelfTest extends GridSpiStartStopAbstractTest { - /** {@inheritDoc} */ @Override protected void spiConfigure(S3CheckpointSpi spi) throws Exception { AWSCredentials cred = new BasicAWSCredentials(IgniteS3TestSuite.getAccessKey(), @@ -47,7 +46,7 @@ public class S3CheckpointSpiStartStopBucketEndpointSelfTest extends GridSpiStart } /** {@inheritDoc} */ - @IgniteIgnore("https://issues.apache.org/jira/browse/IGNITE-2420") + @Ignore("https://issues.apache.org/jira/browse/IGNITE-2420") @Test @Override public void testStartStop() throws Exception { super.testStartStop(); diff --git a/modules/aws/src/test/java/org/apache/ignite/spi/checkpoint/s3/S3CheckpointSpiStartStopSSEAlgorithmSelfTest.java b/modules/aws/src/test/java/org/apache/ignite/spi/checkpoint/s3/S3CheckpointSpiStartStopSSEAlgorithmSelfTest.java index 6f269f49a2b0a..cf4495225abd8 100644 --- a/modules/aws/src/test/java/org/apache/ignite/spi/checkpoint/s3/S3CheckpointSpiStartStopSSEAlgorithmSelfTest.java +++ b/modules/aws/src/test/java/org/apache/ignite/spi/checkpoint/s3/S3CheckpointSpiStartStopSSEAlgorithmSelfTest.java @@ -21,8 +21,8 @@ import com.amazonaws.auth.BasicAWSCredentials; import org.apache.ignite.spi.GridSpiStartStopAbstractTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; -import org.apache.ignite.testsuites.IgniteIgnore; import org.apache.ignite.testsuites.IgniteS3TestSuite; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -46,7 +46,7 @@ public class S3CheckpointSpiStartStopSSEAlgorithmSelfTest extends GridSpiStartSt } /** {@inheritDoc} */ - @IgniteIgnore("https://issues.apache.org/jira/browse/IGNITE-2420") + @Ignore("https://issues.apache.org/jira/browse/IGNITE-2420") @Test @Override public void testStartStop() throws Exception { super.testStartStop(); From 2511a78304d99af347ec24fd6eb930b2dc3f65ed Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Wed, 12 Dec 2018 18:21:14 +0300 Subject: [PATCH 111/176] IGNITE-10176 migrate non-core modules tests from Junit 3 to 4 - wip - migrating // fixed error discovered by TC bot -- verified with diffs overview and rebuild --- .../apache/ignite/internal/websession/WebSessionSelfTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionSelfTest.java b/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionSelfTest.java index dafcea6769234..bed35c1b60083 100644 --- a/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionSelfTest.java +++ b/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionSelfTest.java @@ -46,12 +46,12 @@ import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; -import org.apache.ignite.testsuites.IgniteIgnore; import org.eclipse.jetty.security.HashLoginService; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.servlet.ServletHolder; import org.eclipse.jetty.webapp.WebAppContext; import org.jetbrains.annotations.Nullable; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -100,7 +100,7 @@ public void testSingleRequest() throws Exception { /** * @throws Exception If failed. */ - @IgniteIgnore("https://issues.apache.org/jira/browse/IGNITE-3663") + @Ignore("https://issues.apache.org/jira/browse/IGNITE-3663") @Test public void testSessionRenewalDuringLogin() throws Exception { testSessionRenewalDuringLogin("/modules/core/src/test/config/websession/example-cache.xml"); From 32409c6a0fffd90cab9eb73878ddca6307f3dbc1 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Wed, 12 Dec 2018 18:23:58 +0300 Subject: [PATCH 112/176] IGNITE-10176 migrate non-core modules tests from Junit 3 to 4 - wip - migrating // fixed error discovered by TC bot -- verified with diffs overview and rebuild --- .../ignite/stream/twitter/IgniteTwitterStreamerTest.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTest.java b/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTest.java index 1ee71384c3d30..2285af4d9ec46 100644 --- a/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTest.java +++ b/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTest.java @@ -31,9 +31,6 @@ import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Rule; -import org.junit.Test; -import org.junit.internal.runners.JUnit38ClassRunner; -import org.junit.runner.RunWith; import twitter4j.Status; import twitter4j.TwitterException; import twitter4j.TwitterObjectFactory; @@ -47,7 +44,6 @@ /** * Test for {@link TwitterStreamer}. Tests Public Status streaming API https://dev.twitter.com/streaming/public. */ -@RunWith(JUnit38ClassRunner.class) // IGNITE-10177 Make this test pass with JUnit 4. public class IgniteTwitterStreamerTest extends GridCommonAbstractTest { /** Cache entries count. */ private static final int CACHE_ENTRY_COUNT = 100; @@ -95,7 +91,6 @@ public IgniteTwitterStreamerTest() { /** * @throws Exception Test exception. */ - @Test public void testStatusesFilterEndpointOAuth1() throws Exception { try (IgniteDataStreamer dataStreamer = grid().dataStreamer(DEFAULT_CACHE_NAME)) { TwitterStreamerImpl streamer = newStreamerInstance(dataStreamer); From 871b47b838ab16310de9d78eb8c8c128c8d9e405 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Wed, 12 Dec 2018 18:56:29 +0300 Subject: [PATCH 113/176] IGNITE-10176 migrate non-core modules tests from Junit 3 to 4 - wip - migrating // fixed error discovered by TC bot -- verified with diffs overview and rebuild --- .../ml/dataset/impl/cache/util/ComputeUtilsTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/ml/src/test/java/org/apache/ignite/ml/dataset/impl/cache/util/ComputeUtilsTest.java b/modules/ml/src/test/java/org/apache/ignite/ml/dataset/impl/cache/util/ComputeUtilsTest.java index 3e832aef717c8..4ab71416a0cd9 100644 --- a/modules/ml/src/test/java/org/apache/ignite/ml/dataset/impl/cache/util/ComputeUtilsTest.java +++ b/modules/ml/src/test/java/org/apache/ignite/ml/dataset/impl/cache/util/ComputeUtilsTest.java @@ -37,13 +37,13 @@ import org.apache.ignite.ml.dataset.UpstreamTransformerBuilder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Test; +import org.junit.internal.runners.JUnit38ClassRunner; import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; /** * Tests for {@link ComputeUtils}. */ -@RunWith(JUnit4.class) +@RunWith(JUnit38ClassRunner.class) public class ComputeUtilsTest extends GridCommonAbstractTest { /** Number of nodes in grid. */ private static final int NODE_COUNT = 10; @@ -63,7 +63,7 @@ public class ComputeUtilsTest extends GridCommonAbstractTest { } /** {@inheritDoc} */ - @Override protected void beforeTest() throws Exception { + @Override protected void beforeTest() { /* Grid instance. */ ignite = grid(NODE_COUNT); ignite.configuration().setPeerClassLoadingEnabled(true); @@ -272,7 +272,7 @@ private static class TestPartitionData implements AutoCloseable { } /** {@inheritDoc} */ - @Override public void close() throws Exception { + @Override public void close() { // Do nothing, GC will clean up. } } From a4b2fce461eba258d295d1030d556109e7ae43f0 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Wed, 12 Dec 2018 19:10:05 +0300 Subject: [PATCH 114/176] IGNITE-10176 migrate non-core modules tests from Junit 3 to 4 - wip - migrating // fixed error discovered by TC bot -- verified with diffs overview and rebuild --- .../log4j/GridLog4jCorrectFileNameTest.java | 16 ++++++---------- .../logger/log4j/GridLog4jLoggingFileTest.java | 8 ++++---- .../logger/log4j/GridLog4jLoggingPathTest.java | 8 +++++--- .../logger/log4j/GridLog4jLoggingUrlTest.java | 8 ++++---- 4 files changed, 19 insertions(+), 21 deletions(-) diff --git a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jCorrectFileNameTest.java b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jCorrectFileNameTest.java index 07da142cdaf01..ccf03be2918fd 100644 --- a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jCorrectFileNameTest.java +++ b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jCorrectFileNameTest.java @@ -31,8 +31,6 @@ import org.apache.log4j.Logger; import org.apache.log4j.PatternLayout; import org.apache.log4j.varia.LevelRangeFilter; -import org.junit.After; -import org.junit.Before; import org.junit.Test; import static org.junit.Assert.assertNotNull; @@ -47,8 +45,7 @@ public class GridLog4jCorrectFileNameTest { private Log4jRollingFileAppender appender; /** */ - @Before - public void setUp() throws Exception { + private void setUp() { Logger root = Logger.getRootLogger(); for (Enumeration appenders = root.getAllAppenders(); appenders.hasMoreElements(); ) { @@ -62,8 +59,7 @@ public void setUp() throws Exception { } /** */ - @After - public void tearDown() { + private void tearDown() { if (appender != null) { Logger.getRootLogger().removeAppender(Log4jRollingFileAppender.class.getSimpleName()); @@ -78,8 +74,10 @@ public void tearDown() { */ @Test public void testLogFilesTwoNodes() throws Exception { + setUp(); checkOneNode(0); checkOneNode(1); + tearDown(); } /** @@ -110,9 +108,8 @@ private void checkOneNode(int id) throws Exception { * * @param igniteInstanceName Ignite instance name. * @return Grid configuration. - * @throws Exception If error occurred. */ - private static IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { + private static IgniteConfiguration getConfiguration(String igniteInstanceName) { IgniteConfiguration cfg = new IgniteConfiguration(); cfg.setIgniteInstanceName(igniteInstanceName); @@ -136,9 +133,8 @@ private static IgniteConfiguration getConfiguration(String igniteInstanceName) t * Creates new GridLog4jRollingFileAppender. * * @return GridLog4jRollingFileAppender. - * @throws Exception If error occurred. */ - private static Log4jRollingFileAppender createAppender() throws Exception { + private static Log4jRollingFileAppender createAppender() { Log4jRollingFileAppender appender = new Log4jRollingFileAppender(); appender.setLayout(new PatternLayout("[%d{ISO8601}][%-5p][%t][%c{1}] %m%n")); diff --git a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingFileTest.java b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingFileTest.java index a6d683e68ea92..2161d7ad0d1d8 100644 --- a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingFileTest.java +++ b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingFileTest.java @@ -21,7 +21,6 @@ import org.apache.ignite.IgniteLogger; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonTest; -import org.junit.Before; import org.junit.Test; import static org.junit.Assert.assertTrue; @@ -38,8 +37,7 @@ public class GridLog4jLoggingFileTest { private File xml; /** */ - @Before - public void setUp() throws Exception { + private void setUp() throws Exception { xml = GridTestUtils.resolveIgnitePath("modules/core/src/test/config/log4j-test.xml"); assert xml != null; @@ -52,7 +50,9 @@ public void setUp() throws Exception { * Tests log4j logging SPI. */ @Test - public void testLog() { + public void testLog() throws Exception { + setUp(); + System.out.println(log.toString()); assertTrue(log.toString().contains("Log4JLogger")); diff --git a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingPathTest.java b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingPathTest.java index f7cae8e99472e..5faba6f47139d 100644 --- a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingPathTest.java +++ b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingPathTest.java @@ -34,8 +34,8 @@ public class GridLog4jLoggingPathTest { /** Logger config */ private String path = "modules/core/src/test/config/log4j-test.xml"; - /** {@inheritDoc} */ - public void setUp() throws Exception { + /** */ + private void setUp() throws Exception { log = new Log4JLogger(path).getLogger(getClass()); } @@ -43,7 +43,9 @@ public void setUp() throws Exception { * Tests log4j logging SPI. */ @Test - public void testLog() { + public void testLog() throws Exception { + setUp(); + System.out.println(log.toString()); assertTrue(log.toString().contains("Log4JLogger")); diff --git a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingUrlTest.java b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingUrlTest.java index e76625adc5f57..24f0140926da6 100644 --- a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingUrlTest.java +++ b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingUrlTest.java @@ -22,7 +22,6 @@ import org.apache.ignite.IgniteLogger; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonTest; -import org.junit.Before; import org.junit.Test; import static org.junit.Assert.assertTrue; @@ -39,8 +38,7 @@ public class GridLog4jLoggingUrlTest { private URL url; /** */ - @Before - public void setUp() throws Exception { + private void setUp() throws Exception { File xml = GridTestUtils.resolveIgnitePath("modules/core/src/test/config/log4j-test.xml"); assert xml != null; @@ -54,7 +52,9 @@ public void setUp() throws Exception { * Tests log4j logging SPI. */ @Test - public void testLog() { + public void testLog() throws Exception { + setUp(); + System.out.println(log.toString()); assertTrue(log.toString().contains("Log4JLogger")); From ce36787848a366efa78f8975095895264b8c0a0a Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Mon, 17 Dec 2018 21:07:14 +0300 Subject: [PATCH 115/176] IGNITE-10177 Junit 3 cleanup - wip - cleanup -- verified with diffs overview and rebuild --- ...eStoreListenerRWThroughDisabledTransactionalCacheTest.java | 2 -- .../CacheStoreSessionListenerWriteBehindEnabledTest.java | 2 -- .../internal/processors/cache/CacheRemoveAllSelfTest.java | 2 -- .../processors/cache/GridCacheAbstractFullApiSelfTest.java | 2 -- .../processors/cache/GridCacheBasicStoreAbstractTest.java | 2 -- .../processors/cache/GridCacheEvictionEventAbstractTest.java | 2 -- .../cache/GridCacheGetAndTransformStoreAbstractTest.java | 2 -- .../processors/cache/GridCacheInterceptorLocalSelfTest.java | 2 -- .../cache/GridCacheInterceptorLocalWithStoreSelfTest.java | 2 -- .../cache/GridCacheMarshallingNodeJoinSelfTest.java | 2 -- .../cache/GridCacheMultinodeUpdateNearEnabledSelfTest.java | 2 -- .../cache/GridCacheStoreManagerDeserializationTest.java | 2 -- .../processors/cache/GridCacheVariableTopologySelfTest.java | 2 -- .../cache/IgniteCacheInvokeReadThroughSingleNodeTest.java | 2 -- .../processors/cache/IgniteCacheInvokeReadThroughTest.java | 2 -- .../cache/IgniteCacheReadThroughEvictionSelfTest.java | 2 -- .../processors/cache/IgniteCacheReadThroughStoreCallTest.java | 2 -- .../processors/cache/IgniteCacheTxCopyOnReadDisabledTest.java | 2 -- .../processors/cache/IgniteCacheTxLocalPeekModesTest.java | 2 -- .../processors/cache/IgniteCacheTxLocalStoreValueTest.java | 2 -- .../cache/IgniteCacheTxNearEnabledStoreValueTest.java | 2 -- .../processors/cache/IgniteCacheTxNearPeekModesTest.java | 2 -- .../processors/cache/IgniteCacheTxStoreValueTest.java | 2 -- .../cache/distributed/GridCacheLockAbstractTest.java | 2 -- .../cache/distributed/GridCacheMultiNodeLockAbstractTest.java | 2 -- .../cache/distributed/GridCacheNodeFailureAbstractTest.java | 2 -- .../cache/distributed/IgniteTxRemoveTimeoutObjectsTest.java | 2 -- .../distributed/dht/IgniteCacheLockFailoverSelfTest.java | 2 -- .../cache/distributed/dht/IgniteCacheMultiTxLockSelfTest.java | 2 -- .../distributed/near/GridCacheNearMultiNodeSelfTest.java | 2 -- .../cache/distributed/near/GridCacheNearOneNodeSelfTest.java | 2 -- .../distributed/near/GridCacheNearTxPreloadSelfTest.java | 2 -- .../distributed/near/GridCachePartitionedEventSelfTest.java | 2 -- .../cache/distributed/near/IgniteCacheNearOnlyTxTest.java | 2 -- .../distributed/near/IgniteCacheNearReadCommittedTest.java | 2 -- .../cache/integration/IgniteCacheLoadAllAbstractTest.java | 2 -- .../cache/integration/IgniteCacheTxLoaderWriterTest.java | 2 -- .../cache/integration/IgniteCacheTxLocalLoadAllTest.java | 2 -- .../IgniteCacheTxLocalNoLoadPreviousValueTest.java | 2 -- .../integration/IgniteCacheTxLocalNoReadThroughTest.java | 2 -- .../integration/IgniteCacheTxLocalNoWriteThroughTest.java | 2 -- .../IgniteCacheTxNearEnabledNoLoadPreviousValueTest.java | 2 -- .../IgniteCacheTxNearEnabledNoWriteThroughTest.java | 2 -- .../integration/IgniteCacheTxNoLoadPreviousValueTest.java | 2 -- .../cache/integration/IgniteCacheTxNoReadThroughTest.java | 2 -- .../cache/integration/IgniteCacheTxNoWriteThroughTest.java | 2 -- .../cache/integration/IgniteCacheTxStoreSessionTest.java | 2 -- .../IgniteCacheTxStoreSessionWriteBehindCoalescingTest.java | 2 -- .../integration/IgniteCacheTxStoreSessionWriteBehindTest.java | 2 -- .../cache/local/GridCacheLocalBasicApiSelfTest.java | 2 -- .../cache/local/GridCacheLocalBasicStoreSelfTest.java | 2 -- .../cache/local/GridCacheLocalEvictionEventSelfTest.java | 2 -- .../local/GridCacheLocalGetAndTransformStoreSelfTest.java | 2 -- .../processors/cache/local/GridCacheLocalLoadAllSelfTest.java | 2 -- .../processors/cache/local/GridCacheLocalLockSelfTest.java | 2 -- .../cache/local/GridCacheLocalMultithreadedSelfTest.java | 2 -- .../cache/local/GridCacheLocalTxTimeoutSelfTest.java | 2 -- .../cache/store/GridCacheWriteBehindStoreAbstractTest.java | 2 -- .../cache/store/GridCacheWriteBehindStoreLocalTest.java | 2 -- .../cache/transactions/TxRollbackAsyncNearCacheTest.java | 2 -- .../CacheVersionedEntryLocalTransactionalSelfTest.java | 2 -- .../testframework/junits/common/GridCommonAbstractTest.java | 4 ---- .../ignite/testframework/junits/spi/GridSpiAbstractTest.java | 4 ---- .../apache/ignite/util/mbeans/GridMBeanDisableSelfTest.java | 4 ---- 64 files changed, 134 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreListenerRWThroughDisabledTransactionalCacheTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreListenerRWThroughDisabledTransactionalCacheTest.java index 0fa1994fd0606..e2b658ca47010 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreListenerRWThroughDisabledTransactionalCacheTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreListenerRWThroughDisabledTransactionalCacheTest.java @@ -24,7 +24,6 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; -import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -43,7 +42,6 @@ @RunWith(JUnit4.class) public class CacheStoreListenerRWThroughDisabledTransactionalCacheTest extends CacheStoreSessionListenerReadWriteThroughDisabledAbstractTest { /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerWriteBehindEnabledTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerWriteBehindEnabledTest.java index db543755fe59e..1db21130656c5 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerWriteBehindEnabledTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerWriteBehindEnabledTest.java @@ -44,7 +44,6 @@ import org.apache.ignite.internal.processors.cache.store.GridCacheWriteBehindStore; import org.apache.ignite.resources.CacheStoreSessionResource; import org.apache.ignite.testframework.GridTestUtils; -import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -73,7 +72,6 @@ public class CacheStoreSessionListenerWriteBehindEnabledTest extends GridCacheAb private static final AtomicInteger uninitializedListenerCnt = new AtomicInteger(); /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheRemoveAllSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheRemoveAllSelfTest.java index 3f2f75aaeac9d..665e7cee9adb5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheRemoveAllSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheRemoveAllSelfTest.java @@ -24,7 +24,6 @@ import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.GridTestUtils; -import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -36,7 +35,6 @@ @RunWith(JUnit4.class) public class CacheRemoveAllSelfTest extends GridCacheAbstractSelfTest { /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { if (MvccFeatureChecker.forcedMvcc()) fail("https://issues.apache.org/jira/browse/IGNITE-10082"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java index e709bfd58d988..c091765861e72 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java @@ -104,7 +104,6 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.jetbrains.annotations.Nullable; -import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -181,7 +180,6 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract }; /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { if (MvccFeatureChecker.forcedMvcc()) fail("https://issues.apache.org/jira/browse/IGNITE-9543"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicStoreAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicStoreAbstractTest.java index b48e58b63001e..6e1ed68869f49 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicStoreAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicStoreAbstractTest.java @@ -37,7 +37,6 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.jetbrains.annotations.Nullable; -import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -60,7 +59,6 @@ public abstract class GridCacheBasicStoreAbstractTest extends GridCommonAbstract private static final GridCacheTestStore store = new GridCacheTestStore(); /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionEventAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionEventAbstractTest.java index 6d83a07afccc0..c87b3a85e43a3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionEventAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionEventAbstractTest.java @@ -37,7 +37,6 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; -import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -56,7 +55,6 @@ public abstract class GridCacheEvictionEventAbstractTest extends GridCommonAbstr private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.EVICTION); MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_EVENTS); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGetAndTransformStoreAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGetAndTransformStoreAbstractTest.java index b32f7d2b677b6..b089f1a3cccef 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGetAndTransformStoreAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGetAndTransformStoreAbstractTest.java @@ -34,7 +34,6 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; -import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -55,7 +54,6 @@ public abstract class GridCacheGetAndTransformStoreAbstractTest extends GridComm private static final GridCacheTestStore store = new GridCacheTestStore(); /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorLocalSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorLocalSelfTest.java index 9dc71f7e5524b..f6e2c07235c29 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorLocalSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorLocalSelfTest.java @@ -20,7 +20,6 @@ import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.cache.CacheMode; import org.apache.ignite.testframework.MvccFeatureChecker; -import org.junit.Before; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.LOCAL; @@ -30,7 +29,6 @@ */ public class GridCacheInterceptorLocalSelfTest extends GridCacheInterceptorAbstractSelfTest { /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorLocalWithStoreSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorLocalWithStoreSelfTest.java index 29bbf23f136b9..0620c3c34f36c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorLocalWithStoreSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorLocalWithStoreSelfTest.java @@ -18,14 +18,12 @@ package org.apache.ignite.internal.processors.cache; import org.apache.ignite.testframework.MvccFeatureChecker; -import org.junit.Before; /** * Tests {@link org.apache.ignite.cache.CacheInterceptor}. */ public class GridCacheInterceptorLocalWithStoreSelfTest extends GridCacheInterceptorLocalSelfTest { /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMarshallingNodeJoinSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMarshallingNodeJoinSelfTest.java index fd79334485540..241e27789307c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMarshallingNodeJoinSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMarshallingNodeJoinSelfTest.java @@ -42,7 +42,6 @@ import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; -import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -58,7 +57,6 @@ public class GridCacheMarshallingNodeJoinSelfTest extends GridCommonAbstractTest private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateNearEnabledSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateNearEnabledSelfTest.java index 9925d18932a18..05f5aa8418d36 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateNearEnabledSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateNearEnabledSelfTest.java @@ -19,7 +19,6 @@ import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.configuration.NearCacheConfiguration; -import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -33,7 +32,6 @@ @RunWith(JUnit4.class) public class GridCacheMultinodeUpdateNearEnabledSelfTest extends GridCacheMultinodeUpdateAbstractSelfTest { /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManagerDeserializationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManagerDeserializationTest.java index e12675c1f6933..243b42c75528c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManagerDeserializationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManagerDeserializationTest.java @@ -44,7 +44,6 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; -import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -73,7 +72,6 @@ public class GridCacheStoreManagerDeserializationTest extends GridCommonAbstract protected static final String CACHE_NAME = "cache_name"; /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVariableTopologySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVariableTopologySelfTest.java index 82f08173affed..b52c2068685c9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVariableTopologySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVariableTopologySelfTest.java @@ -39,7 +39,6 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionRollbackException; -import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -59,7 +58,6 @@ public class GridCacheVariableTopologySelfTest extends GridCommonAbstractTest { private TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { if (MvccFeatureChecker.forcedMvcc()) fail("https://issues.apache.org/jira/browse/IGNITE-7388"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughSingleNodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughSingleNodeTest.java index f8c01d4336ca1..c82e6175cfd5f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughSingleNodeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughSingleNodeTest.java @@ -17,7 +17,6 @@ package org.apache.ignite.internal.processors.cache; -import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -37,7 +36,6 @@ @RunWith(JUnit4.class) public class IgniteCacheInvokeReadThroughSingleNodeTest extends IgniteCacheInvokeReadThroughAbstractTest { /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughTest.java index 051ca6312c4fd..d2d21767c038d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughTest.java @@ -17,7 +17,6 @@ package org.apache.ignite.internal.processors.cache; -import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -36,7 +35,6 @@ @RunWith(JUnit4.class) public class IgniteCacheInvokeReadThroughTest extends IgniteCacheInvokeReadThroughAbstractTest { /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughEvictionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughEvictionSelfTest.java index 335ac0d6bc107..0135732d96cfe 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughEvictionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughEvictionSelfTest.java @@ -37,7 +37,6 @@ import javax.cache.expiry.Duration; import javax.cache.expiry.ExpiryPolicy; import java.util.concurrent.TimeUnit; -import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -55,7 +54,6 @@ public class IgniteCacheReadThroughEvictionSelfTest extends IgniteCacheConfigVar private static final int KEYS = 100; /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughStoreCallTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughStoreCallTest.java index 23037d9a4603d..ed22b3983eeaf 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughStoreCallTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughStoreCallTest.java @@ -45,7 +45,6 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.jetbrains.annotations.Nullable; -import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -71,7 +70,6 @@ public class IgniteCacheReadThroughStoreCallTest extends GridCommonAbstractTest protected boolean client; /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxCopyOnReadDisabledTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxCopyOnReadDisabledTest.java index da3226548a136..1b44df8678ee7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxCopyOnReadDisabledTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxCopyOnReadDisabledTest.java @@ -19,7 +19,6 @@ import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.testframework.MvccFeatureChecker; -import org.junit.Before; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -28,7 +27,6 @@ */ public class IgniteCacheTxCopyOnReadDisabledTest extends IgniteCacheCopyOnReadDisabledAbstractTest { /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxLocalPeekModesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxLocalPeekModesTest.java index 2fc36dd17a1db..ccc2950d57eec 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxLocalPeekModesTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxLocalPeekModesTest.java @@ -20,7 +20,6 @@ import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.cache.CacheMode; import org.apache.ignite.testframework.MvccFeatureChecker; -import org.junit.Before; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.LOCAL; @@ -30,7 +29,6 @@ */ public class IgniteCacheTxLocalPeekModesTest extends IgniteCachePeekModesAbstractTest { /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxLocalStoreValueTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxLocalStoreValueTest.java index 9783fba6db3b9..9a0385fea1348 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxLocalStoreValueTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxLocalStoreValueTest.java @@ -21,7 +21,6 @@ import org.apache.ignite.cache.CacheMode; import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.testframework.MvccFeatureChecker; -import org.junit.Before; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.LOCAL; @@ -31,7 +30,6 @@ */ public class IgniteCacheTxLocalStoreValueTest extends IgniteCacheStoreValueAbstractTest { /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxNearEnabledStoreValueTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxNearEnabledStoreValueTest.java index 787fa61163444..d3f0618b64ca9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxNearEnabledStoreValueTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxNearEnabledStoreValueTest.java @@ -19,14 +19,12 @@ import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.testframework.MvccFeatureChecker; -import org.junit.Before; /** * */ public class IgniteCacheTxNearEnabledStoreValueTest extends IgniteCacheTxStoreValueTest { /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxNearPeekModesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxNearPeekModesTest.java index 8a396e33dfb95..193e6ee37dac1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxNearPeekModesTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxNearPeekModesTest.java @@ -17,7 +17,6 @@ package org.apache.ignite.internal.processors.cache; -import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -30,7 +29,6 @@ @RunWith(JUnit4.class) public class IgniteCacheTxNearPeekModesTest extends IgniteCacheTxPeekModesTest { /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxStoreValueTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxStoreValueTest.java index 782d7835772ed..eb5edd0baab6e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxStoreValueTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxStoreValueTest.java @@ -21,7 +21,6 @@ import org.apache.ignite.cache.CacheMode; import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.testframework.MvccFeatureChecker; -import org.junit.Before; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -31,7 +30,6 @@ */ public class IgniteCacheTxStoreValueTest extends IgniteCacheStoreValueAbstractTest { /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.INTERCEPTOR); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheLockAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheLockAbstractTest.java index 9663864f4c86c..216901c105836 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheLockAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheLockAbstractTest.java @@ -41,7 +41,6 @@ import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; -import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -72,7 +71,6 @@ public abstract class GridCacheLockAbstractTest extends GridCommonAbstractTest { private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.ENTRY_LOCK); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java index 4559762ecbf2f..5aa0a6ae40276 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java @@ -41,7 +41,6 @@ import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; -import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -70,7 +69,6 @@ public abstract class GridCacheMultiNodeLockAbstractTest extends GridCommonAbstr private static Collection> lsnrs = new ArrayList<>(); /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.ENTRY_LOCK); MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_EVENTS); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheNodeFailureAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheNodeFailureAbstractTest.java index 9b82354d4e35b..75d119e3a7511 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheNodeFailureAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheNodeFailureAbstractTest.java @@ -42,7 +42,6 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; -import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -82,7 +81,6 @@ public abstract class GridCacheNodeFailureAbstractTest extends GridCommonAbstrac private static final List IGNITEs = new ArrayList<>(); /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.ENTRY_LOCK); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxRemoveTimeoutObjectsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxRemoveTimeoutObjectsTest.java index a005557044696..b186b45e983e1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxRemoveTimeoutObjectsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxRemoveTimeoutObjectsTest.java @@ -35,7 +35,6 @@ import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionTimeoutException; -import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -62,7 +61,6 @@ public class IgniteTxRemoveTimeoutObjectsTest extends GridCacheAbstractSelfTest } /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { if (MvccFeatureChecker.forcedMvcc()) fail("https://issues.apache.org/jira/browse/IGNITE-7388"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheLockFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheLockFailoverSelfTest.java index 70b65b1cd771c..e97931f9478a4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheLockFailoverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheLockFailoverSelfTest.java @@ -31,7 +31,6 @@ import org.apache.ignite.lang.IgniteFutureTimeoutException; import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi; import org.apache.ignite.testframework.GridTestUtils; -import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -44,7 +43,6 @@ @RunWith(JUnit4.class) public class IgniteCacheLockFailoverSelfTest extends GridCacheAbstractSelfTest { /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.ENTRY_LOCK); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheMultiTxLockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheMultiTxLockSelfTest.java index 50b8db753cce9..da237baf581b6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheMultiTxLockSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheMultiTxLockSelfTest.java @@ -36,7 +36,6 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; -import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -66,7 +65,6 @@ public class IgniteCacheMultiTxLockSelfTest extends GridCommonAbstractTest { private volatile Throwable err; /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.ENTRY_LOCK); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiNodeSelfTest.java index 0e0bc96d50280..f3f1048729a1c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiNodeSelfTest.java @@ -60,7 +60,6 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.jetbrains.annotations.Nullable; -import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -86,7 +85,6 @@ public class GridCacheNearMultiNodeSelfTest extends GridCommonAbstractTest { private static TestStore store = new TestStore(); /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOneNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOneNodeSelfTest.java index 8b33512608dee..635f80dd819c5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOneNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOneNodeSelfTest.java @@ -34,7 +34,6 @@ import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; -import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -54,7 +53,6 @@ public class GridCacheNearOneNodeSelfTest extends GridCommonAbstractTest { private static TestStore store = new TestStore(); /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearTxPreloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearTxPreloadSelfTest.java index db2a591128f33..0cec87e90d9dd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearTxPreloadSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearTxPreloadSelfTest.java @@ -22,7 +22,6 @@ import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.internal.processors.cache.distributed.IgniteTxPreloadAbstractTest; import org.apache.ignite.testframework.MvccFeatureChecker; -import org.junit.Before; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -31,7 +30,6 @@ */ public class GridCacheNearTxPreloadSelfTest extends IgniteTxPreloadAbstractTest { /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedEventSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedEventSelfTest.java index 681afffd8e544..ce782172c2860 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedEventSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedEventSelfTest.java @@ -22,7 +22,6 @@ import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.internal.processors.cache.distributed.GridCacheEventAbstractTest; import org.apache.ignite.testframework.MvccFeatureChecker; -import org.junit.Before; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -33,7 +32,6 @@ */ public class GridCachePartitionedEventSelfTest extends GridCacheEventAbstractTest { /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_EVENTS); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearOnlyTxTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearOnlyTxTest.java index 7fda3ec195808..6939eb376694e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearOnlyTxTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearOnlyTxTest.java @@ -31,7 +31,6 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.transactions.Transaction; -import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -47,7 +46,6 @@ @RunWith(JUnit4.class) public class IgniteCacheNearOnlyTxTest extends IgniteCacheAbstractTest { /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearReadCommittedTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearReadCommittedTest.java index 0112c06ad23c2..3a1a55d5805f3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearReadCommittedTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearReadCommittedTest.java @@ -24,7 +24,6 @@ import org.apache.ignite.internal.processors.cache.GridCacheAbstractSelfTest; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.transactions.Transaction; -import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -40,7 +39,6 @@ @RunWith(JUnit4.class) public class IgniteCacheNearReadCommittedTest extends GridCacheAbstractSelfTest { /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheLoadAllAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheLoadAllAbstractTest.java index 185a1c5321fa5..b8d6e304289a3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheLoadAllAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheLoadAllAbstractTest.java @@ -35,7 +35,6 @@ import org.apache.ignite.cluster.ClusterNode; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.internal.processors.cache.IgniteCacheAbstractTest; -import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -53,7 +52,6 @@ public abstract class IgniteCacheLoadAllAbstractTest extends IgniteCacheAbstract private static ConcurrentHashMap storeMap; /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLoaderWriterTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLoaderWriterTest.java index fb77b8790d0ea..29ba7f1f3f6e5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLoaderWriterTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLoaderWriterTest.java @@ -21,7 +21,6 @@ import org.apache.ignite.cache.CacheMode; import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.testframework.MvccFeatureChecker; -import org.junit.Before; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -31,7 +30,6 @@ */ public class IgniteCacheTxLoaderWriterTest extends IgniteCacheLoaderWriterAbstractTest { /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalLoadAllTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalLoadAllTest.java index 240e6f90ee461..391fde2940edf 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalLoadAllTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalLoadAllTest.java @@ -21,7 +21,6 @@ import org.apache.ignite.cache.CacheMode; import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.testframework.MvccFeatureChecker; -import org.junit.Before; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.LOCAL; @@ -31,7 +30,6 @@ */ public class IgniteCacheTxLocalLoadAllTest extends IgniteCacheLoadAllAbstractTest { /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoLoadPreviousValueTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoLoadPreviousValueTest.java index 82ac79163ce47..9b4afdba072a5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoLoadPreviousValueTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoLoadPreviousValueTest.java @@ -21,7 +21,6 @@ import org.apache.ignite.cache.CacheMode; import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.testframework.MvccFeatureChecker; -import org.junit.Before; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.LOCAL; @@ -31,7 +30,6 @@ */ public class IgniteCacheTxLocalNoLoadPreviousValueTest extends IgniteCacheNoLoadPreviousValueAbstractTest { /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoReadThroughTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoReadThroughTest.java index 2b42ac59773a5..470e65e1b9754 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoReadThroughTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoReadThroughTest.java @@ -21,7 +21,6 @@ import org.apache.ignite.cache.CacheMode; import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.testframework.MvccFeatureChecker; -import org.junit.Before; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.LOCAL; @@ -31,7 +30,6 @@ */ public class IgniteCacheTxLocalNoReadThroughTest extends IgniteCacheNoReadThroughAbstractTest { /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoWriteThroughTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoWriteThroughTest.java index 515f01bf982d3..3e5ae2d75ad7e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoWriteThroughTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoWriteThroughTest.java @@ -21,7 +21,6 @@ import org.apache.ignite.cache.CacheMode; import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.testframework.MvccFeatureChecker; -import org.junit.Before; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.LOCAL; @@ -31,7 +30,6 @@ */ public class IgniteCacheTxLocalNoWriteThroughTest extends IgniteCacheNoWriteThroughAbstractTest { /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNearEnabledNoLoadPreviousValueTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNearEnabledNoLoadPreviousValueTest.java index f5f89c517587e..019cf1e1e33f3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNearEnabledNoLoadPreviousValueTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNearEnabledNoLoadPreviousValueTest.java @@ -19,14 +19,12 @@ import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.testframework.MvccFeatureChecker; -import org.junit.Before; /** * */ public class IgniteCacheTxNearEnabledNoLoadPreviousValueTest extends IgniteCacheTxNoLoadPreviousValueTest { /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNearEnabledNoWriteThroughTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNearEnabledNoWriteThroughTest.java index 5ed67db972632..7a58800546d0b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNearEnabledNoWriteThroughTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNearEnabledNoWriteThroughTest.java @@ -19,14 +19,12 @@ import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.testframework.MvccFeatureChecker; -import org.junit.Before; /** * */ public class IgniteCacheTxNearEnabledNoWriteThroughTest extends IgniteCacheTxNoWriteThroughTest { /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNoLoadPreviousValueTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNoLoadPreviousValueTest.java index bee02ca0680f8..fe71fe9cacc22 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNoLoadPreviousValueTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNoLoadPreviousValueTest.java @@ -21,7 +21,6 @@ import org.apache.ignite.cache.CacheMode; import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.testframework.MvccFeatureChecker; -import org.junit.Before; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -31,7 +30,6 @@ */ public class IgniteCacheTxNoLoadPreviousValueTest extends IgniteCacheNoLoadPreviousValueAbstractTest { /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNoReadThroughTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNoReadThroughTest.java index 915350d756f52..b477b8821d153 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNoReadThroughTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNoReadThroughTest.java @@ -21,7 +21,6 @@ import org.apache.ignite.cache.CacheMode; import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.testframework.MvccFeatureChecker; -import org.junit.Before; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -31,7 +30,6 @@ */ public class IgniteCacheTxNoReadThroughTest extends IgniteCacheNoReadThroughAbstractTest { /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNoWriteThroughTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNoWriteThroughTest.java index a54d7ae65ab14..12ca66c231913 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNoWriteThroughTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNoWriteThroughTest.java @@ -21,7 +21,6 @@ import org.apache.ignite.cache.CacheMode; import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.testframework.MvccFeatureChecker; -import org.junit.Before; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -31,7 +30,6 @@ */ public class IgniteCacheTxNoWriteThroughTest extends IgniteCacheNoWriteThroughAbstractTest { /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionTest.java index 0fd51ab0e8a71..741dd2a37d438 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionTest.java @@ -29,7 +29,6 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; -import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -45,7 +44,6 @@ @RunWith(JUnit4.class) public class IgniteCacheTxStoreSessionTest extends IgniteCacheStoreSessionAbstractTest { /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionWriteBehindCoalescingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionWriteBehindCoalescingTest.java index 12f827bbb64a4..cd88184eaf025 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionWriteBehindCoalescingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionWriteBehindCoalescingTest.java @@ -23,7 +23,6 @@ import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.testframework.MvccFeatureChecker; -import org.junit.Before; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -33,7 +32,6 @@ */ public class IgniteCacheTxStoreSessionWriteBehindCoalescingTest extends IgniteCacheStoreSessionWriteBehindAbstractTest { /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionWriteBehindTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionWriteBehindTest.java index c57caaa889291..533ab31c8f1de 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionWriteBehindTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionWriteBehindTest.java @@ -19,7 +19,6 @@ import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.testframework.MvccFeatureChecker; -import org.junit.Before; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -28,7 +27,6 @@ */ public class IgniteCacheTxStoreSessionWriteBehindTest extends IgniteCacheStoreSessionWriteBehindAbstractTest { /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalBasicApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalBasicApiSelfTest.java index 86ea47db13377..84bcdd7d537b1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalBasicApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalBasicApiSelfTest.java @@ -21,7 +21,6 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.processors.cache.GridCacheBasicApiAbstractTest; import org.apache.ignite.testframework.MvccFeatureChecker; -import org.junit.Before; import static org.apache.ignite.cache.CacheMode.LOCAL; @@ -30,7 +29,6 @@ */ public class GridCacheLocalBasicApiSelfTest extends GridCacheBasicApiAbstractTest { /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalBasicStoreSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalBasicStoreSelfTest.java index 430a911db932a..b17dd681b7695 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalBasicStoreSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalBasicStoreSelfTest.java @@ -20,7 +20,6 @@ import org.apache.ignite.cache.CacheMode; import org.apache.ignite.internal.processors.cache.GridCacheBasicStoreAbstractTest; import org.apache.ignite.testframework.MvccFeatureChecker; -import org.junit.Before; import static org.apache.ignite.cache.CacheMode.LOCAL; @@ -29,7 +28,6 @@ */ public class GridCacheLocalBasicStoreSelfTest extends GridCacheBasicStoreAbstractTest { /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalEvictionEventSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalEvictionEventSelfTest.java index f808edea08544..f5ce88e30aa46 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalEvictionEventSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalEvictionEventSelfTest.java @@ -21,7 +21,6 @@ import org.apache.ignite.cache.CacheMode; import org.apache.ignite.internal.processors.cache.GridCacheEvictionEventAbstractTest; import org.apache.ignite.testframework.MvccFeatureChecker; -import org.junit.Before; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -30,7 +29,6 @@ */ public class GridCacheLocalEvictionEventSelfTest extends GridCacheEvictionEventAbstractTest { /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalGetAndTransformStoreSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalGetAndTransformStoreSelfTest.java index 0cb53335fdbc8..8fbec61ccafb4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalGetAndTransformStoreSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalGetAndTransformStoreSelfTest.java @@ -20,7 +20,6 @@ import org.apache.ignite.cache.CacheMode; import org.apache.ignite.internal.processors.cache.GridCacheGetAndTransformStoreAbstractTest; import org.apache.ignite.testframework.MvccFeatureChecker; -import org.junit.Before; import static org.apache.ignite.cache.CacheMode.LOCAL; @@ -29,7 +28,6 @@ */ public class GridCacheLocalGetAndTransformStoreSelfTest extends GridCacheGetAndTransformStoreAbstractTest { /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalLoadAllSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalLoadAllSelfTest.java index f5e453c1bc0bd..638a49f848e68 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalLoadAllSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalLoadAllSelfTest.java @@ -29,7 +29,6 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; -import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -42,7 +41,6 @@ @RunWith(JUnit4.class) public class GridCacheLocalLoadAllSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalLockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalLockSelfTest.java index 1dbb8b122af96..4bd013ef1a244 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalLockSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalLockSelfTest.java @@ -31,7 +31,6 @@ import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; -import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -44,7 +43,6 @@ @RunWith(JUnit4.class) public class GridCacheLocalLockSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalMultithreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalMultithreadedSelfTest.java index a10f67443acb4..f5b659acdabe3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalMultithreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalMultithreadedSelfTest.java @@ -36,7 +36,6 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; -import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -49,7 +48,6 @@ @RunWith(JUnit4.class) public class GridCacheLocalMultithreadedSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxTimeoutSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxTimeoutSelfTest.java index ec87f675ced76..e7297e91b0e9a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxTimeoutSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxTimeoutSelfTest.java @@ -31,7 +31,6 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.apache.ignite.transactions.TransactionTimeoutException; -import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -49,7 +48,6 @@ @RunWith(JUnit4.class) public class GridCacheLocalTxTimeoutSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStoreAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStoreAbstractTest.java index 25cf6efad6c69..7ac71262b7bbb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStoreAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStoreAbstractTest.java @@ -38,7 +38,6 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.jetbrains.annotations.Nullable; -import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -59,7 +58,6 @@ public abstract class GridCacheWriteBehindStoreAbstractTest extends GridCommonAb private static final GridCacheTestStore store = new GridCacheTestStore(); /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStoreLocalTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStoreLocalTest.java index 8eaffe1b0a482..f35b674156ed0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStoreLocalTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStoreLocalTest.java @@ -19,14 +19,12 @@ import org.apache.ignite.cache.CacheMode; import org.apache.ignite.testframework.MvccFeatureChecker; -import org.junit.Before; /** * Tests {@link org.apache.ignite.internal.processors.cache.store.GridCacheWriteBehindStore} in grid configuration. */ public class GridCacheWriteBehindStoreLocalTest extends GridCacheWriteBehindStoreAbstractTest { /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackAsyncNearCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackAsyncNearCacheTest.java index 8a5aad43ba025..dc115e1dc62d6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackAsyncNearCacheTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackAsyncNearCacheTest.java @@ -18,7 +18,6 @@ package org.apache.ignite.internal.processors.cache.transactions; import org.apache.ignite.testframework.MvccFeatureChecker; -import org.junit.Before; /** * Tests an ability to async rollback near transactions. @@ -30,7 +29,6 @@ public class TxRollbackAsyncNearCacheTest extends TxRollbackAsyncTest { } /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryLocalTransactionalSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryLocalTransactionalSelfTest.java index 81b018acee4e7..1797bbea40232 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryLocalTransactionalSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryLocalTransactionalSelfTest.java @@ -20,7 +20,6 @@ import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.cache.CacheMode; import org.apache.ignite.testframework.MvccFeatureChecker; -import org.junit.Before; /** * @@ -42,7 +41,6 @@ public class CacheVersionedEntryLocalTransactionalSelfTest extends CacheVersione } /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java index e32617d4a2cf1..0c6e718175e38 100755 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java @@ -117,8 +117,6 @@ import org.apache.ignite.transactions.TransactionRollbackException; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import org.junit.After; -import org.junit.Before; import static org.apache.ignite.cache.CacheMode.LOCAL; import static org.apache.ignite.cache.CacheRebalanceMode.NONE; @@ -492,7 +490,6 @@ protected GridNearCacheAdapter near(int idx, String cache) { } /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { // Disable SSL hostname verifier. HttpsURLConnection.setDefaultHostnameVerifier(new HostnameVerifier() { @@ -507,7 +504,6 @@ protected GridNearCacheAdapter near(int idx, String cache) { } /** {@inheritDoc} */ - @After @Override public void tearDown() throws Exception { getTestCounters().incrementStopped(); diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/spi/GridSpiAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/spi/GridSpiAbstractTest.java index 52aace7a3366c..05ebddfe70652 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/spi/GridSpiAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/spi/GridSpiAbstractTest.java @@ -54,8 +54,6 @@ import org.apache.ignite.testframework.junits.IgniteTestResources; import org.apache.ignite.testframework.junits.spi.GridSpiTestConfig.ConfigType; import org.jetbrains.annotations.Nullable; -import org.junit.After; -import org.junit.Before; import static org.apache.ignite.lang.IgniteProductVersion.fromString; @@ -128,7 +126,6 @@ private void resetTestData() throws Exception { /** * @throws Exception If failed. */ - @Before @Override public final void setUp() throws Exception { // Need to change classloader here, although it also handled in the parent class // the current test initialisation procedure doesn't allow us to setUp the parent first. @@ -493,7 +490,6 @@ protected UUID getNodeId() throws Exception { /** * @throws Exception If failed. */ - @After @Override public final void tearDown() throws Exception { getTestCounters().incrementStopped(); diff --git a/modules/core/src/test/java/org/apache/ignite/util/mbeans/GridMBeanDisableSelfTest.java b/modules/core/src/test/java/org/apache/ignite/util/mbeans/GridMBeanDisableSelfTest.java index 55e06d51af29b..6758fdaf7a709 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/mbeans/GridMBeanDisableSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/mbeans/GridMBeanDisableSelfTest.java @@ -27,8 +27,6 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; -import org.junit.After; -import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -39,7 +37,6 @@ @RunWith(JUnit4.class) public class GridMBeanDisableSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ - @Before @Override public void setUp() throws Exception { IgniteUtils.IGNITE_MBEANS_DISABLED = true; @@ -47,7 +44,6 @@ public class GridMBeanDisableSelfTest extends GridCommonAbstractTest { } /** {@inheritDoc} */ - @After @Override public void tearDown() throws Exception { IgniteUtils.IGNITE_MBEANS_DISABLED = false; From 7e4c26a32a2cd061f0688ab2fc62ea0e6ef84ffd Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Mon, 17 Dec 2018 21:31:27 +0300 Subject: [PATCH 116/176] IGNITE-10177 Junit 3 cleanup - wip - cleanup -- verified with diffs overview and rebuild --- .../logger/log4j/GridLog4jConfigUpdateTest.java | 9 ++++----- .../log4j/GridLog4jCorrectFileNameTest.java | 14 ++++++++------ .../logger/log4j/GridLog4jInitializedTest.java | 17 +++++++---------- .../logger/log4j/GridLog4jLoggingFileTest.java | 10 +++++----- .../logger/log4j/GridLog4jLoggingPathTest.java | 10 +++++----- .../logger/log4j/GridLog4jLoggingUrlTest.java | 10 +++++----- .../log4j/GridLog4jNotInitializedTest.java | 8 +++----- 7 files changed, 37 insertions(+), 41 deletions(-) diff --git a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jConfigUpdateTest.java b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jConfigUpdateTest.java index bb0f086f2a2ed..e2dc02ba600ed 100644 --- a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jConfigUpdateTest.java +++ b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jConfigUpdateTest.java @@ -21,18 +21,17 @@ import java.nio.file.Files; import java.nio.file.StandardCopyOption; import java.util.Date; -import junit.framework.TestCase; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.log4j.helpers.FileWatchdog; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; + +import static junit.framework.Assert.assertFalse; +import static junit.framework.Assert.assertTrue; /** * Checking that Log4j configuration is updated when its source file is changed. */ -@RunWith(JUnit4.class) -public class GridLog4jConfigUpdateTest extends TestCase { +public class GridLog4jConfigUpdateTest { /** Path to log4j configuration with INFO enabled. */ private static final String LOG_CONFIG_INFO = "modules/log4j/src/test/config/log4j-info.xml"; diff --git a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jCorrectFileNameTest.java b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jCorrectFileNameTest.java index a1e6a96ea7095..f166c000e6313 100644 --- a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jCorrectFileNameTest.java +++ b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jCorrectFileNameTest.java @@ -31,6 +31,8 @@ import org.apache.log4j.Logger; import org.apache.log4j.PatternLayout; import org.apache.log4j.varia.LevelRangeFilter; +import org.junit.After; +import org.junit.Before; import org.junit.Test; import static org.junit.Assert.assertNotNull; @@ -44,8 +46,9 @@ public class GridLog4jCorrectFileNameTest { /** Appender */ private Log4jRollingFileAppender appender; - /** TODO IGNITE-10177 add annotation @Before here. */ - private void setUp() { + /** */ + @Before + public void setUp() { Logger root = Logger.getRootLogger(); for (Enumeration appenders = root.getAllAppenders(); appenders.hasMoreElements(); ) { @@ -58,8 +61,9 @@ private void setUp() { root.addAppender(appender); } - /** TODO IGNITE-10177 add annotation @After here. */ - private void tearDown() { + /** */ + @After + public void tearDown() { if (appender != null) { Logger.getRootLogger().removeAppender(Log4jRollingFileAppender.class.getSimpleName()); @@ -74,10 +78,8 @@ private void tearDown() { */ @Test public void testLogFilesTwoNodes() throws Exception { - setUp(); checkOneNode(0); checkOneNode(1); - tearDown(); } /** diff --git a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jInitializedTest.java b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jInitializedTest.java index 9f3c10f762324..a8bb4fea91342 100644 --- a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jInitializedTest.java +++ b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jInitializedTest.java @@ -17,25 +17,22 @@ package org.apache.ignite.logger.log4j; -import junit.framework.TestCase; import org.apache.ignite.IgniteLogger; import org.apache.ignite.testframework.junits.common.GridCommonTest; import org.apache.log4j.BasicConfigurator; +import org.junit.Before; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; + +import static junit.framework.Assert.assertTrue; /** * Log4j initialized test. */ @GridCommonTest(group = "Logger") -@RunWith(JUnit4.class) -public class GridLog4jInitializedTest extends TestCase { - - /** - * @throws Exception If failed. - */ - @Override protected void setUp() throws Exception { +public class GridLog4jInitializedTest { + /** */ + @Before + public void setUp() { BasicConfigurator.configure(); } diff --git a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingFileTest.java b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingFileTest.java index 78b77d2685b07..a6d683e68ea92 100644 --- a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingFileTest.java +++ b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingFileTest.java @@ -21,6 +21,7 @@ import org.apache.ignite.IgniteLogger; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Before; import org.junit.Test; import static org.junit.Assert.assertTrue; @@ -36,8 +37,9 @@ public class GridLog4jLoggingFileTest { /** Logger config */ private File xml; - /** TODO IGNITE-10177 add annotation @Before here. */ - private void setUp() throws Exception { + /** */ + @Before + public void setUp() throws Exception { xml = GridTestUtils.resolveIgnitePath("modules/core/src/test/config/log4j-test.xml"); assert xml != null; @@ -50,9 +52,7 @@ private void setUp() throws Exception { * Tests log4j logging SPI. */ @Test - public void testLog() throws Exception { - setUp(); - + public void testLog() { System.out.println(log.toString()); assertTrue(log.toString().contains("Log4JLogger")); diff --git a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingPathTest.java b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingPathTest.java index 1d752e4d01798..b4840a41925d1 100644 --- a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingPathTest.java +++ b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingPathTest.java @@ -19,6 +19,7 @@ import org.apache.ignite.IgniteLogger; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Before; import org.junit.Test; import static org.junit.Assert.assertTrue; @@ -34,8 +35,9 @@ public class GridLog4jLoggingPathTest { /** Logger config */ private String path = "modules/core/src/test/config/log4j-test.xml"; - /** TODO IGNITE-10177 add annotation @Before here. */ - private void setUp() throws Exception { + /** */ + @Before + public void setUp() throws Exception { log = new Log4JLogger(path).getLogger(getClass()); } @@ -43,9 +45,7 @@ private void setUp() throws Exception { * Tests log4j logging SPI. */ @Test - public void testLog() throws Exception { - setUp(); - + public void testLog() { System.out.println(log.toString()); assertTrue(log.toString().contains("Log4JLogger")); diff --git a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingUrlTest.java b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingUrlTest.java index 4774448febdf5..e76625adc5f57 100644 --- a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingUrlTest.java +++ b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingUrlTest.java @@ -22,6 +22,7 @@ import org.apache.ignite.IgniteLogger; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Before; import org.junit.Test; import static org.junit.Assert.assertTrue; @@ -37,8 +38,9 @@ public class GridLog4jLoggingUrlTest { /** Logger config */ private URL url; - /** TODO IGNITE-10177 add annotation @Before here. */ - private void setUp() throws Exception { + /** */ + @Before + public void setUp() throws Exception { File xml = GridTestUtils.resolveIgnitePath("modules/core/src/test/config/log4j-test.xml"); assert xml != null; @@ -52,9 +54,7 @@ private void setUp() throws Exception { * Tests log4j logging SPI. */ @Test - public void testLog() throws Exception { - setUp(); - + public void testLog() { System.out.println(log.toString()); assertTrue(log.toString().contains("Log4JLogger")); diff --git a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jNotInitializedTest.java b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jNotInitializedTest.java index 12d6fc87bc100..c230e7ef6ffcb 100644 --- a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jNotInitializedTest.java +++ b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jNotInitializedTest.java @@ -17,19 +17,17 @@ package org.apache.ignite.logger.log4j; -import junit.framework.TestCase; import org.apache.ignite.IgniteLogger; import org.apache.ignite.testframework.junits.common.GridCommonTest; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; + +import static junit.framework.Assert.assertTrue; /** * Log4j not initialized test. */ @GridCommonTest(group = "Logger") -@RunWith(JUnit4.class) -public class GridLog4jNotInitializedTest extends TestCase { +public class GridLog4jNotInitializedTest { /** */ @Test public void testLogInitialize() { From 9ec77c6deaaf0e04a85e88c500c10f1e6853a9c4 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Tue, 18 Dec 2018 00:43:44 +0300 Subject: [PATCH 117/176] IGNITE-10177 Junit 3 cleanup - wip - cleanup -- verified with diffs overview and rebuild --- .../IgniteExamplesSelfTestSuite.java | 5 +- .../client/suite/IgniteClientTestSuite.java | 2 +- .../junits/GridAbstractTest.java | 100 ++-- .../testframework/junits/LegacySupport.java | 83 ++++ ...acheDataStructuresBinarySelfTestSuite.java | 8 +- .../testsuites/IgniteCacheMvccTestSuite1.java | 14 +- .../testsuites/IgniteCacheMvccTestSuite8.java | 8 +- .../testsuites/IgnitePdsMvccTestSuite.java | 5 +- .../testsuites/IgnitePdsMvccTestSuite2.java | 5 +- .../testsuites/IgnitePdsMvccTestSuite3.java | 7 +- .../testsuites/IgnitePdsMvccTestSuite4.java | 5 +- .../ignite/testsuites/IgnitePdsTestSuite.java | 5 +- .../testsuites/IgnitePdsTestSuite2.java | 5 +- .../testsuites/IgnitePdsTestSuite4.java | 5 +- .../flink/FlinkIgniteSinkSelfTestSuite.java | 5 +- .../testsuites/IgniteHibernateTestSuite.java | 7 +- .../IgniteBinaryCacheQueryTestSuite.java | 462 +++++++++--------- ...sr310Java8DateTimeApiSupportTestSuite.java | 5 +- .../ignite/testsuites/IgniteJtaTestSuite.java | 13 +- .../apache/ignite/ml/IgniteMLTestSuite.java | 2 +- .../ignite/ml/dataset/DatasetTestSuite.java | 11 +- .../ml/inference/InferenceTestSuite.java | 7 +- .../org/apache/ignite/ml/nn/MLPTestSuite.java | 7 +- .../ml/selection/SelectionTestSuite.java | 9 +- .../ignite/ml/tree/DecisionTreeTestSuite.java | 9 +- .../IgniteStormStreamerSelfTestSuite.java | 5 +- .../GridUriDeploymentMd5CheckSelfTest.java | 2 +- 27 files changed, 478 insertions(+), 323 deletions(-) create mode 100644 modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacySupport.java diff --git a/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesSelfTestSuite.java b/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesSelfTestSuite.java index 7e847d7e05251..780ff213de69c 100644 --- a/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesSelfTestSuite.java +++ b/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesSelfTestSuite.java @@ -49,13 +49,16 @@ import org.apache.ignite.examples.SqlExamplesSelfTest; import org.apache.ignite.examples.TaskExamplesMultiNodeSelfTest; import org.apache.ignite.examples.TaskExamplesSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Examples test suite. *

    * Contains all Ignite examples tests.

    */ -public class IgniteExamplesSelfTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteExamplesSelfTestSuite { /** * @return Suite. * @throws Exception If failed. diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/suite/IgniteClientTestSuite.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/suite/IgniteClientTestSuite.java index cb0730627e176..1caa243baedb0 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/client/suite/IgniteClientTestSuite.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/suite/IgniteClientTestSuite.java @@ -173,7 +173,7 @@ public static TestSuite suite() { suite.addTest(new JUnit4TestAdapter(ClientTcpTaskExecutionAfterTopologyRestartSelfTest.class)); // SSL params. - suite.addTestSuite(ClientSslParametersTest.class); + suite.addTest(new JUnit4TestAdapter(ClientSslParametersTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java index 241211c037060..1bd9eac32b969 100755 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java @@ -41,9 +41,10 @@ import java.util.concurrent.TimeoutException; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; +import java.util.concurrent.locks.Lock; +import java.util.concurrent.locks.ReentrantLock; import javax.cache.configuration.Factory; import javax.cache.configuration.FactoryBuilder; -import junit.framework.TestCase; import org.apache.ignite.Ignite; import org.apache.ignite.IgniteCache; import org.apache.ignite.IgniteCheckedException; @@ -121,9 +122,8 @@ import org.apache.log4j.RollingFileAppender; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import org.junit.After; -import org.junit.Before; import org.junit.Rule; +import org.junit.Test; import org.junit.rules.TestName; import org.junit.rules.TestRule; import org.junit.runners.model.Statement; @@ -148,7 +148,7 @@ "ProhibitedExceptionDeclared", "JUnitTestCaseWithNonTrivialConstructors" }) -public abstract class GridAbstractTest extends TestCase { +public abstract class GridAbstractTest extends LegacySupport { /************************************************************** * DO NOT REMOVE TRANSIENT - THIS OBJECT MIGHT BE TRANSFERRED * * TO ANOTHER NODE. * @@ -176,13 +176,21 @@ public abstract class GridAbstractTest extends TestCase { /** */ protected static final String DEFAULT_CACHE_NAME = "default"; + /** Lock to maintain integrity of {@link TestCounters}. */ + private final Lock runSerializer = new ReentrantLock(); + /** Supports obtaining test name for JUnit4 cases. */ @Rule public transient TestName nameRule = new TestName(); /** Manages test execution and reporting. */ @Rule public transient TestRule runRule = (base, description) -> new Statement() { @Override public void evaluate() throws Throwable { - runTest(base); + runSerializer.lock(); + try { + runTestCase(base); + } finally { + runSerializer.unlock(); + } } }; @@ -266,11 +274,13 @@ assert isJunitFrameworkClass() : "GridAbstractTest class cannot be extended dire this.startGrid = startGrid; } - /** {@inheritDoc} */ - @Override public String getName() { - String junit3Name = super.getName(); - - return junit3Name != null ? junit3Name : nameRule.getMethodName(); + /** + * Gets the name of the currently executed test case. + * + * @return Name of the currently executed test case. + */ + public String getName() { + return nameRule.getMethodName(); } /** @@ -552,9 +562,14 @@ protected GridTestKernalContext newContext(IgniteConfiguration cfg) throws Ignit /** * Called before execution of every test method in class. + *

    + * Do not annotate with Before in overriding methods.

    * * @throws Exception If failed. {@link #afterTest()} will be called in this case. + * @deprecated This method is deprecated. Instead of invoking or overriding it, it is recommended to make your own + * method with {@code @Before} annotation. */ + @Deprecated protected void beforeTest() throws Exception { // No-op. } @@ -562,18 +577,28 @@ protected void beforeTest() throws Exception { /** * Called after execution of every test method in class or if {@link #beforeTest()} failed without test method * execution. + *

    + * Do not annotate with After in overriding methods.

    * * @throws Exception If failed. + * @deprecated This method is deprecated. Instead of invoking or overriding it, it is recommended to make your own + * method with {@code @After} annotation. */ + @Deprecated protected void afterTest() throws Exception { // No-op. } /** * Called before execution of all test methods in class. + *

    + * Do not annotate with BeforeClass in overriding methods.

    * * @throws Exception If failed. {@link #afterTestsStopped()} will be called in this case. + * @deprecated This method is deprecated. Instead of invoking or overriding it, it is recommended to make your own + * method with {@code @BeforeClass} annotation. */ + @Deprecated protected void beforeTestsStarted() throws Exception { // Will clean and re-create marshaller directory from scratch. U.resolveWorkDirectory(U.defaultWorkDirectory(), "marshaller", true); @@ -583,16 +608,27 @@ protected void beforeTestsStarted() throws Exception { /** * Called after execution of all test methods in class or * if {@link #beforeTestsStarted()} failed without execution of any test methods. + *

    + * Do not annotate with AfterClass in overriding methods.

    * * @throws Exception If failed. + * @deprecated This method is deprecated. Instead of invoking or overriding it, it is recommended to make your own + * method with {@code @AfterClass} annotation. */ + @Deprecated protected void afterTestsStopped() throws Exception { // No-op. } - /** {@inheritDoc} */ - @Before - @Override public void setUp() throws Exception { + /** + * {@inheritDoc} + *

    + * Do not annotate with Before in overriding methods.

    + * @deprecated This method is deprecated. Instead of invoking or overriding it, it is recommended to make your own + * method with {@code @Before} annotation. + */ + @Deprecated + @Override protected void setUp() throws Exception { stopGridErr = false; clsLdr = Thread.currentThread().getContextClassLoader(); @@ -1142,7 +1178,6 @@ protected void stopGrid(@Nullable String igniteInstanceName) { * @param igniteInstanceName Ignite instance name. * @param cancel Cancel flag. */ - @SuppressWarnings({"deprecation"}) protected void stopGrid(@Nullable String igniteInstanceName, boolean cancel) { stopGrid(igniteInstanceName, cancel, true); } @@ -1152,7 +1187,6 @@ protected void stopGrid(@Nullable String igniteInstanceName, boolean cancel) { * @param cancel Cancel flag. * @param awaitTop Await topology change flag. */ - @SuppressWarnings({"deprecation"}) protected void stopGrid(@Nullable String igniteInstanceName, boolean cancel, boolean awaitTop) { try { IgniteEx ignite = grid(igniteInstanceName); @@ -1624,7 +1658,7 @@ public boolean isDebug() { * @param marshaller Marshaller to get checkpoint path for. * @return Path for specific marshaller. */ - @SuppressWarnings({"IfMayBeConditional", "deprecation"}) + @SuppressWarnings({"IfMayBeConditional"}) protected String getDefaultCheckpointPath(Marshaller marshaller) { if (marshaller instanceof JdkMarshaller) return SharedFsCheckpointSpi.DFLT_DIR_PATH + "/jdk/"; @@ -1767,9 +1801,15 @@ protected static ClassLoader getExternalClassLoader() { } } - /** {@inheritDoc} */ - @After - @Override public void tearDown() throws Exception { + /** + * {@inheritDoc} + *

    + * Do not annotate with After in overriding methods.

    + * @deprecated This method is deprecated. Instead of invoking or overriding it, it is recommended to make your own + * method with {@code @After} annotation. + */ + @Deprecated + @Override protected void tearDown() throws Exception { long dur = System.currentTimeMillis() - ts; info(">>> Stopping test: " + testDescription() + " in " + dur + " ms <<<"); @@ -2095,17 +2135,7 @@ protected synchronized TestCounters getTestCounters(IgniteConfiguration cfg) thr } /** {@inheritDoc} */ - @SuppressWarnings({"ProhibitedExceptionDeclared"}) - @Override protected void runTest() throws Throwable { - runTest(new Statement() { - @Override public void evaluate() throws Throwable { - GridAbstractTest.super.runTest(); - } - }); - } - - /** */ - private void runTest(Statement testRoutine) throws Throwable { + @Override void runTest(Statement testRoutine) throws Throwable { final AtomicReference ex = new AtomicReference<>(); Thread runner = new IgniteThread(getTestIgniteInstanceName(), "test-runner", new Runnable() { @@ -2498,6 +2528,12 @@ public ExecuteRemotelyTask(TestIgniteIdxCallable job, int idx) { /** * Test counters. + * + * TODO IGNITE-10179 Try to make this class go away since its primary (possibly even only) purpose appears to + * support methods isFirstTest() and isLastTest() which in turn look like JUnit 3-specific workaround for + * functionality that is natively available in JUnit 4 via BeforeClass and AfterClass annotations. Along the way, + * find out if this will allow to get rid of runSerializer lock which is introduced with sole purpose to + * maintain integrity of TestCounters. */ protected class TestCounters { /** */ @@ -2618,15 +2654,13 @@ public int getNumberOfTests() { cnt = 0; for (Method m : this0.getClass().getMethods()) - if (m.getName().startsWith("test") && Modifier.isPublic(m.getModifiers()) && m.getParameterCount() == 0) + if (m.getAnnotation(Test.class) != null) cnt++; } numOfTests = cnt; } - countTestCases(); - return numOfTests; } } diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacySupport.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacySupport.java new file mode 100644 index 0000000000000..c194d3db1cfee --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacySupport.java @@ -0,0 +1,83 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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.apache.ignite.testframework.junits; + +import junit.framework.Assert; // IMPL NOTE some old tests expect inherited deprecated assertions. +import junit.framework.Test; +import junit.framework.TestResult; +import org.junit.runners.model.Statement; + +/** + * Supports compatibility with old tests that expect specific threading behavior of JUnit 3 TestCase class, + * inherited deprecated assertions and specific old interface for GridTestUtils. + */ +@SuppressWarnings({"ExtendsUtilityClass", "deprecation"}) +abstract class LegacySupport extends Assert implements Test { + /** This method is called before a test is executed. */ + abstract void setUp() throws Exception; + + /** Runs test code in between {@code setUp} and {@code tearDown}. */ + abstract void runTest(Statement testRoutine) throws Throwable; + + /** This method is called after a test is executed. */ + abstract void tearDown() throws Exception; + + /** + * Runs the bare test sequence like in JUnit 3 class TestCase. + * + * @throws Throwable if any exception is thrown + */ + final void runTestCase(Statement testRoutine) throws Throwable { + Throwable e = null; + setUp(); + try { + runTest(testRoutine); + } catch (Throwable running) { + e = running; + } finally { + try { + tearDown(); + } catch (Throwable tearingDown) { + if (e == null) e = tearingDown; + } + } + if (e != null) throw e; + } + + /** + * {@inheritDoc} + *

    + * This method is here only for subclass to pretend implementing particular interface expected by some utility + * methods in GridTestUtils.

    + * + * @return Nothing. + */ + @Override public final int countTestCases() { + throw new UnsupportedOperationException("this method is not expected to be invoked"); + } + + /** + * {@inheritDoc} + *

    + * This method is here only for subclass to pretend implementing particular interface expected by some utility + * methods in GridTestUtils.

    + */ + @Override public final void run(TestResult res) { + throw new UnsupportedOperationException("this method is not expected to be invoked"); + } +} diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheDataStructuresBinarySelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheDataStructuresBinarySelfTestSuite.java index 38e236dbd85a4..f22e05dddca60 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheDataStructuresBinarySelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheDataStructuresBinarySelfTestSuite.java @@ -25,16 +25,18 @@ import org.apache.ignite.internal.processors.cache.datastructures.partitioned.GridCachePartitionedQueueApiSelfTest; import org.apache.ignite.internal.processors.cache.datastructures.partitioned.IgnitePartitionedQueueNoBackupsTest; import org.apache.ignite.internal.processors.cache.datastructures.replicated.GridCacheReplicatedQueueApiSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test suite for binary cache data structures. */ -public class IgniteCacheDataStructuresBinarySelfTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheDataStructuresBinarySelfTestSuite { /** * @return Cache test suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite Cache Data Structures Binary Test Suite"); System.setProperty(GridCacheQueueApiSelfAbstractTest.BINARY_QUEUE, "true"); diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite1.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite1.java index 1aac6ccad3d8c..ae3680d29136d 100755 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite1.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite1.java @@ -19,6 +19,7 @@ import java.util.HashSet; import java.util.Set; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.IgniteSystemProperties; import org.apache.ignite.cache.IgniteCacheEntryProcessorSequentialCallTest; @@ -110,11 +111,14 @@ import org.apache.ignite.internal.processors.cache.expiry.IgniteCacheAtomicLocalExpiryPolicyTest; import org.apache.ignite.internal.processors.cache.query.continuous.CacheEntryProcessorExternalizableFailedTest; import org.apache.ignite.internal.processors.cache.query.continuous.CacheEntryProcessorNonSerializableTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test suite. */ -public class IgniteCacheMvccTestSuite1 extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheMvccTestSuite1 { /** * @return IgniteCache test suite. */ @@ -235,10 +239,10 @@ public static TestSuite suite() { suite.addTest(IgniteBinaryCacheTestSuite.suite(ignoredTests)); // Add Mvcc clones. - suite.addTestSuite(GridCacheMvccMultiThreadedUpdateSelfTest.class); - suite.addTestSuite(CacheMvccTxFastFinishTest.class); - suite.addTestSuite(IgniteCacheMvccTxInvokeTest.class); - suite.addTestSuite(IgniteCacheMvccTxNearEnabledInvokeTest.class); + suite.addTest(new JUnit4TestAdapter(GridCacheMvccMultiThreadedUpdateSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheMvccTxFastFinishTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheMvccTxInvokeTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheMvccTxNearEnabledInvokeTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite8.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite8.java index 03ce6c18612d4..28732af2e640a 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite8.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite8.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; import java.util.HashSet; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.IgniteSystemProperties; import org.apache.ignite.internal.processors.cache.IgniteTopologyValidatorNearPartitionedAtomicCacheGroupsTest; @@ -57,11 +58,14 @@ import org.apache.ignite.internal.processors.cache.local.GridCacheAtomicLocalMetricsSelfTest; import org.apache.ignite.internal.processors.cache.local.GridCacheAtomicLocalTckMetricsSelfTestImpl; import org.apache.ignite.internal.processors.cache.local.GridCacheLocalAtomicMetricsNoReadThroughSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * */ -public class IgniteCacheMvccTestSuite8 extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheMvccTestSuite8 { /** * @return IgniteCache test suite. */ @@ -123,7 +127,7 @@ public static TestSuite suite() { suite.addTest(IgniteCacheTestSuite8.suite(ignoredTests)); // Add Mvcc clones. - suite.addTestSuite(GridCacheMvccNearEvictionSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridCacheMvccNearEvictionSelfTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsMvccTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsMvccTestSuite.java index 396f53bad893c..f92cab1bc1c17 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsMvccTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsMvccTestSuite.java @@ -40,11 +40,14 @@ import org.apache.ignite.internal.processors.cache.persistence.pagemem.PagesWriteThrottleSmokeTest; import org.apache.ignite.internal.processors.cache.persistence.wal.SegmentedRingByteBufferTest; import org.apache.ignite.internal.processors.cache.persistence.wal.aware.SegmentAwareTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * */ -public class IgnitePdsMvccTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgnitePdsMvccTestSuite { /** * @return Suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsMvccTestSuite2.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsMvccTestSuite2.java index 35928ce338e84..69718a5c512da 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsMvccTestSuite2.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsMvccTestSuite2.java @@ -44,11 +44,14 @@ import org.apache.ignite.internal.processors.cache.persistence.db.wal.crc.IgniteReplayWalIteratorInvalidCrcTest; import org.apache.ignite.internal.processors.cache.persistence.db.wal.crc.IgniteStandaloneWalIteratorInvalidCrcTest; import org.apache.ignite.internal.processors.cache.persistence.wal.reader.StandaloneWalRecordsIteratorTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * */ -public class IgnitePdsMvccTestSuite2 extends TestSuite { +@RunWith(AllTests.class) +public class IgnitePdsMvccTestSuite2 { /** * @return Suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsMvccTestSuite3.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsMvccTestSuite3.java index 03ba32312111f..2168bc7623ef4 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsMvccTestSuite3.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsMvccTestSuite3.java @@ -19,11 +19,14 @@ import java.util.HashSet; import junit.framework.TestSuite; import org.apache.ignite.IgniteSystemProperties; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Mvcc version of {@link IgnitePdsTestSuite3}. */ -public class IgnitePdsMvccTestSuite3 extends TestSuite { +@RunWith(AllTests.class) +public class IgnitePdsMvccTestSuite3 { /** * @return Suite. */ @@ -40,4 +43,4 @@ public static TestSuite suite() { return suite; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsMvccTestSuite4.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsMvccTestSuite4.java index bb93385a34eff..648ca42d3dcf9 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsMvccTestSuite4.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsMvccTestSuite4.java @@ -23,11 +23,14 @@ import org.apache.ignite.internal.processors.cache.persistence.IgnitePdsTaskCancelingTest; import org.apache.ignite.internal.processors.cache.persistence.db.IgnitePdsPartitionPreloadTest; import org.apache.ignite.internal.processors.cache.persistence.file.FileDownloaderTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Mvcc variant of {@link IgnitePdsTestSuite4}. */ -public class IgnitePdsMvccTestSuite4 extends TestSuite { +@RunWith(AllTests.class) +public class IgnitePdsMvccTestSuite4 { /** * @return Suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite.java index 5bfd0c41c85bd..443d126242e04 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite.java @@ -53,11 +53,14 @@ import org.apache.ignite.internal.processors.database.IgniteDbSingleNodePutGetTest; import org.apache.ignite.internal.processors.database.IgniteDbSingleNodeTinyPutGetTest; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * */ -public class IgnitePdsTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgnitePdsTestSuite { /** * @return IgniteCache test suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite2.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite2.java index 73a237e0337e4..99179cae07f32 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite2.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite2.java @@ -70,11 +70,14 @@ import org.apache.ignite.internal.processors.cache.persistence.db.wal.reader.IgniteWalReaderTest; import org.apache.ignite.internal.processors.cache.persistence.wal.reader.StandaloneWalRecordsIteratorTest; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * */ -public class IgnitePdsTestSuite2 extends TestSuite { +@RunWith(AllTests.class) +public class IgnitePdsTestSuite2 { /** * @return Suite. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite4.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite4.java index fc5cf146b0e56..d38c34a34ed96 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite4.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite4.java @@ -32,11 +32,14 @@ import org.apache.ignite.internal.processors.cache.persistence.db.IgnitePdsTransactionsHangTest; import org.apache.ignite.internal.processors.cache.persistence.file.FileDownloaderTest; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * */ -public class IgnitePdsTestSuite4 extends TestSuite { +@RunWith(AllTests.class) +public class IgnitePdsTestSuite4 { /** * @return Suite. */ diff --git a/modules/flink/src/test/java/org/apache/ignite/sink/flink/FlinkIgniteSinkSelfTestSuite.java b/modules/flink/src/test/java/org/apache/ignite/sink/flink/FlinkIgniteSinkSelfTestSuite.java index c9ee957745917..3fee82ed95133 100644 --- a/modules/flink/src/test/java/org/apache/ignite/sink/flink/FlinkIgniteSinkSelfTestSuite.java +++ b/modules/flink/src/test/java/org/apache/ignite/sink/flink/FlinkIgniteSinkSelfTestSuite.java @@ -19,11 +19,14 @@ import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Apache Flink sink tests. */ -public class FlinkIgniteSinkSelfTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class FlinkIgniteSinkSelfTestSuite { /** * @return Test suite. */ diff --git a/modules/hibernate-4.2/src/test/java/org/apache/ignite/testsuites/IgniteHibernateTestSuite.java b/modules/hibernate-4.2/src/test/java/org/apache/ignite/testsuites/IgniteHibernateTestSuite.java index 2cea4702e63da..436203a797567 100644 --- a/modules/hibernate-4.2/src/test/java/org/apache/ignite/testsuites/IgniteHibernateTestSuite.java +++ b/modules/hibernate-4.2/src/test/java/org/apache/ignite/testsuites/IgniteHibernateTestSuite.java @@ -29,11 +29,14 @@ import org.apache.ignite.cache.store.hibernate.CacheHibernateBlobStoreSelfTest; import org.apache.ignite.cache.store.hibernate.CacheHibernateStoreFactorySelfTest; import org.apache.ignite.cache.store.hibernate.CacheHibernateStoreSessionListenerSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Hibernate integration tests. */ -public class IgniteHibernateTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteHibernateTestSuite { /** * @return Test suite. */ @@ -42,7 +45,7 @@ public static TestSuite suite() { // Hibernate L2 cache. suite.addTest(new JUnit4TestAdapter(HibernateL2CacheSelfTest.class)); - suite.addTestSuite(HibernateL2CacheTransactionalSelfTest.class); + suite.addTest(new JUnit4TestAdapter(HibernateL2CacheTransactionalSelfTest.class)); suite.addTest(new JUnit4TestAdapter(HibernateL2CacheTransactionalUseSyncSelfTest.class)); suite.addTest(new JUnit4TestAdapter(HibernateL2CacheConfigurationSelfTest.class)); suite.addTest(new JUnit4TestAdapter(HibernateL2CacheStrategySelfTest.class)); diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite.java index 363ab8a6b1b56..0f20fdf62459e 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite.java +++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.AffinityKeyNameAndValueFieldNameConflictTest; import org.apache.ignite.internal.processors.cache.BigEntryQueryTest; @@ -234,307 +235,310 @@ import org.apache.ignite.sqltests.PartitionedSqlTest; import org.apache.ignite.sqltests.ReplicatedSqlTest; import org.apache.ignite.testframework.IgniteTestSuite; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test suite for cache queries. */ -public class IgniteBinaryCacheQueryTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteBinaryCacheQueryTestSuite { /** * @return Test suite. */ public static TestSuite suite() { IgniteTestSuite suite = new IgniteTestSuite("Ignite Cache Queries Test Suite"); - suite.addTestSuite(AffinityKeyNameAndValueFieldNameConflictTest.class); - suite.addTestSuite(DmlInsideTransactionTest.class); - suite.addTestSuite(ComplexPrimaryKeyUnwrapSelfTest.class); - suite.addTestSuite(SqlNestedQuerySelfTest.class); - suite.addTestSuite(ExplainSelfTest.class); - suite.addTestSuite(RunningQueriesTest.class); + suite.addTest(new JUnit4TestAdapter(AffinityKeyNameAndValueFieldNameConflictTest.class)); + suite.addTest(new JUnit4TestAdapter(DmlInsideTransactionTest.class)); + suite.addTest(new JUnit4TestAdapter(ComplexPrimaryKeyUnwrapSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(SqlNestedQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(ExplainSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(RunningQueriesTest.class)); - suite.addTestSuite(ComplexPrimaryKeyUnwrapSelfTest.class); + suite.addTest(new JUnit4TestAdapter(ComplexPrimaryKeyUnwrapSelfTest.class)); - suite.addTestSuite(PartitionedSqlTest.class); - suite.addTestSuite(ReplicatedSqlTest.class); + suite.addTest(new JUnit4TestAdapter(PartitionedSqlTest.class)); + suite.addTest(new JUnit4TestAdapter(ReplicatedSqlTest.class)); - suite.addTestSuite(SqlParserCreateIndexSelfTest.class); - suite.addTestSuite(SqlParserDropIndexSelfTest.class); - suite.addTestSuite(SqlParserTransactionalKeywordsSelfTest.class); - suite.addTestSuite(SqlParserBulkLoadSelfTest.class); - suite.addTestSuite(SqlParserSetStreamingSelfTest.class); + suite.addTest(new JUnit4TestAdapter(SqlParserCreateIndexSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(SqlParserDropIndexSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(SqlParserTransactionalKeywordsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(SqlParserBulkLoadSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(SqlParserSetStreamingSelfTest.class)); - suite.addTestSuite(SqlConnectorConfigurationValidationSelfTest.class); - suite.addTestSuite(ClientConnectorConfigurationValidationSelfTest.class); + suite.addTest(new JUnit4TestAdapter(SqlConnectorConfigurationValidationSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(ClientConnectorConfigurationValidationSelfTest.class)); - suite.addTestSuite(SqlSchemaSelfTest.class); - suite.addTestSuite(SqlIllegalSchemaSelfTest.class); - suite.addTestSuite(MultipleStatementsSqlQuerySelfTest.class); + suite.addTest(new JUnit4TestAdapter(SqlSchemaSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(SqlIllegalSchemaSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(MultipleStatementsSqlQuerySelfTest.class)); - suite.addTestSuite(BasicIndexTest.class); - suite.addTestSuite(BasicIndexMultinodeTest.class); + suite.addTest(new JUnit4TestAdapter(BasicIndexTest.class)); + suite.addTest(new JUnit4TestAdapter(BasicIndexMultinodeTest.class)); // Misc tests. - suite.addTestSuite(QueryEntityValidationSelfTest.class); - suite.addTestSuite(DuplicateKeyValueClassesSelfTest.class); - suite.addTestSuite(GridCacheLazyQueryPartitionsReleaseTest.class); + suite.addTest(new JUnit4TestAdapter(QueryEntityValidationSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(DuplicateKeyValueClassesSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheLazyQueryPartitionsReleaseTest.class)); // Dynamic index create/drop tests. - suite.addTestSuite(SchemaExchangeSelfTest.class); + suite.addTest(new JUnit4TestAdapter(SchemaExchangeSelfTest.class)); - suite.addTestSuite(DynamicIndexServerCoordinatorBasicSelfTest.class); - suite.addTestSuite(DynamicIndexServerBasicSelfTest.class); - suite.addTestSuite(DynamicIndexServerNodeFilterCoordinatorBasicSelfTest.class); - suite.addTestSuite(DynamicIndexServerNodeFIlterBasicSelfTest.class); - suite.addTestSuite(DynamicIndexClientBasicSelfTest.class); + suite.addTest(new JUnit4TestAdapter(DynamicIndexServerCoordinatorBasicSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(DynamicIndexServerBasicSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(DynamicIndexServerNodeFilterCoordinatorBasicSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(DynamicIndexServerNodeFIlterBasicSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(DynamicIndexClientBasicSelfTest.class)); // H2 tests. - suite.addTestSuite(GridH2IndexingInMemSelfTest.class); - suite.addTestSuite(GridH2IndexingOffheapSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridH2IndexingInMemSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridH2IndexingOffheapSelfTest.class)); // Parsing - suite.addTestSuite(GridQueryParsingTest.class); - suite.addTestSuite(IgniteCacheSqlQueryErrorSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridQueryParsingTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheSqlQueryErrorSelfTest.class)); // Config. - suite.addTestSuite(IgniteCacheDuplicateEntityConfigurationSelfTest.class); - suite.addTestSuite(IncorrectQueryEntityTest.class); - suite.addTestSuite(IgniteDynamicSqlRestoreTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheDuplicateEntityConfigurationSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IncorrectQueryEntityTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteDynamicSqlRestoreTest.class)); // Queries tests. - suite.addTestSuite(LazyQuerySelfTest.class); - suite.addTestSuite(IgniteSqlSplitterSelfTest.class); - suite.addTestSuite(SqlPushDownFunctionTest.class); - suite.addTestSuite(IgniteSqlSegmentedIndexSelfTest.class); - suite.addTestSuite(IgniteCachelessQueriesSelfTest.class); - suite.addTestSuite(IgniteSqlSegmentedIndexMultiNodeSelfTest.class); - suite.addTestSuite(IgniteSqlSchemaIndexingTest.class); - suite.addTestSuite(GridCacheQueryIndexDisabledSelfTest.class); - suite.addTestSuite(IgniteCacheQueryLoadSelfTest.class); - suite.addTestSuite(IgniteCacheLocalQuerySelfTest.class); - suite.addTestSuite(IgniteCacheLocalAtomicQuerySelfTest.class); - suite.addTestSuite(IgniteCacheReplicatedQuerySelfTest.class); - suite.addTestSuite(IgniteCacheReplicatedQueryP2PDisabledSelfTest.class); - suite.addTestSuite(IgniteCacheReplicatedQueryEvtsDisabledSelfTest.class); - suite.addTestSuite(IgniteCachePartitionedQuerySelfTest.class); - suite.addTestSuite(IgniteCachePartitionedSnapshotEnabledQuerySelfTest.class); - suite.addTestSuite(IgniteCacheAtomicQuerySelfTest.class); - suite.addTestSuite(IgniteCacheAtomicNearEnabledQuerySelfTest.class); - suite.addTestSuite(IgniteCachePartitionedQueryP2PDisabledSelfTest.class); - suite.addTestSuite(IgniteCachePartitionedQueryEvtsDisabledSelfTest.class); - - suite.addTestSuite(IgniteCacheUnionDuplicatesTest.class); - suite.addTestSuite(IgniteCacheJoinPartitionedAndReplicatedCollocationTest.class); - suite.addTestSuite(IgniteClientReconnectCacheQueriesFailoverTest.class); - suite.addTestSuite(IgniteErrorOnRebalanceTest.class); - suite.addTestSuite(CacheQueryBuildValueTest.class); - suite.addTestSuite(CacheOffheapBatchIndexingMultiTypeTest.class); - - suite.addTestSuite(IgniteCacheQueryIndexSelfTest.class); - suite.addTestSuite(IgniteCacheCollocatedQuerySelfTest.class); - suite.addTestSuite(IgniteCacheLargeResultSelfTest.class); - suite.addTestSuite(GridCacheQueryInternalKeysSelfTest.class); - suite.addTestSuite(H2ResultSetIteratorNullifyOnEndSelfTest.class); - suite.addTestSuite(IgniteSqlBigIntegerKeyTest.class); - suite.addTestSuite(IgniteCacheOffheapEvictQueryTest.class); - suite.addTestSuite(IgniteCacheOffheapIndexScanTest.class); - - suite.addTestSuite(GridCacheCrossCacheQuerySelfTest.class); - suite.addTestSuite(GridCacheQuerySerializationSelfTest.class); - suite.addTestSuite(IgniteBinaryObjectFieldsQuerySelfTest.class); - suite.addTestSuite(IgniteStableBaselineBinObjFieldsQuerySelfTest.class); - suite.addTestSuite(IgniteBinaryWrappedObjectFieldsQuerySelfTest.class); - suite.addTestSuite(IgniteCacheQueryH2IndexingLeakTest.class); - suite.addTestSuite(IgniteCacheQueryNoRebalanceSelfTest.class); - suite.addTestSuite(GridCacheQueryTransformerSelfTest.class); - suite.addTestSuite(CacheScanQueryFailoverTest.class); - suite.addTestSuite(IgniteCachePrimitiveFieldsQuerySelfTest.class); - - suite.addTestSuite(IgniteCacheJoinQueryWithAffinityKeyTest.class); - suite.addTestSuite(IgniteCacheJoinPartitionedAndReplicatedTest.class); - suite.addTestSuite(IgniteCrossCachesJoinsQueryTest.class); - - suite.addTestSuite(IgniteCacheMultipleIndexedTypesTest.class); + suite.addTest(new JUnit4TestAdapter(LazyQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteSqlSplitterSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(SqlPushDownFunctionTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteSqlSegmentedIndexSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCachelessQueriesSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteSqlSegmentedIndexMultiNodeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteSqlSchemaIndexingTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheQueryIndexDisabledSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheQueryLoadSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheLocalQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheLocalAtomicQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheReplicatedQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheReplicatedQueryP2PDisabledSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheReplicatedQueryEvtsDisabledSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCachePartitionedQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCachePartitionedSnapshotEnabledQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheAtomicQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheAtomicNearEnabledQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCachePartitionedQueryP2PDisabledSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCachePartitionedQueryEvtsDisabledSelfTest.class)); + + suite.addTest(new JUnit4TestAdapter(IgniteCacheUnionDuplicatesTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheJoinPartitionedAndReplicatedCollocationTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteClientReconnectCacheQueriesFailoverTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteErrorOnRebalanceTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheQueryBuildValueTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheOffheapBatchIndexingMultiTypeTest.class)); + + suite.addTest(new JUnit4TestAdapter(IgniteCacheQueryIndexSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheCollocatedQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheLargeResultSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheQueryInternalKeysSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(H2ResultSetIteratorNullifyOnEndSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteSqlBigIntegerKeyTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheOffheapEvictQueryTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheOffheapIndexScanTest.class)); + + suite.addTest(new JUnit4TestAdapter(GridCacheCrossCacheQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheQuerySerializationSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteBinaryObjectFieldsQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteStableBaselineBinObjFieldsQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteBinaryWrappedObjectFieldsQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheQueryH2IndexingLeakTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheQueryNoRebalanceSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheQueryTransformerSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheScanQueryFailoverTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCachePrimitiveFieldsQuerySelfTest.class)); + + suite.addTest(new JUnit4TestAdapter(IgniteCacheJoinQueryWithAffinityKeyTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheJoinPartitionedAndReplicatedTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCrossCachesJoinsQueryTest.class)); + + suite.addTest(new JUnit4TestAdapter(IgniteCacheMultipleIndexedTypesTest.class)); // DML. - suite.addTestSuite(IgniteCacheMergeSqlQuerySelfTest.class); - suite.addTestSuite(IgniteCacheInsertSqlQuerySelfTest.class); - suite.addTestSuite(IgniteCacheUpdateSqlQuerySelfTest.class); - suite.addTestSuite(IgniteCacheDeleteSqlQuerySelfTest.class); - suite.addTestSuite(IgniteSqlSkipReducerOnUpdateDmlSelfTest.class); - suite.addTestSuite(IgniteSqlSkipReducerOnUpdateDmlFlagSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheMergeSqlQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheInsertSqlQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheUpdateSqlQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheDeleteSqlQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteSqlSkipReducerOnUpdateDmlSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteSqlSkipReducerOnUpdateDmlFlagSelfTest.class)); - suite.addTestSuite(IgniteBinaryObjectQueryArgumentsTest.class); - suite.addTestSuite(IgniteBinaryObjectLocalQueryArgumentsTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteBinaryObjectQueryArgumentsTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteBinaryObjectLocalQueryArgumentsTest.class)); - suite.addTestSuite(IndexingSpiQuerySelfTest.class); - suite.addTestSuite(IndexingSpiQueryTxSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IndexingSpiQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IndexingSpiQueryTxSelfTest.class)); - suite.addTestSuite(IgniteCacheMultipleIndexedTypesTest.class); - suite.addTestSuite(IgniteSqlQueryMinMaxTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheMultipleIndexedTypesTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteSqlQueryMinMaxTest.class)); - suite.addTestSuite(GridCircularQueueTest.class); - suite.addTestSuite(IndexingSpiQueryWithH2IndexingSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridCircularQueueTest.class)); + suite.addTest(new JUnit4TestAdapter(IndexingSpiQueryWithH2IndexingSelfTest.class)); // DDL. - suite.addTestSuite(H2DynamicIndexTransactionalReplicatedSelfTest.class); - suite.addTestSuite(H2DynamicIndexTransactionalPartitionedSelfTest.class); - suite.addTestSuite(H2DynamicIndexTransactionalPartitionedNearSelfTest.class); - suite.addTestSuite(H2DynamicIndexAtomicReplicatedSelfTest.class); - suite.addTestSuite(H2DynamicIndexAtomicPartitionedSelfTest.class); - suite.addTestSuite(H2DynamicIndexAtomicPartitionedNearSelfTest.class); - suite.addTestSuite(H2DynamicTableSelfTest.class); - suite.addTestSuite(H2DynamicColumnsClientBasicSelfTest.class); - suite.addTestSuite(H2DynamicColumnsServerBasicSelfTest.class); - suite.addTestSuite(H2DynamicColumnsServerCoordinatorBasicSelfTest.class); + suite.addTest(new JUnit4TestAdapter(H2DynamicIndexTransactionalReplicatedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(H2DynamicIndexTransactionalPartitionedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(H2DynamicIndexTransactionalPartitionedNearSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(H2DynamicIndexAtomicReplicatedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(H2DynamicIndexAtomicPartitionedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(H2DynamicIndexAtomicPartitionedNearSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(H2DynamicTableSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(H2DynamicColumnsClientBasicSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(H2DynamicColumnsServerBasicSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(H2DynamicColumnsServerCoordinatorBasicSelfTest.class)); // DML+DDL. - suite.addTestSuite(H2DynamicIndexingComplexClientAtomicPartitionedTest.class); - suite.addTestSuite(H2DynamicIndexingComplexClientAtomicPartitionedNoBackupsTest.class); - suite.addTestSuite(H2DynamicIndexingComplexClientAtomicReplicatedTest.class); - suite.addTestSuite(H2DynamicIndexingComplexClientTransactionalPartitionedTest.class); - suite.addTestSuite(H2DynamicIndexingComplexClientTransactionalPartitionedNoBackupsTest.class); - suite.addTestSuite(H2DynamicIndexingComplexClientTransactionalReplicatedTest.class); - suite.addTestSuite(H2DynamicIndexingComplexServerAtomicPartitionedTest.class); - suite.addTestSuite(H2DynamicIndexingComplexServerAtomicPartitionedNoBackupsTest.class); - suite.addTestSuite(H2DynamicIndexingComplexServerAtomicReplicatedTest.class); - suite.addTestSuite(H2DynamicIndexingComplexServerTransactionalPartitionedTest.class); - suite.addTestSuite(H2DynamicIndexingComplexServerTransactionalPartitionedNoBackupsTest.class); - suite.addTestSuite(H2DynamicIndexingComplexServerTransactionalReplicatedTest.class); - - suite.addTestSuite(DdlTransactionSelfTest.class); + suite.addTest(new JUnit4TestAdapter(H2DynamicIndexingComplexClientAtomicPartitionedTest.class)); + suite.addTest(new JUnit4TestAdapter(H2DynamicIndexingComplexClientAtomicPartitionedNoBackupsTest.class)); + suite.addTest(new JUnit4TestAdapter(H2DynamicIndexingComplexClientAtomicReplicatedTest.class)); + suite.addTest(new JUnit4TestAdapter(H2DynamicIndexingComplexClientTransactionalPartitionedTest.class)); + suite.addTest(new JUnit4TestAdapter(H2DynamicIndexingComplexClientTransactionalPartitionedNoBackupsTest.class)); + suite.addTest(new JUnit4TestAdapter(H2DynamicIndexingComplexClientTransactionalReplicatedTest.class)); + suite.addTest(new JUnit4TestAdapter(H2DynamicIndexingComplexServerAtomicPartitionedTest.class)); + suite.addTest(new JUnit4TestAdapter(H2DynamicIndexingComplexServerAtomicPartitionedNoBackupsTest.class)); + suite.addTest(new JUnit4TestAdapter(H2DynamicIndexingComplexServerAtomicReplicatedTest.class)); + suite.addTest(new JUnit4TestAdapter(H2DynamicIndexingComplexServerTransactionalPartitionedTest.class)); + suite.addTest(new JUnit4TestAdapter(H2DynamicIndexingComplexServerTransactionalPartitionedNoBackupsTest.class)); + suite.addTest(new JUnit4TestAdapter(H2DynamicIndexingComplexServerTransactionalReplicatedTest.class)); + + suite.addTest(new JUnit4TestAdapter(DdlTransactionSelfTest.class)); // Fields queries. - suite.addTestSuite(SqlFieldsQuerySelfTest.class); - suite.addTestSuite(IgniteCacheLocalFieldsQuerySelfTest.class); - suite.addTestSuite(IgniteCacheReplicatedFieldsQuerySelfTest.class); - suite.addTestSuite(IgniteCacheReplicatedFieldsQueryROSelfTest.class); - suite.addTestSuite(IgniteCacheReplicatedFieldsQueryP2PEnabledSelfTest.class); - suite.addTestSuite(IgniteCacheReplicatedFieldsQueryJoinNoPrimaryPartitionsSelfTest.class); - suite.addTestSuite(IgniteCachePartitionedFieldsQuerySelfTest.class); - suite.addTestSuite(IgniteCacheAtomicFieldsQuerySelfTest.class); - suite.addTestSuite(IgniteCacheAtomicNearEnabledFieldsQuerySelfTest.class); - suite.addTestSuite(IgniteCachePartitionedFieldsQueryP2PEnabledSelfTest.class); - suite.addTestSuite(IgniteCacheFieldsQueryNoDataSelfTest.class); - suite.addTestSuite(GridCacheQueryIndexingDisabledSelfTest.class); - suite.addTestSuite(GridOrderedMessageCancelSelfTest.class); - suite.addTestSuite(CacheQueryEvictDataLostTest.class); + suite.addTest(new JUnit4TestAdapter(SqlFieldsQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheLocalFieldsQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheReplicatedFieldsQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheReplicatedFieldsQueryROSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheReplicatedFieldsQueryP2PEnabledSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheReplicatedFieldsQueryJoinNoPrimaryPartitionsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCachePartitionedFieldsQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheAtomicFieldsQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheAtomicNearEnabledFieldsQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCachePartitionedFieldsQueryP2PEnabledSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheFieldsQueryNoDataSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheQueryIndexingDisabledSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridOrderedMessageCancelSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheQueryEvictDataLostTest.class)); // Full text queries. - suite.addTestSuite(GridCacheFullTextQuerySelfTest.class); - suite.addTestSuite(IgniteCacheFullTextQueryNodeJoiningSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridCacheFullTextQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheFullTextQueryNodeJoiningSelfTest.class)); // Ignite cache and H2 comparison. - suite.addTestSuite(BaseH2CompareQueryTest.class); - suite.addTestSuite(H2CompareBigQueryTest.class); - suite.addTestSuite(H2CompareBigQueryDistributedJoinsTest.class); + suite.addTest(new JUnit4TestAdapter(BaseH2CompareQueryTest.class)); + suite.addTest(new JUnit4TestAdapter(H2CompareBigQueryTest.class)); + suite.addTest(new JUnit4TestAdapter(H2CompareBigQueryDistributedJoinsTest.class)); // Cache query metrics. - suite.addTestSuite(CacheLocalQueryMetricsSelfTest.class); - suite.addTestSuite(CachePartitionedQueryMetricsDistributedSelfTest.class); - suite.addTestSuite(CachePartitionedQueryMetricsLocalSelfTest.class); - suite.addTestSuite(CacheReplicatedQueryMetricsDistributedSelfTest.class); - suite.addTestSuite(CacheReplicatedQueryMetricsLocalSelfTest.class); + suite.addTest(new JUnit4TestAdapter(CacheLocalQueryMetricsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CachePartitionedQueryMetricsDistributedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CachePartitionedQueryMetricsLocalSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheReplicatedQueryMetricsDistributedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheReplicatedQueryMetricsLocalSelfTest.class)); // Cache query metrics. - suite.addTestSuite(CacheLocalQueryDetailMetricsSelfTest.class); - suite.addTestSuite(CachePartitionedQueryDetailMetricsDistributedSelfTest.class); - suite.addTestSuite(CachePartitionedQueryDetailMetricsLocalSelfTest.class); - suite.addTestSuite(CacheReplicatedQueryDetailMetricsDistributedSelfTest.class); - suite.addTestSuite(CacheReplicatedQueryDetailMetricsLocalSelfTest.class); + suite.addTest(new JUnit4TestAdapter(CacheLocalQueryDetailMetricsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CachePartitionedQueryDetailMetricsDistributedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CachePartitionedQueryDetailMetricsLocalSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheReplicatedQueryDetailMetricsDistributedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheReplicatedQueryDetailMetricsLocalSelfTest.class)); // Unmarshalling query test. - suite.addTestSuite(IgniteCacheP2pUnmarshallingQueryErrorTest.class); - suite.addTestSuite(IgniteCacheNoClassQuerySelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheP2pUnmarshallingQueryErrorTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheNoClassQuerySelfTest.class)); // Cancellation. - suite.addTestSuite(IgniteCacheDistributedQueryCancelSelfTest.class); - suite.addTestSuite(IgniteCacheLocalQueryCancelOrTimeoutSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteCacheDistributedQueryCancelSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheLocalQueryCancelOrTimeoutSelfTest.class)); // Distributed joins. - suite.addTestSuite(H2CompareBigQueryDistributedJoinsTest.class); - suite.addTestSuite(IgniteCacheDistributedJoinCollocatedAndNotTest.class); - suite.addTestSuite(IgniteCacheDistributedJoinCustomAffinityMapper.class); - suite.addTestSuite(IgniteCacheDistributedJoinNoIndexTest.class); - suite.addTestSuite(IgniteCacheDistributedJoinPartitionedAndReplicatedTest.class); - suite.addTestSuite(IgniteCacheDistributedJoinQueryConditionsTest.class); - suite.addTestSuite(IgniteCacheDistributedJoinTest.class); - suite.addTestSuite(IgniteSqlDistributedJoinSelfTest.class); - suite.addTestSuite(IgniteSqlQueryParallelismTest.class); + suite.addTest(new JUnit4TestAdapter(H2CompareBigQueryDistributedJoinsTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheDistributedJoinCollocatedAndNotTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheDistributedJoinCustomAffinityMapper.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheDistributedJoinNoIndexTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheDistributedJoinPartitionedAndReplicatedTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheDistributedJoinQueryConditionsTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheDistributedJoinTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteSqlDistributedJoinSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteSqlQueryParallelismTest.class)); // Other. - suite.addTestSuite(CacheIteratorScanQueryTest.class); - suite.addTestSuite(CacheQueryNewClientSelfTest.class); - suite.addTestSuite(CacheOffheapBatchIndexingSingleTypeTest.class); - suite.addTestSuite(CacheSqlQueryValueCopySelfTest.class); - suite.addTestSuite(IgniteCacheQueryCacheDestroySelfTest.class); - suite.addTestSuite(IgniteQueryDedicatedPoolTest.class); - suite.addTestSuite(IgniteSqlEntryCacheModeAgnosticTest.class); - suite.addTestSuite(QueryEntityCaseMismatchTest.class); - suite.addTestSuite(IgniteCacheDistributedPartitionQuerySelfTest.class); - suite.addTestSuite(IgniteCacheDistributedPartitionQueryNodeRestartsSelfTest.class); - suite.addTestSuite(IgniteCacheDistributedPartitionQueryConfigurationSelfTest.class); - suite.addTestSuite(IgniteSqlKeyValueFieldsTest.class); - suite.addTestSuite(IgniteSqlRoutingTest.class); - suite.addTestSuite(IgniteSqlNotNullConstraintTest.class); - suite.addTestSuite(LongIndexNameTest.class); - suite.addTestSuite(GridCacheQuerySqlFieldInlineSizeSelfTest.class); - suite.addTestSuite(IgniteSqlParameterizedQueryTest.class); - suite.addTestSuite(H2ConnectionLeaksSelfTest.class); - suite.addTestSuite(IgniteCheckClusterStateBeforeExecuteQueryTest.class); - suite.addTestSuite(OptimizedMarshallerIndexNameTest.class); - suite.addTestSuite(SqlSystemViewsSelfTest.class); - - suite.addTestSuite(GridIndexRebuildSelfTest.class); - - suite.addTestSuite(SqlTransactionCommandsWithMvccDisabledSelfTest.class); - - suite.addTestSuite(IgniteSqlDefaultValueTest.class); - suite.addTestSuite(IgniteDecimalSelfTest.class); - suite.addTestSuite(IgniteSQLColumnConstraintsTest.class); - suite.addTestSuite(IgniteTransactionSQLColumnConstraintTest.class); - - suite.addTestSuite(IgniteCachePartitionedAtomicColumnConstraintsTest.class); - suite.addTestSuite(IgniteCachePartitionedTransactionalColumnConstraintsTest.class); - suite.addTestSuite(IgniteCachePartitionedTransactionalSnapshotColumnConstraintTest.class); - suite.addTestSuite(IgniteCacheReplicatedAtomicColumnConstraintsTest.class); - suite.addTestSuite(IgniteCacheReplicatedTransactionalColumnConstraintsTest.class); - suite.addTestSuite(IgniteCacheReplicatedTransactionalSnapshotColumnConstraintTest.class); + suite.addTest(new JUnit4TestAdapter(CacheIteratorScanQueryTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheQueryNewClientSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheOffheapBatchIndexingSingleTypeTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheSqlQueryValueCopySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheQueryCacheDestroySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteQueryDedicatedPoolTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteSqlEntryCacheModeAgnosticTest.class)); + suite.addTest(new JUnit4TestAdapter(QueryEntityCaseMismatchTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheDistributedPartitionQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheDistributedPartitionQueryNodeRestartsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheDistributedPartitionQueryConfigurationSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteSqlKeyValueFieldsTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteSqlRoutingTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteSqlNotNullConstraintTest.class)); + suite.addTest(new JUnit4TestAdapter(LongIndexNameTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheQuerySqlFieldInlineSizeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteSqlParameterizedQueryTest.class)); + suite.addTest(new JUnit4TestAdapter(H2ConnectionLeaksSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCheckClusterStateBeforeExecuteQueryTest.class)); + suite.addTest(new JUnit4TestAdapter(OptimizedMarshallerIndexNameTest.class)); + suite.addTest(new JUnit4TestAdapter(SqlSystemViewsSelfTest.class)); + + suite.addTest(new JUnit4TestAdapter(GridIndexRebuildSelfTest.class)); + + suite.addTest(new JUnit4TestAdapter(SqlTransactionCommandsWithMvccDisabledSelfTest.class)); + + suite.addTest(new JUnit4TestAdapter(IgniteSqlDefaultValueTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteDecimalSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteSQLColumnConstraintsTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteTransactionSQLColumnConstraintTest.class)); + + suite.addTest(new JUnit4TestAdapter(IgniteCachePartitionedAtomicColumnConstraintsTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCachePartitionedTransactionalColumnConstraintsTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCachePartitionedTransactionalSnapshotColumnConstraintTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheReplicatedAtomicColumnConstraintsTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheReplicatedTransactionalColumnConstraintsTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheReplicatedTransactionalSnapshotColumnConstraintTest.class)); // H2 Rows on-heap cache - suite.addTestSuite(H2RowCacheSelfTest.class); - suite.addTestSuite(H2RowCachePageEvictionTest.class); + suite.addTest(new JUnit4TestAdapter(H2RowCacheSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(H2RowCachePageEvictionTest.class)); // User operation SQL - suite.addTestSuite(SqlParserUserSelfTest.class); - suite.addTestSuite(SqlUserCommandSelfTest.class); - suite.addTestSuite(EncryptedSqlTableTest.class); + suite.addTest(new JUnit4TestAdapter(SqlParserUserSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(SqlUserCommandSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(EncryptedSqlTableTest.class)); - suite.addTestSuite(ThreadLocalObjectPoolSelfTest.class); - suite.addTestSuite(H2StatementCacheSelfTest.class); - suite.addTestSuite(PreparedStatementExSelfTest.class); + suite.addTest(new JUnit4TestAdapter(ThreadLocalObjectPoolSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(H2StatementCacheSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(PreparedStatementExSelfTest.class)); // Partition loss. - suite.addTestSuite(IndexingCachePartitionLossPolicySelfTest.class); + suite.addTest(new JUnit4TestAdapter(IndexingCachePartitionLossPolicySelfTest.class)); // GROUP_CONCAT - suite.addTestSuite(IgniteSqlGroupConcatCollocatedTest.class); - suite.addTestSuite(IgniteSqlGroupConcatNotCollocatedTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteSqlGroupConcatCollocatedTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteSqlGroupConcatNotCollocatedTest.class)); // Binary - suite.addTestSuite(BinarySerializationQuerySelfTest.class); - suite.addTestSuite(BinarySerializationQueryWithReflectiveSerializerSelfTest.class); - suite.addTestSuite(IgniteCacheBinaryObjectsScanSelfTest.class); - suite.addTestSuite(IgniteCacheBinaryObjectsScanWithEventsSelfTest.class); - suite.addTestSuite(BigEntryQueryTest.class); - suite.addTestSuite(BinaryMetadataConcurrentUpdateWithIndexesTest.class); + suite.addTest(new JUnit4TestAdapter(BinarySerializationQuerySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(BinarySerializationQueryWithReflectiveSerializerSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheBinaryObjectsScanSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheBinaryObjectsScanWithEventsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(BigEntryQueryTest.class)); + suite.addTest(new JUnit4TestAdapter(BinaryMetadataConcurrentUpdateWithIndexesTest.class)); // Partition pruning. - suite.addTestSuite(InOperationExtractPartitionSelfTest.class); - suite.addTestSuite(AndOperationExtractPartitionSelfTest.class); + suite.addTest(new JUnit4TestAdapter(InOperationExtractPartitionSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(AndOperationExtractPartitionSelfTest.class)); - suite.addTestSuite(GridCacheDynamicLoadOnClientTest.class); - suite.addTestSuite(GridCacheDynamicLoadOnClientPersistentTest.class); + suite.addTest(new JUnit4TestAdapter(GridCacheDynamicLoadOnClientTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheDynamicLoadOnClientPersistentTest.class)); return suite; } diff --git a/modules/indexing/src/test/java8/org/apache/ignite/testsuites/CacheQueryJsr310Java8DateTimeApiSupportTestSuite.java b/modules/indexing/src/test/java8/org/apache/ignite/testsuites/CacheQueryJsr310Java8DateTimeApiSupportTestSuite.java index 77f2ed6a8456b..7999218dc1ed6 100644 --- a/modules/indexing/src/test/java8/org/apache/ignite/testsuites/CacheQueryJsr310Java8DateTimeApiSupportTestSuite.java +++ b/modules/indexing/src/test/java8/org/apache/ignite/testsuites/CacheQueryJsr310Java8DateTimeApiSupportTestSuite.java @@ -20,11 +20,14 @@ import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.query.h2.CacheQueryEntityWithJsr310Java8DateTimeApiFieldsTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test suite for JSR-310 Java 8 Date and Time API queries. */ -public class CacheQueryJsr310Java8DateTimeApiSupportTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class CacheQueryJsr310Java8DateTimeApiSupportTestSuite { /** * @return Test suite. * @throws Exception If failed. diff --git a/modules/jta/src/test/java/org/apache/ignite/testsuites/IgniteJtaTestSuite.java b/modules/jta/src/test/java/org/apache/ignite/testsuites/IgniteJtaTestSuite.java index f28de3cbd8cbb..82350b282960f 100644 --- a/modules/jta/src/test/java/org/apache/ignite/testsuites/IgniteJtaTestSuite.java +++ b/modules/jta/src/test/java/org/apache/ignite/testsuites/IgniteJtaTestSuite.java @@ -31,24 +31,27 @@ import org.apache.ignite.internal.processors.cache.jta.GridReplicatedCacheJtaLookupClassNameSelfTest; import org.apache.ignite.internal.processors.cache.GridJtaLifecycleAwareSelfTest; import org.apache.ignite.testframework.IgniteTestSuite; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * JTA integration tests. */ -public class IgniteJtaTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteJtaTestSuite { /** * @return Test suite. */ public static TestSuite suite() { TestSuite suite = new IgniteTestSuite("JTA Integration Test Suite"); - suite.addTestSuite(GridPartitionedCacheJtaFactorySelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridPartitionedCacheJtaFactorySelfTest.class)); suite.addTest(new JUnit4TestAdapter(GridReplicatedCacheJtaFactorySelfTest.class)); - suite.addTestSuite(GridPartitionedCacheJtaLookupClassNameSelfTest.class); - suite.addTestSuite(GridReplicatedCacheJtaLookupClassNameSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridPartitionedCacheJtaLookupClassNameSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridReplicatedCacheJtaLookupClassNameSelfTest.class)); - suite.addTestSuite(GridPartitionedCacheJtaFactoryUseSyncSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridPartitionedCacheJtaFactoryUseSyncSelfTest.class)); suite.addTest(new JUnit4TestAdapter(GridReplicatedCacheJtaFactoryUseSyncSelfTest.class)); suite.addTest(new JUnit4TestAdapter(GridJtaLifecycleAwareSelfTest.class)); diff --git a/modules/ml/src/test/java/org/apache/ignite/ml/IgniteMLTestSuite.java b/modules/ml/src/test/java/org/apache/ignite/ml/IgniteMLTestSuite.java index 5acac7bb107cf..d09207c3b542a 100644 --- a/modules/ml/src/test/java/org/apache/ignite/ml/IgniteMLTestSuite.java +++ b/modules/ml/src/test/java/org/apache/ignite/ml/IgniteMLTestSuite.java @@ -48,7 +48,7 @@ public class IgniteMLTestSuite { /** */ public static TestSuite suite() { - TestSuite suite = new TestSuite(); + TestSuite suite = new TestSuite(IgniteMLTestSuite.class.getSimpleName()); /** JUnit 4 tests. */ suite.addTest(new JUnit4TestAdapter(MathImplMainTestSuite.class)); diff --git a/modules/ml/src/test/java/org/apache/ignite/ml/dataset/DatasetTestSuite.java b/modules/ml/src/test/java/org/apache/ignite/ml/dataset/DatasetTestSuite.java index 14eb31cdfdac5..8ab41c5ac2882 100644 --- a/modules/ml/src/test/java/org/apache/ignite/ml/dataset/DatasetTestSuite.java +++ b/modules/ml/src/test/java/org/apache/ignite/ml/dataset/DatasetTestSuite.java @@ -39,9 +39,8 @@ public class DatasetTestSuite { /** */ public static TestSuite suite() { - TestSuite suite = new TestSuite(); + TestSuite suite = new TestSuite(DatasetTestSuite.class.getSimpleName()); - /** JUnit 4 tests. */ suite.addTest(new JUnit4TestAdapter(DatasetWrapperTest.class)); suite.addTest(new JUnit4TestAdapter(DatasetAffinityFunctionWrapperTest.class)); suite.addTest(new JUnit4TestAdapter(PartitionDataStorageTest.class)); @@ -50,11 +49,9 @@ public static TestSuite suite() { suite.addTest(new JUnit4TestAdapter(SimpleLabeledDatasetTest.class)); suite.addTest(new JUnit4TestAdapter(DatasetWrapperTest.class)); suite.addTest(new JUnit4TestAdapter(ObjectHistogramTest.class)); - - /** JUnit 3 tests. */ - suite.addTestSuite(ComputeUtilsTest.class); - suite.addTestSuite(CacheBasedDatasetBuilderTest.class); - suite.addTestSuite(CacheBasedDatasetTest.class); + suite.addTest(new JUnit4TestAdapter(ComputeUtilsTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheBasedDatasetBuilderTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheBasedDatasetTest.class)); return suite; } diff --git a/modules/ml/src/test/java/org/apache/ignite/ml/inference/InferenceTestSuite.java b/modules/ml/src/test/java/org/apache/ignite/ml/inference/InferenceTestSuite.java index e81ceb770ecd0..9908b6550e159 100644 --- a/modules/ml/src/test/java/org/apache/ignite/ml/inference/InferenceTestSuite.java +++ b/modules/ml/src/test/java/org/apache/ignite/ml/inference/InferenceTestSuite.java @@ -34,16 +34,13 @@ public class InferenceTestSuite { /** */ public static TestSuite suite() { - TestSuite suite = new TestSuite(); + TestSuite suite = new TestSuite(InferenceTestSuite.class.getSimpleName()); - /** JUnit 4 tests. */ suite.addTest(new JUnit4TestAdapter(SingleInfModelBuilderTest.class)); suite.addTest(new JUnit4TestAdapter(ThreadedInfModelBuilderTest.class)); suite.addTest(new JUnit4TestAdapter(DirectorySerializerTest.class)); suite.addTest(new JUnit4TestAdapter(DefaultModelStorageTest.class)); - - /** JUnit 3 tests. */ - suite.addTestSuite(IgniteDistributedInfModelBuilderTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteDistributedInfModelBuilderTest.class)); return suite; } diff --git a/modules/ml/src/test/java/org/apache/ignite/ml/nn/MLPTestSuite.java b/modules/ml/src/test/java/org/apache/ignite/ml/nn/MLPTestSuite.java index 5cc0fd2641074..58eea8da605a5 100644 --- a/modules/ml/src/test/java/org/apache/ignite/ml/nn/MLPTestSuite.java +++ b/modules/ml/src/test/java/org/apache/ignite/ml/nn/MLPTestSuite.java @@ -29,15 +29,12 @@ public class MLPTestSuite { /** */ public static TestSuite suite() { - TestSuite suite = new TestSuite(); + TestSuite suite = new TestSuite(MLPTestSuite.class.getSimpleName()); - /** JUnit 4 tests. */ suite.addTest(new JUnit4TestAdapter(MLPTest.class)); suite.addTest(new JUnit4TestAdapter(MLPTrainerTest.class)); suite.addTest(new JUnit4TestAdapter(LossFunctionsTest.class)); - - /** JUnit 3 tests. */ - suite.addTestSuite(MLPTrainerIntegrationTest.class); + suite.addTest(new JUnit4TestAdapter(MLPTrainerIntegrationTest.class)); return suite; } diff --git a/modules/ml/src/test/java/org/apache/ignite/ml/selection/SelectionTestSuite.java b/modules/ml/src/test/java/org/apache/ignite/ml/selection/SelectionTestSuite.java index 510ccee0ce015..e2f8feb9fee92 100644 --- a/modules/ml/src/test/java/org/apache/ignite/ml/selection/SelectionTestSuite.java +++ b/modules/ml/src/test/java/org/apache/ignite/ml/selection/SelectionTestSuite.java @@ -40,9 +40,8 @@ public class SelectionTestSuite { /** */ public static TestSuite suite() { - TestSuite suite = new TestSuite(); + TestSuite suite = new TestSuite(SelectionTestSuite.class.getSimpleName()); - /** JUnit 4 tests. */ suite.addTest(new JUnit4TestAdapter(CrossValidationTest.class)); suite.addTest(new JUnit4TestAdapter(ParameterSetGeneratorTest.class)); suite.addTest(new JUnit4TestAdapter(LocalLabelPairCursorTest.class)); @@ -52,10 +51,8 @@ public static TestSuite suite() { suite.addTest(new JUnit4TestAdapter(FmeasureTest.class)); suite.addTest(new JUnit4TestAdapter(SHA256UniformMapperTest.class)); suite.addTest(new JUnit4TestAdapter(TrainTestDatasetSplitterTest.class)); - - /** JUnit 3 tests. */ - suite.addTestSuite(EvaluatorTest.class); - suite.addTestSuite(CacheBasedLabelPairCursorTest.class); + suite.addTest(new JUnit4TestAdapter(EvaluatorTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheBasedLabelPairCursorTest.class)); return suite; } diff --git a/modules/ml/src/test/java/org/apache/ignite/ml/tree/DecisionTreeTestSuite.java b/modules/ml/src/test/java/org/apache/ignite/ml/tree/DecisionTreeTestSuite.java index c67c8fdd9a581..7c984c1002fc3 100644 --- a/modules/ml/src/test/java/org/apache/ignite/ml/tree/DecisionTreeTestSuite.java +++ b/modules/ml/src/test/java/org/apache/ignite/ml/tree/DecisionTreeTestSuite.java @@ -36,9 +36,8 @@ public class DecisionTreeTestSuite { /** */ public static TestSuite suite() { - TestSuite suite = new TestSuite(); + TestSuite suite = new TestSuite(DecisionTreeTestSuite.class.getSimpleName()); - /** JUnit 4 tests. */ suite.addTest(new JUnit4TestAdapter(DecisionTreeClassificationTrainerTest.class)); suite.addTest(new JUnit4TestAdapter(DecisionTreeRegressionTrainerTest.class)); suite.addTest(new JUnit4TestAdapter(DecisionTreeDataTest.class)); @@ -48,10 +47,8 @@ public static TestSuite suite() { suite.addTest(new JUnit4TestAdapter(MSEImpurityMeasureTest.class)); suite.addTest(new JUnit4TestAdapter(StepFunctionTest.class)); suite.addTest(new JUnit4TestAdapter(SimpleStepFunctionCompressorTest.class)); - - /** JUnit 3 tests. */ - suite.addTestSuite(DecisionTreeRegressionTrainerIntegrationTest.class); - suite.addTestSuite(DecisionTreeClassificationTrainerIntegrationTest.class); + suite.addTest(new JUnit4TestAdapter(DecisionTreeRegressionTrainerIntegrationTest.class)); + suite.addTest(new JUnit4TestAdapter(DecisionTreeClassificationTrainerIntegrationTest.class)); return suite; } diff --git a/modules/storm/src/test/java/org/apache/ignite/stream/storm/IgniteStormStreamerSelfTestSuite.java b/modules/storm/src/test/java/org/apache/ignite/stream/storm/IgniteStormStreamerSelfTestSuite.java index 638d729dd1f45..085b755aa42d4 100644 --- a/modules/storm/src/test/java/org/apache/ignite/stream/storm/IgniteStormStreamerSelfTestSuite.java +++ b/modules/storm/src/test/java/org/apache/ignite/stream/storm/IgniteStormStreamerSelfTestSuite.java @@ -19,11 +19,14 @@ import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Apache Storm streamer tests. */ -public class IgniteStormStreamerSelfTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteStormStreamerSelfTestSuite { /** * @return Test suite. */ diff --git a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentMd5CheckSelfTest.java b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentMd5CheckSelfTest.java index 74512ecb98854..b3e2642d41d05 100644 --- a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentMd5CheckSelfTest.java +++ b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentMd5CheckSelfTest.java @@ -100,7 +100,7 @@ public void testMd5DirectoryCheck() throws Exception { } /** {@inheritDoc} */ - protected void afterTest() throws Exception { + @Override protected void afterTest() throws Exception { U.delete(getGarDir()); U.delete(new File(getDeployDir(), "uri1.gar")); U.delete(new File(getDeployDir(), "uri2.gar")); From e2364d980334db6b818cab7b258f3759a2605b8e Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Tue, 18 Dec 2018 01:34:30 +0300 Subject: [PATCH 118/176] IGNITE-10177 Junit 3 cleanup - wip - cleanup -- verified with diffs overview and rebuild --- .../ignite/tests/CassandraConfigTest.java | 12 ++++------ .../impl/ClientCacheFlagsCodecTest.java | 9 +++----- .../ignite/internal/jdbc2/JdbcBlobTest.java | 10 ++++----- .../compress/FileSystemUtilsTest.java | 8 +++---- .../persistence/file/IgniteFileIOTest.java | 6 +---- .../ignite/logger/jcl/JclLoggerTest.java | 6 +---- .../logger/log4j2/Log4j2ConfigUpdateTest.java | 9 ++++---- .../Log4j2LoggerVerboseModeSelfTest.java | 15 +++++-------- .../logger/slf4j/Slf4jLoggerMarkerTest.java | 22 +++++++++---------- 9 files changed, 37 insertions(+), 60 deletions(-) diff --git a/modules/cassandra/store/src/test/java/org/apache/ignite/tests/CassandraConfigTest.java b/modules/cassandra/store/src/test/java/org/apache/ignite/tests/CassandraConfigTest.java index 7f4d5efd881f4..63ec90b446e86 100644 --- a/modules/cassandra/store/src/test/java/org/apache/ignite/tests/CassandraConfigTest.java +++ b/modules/cassandra/store/src/test/java/org/apache/ignite/tests/CassandraConfigTest.java @@ -17,26 +17,22 @@ package org.apache.ignite.tests; -import junit.framework.TestCase; import org.apache.ignite.cache.query.annotations.QuerySqlField; import org.apache.ignite.cache.store.cassandra.persistence.KeyPersistenceSettings; import org.apache.ignite.cache.store.cassandra.persistence.KeyValuePersistenceSettings; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; + +import static junit.framework.Assert.assertEquals; /** * Simple test for DDL generator. */ -@RunWith(JUnit4.class) -public class CassandraConfigTest extends TestCase { +public class CassandraConfigTest { /** * Check if same DDL generated for similar keys and same KeyPersistenceConfiguration. - * - * @throws Exception */ @Test - public void testDDLGeneration() throws Exception { + public void testDDLGeneration() { KeyPersistenceSettings keyPersistenceSettingsA = getKeyPersistenceSettings(KeyA.class); KeyPersistenceSettings keyPersistenceSettingsB = getKeyPersistenceSettings(KeyB.class); diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/impl/ClientCacheFlagsCodecTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/impl/ClientCacheFlagsCodecTest.java index c792edbc71ecd..8d7b4b5c237d2 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/client/impl/ClientCacheFlagsCodecTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/impl/ClientCacheFlagsCodecTest.java @@ -21,19 +21,16 @@ import java.util.EnumSet; import java.util.Set; -import junit.framework.TestCase; - import org.apache.ignite.internal.client.GridClientCacheFlag; import org.apache.ignite.internal.util.typedef.F; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; + +import static junit.framework.Assert.assertTrue; /** * Tests conversions between GridClientCacheFlag. */ -@RunWith(JUnit4.class) -public class ClientCacheFlagsCodecTest extends TestCase { +public class ClientCacheFlagsCodecTest { /** * Tests that each client flag will be correctly converted to server flag. */ diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcBlobTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcBlobTest.java index 1f1536f25cb8f..a8267aa238512 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcBlobTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcBlobTest.java @@ -21,16 +21,16 @@ import java.io.InputStream; import java.sql.SQLException; import java.util.Arrays; -import junit.framework.TestCase; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; + +import static junit.framework.Assert.assertEquals; +import static junit.framework.Assert.assertTrue; +import static junit.framework.Assert.fail; /** * */ -@RunWith(JUnit4.class) -public class JdbcBlobTest extends TestCase { +public class JdbcBlobTest { /** * @throws Exception If failed. */ diff --git a/modules/compress/src/test/java/org/apache/ignite/internal/processors/compress/FileSystemUtilsTest.java b/modules/compress/src/test/java/org/apache/ignite/internal/processors/compress/FileSystemUtilsTest.java index c473633719506..de8ec5c115288 100644 --- a/modules/compress/src/test/java/org/apache/ignite/internal/processors/compress/FileSystemUtilsTest.java +++ b/modules/compress/src/test/java/org/apache/ignite/internal/processors/compress/FileSystemUtilsTest.java @@ -23,16 +23,15 @@ import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; -import junit.framework.TestCase; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.util.typedef.internal.U; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; import static java.nio.file.StandardOpenOption.READ; import static java.nio.file.StandardOpenOption.TRUNCATE_EXISTING; import static java.nio.file.StandardOpenOption.WRITE; +import static junit.framework.Assert.assertEquals; +import static junit.framework.Assert.assertTrue; import static org.apache.ignite.internal.processors.compress.CompressionProcessorImpl.allocateDirectBuffer; import static org.apache.ignite.internal.processors.compress.FileSystemUtils.getFileSystemBlockSize; import static org.apache.ignite.internal.processors.compress.FileSystemUtils.getSparseFileSize; @@ -40,8 +39,7 @@ /** */ -@RunWith(JUnit4.class) -public class FileSystemUtilsTest extends TestCase { +public class FileSystemUtilsTest { /** * @throws Exception If failed. */ diff --git a/modules/direct-io/src/test/java/org/apache/ignite/internal/processors/cache/persistence/file/IgniteFileIOTest.java b/modules/direct-io/src/test/java/org/apache/ignite/internal/processors/cache/persistence/file/IgniteFileIOTest.java index 95011e2231452..a5e17030a5c00 100644 --- a/modules/direct-io/src/test/java/org/apache/ignite/internal/processors/cache/persistence/file/IgniteFileIOTest.java +++ b/modules/direct-io/src/test/java/org/apache/ignite/internal/processors/cache/persistence/file/IgniteFileIOTest.java @@ -21,17 +21,13 @@ import java.nio.ByteBuffer; import java.nio.MappedByteBuffer; import java.util.concurrent.ThreadLocalRandom; -import junit.framework.TestCase; import org.jetbrains.annotations.NotNull; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; /** * File IO tests. */ -@RunWith(JUnit4.class) -public class IgniteFileIOTest extends TestCase { +public class IgniteFileIOTest { /** Test data size. */ private static final int TEST_DATA_SIZE = 16 * 1024 * 1024; diff --git a/modules/jcl/src/test/java/org/apache/ignite/logger/jcl/JclLoggerTest.java b/modules/jcl/src/test/java/org/apache/ignite/logger/jcl/JclLoggerTest.java index e6c8c1e36d99d..0568e0ce8525a 100644 --- a/modules/jcl/src/test/java/org/apache/ignite/logger/jcl/JclLoggerTest.java +++ b/modules/jcl/src/test/java/org/apache/ignite/logger/jcl/JclLoggerTest.java @@ -17,20 +17,16 @@ package org.apache.ignite.logger.jcl; -import junit.framework.TestCase; import org.apache.commons.logging.LogFactory; import org.apache.ignite.IgniteLogger; import org.apache.ignite.testframework.junits.common.GridCommonTest; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; /** * Jcl logger test. */ @GridCommonTest(group = "Logger") -@RunWith(JUnit4.class) -public class JclLoggerTest extends TestCase { +public class JclLoggerTest { /** */ @SuppressWarnings({"FieldCanBeLocal"}) private IgniteLogger log; diff --git a/modules/log4j2/src/test/java/org/apache/ignite/logger/log4j2/Log4j2ConfigUpdateTest.java b/modules/log4j2/src/test/java/org/apache/ignite/logger/log4j2/Log4j2ConfigUpdateTest.java index 9a4380b3b4009..ae09b73d3b0ff 100644 --- a/modules/log4j2/src/test/java/org/apache/ignite/logger/log4j2/Log4j2ConfigUpdateTest.java +++ b/modules/log4j2/src/test/java/org/apache/ignite/logger/log4j2/Log4j2ConfigUpdateTest.java @@ -21,17 +21,16 @@ import java.nio.file.Files; import java.nio.file.StandardCopyOption; import java.util.Date; -import junit.framework.TestCase; import org.apache.ignite.internal.util.typedef.internal.U; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; + +import static junit.framework.Assert.assertFalse; +import static junit.framework.Assert.assertTrue; /** * Checking that Log4j2 configuration is updated when its source file is changed. */ -@RunWith(JUnit4.class) -public class Log4j2ConfigUpdateTest extends TestCase { +public class Log4j2ConfigUpdateTest { /** Path to log4j2 configuration with INFO enabled. */ private static final String LOG_CONFIG_INFO = "modules/log4j2/src/test/config/log4j2-info.xml"; diff --git a/modules/log4j2/src/test/java/org/apache/ignite/logger/log4j2/Log4j2LoggerVerboseModeSelfTest.java b/modules/log4j2/src/test/java/org/apache/ignite/logger/log4j2/Log4j2LoggerVerboseModeSelfTest.java index 26a90bc1cf970..5c4390838e389 100644 --- a/modules/log4j2/src/test/java/org/apache/ignite/logger/log4j2/Log4j2LoggerVerboseModeSelfTest.java +++ b/modules/log4j2/src/test/java/org/apache/ignite/logger/log4j2/Log4j2LoggerVerboseModeSelfTest.java @@ -21,7 +21,6 @@ import java.io.File; import java.io.PrintStream; import java.util.Collections; -import junit.framework.TestCase; import org.apache.ignite.Ignite; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.util.typedef.G; @@ -31,24 +30,20 @@ import org.apache.logging.log4j.Level; import org.junit.Before; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; + +import static junit.framework.Assert.assertTrue; /** * Grid Log4j2 SPI test. */ -@RunWith(JUnit4.class) -public class Log4j2LoggerVerboseModeSelfTest extends TestCase { +public class Log4j2LoggerVerboseModeSelfTest { /** */ private static final String LOG_PATH_VERBOSE_TEST = "modules/core/src/test/config/log4j2-verbose-test.xml"; - /** - * @throws Exception If failed. - */ + /** */ @Before - @Override public void setUp() throws Exception { + public void setUp() { Log4J2Logger.cleanup(); - } /** diff --git a/modules/slf4j/src/test/java/org/apache/ignite/logger/slf4j/Slf4jLoggerMarkerTest.java b/modules/slf4j/src/test/java/org/apache/ignite/logger/slf4j/Slf4jLoggerMarkerTest.java index 03fb6c5140ee6..23f25c68a829a 100644 --- a/modules/slf4j/src/test/java/org/apache/ignite/logger/slf4j/Slf4jLoggerMarkerTest.java +++ b/modules/slf4j/src/test/java/org/apache/ignite/logger/slf4j/Slf4jLoggerMarkerTest.java @@ -18,18 +18,20 @@ package org.apache.ignite.logger.slf4j; import java.io.File; -import junit.framework.TestCase; import org.apache.ignite.internal.util.typedef.internal.U; +import org.junit.After; +import org.junit.Before; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; import org.slf4j.LoggerFactory; +import static junit.framework.Assert.assertFalse; +import static junit.framework.Assert.assertNotNull; +import static junit.framework.Assert.assertTrue; + /** * Testing that markers are supported by log4j2 implementation. */ -@RunWith(JUnit4.class) -public class Slf4jLoggerMarkerTest extends TestCase { +public class Slf4jLoggerMarkerTest { /** Path to full log. */ private static final String LOG_ALL = "work/log/all.log"; @@ -37,16 +39,14 @@ public class Slf4jLoggerMarkerTest extends TestCase { private static final String LOG_FILTERED = "work/log/filtered.log"; /** */ - @Override protected void setUp() throws Exception { - super.setUp(); - + @Before + public void setUp() { deleteLogs(); } /** */ - @Override protected void tearDown() throws Exception { - super.tearDown(); - + @After + void tearDown() { deleteLogs(); } From 0bea0d01ae41b9e4c6e6ee4b6a41594b1021bd1d Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Tue, 18 Dec 2018 01:47:42 +0300 Subject: [PATCH 119/176] IGNITE-10177 Junit 3 cleanup - wip - cleanup -- verified with diffs overview and rebuild --- .../processors/cache/IgnitePdsDataRegionMetricsTxTest.java | 1 + .../cache/eviction/lru/LruNearEvictionPolicySelfTest.java | 1 + .../cache/persistence/db/IgnitePdsPartitionPreloadTest.java | 1 + .../processors/cache/persistence/db/wal/WalCompactionTest.java | 1 + .../persistence/metastorage/IgniteMetaStorageBasicTest.java | 3 +++ .../cache/persistence/wal/ExplicitWalDeltaConsistencyTest.java | 1 + .../continuous/CacheEntryProcessorNonSerializableTest.java | 1 + .../discovery/tcp/TcpDiscoveryPendingMessageDeliveryTest.java | 1 + .../java/org/apache/ignite/util/GridCommandHandlerTest.java | 2 ++ .../processors/cache/GridCacheDynamicLoadOnClientTest.java | 2 ++ .../ignite/internal/processors/cache/index/BasicIndexTest.java | 1 + .../org/apache/ignite/ml/nn/MLPTrainerIntegrationTest.java | 2 ++ .../apache/ignite/yarn/IgniteApplicationMasterSelfTest.java | 1 + 13 files changed, 18 insertions(+) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgnitePdsDataRegionMetricsTxTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgnitePdsDataRegionMetricsTxTest.java index c7cf4cf30bf35..0085d2e3eceeb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgnitePdsDataRegionMetricsTxTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgnitePdsDataRegionMetricsTxTest.java @@ -37,6 +37,7 @@ public class IgnitePdsDataRegionMetricsTxTest extends IgnitePdsDataRegionMetrics } /** {@inheritDoc} */ + @Test @Override public void testMemoryUsageSingleNode() throws Exception { if (MvccFeatureChecker.forcedMvcc()) fail("https://issues.apache.org/jira/browse/IGNITE-10591"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearEvictionPolicySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearEvictionPolicySelfTest.java index b063bcf1c2ad7..c8cdbf68a97ee 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearEvictionPolicySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearEvictionPolicySelfTest.java @@ -111,6 +111,7 @@ public void testTransactionalNearEvictionMaxSize() throws Exception { /** * @throws Exception If failed. */ + @Test public void testMvccTransactionalNearEvictionMaxSize() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-7187"); fail("https://issues.apache.org/jira/browse/IGNITE-7956"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsPartitionPreloadTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsPartitionPreloadTest.java index fd5bc9ce387ad..63a86a820bdd3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsPartitionPreloadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsPartitionPreloadTest.java @@ -587,6 +587,7 @@ public void testPreloadLocalTransactionalAsync() throws Exception { } /** */ + @Test public void testPreloadLocalTransactionalAsyncMvcc() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-9530"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalCompactionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalCompactionTest.java index 326f5dd0f69bb..ffffac92e2749 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalCompactionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalCompactionTest.java @@ -333,6 +333,7 @@ private void testCompressorToleratesEmptyWalSegments(WALMode walMode) throws Exc /** * @throws Exception If failed. */ + @Test public void testSeekingStartInCompactedSegment() throws Exception { IgniteEx ig = (IgniteEx)startGrids(3); ig.cluster().active(true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/metastorage/IgniteMetaStorageBasicTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/metastorage/IgniteMetaStorageBasicTest.java index 37e2861c7b44c..c8a41db90ba46 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/metastorage/IgniteMetaStorageBasicTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/metastorage/IgniteMetaStorageBasicTest.java @@ -193,6 +193,7 @@ private Map putDataToMetaStorage(MetaStorage metaStorage, int si /** * Testing data migration between metastorage partitions (delete partition case) */ + @Test public void testDeletePartitionFromMetaStorageMigration() throws Exception { final Map testData = new HashMap<>(); @@ -302,6 +303,7 @@ public void testDeletePartitionFromMetaStorageMigration() throws Exception { /** * Testing data migration between metastorage partitions */ + @Test public void testMetaStorageMigration() throws Exception { final Map testData = new HashMap<>(5_000); @@ -374,6 +376,7 @@ public void testMetaStorageMigration() throws Exception { /** * Testing temporary storage */ + @Test public void testMetaStoreMigrationTmpStorage() throws Exception { List> data = generateTestData(2_000, -1).collect(Collectors.toList()); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/ExplicitWalDeltaConsistencyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/ExplicitWalDeltaConsistencyTest.java index b5f47dd52c5c5..20051741fef8e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/ExplicitWalDeltaConsistencyTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/ExplicitWalDeltaConsistencyTest.java @@ -76,6 +76,7 @@ public final void testPutRemoveAfterCheckpoint() throws Exception { /** * @throws Exception If failed. */ + @Test public final void testNotEmptyPds() throws Exception { if (MvccFeatureChecker.forcedMvcc()) fail("https://issues.apache.org/jira/browse/IGNITE-10584"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheEntryProcessorNonSerializableTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheEntryProcessorNonSerializableTest.java index ea3addec9fdb3..7de184be06da3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheEntryProcessorNonSerializableTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheEntryProcessorNonSerializableTest.java @@ -247,6 +247,7 @@ public void testMvccPessimisticOnePhaseCommit() { /** */ + @Test public void testMvccPessimisticOnePhaseCommitWithNearCache() { fail("https://issues.apache.org/jira/browse/IGNITE-7187"); diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryPendingMessageDeliveryTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryPendingMessageDeliveryTest.java index 51a897804f1a1..c0026ba610432 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryPendingMessageDeliveryTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryPendingMessageDeliveryTest.java @@ -196,6 +196,7 @@ public void testCustomMessageInSingletonCluster() throws Exception { /** * @throws Exception If failed. */ + @Test public void testDeliveryAllFailedMessagesInCorrectOrder() throws Exception { IgniteEx coord = startGrid("coordinator"); TcpDiscoverySpi coordDisco = (TcpDiscoverySpi)coord.configuration().getDiscoverySpi(); diff --git a/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java b/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java index 318b8379996ec..b9610abce8fa5 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java @@ -1102,6 +1102,7 @@ private void corruptingAndCheckDefaultCache(IgniteEx ignite, CacheFilterEnum cac * * @throws Exception If failed. */ + @Test public void testCacheIdleVerifyDumpWhenNodeFailing() throws Exception { Ignite ignite = startGrids(3); @@ -1138,6 +1139,7 @@ public void testCacheIdleVerifyDumpWhenNodeFailing() throws Exception { * * @throws Exception If failed. */ + @Test public void testCacheIdleVerifyDumpWhenSeveralNodesFailing() throws Exception { int nodes = 6; diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDynamicLoadOnClientTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDynamicLoadOnClientTest.java index 78fab64db197f..601e90b71d4fc 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDynamicLoadOnClientTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDynamicLoadOnClientTest.java @@ -216,6 +216,7 @@ public void testClientPut() { /** * Test DDL operation for not started cache on client node. */ + @Test public void testCreateIdxOnClient() { getDefaultCacheOnClient().query(new SqlFieldsQuery("CREATE INDEX IDX_11 ON " + FULL_TABLE_NAME + " (name asc)")).getAll(); } @@ -223,6 +224,7 @@ public void testCreateIdxOnClient() { /** * Test DDL operation for not started cache on client node. */ + @Test public void testDropIdxOnClient() { srvNode.getOrCreateCache(DEFAULT_CACHE_NAME).query(new SqlFieldsQuery("CREATE INDEX IDX_TST ON " + FULL_TABLE_NAME + " (name desc)")).getAll(); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/BasicIndexTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/BasicIndexTest.java index bd05de1e34c8a..af46782bce1d0 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/BasicIndexTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/BasicIndexTest.java @@ -332,6 +332,7 @@ public void testDynamicIndexesWithPersistence() throws Exception { } /** */ + @Test public void testDynamicIndexesDropWithPersistence() throws Exception { isPersistenceEnabled = true; diff --git a/modules/ml/src/test/java/org/apache/ignite/ml/nn/MLPTrainerIntegrationTest.java b/modules/ml/src/test/java/org/apache/ignite/ml/nn/MLPTrainerIntegrationTest.java index 0f7ad4d2c8d32..ff6754abe2eca 100644 --- a/modules/ml/src/test/java/org/apache/ignite/ml/nn/MLPTrainerIntegrationTest.java +++ b/modules/ml/src/test/java/org/apache/ignite/ml/nn/MLPTrainerIntegrationTest.java @@ -90,6 +90,7 @@ public void testXORSimpleGD() { /** * Test 'XOR' operation training with {@link RPropUpdateCalculator}. */ + @Test public void testXORRProp() { xorTest(new UpdatesStrategy<>( new RPropUpdateCalculator(), @@ -101,6 +102,7 @@ public void testXORRProp() { /** * Test 'XOR' operation training with {@link NesterovUpdateCalculator}. */ + @Test public void testXORNesterov() { xorTest(new UpdatesStrategy<>( new NesterovUpdateCalculator(0.1, 0.7), diff --git a/modules/yarn/src/test/java/org/apache/ignite/yarn/IgniteApplicationMasterSelfTest.java b/modules/yarn/src/test/java/org/apache/ignite/yarn/IgniteApplicationMasterSelfTest.java index ee387bf874829..e2bb15fcdda3e 100644 --- a/modules/yarn/src/test/java/org/apache/ignite/yarn/IgniteApplicationMasterSelfTest.java +++ b/modules/yarn/src/test/java/org/apache/ignite/yarn/IgniteApplicationMasterSelfTest.java @@ -144,6 +144,7 @@ public void testMemoryOverHeadAllocation() throws Exception { * * @throws Exception If failed. */ + @Test public void testMemoryOverHeadPreventAllocation() throws Exception { rmMock.availableRes(new MockResource(1024, 2)); appMaster.setRmClient(rmMock); From 94d2bc1130e76ec5dd6c06e95e0fd5ce2ce2f4fc Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Tue, 18 Dec 2018 02:03:03 +0300 Subject: [PATCH 120/176] IGNITE-10177 Junit 3 cleanup - wip - cleanup -- verified with diffs overview and rebuild --- .../org/apache/ignite/logger/slf4j/Slf4jLoggerMarkerTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/slf4j/src/test/java/org/apache/ignite/logger/slf4j/Slf4jLoggerMarkerTest.java b/modules/slf4j/src/test/java/org/apache/ignite/logger/slf4j/Slf4jLoggerMarkerTest.java index 23f25c68a829a..70b52067bd18b 100644 --- a/modules/slf4j/src/test/java/org/apache/ignite/logger/slf4j/Slf4jLoggerMarkerTest.java +++ b/modules/slf4j/src/test/java/org/apache/ignite/logger/slf4j/Slf4jLoggerMarkerTest.java @@ -46,7 +46,7 @@ public void setUp() { /** */ @After - void tearDown() { + public void tearDown() { deleteLogs(); } From e41ffb65ad493a7cf2b3eaf9cc6be38754d7d79d Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Tue, 18 Dec 2018 08:35:20 +0300 Subject: [PATCH 121/176] IGNITE-10177 Junit 3 cleanup - wip - fixed errors found by TC bot -- verified with diffs overview and rebuild --- .../processors/cache/GridCacheAbstractFullApiSelfTest.java | 3 --- .../cache/distributed/IgniteNoClassOnServerAbstractTest.java | 4 +++- .../near/GridCachePartitionedFullApiSelfTest.java | 3 --- .../near/GridCachePartitionedMultiNodeFullApiSelfTest.java | 3 --- .../tcp/IgniteTcpCommunicationHandshakeWaitTest.java | 2 ++ .../processors/query/IgniteSqlSchemaIndexingTest.java | 1 + .../h2/twostep/AndOperationExtractPartitionSelfTest.java | 5 +++++ .../ignite/ml/dataset/impl/cache/util/ComputeUtilsTest.java | 3 --- .../builder/IgniteDistributedInfModelBuilderTest.java | 2 ++ .../ignite/stream/twitter/IgniteTwitterStreamerTest.java | 3 --- 10 files changed, 13 insertions(+), 16 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java index c091765861e72..c8e9a1b3d3ffe 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java @@ -105,8 +105,6 @@ import org.apache.ignite.transactions.TransactionIsolation; import org.jetbrains.annotations.Nullable; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; @@ -132,7 +130,6 @@ * Full API cache test. */ @SuppressWarnings("TransientFieldInNonSerializableClass") -@RunWith(JUnit4.class) public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstractSelfTest { /** Test timeout */ private static final long TEST_TIMEOUT = 60 * 1000; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteNoClassOnServerAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteNoClassOnServerAbstractTest.java index 1d92376a3a935..68034498e21a3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteNoClassOnServerAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteNoClassOnServerAbstractTest.java @@ -30,6 +30,7 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; import static java.util.concurrent.TimeUnit.SECONDS; @@ -73,6 +74,7 @@ private IgniteConfiguration createConfiguration() { /** * @throws Exception If failed. */ + @Test public final void testNoClassOnServerNode() throws Exception { info("Run test with client: " + clientClassName()); @@ -132,4 +134,4 @@ public final void testNoClassOnServerNode() throws Exception { } } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFullApiSelfTest.java index e63c31295b3b5..6674076a65e60 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFullApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFullApiSelfTest.java @@ -24,15 +24,12 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.processors.cache.GridCacheAbstractFullApiSelfTest; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** * Tests for partitioned cache. */ -@RunWith(JUnit4.class) public class GridCachePartitionedFullApiSelfTest extends GridCacheAbstractFullApiSelfTest { /** {@inheritDoc} */ @Override protected CacheMode cacheMode() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java index c0300cbb6ee6d..d118bc583d296 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java @@ -33,8 +33,6 @@ import org.apache.ignite.internal.IgniteKernal; import org.apache.ignite.internal.util.typedef.F; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -46,7 +44,6 @@ /** * Multi-node tests for partitioned cache. */ -@RunWith(JUnit4.class) public class GridCachePartitionedMultiNodeFullApiSelfTest extends GridCachePartitionedFullApiSelfTest { /** {@inheritDoc} */ @Override protected int gridCount() { diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/IgniteTcpCommunicationHandshakeWaitTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/IgniteTcpCommunicationHandshakeWaitTest.java index f48f36413948e..b1c9820c31745 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/IgniteTcpCommunicationHandshakeWaitTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/IgniteTcpCommunicationHandshakeWaitTest.java @@ -35,6 +35,7 @@ import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryNodeAddFinishedMessage; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; /** * Testing {@link TcpCommunicationSpi} that will send the wait handshake message on received connections until SPI @@ -80,6 +81,7 @@ public class IgniteTcpCommunicationHandshakeWaitTest extends GridCommonAbstractT * * @throws Exception If failed. */ + @Test public void testHandshakeOnNodeJoining() throws Exception { System.setProperty(IgniteSystemProperties.IGNITE_ENABLE_FORCIBLE_NODE_KILL, "true"); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSchemaIndexingTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSchemaIndexingTest.java index c5827a7b5cb54..2ebc30f639fb2 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSchemaIndexingTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSchemaIndexingTest.java @@ -119,6 +119,7 @@ public void testCaseSensitive() throws Exception { * * @throws Exception If failed. */ + @Test public void testCustomSchemaMultipleCachesTablesCollision() throws Exception { //TODO: Rewrite with dynamic cache creation, and GRID start in #beforeTest after resolve of //TODO: IGNITE-1094 diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/AndOperationExtractPartitionSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/AndOperationExtractPartitionSelfTest.java index a94910e007e1c..5bbb1d21cc01f 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/AndOperationExtractPartitionSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/AndOperationExtractPartitionSelfTest.java @@ -35,6 +35,7 @@ import org.apache.ignite.plugin.extensions.communication.Message; import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; import static org.apache.ignite.internal.processors.query.h2.twostep.JoinSqlTestHelper.ORG; import static org.apache.ignite.internal.processors.query.h2.twostep.JoinSqlTestHelper.ORG_COUNT; @@ -115,6 +116,7 @@ public class AndOperationExtractPartitionSelfTest extends GridCommonAbstractTest } /** */ + @Test public void testAlternativeUsageOfIn(){ try (FieldsQueryCursor> cur = orgCache.query(new SqlFieldsQuery( "SELECT * FROM Organization org WHERE org._KEY = 'org1' AND " + @@ -129,11 +131,13 @@ public void testAlternativeUsageOfIn(){ } /** */ + @Test public void testEmptyList() { testAndOperator(Collections.emptyList(), null, 0L, NODES_COUNT - 1); } /** */ + @Test public void testSingleValueList() { testAndOperator(Collections.singletonList(ORG + 0), null, 0L, 0); testAndOperator(Collections.singletonList(ORG + 1), null, 1L, 1); @@ -146,6 +150,7 @@ public void testSingleValueList() { } /** */ + @Test public void testMultipleValueList() { testAndOperator(Arrays.asList(ORG + 0, ORG + 3, ORG + String.valueOf(ORG_COUNT - 1)), null, 1, 1); testAndOperator(Arrays.asList("ORG", ORG + 0, ORG + 4, ORG + String.valueOf(ORG_COUNT - 1)), null, 0, 0); diff --git a/modules/ml/src/test/java/org/apache/ignite/ml/dataset/impl/cache/util/ComputeUtilsTest.java b/modules/ml/src/test/java/org/apache/ignite/ml/dataset/impl/cache/util/ComputeUtilsTest.java index 4ab71416a0cd9..bb8570d328803 100644 --- a/modules/ml/src/test/java/org/apache/ignite/ml/dataset/impl/cache/util/ComputeUtilsTest.java +++ b/modules/ml/src/test/java/org/apache/ignite/ml/dataset/impl/cache/util/ComputeUtilsTest.java @@ -37,13 +37,10 @@ import org.apache.ignite.ml.dataset.UpstreamTransformerBuilder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Test; -import org.junit.internal.runners.JUnit38ClassRunner; -import org.junit.runner.RunWith; /** * Tests for {@link ComputeUtils}. */ -@RunWith(JUnit38ClassRunner.class) public class ComputeUtilsTest extends GridCommonAbstractTest { /** Number of nodes in grid. */ private static final int NODE_COUNT = 10; diff --git a/modules/ml/src/test/java/org/apache/ignite/ml/inference/builder/IgniteDistributedInfModelBuilderTest.java b/modules/ml/src/test/java/org/apache/ignite/ml/inference/builder/IgniteDistributedInfModelBuilderTest.java index 1cc8eb511fa98..b17a3fd8b6582 100644 --- a/modules/ml/src/test/java/org/apache/ignite/ml/inference/builder/IgniteDistributedInfModelBuilderTest.java +++ b/modules/ml/src/test/java/org/apache/ignite/ml/inference/builder/IgniteDistributedInfModelBuilderTest.java @@ -22,6 +22,7 @@ import org.apache.ignite.internal.util.IgniteUtils; import org.apache.ignite.ml.inference.InfModel; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; /** * Tests for {@link IgniteDistributedInfModelBuilder} class. @@ -55,6 +56,7 @@ public class IgniteDistributedInfModelBuilderTest extends GridCommonAbstractTest } /** */ + @Test public void testBuild() { AsyncInfModelBuilder mdlBuilder = new IgniteDistributedInfModelBuilder(ignite, 1, 1); diff --git a/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTest.java b/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTest.java index 5f1b977c7d0cd..958cd4defb998 100644 --- a/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTest.java +++ b/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTest.java @@ -32,8 +32,6 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Rule; import org.junit.Test; -import org.junit.internal.runners.JUnit38ClassRunner; -import org.junit.runner.RunWith; import twitter4j.Status; import twitter4j.TwitterException; import twitter4j.TwitterObjectFactory; @@ -47,7 +45,6 @@ /** * Test for {@link TwitterStreamer}. Tests Public Status streaming API https://dev.twitter.com/streaming/public. */ -@RunWith(JUnit38ClassRunner.class) public class IgniteTwitterStreamerTest extends GridCommonAbstractTest { /** Cache entries count. */ private static final int CACHE_ENTRY_COUNT = 100; From b2102053a4b5e914b0c2d665cbe87355d2952596 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Tue, 18 Dec 2018 14:27:03 +0300 Subject: [PATCH 122/176] IGNITE-10177 Junit 3 cleanup - wip - fixed errors found by TC bot -- verified with diffs overview and rebuild --- .../testframework/junits/common/GridAbstractExamplesTest.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridAbstractExamplesTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridAbstractExamplesTest.java index 70fd33035cdb1..3c305fac291ab 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridAbstractExamplesTest.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridAbstractExamplesTest.java @@ -20,13 +20,10 @@ import java.io.FileReader; import java.util.Properties; import org.apache.ignite.internal.util.typedef.internal.U; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; /** * Base class for examples test. */ -@RunWith(JUnit4.class) public abstract class GridAbstractExamplesTest extends GridCommonAbstractTest { /** */ protected static final String[] EMPTY_ARGS = new String[0]; From 9f937e1961d5d4f9b998315701d00897df318151 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Tue, 18 Dec 2018 14:53:45 +0300 Subject: [PATCH 123/176] IGNITE-10177 Junit 3 cleanup - wip - fixed errors found by TC bot -- verified with diffs overview and rebuild --- .../org/apache/ignite/testframework/junits/LegacySupport.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacySupport.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacySupport.java index c194d3db1cfee..0fccef48b3a28 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacySupport.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacySupport.java @@ -68,7 +68,7 @@ final void runTestCase(Statement testRoutine) throws Throwable { * @return Nothing. */ @Override public final int countTestCases() { - throw new UnsupportedOperationException("this method is not expected to be invoked"); + throw new UnsupportedOperationException("This method is not expected to be invoked: countTestCases()."); } /** @@ -78,6 +78,6 @@ final void runTestCase(Statement testRoutine) throws Throwable { * methods in GridTestUtils.

    */ @Override public final void run(TestResult res) { - throw new UnsupportedOperationException("this method is not expected to be invoked"); + throw new UnsupportedOperationException("This method is not intended to be invoked: run(TestResult)."); } } From d4697c421b28f554d01271963885d34632fb16ca Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Tue, 18 Dec 2018 15:50:32 +0300 Subject: [PATCH 124/176] IGNITE-10177 Junit 3 cleanup - wip - fixed errors found by TC bot -- verified with diffs overview and rebuild --- .../testframework/junits/GridAbstractTest.java | 6 ++---- .../ignite/testframework/junits/LegacySupport.java | 12 ++++++++++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java index 1bd9eac32b969..2213936aea946 100755 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java @@ -124,7 +124,6 @@ import org.jetbrains.annotations.Nullable; import org.junit.Rule; import org.junit.Test; -import org.junit.rules.TestName; import org.junit.rules.TestRule; import org.junit.runners.model.Statement; import org.springframework.beans.BeansException; @@ -179,14 +178,13 @@ public abstract class GridAbstractTest extends LegacySupport { /** Lock to maintain integrity of {@link TestCounters}. */ private final Lock runSerializer = new ReentrantLock(); - /** Supports obtaining test name for JUnit4 cases. */ - @Rule public transient TestName nameRule = new TestName(); - /** Manages test execution and reporting. */ @Rule public transient TestRule runRule = (base, description) -> new Statement() { @Override public void evaluate() throws Throwable { runSerializer.lock(); try { + assert getName() != null : "getName returned null"; + runTestCase(base); } finally { runSerializer.unlock(); diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacySupport.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacySupport.java index 0fccef48b3a28..9ceebc0e58028 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacySupport.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacySupport.java @@ -20,14 +20,22 @@ import junit.framework.Assert; // IMPL NOTE some old tests expect inherited deprecated assertions. import junit.framework.Test; import junit.framework.TestResult; +import org.junit.Rule; +import org.junit.rules.TestName; import org.junit.runners.model.Statement; /** * Supports compatibility with old tests that expect specific threading behavior of JUnit 3 TestCase class, * inherited deprecated assertions and specific old interface for GridTestUtils. */ -@SuppressWarnings({"ExtendsUtilityClass", "deprecation"}) -abstract class LegacySupport extends Assert implements Test { +@SuppressWarnings({"TransientFieldInNonSerializableClass", "ExtendsUtilityClass", "deprecation"}) +public abstract class LegacySupport extends Assert implements Test { + /** + * Supports obtaining test name for JUnit4 framework in a way that makes it available for legacy methods invoked + * from {@code runTest(Statement)}. + */ + @Rule public transient TestName nameRule = new TestName(); + /** This method is called before a test is executed. */ abstract void setUp() throws Exception; From 30dddd4ed288f3a427439e73edcf2b77a170d0d9 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Tue, 18 Dec 2018 15:59:07 +0300 Subject: [PATCH 125/176] IGNITE-10177 Junit 3 cleanup - wip - fixed errors found by TC bot -- verified with diffs overview and rebuild --- .../replicated/IgniteCacheReplicatedQuerySelfTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheReplicatedQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheReplicatedQuerySelfTest.java index 4b10536a4820d..e9b2c71a9cbeb 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheReplicatedQuerySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheReplicatedQuerySelfTest.java @@ -46,8 +46,8 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.testframework.GridTestUtils; -import org.apache.ignite.testsuites.IgniteIgnore; import org.apache.ignite.transactions.Transaction; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -344,7 +344,7 @@ public void testLostIterator() throws Exception { /** * @throws Exception If failed. */ - @IgniteIgnore(value = "https://issues.apache.org/jira/browse/IGNITE-613", forceFailure = true) + @Ignore("https://issues.apache.org/jira/browse/IGNITE-613") @Test public void testNodeLeft() throws Exception { Ignite g = startGrid("client"); From 1b868f40c320be09b1da143629bcdbcae0b0d562 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Tue, 18 Dec 2018 16:03:58 +0300 Subject: [PATCH 126/176] IGNITE-10177 Junit 3 cleanup - wip - fixed errors found by TC bot -- verified with diffs overview and rebuild --- .../cache/mvcc/CacheMvccReplicatedSelectForUpdateQueryTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccReplicatedSelectForUpdateQueryTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccReplicatedSelectForUpdateQueryTest.java index a45831942b889..b123e57fcacfc 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccReplicatedSelectForUpdateQueryTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccReplicatedSelectForUpdateQueryTest.java @@ -24,7 +24,7 @@ /** */ public class CacheMvccReplicatedSelectForUpdateQueryTest extends CacheMvccSelectForUpdateQueryAbstractTest { /** {@inheritDoc} */ - public CacheMode cacheMode() { + @Override public CacheMode cacheMode() { return REPLICATED; } } From e9fe390876624c2bc8f0a8ec9e69a295d9c6f590 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Tue, 18 Dec 2018 17:48:52 +0300 Subject: [PATCH 127/176] IGNITE-10177 Junit 3 cleanup - wip - fixed errors found by TC bot -- verified with diffs overview and rebuild --- .../testframework/junits/GridAbstractTest.java | 9 --------- .../testframework/junits/LegacySupport.java | 15 +++++++++++++-- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java index 2213936aea946..d840ddf4707da 100755 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java @@ -272,15 +272,6 @@ assert isJunitFrameworkClass() : "GridAbstractTest class cannot be extended dire this.startGrid = startGrid; } - /** - * Gets the name of the currently executed test case. - * - * @return Name of the currently executed test case. - */ - public String getName() { - return nameRule.getMethodName(); - } - /** * @param cls Class to create. * @return Instance of class. diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacySupport.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacySupport.java index 9ceebc0e58028..6ef609e4c426f 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacySupport.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacySupport.java @@ -36,6 +36,15 @@ public abstract class LegacySupport extends Assert implements Test { */ @Rule public transient TestName nameRule = new TestName(); + /** + * Gets the name of the currently executed test case. + * + * @return Name of the currently executed test case. + */ + public String getName() { + return nameRule.getMethodName(); + } + /** This method is called before a test is executed. */ abstract void setUp() throws Exception; @@ -76,7 +85,8 @@ final void runTestCase(Statement testRoutine) throws Throwable { * @return Nothing. */ @Override public final int countTestCases() { - throw new UnsupportedOperationException("This method is not expected to be invoked: countTestCases()."); + throw new UnsupportedOperationException("This method is not expected to be invoked: countTestCases() at test: " + + getName()); } /** @@ -86,6 +96,7 @@ final void runTestCase(Statement testRoutine) throws Throwable { * methods in GridTestUtils.

    */ @Override public final void run(TestResult res) { - throw new UnsupportedOperationException("This method is not intended to be invoked: run(TestResult)."); + throw new UnsupportedOperationException("This method is not intended to be invoked: run(TestResult) at test: " + + getName()); } } From bdc57c8a3809f0d559e18ef73a1d9467419aed19 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Tue, 18 Dec 2018 18:40:08 +0300 Subject: [PATCH 128/176] IGNITE-10177 Junit 3 cleanup - wip - fixed errors found by TC bot -- verified with diffs overview and rebuild --- .../testsuites/IgniteExamplesMLTestSuite.java | 7 ++++++- ...gniteCacheDataStructuresBinarySelfTestSuite.java | 13 +++++++------ .../IgniteSpiCommunicationSelfTestSuite.java | 2 +- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesMLTestSuite.java b/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesMLTestSuite.java index b1e0456b232c8..168a6264e9ebc 100644 --- a/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesMLTestSuite.java +++ b/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesMLTestSuite.java @@ -29,6 +29,7 @@ import javassist.CtClass; import javassist.CtNewMethod; import javassist.NotFoundException; +import junit.framework.TestResult; import junit.framework.TestSuite; import org.apache.ignite.examples.ml.util.MLExamplesCommonArgs; import org.apache.ignite.testframework.GridTestUtils; @@ -69,7 +70,11 @@ public static TestSuite suite() throws Exception { TestSuite suite = new TestSuite("Ignite ML Examples Test Suite"); for (Class clazz : getClasses(basePkgForTests)) - suite.addTest(new TestSuite(makeTestClass(clazz))); + suite.addTest(new TestSuite(makeTestClass(clazz)) { + @Override public final void run(TestResult res) { + super.run(res); + } + }); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheDataStructuresBinarySelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheDataStructuresBinarySelfTestSuite.java index f22e05dddca60..a9162c2c0e0af 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheDataStructuresBinarySelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheDataStructuresBinarySelfTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.datastructures.GridCacheQueueApiSelfAbstractTest; import org.apache.ignite.internal.processors.cache.datastructures.local.GridCacheLocalAtomicQueueApiSelfTest; @@ -41,12 +42,12 @@ public static TestSuite suite() { System.setProperty(GridCacheQueueApiSelfAbstractTest.BINARY_QUEUE, "true"); - suite.addTest(new TestSuite(GridCacheLocalQueueApiSelfTest.class)); - suite.addTest(new TestSuite(GridCacheLocalAtomicQueueApiSelfTest.class)); - suite.addTest(new TestSuite(GridCacheReplicatedQueueApiSelfTest.class)); - suite.addTest(new TestSuite(GridCachePartitionedQueueApiSelfTest.class)); - suite.addTest(new TestSuite(GridCachePartitionedAtomicQueueApiSelfTest.class)); - suite.addTest(new TestSuite(IgnitePartitionedQueueNoBackupsTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheLocalQueueApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheLocalAtomicQueueApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedQueueApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedQueueApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedAtomicQueueApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgnitePartitionedQueueNoBackupsTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiCommunicationSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiCommunicationSelfTestSuite.java index b6d86655ce6ae..c882f257d2d57 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiCommunicationSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiCommunicationSelfTestSuite.java @@ -95,7 +95,7 @@ public static TestSuite suite() { suite.addTest(new JUnit4TestAdapter(IgniteTcpCommunicationHandshakeWaitTest.class)); suite.addTest(new JUnit4TestAdapter(IgniteTcpCommunicationHandshakeWaitSslTest.class)); - //suite.addTest(new TestSuite(GridCacheDhtLockBackupSelfTest.class)); + //suite.addTest(new JUnit4TestAdapter(GridCacheDhtLockBackupSelfTest.class)); return suite; } From ba4408c895c99f17cad36207d8450d1632000eba Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Wed, 19 Dec 2018 00:40:48 +0300 Subject: [PATCH 129/176] IGNITE-10177 Junit 3 cleanup - wip - fixed errors found by TC bot -- verified with diffs overview and rebuild --- .../processors/cache/IgniteCacheAbstractQuerySelfTest.java | 3 --- .../distributed/near/IgniteCachePartitionedQuerySelfTest.java | 3 --- 2 files changed, 6 deletions(-) diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java index d2f48c461785d..2f9332dbb246e 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java @@ -87,8 +87,6 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -106,7 +104,6 @@ /** * Various tests for cache queries. */ -@RunWith(JUnit4.class) public abstract class IgniteCacheAbstractQuerySelfTest extends GridCommonAbstractTest { /** Key count. */ private static final int KEY_CNT = 5000; diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCachePartitionedQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCachePartitionedQuerySelfTest.java index 47de06acfe3c4..9cfe121d5fcfd 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCachePartitionedQuerySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCachePartitionedQuerySelfTest.java @@ -41,8 +41,6 @@ import org.apache.ignite.spi.communication.CommunicationSpi; import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CachePeekMode.ALL; @@ -50,7 +48,6 @@ /** * Tests for partitioned cache queries. */ -@RunWith(JUnit4.class) public class IgniteCachePartitionedQuerySelfTest extends IgniteCacheAbstractQuerySelfTest { /** {@inheritDoc} */ @Override protected int gridCount() { From b9a63ecf81c6b95dfbecc254b1db2ed4f2d25505 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Wed, 19 Dec 2018 01:11:06 +0300 Subject: [PATCH 130/176] IGNITE-10177 Junit 3 cleanup - wip - fixed errors found by TC bot -- verified with diffs overview and rebuild --- .../IgniteCacheBasicConfigVariationsFullApiTestSuite.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheBasicConfigVariationsFullApiTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheBasicConfigVariationsFullApiTestSuite.java index af7b42612642f..f7d5c838dfc9a 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheBasicConfigVariationsFullApiTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheBasicConfigVariationsFullApiTestSuite.java @@ -20,14 +20,11 @@ import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.IgniteCacheConfigVariationsFullApiTest; import org.apache.ignite.testframework.configvariations.ConfigVariationsTestSuiteBuilder; -import org.junit.runner.RunWith; -import org.junit.runners.AllTests; /** * Test suite for cache API. */ -@RunWith(AllTests.class) -public class IgniteCacheBasicConfigVariationsFullApiTestSuite { +public class IgniteCacheBasicConfigVariationsFullApiTestSuite extends TestSuite { /** * @return Cache API test suite. */ From cf7f43b1d4722f75be88119fef085f7606ab3c67 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Wed, 19 Dec 2018 01:39:11 +0300 Subject: [PATCH 131/176] IGNITE-10177 Junit 3 cleanup - wip - fixed errors found by TC bot -- verified with diffs overview and rebuild --- .../IgniteCacheBasicConfigVariationsFullApiTestSuite.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheBasicConfigVariationsFullApiTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheBasicConfigVariationsFullApiTestSuite.java index f7d5c838dfc9a..af7b42612642f 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheBasicConfigVariationsFullApiTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheBasicConfigVariationsFullApiTestSuite.java @@ -20,11 +20,14 @@ import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.IgniteCacheConfigVariationsFullApiTest; import org.apache.ignite.testframework.configvariations.ConfigVariationsTestSuiteBuilder; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test suite for cache API. */ -public class IgniteCacheBasicConfigVariationsFullApiTestSuite extends TestSuite { +@RunWith(AllTests.class) +public class IgniteCacheBasicConfigVariationsFullApiTestSuite { /** * @return Cache API test suite. */ From c900feccd16c8c60b2a6c126e75d4bc108035ce2 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Wed, 19 Dec 2018 02:38:30 +0300 Subject: [PATCH 132/176] IGNITE-10177 Junit 3 cleanup - wip - fixed errors found by TC bot -- verified with diffs overview and rebuild --- .../testsuites/IgniteExamplesMLTestSuite.java | 27 +++++++++++++------ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesMLTestSuite.java b/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesMLTestSuite.java index 168a6264e9ebc..8551460dd76dd 100644 --- a/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesMLTestSuite.java +++ b/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesMLTestSuite.java @@ -27,9 +27,14 @@ import javassist.ClassClassPath; import javassist.ClassPool; import javassist.CtClass; +import javassist.CtMethod; import javassist.CtNewMethod; import javassist.NotFoundException; -import junit.framework.TestResult; +import javassist.bytecode.AnnotationsAttribute; +import javassist.bytecode.ClassFile; +import javassist.bytecode.ConstPool; +import javassist.bytecode.annotation.Annotation; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.examples.ml.util.MLExamplesCommonArgs; import org.apache.ignite.testframework.GridTestUtils; @@ -70,11 +75,7 @@ public static TestSuite suite() throws Exception { TestSuite suite = new TestSuite("Ignite ML Examples Test Suite"); for (Class clazz : getClasses(basePkgForTests)) - suite.addTest(new TestSuite(makeTestClass(clazz)) { - @Override public final void run(TestResult res) { - super.run(res); - } - }); + suite.addTest(new JUnit4TestAdapter(makeTestClass(clazz))); return suite; } @@ -96,11 +97,21 @@ private static Class makeTestClass(Class exampleCls) cl.setSuperclass(cp.get(GridAbstractExamplesTest.class.getName())); - cl.addMethod(CtNewMethod.make("public void testExample() { " + CtMethod mtd = CtNewMethod.make("public void testExample() { " + exampleCls.getCanonicalName() + ".main(" + MLExamplesCommonArgs.class.getName() - + ".EMPTY_ARGS_ML); }", cl)); + + ".EMPTY_ARGS_ML); }", cl); + + // Create and add annotation. + ClassFile ccFile = cl.getClassFile(); + ConstPool constpool = ccFile.getConstPool(); + AnnotationsAttribute attr = new AnnotationsAttribute(constpool, AnnotationsAttribute.visibleTag); + Annotation annot = new Annotation("org.junit.Test", constpool); + attr.addAnnotation(annot); + mtd.getMethodInfo().addAttribute(attr); + + cl.addMethod(mtd); return cl.toClass(); } From 838666dd87c731bd890adc65135f7782d2fe09fc Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Wed, 19 Dec 2018 02:40:28 +0300 Subject: [PATCH 133/176] IGNITE-10177 Junit 3 cleanup - wip - fixed errors found by TC bot -- verified with diffs overview and rebuild --- .../ignite/testsuites/IgniteExamplesSelfTestSuite.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesSelfTestSuite.java b/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesSelfTestSuite.java index 780ff213de69c..31e9a6c48135d 100644 --- a/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesSelfTestSuite.java +++ b/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesSelfTestSuite.java @@ -61,9 +61,8 @@ public class IgniteExamplesSelfTestSuite { /** * @return Suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { // System.setProperty(IGNITE_OVERRIDE_MCAST_GRP, // GridTestUtils.getNextMulticastGroup(IgniteExamplesSelfTestSuite.class)); @@ -104,7 +103,7 @@ public static TestSuite suite() throws Exception { suite.addTest(new JUnit4TestAdapter(ComputeClientBinaryExampleTest.class)); // ML Grid. - suite.addTest(IgniteExamplesMLTestSuite.suite()); + suite.addTest(new JUnit4TestAdapter(IgniteExamplesMLTestSuite.class)); // Encryption. suite.addTest(new JUnit4TestAdapter(EncryptedCacheExampleSelfTest.class)); From 8601e7539cf86cff5741bdbaf5ec514f8120d156 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Wed, 19 Dec 2018 02:58:34 +0300 Subject: [PATCH 134/176] IGNITE-10177 Junit 3 cleanup - wip - fixed errors found by TC bot -- verified with diffs overview and rebuild --- .../testsuites/IgniteLgplExamplesSelfTestSuite.java | 9 +++++---- .../ConfigVariationsTestSuiteBuilder.java | 7 +++---- .../apache/ignite/testsuites/IgniteCacheTestSuite5.java | 3 ++- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/examples/src/test/java-lgpl/org/apache/ignite/testsuites/IgniteLgplExamplesSelfTestSuite.java b/examples/src/test/java-lgpl/org/apache/ignite/testsuites/IgniteLgplExamplesSelfTestSuite.java index eaa3a846b66d2..a5e714abecada 100644 --- a/examples/src/test/java-lgpl/org/apache/ignite/testsuites/IgniteLgplExamplesSelfTestSuite.java +++ b/examples/src/test/java-lgpl/org/apache/ignite/testsuites/IgniteLgplExamplesSelfTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.examples.HibernateL2CacheExampleMultiNodeSelfTest; import org.apache.ignite.examples.HibernateL2CacheExampleSelfTest; @@ -42,12 +43,12 @@ public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite Examples Test Suite"); - suite.addTest(new TestSuite(HibernateL2CacheExampleSelfTest.class)); - suite.addTest(new TestSuite(SpatialQueryExampleSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(HibernateL2CacheExampleSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(SpatialQueryExampleSelfTest.class)); // Multi-node. - suite.addTest(new TestSuite(HibernateL2CacheExampleMultiNodeSelfTest.class)); - suite.addTest(new TestSuite(SpatialQueryExampleMultiNodeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(HibernateL2CacheExampleMultiNodeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(SpatialQueryExampleMultiNodeSelfTest.class)); return suite; } diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/configvariations/ConfigVariationsTestSuiteBuilder.java b/modules/core/src/test/java/org/apache/ignite/testframework/configvariations/ConfigVariationsTestSuiteBuilder.java index 4a60671fee594..4fb1d3b30b157 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/configvariations/ConfigVariationsTestSuiteBuilder.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/configvariations/ConfigVariationsTestSuiteBuilder.java @@ -18,6 +18,7 @@ package org.apache.ignite.testframework.configvariations; import java.util.Arrays; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; @@ -34,12 +35,10 @@ public class ConfigVariationsTestSuiteBuilder { private final TestSuite suite; /** */ - @SuppressWarnings("unchecked") private ConfigParameter[][] igniteParams = ConfigVariations.igniteBasicSet(); /** */ - @SuppressWarnings("unchecked") private ConfigParameter[][] cacheParams; /** */ @@ -87,7 +86,7 @@ public ConfigVariationsTestSuiteBuilder(String name, Class 0; assert gridsCnt > 0; @@ -133,7 +132,7 @@ public TestSuite build() { } } - return suite; + return new JUnit4TestAdapter(suite.getClass()); } /** diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite5.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite5.java index 136a62edda9b2..16b84850a784c 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite5.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite5.java @@ -18,6 +18,7 @@ package org.apache.ignite.testsuites; import java.util.HashSet; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.GridCacheAffinityBackupsSelfTest; import org.apache.ignite.IgniteCacheAffinitySelfTest; @@ -84,7 +85,7 @@ public static TestSuite suite(HashSet ignoredTests) { GridTestUtils.addTestIfNeeded(suite,EntryVersionConsistencyReadThroughTest.class, ignoredTests); GridTestUtils.addTestIfNeeded(suite,IgniteCacheSyncRebalanceModeSelfTest.class, ignoredTests); - suite.addTest(IgniteCacheReadThroughEvictionsVariationsSuite.suite()); + suite.addTest(new JUnit4TestAdapter(IgniteCacheReadThroughEvictionsVariationsSuite.class)); GridTestUtils.addTestIfNeeded(suite,IgniteCacheTxIteratorSelfTest.class, ignoredTests); From 4d9d1c8ad96cec39078fca494e6d6f66d8fc2316 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Wed, 19 Dec 2018 03:29:27 +0300 Subject: [PATCH 135/176] IGNITE-10177 Junit 3 cleanup - wip - fixed errors found by TC bot -- verified with diffs overview and rebuild --- .../ignite/testframework/GridTestUtils.java | 14 +++++----- .../ConfigVariationsTestSuiteBuilder.java | 5 ++-- .../testframework/junits/LegacySupport.java | 28 +------------------ 3 files changed, 10 insertions(+), 37 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java b/modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java index 835496975644a..1017b1c3562f9 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java @@ -66,7 +66,6 @@ import javax.net.ssl.SSLContext; import javax.net.ssl.TrustManager; import junit.framework.JUnit4TestAdapter; -import junit.framework.Test; import junit.framework.TestSuite; import org.apache.ignite.Ignite; import org.apache.ignite.IgniteCache; @@ -106,6 +105,7 @@ import org.apache.ignite.spi.discovery.DiscoverySpiListener; import org.apache.ignite.ssl.SslContextFactory; import org.apache.ignite.testframework.config.GridTestProperties; +import org.apache.ignite.testframework.junits.GridAbstractTest; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -190,13 +190,13 @@ public static final class SF extends ScaleFactorUtil { private static final Map, String> addrs = new HashMap<>(); /** */ - private static final Map, Integer> mcastPorts = new HashMap<>(); + private static final Map, Integer> mcastPorts = new HashMap<>(); /** */ - private static final Map, Integer> discoPorts = new HashMap<>(); + private static final Map, Integer> discoPorts = new HashMap<>(); /** */ - private static final Map, Integer> commPorts = new HashMap<>(); + private static final Map, Integer> commPorts = new HashMap<>(); /** */ private static int[] addr; @@ -603,7 +603,7 @@ public static void assertOneToOne(Iterable it, IgnitePredicate... ps) * @param cls Class. * @return Next multicast port. */ - public static synchronized int getNextMulticastPort(Class cls) { + public static synchronized int getNextMulticastPort(Class cls) { Integer portRet = mcastPorts.get(cls); if (portRet != null) @@ -650,7 +650,7 @@ public static synchronized int getNextMulticastPort(Class cls) { * @param cls Class. * @return Next communication port. */ - public static synchronized int getNextCommPort(Class cls) { + public static synchronized int getNextCommPort(Class cls) { Integer portRet = commPorts.get(cls); if (portRet != null) @@ -677,7 +677,7 @@ public static synchronized int getNextCommPort(Class cls) { * @param cls Class. * @return Next discovery port. */ - public static synchronized int getNextDiscoPort(Class cls) { + public static synchronized int getNextDiscoPort(Class cls) { Integer portRet = discoPorts.get(cls); if (portRet != null) diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/configvariations/ConfigVariationsTestSuiteBuilder.java b/modules/core/src/test/java/org/apache/ignite/testframework/configvariations/ConfigVariationsTestSuiteBuilder.java index 4fb1d3b30b157..a322ca12635bd 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/configvariations/ConfigVariationsTestSuiteBuilder.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/configvariations/ConfigVariationsTestSuiteBuilder.java @@ -18,7 +18,6 @@ package org.apache.ignite.testframework.configvariations; import java.util.Arrays; -import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; @@ -86,7 +85,7 @@ public ConfigVariationsTestSuiteBuilder(String name, Class 0; assert gridsCnt > 0; @@ -132,7 +131,7 @@ public JUnit4TestAdapter build() { } } - return new JUnit4TestAdapter(suite.getClass()); + return suite; } /** diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacySupport.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacySupport.java index 6ef609e4c426f..1f4f418f6f950 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacySupport.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacySupport.java @@ -18,8 +18,6 @@ package org.apache.ignite.testframework.junits; import junit.framework.Assert; // IMPL NOTE some old tests expect inherited deprecated assertions. -import junit.framework.Test; -import junit.framework.TestResult; import org.junit.Rule; import org.junit.rules.TestName; import org.junit.runners.model.Statement; @@ -29,7 +27,7 @@ * inherited deprecated assertions and specific old interface for GridTestUtils. */ @SuppressWarnings({"TransientFieldInNonSerializableClass", "ExtendsUtilityClass", "deprecation"}) -public abstract class LegacySupport extends Assert implements Test { +public abstract class LegacySupport extends Assert { /** * Supports obtaining test name for JUnit4 framework in a way that makes it available for legacy methods invoked * from {@code runTest(Statement)}. @@ -75,28 +73,4 @@ final void runTestCase(Statement testRoutine) throws Throwable { } if (e != null) throw e; } - - /** - * {@inheritDoc} - *

    - * This method is here only for subclass to pretend implementing particular interface expected by some utility - * methods in GridTestUtils.

    - * - * @return Nothing. - */ - @Override public final int countTestCases() { - throw new UnsupportedOperationException("This method is not expected to be invoked: countTestCases() at test: " - + getName()); - } - - /** - * {@inheritDoc} - *

    - * This method is here only for subclass to pretend implementing particular interface expected by some utility - * methods in GridTestUtils.

    - */ - @Override public final void run(TestResult res) { - throw new UnsupportedOperationException("This method is not intended to be invoked: run(TestResult) at test: " - + getName()); - } } From b617f3585ca4e1f00667e3dbc21498c8d655a119 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Wed, 19 Dec 2018 12:33:24 +0300 Subject: [PATCH 136/176] IGNITE-10177 Junit 3 cleanup - wip - fixed errors found by TC bot -- verified with diffs overview and rebuild --- .../IgniteConfigVariationsAbstractTest.java | 31 +++++++++++- .../junits/LegacyConfigVariationsSupport.java | 47 +++++++++++++++++++ .../testframework/junits/LegacySupport.java | 38 +++++++++++---- 3 files changed, 104 insertions(+), 12 deletions(-) create mode 100644 modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacyConfigVariationsSupport.java diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteConfigVariationsAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteConfigVariationsAbstractTest.java index 0e454a366473d..fc9f51b898b2b 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteConfigVariationsAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteConfigVariationsAbstractTest.java @@ -25,6 +25,7 @@ import java.io.ObjectOutput; import java.io.ObjectOutputStream; import java.io.Serializable; +import junit.framework.TestResult; import org.apache.commons.io.FileUtils; import org.apache.ignite.Ignition; import org.apache.ignite.binary.BinaryObjectException; @@ -71,9 +72,35 @@ public void setTestsConfiguration(VariationsTestsConfig testsCfg) { this.testsCfg = testsCfg; } + /** + * {@inheritDoc} + *

    + * Fallback to TestCase functionality.

    + */ + @Override public int countTestCases() { + return countTestCasesFallback(); + } + + /** + * {@inheritDoc} + *

    + * Fallback to TestCase functionality.

    + */ + @Override public void run(TestResult res) { + runFallback(res); + } + + /** + * {@inheritDoc} + *

    + * Fallback to TestCase functionality.

    + */ + @Override public String getName() { + return getNameFallback(); + } + /** {@inheritDoc} */ - @Override - protected boolean isSafeTopology() { + @Override protected boolean isSafeTopology() { return false; } diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacyConfigVariationsSupport.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacyConfigVariationsSupport.java new file mode 100644 index 0000000000000..63d6c3310c8c9 --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacyConfigVariationsSupport.java @@ -0,0 +1,47 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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.apache.ignite.testframework.junits; + +import junit.framework.TestCase; // IMPL NOTE some old tests expect inherited deprecated assertions. +import junit.framework.TestResult; + +/** + * Supports compatibility with old tests based on configurations variations. + */ +public abstract class LegacyConfigVariationsSupport extends TestCase { + /** + * Fallback to superclass. + */ + protected int countTestCasesFallback() { + return super.countTestCases(); + } + + /** + * Fallback to superclass. + */ + protected void runFallback(TestResult res) { + super.run(res); + } + + /** + * Fallback to superclass. + */ + protected String getNameFallback() { + return super.getName(); + } +} diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacySupport.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacySupport.java index 1f4f418f6f950..09e1ecd3a5a8c 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacySupport.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacySupport.java @@ -17,7 +17,7 @@ package org.apache.ignite.testframework.junits; -import junit.framework.Assert; // IMPL NOTE some old tests expect inherited deprecated assertions. +import junit.framework.TestResult; import org.junit.Rule; import org.junit.rules.TestName; import org.junit.runners.model.Statement; @@ -26,8 +26,8 @@ * Supports compatibility with old tests that expect specific threading behavior of JUnit 3 TestCase class, * inherited deprecated assertions and specific old interface for GridTestUtils. */ -@SuppressWarnings({"TransientFieldInNonSerializableClass", "ExtendsUtilityClass", "deprecation"}) -public abstract class LegacySupport extends Assert { +@SuppressWarnings({"TransientFieldInNonSerializableClass"}) +public abstract class LegacySupport extends LegacyConfigVariationsSupport { /** * Supports obtaining test name for JUnit4 framework in a way that makes it available for legacy methods invoked * from {@code runTest(Statement)}. @@ -39,19 +39,13 @@ public abstract class LegacySupport extends Assert { * * @return Name of the currently executed test case. */ - public String getName() { + @Override public String getName() { return nameRule.getMethodName(); } - /** This method is called before a test is executed. */ - abstract void setUp() throws Exception; - /** Runs test code in between {@code setUp} and {@code tearDown}. */ abstract void runTest(Statement testRoutine) throws Throwable; - /** This method is called after a test is executed. */ - abstract void tearDown() throws Exception; - /** * Runs the bare test sequence like in JUnit 3 class TestCase. * @@ -73,4 +67,28 @@ final void runTestCase(Statement testRoutine) throws Throwable { } if (e != null) throw e; } + + /** + * {@inheritDoc} + *

    + * This method is here only for subclass to pretend implementing particular interface expected by some utility + * methods in GridTestUtils.

    + * + * @return Nothing. + */ + @Override public int countTestCases() { + throw new UnsupportedOperationException("This method is not expected to be invoked: countTestCases() at test: " + + getName()); + } + + /** + * {@inheritDoc} + *

    + * This method is here only for subclass to pretend implementing particular interface expected by some utility + * methods in GridTestUtils.

    + */ + @Override public void run(TestResult res) { + throw new UnsupportedOperationException("This method is not intended to be invoked: run(TestResult) at test: " + + getName()); + } } From 5b5391ce3244570e3ffef1575484b5b413f13d75 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Wed, 19 Dec 2018 12:34:04 +0300 Subject: [PATCH 137/176] IGNITE-10177 Junit 3 cleanup - wip - fixed errors found by TC bot -- verified with diffs overview and rebuild --- .../testframework/junits/LegacyConfigVariationsSupport.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacyConfigVariationsSupport.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacyConfigVariationsSupport.java index 63d6c3310c8c9..843f67782df43 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacyConfigVariationsSupport.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacyConfigVariationsSupport.java @@ -23,7 +23,7 @@ /** * Supports compatibility with old tests based on configurations variations. */ -public abstract class LegacyConfigVariationsSupport extends TestCase { +abstract class LegacyConfigVariationsSupport extends TestCase { /** * Fallback to superclass. */ From f113b143b2a714245e8875fc033d4117731e25c3 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Wed, 19 Dec 2018 12:45:18 +0300 Subject: [PATCH 138/176] IGNITE-10177 Junit 3 cleanup - wip - fixed errors found by TC bot -- verified with diffs overview and rebuild --- .../apache/ignite/testframework/junits/GridAbstractTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java index d840ddf4707da..7f191040e687a 100755 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java @@ -125,6 +125,8 @@ import org.junit.Rule; import org.junit.Test; import org.junit.rules.TestRule; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.junit.runners.model.Statement; import org.springframework.beans.BeansException; import org.springframework.context.ApplicationContext; @@ -147,6 +149,7 @@ "ProhibitedExceptionDeclared", "JUnitTestCaseWithNonTrivialConstructors" }) +@RunWith(JUnit4.class) public abstract class GridAbstractTest extends LegacySupport { /************************************************************** * DO NOT REMOVE TRANSIENT - THIS OBJECT MIGHT BE TRANSFERRED * From fdd3036a7df4330df01e10e734f75d0131f11c37 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Wed, 19 Dec 2018 14:24:07 +0300 Subject: [PATCH 139/176] IGNITE-10177 Junit 3 cleanup - wip - fixed errors found by TC bot -- verified with diffs overview and rebuild --- .../ignite/examples/HibernateL2CacheExampleSelfTest.java | 8 ++++---- .../ignite/examples/SpatialQueryExampleSelfTest.java | 2 ++ .../junits/IgniteConfigVariationsAbstractTest.java | 4 ++++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/examples/src/test/java-lgpl/org/apache/ignite/examples/HibernateL2CacheExampleSelfTest.java b/examples/src/test/java-lgpl/org/apache/ignite/examples/HibernateL2CacheExampleSelfTest.java index 68767d77c4198..93e24b0694c3b 100644 --- a/examples/src/test/java-lgpl/org/apache/ignite/examples/HibernateL2CacheExampleSelfTest.java +++ b/examples/src/test/java-lgpl/org/apache/ignite/examples/HibernateL2CacheExampleSelfTest.java @@ -19,15 +19,15 @@ import org.apache.ignite.examples.datagrid.hibernate.HibernateL2CacheExample; import org.apache.ignite.testframework.junits.common.GridAbstractExamplesTest; +import org.junit.Test; /** * Tests the {@link HibernateL2CacheExample}. */ public class HibernateL2CacheExampleSelfTest extends GridAbstractExamplesTest { - /** - * @throws Exception If failed. - */ - public void testHibernateL2CacheExample() throws Exception { + /** */ + @Test + public void testHibernateL2CacheExample() { HibernateL2CacheExample.main(EMPTY_ARGS); } } diff --git a/examples/src/test/java-lgpl/org/apache/ignite/examples/SpatialQueryExampleSelfTest.java b/examples/src/test/java-lgpl/org/apache/ignite/examples/SpatialQueryExampleSelfTest.java index ac59d8e567b43..ea88cff99cbe6 100644 --- a/examples/src/test/java-lgpl/org/apache/ignite/examples/SpatialQueryExampleSelfTest.java +++ b/examples/src/test/java-lgpl/org/apache/ignite/examples/SpatialQueryExampleSelfTest.java @@ -19,6 +19,7 @@ import org.apache.ignite.examples.datagrid.SpatialQueryExample; import org.apache.ignite.testframework.junits.common.GridAbstractExamplesTest; +import org.junit.Test; /** * Tests {@link SpatialQueryExample}. @@ -27,6 +28,7 @@ public class SpatialQueryExampleSelfTest extends GridAbstractExamplesTest { /** * @throws Exception If failed. */ + @Test public void testSpatialQueryExample() throws Exception { SpatialQueryExample.main(EMPTY_ARGS); } diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteConfigVariationsAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteConfigVariationsAbstractTest.java index fc9f51b898b2b..1f249903361d6 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteConfigVariationsAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteConfigVariationsAbstractTest.java @@ -42,7 +42,11 @@ /** * Common abstract test for Ignite tests based on configurations variations. + * TODO IGNITE-10739 redesign this and related classes to get rid of JUnit 3 features. + * + * @deprecated This class uses obsolete methods of JUnit 3 framework and is expected to be reworked per IGNITE-10739. */ +@Deprecated public abstract class IgniteConfigVariationsAbstractTest extends GridCommonAbstractTest { /** */ protected static final int SERVER_NODE_IDX = 0; From ce28154b15390cebe0cd5a72d4a1b4f7eb63a65a Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Wed, 19 Dec 2018 16:19:00 +0300 Subject: [PATCH 140/176] IGNITE-10177 Junit 3 cleanup - wip - fixed errors found by TC bot -- verified with diffs overview and rebuild --- .../junits/IgniteConfigVariationsAbstractTest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteConfigVariationsAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteConfigVariationsAbstractTest.java index 1f249903361d6..146e145528b83 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteConfigVariationsAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteConfigVariationsAbstractTest.java @@ -44,7 +44,9 @@ * Common abstract test for Ignite tests based on configurations variations. * TODO IGNITE-10739 redesign this and related classes to get rid of JUnit 3 features. * - * @deprecated This class uses obsolete methods of JUnit 3 framework and is expected to be reworked per IGNITE-10739. + * @deprecated This class uses obsolete methods of JUnit 3 framework and because of that you need to use JUnit 3 + * naming convention for test cases in classes extending it. Also, Junit 4 annotations like {@code Before} + * and {@code Ignore} may not work. It is expected to be reworked per IGNITE-10739. */ @Deprecated public abstract class IgniteConfigVariationsAbstractTest extends GridCommonAbstractTest { From 597fbecab5aa3ebdc7ba317695d0541b63a16983 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Thu, 20 Dec 2018 10:25:55 +0300 Subject: [PATCH 141/176] old way with logging --- .../twitter/IgniteTwitterStreamerTest.java | 78 ++++++++++++++----- 1 file changed, 57 insertions(+), 21 deletions(-) diff --git a/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTest.java b/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTest.java index 958cd4defb998..7208469012a9e 100644 --- a/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTest.java +++ b/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTest.java @@ -18,11 +18,13 @@ package org.apache.ignite.stream.twitter; import com.github.tomakehurst.wiremock.WireMockServer; -import com.github.tomakehurst.wiremock.junit.WireMockRule; +import com.github.tomakehurst.wiremock.core.WireMockConfiguration; +import com.github.tomakehurst.wiremock.junit.WireMockClassRule; import com.twitter.hbc.core.HttpHosts; import java.util.HashMap; import java.util.Map; import java.util.concurrent.CountDownLatch; +import junit.framework.TestResult; import org.apache.ignite.Ignite; import org.apache.ignite.IgniteCache; import org.apache.ignite.IgniteDataStreamer; @@ -30,8 +32,11 @@ import org.apache.ignite.events.CacheEvent; import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.ClassRule; import org.junit.Rule; import org.junit.Test; +import org.junit.internal.runners.JUnit38ClassRunner; +import org.junit.runner.RunWith; import twitter4j.Status; import twitter4j.TwitterException; import twitter4j.TwitterObjectFactory; @@ -45,6 +50,7 @@ /** * Test for {@link TwitterStreamer}. Tests Public Status streaming API https://dev.twitter.com/streaming/public. */ +@RunWith(JUnit38ClassRunner.class) // TODO IGNITE-10739 migrate to JUnit 4 public class IgniteTwitterStreamerTest extends GridCommonAbstractTest { /** Cache entries count. */ private static final int CACHE_ENTRY_COUNT = 100; @@ -60,12 +66,43 @@ public IgniteTwitterStreamerTest() { super(true); } + /** See The JUnit 4.x Rule */ + @ClassRule + public static WireMockClassRule wireMockClsRule = new WireMockClassRule(WireMockConfiguration.DYNAMIC_PORT); + /** Embedded mock HTTP server's for Twitter API rule. */ @Rule - public final WireMockRule wireMockRule = new WireMockRule(); + public WireMockClassRule wireMockRule = wireMockClsRule; /** Embedded mock HTTP server for Twitter API. */ - public final WireMockServer mockServer = new WireMockServer(); //Starts server on 8080 port. + public final WireMockServer mockSrv = new WireMockServer(); //Starts server on 8080 port. + + /** + * {@inheritDoc} + *

    + * Fallback to TestCase functionality.

    + */ + @Override public int countTestCases() { + return countTestCasesFallback(); + } + + /** + * {@inheritDoc} + *

    + * Fallback to TestCase functionality.

    + */ + @Override public void run(TestResult res) { + runFallback(res); + } + + /** + * {@inheritDoc} + *

    + * Fallback to TestCase functionality.

    + */ + @Override public String getName() { + return getNameFallback(); + } /** {@inheritDoc} */ @Override protected long getTestTimeout() { @@ -76,17 +113,17 @@ public IgniteTwitterStreamerTest() { @Override public void beforeTest() { grid().getOrCreateCache(defaultCacheConfiguration()); - mockServer.start(); + mockSrv.start(); stubFor(get(urlMatching("/1.1" + MOCK_TWEET_PATH + ".*")).willReturn(aResponse(). withHeader("Content-Type", "text/plain").withBody(tweet.length() + "\n" + tweet))); } /** {@inheritDoc} */ - @Override public void afterTest() throws Exception { + @Override public void afterTest() { stopAllGrids(); - mockServer.stop(); + mockSrv.stop(); } /** @@ -119,7 +156,7 @@ public void testStatusesFilterEndpointOAuth1() throws Exception { private void executeStreamer(TwitterStreamer streamer) throws InterruptedException, TwitterException { // Checking streaming. - CacheListener listener = subscribeToPutEvents(); + CacheListener lsnr = subscribeToPutEvents(); streamer.start(); @@ -132,12 +169,12 @@ private void executeStreamer(TwitterStreamer streamer) throws InterruptedExcepti // No-op. } - CountDownLatch latch = listener.getLatch(); + CountDownLatch latch = lsnr.getLatch(); // Enough tweets was handled in 10 seconds. Limited by test's timeout. latch.await(); - unsubscribeToPutEvents(listener); + unsubscribeToPutEvents(lsnr); streamer.stop(); @@ -156,13 +193,13 @@ private void executeStreamer(TwitterStreamer streamer) throws InterruptedExcepti IgniteCache cache = grid().cache(DEFAULT_CACHE_NAME); - String cachedValue = cache.get(status.getId()); + String cachedVal = cache.get(status.getId()); // Tweet successfully put to cache. - assertTrue(cachedValue != null && cachedValue.equals(status.getText())); + assertTrue(cachedVal != null && cachedVal.equals(status.getText())); // Same tweets does not produce duplicate entries. - assertTrue(cache.size() == 1); + assertEquals(1, cache.size()); } /** @@ -172,20 +209,20 @@ private CacheListener subscribeToPutEvents() { Ignite ignite = grid(); // Listen to cache PUT events and expect as many as messages as test data items. - CacheListener listener = new CacheListener(); + CacheListener lsnr = new CacheListener(); - ignite.events(ignite.cluster().forCacheNodes(DEFAULT_CACHE_NAME)).localListen(listener, EVT_CACHE_OBJECT_PUT); + ignite.events(ignite.cluster().forCacheNodes(DEFAULT_CACHE_NAME)).localListen(lsnr, EVT_CACHE_OBJECT_PUT); - return listener; + return lsnr; } /** - * @param listener Cache listener. + * @param lsnr Cache listener. */ - private void unsubscribeToPutEvents(CacheListener listener) { + private void unsubscribeToPutEvents(CacheListener lsnr) { Ignite ignite = grid(); - ignite.events(ignite.cluster().forCacheNodes(DEFAULT_CACHE_NAME)).stopLocalListen(listener, EVT_CACHE_OBJECT_PUT); + ignite.events(ignite.cluster().forCacheNodes(DEFAULT_CACHE_NAME)).stopLocalListen(lsnr, EVT_CACHE_OBJECT_PUT); } /** @@ -209,7 +246,7 @@ private TwitterStreamerImpl newStreamerInstance(IgniteDataStreamer /** * Listener. */ - private class CacheListener implements IgnitePredicate { + private static class CacheListener implements IgnitePredicate { /** */ private final CountDownLatch latch = new CountDownLatch(CACHE_ENTRY_COUNT); @@ -225,8 +262,7 @@ public CountDownLatch getLatch() { * @param evt Cache Event. * @return {@code true}. */ - @Override - public boolean apply(CacheEvent evt) { + @Override public boolean apply(CacheEvent evt) { latch.countDown(); return true; From 6994786ce7649f38fedb89259f197537cc6ee359 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Thu, 20 Dec 2018 10:26:26 +0300 Subject: [PATCH 142/176] old way with logging --- .../apache/ignite/stream/twitter/IgniteTwitterStreamerTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTest.java b/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTest.java index 7208469012a9e..c607f55fb86ed 100644 --- a/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTest.java +++ b/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTest.java @@ -50,7 +50,7 @@ /** * Test for {@link TwitterStreamer}. Tests Public Status streaming API https://dev.twitter.com/streaming/public. */ -@RunWith(JUnit38ClassRunner.class) // TODO IGNITE-10739 migrate to JUnit 4 +@RunWith(JUnit38ClassRunner.class) // TODO IGNITE-10739 migrate to JUnit 4. public class IgniteTwitterStreamerTest extends GridCommonAbstractTest { /** Cache entries count. */ private static final int CACHE_ENTRY_COUNT = 100; From cf6d71031fe1b92853a81cdd5962909a3291359c Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Thu, 20 Dec 2018 11:08:01 +0300 Subject: [PATCH 143/176] old way with logging --- .../ignite/internal/IgniteReflectionFactorySelfTest.java | 2 +- .../cache/distributed/CacheLockReleaseNodeLeaveTest.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteReflectionFactorySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteReflectionFactorySelfTest.java index f71212a7eb7cc..b9207c6e0e222 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteReflectionFactorySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteReflectionFactorySelfTest.java @@ -23,7 +23,7 @@ import org.apache.ignite.configuration.IgniteReflectionFactory; import org.junit.Test; -import static org.junit.Assert.assertEquals; +import static junit.framework.Assert.assertEquals; /** * Tests for {@link IgniteReflectionFactory} class. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLockReleaseNodeLeaveTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLockReleaseNodeLeaveTest.java index 2d5f5fead7bac..5c1941fa17f90 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLockReleaseNodeLeaveTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLockReleaseNodeLeaveTest.java @@ -39,6 +39,7 @@ import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -142,10 +143,9 @@ public void testLockRelease() throws Exception { /** * @throws Exception If failed. */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-9213") @Test public void testLockTopologyChange() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-9213"); - final int nodeCnt = 5; int threadCnt = 8; final int keys = 100; From 8ee04739bfb984e699654e088d9d7fa0c7de37e4 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Thu, 20 Dec 2018 13:45:37 +0300 Subject: [PATCH 144/176] IGNITE-10177 Junit 3 cleanup - wip - account for ignore annotation as proposed by A Goncharuk -- verified with diffs overview and rebuild --- .../ignite/testframework/junits/GridAbstractTest.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java index 7f191040e687a..af443be87ad37 100755 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java @@ -43,6 +43,7 @@ import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; +import java.util.function.BiPredicate; import javax.cache.configuration.Factory; import javax.cache.configuration.FactoryBuilder; import org.apache.ignite.Ignite; @@ -122,6 +123,7 @@ import org.apache.log4j.RollingFileAppender; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; import org.junit.rules.TestRule; @@ -2643,10 +2645,13 @@ public int getNumberOfTests() { if (this0.forceTestCnt) cnt = this0.testCnt; else { + BiPredicate> annotated + = (m, cls) -> m.getAnnotation(cls) != null; + cnt = 0; for (Method m : this0.getClass().getMethods()) - if (m.getAnnotation(Test.class) != null) + if (annotated.test(m, Test.class) && !annotated.test(m, Ignore.class)) cnt++; } From 53176793d8cdce59e2265e7688e7b777345cc3b9 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Thu, 20 Dec 2018 15:11:57 +0300 Subject: [PATCH 145/176] IGNITE-10177 Junit 3 cleanup - wip - fixed errors found by TC bot -- verified with diffs overview and rebuild --- .../ignite/testsuites/IgniteBinaryObjectsCacheTestSuite3.java | 4 +++- .../testsuites/IgniteSpiLoadBalancingSelfTestSuite.java | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryObjectsCacheTestSuite3.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryObjectsCacheTestSuite3.java index 8ab7c2c4f2bbf..1b77812d828e9 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryObjectsCacheTestSuite3.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryObjectsCacheTestSuite3.java @@ -23,6 +23,8 @@ import org.apache.ignite.internal.processors.cache.binary.GridCacheBinaryTransactionalEntryProcessorDeploymentSelfTest; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.config.GridTestProperties; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * IgniteBinaryObjectsCacheTestSuite3 is kept together with {@link IgniteCacheTestSuite3} @@ -40,10 +42,10 @@ * In future this suite may be merged with {@link IgniteCacheTestSuite3} * */ +@RunWith(AllTests.class) public class IgniteBinaryObjectsCacheTestSuite3 { /** * @return Test suite. - * @throws Exception If failed. */ public static TestSuite suite() { return suite(null); diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiLoadBalancingSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiLoadBalancingSelfTestSuite.java index e843479124c8d..e5bdfeff08f29 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiLoadBalancingSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiLoadBalancingSelfTestSuite.java @@ -35,10 +35,13 @@ import org.apache.ignite.spi.loadbalancing.weightedrandom.GridWeightedRandomLoadBalancingSpiSelfTest; import org.apache.ignite.spi.loadbalancing.weightedrandom.GridWeightedRandomLoadBalancingSpiStartStopSelfTest; import org.apache.ignite.spi.loadbalancing.weightedrandom.GridWeightedRandomLoadBalancingSpiWeightedSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Load balancing SPI self-test suite. */ +@RunWith(AllTests.class) public final class IgniteSpiLoadBalancingSelfTestSuite { /** * Enforces singleton. From 243c9b8ed1e688b0678cf45eef075e6f0bf55ebe Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Thu, 20 Dec 2018 15:17:35 +0300 Subject: [PATCH 146/176] IGNITE-10177 Junit 3 cleanup - wip - fixed errors found by TC bot -- verified with diffs overview and rebuild --- .../ignite/testsuites/IgniteCacheFailoverTestSuite2.java | 3 +++ .../ignite/testsuites/IgniteCacheMetricsSelfTestSuite.java | 1 - .../ignite/testsuites/IgniteCacheNearOnlySelfTestSuite.java | 5 ++++- .../testsuites/IgniteCacheTcpClientDiscoveryTestSuite.java | 3 +++ .../ignite/testsuites/IgniteComputeGridTestSuite.java | 6 ++++-- 5 files changed, 14 insertions(+), 4 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite2.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite2.java index 6734130096907..ecc6c2590e2a3 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite2.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite2.java @@ -33,10 +33,13 @@ import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCacheReplicatedFailoverSelfTest; import org.apache.ignite.internal.processors.cache.persistence.baseline.IgniteChangingBaselineDownCachePutAllFailoverTest; import org.apache.ignite.internal.processors.cache.persistence.baseline.IgniteChangingBaselineUpCachePutAllFailoverTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * */ +@RunWith(AllTests.class) public class IgniteCacheFailoverTestSuite2 { /** * @return Suite. diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMetricsSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMetricsSelfTestSuite.java index cca0999c3e833..88ad48029db8a 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMetricsSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMetricsSelfTestSuite.java @@ -51,7 +51,6 @@ public class IgniteCacheMetricsSelfTestSuite { /** * @param ignoredTests Ignored tests. * @return Cache metrics test suite. - * @throws Exception If failed. */ public static TestSuite suite(Collection ignoredTests) { TestSuite suite = new TestSuite("Cache Metrics Test Suite"); diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheNearOnlySelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheNearOnlySelfTestSuite.java index 1519baa9ac4ac..eb163a2d18615 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheNearOnlySelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheNearOnlySelfTestSuite.java @@ -23,10 +23,13 @@ import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheNearOnlySelfTest; import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheNearOnlyTopologySelfTest; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Test suite for near-only cache. */ +@RunWith(AllTests.class) public class IgniteCacheNearOnlySelfTestSuite { /** * @return Suite. @@ -56,4 +59,4 @@ public static TestSuite suite(Collection ignoredTests) { return suite; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTcpClientDiscoveryTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTcpClientDiscoveryTestSuite.java index dd7954eb57273..db3e0ec30e72b 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTcpClientDiscoveryTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTcpClientDiscoveryTestSuite.java @@ -21,6 +21,8 @@ import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.GridCacheTcpClientDiscoveryMultiThreadedTest; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; import static org.apache.ignite.internal.processors.cache.distributed.GridCacheClientModesTcpClientDiscoveryAbstractTest.CaseClientPartitionedAtomic; import static org.apache.ignite.internal.processors.cache.distributed.GridCacheClientModesTcpClientDiscoveryAbstractTest.CaseClientPartitionedTransactional; @@ -34,6 +36,7 @@ /** * Tests a cache with TcpClientDiscovery SPI being enabled. */ +@RunWith(AllTests.class) public class IgniteCacheTcpClientDiscoveryTestSuite { /** * @return Suite. diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteComputeGridTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteComputeGridTestSuite.java index 2b6fddf2bfe4c..6ec49f7901e74 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteComputeGridTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteComputeGridTestSuite.java @@ -87,16 +87,18 @@ import org.apache.ignite.p2p.GridMultinodeRedeployIsolatedModeSelfTest; import org.apache.ignite.p2p.GridMultinodeRedeployPrivateModeSelfTest; import org.apache.ignite.p2p.GridMultinodeRedeploySharedModeSelfTest; +import org.junit.runner.RunWith; +import org.junit.runners.AllTests; /** * Compute grid test suite. */ +@RunWith(AllTests.class) public class IgniteComputeGridTestSuite { /** * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Compute Grid Test Suite"); suite.addTest(IgniteTaskSessionSelfTestSuite.suite()); From d5b580f0468e5da884e92ed8f0838aadc00ac329 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Thu, 20 Dec 2018 15:56:01 +0300 Subject: [PATCH 147/176] IGNITE-10177 Junit 3 cleanup - wip - fixed errors found by TC bot -- verified with diffs overview and rebuild --- ...heAbstractNearPartitionedByteArrayValuesSelfTest.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAbstractNearPartitionedByteArrayValuesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAbstractNearPartitionedByteArrayValuesSelfTest.java index 188c364c7978d..a653543e22369 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAbstractNearPartitionedByteArrayValuesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAbstractNearPartitionedByteArrayValuesSelfTest.java @@ -19,6 +19,7 @@ import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.internal.processors.cache.distributed.GridCacheAbstractPartitionedByteArrayValuesSelfTest; +import org.junit.Ignore; /** * Tests for byte array values in NEAR-PARTITIONED caches. @@ -31,16 +32,14 @@ public abstract class GridCacheAbstractNearPartitionedByteArrayValuesSelfTest ex } /** {@inheritDoc} */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-7187") @Override public void testPessimisticMvcc() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-7187"); - super.testPessimisticMvcc(); } /** {@inheritDoc} */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-7187") @Override public void testPessimisticMvccMixed() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-7187"); - super.testPessimisticMvccMixed(); } -} \ No newline at end of file +} From 5670ad46f9c5258aebabe47ae3375bcca5cc9e08 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Thu, 20 Dec 2018 16:08:40 +0300 Subject: [PATCH 148/176] IGNITE-10177 Junit 3 cleanup - wip - fixed errors found by TC bot -- verified with diffs overview and rebuild --- ...ridCacheAbstractNearPartitionedByteArrayValuesSelfTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAbstractNearPartitionedByteArrayValuesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAbstractNearPartitionedByteArrayValuesSelfTest.java index a653543e22369..a352f8fa631df 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAbstractNearPartitionedByteArrayValuesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAbstractNearPartitionedByteArrayValuesSelfTest.java @@ -20,6 +20,7 @@ import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.internal.processors.cache.distributed.GridCacheAbstractPartitionedByteArrayValuesSelfTest; import org.junit.Ignore; +import org.junit.Test; /** * Tests for byte array values in NEAR-PARTITIONED caches. @@ -33,12 +34,14 @@ public abstract class GridCacheAbstractNearPartitionedByteArrayValuesSelfTest ex /** {@inheritDoc} */ @Ignore("https://issues.apache.org/jira/browse/IGNITE-7187") + @Test @Override public void testPessimisticMvcc() throws Exception { super.testPessimisticMvcc(); } /** {@inheritDoc} */ @Ignore("https://issues.apache.org/jira/browse/IGNITE-7187") + @Test @Override public void testPessimisticMvccMixed() throws Exception { super.testPessimisticMvccMixed(); } From 5ed652056c675561725a1899a9131f8a807c1132 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Thu, 20 Dec 2018 16:27:16 +0300 Subject: [PATCH 149/176] IGNITE-10177 Junit 3 cleanup - wip - fixed errors found by TC bot -- verified with diffs overview and rebuild --- .../cache/CacheDeferredDeleteQueueTest.java | 4 ++-- .../cache/CacheDeferredDeleteSanitySelfTest.java | 7 +++---- .../cache/CacheEnumOperationsAbstractTest.java | 4 ++-- ...heGetEntryPessimisticRepeatableReadSelfTest.java | 7 +++---- .../cache/GridCacheVersionMultinodeTest.java | 7 +++---- .../IgniteCacheMvccTxNearEnabledInvokeTest.java | 11 +++-------- .../IgniteClientCacheInitializationFailTest.java | 4 ++-- .../cache/distributed/CacheGroupsPreloadTest.java | 7 +++---- .../near/GridCacheMvccNearEvictionSelfTest.java | 10 ++-------- .../near/GridCacheNearMultiGetSelfTest.java | 7 +++---- .../distributed/near/NearCacheSyncUpdateTest.java | 4 ++-- .../eviction/lru/LruNearEvictionPolicySelfTest.java | 5 ++--- .../lru/LruNearOnlyNearEvictionPolicySelfTest.java | 9 +++------ ...CacheEntryProcessorExternalizableFailedTest.java | 13 +++++-------- .../CacheEntryProcessorNonSerializableTest.java | 13 +++++-------- .../CacheKeepBinaryIterationNearEnabledTest.java | 7 +++++-- 16 files changed, 48 insertions(+), 71 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDeferredDeleteQueueTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDeferredDeleteQueueTest.java index adef1ddd7f542..c4f0c1bced992 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDeferredDeleteQueueTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDeferredDeleteQueueTest.java @@ -28,6 +28,7 @@ import org.apache.ignite.internal.util.lang.GridAbsPredicate; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -86,10 +87,9 @@ public void testDeferredDeleteQueue() throws Exception { /** * @throws Exception If failed. */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-7187") @Test public void testDeferredDeleteQueueMvcc() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-7187"); - testQueue(TRANSACTIONAL_SNAPSHOT, true); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDeferredDeleteSanitySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDeferredDeleteSanitySelfTest.java index aeba3bc339595..d3bc8c3886866 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDeferredDeleteSanitySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDeferredDeleteSanitySelfTest.java @@ -23,6 +23,7 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -81,10 +82,9 @@ public void testDeferredDeleteMvcc() throws Exception { /** * @throws Exception If fails. */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-7187") @Test public void testDeferredDeleteMvccNear() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-7187"); - testDeferredDelete(PARTITIONED, TRANSACTIONAL_SNAPSHOT, true, false); testDeferredDelete(REPLICATED, TRANSACTIONAL_SNAPSHOT, true, true); } @@ -92,10 +92,9 @@ public void testDeferredDeleteMvccNear() throws Exception { /** * @throws Exception If fails. */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-7187") @Test public void testDeferredDeleteMvccLocal() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-9530"); - testDeferredDelete(LOCAL, TRANSACTIONAL_SNAPSHOT, false, false); testDeferredDelete(LOCAL, TRANSACTIONAL_SNAPSHOT, true, false); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheEnumOperationsAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheEnumOperationsAbstractTest.java index 573e68d4c9212..405e6ada730ca 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheEnumOperationsAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheEnumOperationsAbstractTest.java @@ -33,6 +33,7 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Assume; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -110,8 +111,7 @@ public void testTx() throws Exception { */ @Test public void testMvccTx() throws Exception { - if (!singleNode()) - fail("https://issues.apache.org/jira/browse/IGNITE-7187"); + Assume.assumeTrue("https://issues.apache.org/jira/browse/IGNITE-7187", singleNode()); CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 1, TRANSACTIONAL_SNAPSHOT); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryPessimisticRepeatableReadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryPessimisticRepeatableReadSelfTest.java index ad1114b21d9f4..a3f89ce45af64 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryPessimisticRepeatableReadSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryPessimisticRepeatableReadSelfTest.java @@ -21,6 +21,7 @@ import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -49,10 +50,9 @@ public class CacheGetEntryPessimisticRepeatableReadSelfTest extends CacheGetEntr /** * @throws Exception If failed. */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-7187") @Test public void testNearTransactionalMvcc() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-7187"); - CacheConfiguration cfg = new CacheConfiguration(DEFAULT_CACHE_NAME); cfg.setWriteSynchronizationMode(FULL_SYNC); @@ -82,10 +82,9 @@ public void testPartitionedTransactionalMvcc() throws Exception { /** * @throws Exception If failed. */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-7187") @Test public void testLocalTransactionalMvcc() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-9530"); - CacheConfiguration cfg = new CacheConfiguration(DEFAULT_CACHE_NAME); cfg.setWriteSynchronizationMode(FULL_SYNC); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionMultinodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionMultinodeTest.java index c89c7ad215df2..6991d0310a9ad 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionMultinodeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionMultinodeTest.java @@ -30,6 +30,7 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.jetbrains.annotations.Nullable; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -116,10 +117,9 @@ public void testVersionTxNearEnabled() throws Exception { /** * @throws Exception If failed. */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-7187") @Test public void testVersionMvccTx() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-8582"); - atomicityMode = TRANSACTIONAL_SNAPSHOT; checkVersion(); @@ -128,10 +128,9 @@ public void testVersionMvccTx() throws Exception { /** * @throws Exception If failed. */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-7187") @Test public void testVersionMvccTxNearEnabled() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-7187"); - atomicityMode = TRANSACTIONAL_SNAPSHOT; near = true; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheMvccTxNearEnabledInvokeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheMvccTxNearEnabledInvokeTest.java index 78efd460d16ec..fb3e280c5edbf 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheMvccTxNearEnabledInvokeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheMvccTxNearEnabledInvokeTest.java @@ -18,20 +18,15 @@ package org.apache.ignite.internal.processors.cache; import org.apache.ignite.configuration.NearCacheConfiguration; +import org.junit.Ignore; /** * */ +@Ignore("https://issues.apache.org/jira/browse/IGNITE-7187") public class IgniteCacheMvccTxNearEnabledInvokeTest extends IgniteCacheMvccTxInvokeTest { - /** {@inheritDoc} */ - @Override protected void beforeTestsStarted() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-7187"); - - super.beforeTestsStarted(); - } - /** {@inheritDoc} */ @Override protected NearCacheConfiguration nearConfiguration() { return new NearCacheConfiguration(); } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientCacheInitializationFailTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientCacheInitializationFailTest.java index 167a7cdb3ccdf..7051fd825b663 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientCacheInitializationFailTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientCacheInitializationFailTest.java @@ -64,6 +64,7 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -194,10 +195,9 @@ public void testTransactionalNearCacheInitialization() throws Exception { /** * @throws Exception If failed. */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-7187") @Test public void testMvccTransactionalNearCacheInitialization() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-7187"); - checkCacheInitialization(NEAR_MVCC_TX_CACHE_NAME); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGroupsPreloadTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGroupsPreloadTest.java index 53e4e9f4cac3d..c35a84d9824cc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGroupsPreloadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGroupsPreloadTest.java @@ -26,6 +26,7 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -112,10 +113,9 @@ public void testCachePreload2() throws Exception { /** * @throws Exception If failed. */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-7187") @Test public void testCachePreloadMvcc2() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-7187"); - atomicityMode = CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT; cachePreloadTest(); @@ -177,10 +177,9 @@ public void testCachePreload6() throws Exception { /** * @throws Exception If failed. */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-7187") @Test public void testCachePreloadMvcc6() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-7187"); - sameGrp = false; atomicityMode = CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheMvccNearEvictionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheMvccNearEvictionSelfTest.java index 7940a9efd5ba1..3cc5b247e5e02 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheMvccNearEvictionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheMvccNearEvictionSelfTest.java @@ -17,21 +17,15 @@ package org.apache.ignite.internal.processors.cache.distributed.near; import org.apache.ignite.cache.CacheAtomicityMode; +import org.junit.Ignore; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT; /** * Test for mvcc cache. */ +@Ignore("https://issues.apache.org/jira/browse/IGNITE-7187,https://issues.apache.org/jira/browse/IGNITE-7956") public class GridCacheMvccNearEvictionSelfTest extends GridCacheNearEvictionSelfTest { - /** {@inheritDoc} */ - @Override protected void beforeTestsStarted() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-7187"); - fail("https://issues.apache.org/jira/browse/IGNITE-7956"); - - super.beforeTestsStarted(); - } - /** {@inheritDoc} */ @Override protected CacheAtomicityMode atomicityMode() { return TRANSACTIONAL_SNAPSHOT; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiGetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiGetSelfTest.java index acab624853856..1c5b569209235 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiGetSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiGetSelfTest.java @@ -36,6 +36,7 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.apache.ignite.transactions.TransactionOptimisticException; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -243,20 +244,18 @@ public void testPessimisticSerializable() throws Exception { } /** @throws Exception If failed. */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-7187") @Test public void testMvccPessimisticRepeatableReadNoPut() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-7187"); - atomicityMode = TRANSACTIONAL_SNAPSHOT; checkDoubleGet(PESSIMISTIC, REPEATABLE_READ, false); } /** @throws Exception If failed. */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-7187") @Test public void testMvccPessimisticRepeatableReadWithPut() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-7187"); - atomicityMode = TRANSACTIONAL_SNAPSHOT; checkDoubleGet(PESSIMISTIC, REPEATABLE_READ, true); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NearCacheSyncUpdateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NearCacheSyncUpdateTest.java index a1a2a2895ff74..4af2cd7eaf684 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NearCacheSyncUpdateTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NearCacheSyncUpdateTest.java @@ -31,6 +31,7 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -91,10 +92,9 @@ public void testNearCacheSyncUpdateTx() throws Exception { /** * @throws Exception If failed. */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-7187") @Test public void testNearCacheSyncUpdateMvccTx() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-7187"); - nearCacheSyncUpdateTx(TRANSACTIONAL_SNAPSHOT); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearEvictionPolicySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearEvictionPolicySelfTest.java index c8cdbf68a97ee..ae564f3da0d25 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearEvictionPolicySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearEvictionPolicySelfTest.java @@ -29,6 +29,7 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -111,11 +112,9 @@ public void testTransactionalNearEvictionMaxSize() throws Exception { /** * @throws Exception If failed. */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-7187,https://issues.apache.org/jira/browse/IGNITE-7956") @Test public void testMvccTransactionalNearEvictionMaxSize() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-7187"); - fail("https://issues.apache.org/jira/browse/IGNITE-7956"); - atomicityMode = TRANSACTIONAL_SNAPSHOT; checkNearEvictionMaxSize(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearOnlyNearEvictionPolicySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearOnlyNearEvictionPolicySelfTest.java index fea1298f68adf..92613129d22a3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearOnlyNearEvictionPolicySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearOnlyNearEvictionPolicySelfTest.java @@ -29,6 +29,7 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -121,11 +122,9 @@ public void testPartitionedTransactionalNearEvictionMaxSize() throws Exception { /** * @throws Exception If failed. */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-7187,https://issues.apache.org/jira/browse/IGNITE-7956") @Test public void testPartitionedMvccTransactionalNearEvictionMaxSize() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-7187"); - fail("https://issues.apache.org/jira/browse/IGNITE-7956"); - atomicityMode = TRANSACTIONAL_SNAPSHOT; cacheMode = PARTITIONED; @@ -157,11 +156,9 @@ public void testReplicatedTransactionalNearEvictionMaxSize() throws Exception { /** * @throws Exception If failed. */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-7187,https://issues.apache.org/jira/browse/IGNITE-7956") @Test public void testReplicatedMvccTransactionalNearEvictionMaxSize() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-7187"); - fail("https://issues.apache.org/jira/browse/IGNITE-7956"); - atomicityMode = TRANSACTIONAL_SNAPSHOT; cacheMode = REPLICATED; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheEntryProcessorExternalizableFailedTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheEntryProcessorExternalizableFailedTest.java index 96f6112459d33..a791dbd1a9cbc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheEntryProcessorExternalizableFailedTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheEntryProcessorExternalizableFailedTest.java @@ -43,6 +43,7 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.jetbrains.annotations.NotNull; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -507,10 +508,9 @@ public void testMvccPessimisticOnePhaseCommit() throws Exception { /** * @throws Exception If failed. */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-7187") @Test public void testMvccPessimisticOnePhaseCommitWithNearCache() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-7187"); - CacheConfiguration ccfg = cacheConfiguration(PRIMARY_SYNC, 1).setAtomicityMode(TRANSACTIONAL_SNAPSHOT) .setNearConfiguration(new NearCacheConfiguration<>()); @@ -538,10 +538,9 @@ public void testMvccPessimisticOnePhaseCommitFullSync() throws Exception { /** * @throws Exception If failed. */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-7187") @Test public void testMvccPessimisticOnePhaseCommitFullSyncWithNearCache() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-7187"); - CacheConfiguration ccfg = cacheConfiguration(FULL_SYNC, 1).setAtomicityMode(TRANSACTIONAL_SNAPSHOT) .setNearConfiguration(new NearCacheConfiguration<>()); @@ -569,10 +568,9 @@ public void testMvccPessimistic() throws Exception { /** * @throws Exception If failed. */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-7187") @Test public void testMvccPessimisticWithNearCache() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-7187"); - CacheConfiguration ccfg = cacheConfiguration(PRIMARY_SYNC, 2).setAtomicityMode(TRANSACTIONAL_SNAPSHOT) .setNearConfiguration(new NearCacheConfiguration<>()); @@ -600,10 +598,9 @@ public void testMvccPessimisticFullSync() throws Exception { /** * @throws Exception If failed. */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-7187") @Test public void testMvccPessimisticFullSyncWithNearCache() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-7187"); - CacheConfiguration ccfg = cacheConfiguration(FULL_SYNC, 2).setAtomicityMode(TRANSACTIONAL_SNAPSHOT) .setNearConfiguration(new NearCacheConfiguration<>()); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheEntryProcessorNonSerializableTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheEntryProcessorNonSerializableTest.java index 7de184be06da3..9c04dca92feb4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheEntryProcessorNonSerializableTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheEntryProcessorNonSerializableTest.java @@ -41,6 +41,7 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -247,10 +248,9 @@ public void testMvccPessimisticOnePhaseCommit() { /** */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-7187") @Test public void testMvccPessimisticOnePhaseCommitWithNearCache() { - fail("https://issues.apache.org/jira/browse/IGNITE-7187"); - CacheConfiguration ccfg = cacheConfiguration(PRIMARY_SYNC, 1).setAtomicityMode(TRANSACTIONAL_SNAPSHOT) .setNearConfiguration(new NearCacheConfiguration<>()); @@ -268,10 +268,9 @@ public void testMvccPessimisticOnePhaseCommitFullSync() { /** */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-7187") @Test public void testMvccPessimisticOnePhaseCommitFullSyncWithNearCache() { - fail("https://issues.apache.org/jira/browse/IGNITE-7187"); - CacheConfiguration ccfg = cacheConfiguration(FULL_SYNC, 1).setAtomicityMode(TRANSACTIONAL_SNAPSHOT) .setNearConfiguration(new NearCacheConfiguration<>()); @@ -289,10 +288,9 @@ public void testMvccPessimistic() { /** */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-7187") @Test public void testMvccPessimisticWithNearCache() { - fail("https://issues.apache.org/jira/browse/IGNITE-7187"); - CacheConfiguration ccfg = cacheConfiguration(PRIMARY_SYNC, 2).setAtomicityMode(TRANSACTIONAL_SNAPSHOT) .setNearConfiguration(new NearCacheConfiguration<>()); @@ -311,10 +309,9 @@ public void testMvccPessimisticFullSync() { /** * @throws Exception If failed. */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-7187") @Test public void testMvccPessimisticFullSyncWithNearCache() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-7187"); - CacheConfiguration ccfg = cacheConfiguration(FULL_SYNC, 2).setAtomicityMode(TRANSACTIONAL_SNAPSHOT) .setNearConfiguration(new NearCacheConfiguration<>()); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationNearEnabledTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationNearEnabledTest.java index b3a0a45806abd..a45617e9eb9ad 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationNearEnabledTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationNearEnabledTest.java @@ -21,6 +21,7 @@ import org.apache.ignite.cache.CacheMode; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.NearCacheConfiguration; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -44,14 +45,16 @@ public class CacheKeepBinaryIterationNearEnabledTest extends CacheKeepBinaryIter } /** {@inheritDoc} */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-7187") @Test @Override public void testMvccTxOnHeap() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-7187"); + // No-op. } /** {@inheritDoc} */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-7187") @Test @Override public void testMvccTxOnHeapLocalEntries() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-7187"); + // No-op. } } From 0ede805891857685291286c735dd028ae44373cb Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Thu, 20 Dec 2018 18:03:03 +0300 Subject: [PATCH 150/176] IGNITE-10177 Junit 3 cleanup - wip - fixed errors found by TC bot -- verified with diffs overview and rebuild --- .../GridCacheReplicatedMultiNodeLockSelfTest.java | 9 +++------ .../replicated/GridCacheReplicatedMultiNodeSelfTest.java | 9 +++------ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedMultiNodeLockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedMultiNodeLockSelfTest.java index a34024424ea9a..42fa698c6765f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedMultiNodeLockSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedMultiNodeLockSelfTest.java @@ -19,18 +19,15 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.internal.processors.cache.distributed.GridCacheMultiNodeLockAbstractTest; +import org.junit.Ignore; import static org.apache.ignite.cache.CacheMode.REPLICATED; /** * Test cases for multi-threaded tests. */ +@Ignore("https://issues.apache.org/jira/browse/IGNITE-601") public class GridCacheReplicatedMultiNodeLockSelfTest extends GridCacheMultiNodeLockAbstractTest { - /** {@inheritDoc} */ - @Override protected void beforeTest() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-601"); - } - /** {@inheritDoc} */ @Override protected CacheConfiguration cacheConfiguration() { CacheConfiguration cacheCfg = defaultCacheConfiguration(); @@ -39,4 +36,4 @@ public class GridCacheReplicatedMultiNodeLockSelfTest extends GridCacheMultiNode return cacheCfg; } -} \ No newline at end of file +} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedMultiNodeSelfTest.java index f1eed3a693905..6fe1ebad96a1c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedMultiNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedMultiNodeSelfTest.java @@ -20,18 +20,15 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.processors.cache.distributed.GridCacheMultiNodeAbstractTest; +import org.junit.Ignore; import static org.apache.ignite.cache.CacheMode.REPLICATED; /** * Test cases for multi-threaded tests. */ +@Ignore("https://issues.apache.org/jira/browse/IGNITE-601") public class GridCacheReplicatedMultiNodeSelfTest extends GridCacheMultiNodeAbstractTest { - /** {@inheritDoc} */ - @Override protected void beforeTest() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-601"); - } - /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); @@ -44,4 +41,4 @@ public class GridCacheReplicatedMultiNodeSelfTest extends GridCacheMultiNodeAbst return cfg; } -} \ No newline at end of file +} From daf5d0fb877791524403a1d8922f6186919d4e59 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Thu, 20 Dec 2018 18:59:17 +0300 Subject: [PATCH 151/176] IGNITE-10177 Junit 3 cleanup - wip - fixed errors found by TC bot -- verified with diffs overview and rebuild --- ...butedJoinPartitionedAndReplicatedTest.java | 4 +- ...CacheFullTextQueryNodeJoiningSelfTest.java | 4 +- ...CacheJoinPartitionedAndReplicatedTest.java | 8 +-- ...teCacheLockPartitionOnAffinityRunTest.java | 4 +- .../distributed/CacheBlockOnSqlQueryTest.java | 32 +++++++---- ...ctionsCommandsWithMvccEnabledSelfTest.java | 4 +- ...heMvccAbstractContinuousQuerySelfTest.java | 10 +++- .../mvcc/CacheMvccBackupsAbstractTest.java | 5 +- ...ntinuousWithTransformerClientSelfTest.java | 4 +- ...ousWithTransformerPartitionedSelfTest.java | 4 +- ...uousWithTransformerReplicatedSelfTest.java | 4 +- .../mvcc/CacheMvccSqlQueriesAbstractTest.java | 7 +++ .../CacheMvccSqlTxQueriesAbstractTest.java | 4 +- .../query/IgniteSqlSchemaIndexingTest.java | 7 +-- .../query/IgniteSqlSplitterSelfTest.java | 5 +- .../h2/twostep/RetryCauseMessageSelfTest.java | 4 +- ...sactionalSnapshotColumnConstraintTest.java | 55 +++++++++++++------ ...sactionalSnapshotColumnConstraintTest.java | 55 +++++++++++++------ .../ignite/sqltests/ReplicatedSqlTest.java | 13 ++--- 19 files changed, 147 insertions(+), 86 deletions(-) diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDistributedJoinPartitionedAndReplicatedTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDistributedJoinPartitionedAndReplicatedTest.java index 145b076d13776..2b98518658075 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDistributedJoinPartitionedAndReplicatedTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDistributedJoinPartitionedAndReplicatedTest.java @@ -38,6 +38,7 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -191,10 +192,9 @@ public void testJoin1() throws Exception { /** * @throws Exception If failed. */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-5956") @Test public void testJoin2() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-5956"); - join(true, PARTITIONED, REPLICATED, PARTITIONED); } diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheFullTextQueryNodeJoiningSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheFullTextQueryNodeJoiningSelfTest.java index a356f8b5e6480..23705632cfd35 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheFullTextQueryNodeJoiningSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheFullTextQueryNodeJoiningSelfTest.java @@ -36,6 +36,7 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -48,6 +49,7 @@ * Tests cache in-place modification logic with iterative value increment. */ @RunWith(JUnit4.class) +@Ignore("https://issues.apache.org/jira/browse/IGNITE-2229") public class IgniteCacheFullTextQueryNodeJoiningSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -111,8 +113,6 @@ protected CacheAtomicityMode atomicityMode() { */ @Test public void testFullTextQueryNodeJoin() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-2229"); - for (int r = 0; r < 5; r++) { startGrids(GRID_CNT); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheJoinPartitionedAndReplicatedTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheJoinPartitionedAndReplicatedTest.java index 2cfc6a4f34c91..32fe855ee649e 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheJoinPartitionedAndReplicatedTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheJoinPartitionedAndReplicatedTest.java @@ -37,6 +37,7 @@ import java.util.ArrayList; import java.util.List; import java.util.concurrent.Callable; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -50,6 +51,7 @@ * */ @RunWith(JUnit4.class) +@Ignore("https://issues.apache.org/jira/browse/IGNITE-5016") public class IgniteCacheJoinPartitionedAndReplicatedTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -175,10 +177,9 @@ private CacheConfiguration configuration(String name) { /** * @throws Exception If failed. */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-5016") @Test public void testJoin() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-5016"); - Ignite client = grid(2); IgniteCache personCache = client.cache(PERSON_CACHE); @@ -229,10 +230,9 @@ public void testJoin() throws Exception { /** */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-5016") @Test public void testReplicatedToPartitionedLeftJoin() { - fail("https://issues.apache.org/jira/browse/IGNITE-5016"); - Ignite client = grid(2); IgniteCache personCache = client.cache(PERSON_CACHE); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLockPartitionOnAffinityRunTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLockPartitionOnAffinityRunTest.java index af0154cd8a368..dadedf22dadb7 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLockPartitionOnAffinityRunTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLockPartitionOnAffinityRunTest.java @@ -45,6 +45,7 @@ import org.apache.ignite.resources.IgniteInstanceResource; import org.apache.ignite.resources.LoggerResource; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -294,10 +295,9 @@ private static int getPersonsCountMultipleCache(final IgniteEx ignite, IgniteLog /** * @throws Exception If failed. */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-7692") @Test public void testSingleCache() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-7692"); - final PersonsCountGetter personsCntGetter = new PersonsCountGetter() { @Override public int getPersonsCount(IgniteEx ignite, IgniteLogger log, int orgId) throws Exception { return getPersonsCountSingleCache(ignite, log, orgId); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnSqlQueryTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnSqlQueryTest.java index 9f126ef94a799..6cb2c111bb5c8 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnSqlQueryTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnSqlQueryTest.java @@ -22,6 +22,7 @@ import org.apache.ignite.cache.query.annotations.QuerySqlField; import org.apache.ignite.configuration.CacheConfiguration; import org.jetbrains.annotations.NotNull; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -35,7 +36,6 @@ */ @RunWith(JUnit4.class) public class CacheBlockOnSqlQueryTest extends CacheBlockOnReadAbstractTest { - /** {@inheritDoc} */ @Override @NotNull protected CacheReadBackgroundOperation getReadOperation() { return new CacheReadBackgroundOperation() { @@ -99,71 +99,81 @@ public TestingEntity(Integer id, double val) { /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = PARTITIONED) + @Ignore("https://issues.apache.org/jira/browse/IGNITE-9916") @Test @Override public void testStartServerAtomicPartitioned() { - fail("https://issues.apache.org/jira/browse/IGNITE-9916"); + // No-op. } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) + @Ignore("https://issues.apache.org/jira/browse/IGNITE-9916") @Test @Override public void testStartServerTransactionalPartitioned() { - fail("https://issues.apache.org/jira/browse/IGNITE-9916"); + // No-op. } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = PARTITIONED) + @Ignore("https://issues.apache.org/jira/browse/IGNITE-9916") @Test @Override public void testStopServerAtomicPartitioned() { - fail("https://issues.apache.org/jira/browse/IGNITE-9916"); + // No-op. } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) + @Ignore("https://issues.apache.org/jira/browse/IGNITE-9916") @Test @Override public void testStopServerTransactionalPartitioned() { - fail("https://issues.apache.org/jira/browse/IGNITE-9916"); + // No-op. } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = PARTITIONED) + @Ignore("https://issues.apache.org/jira/browse/IGNITE-9916") @Test @Override public void testStopBaselineAtomicPartitioned() { - fail("https://issues.apache.org/jira/browse/IGNITE-9916"); + // No-op. } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) + @Ignore("https://issues.apache.org/jira/browse/IGNITE-9916") @Test @Override public void testStopBaselineTransactionalPartitioned() { - fail("https://issues.apache.org/jira/browse/IGNITE-9916"); + // No-op. } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = PARTITIONED) + @Ignore("https://issues.apache.org/jira/browse/IGNITE-9916") @Test @Override public void testStartClientAtomicPartitioned() { - fail("https://issues.apache.org/jira/browse/IGNITE-9916"); + // No-op. } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) + @Ignore("https://issues.apache.org/jira/browse/IGNITE-9916") @Test @Override public void testStartClientTransactionalPartitioned() { - fail("https://issues.apache.org/jira/browse/IGNITE-9916"); + // No-op. } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = PARTITIONED) + @Ignore("https://issues.apache.org/jira/browse/IGNITE-9916") @Test @Override public void testStopClientAtomicPartitioned() { - fail("https://issues.apache.org/jira/browse/IGNITE-9916"); + // No-op. } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) + @Ignore("https://issues.apache.org/jira/browse/IGNITE-9916") @Test @Override public void testStopClientTransactionalPartitioned() { - fail("https://issues.apache.org/jira/browse/IGNITE-9916"); + // No-op. } } diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/SqlTransactionsCommandsWithMvccEnabledSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/SqlTransactionsCommandsWithMvccEnabledSelfTest.java index d47d98875ef0e..4901fdaf8e2cc 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/SqlTransactionsCommandsWithMvccEnabledSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/SqlTransactionsCommandsWithMvccEnabledSelfTest.java @@ -40,6 +40,7 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionState; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -137,10 +138,9 @@ public void testRollback() { /** * Test that attempting to perform various SQL operations within non SQL transaction yields an exception. */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-9470") @Test public void testSqlOperationsWithinNonSqlTransaction() { - fail("https://issues.apache.org/jira/browse/IGNITE-9470"); - assertSqlOperationWithinNonSqlTransactionThrows("COMMIT"); assertSqlOperationWithinNonSqlTransactionThrows("ROLLBACK"); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractContinuousQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractContinuousQuerySelfTest.java index 073bfb0b8cc36..468349432642f 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractContinuousQuerySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractContinuousQuerySelfTest.java @@ -19,6 +19,7 @@ import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryAbstractSelfTest; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -52,20 +53,23 @@ public abstract class CacheMvccAbstractContinuousQuerySelfTest extends GridCache } /** {@inheritDoc} */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-7311") @Test @Override public void testExpired() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-7311"); + // No-op. } /** {@inheritDoc} */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-7954") @Test @Override public void testLoadCache() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-7954"); + // No-op. } /** {@inheritDoc} */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-9321") @Test @Override public void testEvents() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-9321"); + // No-op. } } diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccBackupsAbstractTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccBackupsAbstractTest.java index b0573b9c9957e..147562eab1e88 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccBackupsAbstractTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccBackupsAbstractTest.java @@ -46,6 +46,7 @@ import org.apache.ignite.lang.IgniteBiTuple; import org.apache.ignite.plugin.extensions.communication.Message; import org.apache.ignite.transactions.Transaction; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -63,7 +64,6 @@ @SuppressWarnings("unchecked") @RunWith(JUnit4.class) public abstract class CacheMvccBackupsAbstractTest extends CacheMvccAbstractTest { - /** Test timeout. */ private final long txLongTimeout = getTestTimeout() / 4; @@ -186,10 +186,9 @@ public void testBackupsCoherenceSimple() throws Exception { * * @throws Exception If failed. */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-10104") @Test public void testBackupsCoherenceWithLargeOperations() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-10104"); - disableScheduledVacuum = true; ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 1, 10) diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccContinuousWithTransformerClientSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccContinuousWithTransformerClientSelfTest.java index ae1e37513feda..696b7e267d472 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccContinuousWithTransformerClientSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccContinuousWithTransformerClientSelfTest.java @@ -18,6 +18,7 @@ import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousWithTransformerClientSelfTest; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -33,8 +34,9 @@ public class CacheMvccContinuousWithTransformerClientSelfTest extends CacheConti } /** {@inheritDoc} */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-7311") @Test @Override public void testExpired() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-7311"); + // No-op. } } diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccContinuousWithTransformerPartitionedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccContinuousWithTransformerPartitionedSelfTest.java index c38cc7c025728..a85b8dfcd3fa6 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccContinuousWithTransformerPartitionedSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccContinuousWithTransformerPartitionedSelfTest.java @@ -19,6 +19,7 @@ import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.cache.CacheMode; import org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousWithTransformerReplicatedSelfTest; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -39,9 +40,10 @@ public class CacheMvccContinuousWithTransformerPartitionedSelfTest extends Cache } /** {@inheritDoc} */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-7311") @Test @Override public void testExpired() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-7311"); + // No-op. } } diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccContinuousWithTransformerReplicatedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccContinuousWithTransformerReplicatedSelfTest.java index b40972b63e5e3..b05c878e61c34 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccContinuousWithTransformerReplicatedSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccContinuousWithTransformerReplicatedSelfTest.java @@ -18,6 +18,7 @@ import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousWithTransformerReplicatedSelfTest; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -34,8 +35,9 @@ public class CacheMvccContinuousWithTransformerReplicatedSelfTest } /** {@inheritDoc} */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-7311") @Test @Override public void testExpired() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-7311"); + // No-op. } } diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlQueriesAbstractTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlQueriesAbstractTest.java index 5d81753ea81de..b52f2ec7e83b7 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlQueriesAbstractTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlQueriesAbstractTest.java @@ -42,6 +42,7 @@ import org.apache.ignite.internal.util.typedef.internal.S; import org.apache.ignite.lang.IgniteInClosure; import org.apache.ignite.transactions.Transaction; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -139,6 +140,7 @@ public void testAccountsTxSql_ClientServer_Backups2() throws Exception { /** * @throws Exception If failed. */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-9470") @Test public void testUpdateSingleValue_SingleNode() throws Exception { updateSingleValue(true, false); @@ -147,6 +149,7 @@ public void testUpdateSingleValue_SingleNode() throws Exception { /** * @throws Exception If failed. */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-9470") @Test public void testUpdateSingleValue_LocalQuery_SingleNode() throws Exception { updateSingleValue(true, true); @@ -155,6 +158,7 @@ public void testUpdateSingleValue_LocalQuery_SingleNode() throws Exception { /** * @throws Exception If failed. */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-9470") @Test public void testUpdateSingleValue_ClientServer() throws Exception { updateSingleValue(false, false); @@ -370,6 +374,7 @@ private void updateSingleValue(boolean singleNode, final boolean locQry) throws /** * @throws Exception If failed. */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-9470") @Test public void testJoinTransactional_SingleNode() throws Exception { joinTransactional(true, false); @@ -378,6 +383,7 @@ public void testJoinTransactional_SingleNode() throws Exception { /** * @throws Exception If failed. */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-9470") @Test public void testJoinTransactional_ClientServer() throws Exception { joinTransactional(false, false); @@ -386,6 +392,7 @@ public void testJoinTransactional_ClientServer() throws Exception { /** * @throws Exception If failed. */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-9470") @Test public void testJoinTransactional_DistributedJoins_ClientServer() throws Exception { joinTransactional(false, true); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlTxQueriesAbstractTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlTxQueriesAbstractTest.java index 1dd7fd5e1a212..15e02a190655b 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlTxQueriesAbstractTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlTxQueriesAbstractTest.java @@ -62,6 +62,7 @@ import org.apache.ignite.lang.IgniteBiTuple; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.transactions.Transaction; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -1209,10 +1210,9 @@ public void testQueryInsertMultithread() throws Exception { /** * @throws Exception If failed. */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-9470") @Test public void testQueryInsertUpdateMultithread() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-9470"); - ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSchemaIndexingTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSchemaIndexingTest.java index 2ebc30f639fb2..aa51595fe14ad 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSchemaIndexingTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSchemaIndexingTest.java @@ -36,6 +36,7 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -89,12 +90,11 @@ private static CacheConfiguration cacheConfig(String name, boolean partitioned, * * @throws Exception If failed. */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-10723") @Test public void testCaseSensitive() throws Exception { //TODO rewrite with dynamic cache creation, and GRID start in #beforeTest after resolve of //TODO IGNITE-1094 - fail("https://issues.apache.org/jira/browse/IGNITE-10723"); - GridTestUtils.assertThrows(log, new Callable() { @Override public Object call() throws Exception { final CacheConfiguration cfg = cacheConfig("InSensitiveCache", true, Integer.class, Integer.class) @@ -119,12 +119,11 @@ public void testCaseSensitive() throws Exception { * * @throws Exception If failed. */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-10723") @Test public void testCustomSchemaMultipleCachesTablesCollision() throws Exception { //TODO: Rewrite with dynamic cache creation, and GRID start in #beforeTest after resolve of //TODO: IGNITE-1094 - fail("https://issues.apache.org/jira/browse/IGNITE-10723"); - GridTestUtils.assertThrows(log, new Callable() { @Override public Object call() throws Exception { final CacheConfiguration cfg = cacheConfig("cache1", true, Integer.class, Fact.class) diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSplitterSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSplitterSelfTest.java index bc3bc19696091..1d96a0b848fa4 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSplitterSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSplitterSelfTest.java @@ -57,6 +57,7 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testsuites.IgniteIgnore; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -165,10 +166,9 @@ public void testOffsetLimit() throws Exception { /** */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-10199") @Test public void testMergeJoin() { - fail("https://issues.apache.org/jira/browse/IGNITE-10199"); - IgniteCache c = ignite(CLIENT).getOrCreateCache(cacheConfig("org", true, Integer.class, Org.class)); @@ -195,6 +195,7 @@ public void testMergeJoin() { } } + /** */ @Test public void testPushDownSubquery() { IgniteCache c = ignite(CLIENT).getOrCreateCache(cacheConfig("ps", true, diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/RetryCauseMessageSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/RetryCauseMessageSelfTest.java index 87cf353570cdb..f2bd25a65604c 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/RetryCauseMessageSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/RetryCauseMessageSelfTest.java @@ -43,6 +43,7 @@ import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -172,10 +173,9 @@ public void testGrpReservationFailureMessage() { /** * Failed to reserve partitions for query (partition of REPLICATED cache is not in OWNING state) */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-7039") @Test public void testReplicatedCacheReserveFailureMessage() { - fail("https://issues.apache.org/jira/browse/IGNITE-7039"); - GridMapQueryExecutor mapQryExec = GridTestUtils.getFieldValue(h2Idx, IgniteH2Indexing.class, "mapQryExec"); final GridKernalContext ctx = GridTestUtils.getFieldValue(mapQryExec, GridMapQueryExecutor.class, "ctx"); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteCachePartitionedTransactionalSnapshotColumnConstraintTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteCachePartitionedTransactionalSnapshotColumnConstraintTest.java index 0eceaed068df5..6fce9a2d2d8f7 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteCachePartitionedTransactionalSnapshotColumnConstraintTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteCachePartitionedTransactionalSnapshotColumnConstraintTest.java @@ -19,6 +19,7 @@ import org.apache.ignite.cache.CacheAtomicityMode; import org.jetbrains.annotations.NotNull; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -33,110 +34,128 @@ public class IgniteCachePartitionedTransactionalSnapshotColumnConstraintTest } /** */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-10066") @Test @Override public void testPutTooLongStringValueFail() { - fail("https://issues.apache.org/jira/browse/IGNITE-10066"); + // No-op. } /** */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-10066") @Test @Override public void testPutTooLongStringKeyFail() { - fail("https://issues.apache.org/jira/browse/IGNITE-10066"); + // No-op. } /** */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-10066") @Test @Override public void testPutTooLongStringValueFieldFail() { - fail("https://issues.apache.org/jira/browse/IGNITE-10066"); + // No-op. } /** */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-10066") @Test @Override public void testPutTooLongStringKeyFieldFail() { - fail("https://issues.apache.org/jira/browse/IGNITE-10066"); + // No-op. } /** */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-10066") @Test @Override public void testPutTooLongStringKeyFail2() { - fail("https://issues.apache.org/jira/browse/IGNITE-10066"); + // No-op. } /** */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-10066") @Test @Override public void testPutTooLongStringKeyFail3() { - fail("https://issues.apache.org/jira/browse/IGNITE-10066"); + // No-op. } /** */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-10066") @Test @Override public void testPutTooLongDecimalValueFail() { - fail("https://issues.apache.org/jira/browse/IGNITE-10066"); + // No-op. } /** */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-10066") @Test @Override public void testPutTooLongDecimalKeyFail() { - fail("https://issues.apache.org/jira/browse/IGNITE-10066"); + // No-op. } /** */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-10066") @Test @Override public void testPutTooLongDecimalKeyFail2() { - fail("https://issues.apache.org/jira/browse/IGNITE-10066"); + // No-op. } /** */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-10066") @Test @Override public void testPutTooLongDecimalValueFieldFail() { - fail("https://issues.apache.org/jira/browse/IGNITE-10066"); + // No-op. } /** */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-10066") @Test @Override public void testPutTooLongDecimalValueFieldFail2() { - fail("https://issues.apache.org/jira/browse/IGNITE-10066"); + // No-op. } /** */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-10066") @Test @Override public void testPutTooLongDecimalKeyFieldFail() { - fail("https://issues.apache.org/jira/browse/IGNITE-10066"); + // No-op. } /** */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-10066") @Test @Override public void testPutTooLongDecimalValueScaleFail() { - fail("https://issues.apache.org/jira/browse/IGNITE-10066"); + // No-op. } /** */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-10066") @Test @Override public void testPutTooLongDecimalKeyScaleFail() { - fail("https://issues.apache.org/jira/browse/IGNITE-10066"); + // No-op. } /** */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-10066") @Test @Override public void testPutTooLongDecimalKeyScaleFail2() { - fail("https://issues.apache.org/jira/browse/IGNITE-10066"); + // No-op. } /** */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-10066") @Test @Override public void testPutTooLongDecimalValueFieldScaleFail() { - fail("https://issues.apache.org/jira/browse/IGNITE-10066"); + // No-op. } /** */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-10066") @Test @Override public void testPutTooLongDecimalValueFieldScaleFail2() { - fail("https://issues.apache.org/jira/browse/IGNITE-10066"); + // No-op. } /** */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-10066") @Test @Override public void testPutTooLongDecimalKeyFieldScaleFail() { - fail("https://issues.apache.org/jira/browse/IGNITE-10066"); + // No-op. } } diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteCacheReplicatedTransactionalSnapshotColumnConstraintTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteCacheReplicatedTransactionalSnapshotColumnConstraintTest.java index 6994cfbebd09f..d6c093ff4c588 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteCacheReplicatedTransactionalSnapshotColumnConstraintTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteCacheReplicatedTransactionalSnapshotColumnConstraintTest.java @@ -19,6 +19,7 @@ import org.apache.ignite.cache.CacheAtomicityMode; import org.jetbrains.annotations.NotNull; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -33,110 +34,128 @@ public class IgniteCacheReplicatedTransactionalSnapshotColumnConstraintTest } /** */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-10066") @Test @Override public void testPutTooLongStringValueFail() { - fail("https://issues.apache.org/jira/browse/IGNITE-10066"); + // No-op. } /** */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-10066") @Test @Override public void testPutTooLongStringKeyFail() { - fail("https://issues.apache.org/jira/browse/IGNITE-10066"); + // No-op. } /** */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-10066") @Test @Override public void testPutTooLongStringValueFieldFail() { - fail("https://issues.apache.org/jira/browse/IGNITE-10066"); + // No-op. } /** */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-10066") @Test @Override public void testPutTooLongStringKeyFieldFail() { - fail("https://issues.apache.org/jira/browse/IGNITE-10066"); + // No-op. } /** */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-10066") @Test @Override public void testPutTooLongStringKeyFail2() { - fail("https://issues.apache.org/jira/browse/IGNITE-10066"); + // No-op. } /** */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-10066") @Test @Override public void testPutTooLongStringKeyFail3() { - fail("https://issues.apache.org/jira/browse/IGNITE-10066"); + // No-op. } /** */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-10066") @Test @Override public void testPutTooLongDecimalValueFail() { - fail("https://issues.apache.org/jira/browse/IGNITE-10066"); + // No-op. } /** */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-10066") @Test @Override public void testPutTooLongDecimalKeyFail() { - fail("https://issues.apache.org/jira/browse/IGNITE-10066"); + // No-op. } /** */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-10066") @Test @Override public void testPutTooLongDecimalKeyFail2() { - fail("https://issues.apache.org/jira/browse/IGNITE-10066"); + // No-op. } /** */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-10066") @Test @Override public void testPutTooLongDecimalValueFieldFail() { - fail("https://issues.apache.org/jira/browse/IGNITE-10066"); + // No-op. } /** */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-10066") @Test @Override public void testPutTooLongDecimalValueFieldFail2() { - fail("https://issues.apache.org/jira/browse/IGNITE-10066"); + // No-op. } /** */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-10066") @Test @Override public void testPutTooLongDecimalKeyFieldFail() { - fail("https://issues.apache.org/jira/browse/IGNITE-10066"); + // No-op. } /** */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-10066") @Test @Override public void testPutTooLongDecimalValueScaleFail() { - fail("https://issues.apache.org/jira/browse/IGNITE-10066"); + // No-op. } /** */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-10066") @Test @Override public void testPutTooLongDecimalKeyScaleFail() { - fail("https://issues.apache.org/jira/browse/IGNITE-10066"); + // No-op. } /** */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-10066") @Test @Override public void testPutTooLongDecimalKeyScaleFail2() { - fail("https://issues.apache.org/jira/browse/IGNITE-10066"); + // No-op. } /** */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-10066") @Test @Override public void testPutTooLongDecimalValueFieldScaleFail() { - fail("https://issues.apache.org/jira/browse/IGNITE-10066"); + // No-op. } /** */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-10066") @Test @Override public void testPutTooLongDecimalValueFieldScaleFail2() { - fail("https://issues.apache.org/jira/browse/IGNITE-10066"); + // No-op. } /** */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-10066") @Test @Override public void testPutTooLongDecimalKeyFieldScaleFail() { - fail("https://issues.apache.org/jira/browse/IGNITE-10066"); + // No-op. } } diff --git a/modules/indexing/src/test/java/org/apache/ignite/sqltests/ReplicatedSqlTest.java b/modules/indexing/src/test/java/org/apache/ignite/sqltests/ReplicatedSqlTest.java index 954b911318a6c..e7fafdffb08ad 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/sqltests/ReplicatedSqlTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/sqltests/ReplicatedSqlTest.java @@ -19,6 +19,7 @@ import java.util.Arrays; import java.util.List; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -153,10 +154,9 @@ public void testLeftDistributedJoinPartitionedReplicated() { /** * Checks distributed LEFT JOIN of replicated and partitioned tables. */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-8732") @Test public void testLeftDistributedJoinReplicatedPartitioned() { - fail("https://issues.apache.org/jira/browse/IGNITE-8732"); - checkLeftDistributedJoinReplicatedWith(DEP_PART_TAB); } @@ -233,10 +233,9 @@ public void testRightDistributedJoinReplicatedReplicated() { /** * Checks distributed RIGHT JOIN of partitioned and replicated tables. */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-8732") @Test public void testRightDistributedJoinPartitionedReplicated() { - fail("https://issues.apache.org/jira/browse/IGNITE-8732"); - checkRightDistributedJoinWithReplicated(DEP_PART_TAB); } @@ -333,10 +332,9 @@ public void testInnerJoinPartitionedReplicated() { /** * Check LEFT JOIN with collocated data of replicated and partitioned tables. */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-8732") @Test public void testLeftJoinReplicatedPartitioned() { - fail("https://issues.apache.org/jira/browse/IGNITE-8732"); - checkLeftJoinEmployeeDepartment(DEP_PART_TAB); } @@ -359,10 +357,9 @@ public void testRightJoinReplicatedPartitioned() { /** * Check RIGHT JOIN with collocated data of partitioned and replicated tables. */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-8732") @Test public void testRightJoinPartitionedReplicated() { - fail("https://issues.apache.org/jira/browse/IGNITE-8732"); - checkRightJoinDepartmentEmployee(DEP_PART_TAB); } } From 4931086f00926efe292833d9318004dd2653fe5c Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Thu, 20 Dec 2018 22:04:49 +0300 Subject: [PATCH 152/176] IGNITE-10739 get rid of using JUnit 3 API in IgniteConfigVariationsAbstractTes - wip - drafting solution -- verified with diffs overview and rebuild --- .../ConfigVariationsMediator.java | 63 +++++++++++++++++++ .../junits/GridAbstractTest.java | 2 +- .../IgniteConfigVariationsAbstractTest.java | 19 ++++++ .../testframework/junits/LegacySupport.java | 2 +- 4 files changed, 84 insertions(+), 2 deletions(-) create mode 100644 modules/core/src/test/java/org/apache/ignite/testframework/configvariations/ConfigVariationsMediator.java diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/configvariations/ConfigVariationsMediator.java b/modules/core/src/test/java/org/apache/ignite/testframework/configvariations/ConfigVariationsMediator.java new file mode 100644 index 0000000000000..ac91a456d8319 --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/testframework/configvariations/ConfigVariationsMediator.java @@ -0,0 +1,63 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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.apache.ignite.testframework.configvariations; + +import java.util.IdentityHashMap; +import java.util.Map; +import junit.framework.JUnit4TestAdapter; +import junit.framework.TestResult; +import org.apache.ignite.testframework.junits.IgniteConfigVariationsAbstractTest; + +/** + * Mediates passing config variations to respective tests. + */ +class ConfigVariationsMediator { + /** IMPL NOTE this relies on serialized execution of test cases. */ + private static final Map map = new IdentityHashMap<>(); + + /** */ + private final JUnit4TestAdapter adapter; + + /** */ + ConfigVariationsMediator(Class cls, VariationsTestsConfig cfg) { + adapter = prepare(cls, cfg); + } + + /** */ + JUnit4TestAdapter adapter() { + return adapter; + } + + /** */ + private JUnit4TestAdapter prepare(Class cls, + VariationsTestsConfig cfg) { + JUnit4TestAdapter res = new JUnit4TestAdapter(cls) { + final JUnit4TestAdapter self = this; + + @Override public void run(TestResult tr) { + IgniteConfigVariationsAbstractTest.injectTestsConfiguration(map.get(self)); + + super.run(tr); + } + }; + + map.put(res, cfg); + + return res; + } +} diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java index af443be87ad37..7fdc619445fc2 100755 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java @@ -180,7 +180,7 @@ public abstract class GridAbstractTest extends LegacySupport { /** */ protected static final String DEFAULT_CACHE_NAME = "default"; - /** Lock to maintain integrity of {@link TestCounters}. */ + /** Lock to maintain integrity of {@link TestCounters} and of {@link IgniteConfigVariationsAbstractTest}. */ private final Lock runSerializer = new ReentrantLock(); /** Manages test execution and reporting. */ diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteConfigVariationsAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteConfigVariationsAbstractTest.java index 146e145528b83..48e839a8bd20d 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteConfigVariationsAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteConfigVariationsAbstractTest.java @@ -39,6 +39,7 @@ import org.apache.ignite.marshaller.jdk.JdkMarshaller; import org.apache.ignite.testframework.configvariations.VariationsTestsConfig; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.runners.model.Statement; /** * Common abstract test for Ignite tests based on configurations variations. @@ -68,9 +69,20 @@ public abstract class IgniteConfigVariationsAbstractTest extends GridCommonAbstr /** */ protected volatile DataMode dataMode = DataMode.PLANE_OBJECT; + /** */ + private static VariationsTestsConfig testsCfgInjected; + + /** + * @param testsCfgInjected Tests configuration. + */ + public static void injectTestsConfiguration(VariationsTestsConfig testsCfgInjected) { + IgniteConfigVariationsAbstractTest.testsCfgInjected = testsCfgInjected; + } + /** * @param testsCfg Tests configuration. */ + @Deprecated // todo replace with static setter and overridden runTestCase public void setTestsConfiguration(VariationsTestsConfig testsCfg) { assert this.testsCfg == null : "Test config must be set only once [oldTestCfg=" + this.testsCfg + ", newTestCfg=" + testsCfg + "]"; @@ -105,6 +117,13 @@ public void setTestsConfiguration(VariationsTestsConfig testsCfg) { return getNameFallback(); } + /** {@inheritDoc} */ + @Override protected void runTestCase(Statement testRoutine) throws Throwable { + testsCfg = testsCfgInjected; + + super.runTestCase(testRoutine); + } + /** {@inheritDoc} */ @Override protected boolean isSafeTopology() { return false; diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacySupport.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacySupport.java index 09e1ecd3a5a8c..a6a4d478e7ccf 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacySupport.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacySupport.java @@ -51,7 +51,7 @@ public abstract class LegacySupport extends LegacyConfigVariationsSupport { * * @throws Throwable if any exception is thrown */ - final void runTestCase(Statement testRoutine) throws Throwable { + protected void runTestCase(Statement testRoutine) throws Throwable { Throwable e = null; setUp(); try { From 1d00ece58f947432038fae704c47ee0ba2fd05f7 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Fri, 21 Dec 2018 01:08:54 +0300 Subject: [PATCH 153/176] IGNITE-10739 get rid of using JUnit 3 API in IgniteConfigVariationsAbstractTes - wip - draft solution -- verified with diffs overview and rebuild --- .../configvariations/ConfigVariationsMediator.java | 14 ++++++++++++-- .../ConfigVariationsTestSuiteBuilder.java | 4 ++-- .../IgniteConfigVariationsTestSuite.java | 4 +++- .../junits/IgniteConfigVariationsAbstractTest.java | 14 ++------------ 4 files changed, 19 insertions(+), 17 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/configvariations/ConfigVariationsMediator.java b/modules/core/src/test/java/org/apache/ignite/testframework/configvariations/ConfigVariationsMediator.java index ac91a456d8319..497816286fdc1 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/configvariations/ConfigVariationsMediator.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/configvariations/ConfigVariationsMediator.java @@ -21,6 +21,7 @@ import java.util.Map; import junit.framework.JUnit4TestAdapter; import junit.framework.TestResult; +import junit.framework.TestSuite; import org.apache.ignite.testframework.junits.IgniteConfigVariationsAbstractTest; /** @@ -33,14 +34,23 @@ class ConfigVariationsMediator { /** */ private final JUnit4TestAdapter adapter; + /** */ + private final String name; + /** */ ConfigVariationsMediator(Class cls, VariationsTestsConfig cfg) { adapter = prepare(cls, cfg); + + name = cls.getSimpleName(); } /** */ - JUnit4TestAdapter adapter() { - return adapter; + TestSuite makeTestSuite() { + TestSuite suite = new TestSuite(name); + + suite.addTest(adapter); + + return suite; } /** */ diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/configvariations/ConfigVariationsTestSuiteBuilder.java b/modules/core/src/test/java/org/apache/ignite/testframework/configvariations/ConfigVariationsTestSuiteBuilder.java index a322ca12635bd..b19386200d563 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/configvariations/ConfigVariationsTestSuiteBuilder.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/configvariations/ConfigVariationsTestSuiteBuilder.java @@ -198,7 +198,7 @@ private TestSuite build(int[] igniteCfgVariation, @Nullable int[] cacheCfgVariat addedSuite = createMultiNodeTestSuite((Class)cls, testCfg, testedNodeCnt, withClients, skipWaitPartMapExchange); else - addedSuite = new IgniteConfigVariationsTestSuite(cls, testCfg); + addedSuite = new ConfigVariationsMediator(cls, testCfg).makeTestSuite(); return addedSuite; } @@ -225,7 +225,7 @@ private static TestSuite createMultiNodeTestSuite(Class cls, VariationsTestsConfig cfg) { super(cls); diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteConfigVariationsAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteConfigVariationsAbstractTest.java index 48e839a8bd20d..60eb1e66cfffa 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteConfigVariationsAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteConfigVariationsAbstractTest.java @@ -49,7 +49,6 @@ * naming convention for test cases in classes extending it. Also, Junit 4 annotations like {@code Before} * and {@code Ignore} may not work. It is expected to be reworked per IGNITE-10739. */ -@Deprecated public abstract class IgniteConfigVariationsAbstractTest extends GridCommonAbstractTest { /** */ protected static final int SERVER_NODE_IDX = 0; @@ -90,7 +89,7 @@ public void setTestsConfiguration(VariationsTestsConfig testsCfg) { this.testsCfg = testsCfg; } - /** + /** TODO IGNITE-10739 remove this. * {@inheritDoc} *

    * Fallback to TestCase functionality.

    @@ -99,7 +98,7 @@ public void setTestsConfiguration(VariationsTestsConfig testsCfg) { return countTestCasesFallback(); } - /** + /** TODO IGNITE-10739 remove this. * {@inheritDoc} *

    * Fallback to TestCase functionality.

    @@ -108,15 +107,6 @@ public void setTestsConfiguration(VariationsTestsConfig testsCfg) { runFallback(res); } - /** - * {@inheritDoc} - *

    - * Fallback to TestCase functionality.

    - */ - @Override public String getName() { - return getNameFallback(); - } - /** {@inheritDoc} */ @Override protected void runTestCase(Statement testRoutine) throws Throwable { testsCfg = testsCfgInjected; From b3a5dfaca674f1fc9ffc0930a79fbe0c71422916 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Fri, 21 Dec 2018 01:55:40 +0300 Subject: [PATCH 154/176] IGNITE-10739 get rid of using JUnit 3 API in IgniteConfigVariationsAbstractTes - wip - cleanup solution for config variations and recover twitter streamer test -- verified with diffs overview and rebuild --- .../IgniteConfigVariationsTestSuite.java | 52 ------------------- .../IgniteConfigVariationsAbstractTest.java | 36 ++----------- .../testframework/junits/LegacySupport.java | 2 +- ...upport.java => LegacyTestCaseSupport.java} | 4 +- 4 files changed, 7 insertions(+), 87 deletions(-) delete mode 100644 modules/core/src/test/java/org/apache/ignite/testframework/configvariations/IgniteConfigVariationsTestSuite.java rename modules/core/src/test/java/org/apache/ignite/testframework/junits/{LegacyConfigVariationsSupport.java => LegacyTestCaseSupport.java} (90%) diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/configvariations/IgniteConfigVariationsTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testframework/configvariations/IgniteConfigVariationsTestSuite.java deleted file mode 100644 index c287d7baa56c0..0000000000000 --- a/modules/core/src/test/java/org/apache/ignite/testframework/configvariations/IgniteConfigVariationsTestSuite.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You 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.apache.ignite.testframework.configvariations; - -import junit.framework.Test; -import junit.framework.TestResult; -import junit.framework.TestSuite; -import org.apache.ignite.testframework.junits.IgniteConfigVariationsAbstractTest; - -/** TODO IGNITE-10739 remove this. - * Configuration variations test suite. - */ -public class IgniteConfigVariationsTestSuite extends TestSuite { - /** */ - protected final VariationsTestsConfig cfg; - - /** - * @param cls Test class. - * @param cfg Configuration. - * @deprecated Use {@link ConfigVariationsMediator#makeTestSuite()} instead. - */ - @Deprecated - public IgniteConfigVariationsTestSuite(Class cls, - VariationsTestsConfig cfg) { - super(cls); - - this.cfg = cfg; - } - - /** {@inheritDoc} */ - @Override public void runTest(Test test, TestResult res) { - if (test instanceof IgniteConfigVariationsAbstractTest) - ((IgniteConfigVariationsAbstractTest)test).setTestsConfiguration(cfg); - - super.runTest(test, res); - } -} diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteConfigVariationsAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteConfigVariationsAbstractTest.java index 60eb1e66cfffa..3fc85bb30061a 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteConfigVariationsAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteConfigVariationsAbstractTest.java @@ -25,7 +25,6 @@ import java.io.ObjectOutput; import java.io.ObjectOutputStream; import java.io.Serializable; -import junit.framework.TestResult; import org.apache.commons.io.FileUtils; import org.apache.ignite.Ignition; import org.apache.ignite.binary.BinaryObjectException; @@ -43,11 +42,6 @@ /** * Common abstract test for Ignite tests based on configurations variations. - * TODO IGNITE-10739 redesign this and related classes to get rid of JUnit 3 features. - * - * @deprecated This class uses obsolete methods of JUnit 3 framework and because of that you need to use JUnit 3 - * naming convention for test cases in classes extending it. Also, Junit 4 annotations like {@code Before} - * and {@code Ignore} may not work. It is expected to be reworked per IGNITE-10739. */ public abstract class IgniteConfigVariationsAbstractTest extends GridCommonAbstractTest { /** */ @@ -79,35 +73,13 @@ public static void injectTestsConfiguration(VariationsTestsConfig testsCfgInject } /** - * @param testsCfg Tests configuration. - */ - @Deprecated // todo replace with static setter and overridden runTestCase - public void setTestsConfiguration(VariationsTestsConfig testsCfg) { - assert this.testsCfg == null : "Test config must be set only once [oldTestCfg=" + this.testsCfg - + ", newTestCfg=" + testsCfg + "]"; - - this.testsCfg = testsCfg; - } - - /** TODO IGNITE-10739 remove this. * {@inheritDoc} *

    - * Fallback to TestCase functionality.

    + * IMPL NOTE when this override was introduced, alternative was to replace multiple usages of instance member + * {@code testsCfg} splattered all over the project with those of static one {@code testsCfgInjected} - kind + * of cumbersome, risky and potentially redundant change given the chance of later migration to JUnit 5 and + * further rework to use dynamic test parameters that would likely cause removal of the static member.

    */ - @Override public int countTestCases() { - return countTestCasesFallback(); - } - - /** TODO IGNITE-10739 remove this. - * {@inheritDoc} - *

    - * Fallback to TestCase functionality.

    - */ - @Override public void run(TestResult res) { - runFallback(res); - } - - /** {@inheritDoc} */ @Override protected void runTestCase(Statement testRoutine) throws Throwable { testsCfg = testsCfgInjected; diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacySupport.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacySupport.java index a6a4d478e7ccf..2033753a7bf49 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacySupport.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacySupport.java @@ -27,7 +27,7 @@ * inherited deprecated assertions and specific old interface for GridTestUtils. */ @SuppressWarnings({"TransientFieldInNonSerializableClass"}) -public abstract class LegacySupport extends LegacyConfigVariationsSupport { +public abstract class LegacySupport extends LegacyTestCaseSupport { /** * Supports obtaining test name for JUnit4 framework in a way that makes it available for legacy methods invoked * from {@code runTest(Statement)}. diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacyConfigVariationsSupport.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacyTestCaseSupport.java similarity index 90% rename from modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacyConfigVariationsSupport.java rename to modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacyTestCaseSupport.java index 843f67782df43..054e622bd0028 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacyConfigVariationsSupport.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacyTestCaseSupport.java @@ -21,9 +21,9 @@ import junit.framework.TestResult; /** - * Supports compatibility with old tests based on configurations variations. + * Supports compatibility with old test {@code IgniteTwitterStreamerTest}. */ -abstract class LegacyConfigVariationsSupport extends TestCase { +abstract class LegacyTestCaseSupport extends TestCase { /** * Fallback to superclass. */ From 78349074109e72e10b77567e86431d3378e8ba7c Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Fri, 21 Dec 2018 07:10:31 +0300 Subject: [PATCH 155/176] IGNITE-10739 get rid of using JUnit 3 API in IgniteConfigVariationsAbstractTes - wip - dummy initial config -- verified with diffs overview and rebuild --- .../junits/IgniteConfigVariationsAbstractTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteConfigVariationsAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteConfigVariationsAbstractTest.java index 3fc85bb30061a..80ba8d8e69016 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteConfigVariationsAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteConfigVariationsAbstractTest.java @@ -56,8 +56,8 @@ public abstract class IgniteConfigVariationsAbstractTest extends GridCommonAbstr /** */ private static final File workDir = new File(U.getIgniteHome() + File.separator + "workOfConfigVariationsTests"); - /** */ - protected VariationsTestsConfig testsCfg; + /** Dummy (intentionally invalid) initial stub to just let people launch test classes not from suite. */ + protected VariationsTestsConfig testsCfg = new VariationsTestsConfig(null, "Dummy config", false, null, 0, false); /** */ protected volatile DataMode dataMode = DataMode.PLANE_OBJECT; From 78f44f9357af8f7a51bfca8ab6fe8ca09d9c53ec Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Fri, 21 Dec 2018 09:53:42 +0300 Subject: [PATCH 156/176] IGNITE-10739 get rid of using JUnit 3 API in IgniteConfigVariationsAbstractTes - Twitter Streamer test migrated - remainders of JUnit 3 that were used in tests removed (at last) -- verified with diffs overview and rebuild --- .../junits/GridAbstractTest.java | 3 -- .../testframework/junits/LegacySupport.java | 38 ++++----------- .../junits/LegacyTestCaseSupport.java | 47 ------------------- modules/twitter/pom.xml | 2 +- .../twitter/IgniteTwitterStreamerTest.java | 47 +++++-------------- 5 files changed, 22 insertions(+), 115 deletions(-) delete mode 100644 modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacyTestCaseSupport.java diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java index 7fdc619445fc2..872d625090545 100755 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java @@ -127,8 +127,6 @@ import org.junit.Rule; import org.junit.Test; import org.junit.rules.TestRule; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; import org.junit.runners.model.Statement; import org.springframework.beans.BeansException; import org.springframework.context.ApplicationContext; @@ -151,7 +149,6 @@ "ProhibitedExceptionDeclared", "JUnitTestCaseWithNonTrivialConstructors" }) -@RunWith(JUnit4.class) public abstract class GridAbstractTest extends LegacySupport { /************************************************************** * DO NOT REMOVE TRANSIENT - THIS OBJECT MIGHT BE TRANSFERRED * diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacySupport.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacySupport.java index 2033753a7bf49..4cb58233f9a33 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacySupport.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacySupport.java @@ -17,7 +17,7 @@ package org.apache.ignite.testframework.junits; -import junit.framework.TestResult; +import junit.framework.Assert; // IMPL NOTE some old tests expect inherited deprecated assertions. import org.junit.Rule; import org.junit.rules.TestName; import org.junit.runners.model.Statement; @@ -26,8 +26,8 @@ * Supports compatibility with old tests that expect specific threading behavior of JUnit 3 TestCase class, * inherited deprecated assertions and specific old interface for GridTestUtils. */ -@SuppressWarnings({"TransientFieldInNonSerializableClass"}) -public abstract class LegacySupport extends LegacyTestCaseSupport { +@SuppressWarnings({"TransientFieldInNonSerializableClass", "ExtendsUtilityClass", "deprecation"}) +public abstract class LegacySupport extends Assert { /** * Supports obtaining test name for JUnit4 framework in a way that makes it available for legacy methods invoked * from {@code runTest(Statement)}. @@ -39,13 +39,19 @@ public abstract class LegacySupport extends LegacyTestCaseSupport { * * @return Name of the currently executed test case. */ - @Override public String getName() { + public String getName() { return nameRule.getMethodName(); } + /** This method is called before a test is executed. */ + abstract void setUp() throws Exception; + /** Runs test code in between {@code setUp} and {@code tearDown}. */ abstract void runTest(Statement testRoutine) throws Throwable; + /** This method is called after a test is executed. */ + abstract void tearDown() throws Exception; + /** * Runs the bare test sequence like in JUnit 3 class TestCase. * @@ -67,28 +73,4 @@ protected void runTestCase(Statement testRoutine) throws Throwable { } if (e != null) throw e; } - - /** - * {@inheritDoc} - *

    - * This method is here only for subclass to pretend implementing particular interface expected by some utility - * methods in GridTestUtils.

    - * - * @return Nothing. - */ - @Override public int countTestCases() { - throw new UnsupportedOperationException("This method is not expected to be invoked: countTestCases() at test: " - + getName()); - } - - /** - * {@inheritDoc} - *

    - * This method is here only for subclass to pretend implementing particular interface expected by some utility - * methods in GridTestUtils.

    - */ - @Override public void run(TestResult res) { - throw new UnsupportedOperationException("This method is not intended to be invoked: run(TestResult) at test: " - + getName()); - } } diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacyTestCaseSupport.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacyTestCaseSupport.java deleted file mode 100644 index 054e622bd0028..0000000000000 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacyTestCaseSupport.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You 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.apache.ignite.testframework.junits; - -import junit.framework.TestCase; // IMPL NOTE some old tests expect inherited deprecated assertions. -import junit.framework.TestResult; - -/** - * Supports compatibility with old test {@code IgniteTwitterStreamerTest}. - */ -abstract class LegacyTestCaseSupport extends TestCase { - /** - * Fallback to superclass. - */ - protected int countTestCasesFallback() { - return super.countTestCases(); - } - - /** - * Fallback to superclass. - */ - protected void runFallback(TestResult res) { - super.run(res); - } - - /** - * Fallback to superclass. - */ - protected String getNameFallback() { - return super.getName(); - } -} diff --git a/modules/twitter/pom.xml b/modules/twitter/pom.xml index 017e43e1ae4d5..6d98eb2f3211a 100644 --- a/modules/twitter/pom.xml +++ b/modules/twitter/pom.xml @@ -71,7 +71,7 @@ com.github.tomakehurst wiremock - 1.57 + 1.58 standalone diff --git a/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTest.java b/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTest.java index c607f55fb86ed..840162cdcd239 100644 --- a/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTest.java +++ b/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTest.java @@ -24,7 +24,6 @@ import java.util.HashMap; import java.util.Map; import java.util.concurrent.CountDownLatch; -import junit.framework.TestResult; import org.apache.ignite.Ignite; import org.apache.ignite.IgniteCache; import org.apache.ignite.IgniteDataStreamer; @@ -35,8 +34,6 @@ import org.junit.ClassRule; import org.junit.Rule; import org.junit.Test; -import org.junit.internal.runners.JUnit38ClassRunner; -import org.junit.runner.RunWith; import twitter4j.Status; import twitter4j.TwitterException; import twitter4j.TwitterObjectFactory; @@ -50,7 +47,6 @@ /** * Test for {@link TwitterStreamer}. Tests Public Status streaming API https://dev.twitter.com/streaming/public. */ -@RunWith(JUnit38ClassRunner.class) // TODO IGNITE-10739 migrate to JUnit 4. public class IgniteTwitterStreamerTest extends GridCommonAbstractTest { /** Cache entries count. */ private static final int CACHE_ENTRY_COUNT = 100; @@ -66,7 +62,10 @@ public IgniteTwitterStreamerTest() { super(true); } - /** See The JUnit 4.x Rule */ + /** + * See The JUnit 4.x Rule. Also note that in order for this + * test to migrate from JUnit 3 to 4 WireMock version had to upgrade from {@code 1.57} to {@code 1.58}. + */ @ClassRule public static WireMockClassRule wireMockClsRule = new WireMockClassRule(WireMockConfiguration.DYNAMIC_PORT); @@ -77,40 +76,13 @@ public IgniteTwitterStreamerTest() { /** Embedded mock HTTP server for Twitter API. */ public final WireMockServer mockSrv = new WireMockServer(); //Starts server on 8080 port. - /** - * {@inheritDoc} - *

    - * Fallback to TestCase functionality.

    - */ - @Override public int countTestCases() { - return countTestCasesFallback(); - } - - /** - * {@inheritDoc} - *

    - * Fallback to TestCase functionality.

    - */ - @Override public void run(TestResult res) { - runFallback(res); - } - - /** - * {@inheritDoc} - *

    - * Fallback to TestCase functionality.

    - */ - @Override public String getName() { - return getNameFallback(); - } - /** {@inheritDoc} */ @Override protected long getTestTimeout() { return 10_000; } - /** {@inheritDoc} */ - @Override public void beforeTest() { + /** */ + private void init() { grid().getOrCreateCache(defaultCacheConfiguration()); mockSrv.start(); @@ -119,8 +91,8 @@ public IgniteTwitterStreamerTest() { withHeader("Content-Type", "text/plain").withBody(tweet.length() + "\n" + tweet))); } - /** {@inheritDoc} */ - @Override public void afterTest() { + /** */ + private void cleanup() { stopAllGrids(); mockSrv.stop(); @@ -131,6 +103,7 @@ public IgniteTwitterStreamerTest() { */ @Test public void testStatusesFilterEndpointOAuth1() throws Exception { + init(); try (IgniteDataStreamer dataStreamer = grid().dataStreamer(DEFAULT_CACHE_NAME)) { TwitterStreamerImpl streamer = newStreamerInstance(dataStreamer); @@ -145,6 +118,8 @@ public void testStatusesFilterEndpointOAuth1() throws Exception { streamer.setThreadsCount(8); executeStreamer(streamer); + } finally { + cleanup(); } } From 382d8a953d34dfe684d1b684c02da72fa0999c11 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Fri, 21 Dec 2018 12:28:43 +0300 Subject: [PATCH 157/176] IGNITE-10739 get rid of using JUnit 3 API in IgniteConfigVariationsAbstractTes - fixing bugs discovered by TC bot -- verified with diffs overview and rebuild --- .../ConfigVariationsTestSuiteBuilderTest.java | 31 +++++++------------ 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/test/ConfigVariationsTestSuiteBuilderTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/test/ConfigVariationsTestSuiteBuilderTest.java index 50301e4e42481..631f0337dcd2f 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/test/ConfigVariationsTestSuiteBuilderTest.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/test/ConfigVariationsTestSuiteBuilderTest.java @@ -32,11 +32,9 @@ * */ public class ConfigVariationsTestSuiteBuilderTest { - /** - * @throws Exception If failed. - */ + /** */ @Test - public void testDefaults() throws Exception { + public void testDefaults() { TestSuite dfltSuite = new ConfigVariationsTestSuiteBuilder("testSuite", NoopTest.class).build(); assertEquals(4, dfltSuite.countTestCases()); @@ -58,12 +56,10 @@ public void testDefaults() throws Exception { assertEquals(4 * 4 * 2 * 3, dfltCacheSuite.countTestCases()); } - /** - * @throws Exception If failed. - */ + /** */ @SuppressWarnings("serial") @Test - public void testIgniteConfigFilter() throws Exception { + public void testIgniteConfigFilter() { TestSuite dfltSuite = new ConfigVariationsTestSuiteBuilder("testSuite", NoopTest.class).build(); final AtomicInteger cnt = new AtomicInteger(); @@ -79,12 +75,10 @@ public void testIgniteConfigFilter() throws Exception { assertEquals(dfltSuite.countTestCases() / 2, filteredSuite.countTestCases()); } - /** - * @throws Exception If failed. - */ + /** */ @SuppressWarnings("serial") @Test - public void testCacheConfigFilter() throws Exception { + public void testCacheConfigFilter() { TestSuite dfltSuite = new ConfigVariationsTestSuiteBuilder("testSuite", NoopTest.class) .withBasicCacheParams() .build(); @@ -103,14 +97,11 @@ public void testCacheConfigFilter() throws Exception { assertEquals(dfltSuite.countTestCases() / 2, filteredSuite.countTestCases()); } - /** - * - */ - private static class NoopTest extends IgniteConfigVariationsAbstractTest { - /** - * @throws Exception If failed. - */ - public void test1() throws Exception { + /** */ + public static class NoopTest extends IgniteConfigVariationsAbstractTest { + /** */ + @Test + public void test1() { // No-op. } } From 6a22fabb75367498417985955755ca7ec04888b9 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Fri, 21 Dec 2018 13:29:37 +0300 Subject: [PATCH 158/176] IGNITE-10739 get rid of using JUnit 3 API in IgniteConfigVariationsAbstractTes - fixing bugs discovered by TC bot -- verified with diffs overview and rebuild --- .../configvariations/VariationsTestsConfig.java | 4 ++-- .../junits/IgniteConfigVariationsAbstractTest.java | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/configvariations/VariationsTestsConfig.java b/modules/core/src/test/java/org/apache/ignite/testframework/configvariations/VariationsTestsConfig.java index 91c6c93741a2b..633333eb5e387 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/configvariations/VariationsTestsConfig.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/configvariations/VariationsTestsConfig.java @@ -48,7 +48,7 @@ public class VariationsTestsConfig { private boolean stopCache; /** */ - private boolean awaitPartMapExchange = true; + private boolean awaitPartMapExchange; /** */ private boolean withClients; @@ -88,7 +88,7 @@ public VariationsTestsConfig( boolean withClients, boolean awaitPartMapExchange ) { - A.ensure(gridCnt >= 1, "Grids count cannot be less then 1."); + A.ensure(gridCnt >= 1, "Grids count cannot be less than 1."); this.factory = factory; this.desc = desc; diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteConfigVariationsAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteConfigVariationsAbstractTest.java index 80ba8d8e69016..9ae2a06ed426d 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteConfigVariationsAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteConfigVariationsAbstractTest.java @@ -56,8 +56,8 @@ public abstract class IgniteConfigVariationsAbstractTest extends GridCommonAbstr /** */ private static final File workDir = new File(U.getIgniteHome() + File.separator + "workOfConfigVariationsTests"); - /** Dummy (intentionally invalid) initial stub to just let people launch test classes not from suite. */ - protected VariationsTestsConfig testsCfg = new VariationsTestsConfig(null, "Dummy config", false, null, 0, false); + /** Dummy initial stub to just let people launch test classes not from suite. */ + protected VariationsTestsConfig testsCfg = new VariationsTestsConfig(null, "Dummy config", false, null, 1, false); /** */ protected volatile DataMode dataMode = DataMode.PLANE_OBJECT; @@ -172,6 +172,8 @@ private void memoryUsage() { /** {@inheritDoc} */ @Override protected String testDescription() { + assert testsCfg != null: "Tests should be run using test suite."; + return super.testDescription() + '-' + testsCfg.description() + '-' + testsCfg.gridCount() + "-node(s)"; } From c698ad3b7fdd1dd9fd5486b4a5e594ed69e1a097 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Fri, 21 Dec 2018 17:59:01 +0300 Subject: [PATCH 159/176] IGNITE-10773 migrate examples testsuites from Junit 3 to 4 - wip -- verified with diffs overview and rebuild --- .../testsuites/IgniteExamplesMLTestSuite.java | 79 ++++++++------- .../IgniteExamplesSelfTestSuite.java | 98 +++++++++---------- 2 files changed, 90 insertions(+), 87 deletions(-) diff --git a/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesMLTestSuite.java b/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesMLTestSuite.java index 8551460dd76dd..5b04a1a6a01d0 100644 --- a/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesMLTestSuite.java +++ b/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesMLTestSuite.java @@ -23,25 +23,23 @@ import java.util.ArrayList; import java.util.Enumeration; import java.util.List; -import javassist.CannotCompileException; +import java.util.stream.Collectors; import javassist.ClassClassPath; import javassist.ClassPool; import javassist.CtClass; import javassist.CtMethod; import javassist.CtNewMethod; -import javassist.NotFoundException; import javassist.bytecode.AnnotationsAttribute; import javassist.bytecode.ClassFile; import javassist.bytecode.ConstPool; import javassist.bytecode.annotation.Annotation; -import junit.framework.JUnit4TestAdapter; -import junit.framework.TestSuite; import org.apache.ignite.examples.ml.util.MLExamplesCommonArgs; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridAbstractExamplesTest; import org.junit.BeforeClass; import org.junit.runner.RunWith; -import org.junit.runners.AllTests; +import org.junit.runners.Suite; +import org.junit.runners.model.InitializationError; import static org.apache.ignite.IgniteSystemProperties.IGNITE_OVERRIDE_MCAST_GRP; @@ -50,7 +48,7 @@ *

    * Contains only ML Grid Ignite examples tests.

    */ -@RunWith(AllTests.class) +@RunWith(IgniteExamplesMLTestSuite.DynamicSuite.class) public class IgniteExamplesMLTestSuite { /** Base package to create test classes in. */ private static final String basePkgForTests = "org.apache.ignite.examples.ml"; @@ -66,18 +64,17 @@ public static void init() { } /** - * Creates test suite for Ignite ML examples. + * Creates list of test classes for Ignite ML examples. * - * @return Created suite. - * @throws Exception If failed. + * @return Created list. + * @throws IOException, ClassNotFoundException If failed. */ - public static TestSuite suite() throws Exception { - TestSuite suite = new TestSuite("Ignite ML Examples Test Suite"); - - for (Class clazz : getClasses(basePkgForTests)) - suite.addTest(new JUnit4TestAdapter(makeTestClass(clazz))); - - return suite; + public static Class[] suite() throws IOException, ClassNotFoundException { + return getClasses(basePkgForTests) + .stream() + .map(IgniteExamplesMLTestSuite::makeTestClass) + .collect(Collectors.toList()) + .toArray(new Class[] {null}); } /** @@ -85,35 +82,39 @@ public static TestSuite suite() throws Exception { * * @param exampleCls Class of the example to be tested. * @return Test class. - * @throws NotFoundException If class not found. - * @throws CannotCompileException If test class cannot be compiled. */ - private static Class makeTestClass(Class exampleCls) - throws NotFoundException, CannotCompileException { + private static Class makeTestClass(Class exampleCls) { ClassPool cp = ClassPool.getDefault(); cp.insertClassPath(new ClassClassPath(IgniteExamplesMLTestSuite.class)); CtClass cl = cp.makeClass(basePkgForTests + "." + exampleCls.getSimpleName() + "SelfTest"); - cl.setSuperclass(cp.get(GridAbstractExamplesTest.class.getName())); + try { + cl.setSuperclass(cp.get(GridAbstractExamplesTest.class.getName())); + + CtMethod mtd = CtNewMethod.make("public void testExample() { " + + exampleCls.getCanonicalName() + + ".main(" + + MLExamplesCommonArgs.class.getName() + + ".EMPTY_ARGS_ML); }", cl); + + // Create and add annotation. + ClassFile ccFile = cl.getClassFile(); + ConstPool constpool = ccFile.getConstPool(); - CtMethod mtd = CtNewMethod.make("public void testExample() { " - + exampleCls.getCanonicalName() - + ".main(" - + MLExamplesCommonArgs.class.getName() - + ".EMPTY_ARGS_ML); }", cl); + AnnotationsAttribute attr = new AnnotationsAttribute(constpool, AnnotationsAttribute.visibleTag); + Annotation annot = new Annotation("org.junit.Test", constpool); - // Create and add annotation. - ClassFile ccFile = cl.getClassFile(); - ConstPool constpool = ccFile.getConstPool(); - AnnotationsAttribute attr = new AnnotationsAttribute(constpool, AnnotationsAttribute.visibleTag); - Annotation annot = new Annotation("org.junit.Test", constpool); - attr.addAnnotation(annot); - mtd.getMethodInfo().addAttribute(attr); + attr.addAnnotation(annot); + mtd.getMethodInfo().addAttribute(attr); - cl.addMethod(mtd); + cl.addMethod(mtd); - return cl.toClass(); + return cl.toClass(); + } + catch (Exception e) { + throw new RuntimeException(e); + } } /** @@ -172,4 +173,12 @@ else if (file.getName().endsWith(".class")) { return classes; } + + /** */ + public static class DynamicSuite extends Suite { + /** */ + public DynamicSuite(Class cls) throws InitializationError, IOException, ClassNotFoundException { + super(cls, suite()); + } + } } diff --git a/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesSelfTestSuite.java b/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesSelfTestSuite.java index 31e9a6c48135d..b2c3b716360f8 100644 --- a/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesSelfTestSuite.java +++ b/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesSelfTestSuite.java @@ -17,8 +17,6 @@ package org.apache.ignite.testsuites; -import junit.framework.JUnit4TestAdapter; -import junit.framework.TestSuite; import org.apache.ignite.examples.BasicExamplesMultiNodeSelfTest; import org.apache.ignite.examples.BasicExamplesSelfTest; import org.apache.ignite.examples.CacheClientBinaryExampleTest; @@ -50,64 +48,60 @@ import org.apache.ignite.examples.TaskExamplesMultiNodeSelfTest; import org.apache.ignite.examples.TaskExamplesSelfTest; import org.junit.runner.RunWith; -import org.junit.runners.AllTests; +import org.junit.runners.Suite; /** * Examples test suite. *

    * Contains all Ignite examples tests.

    */ -@RunWith(AllTests.class) -public class IgniteExamplesSelfTestSuite { - /** - * @return Suite. - */ - public static TestSuite suite() { -// System.setProperty(IGNITE_OVERRIDE_MCAST_GRP, -// GridTestUtils.getNextMulticastGroup(IgniteExamplesSelfTestSuite.class)); - - TestSuite suite = new TestSuite("Ignite Examples Test Suite"); - - suite.addTest(new JUnit4TestAdapter(CacheExamplesSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(SqlExamplesSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(BasicExamplesSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(ContinuationExamplesSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(ContinuousMapperExamplesSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(DeploymentExamplesSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(EventsExamplesSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(LifecycleExamplesSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(MessagingExamplesSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(MemcacheRestExamplesSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(MonteCarloExamplesSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(TaskExamplesSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(SpringBeanExamplesSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(SpringDataExampleSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(IgfsExamplesSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(CheckpointExamplesSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(ClusterGroupExampleSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(CacheContinuousQueryExamplesSelfTest.class)); +@RunWith(Suite.class) +@Suite.SuiteClasses({ + CacheExamplesSelfTest.class, + SqlExamplesSelfTest.class, + BasicExamplesSelfTest.class, + ContinuationExamplesSelfTest.class, + ContinuousMapperExamplesSelfTest.class, + DeploymentExamplesSelfTest.class, + EventsExamplesSelfTest.class, + LifecycleExamplesSelfTest.class, + MessagingExamplesSelfTest.class, + MemcacheRestExamplesSelfTest.class, + MonteCarloExamplesSelfTest.class, + TaskExamplesSelfTest.class, + SpringBeanExamplesSelfTest.class, + SpringDataExampleSelfTest.class, + IgfsExamplesSelfTest.class, + CheckpointExamplesSelfTest.class, + ClusterGroupExampleSelfTest.class, + CacheContinuousQueryExamplesSelfTest.class, - // Multi-node. - suite.addTest(new JUnit4TestAdapter(CacheExamplesMultiNodeSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(BasicExamplesMultiNodeSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(ContinuationExamplesMultiNodeSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(ContinuousMapperExamplesMultiNodeSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(DeploymentExamplesMultiNodeSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(EventsExamplesMultiNodeSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(TaskExamplesMultiNodeSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(MemcacheRestExamplesMultiNodeSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(MonteCarloExamplesMultiNodeSelfTest.class)); + // Multi-node. + CacheExamplesMultiNodeSelfTest.class, + BasicExamplesMultiNodeSelfTest.class, + ContinuationExamplesMultiNodeSelfTest.class, + ContinuousMapperExamplesMultiNodeSelfTest.class, + DeploymentExamplesMultiNodeSelfTest.class, + EventsExamplesMultiNodeSelfTest.class, + TaskExamplesMultiNodeSelfTest.class, + MemcacheRestExamplesMultiNodeSelfTest.class, + MonteCarloExamplesMultiNodeSelfTest.class, - // Binary. - suite.addTest(new JUnit4TestAdapter(CacheClientBinaryExampleTest.class)); - suite.addTest(new JUnit4TestAdapter(ComputeClientBinaryExampleTest.class)); + // Binary. + CacheClientBinaryExampleTest.class, + ComputeClientBinaryExampleTest.class, - // ML Grid. - suite.addTest(new JUnit4TestAdapter(IgniteExamplesMLTestSuite.class)); + // ML Grid. + IgniteExamplesMLTestSuite.class, - // Encryption. - suite.addTest(new JUnit4TestAdapter(EncryptedCacheExampleSelfTest.class)); - - return suite; - } + // Encryption. + EncryptedCacheExampleSelfTest.class, +}) +public class IgniteExamplesSelfTestSuite { +// /** */ +// @BeforeClass +// public static void init() { +// System.setProperty(IGNITE_OVERRIDE_MCAST_GRP, +// GridTestUtils.getNextMulticastGroup(IgniteExamplesSelfTestSuite.class)); +// } } From 3cdfe3df616b487a1bbb9eebd002227d32df9722 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Fri, 21 Dec 2018 18:09:49 +0300 Subject: [PATCH 160/176] IGNITE-10773 migrate examples testsuites from Junit 3 to 4 - draft completed -- verified with diffs overview and rebuild --- .../IgniteLgplExamplesSelfTestSuite.java | 33 ++++++++----------- .../IgniteExamplesSparkSelfTestSuite.java | 27 +++++++-------- 2 files changed, 25 insertions(+), 35 deletions(-) diff --git a/examples/src/test/java-lgpl/org/apache/ignite/testsuites/IgniteLgplExamplesSelfTestSuite.java b/examples/src/test/java-lgpl/org/apache/ignite/testsuites/IgniteLgplExamplesSelfTestSuite.java index a5e714abecada..d5fde95f24c26 100644 --- a/examples/src/test/java-lgpl/org/apache/ignite/testsuites/IgniteLgplExamplesSelfTestSuite.java +++ b/examples/src/test/java-lgpl/org/apache/ignite/testsuites/IgniteLgplExamplesSelfTestSuite.java @@ -17,39 +17,34 @@ package org.apache.ignite.testsuites; -import junit.framework.JUnit4TestAdapter; -import junit.framework.TestSuite; import org.apache.ignite.examples.HibernateL2CacheExampleMultiNodeSelfTest; import org.apache.ignite.examples.HibernateL2CacheExampleSelfTest; import org.apache.ignite.examples.SpatialQueryExampleMultiNodeSelfTest; import org.apache.ignite.examples.SpatialQueryExampleSelfTest; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.BeforeClass; import org.junit.runner.RunWith; -import org.junit.runners.AllTests; +import org.junit.runners.Suite; import static org.apache.ignite.IgniteSystemProperties.IGNITE_OVERRIDE_MCAST_GRP; /** * Examples test suite.

    Contains only Spring ignite examples tests. */ -@RunWith(AllTests.class) +@RunWith(Suite.class) +@Suite.SuiteClasses({ + HibernateL2CacheExampleSelfTest.class, + SpatialQueryExampleSelfTest.class, + + // Multi-node. + HibernateL2CacheExampleMultiNodeSelfTest.class, + SpatialQueryExampleMultiNodeSelfTest.class, +}) public class IgniteLgplExamplesSelfTestSuite { - /** - * @return Suite. - */ - public static TestSuite suite() { + /** */ + @BeforeClass + public static void init() { System.setProperty(IGNITE_OVERRIDE_MCAST_GRP, GridTestUtils.getNextMulticastGroup(IgniteLgplExamplesSelfTestSuite.class)); - - TestSuite suite = new TestSuite("Ignite Examples Test Suite"); - - suite.addTest(new JUnit4TestAdapter(HibernateL2CacheExampleSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(SpatialQueryExampleSelfTest.class)); - - // Multi-node. - suite.addTest(new JUnit4TestAdapter(HibernateL2CacheExampleMultiNodeSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(SpatialQueryExampleMultiNodeSelfTest.class)); - - return suite; } } diff --git a/examples/src/test/spark/org/apache/ignite/spark/testsuites/IgniteExamplesSparkSelfTestSuite.java b/examples/src/test/spark/org/apache/ignite/spark/testsuites/IgniteExamplesSparkSelfTestSuite.java index 43a1198ce569f..5b75bb11eeade 100644 --- a/examples/src/test/spark/org/apache/ignite/spark/testsuites/IgniteExamplesSparkSelfTestSuite.java +++ b/examples/src/test/spark/org/apache/ignite/spark/testsuites/IgniteExamplesSparkSelfTestSuite.java @@ -17,14 +17,13 @@ package org.apache.ignite.spark.testsuites; -import junit.framework.JUnit4TestAdapter; -import junit.framework.TestSuite; import org.apache.ignite.spark.examples.IgniteDataFrameSelfTest; import org.apache.ignite.spark.examples.JavaIgniteDataFrameSelfTest; import org.apache.ignite.spark.examples.SharedRDDExampleSelfTest; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.BeforeClass; import org.junit.runner.RunWith; -import org.junit.runners.AllTests; +import org.junit.runners.Suite; import static org.apache.ignite.IgniteSystemProperties.IGNITE_OVERRIDE_MCAST_GRP; @@ -33,21 +32,17 @@ *

    * Contains only Spring ignite examples tests. */ -@RunWith(AllTests.class) +@RunWith(Suite.class) +@Suite.SuiteClasses({ + SharedRDDExampleSelfTest.class, + IgniteDataFrameSelfTest.class, + JavaIgniteDataFrameSelfTest.class, +}) public class IgniteExamplesSparkSelfTestSuite { - /** - * @return Suite. - */ - public static TestSuite suite() { + /** */ + @BeforeClass + public static void init() { System.setProperty(IGNITE_OVERRIDE_MCAST_GRP, GridTestUtils.getNextMulticastGroup(IgniteExamplesSparkSelfTestSuite.class)); - - TestSuite suite = new TestSuite("Ignite Spark Examples Test Suite"); - - suite.addTest(new JUnit4TestAdapter(SharedRDDExampleSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(IgniteDataFrameSelfTest.class)); - suite.addTest(new JUnit4TestAdapter(JavaIgniteDataFrameSelfTest.class)); - - return suite; } } From 5cec9a4bd9d8500aaaf7a91a8d54a906bbbf3b44 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Fri, 21 Dec 2018 20:13:49 +0300 Subject: [PATCH 161/176] IGNITE-10177 Junit 3 cleanup - manually adjusted merge -- verified with diffs overview and rebuild --- .../persistence/db/IgniteSequentialNodeCrashRecoveryTest.java | 2 ++ .../ignite/testsuites/IgnitePdsWithIndexingCoreTestSuite.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgniteSequentialNodeCrashRecoveryTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgniteSequentialNodeCrashRecoveryTest.java index 9135ba7376666..b4ad8c853a69e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgniteSequentialNodeCrashRecoveryTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgniteSequentialNodeCrashRecoveryTest.java @@ -53,6 +53,7 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; /** * @@ -111,6 +112,7 @@ public class IgniteSequentialNodeCrashRecoveryTest extends GridCommonAbstractTes /** * @throws Exception if failed. */ + @Test public void testCrashOnCheckpointAfterLogicalRecovery() throws Exception { IgniteEx g = startGrid(0); diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgnitePdsWithIndexingCoreTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgnitePdsWithIndexingCoreTestSuite.java index 9b7ace8ad65be..fdd3a47fb6a31 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgnitePdsWithIndexingCoreTestSuite.java +++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgnitePdsWithIndexingCoreTestSuite.java @@ -95,7 +95,7 @@ public static TestSuite suite() { suite.addTest(new JUnit4TestAdapter(IgniteLogicalRecoveryTest.class)); - suite.addTestSuite(IgniteSequentialNodeCrashRecoveryTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteSequentialNodeCrashRecoveryTest.class)); return suite; } From 711a2cce466f1fd57028ed5cb87ae181393ad5a8 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Fri, 21 Dec 2018 20:17:23 +0300 Subject: [PATCH 162/176] IGNITE-10177 Junit 3 cleanup - ticket number in ignore message corrected per review comments -- verified with diffs overview and rebuild --- .../cache/CacheGetEntryPessimisticRepeatableReadSelfTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryPessimisticRepeatableReadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryPessimisticRepeatableReadSelfTest.java index a3f89ce45af64..db917b7cf5170 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryPessimisticRepeatableReadSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryPessimisticRepeatableReadSelfTest.java @@ -82,7 +82,7 @@ public void testPartitionedTransactionalMvcc() throws Exception { /** * @throws Exception If failed. */ - @Ignore("https://issues.apache.org/jira/browse/IGNITE-7187") + @Ignore("https://issues.apache.org/jira/browse/IGNITE-9530") @Test public void testLocalTransactionalMvcc() throws Exception { CacheConfiguration cfg = new CacheConfiguration(DEFAULT_CACHE_NAME); From e7ff2b0f4da499e6d1c1d52e2f0f5581745c0d87 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Fri, 21 Dec 2018 20:21:09 +0300 Subject: [PATCH 163/176] IGNITE-10177 Junit 3 cleanup - ticket number in ignore message corrected per review comments -- verified with diffs overview and rebuild --- .../processors/cache/CacheDeferredDeleteSanitySelfTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDeferredDeleteSanitySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDeferredDeleteSanitySelfTest.java index d3bc8c3886866..ae63b1ba9c471 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDeferredDeleteSanitySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDeferredDeleteSanitySelfTest.java @@ -92,7 +92,7 @@ public void testDeferredDeleteMvccNear() throws Exception { /** * @throws Exception If fails. */ - @Ignore("https://issues.apache.org/jira/browse/IGNITE-7187") + @Ignore("https://issues.apache.org/jira/browse/IGNITE-9530") @Test public void testDeferredDeleteMvccLocal() throws Exception { testDeferredDelete(LOCAL, TRANSACTIONAL_SNAPSHOT, false, false); From fd3df232da1cbe9d92f314179e90ffb224ea8ab7 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Fri, 21 Dec 2018 20:24:20 +0300 Subject: [PATCH 164/176] IGNITE-10177 Junit 3 cleanup - ticket number in ignore message corrected per review comments -- verified with diffs overview and rebuild --- .../processors/cache/GridCacheVersionMultinodeTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionMultinodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionMultinodeTest.java index 6991d0310a9ad..bb604093e770e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionMultinodeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionMultinodeTest.java @@ -117,7 +117,7 @@ public void testVersionTxNearEnabled() throws Exception { /** * @throws Exception If failed. */ - @Ignore("https://issues.apache.org/jira/browse/IGNITE-7187") + @Ignore("https://issues.apache.org/jira/browse/IGNITE-8582") @Test public void testVersionMvccTx() throws Exception { atomicityMode = TRANSACTIONAL_SNAPSHOT; From 922dda8134c58b087b3b5a745805a9bb0ebe23ff Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Fri, 21 Dec 2018 20:32:45 +0300 Subject: [PATCH 165/176] IGNITE-10177 Junit 3 cleanup - removed outdated workaround per review comments -- verified with diffs overview and rebuild --- .../cache/persistence/db/wal/WalCompactionTest.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalCompactionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalCompactionTest.java index ffffac92e2749..88ce9842bdad6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalCompactionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalCompactionTest.java @@ -110,11 +110,7 @@ public class WalCompactionTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected void afterTest() throws Exception { - Thread thread = new Thread(this::stopAllGrids); - - thread.start(); - - thread.join(getTestTimeout()); + stopAllGrids(); cleanPersistenceDir(); } From 725d27d21fb7d8725907b2735ab84d434992dc9a Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Fri, 21 Dec 2018 20:35:38 +0300 Subject: [PATCH 166/176] IGNITE-10177 Junit 3 cleanup - added annotation per review comments -- verified with diffs overview and rebuild --- .../ignite/examples/ComputeScheduleExampleSelfTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/src/test/java-lgpl/org/apache/ignite/examples/ComputeScheduleExampleSelfTest.java b/examples/src/test/java-lgpl/org/apache/ignite/examples/ComputeScheduleExampleSelfTest.java index 90cf8f4409443..4c089abf6d317 100644 --- a/examples/src/test/java-lgpl/org/apache/ignite/examples/ComputeScheduleExampleSelfTest.java +++ b/examples/src/test/java-lgpl/org/apache/ignite/examples/ComputeScheduleExampleSelfTest.java @@ -19,15 +19,15 @@ import org.apache.ignite.examples.misc.schedule.ComputeScheduleExample; import org.apache.ignite.testframework.junits.common.GridAbstractExamplesTest; +import org.junit.Test; /** * Tests {@link ComputeScheduleExample}. */ public class ComputeScheduleExampleSelfTest extends GridAbstractExamplesTest { - /** - * @throws Exception If failed. - */ - public void testComputeScheduleExample() throws Exception { + /** */ + @Test + public void testComputeScheduleExample() { ComputeScheduleExample.main(EMPTY_ARGS); } } From 303e7cde52c5163a3697fc6a70b009d486233a49 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Fri, 21 Dec 2018 20:58:14 +0300 Subject: [PATCH 167/176] IGNITE-10773 migrate examples testsuites from Junit 3 to 4 - manual merge correction -- verified with diffs overview and rebuild --- .../ignite/testsuites/IgniteLgplExamplesSelfTestSuite.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/examples/src/test/java-lgpl/org/apache/ignite/testsuites/IgniteLgplExamplesSelfTestSuite.java b/examples/src/test/java-lgpl/org/apache/ignite/testsuites/IgniteLgplExamplesSelfTestSuite.java index aa14f8cb6576e..f7be880199991 100644 --- a/examples/src/test/java-lgpl/org/apache/ignite/testsuites/IgniteLgplExamplesSelfTestSuite.java +++ b/examples/src/test/java-lgpl/org/apache/ignite/testsuites/IgniteLgplExamplesSelfTestSuite.java @@ -17,8 +17,6 @@ package org.apache.ignite.testsuites; -import junit.framework.JUnit4TestAdapter; -import junit.framework.TestSuite; import org.apache.ignite.examples.ComputeScheduleExampleMultiNodeSelfTest; import org.apache.ignite.examples.ComputeScheduleExampleSelfTest; import org.apache.ignite.examples.HibernateL2CacheExampleMultiNodeSelfTest; From bf51f0c52b117f17257f0685f9586753d593e1af Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Fri, 21 Dec 2018 23:56:10 +0300 Subject: [PATCH 168/176] IGNITE-10177 Junit 3 cleanup - manually adjusted merge -- verified with diffs overview and rebuild --- .../cache/store/jdbc/CacheJdbcBlobStoreFactorySelfTest.java | 3 ++- .../cache/store/jdbc/CacheJdbcPojoStoreFactorySelfTest.java | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/spring/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcBlobStoreFactorySelfTest.java b/modules/spring/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcBlobStoreFactorySelfTest.java index 1822bec4f77cd..90473ce71259a 100644 --- a/modules/spring/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcBlobStoreFactorySelfTest.java +++ b/modules/spring/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcBlobStoreFactorySelfTest.java @@ -32,6 +32,7 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.h2.jdbcx.JdbcDataSource; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -82,9 +83,9 @@ public void testCacheConfiguration() throws Exception { /** * @throws Exception If failed. */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-10723") @Test public void testIncorrectBeanConfiguration() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-10723"); GridTestUtils.assertThrows(log, new Callable() { @Override public Object call() throws Exception { diff --git a/modules/spring/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreFactorySelfTest.java b/modules/spring/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreFactorySelfTest.java index 141bb630b28f7..7c20aa9ede817 100644 --- a/modules/spring/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreFactorySelfTest.java +++ b/modules/spring/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreFactorySelfTest.java @@ -29,6 +29,7 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.h2.jdbcx.JdbcDataSource; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -74,10 +75,9 @@ public void testSerializable() throws Exception { /** * @throws Exception If failed. */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-10723") @Test public void testIncorrectBeanConfiguration() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-10723"); - GridTestUtils.assertThrowsAnyCause(log, new Callable() { @Override public Object call() throws Exception { try (Ignite ignored = Ignition.start("modules/spring/src/test/config/pojo-incorrect-store-cache.xml")) { From 2f641d4baa5d9736421e68498687ebfcaeadc018 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Sat, 22 Dec 2018 00:06:02 +0300 Subject: [PATCH 169/176] IGNITE-10177 Junit 3 cleanup - manually adjusted merge -- verified with diffs overview and rebuild --- .../internal/managers/IgniteDiagnosticMessagesTest.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/IgniteDiagnosticMessagesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/IgniteDiagnosticMessagesTest.java index 4ff4cfd9beb69..1319852acd85f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/IgniteDiagnosticMessagesTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/IgniteDiagnosticMessagesTest.java @@ -54,6 +54,7 @@ import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -249,10 +250,9 @@ private CacheConfiguration cacheConfiguration(CacheAtomicityMode atomicityMode) /** * @throws Exception If failed. */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-9322") // Fix diagnostic message or disable test. @Test public void testSeveralLongRunningMvccTxs() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-9322"); // Fix diagnostic message or disable test. - checkSeveralLongRunningTxs(TRANSACTIONAL_SNAPSHOT); } @@ -372,10 +372,9 @@ private int countTxKeysInASingleBlock(String log) { /** * @throws Exception If failed. */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-9322") // Fix diagnostic message or disable test. @Test public void testLongRunningMvccTx() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-9322"); // Fix diagnostic message or disable test. - checkLongRunningTx(TRANSACTIONAL_SNAPSHOT); } From a43a0e029d2979c4ff460f61b3944d23b6afea80 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Sat, 22 Dec 2018 00:09:38 +0300 Subject: [PATCH 170/176] IGNITE-10177 Junit 3 cleanup - wip - fixed errors found by TC bot -- verified with diffs overview and rebuild --- .../ignite/internal/client/router/TcpSslRouterSelfTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/router/TcpSslRouterSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/router/TcpSslRouterSelfTest.java index 3b47ae5ca9d87..3e710f08796a5 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/client/router/TcpSslRouterSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/router/TcpSslRouterSelfTest.java @@ -20,12 +20,12 @@ import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.client.ssl.GridSslContextFactory; import org.apache.ignite.testframework.GridTestUtils; -import org.apache.ignite.testsuites.IgniteIgnore; +import org.junit.Ignore; /** * */ -@IgniteIgnore(value = "https://issues.apache.org/jira/browse/IGNITE-433", forceFailure = true) +@Ignore(value = "https://issues.apache.org/jira/browse/IGNITE-433") public class TcpSslRouterSelfTest extends TcpRouterAbstractSelfTest { /** {@inheritDoc} */ @Override protected boolean useSsl() { @@ -47,4 +47,4 @@ public class TcpSslRouterSelfTest extends TcpRouterAbstractSelfTest { return cfg; } -} \ No newline at end of file +} From d9f99085cb770686ae0acf489301e66887655483 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Sat, 22 Dec 2018 00:28:37 +0300 Subject: [PATCH 171/176] IGNITE-10177 Junit 3 cleanup - formatting corrected per self-review -- verified with diffs overview --- .../cache/store/jdbc/CacheJdbcBlobStoreFactorySelfTest.java | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/spring/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcBlobStoreFactorySelfTest.java b/modules/spring/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcBlobStoreFactorySelfTest.java index 90473ce71259a..39f3d31aa6e90 100644 --- a/modules/spring/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcBlobStoreFactorySelfTest.java +++ b/modules/spring/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcBlobStoreFactorySelfTest.java @@ -86,7 +86,6 @@ public void testCacheConfiguration() throws Exception { @Ignore("https://issues.apache.org/jira/browse/IGNITE-10723") @Test public void testIncorrectBeanConfiguration() throws Exception { - GridTestUtils.assertThrows(log, new Callable() { @Override public Object call() throws Exception { try(Ignite ignite = Ignition.start("modules/spring/src/test/config/incorrect-store-cache.xml")) { From 47863d65dd60221adfe3113032d8867c18e82345 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Sat, 22 Dec 2018 01:21:37 +0300 Subject: [PATCH 172/176] IGNITE-10177 Junit 3 cleanup - wip - fixed errors found by TC bot -- verified with diffs overview and rebuild --- .../service/GridServiceProcessorBatchDeploySelfTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorBatchDeploySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorBatchDeploySelfTest.java index 83d9b2b3e5e07..569eb7a7af5e3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorBatchDeploySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorBatchDeploySelfTest.java @@ -41,6 +41,7 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -449,10 +450,9 @@ public void testCancelAllAsync() throws Exception { /** * @throws Exception If failed. */ + @Ignore("https://issues.apache.org/jira/browse/IGNITE-10021") @Test public void testCancelAllTopologyChange() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-10021"); - Ignite client = grid(CLIENT_NODE_NAME); int numServices = 500; From 66d7567f0b0517fa8c5cf6e3f938266cce146167 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Sat, 22 Dec 2018 15:47:48 +0300 Subject: [PATCH 173/176] IGNITE-10739 get rid of using JUnit 3 API in IgniteConfigVariationsAbstractTes - manual merge correction -- verified with diffs overview and rebuild --- .../junits/GridAbstractTest.java | 1 - .../IgniteConfigVariationsAbstractTest.java | 34 -------------- .../junits/LegacyConfigVariationsSupport.java | 47 ------------------- 3 files changed, 82 deletions(-) delete mode 100644 modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacyConfigVariationsSupport.java diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java index 2df209992db45..872d625090545 100755 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java @@ -149,7 +149,6 @@ "ProhibitedExceptionDeclared", "JUnitTestCaseWithNonTrivialConstructors" }) -@RunWith(JUnit4.class) public abstract class GridAbstractTest extends LegacySupport { /************************************************************** * DO NOT REMOVE TRANSIENT - THIS OBJECT MIGHT BE TRANSFERRED * diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteConfigVariationsAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteConfigVariationsAbstractTest.java index 58542b502ba03..9ae2a06ed426d 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteConfigVariationsAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteConfigVariationsAbstractTest.java @@ -25,7 +25,6 @@ import java.io.ObjectOutput; import java.io.ObjectOutputStream; import java.io.Serializable; -import junit.framework.TestResult; import org.apache.commons.io.FileUtils; import org.apache.ignite.Ignition; import org.apache.ignite.binary.BinaryObjectException; @@ -43,13 +42,7 @@ /** * Common abstract test for Ignite tests based on configurations variations. - * TODO IGNITE-10739 redesign this and related classes to get rid of JUnit 3 features. - * - * @deprecated This class uses obsolete methods of JUnit 3 framework and because of that you need to use JUnit 3 - * naming convention for test cases in classes extending it. Also, Junit 4 annotations like {@code Before} - * and {@code Ignore} may not work. It is expected to be reworked per IGNITE-10739. */ -@Deprecated public abstract class IgniteConfigVariationsAbstractTest extends GridCommonAbstractTest { /** */ protected static final int SERVER_NODE_IDX = 0; @@ -93,33 +86,6 @@ public static void injectTestsConfiguration(VariationsTestsConfig testsCfgInject super.runTestCase(testRoutine); } - /** - * {@inheritDoc} - *

    - * Fallback to TestCase functionality.

    - */ - @Override public int countTestCases() { - return countTestCasesFallback(); - } - - /** - * {@inheritDoc} - *

    - * Fallback to TestCase functionality.

    - */ - @Override public void run(TestResult res) { - runFallback(res); - } - - /** - * {@inheritDoc} - *

    - * Fallback to TestCase functionality.

    - */ - @Override public String getName() { - return getNameFallback(); - } - /** {@inheritDoc} */ @Override protected boolean isSafeTopology() { return false; diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacyConfigVariationsSupport.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacyConfigVariationsSupport.java deleted file mode 100644 index 843f67782df43..0000000000000 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/LegacyConfigVariationsSupport.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You 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.apache.ignite.testframework.junits; - -import junit.framework.TestCase; // IMPL NOTE some old tests expect inherited deprecated assertions. -import junit.framework.TestResult; - -/** - * Supports compatibility with old tests based on configurations variations. - */ -abstract class LegacyConfigVariationsSupport extends TestCase { - /** - * Fallback to superclass. - */ - protected int countTestCasesFallback() { - return super.countTestCases(); - } - - /** - * Fallback to superclass. - */ - protected void runFallback(TestResult res) { - super.run(res); - } - - /** - * Fallback to superclass. - */ - protected String getNameFallback() { - return super.getName(); - } -} From 699f0331907d5eea32d72cca25fda5bfc8849416 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Sat, 22 Dec 2018 15:53:01 +0300 Subject: [PATCH 174/176] IGNITE-10739 get rid of using JUnit 3 API in IgniteConfigVariationsAbstractTes - formatting corrected per self-review -- verified with diffs overview and rebuild --- .../org/apache/ignite/yarn/IgniteApplicationMasterSelfTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/yarn/src/test/java/org/apache/ignite/yarn/IgniteApplicationMasterSelfTest.java b/modules/yarn/src/test/java/org/apache/ignite/yarn/IgniteApplicationMasterSelfTest.java index e2bb15fcdda3e..575ef42a314f6 100644 --- a/modules/yarn/src/test/java/org/apache/ignite/yarn/IgniteApplicationMasterSelfTest.java +++ b/modules/yarn/src/test/java/org/apache/ignite/yarn/IgniteApplicationMasterSelfTest.java @@ -145,7 +145,7 @@ public void testMemoryOverHeadAllocation() throws Exception { * @throws Exception If failed. */ @Test - public void testMemoryOverHeadPreventAllocation() throws Exception { + public void testMemoryOverHeadPreventAllocation() throws Exception { rmMock.availableRes(new MockResource(1024, 2)); appMaster.setRmClient(rmMock); appMaster.setNmClient(new NMMock()); From 447510998d50c333c4f8d1c4e19000ab37bcf0f1 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Thu, 27 Dec 2018 01:22:09 +0300 Subject: [PATCH 175/176] IGNITE-10773 migrate examples testsuites from Junit 3 to 4 - correction per review comments -- verified with diffs overview and rebuild --- .../ConfigVariationsMediator.java | 73 ------------------- 1 file changed, 73 deletions(-) delete mode 100644 modules/core/src/test/java/org/apache/ignite/testframework/configvariations/ConfigVariationsMediator.java diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/configvariations/ConfigVariationsMediator.java b/modules/core/src/test/java/org/apache/ignite/testframework/configvariations/ConfigVariationsMediator.java deleted file mode 100644 index 497816286fdc1..0000000000000 --- a/modules/core/src/test/java/org/apache/ignite/testframework/configvariations/ConfigVariationsMediator.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You 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.apache.ignite.testframework.configvariations; - -import java.util.IdentityHashMap; -import java.util.Map; -import junit.framework.JUnit4TestAdapter; -import junit.framework.TestResult; -import junit.framework.TestSuite; -import org.apache.ignite.testframework.junits.IgniteConfigVariationsAbstractTest; - -/** - * Mediates passing config variations to respective tests. - */ -class ConfigVariationsMediator { - /** IMPL NOTE this relies on serialized execution of test cases. */ - private static final Map map = new IdentityHashMap<>(); - - /** */ - private final JUnit4TestAdapter adapter; - - /** */ - private final String name; - - /** */ - ConfigVariationsMediator(Class cls, VariationsTestsConfig cfg) { - adapter = prepare(cls, cfg); - - name = cls.getSimpleName(); - } - - /** */ - TestSuite makeTestSuite() { - TestSuite suite = new TestSuite(name); - - suite.addTest(adapter); - - return suite; - } - - /** */ - private JUnit4TestAdapter prepare(Class cls, - VariationsTestsConfig cfg) { - JUnit4TestAdapter res = new JUnit4TestAdapter(cls) { - final JUnit4TestAdapter self = this; - - @Override public void run(TestResult tr) { - IgniteConfigVariationsAbstractTest.injectTestsConfiguration(map.get(self)); - - super.run(tr); - } - }; - - map.put(res, cfg); - - return res; - } -} From a22e2396f13e0417bb5973ffb74d38c09d5f0305 Mon Sep 17 00:00:00 2001 From: Oleg Ignatenko Date: Thu, 27 Dec 2018 02:52:24 +0300 Subject: [PATCH 176/176] IGNITE-10773 migrate examples testsuites from Junit 3 to 4 - cleanup per review comments -- verified with diffs overview --- .../ignite/testsuites/IgniteExamplesSelfTestSuite.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesSelfTestSuite.java b/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesSelfTestSuite.java index b2c3b716360f8..a92d490d7b717 100644 --- a/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesSelfTestSuite.java +++ b/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesSelfTestSuite.java @@ -98,10 +98,4 @@ EncryptedCacheExampleSelfTest.class, }) public class IgniteExamplesSelfTestSuite { -// /** */ -// @BeforeClass -// public static void init() { -// System.setProperty(IGNITE_OVERRIDE_MCAST_GRP, -// GridTestUtils.getNextMulticastGroup(IgniteExamplesSelfTestSuite.class)); -// } }