Changeset 4228


Ignore:
Timestamp:
Apr 17, 2008, 1:18:49 PM (15 years ago)
Author:
Nicklas Nordborg
Message:

References #957: Base1PluginExecuter doesn't import plug-in generated BASEfiles as expected

Fixed problem with test program not cleaning up after itself.

Location:
branches/2.6-stable/src/test
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.6-stable/src/test/TestBase1PluginExecuter.java

    r4212 r4228  
    6464    // Create experiment
    6565    int experimentId = TestAnalyzePluginUtil.test_createExperiment("data/test.rawdata.import.txt", 2, 100);
     66    int[] rawBioAssays = TestExperiment.test_list_rawbioassays(experimentId, -1);
    6667
    6768    int formulaId = TestFormula.test_create("raw fg mean", Formula.Type.INTENSITY_EXPRESSION,
     
    107108    // Cleanup
    108109    TestExperiment.test_delete(experimentId);
     110    if (rawBioAssays != null)
     111    {
     112      for (int rbaId : rawBioAssays)
     113      {
     114        TestRawBioAssay.test_delete(rbaId);
     115      }
     116    }
    109117    TestPluginConfiguration.test_delete(pluginConfigurationId);
    110118    TestPluginConfiguration.test_delete(pluginConfigurationId2);
  • branches/2.6-stable/src/test/TestExperiment.java

    r4212 r4228  
    419419  }
    420420
    421   static void test_list_rawbioassays(int id, int expectedResults)
    422   {
    423     if (id == 0) return;
    424     DbControl dc = null;
     421  static int[] test_list_rawbioassays(int id, int expectedResults)
     422  {
     423    if (id == 0) return null;
     424    DbControl dc = null;
     425    int[] rawBioAssays = null;
    425426    try
    426427    {
     
    429430
    430431      ItemResultList<RawBioAssay> l = e.getRawBioAssays().list(dc);
     432      rawBioAssays = new int[l.size()];
    431433      for (int i = 0; i<l.size(); i++)
    432434      {
     435        rawBioAssays[i] = l.get(i).getId();
    433436        write_item(i, l.get(i));
    434437      }
     
    449452      if (dc != null) dc.close();
    450453    }
     454    return rawBioAssays;
    451455  }
    452456 
Note: See TracChangeset for help on using the changeset viewer.