Subversion Repositories DevTools

Rev

Rev 886 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 886 Rev 896
Line 22... Line 22...
22
   */
22
   */
23
  private static final Logger mLogger = Logger.getLogger(SlaveThread.class);
23
  private static final Logger mLogger = Logger.getLogger(SlaveThread.class);
24
 
24
 
25
  /**constructor
25
  /**constructor
26
   */
26
   */
27
  public SlaveThread(int rtag_id, int rcon_id, String gbebuildfilter)
27
  public SlaveThread(int rtag_id, int rcon_id, String unitTest)
28
  {
28
  {
29
    mLogger.warn("SlaveThread rtag_id " + rtag_id + " rcon_id " + rcon_id);
29
    mLogger.warn("SlaveThread rtag_id " + rtag_id + " rcon_id " + rcon_id);
30
    mRtagId = rtag_id;
30
    mRtagId = rtag_id;
31
    mRconId = rcon_id;
31
    mRconId = rcon_id;
-
 
32
    if ( unitTest == null )
-
 
33
    {
32
    mGbebuildfilter = gbebuildfilter;
34
      unitTest = new String();
-
 
35
    }
-
 
36
    mUnitTest = unitTest;
33
  }
37
  }
34
 
38
 
35
  /**implements the sequence diagrams consume build files, allowed to proceed, check environment
39
  /**implements the sequence diagrams consume build files, allowed to proceed, check environment
36
   */
40
   */
37
  public void run()
41
  public void run()
Line 55... Line 59...
55
          mLogger.warn("run is interrupted");
59
          mLogger.warn("run is interrupted");
56
          // unit test technique
60
          // unit test technique
57
          throw new ExitException();
61
          throw new ExitException();
58
        }
62
        }
59
        
63
        
60
        if ( mGbebuildfilter.compareTo("unit test spawn thread") == 0)
64
        if ( mUnitTest.compareTo("unit test spawn thread") == 0)
61
        {
65
        {
62
          throw new Exception();
66
          throw new Exception();
63
        }
67
        }
64
        
68
        
65
        // allowed to proceed
69
        // allowed to proceed
66
        if ( mGbebuildfilter.compareTo("unit test consume build files") != 0)
70
        if ( mUnitTest.compareTo("unit test consume build files") != 0)
67
        {
71
        {
68
          mRunLevel = RunLevel.IDLE;
72
          mRunLevel = RunLevel.IDLE;
69
          mLogger.warn("run changing run level to IDLE for rcon_id " + mRconId);
73
          mLogger.warn("run changing run level to IDLE for rcon_id " + mRconId);
70
          mRunLevel.persistNew(mReleaseManager, mRconId);
74
          mRunLevel.persistNew(mReleaseManager, mRconId);
71
 
75
 
Line 130... Line 134...
130
          throw new ExitException();
134
          throw new ExitException();
131
        }
135
        }
132
        
136
        
133
        mLogger.info("run consumed build files");
137
        mLogger.info("run consumed build files");
134
 
138
 
135
        if ( mGbebuildfilter.compareTo("unit test consume build files") == 0 )
139
        if ( mUnitTest.compareTo("unit test consume build files") == 0 )
136
        {
140
        {
137
          throw new ExitException();
141
          throw new ExitException();
138
        }
142
        }
139
 
143
 
140
        // set CURRENT_BUILD_FILES to null
144
        // set CURRENT_BUILD_FILES to null
Line 218... Line 222...
218
        {
222
        {
219
          try
223
          try
220
          {
224
          {
221
            // notify first
225
            // notify first
222
            // many reasons for indefinite pause, including database related, so do database last
226
            // many reasons for indefinite pause, including database related, so do database last
-
 
227
            mRecoverable = false;
-
 
228
            
-
 
229
            if ( cause.compareTo(Package.mRecoverable) == 0 )
-
 
230
            {
-
 
231
              mRecoverable = true;
-
 
232
            }
-
 
233
 
223
            indefinitePause(rippleEngine, cause);
234
            indefinitePause(rippleEngine, cause);
224
            mReleaseManager.indefinitePause();
235
            mReleaseManager.indefinitePause();
225
            // DEVI 51366 force sleep at beginning of while loop
236
            // DEVI 51366 force sleep at beginning of while loop
226
            mException = true;
237
            mException = true;
227
          }
238
          }