Skip to content

Commit

Permalink
fix(ci): fix cassandra test flake (#11557)
Browse files Browse the repository at this point in the history
  • Loading branch information
david-leifker authored Oct 8, 2024
1 parent 8fcd5e8 commit 35dfff7
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.linkedin.metadata.entity;
package com.linkedin.metadata.entity.cassandra;

import static org.mockito.Mockito.*;

import com.datastax.oss.driver.api.core.CqlSession;
import com.linkedin.metadata.CassandraTestUtils;
import com.linkedin.metadata.config.PreProcessHooks;
import com.linkedin.metadata.entity.cassandra.CassandraAspectDao;
import com.linkedin.metadata.entity.cassandra.CassandraRetentionService;
import com.linkedin.metadata.entity.AspectMigrationsDaoTest;
import com.linkedin.metadata.entity.EntityServiceImpl;
import com.linkedin.metadata.event.EventProducer;
import com.linkedin.metadata.models.registry.EntityRegistryException;
import com.linkedin.metadata.service.UpdateIndicesService;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.linkedin.metadata.entity;
package com.linkedin.metadata.entity.cassandra;

import static org.mockito.Mockito.*;
import static org.testng.Assert.*;
Expand All @@ -11,8 +11,10 @@
import com.linkedin.metadata.AspectIngestionUtils;
import com.linkedin.metadata.CassandraTestUtils;
import com.linkedin.metadata.config.PreProcessHooks;
import com.linkedin.metadata.entity.cassandra.CassandraAspectDao;
import com.linkedin.metadata.entity.cassandra.CassandraRetentionService;
import com.linkedin.metadata.entity.EntityServiceAspectRetriever;
import com.linkedin.metadata.entity.EntityServiceImpl;
import com.linkedin.metadata.entity.EntityServiceTest;
import com.linkedin.metadata.entity.ListResult;
import com.linkedin.metadata.event.EventProducer;
import com.linkedin.metadata.key.CorpUserKey;
import com.linkedin.metadata.models.registry.EntityRegistryException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.linkedin.metadata.timeline;
package com.linkedin.metadata.timeline.cassandra;

import static org.mockito.Mockito.mock;

Expand All @@ -9,6 +9,8 @@
import com.linkedin.metadata.entity.cassandra.CassandraAspectDao;
import com.linkedin.metadata.event.EventProducer;
import com.linkedin.metadata.models.registry.EntityRegistryException;
import com.linkedin.metadata.timeline.TimelineServiceImpl;
import com.linkedin.metadata.timeline.TimelineServiceTest;
import org.testcontainers.containers.CassandraContainer;
import org.testng.Assert;
import org.testng.annotations.AfterClass;
Expand Down
10 changes: 10 additions & 0 deletions metadata-io/src/test/resources/testng-cassandra.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="metadata-io-cassandra" parallel="tests" thread-count="1">
<test name="cassandra-testcontainers">
<packages>
<package name="com.linkedin.metadata.entity.cassandra.*" />
<package name="com.linkedin.metadata.timeline.cassandra.*"/>
</packages>
</test>
</suite>
2 changes: 2 additions & 0 deletions metadata-io/src/test/resources/testng-other.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
<exclude name="com.linkedin.metadata.search.elasticsearch"/>
<exclude name="com.linkedin.metadata.graph.search.opensearch" />
<exclude name="com.linkedin.metadata.search.opensearch"/>
<exclude name="com.linkedin.metadata.entity.cassandra.*" />
<exclude name="com.linkedin.metadata.timeline.cassandra.*"/>
</package>
</packages>
</test>
Expand Down
1 change: 1 addition & 0 deletions metadata-io/src/test/resources/testng.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ parallel followed by everything else.
<suite name="metadata-io-testcontainers">
<suite-files>
<suite-file path="testng-search.xml"/>
<suite-file path="testng-cassandra.xml"/>
<suite-file path="testng-other.xml"/>
</suite-files>
</suite>

0 comments on commit 35dfff7

Please sign in to comment.