File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
comet-java-client/src/test/java/ml/comet/experiment/impl Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 2222import static ml .comet .experiment .impl .ExperimentTestFactory .createApiExperiment ;
2323import static ml .comet .experiment .impl .ExperimentTestFactory .createOnlineExperiment ;
2424import static ml .comet .experiment .impl .TestUtils .SOME_FULL_CONTEXT ;
25+ import static ml .comet .experiment .impl .TestUtils .awaitForCondition ;
2526import static ml .comet .experiment .impl .TestUtils .createCurve ;
2627import static ml .comet .experiment .impl .asset .AssetType .CURVE ;
2728import static ml .comet .experiment .impl .asset .AssetType .TEXT_SAMPLE ;
@@ -160,12 +161,10 @@ public void testLogCurveOverwrite() throws Exception {
160161 Curve curve = createCurve (fileName , pointsCount * 2 );
161162 apiExperiment .logCurve (curve , true , SOME_FULL_CONTEXT );
162163
164+ awaitForCondition (() -> apiExperiment .getAssetList (CURVE .type ()).size () == 1 ,
165+ "Curve was not logged or overwritten" );
166+
163167 List <LoggedExperimentAsset > assets = apiExperiment .getAssetList (CURVE .type ());
164- if (assets .size () > 1 ) {
165- for (LoggedExperimentAsset asset : assets ) {
166- System .out .println (asset .getLogicalPath ());
167- }
168- }
169168 assertEquals (1 , assets .size (), "wrong number of assets returned" );
170169
171170 long newSize = assets .get (0 ).getSize ().orElse ((long ) -1 );
Original file line number Diff line number Diff line change @@ -659,8 +659,8 @@ public void testLogAndGetCurveOverwrite() throws Exception {
659659
660660 experiment .logCurve (curve , true , SOME_FULL_CONTEXT );
661661
662- awaitForCondition (() -> ! experiment .getAssetList (CURVE .type ()).isEmpty () ,
663- "Curve was not logged" );
662+ awaitForCondition (() -> experiment .getAssetList (CURVE .type ()).size () == 1 ,
663+ "Curve was not logged or overwritten " );
664664
665665 List <LoggedExperimentAsset > assets = experiment .getAssetList (CURVE .type ());
666666 assertEquals (1 , assets .size (), "wrong number of assets returned" );
You can’t perform that action at this time.
0 commit comments